Submission #116558

#TimeUsernameProblemLanguageResultExecution timeMemory
116558CaroLindaGame (IOI14_game)C++14
100 / 100
450 ms18592 KiB
#include <bits/stdc++.h> #define lp(i,a,b) for(int i=a;i<b;i++) #define ll long long const int maxn=1505 ; using namespace std; int n,tam; int s[maxn] ; bool marc[maxn][maxn]; bool comp[maxn] ; int hasEdge(int u,int v) { marc[u][v]=marc[v][u]=true ; if(!comp[u]&& !comp[v])return 0 ; if(comp[v])swap(u,v) ; if(s[v]!=tam-1) {s[v]++ ; return 0 ;} comp[v]=true ; tam++; lp(i,0,n) if(marc[i][v]) s[i]++; return 1 ; } void initialize(int N) { n=N; comp[0]=true; tam=1; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...