Submission #1037501

# Submission time Handle Problem Language Result Execution time Memory
1037501 2024-07-29T01:32:38 Z HappyCapybara Catfish Farm (IOI22_fish) C++17
0 / 100
32 ms 7260 KB
#include "fish.h"
#include <bits/stdc++.h>
using namespace std;
 
#define ll long long
 
ll max_weights(int N, int M, vector<int> X, vector<int> Y, vector<int> W){
  vector<ll> pa(N, 0ll), pb(N, 0ll);
  for (int i=0; i<N; i++){
    if (X[i] % 2) pb[Y[i]] += W[i];
    else pa[Y[i]] += W[i];
  }
  ll bsf = 0;
  for (int i=0; i<N; i++){
    if (i != 0){
        pa[i] += pa[i-1];
        pb[i] += pb[i-1];
    }
    bsf = max(bsf, pa[i]-pb[i]);
  }
  return pb[N-1] + bsf;
}
# Verdict Execution time Memory Grader output
1 Runtime error 16 ms 7260 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 32 ms 5420 KB 1st lines differ - on the 1st token, expected: '40604614618209', found: '22508241427227'
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 3676 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB 1st lines differ - on the 1st token, expected: '3', found: '2'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB 1st lines differ - on the 1st token, expected: '3', found: '2'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB 1st lines differ - on the 1st token, expected: '3', found: '2'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 3676 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 16 ms 7260 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -