Submission #630856

# Submission time Handle Problem Language Result Execution time Memory
630856 2022-08-17T09:07:29 Z oliversommer Catfish Farm (IOI22_fish) C++17
0 / 100
21 ms 2128 KB
#include "fish.h"

#include <algorithm>
#include <assert.h>
#include <numeric>
#include <vector>

using namespace std;

long long max_weights(int N, int M, vector<int> X, vector<int> Y, vector<int> W) {
	int sum0 = 0, sum1 = 0;
	for(int i = 0; i < M; ++i) {
		assert(X[i] == 0 || X[i] == 1);
		if(X[i] == 0) {
			sum0 += W[i];
		} else {
			sum1 += W[i];
		}
	}
	return max(sum0, sum1);
}
# Verdict Execution time Memory Grader output
1 Incorrect 21 ms 2128 KB 1st lines differ - on the 1st token, expected: '40313272768926', found: '709728670'
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: '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 Runtime error 1 ms 340 KB Execution killed with signal 6
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 340 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 340 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 340 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Runtime error 1 ms 340 KB Execution killed with signal 6
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 21 ms 2128 KB 1st lines differ - on the 1st token, expected: '40313272768926', found: '709728670'
2 Halted 0 ms 0 KB -