Submission #1345031

#TimeUsernameProblemLanguageResultExecution timeMemory
1345031nanaseyuzukiCluedo (IOI10_cluedo)C++20
0 / 100
1 ms344 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;
			}
		}
		if(Theory(fx, fy, fz) == 0) return;
		else if(Theory(fx, fy, fz) == 1) a[fx] = 0;
		else if(Theory(fx, fy, fz) == 2) b[fy] = 0;
		else if(Theory(fx, fy, fz) == 3) c[fz] = 0;
	}
}
// 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...