Submission #991812

#TimeUsernameProblemLanguageResultExecution timeMemory
991812vjudge1COCI17_cezar (COCI17_cezar)C++17
0 / 50
1 ms508 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define ull unsigned long long #define pii pair<int,int> #define pll pair<long long, long long> #define fi first #define se second #define all(a) (a).begin(), (a).end() #define pb push_back #define lwb lower_bound #define upb upper_bound #define TASKNAME "NAME" void init() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); ///freopen(TASKNAME".INP","r",stdin); freopen(TASKNAME".OUT","w",stdout); } const int SZ = 1e6+5; const ll INF = INT_MAX / 2, MOD = 1e9+7, INFLL = 2e18; const double epsilon = 1e-3; int cnt[20]; int main() { init(); int n; cin >> n; int sum = 0; for(int i = 1; i <= n; i++) { int x; cin >> x; cnt[x]++; sum += x; } int cnt1 = 0, cnt2 = 0, x = 21 - sum; if(x > sum) { cout << "DOSTA"; return 0; } for(int i = 2; i <= x; i++) { cnt1 += 4 - cnt[i]; } for(int i = x+1; i <= 11; i++) { cnt2 += 4 - cnt[i]; } cout << (cnt2 > cnt1 ? "DOSTA" : "VUCI"); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...