제출 #1335584

#제출 시각아이디문제언어결과실행 시간메모리
1335584trandaihao5555Cluedo (IOI10_cluedo)C++20
100 / 100
6 ms412 KiB
#include "grader.h"
#include "cluedo.h"
#include <bits/stdc++.h>

using namespace std;

//Theory(1,2,3);

const int c[] = {0,6,10,6};
bool check[4][16];

void Solve(){
    for(int i=1;i<=3;i++) for(int j=1;j<=c[i];j++) check[i][j] = false;
    while(true) {
        int tmp[4];
        for(int i=1;i<=3;i++) {
            for(int j=1;j<=c[i];j++) {
                if(!check[i][j]) {
                    tmp[i] = j;
                    break;
                }
            }
        }
        int r = Theory(tmp[1],tmp[2],tmp[3]);
        if (!r) return;
        check[r][tmp[r]] = true;
    }
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...