답안 #149386

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
149386 2019-09-01T06:22:37 Z dragoon(#3802, dragoon) King of Chairs (FXCUP4_chairs) C++17
100 / 100
189 ms 10460 KB
#include "king.h"

long long SendInfo(std::vector<int> W, std::vector<int> C) {
	return 0;
}
#include "vassal.h"
#include<vector>
#include<set>
#include<utility>
using namespace std;

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

int Maid(int W){
	set<pair<int, int>>::iterator iS = S.lower_bound({W, -1});
	if (iS == S.end()) return -1;
	int ret = iS->second;
	S.erase(iS);
	return ret;
}

Compilation message

vassal.cpp: In function 'void Init(long long int, std::vector<int>)':
vassal.cpp:9:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 0; i < C.size(); i++) {
                  ~~^~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 12 ms 1056 KB Correct
2 Correct 11 ms 1056 KB Correct
3 Correct 10 ms 1060 KB Correct
4 Correct 11 ms 1056 KB Correct
5 Correct 11 ms 1056 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 75 ms 5940 KB Correct
2 Correct 112 ms 9640 KB Correct
3 Correct 127 ms 10440 KB Correct
4 Correct 117 ms 10456 KB Correct
5 Correct 127 ms 10436 KB Correct
6 Correct 120 ms 10448 KB Correct
7 Correct 113 ms 10444 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 86 ms 5904 KB Correct
2 Correct 142 ms 9640 KB Correct
3 Correct 150 ms 10456 KB Correct
4 Correct 154 ms 10444 KB Correct
5 Correct 189 ms 10372 KB Correct
6 Correct 164 ms 10376 KB Correct
7 Correct 138 ms 10444 KB Correct
8 Correct 127 ms 10460 KB Correct