# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
209802 | medk | Sky Walking (IOI19_walk) | C++14 | 4114 ms | 455140 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#pragma GCC optimize ("O3")
#pragma GCC optimize ("Ofast")
#pragma GCC optimize ("unroll-loops")
#include "walk.h"
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define x first
#define y second
using namespace std;
int n,m;
vector<unordered_set<int>> twr,br;
vector<pair<ll,ll>> tower;
vector<pair<ll,pair<ll,ll>>> bridge;
map<pair<int,int>,ll> dist;
ll min_distance(vector<int> x, vector<int> h, vector<int> l, vector<int> r, vector<int> y, int s, int g)
{
n=x.size(), m=l.size();
twr.resize(n), br.resize(m);
for(int i=0;i<n;i++) tower.pb({h[i],x[i]});
for(int i=0;i<m;i++) bridge.pb({y[i],{x[l[i]],x[r[i]]}});
pair<ll,ll> ps=tower[s], pg=tower[g];
sort(tower.begin(),tower.end()); reverse(tower.begin(),tower.end());
sort(bridge.begin(),bridge.end()); reverse(bridge.begin(),bridge.end());
for(int i=0;i<n;i++)
{
# | 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... |