longesttrip.cpp: In function 'std::vector<int> longest_trip(int, int)':
longesttrip.cpp:26:17: error: 'adj' was not declared in this scope
26 | adj[i].push_back(j);
| ^~~
longesttrip.cpp:31:35: error: 'adj' was not declared in this scope
31 | for(int i = 0; i < N; i++) if(adj[i].size() >= (N + 1) / 2) return adj[i];
| ^~~
longesttrip.cpp:32:37: error: 'adj' was not declared in this scope
32 | for(int i = 0; i < N; i++) sort(adj[i].begin(), adj[i].end());
| ^~~
longesttrip.cpp:38:65: error: 'adj' was not declared in this scope
38 | for(int i = 0; i < N; ++i) if(!vis[i] && !binary_search(adj[ans.back()].begin(), adj[ans.back()].end(), i)) {
| ^~~