# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
841820 | WLZ | Cloud Computing (CEOI18_clo) | C++17 | 516 ms | 2908 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;
using ll = long long;
const ll LINF = (ll) 1e18;
const int maxc = 10003;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n; cin >> n;
vector< tuple<int, int, int> > a;
int sum_c = 0;
for (int i = 0; i < n; i++) {
int c, f, v;
cin >> c >> f >> v;
sum_c += c;
a.emplace_back(f, v, c);
}
int m; cin >> m;
for (int i = 0; i < m; i++) {
int c, f, v;
cin >> c >> f >> v;
a.emplace_back(f, -v, c);
}
sort(a.rbegin(), a.rend());
vector< vector<ll> > dp(2, vector<ll>(sum_c + 1, -LINF));
dp[0][0] = 0;
for (int i = 0; i < n + m; i++) {
# | 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... |