# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
634101 | 2022-08-23T19:54:26 Z | Jovan26 | Catfish Farm (IOI22_fish) | C++17 | 88 ms | 7276 KB |
#include<bits/stdc++.h> using namespace std; long long max_weights(int n, int m, vector<int> x, vector<int> y, vector<int> w){ long long rez = 0; bool s1 = true; bool s2 = true; for(int i=0;i<x.size();i++){ if(x[i]%2==1) s1 = false; if(x[i]>1) s2 = false; } if(s1) for(int i=0;i<w.size();i++) rez+=w[i]; if(s2){ long long m1 = 0; long long m2 = 0; for(int i=0;i<w.size();i++){ if(x[i]==0) m1+=w[i]; else m2+=w[i]; } rez=max(m1,m2); } return rez; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 21 ms | 2132 KB | Output is correct |
2 | Correct | 27 ms | 2636 KB | Output is correct |
3 | Correct | 1 ms | 212 KB | Output is correct |
4 | Correct | 0 ms | 212 KB | Output is correct |
5 | Correct | 85 ms | 7264 KB | Output is correct |
6 | Correct | 88 ms | 7276 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 | Incorrect | 0 ms | 212 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 | 212 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 | 212 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 | 212 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 | 212 KB | Output is correct |
2 | Incorrect | 0 ms | 212 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 | 21 ms | 2132 KB | Output is correct |
2 | Correct | 27 ms | 2636 KB | Output is correct |
3 | Correct | 1 ms | 212 KB | Output is correct |
4 | Correct | 0 ms | 212 KB | Output is correct |
5 | Correct | 85 ms | 7264 KB | Output is correct |
6 | Correct | 88 ms | 7276 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 | - |