Submission #423083

# Submission time Handle Problem Language Result Execution time Memory
423083 2021-06-10T17:12:17 Z chirathnirodha Hotter Colder (IOI10_hottercolder) C++17
0 / 100
2031 ms 262144 KB
#include "grader.h"
#include<bits/stdc++.h>
using namespace std;
 
int HC(int N){
   int l=1,r=N;
   if(N==1)return 1;
   while(true){
      if(r-l+1==2){
         Guess(l);
         int xx=Guess(r);
         if(r==1)return r;
         else return l;
      }
      if(l==r)return l;
      int a=(l+r+3)/4;
      int b=(l+r)*3/4;
      Guess(a);
      int y=Guess(b);
      if(y==0)return (l+r)/2;
      else if(y==1)l=(l+r+1)/2;
      else r=(l+r-1)/2;
   }
}

Compilation message

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:11:14: warning: unused variable 'xx' [-Wunused-variable]
   11 |          int xx=Guess(r);
      |              ^~
# Verdict Execution time Memory Grader output
1 Incorrect 85 ms 44356 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 112 ms 44264 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 104 ms 44276 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 2031 ms 262144 KB Output isn't correct - alpha = 0.000000000000