답안 #1043162

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1043162 2024-08-04T03:21:45 Z ezzzay 메기 농장 (IOI22_fish) C++17
0 / 100
48 ms 24156 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;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 14 ms 17752 KB Output is correct
2 Correct 19 ms 18272 KB Output is correct
3 Correct 3 ms 15960 KB Output is correct
4 Correct 2 ms 15964 KB Output is correct
5 Incorrect 48 ms 22896 KB 1st lines differ - on the 1st token, expected: '149814460735479', found: '102014006755076'
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 15960 KB Output is correct
2 Correct 27 ms 19792 KB Output is correct
3 Correct 34 ms 24156 KB Output is correct
4 Correct 15 ms 19292 KB Output is correct
5 Correct 18 ms 20056 KB Output is correct
6 Incorrect 3 ms 16216 KB 1st lines differ - on the 1st token, expected: '4044', found: '6066'
7 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 15964 KB Output is correct
2 Correct 2 ms 15980 KB Output is correct
3 Incorrect 9 ms 17272 KB 1st lines differ - on the 1st token, expected: '21261825233649', found: '13415186848574'
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 15964 KB Output is correct
2 Correct 2 ms 15980 KB Output is correct
3 Incorrect 9 ms 17272 KB 1st lines differ - on the 1st token, expected: '21261825233649', found: '13415186848574'
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 14 ms 17752 KB Output is correct
2 Correct 19 ms 18272 KB Output is correct
3 Correct 3 ms 15960 KB Output is correct
4 Correct 2 ms 15964 KB Output is correct
5 Incorrect 48 ms 22896 KB 1st lines differ - on the 1st token, expected: '149814460735479', found: '102014006755076'
6 Halted 0 ms 0 KB -