# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
400903 | 2021-05-08T19:48:46 Z | Divanny | Jelly Flavours (IOI20_jelly) | C++14 | 7 ms | 320 KB |
#include "jelly.h" #include <bits/stdc++.h> using namespace std; int find_maximum_unique(int x, int y, vector<int> a, vector<int> b) { int n = a.size(); int cont = 0; while (x > 0 || y > 0) { int i = min_element(a.begin(), a.end()) - a.begin(); if ((a[i] < b[i] && x - a[i] >= 0) || (y - b[i] < 0 && x - a[i] >= 0)) { x -= a[i]; a[i] = 10,001; b[i] = 10,001; cont++; } else if (y - b[i] >= 0) { y -= b[i]; a[i] = 10,001; b[i] = 10,001; cont++; } else { break; } } return cont; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | 1st lines differ - on the 1st token, expected: '8', found: '55' |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | 1st lines differ - on the 1st token, expected: '8', found: '55' |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 3 ms | 204 KB | 1st lines differ - on the 1st token, expected: '689', found: '177' |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 7 ms | 320 KB | 1st lines differ - on the 1st token, expected: '62', found: '1072' |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 7 ms | 204 KB | 1st lines differ - on the 1st token, expected: '154', found: '1034' |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | 1st lines differ - on the 1st token, expected: '8', found: '55' |
2 | Halted | 0 ms | 0 KB | - |