Submission #66123

#TimeUsernameProblemLanguageResultExecution timeMemory
66123someone_aaGame (IOI14_game)C++17
42 / 100
1073 ms4504 KiB
#include <bits/stdc++.h> #include "game.h" using namespace std; const int maxn = 1600; bool path[maxn][maxn]; bool visited[maxn]; int n; void initialize(int N) { memset(path, true, sizeof(path)); n = N; } int hasEdge(int u, int v) { path[u][v] = path[v][u] = false; memset(visited,false,sizeof(visited)); queue<int>q; q.push(u); visited[u] = true; while(!q.empty()) { int curr = q.front(); q.pop(); for(int i=0;i<n;i++) { if(path[curr][i] && !visited[i]) { visited[i] = true; q.push(i); } } } if(visited[v]) return 0; else { path[u][v] = path[v][u] = true; return 1; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...