# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1112527 | starchan | Catfish Farm (IOI22_fish) | C++17 | 163 ms | 51164 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 "fish.h"
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define in array<int, 2>
#define iln array<ll, 2>
#define pb push_back
#define pob pop_back
const ll INF = 1e17;
ll max_weights(int n, int m, vector<int> x, vector<int> y, vector<int> w)
{
vector<in> loc[n+1];//loc[i][k] = kth from bottom in ith column.
for(auto &s: x) s++;
for(auto &s: y) s++;
for(int i = 1; i <= n; i++)
loc[i].pb({0, 0});
for(int i = 0; i < m; i++)
loc[x[i]].pb({y[i], w[i]});
//pre-processing done.
vector<array<ll, 4>> dp[n+1];
vector<ll> pref[n+1];
ll DP[n+1];
for(int i = 1; i <= n; i++)
{
sort(loc[i].begin(), loc[i].end()); loc[i].pb({n+1, 0});
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |