제출 #161147

#제출 시각아이디문제언어결과실행 시간메모리
161147DodaCezar (COCI17_cezar)C++14
컴파일 에러
0 ms0 KiB
#include <iostream> using namespace std; int k[20]; int main () { int N,x,y,n; int a = 0; int u = 0; int x = 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; }

컴파일 시 표준 에러 (stderr) 메시지

cezar.cpp: In function 'int main()':
cezar.cpp:12:5: error: redeclaration of 'int x'
 int x = 0;
     ^
cezar.cpp:9:7: note: 'int x' previously declared here
 int N,x,y,n;
       ^