# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
334823 | limabeans | 자매 도시 (APIO20_swap) | C++17 | 738 ms | 524292 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "swap.h"
using namespace std;
using ll = long long;
const int maxn = 1e5 + 10;
int n;
vector<pair<ll,int>> g[maxn];
bool loop = false;
ll maxW = 0;
void dfs(int at, int p, int dep) {
if (dep==n) loop=true;
for (auto ed: g[at]) {
int to = ed.second;
if (to == p) continue;
dfs(to,at,dep+1);
}
}
void init(int N, int M, std::vector<int> U, std::vector<int> V, std::vector<int> W) {
n=N;
for (int i=0; i<M; i++) {
g[U[i]].push_back({W[i],V[i]});
g[V[i]].push_back({W[i],U[i]});
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |