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 <bits/stdc++.h>
#include "grader.h"
#include "cluedo.h"
/// #pragma GCC optimize ("Ofast")
/// #pragma GCC target ("avx2")
/// #pragma GCC optimize("unroll-loops")
using namespace std;
using ll = long long;
using ii = pair<ll, ll>;
using vi = vector<int>;
#define ff first
#define ss second
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define lb lower_bound
/// #define int ll
const int oo = 1e9 + 7;
/// int Theory(int M, int L, int W);
void Solve() {
bool M[20], L[20], W[20]; int calc = 0;
memset(M, 0, sizeof M);
memset(L, 0, sizeof L);
memset(W, 0, sizeof W);
for(int l = 1; l <= 6; l++) {
for(int i = 1; i <= 10; i++) {
for(int j = 1; j <= 6; j++) {
if(M[l] || L[i] || W[j]) continue;
int r = Theory(l, i, j);
if(r == 0)
return;
if(r == 1) M[l] = 1;
if(r == 2) L[i] = 1;
if(r == 3) W[j] = 1;
calc++;
}
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |