답안 #161145

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
161145 2019-11-01T00:02:03 Z Doda Cezar (COCI17_cezar) C++14
0 / 50
2 ms 504 KB
#include <iostream>

using namespace std;


int k[20];
int main () {

int N,x,a,y,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];
}

int q = u;
int w = a;

if (q>w) {
	cout << "DOSTA";
}
else{
	cout << "VUCI";
}

return 0;
}

Compilation message

cezar.cpp: In function 'int main()':
cezar.cpp:35:1: warning: 'a' may be used uninitialized in this function [-Wmaybe-uninitialized]
 if (q>w) {
 ^~
cezar.cpp:35:1: warning: 'u' may be used uninitialized in this function [-Wmaybe-uninitialized]
cezar.cpp:22:3: warning: 'x' may be used uninitialized in this function [-Wmaybe-uninitialized]
 y = 21 - x ;
 ~~^~~~~~~~
# 결과 실행 시간 메모리 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 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 2 ms 448 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 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 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 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 -