Submission #754486

# Submission time Handle Problem Language Result Execution time Memory
754486 2023-06-07T21:41:48 Z ValiAntonie Hotter Colder (IOI10_hottercolder) C++17
0 / 100
10000 ms 8012 KB
#include "grader.h"
#include<bits/stdc++.h>
using namespace std;


//first sol 2 * log
//

int HC(int n){
    int st = 1;
    int dr = n;
    int ok = 0;
    Guess(1);
    int x = Guess(n);
    while(st <= dr){
        int mij = (st + dr) / 2;
        if(x == 0)
            return mij;
        else if(x > 0){
            st = mij + 1;
            Guess(st);
            ok = 1;
            //x = Guess(dr);
        }
        else{
            dr = mij;
            Guess(dr);
            ok = 0;
            //x = Guess(dr);
        }
        if(ok == 1){
            x = -x;
        }
    }
    return st;
}
# Verdict Execution time Memory Grader output
1 Execution timed out 10062 ms 1236 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 10070 ms 1236 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 10080 ms 1236 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 10077 ms 8012 KB Time limit exceeded