Submission

Status:

Compilation Error

Subtask/Task Score:

Score: 0

User: colo39

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

Language: cpp

Time: 0.000 second

Submitted On: 2026-09-30 13:40:31

#include <bits/stdc++.h>
using namespace std;

vector<vector<int>> createGraph(int N, vector<pair<int, int>> E) {
    vector<vector<int>> adj;
    for (auto i : E) {
        adj[i.first].push_back(i.second);
        adj[i.second].push_back(i.first);
    }
    return adj;
}

int main () {
    ios_base::sync_with_stdio(false);
    cin.tie(0);

    createGraph(5,{{0, 1}, {1, 3}, {4, 1}, {2, 3}, {2, 0}});
}