답안 #161143

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
161143 2019-10-31T23:59:06 Z Doda 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 ;
 ~~^~~~~~~~
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -