Submission #754534

# Submission time Handle Problem Language Result Execution time Memory
754534 2023-06-07T23:18:21 Z ValiAntonie Hotter Colder (IOI10_hottercolder) C++14
50 / 100
509 ms 8132 KB
#include "grader.h"
#include<bits/stdc++.h>
using namespace std;
 
int Guess (int x);
 
int HC(int N){
int st=1,dr=N;
Guess(st);
int a = Guess(dr);
int prev = -1;
while(st!=dr){
	int mij = (st+ dr) >> 1;
	if(a==-1){
		dr= mij;
    if(st != dr){
	Guess(st);
	a = Guess(dr);
	prev = 0;
	}
	}
	else if(a==1){//close to l
		st = mij + 1;
    if(st != dr){
            if(prev == 0){
            a = Guess(st);
            a = -a;
            prev = 1;
            }
            else{
            Guess(st);
            a= Guess(dr);
            prev = 0;
            }
	}
	}
	else return mij;
}
return st;
}
# Verdict Execution time Memory Grader output
1 Correct 18 ms 1236 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 18 ms 1236 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 18 ms 1300 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 509 ms 8132 KB Output isn't correct - alpha = 0.000000000000