Submission #754506

# Submission time Handle Problem Language Result Execution time Memory
754506 2023-06-07T22:19:13 Z ValiAntonie Hotter Colder (IOI10_hottercolder) C++14
0 / 100
557 ms 140192 KB
#include "grader.h"
#include<bits/stdc++.h>
using namespace std;
 
 
int HC(int n){
    int st = 1;
    int dr = n;
    Guess(1);
    int x = Guess(n);
    int prev = -1;
    while(st <= dr){
        int mij = (st + dr) >> 1;
        if(x == 0)
            return mij;
        else if(x > 0){
            st = mij + 1;
            if(prev == 0){
            x = Guess(st);
            x = -x;
            }
            else{
            Guess(st);
            x = Guess(dr);
            }
            prev = 1;
        }
        else{
            dr = mij;
            Guess(dr);
            x = Guess(st);
            //x = -x;
            prev = 0;
        }
    }
    return st;
}
# Verdict Execution time Memory Grader output
1 Incorrect 37 ms 17288 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 37 ms 17288 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 36 ms 17356 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 557 ms 140192 KB Output isn't correct - alpha = 0.000000000000