Submission #149044

# Submission time Handle Problem Language Result Execution time Memory
149044 2019-09-01T05:38:12 Z お前はもう死んでいる(#3784, kuroni, nvmdava, tfg) Crosses on the Grid (FXCUP4_cross) C++17
0 / 100
6 ms 384 KB
#include "cross.h"
#include <bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
vector<pair<int, int> > cr;

long long res = 0;

priority_queue<long long> pq;

long long SelectCross(int K, std::vector<int> I, std::vector<int> O) {
	int n = I.size();
	for(int i = 0; i < n; i++)
		cr.push_back({I[i], O[i]});
	sort(cr.rbegin(), cr.rend());

	for(int i = 0; i < n; i++){
		pq.push(-cr[i].ss);
		if(i >= K) pq.pop();
		if(i >= K - 1){
			res = max(res, -pq.top() * cr[i].ff);
		}
	}

	return res;
}
# Verdict Execution time Memory Grader output
1 Incorrect 6 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 6 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 6 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -