# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1104167 | Tarela4ka | Cluedo (IOI10_cluedo) | C++17 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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++;
}
}