# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
745863 | 2023-05-21T08:52:35 Z | vjudge1 | Kitchen (BOI19_kitchen) | C++17 | 1 ms | 212 KB |
#include <bits/stdc++.h> using namespace std; using ll = long long; int main(){ int n, m, k; cin >> n >> m >> k; vector <int> whours(n); for(int i = 0; i < n; i++){ cin >> whours[i]; } vector <int> reality(m); for(int i = 0; i < m; i++){ cin >> reality[i]; } /*for(int i : whours) cout << i <<endl; for(int i : reality) cout << i;*/ int cntw = 0; int cntr = 0; for(int i = 0; i < whours.size(); i++){ cntw += whours[i]; } //cout << cntw; if(m < k)cout << "Impossible"; else if(m == 2 && k == 1){ for(int i = 0; i < reality.size(); i++){ cntr = min(cntr, reality[i]); } cout << cntw - cntr; } else{ for(int i = 0; i < reality.size(); i++){ cntr += reality[i]; } cout << cntr - cntw; } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |