답안 #724334

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
724334 2023-04-15T06:02:08 Z raul2008487 메기 농장 (IOI22_fish) C++17
3 / 100
87 ms 7264 KB
#include "fish.h"

#include <vector>

long long max_weights(int N, int M, std::vector<int> X, std::vector<int> Y, std::vector<int> W) {
    long long ans1=0,ans2=0,i;
    for(i=0;i<W.size();i++){
        if(X[i]==1){
            ans1+=W[i];
        }
        else{
            ans2+=W[i];
        }
    }
    if(ans1>ans2){
        return ans1;
    }
    return ans2;
}

Compilation message

fish.cpp: In function 'long long int max_weights(int, int, std::vector<int>, std::vector<int>, std::vector<int>)':
fish.cpp:7:14: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    7 |     for(i=0;i<W.size();i++){
      |             ~^~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 20 ms 2132 KB Output is correct
2 Correct 25 ms 2508 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 73 ms 7264 KB Output is correct
6 Correct 87 ms 7248 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB 1st lines differ - on the 1st token, expected: '2', found: '1'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Incorrect 12 ms 1492 KB 1st lines differ - on the 1st token, expected: '21261825233649', found: '26722340820661'
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB 1st lines differ - on the 1st token, expected: '3', found: '2'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB 1st lines differ - on the 1st token, expected: '3', found: '2'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB 1st lines differ - on the 1st token, expected: '3', found: '2'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Incorrect 12 ms 1492 KB 1st lines differ - on the 1st token, expected: '21261825233649', found: '26722340820661'
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 20 ms 2132 KB Output is correct
2 Correct 25 ms 2508 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 73 ms 7264 KB Output is correct
6 Correct 87 ms 7248 KB Output is correct
7 Incorrect 0 ms 212 KB 1st lines differ - on the 1st token, expected: '2', found: '1'
8 Halted 0 ms 0 KB -