#include <bits/stdc++.h>
using namespace std;
int find_maximum_unique(int x, int y, vector<int, allocator<int> > a, vector<int, allocator<int> > b){
int maks = 0; int n = sizeof(a)/sizeof(a[0]);
for (int i=0; i<pow(3, n); i++){
int tempi = i;
int tempx = x;
int tempy = y;
int br=0;
for (int j=0; j<n; j++){
if (tempi%3){
if (tempi%3==1) tempx -= a[j];
else tempy -= b[j];
br++;
} tempi /= 3;
}
if (tempx >= 0 and tempy >= 0)
maks = max(maks, br);
}
return maks;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
1st lines differ - on the 1st token, expected: '8', found: '6' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
1st lines differ - on the 1st token, expected: '8', found: '6' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
340 KB |
1st lines differ - on the 1st token, expected: '689', found: '5' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
340 KB |
1st lines differ - on the 1st token, expected: '62', found: '4' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
340 KB |
1st lines differ - on the 1st token, expected: '154', found: '6' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
1st lines differ - on the 1st token, expected: '8', found: '6' |
2 |
Halted |
0 ms |
0 KB |
- |