| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 992227 | vjudge1 | 철로 (IOI14_rail) | C++17 | 40 ms | 604 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "rail.h"
#include<bits/stdc++.h>
using namespace std;
void findLocation(int N, int first, int location[], int stype[]){
stype[0]=1,location[0]=first;
vector<int> Cs,Ds;
for(int i=1;i<N;i++){
int a=getDistance(0,i),b=getDistance(i,0);
if(a==b) stype[i]=2,Ds.push_back(i);
else { stype[i]=1,Cs.push_back(i);
if(a<b) location[i]=first+a;
else location[i]=first-b;
}
}
int best=0;
for(auto i:Cs)
if(location[i]<location[best])
best=i;
for(auto i:Ds)
location[i]=location[best]+getDistance(best,i);
return;
if(N==1){
return;
}
if(N==2){
stype[1]=2,location[1]=first+getDistance(0,1);
}
if(N==3){
int a=getDistance(0,1),b=getDistance(1,0),c;
if(a==b) stype[1]=2,location[1]=first+a;
else stype[1]=2;
}
}
컴파일 시 표준 에러 (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... | ||||
