Submission #161143

# Submission time Handle Problem Language Result Execution time Memory
161143 2019-10-31T23:59:06 Z Doda COCI17_cezar (COCI17_cezar) C++14
0 / 50
5 ms 504 KB
#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

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 time Memory Grader output
1 Runtime error 3 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 3 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 5 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 3 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -