# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
299279 | dolphingarlic | Acrobat (balkan16_acrobat) | C++14 | 362 ms | 42960 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
int a[300001], b[300001], cmp[600001];
bool cnt[300001], visited[300001];
vector<pair<int, int>> graph[300001];
vector<array<int, 3>> ans;
int find(int A) {
while (A != cmp[A]) A = cmp[A], cmp[A] = cmp[cmp[A]];
return A;
}
void onion(int A, int B) { cmp[find(A)] = find(B); }
bool dfs(int node) {
visited[node] = true;
for (pair<int, int> i : graph[node]) {
if (!visited[i.first] && dfs(i.first)) {
ans.push_back({1, a[i.second], b[i.second]});
swap(a[i.second], b[i.second]);
cnt[node] ^= 1;
}
}
return cnt[node];
}
int main() {
iostream::sync_with_stdio(false);
cin.tie(0);
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |