Submission

Status:
[PPPPPPPP]

Score: 100

User: tull

Problemset: เก็บกราฟเบื้องต้น

Language: cpp

Time: 0.065 second

Submitted On: 2025-04-12 04:26:47

#include <bits/stdc++.h>
#include "adjacency_list.h"
using namespace std;
std::vector<std::vector<int> > createGraph(int N, std::vector<std::pair<int, int> > E) {
	std::vector<std::vector<int> > adj(N);
	for(auto&[f,s]:E){
        adj[f].emplace_back(s);
        adj[s].emplace_back(f);
	}
	return adj;
}