제출 #754495

#제출 시각아이디문제언어결과실행 시간메모리
754495ValiAntonieHotter Colder (IOI10_hottercolder)C++14
컴파일 에러
0 ms0 KiB
#include "grader.h" #include<bits/stdc++.h> using namespace std; int HC(int n){ int st = 1; int dr = n; while(st <= dr){ int mij = (st + dr) / 2; if(x == 0) return mij; else if(x == 1){ st = mij + 1; Guess(st); int x = Guess(dr); } else if(x == -1){ dr = mij; Guess(st); int x = Guess(dr); } } return st; }

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

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:11:12: error: 'x' was not declared in this scope
   11 |         if(x == 0)
      |            ^
hottercolder.cpp:16:17: warning: unused variable 'x' [-Wunused-variable]
   16 |             int x = Guess(dr);
      |                 ^
hottercolder.cpp:21:17: warning: unused variable 'x' [-Wunused-variable]
   21 |             int x = Guess(dr);
      |                 ^