Submission #1253296

#TimeUsernameProblemLanguageResultExecution timeMemory
1253296aren_danceThe Big Prize (IOI17_prize)C++20
Compilation error
0 ms0 KiB
#include "prize.h" #include <bits/stdc++.h> using namespace std; int find_best(int n) { for(int i = 0; i < min(n,100); i++) { std::vector<int> res = ask(i); if(res[0]==0 && res[1]==0){ return i; } } while(true){ int x=rng()%(n-100)+100; vector<int> res=ask(x); if(res[0]==0 && res[1]==0){ return x; } } return 0; }

Compilation message (stderr)

prize.cpp: In function 'int find_best(int)':
prize.cpp:12:19: error: 'rng' was not declared in this scope
   12 |             int x=rng()%(n-100)+100;
      |                   ^~~