Submission #1130300

#TimeUsernameProblemLanguageResultExecution timeMemory
1130300sohamsen15Cluedo (IOI10_cluedo)C++20
0 / 100
0 ms400 KiB
#include "grader.h"
#include "cluedo.h"

void Solve() {
    int a[] = {0, 0, 0, 0, 0, 0};
    int b[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
    int c[] = {0, 0, 0, 0, 0, 0};
    for (int i = 0; i < 6; i++)
        for (int j = 0; j < 10; j++)
            for (int k = 0; k < 6; k++) {
                if (a[i] == 1 || b[j] == 1 || c[i] == 1) continue;
                int r = Theory(i + 1, j + 1, k + 1);
                if (r == 0) return;
                else if (r == 1) a[i] = 1;
                else if (r == 2) b[j] = 1;
                else c[k] = 1;
            }
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...