제출 #871884

#제출 시각아이디문제언어결과실행 시간메모리
871884tvladm2009Event Hopping 2 (JOI21_event2)C++17
0 / 100
19 ms1628 KiB
#include <bits/stdc++.h> using i64 = long long; int main() { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); int n, k; std::cin >> n >> k; std::vector<int> l(n), r(n); for (int i = 0; i < n; i++) { std::cin >> l[i] >> r[i]; } int last = 0; for (int i = 0; i < n; i++) { if (l[i] >= last) { last = r[i]; k--; std::cout << i + 1 << "\n"; } if (k == 0) { break; } } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...