Submission #401674

# Submission time Handle Problem Language Result Execution time Memory
401674 2021-05-10T16:36:06 Z phathnv Hotter Colder (IOI10_hottercolder) C++11
0 / 100
700 ms 138428 KB
#include<bits/stdc++.h>
#include"grader.h"
using namespace std;
 
int HC(int n){
  if (n == 1)
    return 1;
  int l = 1, r = n, type = 0;
  Guess(l);
  while (true){
    int mid = (l + r) / 2;
    if (!type){
      int x = Guess(mid);
      if (x == 0)
        return (l + r) / 2;
      if (x == 1){
        l = mid;
        type = 0;
      } else {
        r = mid;
        type = 1;
      }
    } else {
      int x = Guess(mid);
      if (x == 0)
        return (l + r) / 2;
      if (x == 1){
        r = mid;
        type = 1;
      } else {
        l = mid;
        type = 0;
      }
    }
  }
}
# Verdict Execution time Memory Grader output
1 Incorrect 40 ms 15684 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 40 ms 15788 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 41 ms 15736 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 700 ms 138428 KB Output isn't correct - alpha = 0.000000000000