Submission #574784

#TimeUsernameProblemLanguageResultExecution timeMemory
574784Theo830Game (IOI14_game)C++17
100 / 100
275 ms16380 KiB
#include "game.h" #include <bits/stdc++.h> using namespace std; typedef int ll; typedef pair<ll,ll> ii; #define iii pair<ll,ii> #define f(i,a,b) for(int i = a;i < b;i++) #define pb push_back #define vll vector<ll> #define F first #define S second #define all(x) (x).begin(), (x).end() ///I hope I will get uprating and don't make mistakes ///I will never stop programming ///sqrt(-1) Love C++ ///Please don't hack me ///@TheofanisOrfanou Theo830 ///Think different approaches (bs,dp,greedy,graphs,shortest paths,mst) ///Stay Calm ///Look for special cases ///Beware of overflow and array bounds ///Think the problem backwards ///Training ll cnt[1505] = {0}; int N; void initialize(int n){ N = n; } int hasEdge(int u, int v){ cnt[min(u,v)]++; if(cnt[min(u,v)] == N - min(v,u) - 1){ return 1; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...