답안 #151838

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
151838 2019-09-05T04:56:23 Z tmwilliamlin168 King of Chairs (FXCUP4_chairs) C++17
100 / 100
184 ms 18780 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 4 ms 640 KB Correct
2 Correct 4 ms 764 KB Correct
3 Correct 4 ms 772 KB Correct
4 Correct 4 ms 764 KB Correct
5 Correct 4 ms 768 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 59 ms 10096 KB Correct
2 Correct 106 ms 17072 KB Correct
3 Correct 115 ms 18440 KB Correct
4 Correct 114 ms 18532 KB Correct
5 Correct 115 ms 18780 KB Correct
6 Correct 116 ms 18532 KB Correct
7 Correct 115 ms 18308 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 84 ms 10120 KB Correct
2 Correct 158 ms 17156 KB Correct
3 Correct 142 ms 18320 KB Correct
4 Correct 184 ms 18572 KB Correct
5 Correct 175 ms 18700 KB Correct
6 Correct 181 ms 18704 KB Correct
7 Correct 148 ms 18488 KB Correct
8 Correct 122 ms 17340 KB Correct