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>
using namespace std;
int n, sum, freq[12];
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
for(int i = 2; i <= 11; i++) freq[i] = 4;
freq[10] += 8;
cin >> n;
for(int i = 0, x; i < n; i++) {
cin >> x;
--freq[x];
sum += x;
}
int x = 21 - sum, cnt_less_equal = 0, cnt_more = 0;
for(int i = 2; i <= x; i++) cnt_less_equal += freq[i];
for(int i = 11; i > x; i--) cnt_more += freq[i];
if(cnt_more >= cnt_less_equal) cout << "DOSTA";
else cout << "VUCI";
}
# | 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... |