# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1101698 | TudorMa | Knapsack (NOI18_knapsack) | C++14 | 45 ms | 7628 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 <iostream>
#include <algorithm>
#include <vector>
#define fi first
#define sc second
#define int long long
using namespace std;
typedef pair<int, int> pii;
const int N = 1e5 + 5, W = 2005;
struct item {
int s, w, k;
};
int n, w, dp[W];
item v[N];
vector<pii> weights[W];
int32_t main()
{
cin.tie(nullptr)->sync_with_stdio(0);
cin >> w >> n;
for(int i=1; i<=n; i++) {
cin >> v[i].s >> v[i].w >> v[i].k;
weights[v[i].w].push_back({v[i].s, v[i].k});
}
# | 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... |