답안 #866457

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
866457 2023-10-26T08:04:00 Z vjudge1 메기 농장 (IOI22_fish) C++17
3 / 100
111 ms 13292 KB
#include "fish.h"
#include<bits/stdc++.h>
using namespace std;
#define ll long long// !
#define sz(a) (int)a.size()
#define all(a) a.begin(),a.end()
#define F first
#define S second


ll max_weights(int n, int m, vector<int> X, std::vector<int> Y, vector<int> W) {
	vector<pair<int, int>> pos[2];
	for (int i = 0; i < m; i++){
		pos[X[i]%2].push_back({Y[i], W[i]});
	}
	sort(all(pos[0]));
	sort(all(pos[1]));
	ll cnt0 = 0;
	for (auto [y, w] : pos[0]) cnt0 += w;
	ll cnt1 = 0;
	for (auto [y, w] : pos[1]) cnt1 += w;
	ll ans = max(cnt0, cnt1);
	
	return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 23 ms 3284 KB Output is correct
2 Correct 30 ms 3796 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 110 ms 13292 KB Output is correct
6 Correct 111 ms 12760 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB 1st lines differ - on the 1st token, expected: '2', found: '1'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Incorrect 16 ms 2412 KB 1st lines differ - on the 1st token, expected: '21261825233649', found: '13412238152019'
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB 1st lines differ - on the 1st token, expected: '3', found: '2'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB 1st lines differ - on the 1st token, expected: '3', found: '2'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB 1st lines differ - on the 1st token, expected: '3', found: '2'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Incorrect 16 ms 2412 KB 1st lines differ - on the 1st token, expected: '21261825233649', found: '13412238152019'
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 23 ms 3284 KB Output is correct
2 Correct 30 ms 3796 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 110 ms 13292 KB Output is correct
6 Correct 111 ms 12760 KB Output is correct
7 Incorrect 0 ms 348 KB 1st lines differ - on the 1st token, expected: '2', found: '1'
8 Halted 0 ms 0 KB -