# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
776893 | alexander707070 | 메기 농장 (IOI22_fish) | C++17 | 722 ms | 224892 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
#define MAXN 3007
using namespace std;
int n,m,maxx;
long long pref[MAXN][MAXN],dp[MAXN][MAXN][2];
bool li[MAXN][MAXN][2];
long long prefmax[MAXN],prefmax2[MAXN];
long long suffmax[MAXN],suffmax2[MAXN];
long long max_weights(int N, int M,vector<int> X,vector<int> Y,vector<int> W){
n=N; m=M;
for(int i=0;i<m;i++){
pref[X[i]+1][Y[i]+1]+=W[i];
}
for(int i=1;i<=n;i++){
for(int f=1;f<=n;f++){
pref[i][f]=pref[i][f]+pref[i][f-1];
}
}
for(int pos=1;pos<=n;pos++){
for(int last=0;last<=n;last++){
prefmax[last]=dp[pos-1][last][1]-pref[pos][last];
if(last>0)prefmax[last]=max(prefmax[last],prefmax[last-1]);
prefmax2[last]=dp[pos-1][last][0];
if(last>0)prefmax2[last]=max(prefmax2[last],prefmax2[last-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... |