# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1130044 | math_rabbit_1028 | 스핑크스 (IOI24_sphinx) | C++20 | 17 ms | 428 KiB |
#include "sphinx.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> adj[303];
vector<int> ch;
void dfs(int v) {
ch[v] = 1;
for (int u : adj[v]) {
if (ch[u]) continue;
dfs(u);
}
}
int other(int N, int v, int u) {
int ret = 0;
ch = vector<int>(N, 0);
ch[v] = ch[u] = 1;
for (int i = 0; i < N; i++) {
if (ch[i]) continue;
dfs(i);
ret++;
}
return ret;
}
int trivial(vector<int> E) {
int ret = 1;
for (int i = 0; i < E.size(); i++) if (E[i] != E.size()) E[i] = -1;
for (int i = 1; i < E.size(); i++) if (E[i] != E[i-1]) ret++;
return ret;
# | 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... |