Submission #754487

# Submission time Handle Problem Language Result Execution time Memory
754487 2023-06-07T21:42:33 Z ValiAntonie Hotter Colder (IOI10_hottercolder) C++17
0 / 100
502 ms 137228 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;
            x = Guess(st);
            ok = 1;
            //x = Guess(dr);
        }
        else{
            dr = mij;
            x = Guess(dr);
            ok = 0;
            //x = Guess(dr);
        }
        if(ok == 1){
            x = -x;
        }
    }
    return st;
}
# Verdict Execution time Memory Grader output
1 Incorrect 29 ms 14728 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 30 ms 14684 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 29 ms 14736 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 502 ms 137228 KB Output isn't correct - alpha = 0.000000000000