Submission #148881

# Submission time Handle Problem Language Result Execution time Memory
148881 2019-09-01T05:18:32 Z mit한의대지망생(#3602, TAMREF, imeimi2000, suzy) King of Chairs (FXCUP4_chairs) C++17
100 / 100
158 ms 10456 KB
#include "king.h"
#include <vector>

using namespace std;
typedef long long llong;

llong SendInfo(vector<int> W, vector<int> C) {
    return 0;
}
#include "vassal.h"
#include <vector>
#include <set>
#include <tuple>
#define fs first
#define se second

using namespace std;
typedef long long llong;
typedef pair<int, int> pii;

multiset<pii> sp;
void Init(llong B, vector<int> C) {
	for (int i = 0; i < C.size(); ++i) {
		sp.emplace(C[i], i);
	}
}

int Maid(int w) {
	auto it = sp.lower_bound(pii(w, 0));
	if (it == sp.end()) return -1;
	int ret = it->se;
	sp.erase(it);
	return ret;
}

Compilation message

vassal.cpp: In function 'void Init(llong, std::vector<int>)':
vassal.cpp:14:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 0; i < C.size(); ++i) {
                  ~~^~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 10 ms 1060 KB Correct
2 Correct 10 ms 1056 KB Correct
3 Correct 10 ms 1060 KB Correct
4 Correct 10 ms 1052 KB Correct
5 Correct 10 ms 1056 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 60 ms 5696 KB Correct
2 Correct 108 ms 9644 KB Correct
3 Correct 117 ms 10456 KB Correct
4 Correct 114 ms 10192 KB Correct
5 Correct 114 ms 10448 KB Correct
6 Correct 113 ms 10300 KB Correct
7 Correct 112 ms 9940 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 81 ms 5940 KB Correct
2 Correct 143 ms 9644 KB Correct
3 Correct 135 ms 10448 KB Correct
4 Correct 150 ms 10452 KB Correct
5 Correct 158 ms 10448 KB Correct
6 Correct 155 ms 10452 KB Correct
7 Correct 129 ms 10444 KB Correct
8 Correct 123 ms 10452 KB Correct