제출 #1130044

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
11300442024-12-27 02:57:26math_rabbit_1028스핑크스 (IOI24_sphinx)C++20
3 / 100
17 ms428 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;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...