# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
70373 | top34051 | Simurgh (IOI17_simurgh) | C++17 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "simurgh.h"
#include<bits/stdc++.h>
using namespace std;
#define pii pair<int,int>
#define X first
#define Y second
const int maxn = 500 + 5;
const int maxm = 250000 + 5;
int n,m;
pii e[maxm];
int head[maxn];
vector<pii> way[maxn], edge[maxn];
int ban[maxm], res[maxm];
vector<int> tree;
int h[maxn], par[maxn], rec[maxn];
vector<int> p;
int cut[maxm];
int ask(int x, int y) {
for(auto &id : tree) if(id==x) id = y;
ask_count++;
if(ask_count > 8000) assert(0);
int ret = count_common_roads(tree);
for(auto &id : tree) if(id==y) id = x;