Submission #1248782

#TimeUsernameProblemLanguageResultExecution timeMemory
1248782AlmontherHotter Colder (IOI10_hottercolder)C++20
Compilation error
0 ms0 KiB
#include<bits/stdc++.h>
#include "grader.h"

#define ll long long
#define co cout<<

using namespace std;
// stuff

ll HC(ll N){
    ll l=1,r=N,last=r;
    Guess(l);
    while(r-l>1){
        ll x=Guess(last),mid=(l+r)/2;
        if(last==r){
            if(x==-1) r=mid;
            else l=mid;
        }
        else{
            if(x==-1) l=mid;
            else r=mid;
        }
        last=mid;
    }
    if(l==r) return l;
    else{
        if(last==l){
            ll x=Guess(r);
            if(x==1) return r;
            return l;
        }
        else{
            ll x=Guess(l);
            if(x==1) return l;
            return r;
        }
    }
}
int main(){

}

Compilation message (stderr)

/usr/bin/ld: /tmp/ccwu3YUA.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccZvA01o.o:hottercolder.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccwu3YUA.o: in function `main':
grader.cpp:(.text.startup+0x1df): undefined reference to `HC(int)'
collect2: error: ld returned 1 exit status