제출 #1045380

#제출 시각아이디문제언어결과실행 시간메모리
1045380Tob9월 (APIO24_september)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "semptember.h" #define F first #define S second #define all(x) x.begin(), x.end() #define pb push_back #define FIO ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0) using namespace std; typedef long long ll; typedef pair <ll, ll> pii; const int N = 1e5 + 7; int bio[N]; vector <int> adj[N]; int dfs(int x) { bio[x] = 1; int cnt = 1; for (int y : adj[x]) if (!bio[y]) cnt += dfs(y); return cnt; } int solve(int n, int m, vector <int> p, vector <vector <int> > a) { for (int i = 0; i < n; i++) { bio[i] = 0; adj[i].clear(); } for (int i = 1; i < n; i++) adj[p[i]].pb(i); int cnt = 0, x = 0, rem = 0; while (x < n-1) { cnt++; do { for (int i = 0; i < m; i++) { if (bio[a[i][x]]) rem--; else rem += m*dfs(a[i][x])-1; } x++; } while (rem); } return cnt; }

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

september.cpp:3:10: fatal error: semptember.h: No such file or directory
    3 | #include "semptember.h"
      |          ^~~~~~~~~~~~~~
compilation terminated.