# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
831424 | mousebeaver | Game (IOI14_game) | C++14 | 1089 ms | 1492 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#include "game.h"
using namespace std;
vector<vector<int>> adjmatrix(0);
void initialize(int n)
{
adjmatrix.assign(n, vector<int> (n, -1));
for(int i = 0; i < n; i++)
{
adjmatrix[i][i] = 0;
}
}
void dfs(int i, vector<vector<int>>& adjmatrix, vector<bool>& visited)
{
visited[i] = true;
for(int j = 0; j < (int) adjmatrix[i].size(); j++)
{
if(!visited[j] && adjmatrix[i][j] != 0)
{
dfs(j, adjmatrix, visited);
}
}
}
int hasEdge(int u, int v)
{
int n = adjmatrix.size();
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |