Submission #342089

#TimeUsernameProblemLanguageResultExecution timeMemory
342089AlmaCluedo (IOI10_cluedo)C++14
Compilation error
0 ms0 KiB
#include <iostream> #include <cluedo.h> #include <grader.h> using namespace std; int Solve (int M, int L, int W) { int M = 1; int L = 1; int W = 1; while (Theory (M, L, W) != 0) { if (Theory (M, L, W) == 1) { M++; } else if (Theory (M, L, W) == 2) { L++; } else { W++; } } return Theory (M, L, W); }

Compilation message (stderr)

cluedo.cpp: In function 'int Solve(int, int, int)':
cluedo.cpp:7:9: error: declaration of 'int M' shadows a parameter
    7 |     int M = 1; int L = 1; int W = 1;
      |         ^
cluedo.cpp:7:20: error: declaration of 'int L' shadows a parameter
    7 |     int M = 1; int L = 1; int W = 1;
      |                    ^
cluedo.cpp:7:31: error: declaration of 'int W' shadows a parameter
    7 |     int M = 1; int L = 1; int W = 1;
      |                               ^