답안 #630859

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
630859 2022-08-17T09:10:31 Z oliversommer 메기 농장 (IOI22_fish) C++17
0 / 100
89 ms 14680 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) {
	long long 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);
}
# 결과 실행 시간 메모리 Grader output
1 Correct 24 ms 2136 KB Output is correct
2 Correct 34 ms 2612 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Runtime error 89 ms 14680 KB Execution killed with signal 6
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1 ms 340 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1 ms 340 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1 ms 340 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 Grader output
1 Correct 24 ms 2136 KB Output is correct
2 Correct 34 ms 2612 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Runtime error 89 ms 14680 KB Execution killed with signal 6
6 Halted 0 ms 0 KB -