#include<bits/stdc++.h>
#include<jelly.h>
using namespace std;
int find_maximum_unique(int x, int y, vector<int> a, vector<int> b) {
int n = a.size(); int counter = 0; int answer = 0;
if (x > y) swap(x, y);
sort(a.begin(), a.end());
int sum_x = 0;
while ((sum_x + a[counter]) <= x && counter < n) {
sum_x += a[counter];
answer += 1; counter += 1;
}
int sum_y = 0;
while ((sum_y + a[counter]) <= y && counter < n) {
sum_y += a[counter];
answer += 1; counter += 1;
}
return answer;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
1st lines differ - on the 1st token, expected: '8', found: '5' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
1st lines differ - on the 1st token, expected: '8', found: '5' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
384 KB |
1st lines differ - on the 1st token, expected: '689', found: '58' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
1st lines differ - on the 1st token, expected: '62', found: '64' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
364 KB |
Output is correct |
2 |
Correct |
1 ms |
364 KB |
Output is correct |
3 |
Correct |
1 ms |
364 KB |
Output is correct |
4 |
Correct |
1 ms |
364 KB |
Output is correct |
5 |
Correct |
1 ms |
364 KB |
Output is correct |
6 |
Correct |
1 ms |
364 KB |
Output is correct |
7 |
Incorrect |
1 ms |
364 KB |
1st lines differ - on the 1st token, expected: '86', found: '85' |
8 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
1st lines differ - on the 1st token, expected: '8', found: '5' |
2 |
Halted |
0 ms |
0 KB |
- |