Submission
Status:
[PPPPPPPP]
Subtask/Task Score:
{100/100}
Score: 100
User: chs_14
Problemset: เก็บกราฟเบื้องต้น
Language: cpp
Time: 0.062 second
Submitted On: 2026-01-12 19:42:11
#include <vector>
#include <utility>
#include "adjacency_list.h"
std::vector<std::vector<int> > createGraph(int N, std::vector<std::pair<int, int> > E) {
std::vector<std::vector<int> > adj(N);
for (auto &x : E)
{
adj[x.first].push_back(x.second);
adj[x.second].push_back(x.first);
}
return adj;
}