# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
739745 | 2023-05-11T08:00:38 Z | Nonoze | Catfish Farm (IOI22_fish) | C++17 | 90 ms | 13912 KB |
#include "fish.h" #include <bits/stdc++.h> using namespace std; long long max_weights(int n, int m, vector<int> X, vector<int> Y, vector<int> W) { #define int long long bool tacha=true, tachb=true, tachc=true; for (int i = 0; i < m; ++i) { if (X[i]%2) tacha=false; if (X[i]>1) tachb=false; if (Y[i]) tachc=false; } if (tacha) { int ans=0; for (int i = 0; i < m; ++i) ans+=W[i]; return ans; } if (tachb) { int sommegauche=0, sommedroite=0; for (int i = 0; i < m; ++i) { if (X[i]==0) sommegauche+=W[i]; else sommedroite+=W[i]; } return max(sommegauche, sommedroite); } #undef int return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 22 ms | 2148 KB | Output is correct |
2 | Correct | 29 ms | 4268 KB | Output is correct |
3 | Correct | 1 ms | 304 KB | Output is correct |
4 | Correct | 1 ms | 212 KB | Output is correct |
5 | Correct | 86 ms | 13664 KB | Output is correct |
6 | Correct | 90 ms | 13912 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 | 22 ms | 2148 KB | Output is correct |
2 | Correct | 29 ms | 4268 KB | Output is correct |
3 | Correct | 1 ms | 304 KB | Output is correct |
4 | Correct | 1 ms | 212 KB | Output is correct |
5 | Correct | 86 ms | 13664 KB | Output is correct |
6 | Correct | 90 ms | 13912 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 | - |