This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "game.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ar array
const int mxN = 1505;
int cap[mxN];
void initialize(int n){
for(int i = 0; i<n; ++i){
cap[i] = n-1;
}
}
int hasEdge(int u, int v){
cap[u]--;
cap[v]--;
if(cap[u] == 0 || cap[v] == 0){
return 1;
}
return 0;
}
/*
int main(){
#ifdef _DEBUG
// freopen("input.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
#endif
std::ios_base::sync_with_stdio(false); std::cin.tie(0); std::cout.tie(0);
int n;
cin >> n;
initialize(n);
for(int i = 0; i<(n*(n-1))/2; ++i){
int u, v;
cin >> u >> v;
cout << hasEdge(u, v) << "\n";
}
}
*/
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |