답안 #875438

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
875438 2023-11-19T17:01:08 Z ThylOne Cluedo (IOI10_cluedo) C++14
컴파일 오류
0 ms 0 KB
#include "grader.h"
#include "cluedo.h"

void Solve(){
   int r;
   int ans[3] = {0}
   for(int i=0;i<20;i++){
      r = Theory(ans[0]+1,ans[1]+1,ans[2]+1);
      if(r==0)return;
      else
         ans[r-1]++;   
   }
}

Compilation message

cluedo.cpp: In function 'void Solve()':
cluedo.cpp:7:4: error: expected ',' or ';' before 'for'
    7 |    for(int i=0;i<20;i++){
      |    ^~~
cluedo.cpp:7:16: error: 'i' was not declared in this scope
    7 |    for(int i=0;i<20;i++){
      |                ^
cluedo.cpp:5:8: warning: unused variable 'r' [-Wunused-variable]
    5 |    int r;
      |        ^
cluedo.cpp:6:8: warning: unused variable 'ans' [-Wunused-variable]
    6 |    int ans[3] = {0}
      |        ^~~