Submission #1236544

#TimeUsernameProblemLanguageResultExecution timeMemory
1236544gabruproColors (BOI20_colors)C11
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #define ar array #define ll long long #define pb push_back #define bg begin() #define ed end() #define fi for(int i=0;i<n;i++) const int MAX_N = 1e5 + 1; const ll MOD = 1e9 + 7; const ll INF = 1e9; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); ll n;cin>>n; ll l=1, r=n; int qwe cout<<"? "<<1<<endl;cin>>qwe; bool done=false; while(abs(r-l)>0){ cout<<"? "<<r<<endl; int ans;cin>>ans; int mid=(l+r)/2; int rd=r; if(ans){r=mid;} else{ if(r>l){r=l-mid;} else{r=l+mid;} } l=rd; if(abs(l-r)>n){cout<<"= "<<n<<endl;done=true;break} } if(!done){cout<<"= "<<l<<endl;} }

Compilation message (stderr)

Colors.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.