제출 #935137

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
9351372024-02-28 17:43:05MinaRagy06자매 도시 (APIO20_swap)C++17
17 / 100
425 ms10368 KiB
#include <bits/stdc++.h>
#ifdef MINA
#include "grader.cpp"
#endif
using namespace std;
#define ll long long
const int N = 2005;
int n, m;
array<int, 3> e[N];
vector<int> adj[N];
void init(int _n, int _m, vector<int> u, vector<int> v, vector<int> w) {
n = _n, m = _m;
for (int i = 0; i < m; i++) {
e[i] = {u[i], v[i], w[i]};
}
sort(e, e + m, [&] (array<int, 3> x, array<int, 3> y) {return x[2] < y[2];});
}
int dist[N][N], ok[N], t[N], low[N], cur, vis[N], bad;
int dfs(int i, int p, int x, int y) {
vis[i] = 1;
t[i] = low[i] = cur++;
int cnt = 0;
for (auto nxt : adj[i]) {
if (nxt == p) continue;
if (vis[nxt]) {
low[i] = min(low[i], t[nxt]);
} else {
int val = dfs(nxt, i, x, y);
low[i] = min(low[i], low[nxt]);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...