# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
865788 | thundereyex | Knapsack (NOI18_knapsack) | C++14 | 46 ms | 7448 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;
typedef vector<pair<long long, long long>> vii;
#define pb push_back
#define all(x) x.begin(), x.end()
const int V = 1e6 + 7;
const int N = 1e5 + 7;
const int S = 2e3 + 7;
const int inf = 1e9;
long long s, n, v[N], w[N], k[N];
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
#ifndef ONLINE_JUDGE
// freopen("test.inp", "r", stdin);
//freopen("test.out", "w", stdout);
#endif
cin >> s >> n;
for (int i = 1; i <= n; i++) cin >> v[i] >> w[i] >> k[i];
int mx = *max_element(k, k + n);
// Subtask 1
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |