제출 #920718

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
9207182024-02-03 00:49:29hasuhasuiroAutobahn (COI21_autobahn)C++17
100 / 100
971 ms99628 KiB
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int N, K, X;
cin >> N >> K >> X;
vector l(N, 0), r(N, 0), t(N, 0);
for(int i = 0; i < N; i++) { cin >> l[i] >> t[i] >> r[i]; r[i]++; }
/* */
vector P(0, 0);
for(int i = 0; i < N; i++) { P.push_back(l[i]), P.push_back(r[i]); } /* */
for(int i = 0; i < N; i++) { if(l[i]+t[i] < r[i]) { P.push_back(l[i]+t[i]); } } /* */
sort(begin(P), end(P));
P.erase(unique(begin(P), end(P)), end(P));
map<int, int> mp2;
for(int i = 0; i < (int)size(P); i++) { mp2[P[i]] = 1; }
int sizep(size(P));
for(int i = 0; i < sizep; i++) {
P.push_back(P[i]+X), P.push_back(P[i]-X);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...