This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
/*DavitMarg*/
#include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <string>
#include <cstring>
#include <map>
#include <set>
#include <queue>
#include <iomanip>
#include <bitset>
#include <stack>
#include <cassert>
#include <iterator>
#include <fstream>
#define mod 1000000007ll
#define LL long long
#define LD long double
#define MP make_pair
#define PB push_back
#define all(v) v.begin(), v.end()
using namespace std;
#ifndef death
#include "game.h"
#endif
const int N = 1503;
int p[N];
void initialize(int x)
{
}
int hasEdge(int u, int v)
{
return ++p[max(u, v)] == max(u, v);
}
#ifdef death
int main()
{
int N;
cin >> N;
initialize(N);
N = N * (N - 1) / 2;
while (N--)
{
int a, b;
cin >> a >> b;
cout << hasEdge(a, b) << endl;
}
return 0;
}
#endif
/*
*/
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |