Submission #236845

#TimeUsernameProblemLanguageResultExecution timeMemory
236845DanShadersCOCI17_cezar (COCI17_cezar)C++17
50 / 50
5 ms512 KiB
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; #define all(x) begin(x), end(x) #define x first #define y second typedef long long ll; typedef long double ld; template<typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; template<typename T> using normal_queue = priority_queue<T, vector<T>, greater<T>>; const char *RES[] = { "VUCI", "DOSTA" }; int a[12] = {0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 12, 4}; signed main() { ios::sync_with_stdio(0); cin.tie(0); int n; cin >> n; int val = 0; for (int i = 0; i < n; ++i) { int x; cin >> x; --a[x]; val += x; } int x = 21 - val; ++x; x = min(x, 12); cout << RES[accumulate(a + x, a + 12, 0) >= accumulate(a, a + x, 0)]; return 0; }
#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...