Submission #379876

#TimeUsernameProblemLanguageResultExecution timeMemory
379876knightron0Cluedo (IOI10_cluedo)C++14
100 / 100
14 ms492 KiB
#include <bits/stdc++.h>
#include "grader.h"
#include "cluedo.h"

using namespace std;

void Solve(){
	bool a[7], b[11], c[7];
	for(int i= 1;i<=6;i++) a[i] =1;
	for(int i= 1;i<=10;i++) b[i] =1;
	for(int i= 1;i<=6;i++) c[i] =1;
	for(int i= 1;i<=20;i++){
		int m = 0, l = 0, w = 0;
		for(int j = 1;j<=6;j++){
			if(a[j] == 1) {
				m = j;
				break;
			}
		}
		for(int j = 1;j<=10;j++){
			if(b[j] == 1) {
				l = j;
				break;
			}
		}
		for(int j = 1;j<=6;j++){
			if(c[j] == 1) {
				w = j;
				break;
			}
		}
		int res = Theory(m, l, w);
		if(res == 0){
			return;
		}
		if(res == 1){
			a[m] = 0;
		} else if(res == 2) {
			b[l] = 0;
		} else {
			c[w] = 0;
		}
	}
}



#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...