답안 #1055941

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1055941 2024-08-13T06:42:59 Z amirhoseinfar1385 메기 농장 (IOI22_fish) C++17
3 / 100
57 ms 13908 KB
#include "fish.h"
#include<bits/stdc++.h>
using namespace std;

int n,m;
long long max_weights(int N, int M, std::vector<int> X, std::vector<int> Y,
                      std::vector<int> W) {
    long long sum1=0,sum0=0,res=0,f=0;
    n=N;
    m=(int)X.size();
    for(int i=0;i<m;i++){
        res+=W[i];
        if(X[i]==0){
            sum0+=W[i];
        }else if(X[i]==1){
            sum1+=W[i];
        }
        if(X[i]&1){
            f=1;
        }
    }
    if(f==1){
        return max(sum1,sum0);
    }
  return res;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 11 ms 2140 KB Output is correct
2 Correct 14 ms 2648 KB Output is correct
3 Correct 1 ms 344 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 44 ms 13756 KB Output is correct
6 Correct 57 ms 13908 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB 1st lines differ - on the 1st token, expected: '2', found: '1'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB 1st lines differ - on the 1st token, expected: '882019', found: '0'
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB 1st lines differ - on the 1st token, expected: '3', found: '1'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB 1st lines differ - on the 1st token, expected: '3', found: '1'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB 1st lines differ - on the 1st token, expected: '3', found: '1'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB 1st lines differ - on the 1st token, expected: '882019', found: '0'
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 11 ms 2140 KB Output is correct
2 Correct 14 ms 2648 KB Output is correct
3 Correct 1 ms 344 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 44 ms 13756 KB Output is correct
6 Correct 57 ms 13908 KB Output is correct
7 Incorrect 0 ms 348 KB 1st lines differ - on the 1st token, expected: '2', found: '1'
8 Halted 0 ms 0 KB -