#include<bits/stdc++.h>
#include "game.h"
#include<ext/pb_ds/assoc_container.hpp>
/**zagaro & lauren <3**/
#define mod 1000000007 //1e9 + 7
#define pi acos(-1)
#define wl while
#define str string
#define ENDL "\n"
#define sal ' '
#define tp_set ll
#define prc(n) cout.precision(n);cout<<fixed;
#define ord_set tree<tp_set, null_type, less<tp_set>, rb_tree_tag, tree_order_statistics_node_update>
typedef long long ll;
typedef bool bl;
typedef char car;
using namespace std;
using namespace __gnu_pbds;
ll p=1, n;
vector<ll> vec;
void initialize(int a) {
vec.assign(a, 0);
n=a;
return ;
}
int hasEdge(int u, int v) {
vec[u]++;
vec[v]++;
if(vec[u] == p || vec[v] == p){
p++;
if(vec[u] == p)vec[u] = n+1;
else vec[v] = n+1;
return 1;
}
return 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... |