This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#define inf 2e9
#define all(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair <int, int> pii;
int n, cnt[20];
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
#ifdef LOCAL
freopen("input.txt", "r", stdin);
#endif // LOCAL
for (int i = 2; i <= 10; i++){
cnt[i] = 4;
}
cnt[10] += 12;
cnt[11] = 4;
cin >> n;
int sum = 0, ost = 0;
for (int i = 0; i < n; i++){
int x;
cin >> x;
sum += x;
}
ost = 21 - sum;
int s1 = 0, s2 = 0;
for (int i = 2; i <= ost; i++){
s1 += cnt[i];
}
for (int i = ost + 1; i <= 11; i++){
s2 += cnt[i];
}
if (s1 > s2){
cout << "VUCI";
}else{
cout << "DOSTA";
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |