Submission
Status:
[PPPPPPPP]
Subtask/Task Score:
{100/100}
Score: 100
User: SparkPun
Problemset: เก็บกราฟเบื้องต้น
Language: cpp
Time: 0.066 second
Submitted On: 2025-10-13 23:59:20
#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;
}