#include <bits/stdc++.h>
#define endl '\n'
using namespace std;
int GetValue(int a) {
if(a >= 2 && a <= 9) {
return a;
}
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int cnt[] = { 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 16, 4 };
int n;
cin >> n;
int sum = 0;
for(int i = 0; i < n; i++) {
int a;
cin >> a;
cnt[a]--;
sum += a;
}
int cntPossible = 0, cntImpossible = 0;
for(int i = 0; i <= 11; i++) {
if(sum + i <= 21) {
cntPossible += cnt[i];
}
else {
cntImpossible += cnt[i];
}
}
cout << (cntPossible >= cntImpossible ? "VUCI" : "DOSTA") << endl;
return 0;
}
Compilation message
cezar.cpp: In function 'int GetValue(int)':
cezar.cpp:9:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
376 KB |
Output is correct |
2 |
Correct |
2 ms |
460 KB |
Output is correct |
3 |
Correct |
3 ms |
460 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
512 KB |
Output is correct |
2 |
Correct |
3 ms |
564 KB |
Output is correct |
3 |
Correct |
3 ms |
620 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
620 KB |
Output is correct |
2 |
Correct |
2 ms |
620 KB |
Output is correct |
3 |
Correct |
3 ms |
620 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
620 KB |
Output is correct |
2 |
Correct |
2 ms |
620 KB |
Output is correct |
3 |
Correct |
3 ms |
620 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
620 KB |
Output is correct |
2 |
Correct |
2 ms |
620 KB |
Output is correct |
3 |
Correct |
3 ms |
620 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
740 KB |
Output is correct |
2 |
Correct |
2 ms |
740 KB |
Output is correct |
3 |
Correct |
2 ms |
740 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
740 KB |
Output is correct |
2 |
Correct |
3 ms |
740 KB |
Output is correct |
3 |
Correct |
3 ms |
740 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
740 KB |
Output is correct |
2 |
Correct |
3 ms |
740 KB |
Output is correct |
3 |
Correct |
3 ms |
740 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
740 KB |
Output is correct |
2 |
Correct |
3 ms |
740 KB |
Output is correct |
3 |
Correct |
3 ms |
740 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
740 KB |
Output is correct |
2 |
Correct |
2 ms |
740 KB |
Output is correct |
3 |
Correct |
2 ms |
740 KB |
Output is correct |