Submission #872841

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
8728412023-11-13 23:41:39MisterReaperOne-Way Streets (CEOI17_oneway)C++17
100 / 100
161 ms27452 KiB
//author: Ahmet Alp Orakci
#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
#define ONLINE_JUDGE
void solve() {
int n, m;
cin >> n >> m;
map <pair <int, int>, int> mp;
vector <pair <int, int>> adj[n +1];
vector <pair <int, int>> edges(m);
for(int i = 0; i < m; i++) {
cin >> edges[i].first >> edges[i].second;
adj[edges[i].first].emplace_back(edges[i].second, i);
adj[edges[i].second].emplace_back(edges[i].first, i);
mp[{min(edges[i].first, edges[i].second), max(edges[i].first, edges[i].second)}]++;
}
int timer = 0;
vector <int> tin(n +1, -1), low(n +1, -1), is_bridge(m);
function <void(int, int)> dfs = [&](int node, int par) -> void {
low[node] = tin[node] = timer++;
for(auto [child, number] : adj[node]) {
if(child == par) {
continue;
}
if(tin[child] == -1) {
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...