답안 #149097

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
149097 2019-09-01T05:44:22 Z Seishun Buta Yarou wa Yumemiru Shoujo no Yume wo Minai(#3781, zscoder, tmwilliamlin168) King of Chairs (FXCUP4_chairs) C++17
100 / 100
201 ms 16204 KB
#include "king.h"
#include <bits/stdc++.h>
using namespace std;

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

map<int, vector<int>> mp;
void Init(long long b, vector<int> c) {
	for(int i=0; i<c.size(); ++i)
		mp[c[i]].push_back(i);
}

int Maid(int w) {
	auto it=mp.lower_bound(w);
	if(it==mp.end())
		return -1;
	int a=it->second.back();
	it->second.pop_back();
	if(it->second.empty())
		mp.erase(it);
	return a;
}

Compilation message

vassal.cpp: In function 'void Init(long long int, std::vector<int>)':
vassal.cpp:7:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=0; i<c.size(); ++i)
               ~^~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 10 ms 1032 KB Correct
2 Correct 10 ms 1048 KB Correct
3 Correct 10 ms 788 KB Correct
4 Correct 10 ms 1048 KB Correct
5 Correct 22 ms 1044 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 68 ms 9020 KB Correct
2 Correct 119 ms 14984 KB Correct
3 Correct 133 ms 16072 KB Correct
4 Correct 123 ms 16204 KB Correct
5 Correct 123 ms 16204 KB Correct
6 Correct 126 ms 16196 KB Correct
7 Correct 123 ms 15944 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 83 ms 9000 KB Correct
2 Correct 180 ms 14988 KB Correct
3 Correct 159 ms 16068 KB Correct
4 Correct 188 ms 16196 KB Correct
5 Correct 201 ms 16188 KB Correct
6 Correct 184 ms 16188 KB Correct
7 Correct 157 ms 15936 KB Correct
8 Correct 126 ms 14916 KB Correct