Submission #232005

# Submission time Handle Problem Language Result Execution time Memory
232005 2020-05-15T16:56:43 Z Coroian_David Hotter Colder (IOI10_hottercolder) C++11
Compilation error
0 ms 0 KB
#include "grader.h"

int cautBin()
{
    ///VARIANTA CEA MAI PENALA DOAMNE
    ///Guess(st) and Guess(dr) fail because when we have 1 500 and 250 or 1 6 and 3
    /// it will not give the right number, it makes no use of the same answer
    int st = 1;
    int dr = DR;

    while(st < dr)
    {
        if(st == 1 && dr == 2)
        {
            Guess(1);
            int x = Guess(2);

            return (x == 1 ? 2 : 1);
        }

        int mid = (st + dr) >> 1;
                Guess(mid - 1);
        int x = Guess(mid + 1);

        if(x == 0)
            return mid;

        if(x == 1)
            st = mid + 1;

        else
            dr = mid - 1;
    }

    return st;
}

Compilation message

hottercolder.cpp: In function 'int cautBin()':
hottercolder.cpp:9:14: error: 'DR' was not declared in this scope
     int dr = DR;
              ^~