Submission #207089

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
2070892020-03-06 11:19:18brcodeKitchen (BOI19_kitchen)C++14
100 / 100
167 ms104056 KiB
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 310;
const int MAXN2 = 310*310;
int a[MAXN];
int b[MAXN];
int dp[MAXN2][MAXN];
int main(){
int n,m,k;
cin>>n>>m>>k;
int holdsum = 0;
int holdsum2 = 0;
for(int i=1;i<=n;i++){
cin>>a[i];
holdsum+=a[i];
if(a[i]<k){
cout<<"Impossible"<<endl;
return 0;
}
}
for(int i=1;i<=m;i++){
cin>>b[i];
holdsum2 += b[i];
}
for(int i=0;i<=holdsum2;i++){
for(int j=0;j<=m;j++){
dp[i][j] = -1e9;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...