제출 #858593

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
8585932023-10-09 01:43:00resting추월 (IOI23_overtaking)C++17
19 / 100
14 ms1300 KiB
#include <bits/stdc++.h>
using namespace std;
#define int long long
vector<pair<int, int>> restriction; // if "starts after a", has to "end after b" yk
int x, l;
bool comp(const pair<int,int>&a, const pair<int,int>&b){
if(a.second == b.second) return a.first > b.first;
return a.second < b.second;
}
vector<pair<int,int>> fix(vector<pair<int,int>> shit){
vector<pair<int,int>> res;
sort(shit.begin(), shit.end());
for(int i = shit.size()-1; i >= 0; i--){
if(res.size() && shit[i].first >= res.back().first) continue;
res.push_back(shit[i]);
}
reverse(res.begin(), res.end());
return res;
}
void init(int32_t L, int32_t N, std::vector<long long> T, std::vector<int32_t> W, int32_t X, int32_t M, std::vector<int32_t> S)
{
x = X; l = L;
vector<vector<pair<int, int>>> restrictions(M);// yes
vector<pair<int, int>> cur;
for (int i = 0; i < N; i++) if (W[i] > X) cur.push_back({ T[i], W[i] - X });
for (int i = 0; i < M-1; i++) {
sort(cur.begin(), cur.end());
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

컴파일 시 표준 에러 (stderr) 메시지

overtaking.cpp: In function 'long long int arrival_time(long long int)':
overtaking.cpp:106:25: warning: comparison of integer expressions of different signedness: 'long int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  106 |     if (yes >= 0 && yes <= restriction.size()) Y = max(Y, restriction[yes].second);
      |                     ~~~~^~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...