Submission #8880992
Source Code Expand
// #pragma GCC target("avx") // CPU 処理並列化
// #pragma GCC optimize("O3") // CPU 処理並列化
// #pragma GCC optimize("unroll-loops") // 条件処理の呼び出しを減らす
#include<stdio.h>
#include<math.h>
#include<algorithm>
#include<queue>
#include<deque>
#include<stack>
#include<string>
#include<string.h>
#include<vector>
#include<set>
#include<map>
#include<bitset>
#include<stdlib.h>
#include<cassert>
#include<time.h>
#include<bitset>
#include<numeric>
#include<unordered_set>
#include<complex>
using namespace std;
const long long mod=1000000007;
const long long inf=mod*mod;
const long long d2=(mod+1)/2;
const double EPS=1e-10;
const double INF=1e+10;
const double PI=acos(-1.0);
const int C_SIZE = 3100000;
namespace{
long long fact[C_SIZE];
long long finv[C_SIZE];
long long inv[C_SIZE];
long long Comb(int a,int b){
if(a<b||b<0)return 0;
return fact[a]*finv[b]%mod*finv[a-b]%mod;
}
void init_C(int n){
fact[0]=finv[0]=inv[1]=1;
for(int i=2;i<n;i++){
inv[i]=(mod-(mod/i)*inv[mod%i]%mod)%mod;
}
for(int i=1;i<n;i++){
fact[i]=fact[i-1]*i%mod;
finv[i]=finv[i-1]*inv[i]%mod;
}
}
long long pw(long long a,long long b){
if(a<0LL)return 0;
if(b<0LL)return 0;
long long ret=1;
while(b){
if(b%2)ret=ret*a%mod;
a=a*a%mod;
b/=2;
}
return ret;
}
long long pw_mod(long long a,long long b,long long M){
if(a<0LL)return 0;
if(b<0LL)return 0;
long long ret=1;
while(b){
if(b%2)ret=ret*a%M;
a=a*a%M;
b/=2;
}
return ret;
}
int pw_mod_int(int a,int b,int M){
if(a<0)return 0;
if(b<0)return 0;
int ret=1;
while(b){
if(b%2)ret=(long long)ret*a%M;
a=(long long)a*a%M;
b/=2;
}
return ret;
}
int ABS(int a){return max(a,-a);}
long long ABS(long long a){return max(a,-a);}
double ABS(double a){return max(a,-a);}
int sig(double r) { return (r < -EPS) ? -1 : (r > +EPS) ? +1 : 0; }
}
// ここから編集しろ
int t[5];
int main(){
int a,b,c,d,e,f;scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f);
int ret=0;
ret=max(ret,(a/d)*(b/e)*(c/f));
ret=max(ret,(a/d)*(b/f)*(c/e));
ret=max(ret,(a/e)*(b/d)*(c/f));
ret=max(ret,(a/e)*(b/f)*(c/d));
ret=max(ret,(a/f)*(b/d)*(c/e));
ret=max(ret,(a/f)*(b/e)*(c/d));
printf("%d\n",ret);
}
Submission Info
Submission Time
2019-12-09 14:58:12+0900
Task
A - 梱包できるかな?
User
tozangezan
Language
C++14 (GCC 5.4.1)
Score
100
Code Size
2336 Byte
Status
AC
Exec Time
1 ms
Memory
128 KB
Compile Error
./Main.cpp: In function ‘int main()’:
./Main.cpp:90:57: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
int a,b,c,d,e,f;scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f);
^
Judge Result
Set Name
All
Score / Max Score
100 / 100
Status
Set Name
Test Cases
All
00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 00_sample_04.txt, 01_rand_00.txt, 01_rand_01.txt, 01_rand_02.txt, 01_rand_03.txt, 01_rand_04.txt, 01_rand_05.txt, 01_rand_06.txt, 01_rand_07.txt, 01_rand_08.txt, 01_rand_09.txt, 01_rand_10.txt, 01_rand_11.txt, 01_rand_12.txt, 01_rand_13.txt, 01_rand_14.txt, 01_rand_15.txt, 01_rand_16.txt, 01_rand_17.txt, 01_rand_18.txt, 01_rand_19.txt, 01_rand_20.txt, 01_rand_21.txt, 01_rand_22.txt, 01_rand_23.txt, 01_rand_24.txt, 01_rand_25.txt, 01_rand_26.txt, 01_rand_27.txt, 01_rand_28.txt, 01_rand_29.txt, 99_min.txt
Case Name
Status
Exec Time
Memory
00_sample_01.txt
AC
0 ms
128 KB
00_sample_02.txt
AC
1 ms
128 KB
00_sample_03.txt
AC
1 ms
128 KB
00_sample_04.txt
AC
1 ms
128 KB
01_rand_00.txt
AC
1 ms
128 KB
01_rand_01.txt
AC
0 ms
128 KB
01_rand_02.txt
AC
1 ms
128 KB
01_rand_03.txt
AC
1 ms
128 KB
01_rand_04.txt
AC
1 ms
128 KB
01_rand_05.txt
AC
1 ms
128 KB
01_rand_06.txt
AC
1 ms
128 KB
01_rand_07.txt
AC
1 ms
128 KB
01_rand_08.txt
AC
0 ms
128 KB
01_rand_09.txt
AC
1 ms
128 KB
01_rand_10.txt
AC
1 ms
128 KB
01_rand_11.txt
AC
1 ms
128 KB
01_rand_12.txt
AC
1 ms
128 KB
01_rand_13.txt
AC
1 ms
128 KB
01_rand_14.txt
AC
1 ms
128 KB
01_rand_15.txt
AC
1 ms
128 KB
01_rand_16.txt
AC
1 ms
128 KB
01_rand_17.txt
AC
0 ms
128 KB
01_rand_18.txt
AC
0 ms
128 KB
01_rand_19.txt
AC
1 ms
128 KB
01_rand_20.txt
AC
1 ms
128 KB
01_rand_21.txt
AC
1 ms
128 KB
01_rand_22.txt
AC
1 ms
128 KB
01_rand_23.txt
AC
1 ms
128 KB
01_rand_24.txt
AC
1 ms
128 KB
01_rand_25.txt
AC
1 ms
128 KB
01_rand_26.txt
AC
1 ms
128 KB
01_rand_27.txt
AC
1 ms
128 KB
01_rand_28.txt
AC
1 ms
128 KB
01_rand_29.txt
AC
0 ms
128 KB
99_min.txt
AC
1 ms
128 KB