Submission #379875

#TimeUsernameProblemLanguageResultExecution timeMemory
379875knightron0Cluedo (IOI10_cluedo)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.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;
		}
	}
}



Compilation message (stderr)

cluedo.cpp: In function 'void Solve()':
cluedo.cpp:30:13: error: 'Theory' was not declared in this scope
   30 |   int res = Theory(m, l, w);
      |             ^~~~~~