답안 #1011677

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1011677 2024-07-01T05:04:20 Z ezzzay Xylophone (JOI18_xylophone) C++17
컴파일 오류
0 ms 0 KB
#include "xylophone.h"

static int A[5000];

void solve(int 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);
	}

}

Compilation message

xylophone.cpp: In function 'void solve(int)':
xylophone.cpp:14:17: error: 'n' was not declared in this scope
   14 |  for(int i=1;i<=n;i++){
      |                 ^
xylophone.cpp:15:3: error: 'ans' was not declared in this scope
   15 |   ans(i,i);
      |   ^~~
xylophone.cpp: At global scope:
xylophone.cpp:3:12: warning: 'A' defined but not used [-Wunused-variable]
    3 | static int A[5000];
      |            ^