Submission #341476

#TimeUsernameProblemLanguageResultExecution timeMemory
341476IwanttobreakfreeCluedo (IOI10_cluedo)C++98
Compilation error
0 ms0 KiB
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include "grader.h" #include "cluedo.h" using namespace std; int Theory(int M,int L,int W){ cin>>Murderer>>Location>>Weapon; if (M!=Murderer){ return 1; } else if (L!=Location){ return 2; } else if (W!=Weapon){ return 3; } else{ return 0; } } void Solve(){ int r,Murderer,Location,Weapon; r = Theory(1,2,3); if (r == 0) return; r = Theory(3,2,1); if (r == 0) return; r = Theory(4,4,4); if (r == 0) return; }

Compilation message (stderr)

cluedo.cpp: In function 'int Theory(int, int, int)':
cluedo.cpp:11:7: error: 'Murderer' was not declared in this scope
   11 |  cin>>Murderer>>Location>>Weapon;
      |       ^~~~~~~~
cluedo.cpp:11:17: error: 'Location' was not declared in this scope
   11 |  cin>>Murderer>>Location>>Weapon;
      |                 ^~~~~~~~
cluedo.cpp:11:27: error: 'Weapon' was not declared in this scope
   11 |  cin>>Murderer>>Location>>Weapon;
      |                           ^~~~~~
cluedo.cpp: In function 'void Solve()':
cluedo.cpp:27:10: warning: unused variable 'Murderer' [-Wunused-variable]
   27 |    int r,Murderer,Location,Weapon;
      |          ^~~~~~~~
cluedo.cpp:27:19: warning: unused variable 'Location' [-Wunused-variable]
   27 |    int r,Murderer,Location,Weapon;
      |                   ^~~~~~~~
cluedo.cpp:27:28: warning: unused variable 'Weapon' [-Wunused-variable]
   27 |    int r,Murderer,Location,Weapon;
      |                            ^~~~~~
cluedo.cpp: In function 'int Theory(int, int, int)':
cluedo.cpp:24:1: warning: control reaches end of non-void function [-Wreturn-type]
   24 | }
      | ^