제출 #1289380

#제출 시각아이디문제언어결과실행 시간메모리
1289380aren_danceHotter Colder (IOI10_hottercolder)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
#include "grader.h"
using namespace std;
int HC(int N){
   int g = Guess(N/2);
   int h = Guess(N/2-1);
   int l=1;
   int r=N;
   if(h==1){
        r=N/2-1;
   }
   else{
        l=N/2-1;
   }
   int last=N2/-1;
   int answ=N/2;
   while(l<r){
    int m=(l+r)/2;
    int x=Guess(1);
    answ=m;
    if(x==1){
        if(last<=m){
            l=m;
        }
        else{
            r=m;
        }
    }
    else{
        if(last<=m){
            r=m;
        }
        else{
            l=m;
        }
    }
    last=m;
   }
   return l;
}

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

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:15:13: error: 'N2' was not declared in this scope; did you mean 'N'?
   15 |    int last=N2/-1;
      |             ^~
      |             N