이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pi;
#define pb push_back
#define mp make_pair
#define f first
#define s second
vector<pair<int, bool>> a;
int hasEdge(int u, int v) {
a[u].f--; a[v].f--;
if(a[u].f <= 0 || a[v].f <= 0){
a[u].s = 1;
a[v].s = 1;
return 1;
}
if(a[u].f <= 1 && !a[u].s)
return 1;
if(a[v].f <= 1 && !a[v].s)
return 1;
return 0;
}
void initialize(int n) {
a = vector<pair<int, bool>>(n, {n-1, 0});
}
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |