제출 #210705

#제출 시각아이디문제언어결과실행 시간메모리
210705sochoCluedo (IOI10_cluedo)C++14
컴파일 에러
0 ms0 KiB
#include "cluedo.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;
		   }
	   }
   }
}

컴파일 시 표준 에러 (stderr) 메시지

cluedo.cpp: In function 'void Solve()':
cluedo.cpp:8:4: error: 'memset' was not declared in this scope
    memset(a, 1, sizeof a); memset(b, 1, sizeof b); memset(c, 1, sizeof c);
    ^~~~~~
cluedo.cpp:15:15: error: 'Theory' was not declared in this scope
       int f = Theory(i, j, k);
               ^~~~~~
cluedo.cpp:15:15: note: suggested alternative: 'short'
       int f = Theory(i, j, k);
               ^~~~~~
               short
cluedo.cpp:29:7: error: 'Theory' was not declared in this scope
       Theory(i, j, k);
       ^~~~~~
cluedo.cpp:29:7: note: suggested alternative: 'short'
       Theory(i, j, k);
       ^~~~~~
       short