Submission #110610

#TimeUsernameProblemLanguageResultExecution timeMemory
110610charlies_mooCOCI17_cezar (COCI17_cezar)C++17
0 / 50
3 ms384 KiB
#include <bits/stdc++.h> using namespace std; int main(){ int n, m, my, vis[30], s1, s2; string s; for (int i = 1; i <= 11; i++) { vis[i] = 4; } cin >> n; for (int i = 1; i <= n; i++) { cin >> m; my += m; vis[m]--; } my = 21 - my; if (my >= 11) { printf("VUCI"); return 0; } for (int i = 1; i <= 11; i++){ if (i <= my) s1 += vis[i]; else s2 += vis[i]; } s2 += 12; if (s2 >= s1) { cout << "DOSTA" << endl; } else { cout << "VUCI" << endl; } return 0; }

Compilation message (stderr)

cezar.cpp: In function 'int main()':
cezar.cpp:24:16: warning: 's2' may be used uninitialized in this function [-Wmaybe-uninitialized]
             s2 += vis[i];
             ~~~^~~~~~~~~
cezar.cpp:22:16: warning: 's1' may be used uninitialized in this function [-Wmaybe-uninitialized]
             s1 += vis[i];
             ~~~^~~~~~~~~
cezar.cpp:15:8: warning: 'my' may be used uninitialized in this function [-Wmaybe-uninitialized]
     my = 21 - my;
     ~~~^~~~~~~~~
#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...