제출 #774761

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
7747612023-07-06 02:45:23bachhoangxuanAmusement Park (JOI17_amusement_park)C++17
100 / 100
20 ms5840 KiB
#include "Joi.h"
#include<bits/stdc++.h>
using namespace std;
#define pii pair<int,int>
#define fi first
#define se second
void Joi(int N, int M, int A[], int B[], long long X, int T) {
vector<vector<int>> adj(N),edge(N);
for(int i=0;i<M;i++) edge[A[i]].push_back(B[i]),edge[B[i]].push_back(A[i]);
vector<bool> vis(N,false);
int cur=0;
vector<int> deg(N,0),num(N,-1);
vector<pii> pp;
function<void(int)> dfs = [&](int u){
vis[u]=true;
if(cur<60) num[u]=cur++;
for(int v:edge[u]){
if(vis[v]) continue;
adj[u].push_back(v);
if(cur<60){
pp.push_back({u,v});
deg[u]++;deg[v]++;
}
dfs(v);
}
};
dfs(0);
function<void(int,int)> dfs2 = [&](int u,int p){
pii del={-1,-1},add={-1,-1};
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...