#include "grader.h"
int A[12], B[12], C[12];
void getTheory(int &a, int &b, int &c) {
a = b = c = 1;
while (A[a])
a++;
while (B[b])
b++;
while (C[c])
c++;
}
void Solve() {
for (int i = 1; i <= 6; ++i)
A[i] = 0;
for (int i = 1; i <= 10; ++i)
B[i] = 0;
for (int i = 1; i <= 6; ++i)
C[i] = 0;
int a, b, c, ans;
do {
getTheory(a, b, c);
ans = Theory(a, b, c);
if (ans == 1)
A[a] = 1;
if (ans == 2)
B[b] = 1;
if (ans == 3)
C[c] = 1;
} while (ans != 0);
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |