Submission #1005369

#TimeUsernameProblemLanguageResultExecution timeMemory
1005369rahidilbayramliGame (IOI14_game)C++17
100 / 100
877 ms71060 KiB
#include "game.h" #pragma GCC optimize("-O3") #include<bits/stdc++.h> #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> #define ll long long #define ld long double #define vl vector<ll> #define vi vector<int> #define pii pair<int, int> #define pll pair<ll, ll> #define all(v) v.begin(), v.end() #define rall(v) v.rbegin(), v.rend() #define pb push_back #define p_b pop_back #define f first #define s second using namespace std; using namespace __gnu_pbds; typedef tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set; mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count()); const ll sz = 1505; set<ll> st[sz]; void initialize(int n) { for(int i = 0; i < n; i++) { for(int j = 0; j < i; j++) st[i].insert(j); } } int hasEdge(int u, int v) { if(u > v) swap(u, v); st[v].erase(u); if(st[v].size() == 0) return 1; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...