Submission #148435

# Submission time Handle Problem Language Result Execution time Memory
148435 2019-09-01T04:23:17 Z USA1(#3634, ecnerwala, scott_wu, ksun48) King of Chairs (FXCUP4_chairs) C++17
100 / 100
160 ms 10456 KB
#include "king.h"

long long SendInfo(std::vector<int>, std::vector<int>) {
	return 0;
}
#include "vassal.h"
#include <bits/stdc++.h>
using namespace std;

using namespace std;

set<pair<int,int> > c;
void Init(long long B, std::vector<int> C){
	assert(B == 0);
	for(int i = 0; i < (int)C.size(); i++){
		c.insert({C[i], i});
	}
}

int Maid(int W){
	auto r = c.lower_bound({W, -1});
	if(r == c.end()) return -1;
	c.erase(r);
	return (*r).second;
}
# Verdict Execution time Memory Grader output
1 Correct 10 ms 1048 KB Correct
2 Correct 11 ms 1052 KB Correct
3 Correct 10 ms 804 KB Correct
4 Correct 11 ms 1052 KB Correct
5 Correct 10 ms 548 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 62 ms 5436 KB Correct
2 Correct 107 ms 9636 KB Correct
3 Correct 115 ms 10452 KB Correct
4 Correct 114 ms 10440 KB Correct
5 Correct 123 ms 10444 KB Correct
6 Correct 115 ms 10448 KB Correct
7 Correct 129 ms 10192 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 76 ms 5436 KB Correct
2 Correct 142 ms 9636 KB Correct
3 Correct 147 ms 10444 KB Correct
4 Correct 160 ms 10448 KB Correct
5 Correct 154 ms 10444 KB Correct
6 Correct 158 ms 10376 KB Correct
7 Correct 138 ms 10448 KB Correct
8 Correct 121 ms 10456 KB Correct