# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
341483 | Iwanttobreakfree | Cluedo (IOI10_cluedo) | C++98 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include "grader.h"
#include "cluedo.h"
using namespace std;
int Murderer,Location,Weapon,M,L,W;
int Solve(int A,int B,int C){
if (M!=A){
return 1;
}
else if (L!=B){
return 2;
}
else if (W!=C){
return 3;
}
else{
return 0;
}
}
int main(){
cin>>Murderer>>Location>>Weapon;
M=1;
L=2;
W=3;
while(Solve(Murderer,Location,Weapon)!=0){
cin>>Murderer>>Location>>Weapon;
}
cin>>Murderer>>Location>>Weapon;
M=3;
L=2;
W=1;
while(Solve(Murderer,Location,Weapon)!=0){
cin>>Murderer>>Location>>Weapon;
}
cin>>Murderer>>Location>>Weapon;
M=4;
L=4;
W=4;
while(Solve(Murderer,Location,Weapon)!=0){
cin>>Murderer>>Location>>Weapon;
}
return 0;
}