Submission #34855

#TimeUsernameProblemLanguageResultExecution timeMemory
34855szawinisCOCI17_cezar (COCI17_cezar)C++14
50 / 50
4 ms716 KiB
#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 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...