Submission #1237520

#TimeUsernameProblemLanguageResultExecution timeMemory
1237520SG2AlokCave (IOI13_cave)C++20
Compilation error
0 ms0 KiB
#include "cave.h" #include <bits/stdc++.h> using namespace std; void exploreCave(int N) { int a[N], ans[N]; for(int i = 0; i < N; i++) a[i] = mt()%2, ans[i] = -1; int cur = tryCombination(a); while(cur != -1){ for(int i = 0; i < N; i++){ if(ans[i] != -1) continue; a[i] = 1 - a[i]; int judges = tryCombination(a); if(judges == -1){ cur = judges; break; } if(judges < cur){ a[i] = 1 - a[i]; ans[i] = judges; } else if(judges > cur){ ans[i] = judges; cur = judges; } } } for(int i = 0; i < N; i++){ a[i] = 1 - a[i]; ans[i] = tryCombination(a); a[i] = 1 - a[i]; } answer(a, ans); }

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:7:39: error: 'mt' was not declared in this scope; did you mean 'tm'?
    7 |     for(int i = 0; i < N; i++) a[i] = mt()%2, ans[i] = -1;
      |                                       ^~
      |                                       tm