제출 #1345033

#제출 시각아이디문제언어결과실행 시간메모리
1345033nanaseyuzukiCluedo (IOI10_cluedo)C++20
100 / 100
3 ms416 KiB
#include <bits/stdc++.h>
#include "grader.h"
#include "cluedo.h"
#define ll long long
#define fi first
#define se second
#define pii pair<int, int>
#define all(a) a.begin(), a.end()
using namespace std;

#ifdef LOCAL
#include "C:\Users\Dell\Downloads\template\template\icpc-notebook\Utilities\debug.h"
#else
#define debug(...) 42
#endif

const int mn = 5e5 + 5, mod = 1e9 + 7, inf = 2e9;

int a[mn], b[mn], c[mn];

void Solve() {
	for(int i = 1; i <= 6; i++) a[i] = c[i] = true;
	for(int i = 1; i <= 10; i++) b[i] = true;

	for(int i = 1; i <= 20; i++) {
		int fx, fy, fz;
		for(int x = 1; x <= 6; x ++) {
			if(a[x]) {
				fx = x; break;
			}
		}
		for(int y = 1; y <= 10; y ++) {
			if(b[y]) {
				fy = y; break;
			}
		}
		for(int z = 1; z <= 6; z ++) {
			if(c[z]) {
				fz = z; break;
			}
		}
		int k = Theory(fx, fy, fz);
		if(k == 0) return;
		else if(k == 1) a[fx] = false;
		else if(k == 2) b[fy] = false;
		else if(k == 3) c[fz] = false;
	}
}
// Don't wanna lose anymore T_T
// Never let me go - Kazuo Ishiguro
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...