# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
626512 | 2022-08-11T13:43:16 Z | whynotshadow | Catfish Farm (IOI22_fish) | C++17 | 89 ms | 7280 KB |
#include "fish.h" #include <bits/stdc++.h> using namespace std; #define ll long long const ll N=1e5+9; const ll INF=1e9; long long max_weights(int N, int M, std::vector<int> X, std::vector<int> Y, std::vector<int> W) { ll ans=0,cnt=0,cntt=0,sum1=0,sum2=0; for(auto to:W){ ans+=to; } for(auto to:X){ if(to&1) cnt++; if(to<=1) cntt++; } if(cnt==0) return ans; else if(cntt==M){ for(ll i=0; i<M; i++){ if(X[i]==0) sum1+=W[i]; else sum2+=W[i]; } return max(sum1,sum2); } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 21 ms | 2152 KB | Output is correct |
2 | Correct | 26 ms | 2636 KB | Output is correct |
3 | Correct | 0 ms | 212 KB | Output is correct |
4 | Correct | 0 ms | 212 KB | Output is correct |
5 | Correct | 89 ms | 7280 KB | Output is correct |
6 | Correct | 86 ms | 7272 KB | Output is correct |
# | Verdict | Execution time | Memory | 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 | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
3 | Incorrect | 14 ms | 1460 KB | 1st lines differ - on the 1st token, expected: '21261825233649', found: '26722445760742' |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | 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 | - |
# | Verdict | Execution time | Memory | 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 | - |
# | Verdict | Execution time | Memory | 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 | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
3 | Incorrect | 14 ms | 1460 KB | 1st lines differ - on the 1st token, expected: '21261825233649', found: '26722445760742' |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 21 ms | 2152 KB | Output is correct |
2 | Correct | 26 ms | 2636 KB | Output is correct |
3 | Correct | 0 ms | 212 KB | Output is correct |
4 | Correct | 0 ms | 212 KB | Output is correct |
5 | Correct | 89 ms | 7280 KB | Output is correct |
6 | Correct | 86 ms | 7272 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 | - |