답안 #1043167

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1043167 2024-08-04T03:25:50 Z ezzzay 메기 농장 (IOI22_fish) C++17
6 / 100
45 ms 22868 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];
    }
    if(N>2){
        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 16 ms 17752 KB Output is correct
2 Correct 16 ms 18268 KB Output is correct
3 Correct 2 ms 15964 KB Output is correct
4 Correct 2 ms 15964 KB Output is correct
5 Incorrect 45 ms 22868 KB 1st lines differ - on the 1st token, expected: '149814460735479', found: '102014006755076'
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 15964 KB Output is correct
2 Correct 25 ms 19764 KB Output is correct
3 Correct 34 ms 20564 KB Output is correct
4 Correct 14 ms 17756 KB Output is correct
5 Correct 16 ms 18264 KB Output is correct
6 Correct 2 ms 15984 KB Output is correct
7 Correct 3 ms 15960 KB Output is correct
8 Correct 2 ms 15964 KB Output is correct
9 Correct 2 ms 15964 KB Output is correct
10 Correct 2 ms 16064 KB Output is correct
11 Correct 3 ms 15964 KB Output is correct
12 Correct 13 ms 19292 KB Output is correct
13 Correct 19 ms 20172 KB Output is correct
14 Correct 15 ms 19280 KB Output is correct
15 Correct 16 ms 19800 KB Output is correct
16 Correct 14 ms 19336 KB Output is correct
17 Correct 15 ms 19544 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 15964 KB Output is correct
2 Correct 2 ms 15964 KB Output is correct
3 Incorrect 10 ms 17244 KB 1st lines differ - on the 1st token, expected: '21261825233649', found: '13415186848574'
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 15964 KB 1st lines differ - on the 1st token, expected: '3', found: '2'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 15964 KB 1st lines differ - on the 1st token, expected: '3', found: '2'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 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 15964 KB Output is correct
3 Incorrect 10 ms 17244 KB 1st lines differ - on the 1st token, expected: '21261825233649', found: '13415186848574'
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 16 ms 17752 KB Output is correct
2 Correct 16 ms 18268 KB Output is correct
3 Correct 2 ms 15964 KB Output is correct
4 Correct 2 ms 15964 KB Output is correct
5 Incorrect 45 ms 22868 KB 1st lines differ - on the 1st token, expected: '149814460735479', found: '102014006755076'
6 Halted 0 ms 0 KB -