Submission #134876

#TimeUsernameProblemLanguageResultExecution timeMemory
134876miguelKitchen (BOI19_kitchen)C++14
Compilation error
0 ms0 KiB
nt n, m, k, s; int a[305], b[305], dp[2][1000001]; int32_t main(){ ios_base :: sync_with_stdio(0); cin.tie(); cout.tie(); cin>>n>>m>>k; //if(m<k) return cout<<"Impossible", 0; for(int i=1; i<=n; i++){ cin>>a[i]; s+=a[i]; if(a[i]<k) return cout<<"Impossible", 0; } for(int i=1; i<=m; i++) cin>>b[i]; dp[0][0]=0; //int cur=0; for(int i=1; i<=m; i++){ for(int h=0; h<=nmax*nmax; h++){ dp[1][h+b[i]]=max(dp[0][h+b[i]], dp[0][h]+min(b[i], n)); } //cur+=b[i]; for(int h=0; h<=nmax*nmax; h++) dp[0][h]=dp[1][h]; } //cout<<"xd"; for(int h=s; h<=nmax*nmax; h++){ //cout<<h<<" "<<dp[0][h]<<endl; if(dp[0][h]>=n*k) return cout<<h-s, 0; } cout<<"Impossible"; }

Compilation message (stderr)

kitchen.cpp:1:1: error: 'nt' does not name a type; did you mean 'int'?
 nt n, m, k, s;
 ^~
 int
kitchen.cpp:4:1: error: 'int32_t' does not name a type; did you mean '__int128_t'?
 int32_t main(){
 ^~~~~~~
 __int128_t