# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
207089 | brcode | Kitchen (BOI19_kitchen) | C++14 | 167 ms | 104056 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |