Submission #210706

# Submission time Handle Problem Language Result Execution time Memory
210706 2020-03-18T06:21:29 Z socho Cluedo (IOI10_cluedo) C++14
Compilation error
0 ms 0 KB
#include "cluedo.h"
#include "bits/stdc++.h"
using namespace std;

void Solve(){
   bool a[7];
   bool b[11];
   bool c[7];
   memset(a, 1, sizeof a); memset(b, 1, sizeof b); memset(c, 1, sizeof c);
   for (int i=1; i<=6; i++) {
	   for (int j=1; j<=10; j++) {
		   for (int k=1; k<=6; k++) {
			   if (!a[i]) continue;
			   if (!b[j]) continue;
			   if (!c[k]) continue;
			   int f = Theory(i, j, k);
			   if (f == 0) return;
			   if (f == 1) a[i] = false;
			   if (f == 2) b[j] = false;
			   if (f == 3) c[k] = false;
		   }
	   }
   }
   for (int i=1; i<=6; i++) {
	   for (int j=1; j<=10; j++) {
		   for (int k=1; k<=6; k++) {
			   if (!a[i]) continue;
			   if (!b[j]) continue;
			   if (!c[k]) continue;
			   Theory(i, j, k);
			   return;
		   }
	   }
   }
}

Compilation message

cluedo.cpp: In function 'void Solve()':
cluedo.cpp:16:15: error: 'Theory' was not declared in this scope
       int f = Theory(i, j, k);
               ^~~~~~
cluedo.cpp:16:15: note: suggested alternative: 'short'
       int f = Theory(i, j, k);
               ^~~~~~
               short
cluedo.cpp:30:7: error: 'Theory' was not declared in this scope
       Theory(i, j, k);
       ^~~~~~
cluedo.cpp:30:7: note: suggested alternative: 'short'
       Theory(i, j, k);
       ^~~~~~
       short