이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "island.h"
#include <bits/stdc++.h>
using namespace std;
int a[305][305];
vector<int>fii[305];
bool known[305];
int f(int i,int j)
{
if (a[i][j] != 0)
return a[i][j];
a[i][j] = query(i,j);
return a[i][j];
}
void solve(int N, int L)
{
known[1] = true;
for (int i = 1; i < N; i++)
{
int x = f(1,i);
if (known[x] == true)
continue;
for (int j = 1; j < N; j++)
{
if (known[f(x,j)] == true)
{
fii[a[x][j]].push_back(x);
break;
}
else
{
fii[x].push_back(a[x][j]);
known[a[x][j]] = true;
}
}
known[x] = true;
}
for (int i = 1; i <= N; i++)
for (auto it : fii[i])
answer(i,it);
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |