Submission #884281

#TimeUsernameProblemLanguageResultExecution timeMemory
884281vjudge1COCI17_cezar (COCI17_cezar)C++17
30 / 50
1 ms348 KiB
#include <bits/stdc++.h> using namespace std; #define sp << " " << #define int long long #define vi vector<int> #define F(xxx,yyy) for (int xxx=1;xxx<=yyy;xxx++) #define pii pair<int,int> const int N = 2e5+1; const int MOD = 1e9+7; void solve() { int n; cin >> n; vi cc(12,4); cc[10] = 20; int sco = 0; F(i,n) { string c; cin >> c; if (c == "A") { cc[11]--; sco+=11; } else if (c == "K" || c == "Q" || c == "J" || c == "10") { cc[10]--; sco+=10; } else { char ch = c[0]; cc[ch-'0']--; sco+=ch-'0'; } } int diff = 21-sco; int rem_small = 0,rem_big= 0; for (int i=1;i<=diff;i++) rem_small+=cc[i]; for (int i=diff+1;i<=11;i++) rem_big+=cc[i]; if (rem_small > rem_big) { cout << "VUCI\n"; } else cout << "DOSTA\n"; } signed main() { ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); #ifdef Local freopen("in","r",stdin); freopen("out","w",stdout); #endif int t = 1; //cin >> t; F(i,t) solve(); }
#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...