Submission #1137989

#TimeUsernameProblemLanguageResultExecution timeMemory
1137989fryingducCluedo (IOI10_cluedo)C++20
Compilation error
0 ms0 KiB
#include "bits/stdc++.h"
using namespace std;

#ifdef duc_debug
#include "bits/debug.h"
#else
#define debug(...)
#include "cluedo.h"
#endif

#ifdef duc_debug
int cnt;
int rm, rl, rw;
int Theory(int M, int L, int W) {
  ++cnt;
  if(M == rm and L == rl and W == rw) return 0;
  vector<int> choose;
  if(M != rm) choose.push_back(1);
  if(L != rl) choose.push_back(2);
  if(W != rw) choose.push_back(3);
  
  random_shuffle(choose.begin(), choose.end());
  return choose.back();
}
#endif

void Solve() {
  int a = 1, b = 1, c = 1;
  while(true) {
    int reply = Theory(a, b, c);
    if(reply == 0) return;
    if(reply == 1) ++a;
    else if(reply == 2) ++b;
    else ++c;
  }
}

#ifdef duc_debug
void solve() {
  int tt; cin >> tt;
  while(tt--) {
    cin >> rm >> rl >> rw;
    
    cnt = 0;
    Solve();
    if(cnt > 20) {
      assert(false);
    }
  }
}

signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);

  solve();

  return 0;
}
#endif


Compilation message (stderr)

cluedo.cpp: In function 'void Solve()':
cluedo.cpp:30:17: error: 'Theory' was not declared in this scope
   30 |     int reply = Theory(a, b, c);
      |                 ^~~~~~