제출 #1331063

#제출 시각아이디문제언어결과실행 시간메모리
1331063hectormedranoHotter Colder (IOI10_hottercolder)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
#include "grader.h"
//#include "hottercolder.h"
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
using namespace std;
typedef long long ll;

int HC(int N){
   ll L, R;
   L = 1;
   R = N+1;
   while(R != L+1){
    R--;
    Guess(L);
    Guess(R);
    if(w == 0){return (L+R)/2;}
    if(w == 1){
        L = (L+R)/2 + 1;
        R++;
    }
    if(w == -1){
        R = (L+R+1)/2;
    }
   }
   return L;
}

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

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:18:8: error: 'w' was not declared in this scope
   18 |     if(w == 0){return (L+R)/2;}
      |        ^
hottercolder.cpp:19:8: error: 'w' was not declared in this scope
   19 |     if(w == 1){
      |        ^
hottercolder.cpp:23:8: error: 'w' was not declared in this scope
   23 |     if(w == -1){
      |        ^