Submission #161143

#TimeUsernameProblemLanguageResultExecution timeMemory
161143DodaCOCI17_cezar (COCI17_cezar)C++14
0 / 50
5 ms504 KiB
#include <iostream> using namespace std; int k[20]; int main () { int N,x,a,y,nk,u,n; cin >> N ; for (int i = 2; i<14;i++){ k[i] = 4; } for (int i = 0; i<N ; i++){ cin >> n; x += n; k[n] -= 1; } y = 21 - x ; for (int i = y;i<14;i++){ u += k[i]; } for (int i = 0;i<y+1;i++){ a += k[i]; } if (u>a) { cout << "DOSTA"; } else{ cout << "VUCI"; } return 0; }

Compilation message (stderr)

cezar.cpp: In function 'int main()':
cezar.cpp:8:13: warning: unused variable 'nk' [-Wunused-variable]
 int N,x,a,y,nk,u,n;
             ^~
cezar.cpp:25:1: warning: 'a' may be used uninitialized in this function [-Wmaybe-uninitialized]
 if (u>a) {
 ^~
cezar.cpp:25:1: warning: 'u' may be used uninitialized in this function [-Wmaybe-uninitialized]
cezar.cpp:18:3: warning: 'x' may be used uninitialized in this function [-Wmaybe-uninitialized]
 y = 21 - x ;
 ~~^~~~~~~~
#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...