Submission #759875

#TimeUsernameProblemLanguageResultExecution timeMemory
759875FidiskGame (IOI14_game)C++14
100 / 100
287 ms26756 KiB
#include <bits/stdc++.h> using namespace std; #define edge(xxxx,yyyy) ((xxxx)*(m+5)+(yyyy)) #define oo 1e9 #define fi first #define se second #define sp(iiii) setprecision(iiii) #define IO ios_base::sync_with_stdio(false); cin.tie(0) #define ms(aaaa,xxxx) memset(aaaa,xxxx,sizeof(aaaa)) #define cntbit(xxxx) __builtin_popcount(xxxx) #define getbit(xxxx,aaaa) (((xxxx)>>((aaaa)-1))&1) #define totbit(xxxx) (32-__builtin_clz(xxxx)) #define totbitll(xxxx) (64-__builtin_clzll(ll(xxxx))) typedef long double ld; typedef long long ll; typedef unsigned long long ull; typedef pair<int,int> pii; typedef pair<pair<int,int>,int> piii; typedef pair<long long,long long> pll; typedef pair<pair<long long,long long>,long long> plll; typedef pair<pair<long long,long long>,pair<long long,long long>> pllll; typedef pair<pair<long long,long long>,bool> pllb; const ll base=333333349; const ll mod=1e9+7; const ld eps=1e-5; const ll maxn=50009; int deg[5009],done[5009][5009]; void initialize(int _n) { for (int i=1;i<=_n;i++) { deg[i]=i-1; } } int hasEdge(int x,int y) { x++; y++; if (x==y) return 0; if (x>y) { swap(x,y); } if (done[x][y]) { return done[x][y]-1; } deg[y]--; if (deg[y]==0) { done[x][y]=2; return done[x][y]-1; } else { done[x][y]=1; return done[x][y]-1; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...