# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1104167 | Tarela4ka | Cluedo (IOI10_cluedo) | C++17 | 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 <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#include <string>
#include <map>
#include <set>
using namespace std;
int main(){
int corM = -1, corL = -1, corW = -1;
int i = 1;
while(corM == -1 || corL == -1 || corW == -1){
int pM, pL, pW;
if (corM != -1) pM = corM;
else pM = i;
if (corL != -1) pL = corL;
else pL = i;
if (corW != -1) pW = corW;
else pW = i;
printf("Theory(%d, %d, %d)\n", pM, pL, pW);
string s;
getline(cin, s);
bool fM = true, fL = true, fW = true;
for(auto c : s){
if (c == '1') fM = false;
if (c == '2') fL = false;
if (c == '3') fW = false;
}
if (fM && corM == -1) corM = i;
if (fL && corL == -1) corL = i;
if (fW && corW == -1) corW = i;
i++;
}
}