# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1126175 | OI_Account | Two Dishes (JOI19_dishes) | C++20 | 4907 ms | 199804 KiB |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1'000'100;
const ll INF = 1'000'000'000'000'000'000;
int n, m, s[N + 10], t[N + 10];
ll a[N + 10], c[N + 10], x[N + 10];
ll b[N + 10], d[N + 10], y[N + 10];
ll sumA[N + 10], sumB[N + 10];
ll add[4 * N + 10], lazy[4 * N + 10];
vector<pair<int, pair<int, ll>>> vec[N + 10];
void readInput() {
cin >> n >> m;
for (int i = 1; i <= n; i++) {
cin >> a[i] >> x[i] >> c[i];
sumA[i] = sumA[i - 1] + a[i];
}
for (int i = 1; i <= m; i++) {
cin >> b[i] >> y[i] >> d[i];
sumB[i] = sumB[i - 1] + b[i];
}
}
void init() {
for (int i = 1; i <= n; i++) {
s[i] = upper_bound(sumB, sumB + m + 1, x[i] - sumA[i]) - sumB - 1;
# | 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... |
# | 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... |