Submission #231629

# Submission time Handle Problem Language Result Execution time Memory
231629 2020-05-14T08:13:10 Z palpatinezw King of Chairs (FXCUP4_chairs) C++17
100 / 100
139 ms 12996 KB
#include <bits/stdc++.h>
#include "king.h"
using namespace std;

long long SendInfo(std::vector<int> W, std::vector<int> C) {
	return 0;
}

#include <bits/stdc++.h>
#include "vassal.h"
using namespace std;
typedef pair<int, int> pi;
#define f first
#define s second

multiset<pi> c;

void Init(long long B, std::vector<int> C){
	int i = 0;
	for (auto it:C) {
		c.insert(pi(it, i));
		i++;
	}
	
}

int Maid(int W){
	auto it = c.lower_bound(pi(W, -1));
	if (it==c.end()) {
		return -1;
	}
	int ans = (*it).s;
	c.erase(it);
	return ans;
}
# Verdict Execution time Memory Grader output
1 Correct 9 ms 884 KB Correct
2 Correct 8 ms 788 KB Correct
3 Correct 8 ms 784 KB Correct
4 Correct 8 ms 784 KB Correct
5 Correct 10 ms 1136 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 57 ms 6904 KB Correct
2 Correct 100 ms 12020 KB Correct
3 Correct 106 ms 12984 KB Correct
4 Correct 108 ms 12920 KB Correct
5 Correct 110 ms 12996 KB Correct
6 Correct 104 ms 12988 KB Correct
7 Correct 107 ms 12984 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 71 ms 7148 KB Correct
2 Correct 128 ms 12052 KB Correct
3 Correct 118 ms 12960 KB Correct
4 Correct 137 ms 12964 KB Correct
5 Correct 139 ms 12832 KB Correct
6 Correct 137 ms 12980 KB Correct
7 Correct 121 ms 12984 KB Correct
8 Correct 114 ms 12860 KB Correct