Problem shops
User bachnguyen123
Submission Time 2026-03-07 16:32:48
Score 0
Max Time N/A
Max Memory N/A

Compile Error

shops.cpp:4:1: error: ‘vector’ does not name a type
4 | vector<pair<int,int>> adj[500005];
| ^~~~~~
shops.cpp: In function ‘void dfs(int, int)’:
shops.cpp:17:18: error: ‘adj’ was not declared in this scope
17 | for(auto i : adj[x])
| ^~~
shops.cpp: In function ‘bool check(long long int)’:
shops.cpp:47:22: error: ‘n’ was not declared in this scope
47 | for(int i = 0; i < n; i++) build2[i] = -1;
| ^
shops.cpp:48:3: error: ‘stack’ was not declared in this scope
48 | stack<pair<int,int>> s;
| ^~~~~
shops.cpp:3:1: note: ‘std::stack’ is defined in header ‘<stack>’; did you forget to ‘#include <stack>’?
2 | #include <iostream>
+++ |+#include <stack>
3 | using namespace std;
shops.cpp:48:21: error: expected primary-expression before ‘>’ token
48 | stack<pair<int,int>> s;