# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
79818 | pzdba | COCI17_cezar (COCI17_cezar) | C++14 | 2 ms | 800 KiB |
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 dp[12];
int main(){
int n, a, sum = 0;
scanf("%d", &n);
bool ok = 1;
for(int i=1;i<=n;i++){
scanf("%d", &a);
sum += a;
dp[a]++;
if(dp[a] > 4) ok = 0;
}
if(sum >= 20) ok = 0;
if(!ok) return !printf("DOSTA\n");
sum = 21-sum;
int tot = 0;
for(int i=2;i<=min(sum, 11);i++){
tot += 4-dp[i];
}
if(52 - n - tot >= tot) printf("DOSTA\n");
else printf("VUCI\n");
}
Compilation message (stderr)
# | 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... |