Submission #1076650

# Submission time Handle Problem Language Result Execution time Memory
1076650 2024-08-26T15:17:49 Z vjudge1 Catfish Farm (IOI22_fish) C++17
3 / 100
56 ms 7504 KB
#include <bits/stdc++.h>
#include "fish.h"
#define fastio ios_base::sync_with_stdio(0); cin.tie(0);
#define ll long long
using namespace std;
const int MAX=3e3+5;


ll max_weights(int n, int m, vector<int> x, vector<int> y, vector<int> w){
    bool par=0;
    ll ans=0;
    ll res=0;
    for(int i=0;i<m;i++){
        ans+=w[i];
        if(x[i]%2){
            par=1;
            res+=w[i];
        }
    }
    return max(res,ans-res);
}

Compilation message

fish.cpp: In function 'long long int max_weights(int, int, std::vector<int>, std::vector<int>, std::vector<int>)':
fish.cpp:10:10: warning: variable 'par' set but not used [-Wunused-but-set-variable]
   10 |     bool par=0;
      |          ^~~
# Verdict Execution time Memory Grader output
1 Correct 14 ms 2164 KB Output is correct
2 Correct 26 ms 2648 KB Output is correct
3 Correct 0 ms 344 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 53 ms 7272 KB Output is correct
6 Correct 56 ms 7504 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 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 Correct 0 ms 344 KB Output is correct
2 Correct 1 ms 344 KB Output is correct
3 Incorrect 11 ms 1628 KB 1st lines differ - on the 1st token, expected: '21261825233649', found: '13412238152019'
4 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: '3', found: '2'
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: '3', found: '2'
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: '3', found: '2'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 1 ms 344 KB Output is correct
3 Incorrect 11 ms 1628 KB 1st lines differ - on the 1st token, expected: '21261825233649', found: '13412238152019'
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 14 ms 2164 KB Output is correct
2 Correct 26 ms 2648 KB Output is correct
3 Correct 0 ms 344 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 53 ms 7272 KB Output is correct
6 Correct 56 ms 7504 KB Output is correct
7 Incorrect 1 ms 348 KB 1st lines differ - on the 1st token, expected: '2', found: '1'
8 Halted 0 ms 0 KB -