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 <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define ll int
#define pb push_back
#define pii pair<ll,ll>
#define fi first
#define sec second
#define endl '\n'
#define ordered_set tree<ll, null_type,less<ll>, rb_tree_tag, tree_order_statistics_node_update>
#define ordered_multiset tree<ll, null_type, less_equal<ll>, rb_tree_tag, tree_order_statistics_node_update>
const ll MOD = 998244353;
const ll N = 1505;
const ll INF = 1e18;
ll cnt[N];
ll n;
void initialize(ll N){
n = N;
}
bool hasEdge(ll u, ll v){
cnt[max(u,v)]++;
if(cnt[max(u,v)] == max(u,v)) return true;
else{
return false;
}
}
/*
6 5 4 3 2 1 0
*/
Compilation message (stderr)
game.cpp:17:16: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+18' to '2147483647' [-Woverflow]
17 | const ll INF = 1e18;
| ^~~~
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |