# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1067384 | juicy | 버스 (JOI14_bus) | C++17 | 154 ms | 25108 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "debug.h"
#else
#define debug(...) 42
#endif
const int N = 1e5 + 5, M = 3e5 + 5, inf = 1e9;
int n, m, q;
int s[M], t[M], x[M], y[M], dp[M], best[N];
int main() {
ios::sync_with_stdio(false); cin.tie(nullptr);
cin >> n >> m;
vector<array<int, 3>> events;
for (int i = 1; i <= m; ++i) {
cin >> s[i] >> t[i] >> x[i] >> y[i];
events.push_back({x[i], i, 1});
events.push_back({y[i], i, 0});
}
sort(events.begin(), events.end());
fill(best + 1, best + n + 1, -inf);
vector<array<int, 2>> cands;
for (auto [_, i, type] : events) {
if (!type) {
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |