Submission #715490

# Submission time Handle Problem Language Result Execution time Memory
715490 2023-03-27T04:33:42 Z vjudge1 Cluedo (IOI10_cluedo) C++17
Compilation error
0 ms 0 KB
#include "grader.h"
#include "cluedo.h"

void Solve(){
   int r;
   int i = 1, j = 1, k = 1;
   int r;
   while(true){
      r = Theory(i, j, k);
      if(r == 1){
         i++;
      }
      else if(r == 2){
         j++;
      }
      else if(r == 3){
         k++;
      }
      else{
         return;
      }
   }
}

Compilation message

cluedo.cpp: In function 'void Solve()':
cluedo.cpp:7:8: error: redeclaration of 'int r'
    7 |    int r;
      |        ^
cluedo.cpp:5:8: note: 'int r' previously declared here
    5 |    int r;
      |        ^