Submission #423077

# Submission time Handle Problem Language Result Execution time Memory
423077 2021-06-10T17:04:10 Z chirathnirodha Hotter Colder (IOI10_hottercolder) C++17
50 / 100
648 ms 8044 KB
#include "grader.h"
#include<bits/stdc++.h>
using namespace std;
 
int HC(int N){
   int l=1,r=N;
   while(l<r){
      Guess(l);
      int x=Guess(r);
      if(x==0)return (l+r)/2;
      else if(x==1)l=(l+r+1)/2;
      else r=(l+r-1)/2;
   }
   if(l==r)return l;
}

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 Correct 23 ms 1228 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 23 ms 1296 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 24 ms 1292 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 648 ms 8044 KB Output isn't correct - alpha = 0.000000000000