제출 #232005

#제출 시각아이디문제언어결과실행 시간메모리
232005Coroian_DavidHotter Colder (IOI10_hottercolder)C++11
컴파일 에러
0 ms0 KiB
#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;
}

컴파일 시 표준 에러 (stderr) 메시지

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