# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
405083 | 2021-05-15T16:48:45 Z | Divanny | Jelly Flavours (IOI20_jelly) | C++14 | 2 ms | 332 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 cont = 0; vector <int> no_gratis; for (int i = 0; i < b.size(); i++) { if(b[i] != 0) { no_gratis.push_back(i); } else { cont++; } } int n = a.size(); sort(a.begin(), a.end()); int i = 0; int ia = 0; while (x - a[i] >= 0 && i < n) { if (x - a[i] >= 0 && i != no_gratis[ia]) { cont++; x -= a[i]; } else { ia++; } i++; } return cont; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 296 KB | 1st lines differ - on the 1st token, expected: '8', found: '0' |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 296 KB | 1st lines differ - on the 1st token, expected: '8', found: '0' |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 304 KB | 1st lines differ - on the 1st token, expected: '689', found: '675' |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 332 KB | 1st lines differ - on the 1st token, expected: '62', found: '0' |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 332 KB | 1st lines differ - on the 1st token, expected: '154', found: '0' |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 296 KB | 1st lines differ - on the 1st token, expected: '8', found: '0' |
2 | Halted | 0 ms | 0 KB | - |