# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
749576 | farhan132 | Catfish Farm (IOI22_fish) | C++17 | 798 ms | 152876 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;
typedef long long ll;
typedef double dd;
typedef pair<ll , ll> ii;
typedef tuple < ll, ll, ll > tp;
const ll INF = (ll)1e18;
#define mem(a , b) memset(a, b ,sizeof(a))
const ll N = 3005;
ll dp[2][2][2][N], pref[2][2][2][N], suf[2][2][2][N];
ll a[N][N]; ll n;
long long max_weights(int _n, int m, std::vector<int> X, std::vector<int> Y,
std::vector<int> W) {
n = _n;
mem(a, 0); mem(dp, 0); mem(pref, 0);
for(ll i = 0; i < m; i++){
a[X[i]][Y[i] + 1] = W[i];
}
for(ll i = 0; i < n; i++){
for(ll j = 1; j <= n; j++){
a[i][j] += a[i][j - 1];
}
# | 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... |