제출 #1321048

#제출 시각아이디문제언어결과실행 시간메모리
1321048Hercule_Poirot9월 (APIO24_september)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
//change this back
typedef int ll;
//const ll MOD=1e9+7;
int solve(int N,int M,vector<int> F,vector<vector<int>> S){
	vector<vector<ll>> adj(n);
	for(ll i=0;i<=(n-1);i++){
		adj[i].push_back(F[i]);
		adj[F[i]].push_back(i);
	}
	return n-1;
}
/*
int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	//dra	
}
*/

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

september.cpp: In function 'int solve(int, int, std::vector<int>, std::vector<std::vector<int> >)':
september.cpp:9:32: error: 'n' was not declared in this scope
    9 |         vector<vector<ll>> adj(n);
      |                                ^