제출 #1123154

#제출 시각아이디문제언어결과실행 시간메모리
1123154SalihSahin철로 (IOI14_rail)C++20
0 / 100
60 ms580 KiB
#include <bits/stdc++.h> #define pb push_back //#define int long long using namespace std; /* This is sample grader for the contestant */ #include "rail.h" const int inf = 1e9; void findLocation(int N, int first, int location[], int stype[]) { int dismin = inf, minb = 0; for(int i = 1; i < N; i++){ int x = getDistance(0, i); if(x < dismin){ dismin = x; minb = i; } } location[minb] = first + dismin; stype[minb] = 2; // sagimdaki ilk D for(int i = 1; i < N; i++){ if(i == minb) continue; int x = getDistance(0, i); int y = getDistance(minb, i); if(x > y){ stype[i] = 1; location[i] = location[minb] - y; } else{ stype[i] = 2; location[i] = location[0] + x; } } return; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...