답안 #627362

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
627362 2022-08-12T13:53:10 Z c28dnv9q3 메기 농장 (IOI22_fish) C++17
0 / 100
22 ms 3164 KB
#include "fish.h"
#include <vector>

using namespace std;
using ll = long long;

ll max_weights(
  int N, int M, vector<int> X, vector<int> Y, vector<int> W
) {
  vector<int> v(N+1);
  for (int i = 0; i < M; i++)
    v[X[i]+1] += W[i];

  vector<ll> dp(N+5);
  for (int i = 1; i < N; i++) {
    dp[i+5] = max(
      dp[i+5-1],
      dp[i+5-3] + v[i+1] + v[i-2+1]
    );
  }
  return dp[N+4];
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 22 ms 3164 KB 1st lines differ - on the 1st token, expected: '40313272768926', found: '709728670'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB 1st lines differ - on the 1st token, expected: '2', found: '1'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 1364 KB Output is correct
2 Correct 1 ms 1364 KB Output is correct
3 Incorrect 18 ms 2592 KB 1st lines differ - on the 1st token, expected: '21261825233649', found: '20490646833592'
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB 1st lines differ - on the 1st token, expected: '3', found: '2'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB 1st lines differ - on the 1st token, expected: '3', found: '2'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB 1st lines differ - on the 1st token, expected: '3', found: '2'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 1364 KB Output is correct
2 Correct 1 ms 1364 KB Output is correct
3 Incorrect 18 ms 2592 KB 1st lines differ - on the 1st token, expected: '21261825233649', found: '20490646833592'
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 22 ms 3164 KB 1st lines differ - on the 1st token, expected: '40313272768926', found: '709728670'
2 Halted 0 ms 0 KB -