Submission #1079082

# Submission time Handle Problem Language Result Execution time Memory
1079082 2024-08-28T10:30:48 Z asdasdqwer Catfish Farm (IOI22_fish) C++17
3 / 100
60 ms 13908 KB
#include "fish.h"
#include <bits/stdc++.h>
using namespace std;

long long max_weights(int N, int M, std::vector<int> X, std::vector<int> Y, std::vector<int> W) {
    // first subtask
    bool s1 = true, s2=true;
    for (int i=0;i<M;i++) {
        if (X[i] % 2 != 0) s1=false;
        if (X[i] > 1) s2=false;
    }
    if (s1) {
        long long sm = 0;
        for (int i=0;i<M;i++) sm += W[i];
        return sm;
    }

    if (s2) {
        long long sm1=0,sm2=0;
        for (int i=0;i<M;i++) {
            if (X[i] == 0) sm1 += W[i];
            else sm2 += W[i];
        }
        return max(sm1, sm2);
    }

    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 14 ms 3676 KB Output is correct
2 Correct 24 ms 4284 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 60 ms 13672 KB Output is correct
6 Correct 60 ms 13908 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 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 Correct 0 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 -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB 1st lines differ - on the 1st token, expected: '3', found: '0'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB 1st lines differ - on the 1st token, expected: '3', found: '0'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB 1st lines differ - on the 1st token, expected: '3', found: '0'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 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 -
# Verdict Execution time Memory Grader output
1 Correct 14 ms 3676 KB Output is correct
2 Correct 24 ms 4284 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 60 ms 13672 KB Output is correct
6 Correct 60 ms 13908 KB Output is correct
7 Incorrect 1 ms 344 KB 1st lines differ - on the 1st token, expected: '2', found: '1'
8 Halted 0 ms 0 KB -