Submission #938357

#TimeUsernameProblemLanguageResultExecution timeMemory
938357Sir_Ahmed_ImranCop and Robber (BOI14_coprobber)C++17
0 / 100
1 ms344 KiB
///~~~LOTA~~~/// #include "coprobber.h" #include <bits/stdc++.h> using namespace std; #define ll long long #define append push_back #define add insert #define nl "\n" #define ff first #define ss second #define pii pair<int,int> #define all(x) (x).begin(),(x).end() #define L0TA ios_base::sync_with_stdio(false);cin.tie(NULL) #define N 500 int r; int dept[N]; vector<int> g[N]; void dfs(int v){ for(auto& i:g[v]){ if(dept[i]) r=max(r,dept[v]-dept[i]); else{ dept[i]=dept[v]+1; dfs(i); } } } int start(int n, bool a[N][N]){ for(int i=0;i<n;i++) for(int j=r=0;j<n;j++) if(a[i][j]) g[i].append(j); dept[0]=1; dfs(0); if(r>3) return -1; return 0; } int nextMove(int v){ return -1; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...