Submission #231037

# Submission time Handle Problem Language Result Execution time Memory
231037 2020-05-12T12:23:41 Z cstuart King of Chairs (FXCUP4_chairs) C++17
100 / 100
141 ms 13112 KB
#include <bits/stdc++.h>
using namespace std;
#include "king.h"
#include "vassal.h"

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

set < pair <int,int> > chair;

void Init (long long B, vector <int> C) {
	int N = C.size();
	for (int i = 0; i < N; i++) {
		chair.insert(make_pair(C[i], i));
	}
}

int Maid (int w) {
	auto it = chair.upper_bound(make_pair(w, -1));
	if (it == chair.end()) return -1;
	else {
		int x = it->second;
		chair.erase(it);
		return x;
	}
}
# Verdict Execution time Memory Grader output
1 Correct 10 ms 1012 KB Correct
2 Correct 8 ms 780 KB Correct
3 Correct 10 ms 784 KB Correct
4 Correct 9 ms 784 KB Correct
5 Correct 9 ms 784 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 59 ms 7076 KB Correct
2 Correct 100 ms 11888 KB Correct
3 Correct 109 ms 12984 KB Correct
4 Correct 109 ms 12872 KB Correct
5 Correct 108 ms 12832 KB Correct
6 Correct 110 ms 12980 KB Correct
7 Correct 109 ms 13112 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 71 ms 7148 KB Correct
2 Correct 127 ms 11928 KB Correct
3 Correct 128 ms 12980 KB Correct
4 Correct 141 ms 13000 KB Correct
5 Correct 137 ms 13000 KB Correct
6 Correct 137 ms 12988 KB Correct
7 Correct 121 ms 12980 KB Correct
8 Correct 115 ms 12992 KB Correct