| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 434612 | ismoilov | Highway Tolls (IOI18_highway) | C++14 | 17 ms | 1164 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "highway.h"
#include <bits/stdc++.h>
using namespace std;
map <pair<int, int>, int> mp;
vector <int> g[1001];
vector<int> to_ask(1001);
int now;
int check(int x, int p){
bool ok = 0;
for(auto y : g[x]){
if(p == y)
continue;
to_ask[mp[{min(x, y), max(y, x)}]] = 1;
// cout << x << " " << y << " " << ask(to_ask) <<" " << now << " " <<"\n";
int noww = ask(to_ask);
if(now == noww)
to_ask[mp[{min(x, y), max(y, x)}]] = 0;
else{
now = noww;
return check(y, x);
}
}
return x;
}
void find_pair(int N, vector<int> u, vector<int> v, int a, int b) {
int m = u.size();
to_ask.resize(m);
for(int i = 0; i < m; i ++){
g[u[i]].push_back(v[i]);
g[v[i]].push_back(u[i]);
mp[{min(u[i], v[i]), max(u[i], v[i])}] = i;
}
now = ask(to_ask);
answer(0, check(0, 0));
}
컴파일 시 표준 에러 (stderr) 메시지
| # | 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... | ||||
