Submission #237914

#TimeUsernameProblemLanguageResultExecution timeMemory
23791474TrAkToRCOCI17_cezar (COCI17_cezar)C++17
50 / 50
5 ms384 KiB
#include<bits/stdc++.h> using namespace std; int cnt[12]; main() { #ifdef HOME freopen("input.txt", "r", stdin); #endif // HOME ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); for (int i = 2; i <= 9; ++i) cnt[i] = 4; cnt[10] = 16; cnt[11] = 4; int n, x, sum = 0; cin >> n; for (int i = 1; i <= n; ++i) { cin >> x; sum += x, cnt[x]--; } int s1 = 0, s2 = 0; sum = 21 - sum; for (int i = 2; i <= sum; ++i) s1 += cnt[i]; for (int i = max(2, sum + 1); i <= 11; ++i) s2 += cnt[i]; if (s1 > s2) cout << "VUCI"; else cout << "DOSTA"; return 0; }

Compilation message (stderr)

cezar.cpp:7:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
 main() {
      ^
#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...