Submission #715490

#TimeUsernameProblemLanguageResultExecution timeMemory
715490vjudge1Cluedo (IOI10_cluedo)C++17
Compilation error
0 ms0 KiB
#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 (stderr)

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;
      |        ^