이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "rail.h"
/*
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
/*
#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
//*/
std::mt19937 rng(std::chrono::system_clock::now().time_since_epoch().count());
using namespace std;
#define IO ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define y1 asjfkgasj
#define all(v) (v).begin(),(v).end()
#define pb push_back
#define F first
#define S second
#define endl '\n'
#define flsh '\n'<<flush
#define mp make_pair
#define mt make_tuple
#define sz size
#define pii pair<int,int>
#define pll pair<long long,long long>
#define vi vector<int>
#define vll vector<long long>
#define deb(x) cout<< #x <<'='<< x <<flsh;
#define iii int,int,int
#define ull unsigned long long
#define intt long long
#define ld long double
#define dd double
#define OK cout<<"OK\n"<<flsh;
#define setpre(x) fixed<<setprecision(x)
#define mmset(x,y) memset(x,y,sizeof(x))
int d[5001],D,x,y;
void findLocation(int n, int C, int location[], int stype[])
{
stype[0]=1;
location[0]=C;
D=1;
for(int i=1;i<n;i++)
{
d[i]=getDistance(0,i);
if(d[i]<d[D]) D=i;
}
location[D]=C+d[D];
stype[D]=2;
for(int i=1;i<n;i++)
if(i!=D)
{
y=getDistance(D,i);
x=d[i];
if(x<y)
{
stype[i]=2;
location[i]=C+x;
}
else
{
stype[i]=1;
location[i]=location[D]-y;
}
//cout<<i<<' '<<x<<' '<<y<<endl;
}
//for(int i=0;i<n;i++)
// cout<<stype[i]<<','<<location[i]<<endl;
}
컴파일 시 표준 에러 (stderr) 메시지
rail.cpp:7:1: warning: "/*" within comment [-Wcomment]
/*
# | 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... |