# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1086673 | lemon4life | Knapsack (NOI18_knapsack) | C++17 | 56 ms | 36432 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 long long ll;
typedef pair <ll, ll> pii;
#define fi first
#define se second
bool TURN(bool &X){ if (X) return 0; X = 1; return 1;}
template <class X, class Y> bool mini(X &x, const Y &y){ if (x > y){ x = y; return true;} return false;}
template <class X, class Y> bool maxi(X &x, const Y &y){ if (x < y){ x = y; return true;} return false;}
const int S = 2e3 + 5;
ll dp[S][S];
vector <pii> g[S];
void solve(){
int s, n; cin >> s >> n;
for (ll i = 1, v, w, k; i <= n; ++i){
cin >> v >> w >> k;
g[w].push_back({-v, k});
}
memset(dp, -0x3f, sizeof dp);
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... |