Submission #7446

# Submission time Handle Problem Language Result Execution time Memory
7446 2014-08-06T14:47:18 Z gs13068 Hotter Colder (IOI10_hottercolder) C++
0 / 100
1252 ms 262144 KB
#include"grader.h"

int HC(int N)
{
  int l,r,m;
  while(l<=r)
  {
    Guess(l);
    m=Guess(r);
    if(m==0)return (l+r)/2;
    if(m==-1)l=(l+r)/2+1;
    else r=(l+r-1)/2;
  }
}

Compilation message

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:14:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
hottercolder.cpp:5:9: warning: 'r' may be used uninitialized in this function [-Wmaybe-uninitialized]
   int l,r,m;
         ^
hottercolder.cpp:5:7: warning: 'l' may be used uninitialized in this function [-Wmaybe-uninitialized]
   int l,r,m;
       ^
# Verdict Execution time Memory Grader output
1 Incorrect 92 ms 51064 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 90 ms 51192 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 91 ms 51064 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 1252 ms 262144 KB Output isn't correct - alpha = 0.000000000000