Submission #1043164

# Submission time Handle Problem Language Result Execution time Memory
1043164 2024-08-04T03:23:28 Z ezzzay Catfish Farm (IOI22_fish) C++17
0 / 100
47 ms 22904 KB
#include "fish.h"
#include<bits/stdc++.h>
using namespace std;
#include <vector>
#define ll long long
const int MN=1e6;
ll ps[MN][2];
long long max_weights(int N, int M, std::vector<int> X, std::vector<int> Y,std::vector<int> W) {
    ll ans=0;
    for(int i=0;i<M;i++){
        ps[Y[i]][X[i]]+=W[i];
    }
   
    for(int i=1;i<MN-5;i++){
        ps[i][0]+=ps[i-1][0];
        ps[i][1]+=ps[i-1][1];
    }
    
    for(int i=0;i<=N;i++){
       
        ll k=ps[N+5][1]-ps[i][1]+ps[i][0];
        ans=max(ans,k);
    }
    
    ans=max(ans,ps[N+5][0]);
    ans=max(ans,ps[N+5][1]);
    return ans;
}
# Verdict Execution time Memory Grader output
1 Correct 15 ms 17756 KB Output is correct
2 Correct 16 ms 18264 KB Output is correct
3 Correct 3 ms 15964 KB Output is correct
4 Correct 2 ms 15964 KB Output is correct
5 Incorrect 47 ms 22904 KB 1st lines differ - on the 1st token, expected: '149814460735479', found: '102014006755076'
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 3 ms 15960 KB Output is correct
2 Correct 27 ms 19764 KB Output is correct
3 Correct 30 ms 20560 KB Output is correct
4 Correct 14 ms 17752 KB Output is correct
5 Correct 23 ms 18268 KB Output is correct
6 Incorrect 3 ms 15964 KB 1st lines differ - on the 1st token, expected: '4044', found: '6066'
7 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 3 ms 15964 KB Output is correct
2 Correct 2 ms 15964 KB Output is correct
3 Incorrect 10 ms 17216 KB 1st lines differ - on the 1st token, expected: '21261825233649', found: '13415186848574'
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 15964 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 3 ms 15964 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 3 ms 15964 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 Correct 3 ms 15964 KB Output is correct
2 Correct 2 ms 15964 KB Output is correct
3 Incorrect 10 ms 17216 KB 1st lines differ - on the 1st token, expected: '21261825233649', found: '13415186848574'
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 15 ms 17756 KB Output is correct
2 Correct 16 ms 18264 KB Output is correct
3 Correct 3 ms 15964 KB Output is correct
4 Correct 2 ms 15964 KB Output is correct
5 Incorrect 47 ms 22904 KB 1st lines differ - on the 1st token, expected: '149814460735479', found: '102014006755076'
6 Halted 0 ms 0 KB -