답안 #1055632

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1055632 2024-08-13T00:59:02 Z vjudge1 메기 농장 (IOI22_fish) C++17
6 / 100
49 ms 14724 KB
#include "fish.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll fishies[5][100100];
ll dp[3002][2][3002];
inline ll ones(int col,int len){
    return fishies[col][len];
}
ll max_weights(int N,int M,vector<int> X,vector<int> Y,vector<int> W) {
    for(int i=0;i<M;i++)
        fishies[X[i]+1][Y[i]+1]=W[i];
    for(int i=1;i<=2;i++)
        for(int j=1;j<=N+1;j++)
            fishies[i][j]+=fishies[i][j-1];
    if(N==2) return max(ones(1,N),ones(2,N));
    ll K=ones(2,N),bst=0;
    for(int i=1;i<=N;i++)
        bst=max(bst,ones(1,i)-ones(2,i));
    return K+bst;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 12 ms 4188 KB Output is correct
2 Correct 14 ms 4700 KB Output is correct
3 Correct 1 ms 2396 KB Output is correct
4 Correct 0 ms 2396 KB Output is correct
5 Runtime error 49 ms 14724 KB Execution killed with signal 11
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 2396 KB Output is correct
2 Correct 24 ms 6204 KB Output is correct
3 Correct 30 ms 7164 KB Output is correct
4 Correct 12 ms 4188 KB Output is correct
5 Correct 14 ms 4700 KB Output is correct
6 Correct 1 ms 2396 KB Output is correct
7 Correct 0 ms 2396 KB Output is correct
8 Correct 0 ms 2396 KB Output is correct
9 Correct 0 ms 2396 KB Output is correct
10 Correct 0 ms 2396 KB Output is correct
11 Correct 0 ms 2396 KB Output is correct
12 Correct 12 ms 5756 KB Output is correct
13 Correct 15 ms 6444 KB Output is correct
14 Correct 13 ms 5740 KB Output is correct
15 Correct 14 ms 5980 KB Output is correct
16 Correct 14 ms 5724 KB Output is correct
17 Correct 15 ms 5980 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 2396 KB Output is correct
2 Runtime error 2 ms 348 KB Execution killed with signal 11
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 2392 KB 1st lines differ - on the 1st token, expected: '3', found: '2'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 2392 KB 1st lines differ - on the 1st token, expected: '3', found: '2'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 2392 KB 1st lines differ - on the 1st token, expected: '3', found: '2'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 2396 KB Output is correct
2 Runtime error 2 ms 348 KB Execution killed with signal 11
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 12 ms 4188 KB Output is correct
2 Correct 14 ms 4700 KB Output is correct
3 Correct 1 ms 2396 KB Output is correct
4 Correct 0 ms 2396 KB Output is correct
5 Runtime error 49 ms 14724 KB Execution killed with signal 11
6 Halted 0 ms 0 KB -