제출 #1011678

#제출 시각아이디문제언어결과실행 시간메모리
1011678ezzzayXylophone (JOI18_xylophone)C++17
컴파일 에러
0 ms0 KiB
#include "xylophone.h"
#include<bits/stdc++.h>
using namespace std;
static int A[5000];

void solve(int N) {
	int n=N;
	int x;
	for(int i=2;i<N;i++){
		if(query(1,N)!=N-1){
			x=i-1;
			break;
			// i ni 1 esul 5
		}
	}
	for(int i=1;i<=n;i++){
		ans(i,i);
	}

}

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

xylophone.cpp: In function 'void solve(int)':
xylophone.cpp:17:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
   17 |   ans(i,i);
      |   ^~~
      |   abs
xylophone.cpp: At global scope:
xylophone.cpp:4:12: warning: 'A' defined but not used [-Wunused-variable]
    4 | static int A[5000];
      |            ^