답안 #319540

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
319540 2020-11-05T13:36:58 Z ehdtjskaqhd Hotter Colder (IOI10_hottercolder) C++17
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
using namespace std;
int HC(int N)
{
    int i;
    vector<int> rt(N + 1);
    for (int i = 1; i <= N; i++) rt[i] = Guess(i);
    for (int i = 2; i <= N; i++) if (rt[i] == -1) return i - 1;
    return rt[2] < 0 ? 1 : N;
}

Compilation message

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:7:42: error: 'Guess' was not declared in this scope
    7 |     for (int i = 1; i <= N; i++) rt[i] = Guess(i);
      |                                          ^~~~~
hottercolder.cpp:5:9: warning: unused variable 'i' [-Wunused-variable]
    5 |     int i;
      |         ^