제출 #26950

#제출 시각아이디문제언어결과실행 시간메모리
26950wangyenjenPark (JOI17_park)C++14
컴파일 에러
0 ms0 KiB
// Author: Wang, Yen-Jen
#include "park.h"
#include <bits/stdc++.h>

using namespace std;

inline void subtask1(int N) {
    static int palce[250];
    memset(place , 0 , sizeof(place));
    for(int i = 0; i < N; i++) {
        for(int j = i + 1; j < N; j++) {
            place[i] = 1;
            place[j] = 1;
            if(Ask(i , j , place)) Answer(i , j);
            place[i] = 0;
            place[j] = 0;
        }
    }
}

void Detect(int T , int N) {
    if(T == 1) subtask1(N);
}

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

park.cpp: In function 'void subtask1(int)':
park.cpp:9:12: error: 'place' was not declared in this scope
     memset(place , 0 , sizeof(place));
            ^
park.cpp:8:16: warning: unused variable 'palce' [-Wunused-variable]
     static int palce[250];
                ^