이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "rail.h"
#include <bits/stdc++.h>
using namespace std;
int n;
//int getDistance(int i, int j);
void findLocation(int N, int first, int location[], int stype[]){
//1: lhs (up-down)
//2: rhs (down-up)
n=N;
location[0]=first;
stype[0]=1;
if (n==1){
return;
}
vector<pair<int,int>> distfrom0(n);
distfrom0[0]={0,0};
for (int i = 1; i<n; i++){
distfrom0[i]={getDistance(0,i),i};
}
sort(distfrom0.begin(),distfrom0.end());
for (int i = 1; i<n; i++){
location[distfrom0[i].second]=distfrom0[i].first+first;
stype[distfrom0[i].second]=2;
}
return;
}
| # | 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... |