Submission #978573

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9785732024-05-09 11:03:04akacool445kBridges (APIO19_bridges)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
// #define int long long
const long long mod = 1e9 + 7;
const long long shrek = (1 << 30);
const int gay = 5e4 + 10;
set<pair<pair<int, int>, int>> adj[gay];
bool vis[gay];
vector<int> cur;
void dfs(int x, int w) {
if(vis[x] == 1 || y.ff.ss < w) return;
vis[x] = 1;
cur.push_back(x);
for(auto y : adj[x]) {
// if(vis[y.ff.ff] == 1 || y.ff.ss < w) {
// continue;
// }
dfs(y.ff.ff, w);
}
}
signed main() {
int n, m, q;
cin >> n >> m;
int u[m + 5], v[m + 5], w[m + 5];
for(int i = 1; i <= m; i++) {
cin >> u[i] >> v[i] >> w[i];
adj[u[i]].insert({{v[i], w[i]}, i});
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

bridges.cpp: In function 'void dfs(int, int)':
bridges.cpp:14:23: error: 'y' was not declared in this scope
   14 |     if(vis[x] == 1 || y.ff.ss < w) return;
      |                       ^