Submission #548857

# Submission time Handle Problem Language Result Execution time Memory
548857 2022-04-14T15:13:02 Z Trisanu_Das Hotter Colder (IOI10_hottercolder) C++17
0 / 100
10000 ms 24352 KB
#include <bits/stdc++.h>
#include "grader.h"
using namespace std;
 
int HC(int n){
  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++;
    else r--;
  }
}

Compilation message

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:15:1: warning: control reaches end of non-void function [-Wreturn-type]
   15 | }
      | ^
# Verdict Execution time Memory Grader output
1 Incorrect 148 ms 1344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 159 ms 1284 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 131 ms 1284 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 10018 ms 24352 KB Time limit exceeded