제출 #889027

#제출 시각아이디문제언어결과실행 시간메모리
889027agussRail (IOI14_rail)C++14
0 / 100
44 ms604 KiB
#include "rail.h" #include <bits/stdc++.h> #define _USE_MATH_DEFINES #define endl "\n" #define sp " " #define f1(i, x) for(auto &i : x) #define f2(i, x) for(ll i = 0; i < x; i++) #define raya() cout << endl << "====================================" << endl using namespace std; typedef long long ll; void findLocation(int N, int first, int location[], int stype[]){ vector<pair<int, int>> a; for(int i = 0; i < N; i++) a.push_back({getDistance(0, i), i}); sort(a.begin(), a.end()); int f = a[1].second; set<int> b; for(int i = 0; i < N; i++) if(getDistance(0, i) != getDistance(i, 0)) b.insert(i); for(int i = 0; i < N; i++){ if(b.count(i)){ location[i] = first + getDistance(0, f) - getDistance(f, i); stype[i] = 1; } else { location[i] = first + getDistance(0, i); stype[i] = 2; } } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...