# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
163386 | davitmarg | 철로 (IOI14_rail) | C++17 | 84 ms | 624 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
/*DavitMarg*/
#include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <string>
#include <cstring>
#include <map>
#include <set>
#include <queue>
#include <iomanip>
#include <bitset>
#include <stack>
#include <cassert>
#include <iterator>
#include <fstream>
#define mod 1000000007ll
#define LL long long
#define LD long double
#define MP make_pair
#define PB push_back
#define all(v) v.begin(), v.end()
using namespace std;
#ifndef death
#include "rail.h"
#endif
#ifdef death
int getDistance(int a, int b)
{
cout << a << " : " << b << endl;
cin >> a;
return a;
}
#endif
void findLocation(int n, int POS, int location[], int stype[])
{
vector<pair<int, int>> x;
vector<pair<int, int>> R, L;
for (int i = 0; i < n; i++)
{
int d = getDistance(0, i);
x.PB(MP(i, d));
}
sort(all(x));
R.PB(x[0]);
for (int i = 1; i < n; i++)
{
int d = getDistance(R.back().first, x[i].first);
if (d == x[i].second + R.back().second)
R.PB(x[i]);
else
L.PB(x[i]);
}
for (int i = 0; i < R.size(); i++)
location[R[i].first] = POS + R[i].second;
for (int i = 0; i < L.size(); i++)
{
int d = R[i].second;
location[L[i].first] = POS - (L[i].second - d - d + 1);
}
}
#ifdef death
int main()
{
return 0;
}
#endif
/*
*/
컴파일 시 표준 에러 (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... |