제출 #1304229

#제출 시각아이디문제언어결과실행 시간메모리
1304229exoworldgdIsland Hopping (JOI24_island)C++20
컴파일 에러
0 ms0 KiB
#pragma GCC optimize("O5,unroll-loops,inline,fast-math") #pragma GCC target("avx2,bmi,bmi2,popcnt,lzcnt") #include <bits/stdc++.h> #define exoworldgd cin.tie(0)->sync_with_stdio(0), cout.tie(0) #define ll long long #include "island.h" using namespace std; void solve(int N, int L) { int vis[305]={}; vis[1]=1; for (int i=1,x; i<n; i++) { x=query(1,i); if (vis[x]) continue; for (int j=1,y; j<n; j++) { y=query(x,j), answer(x,y); if (vis[y]) break; vis[y]=1; } } }

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

island.cpp: In function 'void solve(int, int)':
island.cpp:10:27: error: 'n' was not declared in this scope
   10 |         for (int i=1,x; i<n; i++) {
      |                           ^