Submission #1055934

# Submission time Handle Problem Language Result Execution time Memory
1055934 2024-08-13T06:41:03 Z amirhoseinfar1385 Catfish Farm (IOI22_fish) C++17
0 / 100
11 ms 3672 KB
#include "fish.h"
#include<bits/stdc++.h>
using namespace std;

int n;
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;
    for(int i=0;i<n;i++){
        res+=W[i];
        if(X[i]==0){
            sum0+=W[i];
        }else if(X[i]==1){
            sum1+=W[i];
        }else{
            f=1;
        }
    }
    if(f==0){
        return max(sum1,sum0);
    }
  return res;
}
# Verdict Execution time Memory Grader output
1 Incorrect 11 ms 3672 KB 1st lines differ - on the 1st token, expected: '40313272768926', found: '44863775616942'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory 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 -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 348 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 344 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 -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 344 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 -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 344 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 -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 348 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 11 ms 3672 KB 1st lines differ - on the 1st token, expected: '40313272768926', found: '44863775616942'
2 Halted 0 ms 0 KB -