Submission #161146

# Submission time Handle Problem Language Result Execution time Memory
161146 2019-11-01T00:05:19 Z Doda COCI17_cezar (COCI17_cezar) C++14
0 / 50
2 ms 380 KB
#include <iostream>

using namespace std;


int k[20];
int main () {

int N,x,y,n;
int a = 0;
int u = 0;
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:24:3: warning: 'x' may be used uninitialized in this function [-Wmaybe-uninitialized]
 y = 21 - x ;
 ~~^~~~~~~~
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 380 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 380 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Incorrect 2 ms 376 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Incorrect 2 ms 256 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Incorrect 2 ms 256 KB Output isn't correct
3 Halted 0 ms 0 KB -