Submission #548861

# Submission time Handle Problem Language Result Execution time Memory
548861 2022-04-14T15:19:59 Z Trisanu_Das Hotter Colder (IOI10_hottercolder) C++17
0 / 100
10000 ms 8020 KB
#include <bits/stdc++.h>
#include "grader.h"
using namespace std;
 
int HC(int n){
  // fk. forgot <=
  int l = 1, r = n;
  while(l <= r){
    int mid = (l + r) / 2;
    Guess(l);
    int try_ = Guess(r);
    if(try_ == 0) return mid;
    else if(try_ == 1) l = mid;
    else r = mid;
  }
}

Compilation message

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:16:1: warning: control reaches end of non-void function [-Wreturn-type]
   16 | }
      | ^
# Verdict Execution time Memory Grader output
1 Execution timed out 10063 ms 1236 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 10071 ms 1236 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 10036 ms 1244 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 10086 ms 8020 KB Time limit exceeded