Submission #148151

# Submission time Handle Problem Language Result Execution time Memory
148151 2019-08-31T15:05:39 Z 조팍시\n123(#3740, tlwpdus, ainta, cki86201) King of Chairs (FXCUP4_chairs) C++17
100 / 100
179 ms 13724 KB
#include "king.h"

long long SendInfo(std::vector<int> W, std::vector<int> C) {
	return 0ll;
}
#include "vassal.h"
#include<algorithm>
#include<set>
using namespace std;
set<int>Set;

long long BB, w[101000];
int n;
void Init(long long B, std::vector<int> C){
	BB = B;
	n = C.size();
	int i;
	for (i = 1; i <= n; i++) {
		w[i] = C[i - 1];
		Set.insert(i);
	}

}

int Maid(int W){
	int pv = lower_bound(w + 1, w + n + 1, W) - w;
	auto it = Set.lower_bound(pv);
	if (it == Set.end())return -1;
	int t = *it;
	Set.erase(it);
	return t - 1;
}
# Verdict Execution time Memory Grader output
1 Correct 5 ms 888 KB Correct
2 Correct 4 ms 636 KB Correct
3 Correct 4 ms 892 KB Correct
4 Correct 4 ms 1012 KB Correct
5 Correct 4 ms 772 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 57 ms 5944 KB Correct
2 Correct 105 ms 12492 KB Correct
3 Correct 112 ms 13724 KB Correct
4 Correct 115 ms 13640 KB Correct
5 Correct 118 ms 13636 KB Correct
6 Correct 113 ms 13612 KB Correct
7 Correct 112 ms 13620 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 83 ms 7196 KB Correct
2 Correct 159 ms 12676 KB Correct
3 Correct 149 ms 13712 KB Correct
4 Correct 176 ms 13580 KB Correct
5 Correct 170 ms 13712 KB Correct
6 Correct 179 ms 13524 KB Correct
7 Correct 149 ms 13576 KB Correct
8 Correct 124 ms 13672 KB Correct