제출 #1214468

#제출 시각아이디문제언어결과실행 시간메모리
1214468cuenta_verdaderaCluedo (IOI10_cluedo)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
static int M,L,W,gotit,cnt,maxcnt;

int Theory(int m, int l, int w) {
   ++cnt;
   if (m < 1 || m > 6 || l < 1 || l > 10 || w < 1 || w > 6) exit(92);
   if (rand()%2 && m != M) return 1;
   else if (rand()%2 && l != L) return 2;
   else if (rand()%2 && w != W) return 3;
   else if (m != M) return 1;
   else if (l != L) return 2;
   else if (w != W) return 3;
   gotit = 1;
   return 0;
}

void Solve(){
   int r,a=1,b=1,c=1;
   r = Theory(a,b,c);
   if (r == 1) Theory(a++,b,c);
   if (r == 2) Theory(a,b++,c);
   if (r == 3) Theory(a,b,c++);
   if (r == 0) return;
}

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

/usr/bin/ld: /tmp/ccEZBTmp.o: in function `Theory(int, int, int)':
grader.c:(.text+0x0): multiple definition of `Theory(int, int, int)'; /tmp/ccMmi5Wf.o:cluedo.cpp:(.text+0x0): first defined here
collect2: error: ld returned 1 exit status