답안 #148736

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
148736 2019-09-01T05:01:01 Z 서울대학교 연구공원 944동 삼성전자서울대연구소(#3600, ho94949, dotorya, zigui) King of Chairs (FXCUP4_chairs) C++17
100 / 100
180 ms 10456 KB
#include "king.h"

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

using namespace std;

typedef pair<int,int> pii;

long long BB;
set<pii> P;

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

int Maid(int W){
	auto it = P.lower_bound(pii(W, -1));
	if(it == P.end()) return -1;
	else{
		int ans = it->second;
		P.erase(it);
		return ans;
	}
}

Compilation message

vassal.cpp: In function 'void Init(long long int, std::vector<int>)':
vassal.cpp:12:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i = 0; i < C.size(); i++) P.insert(pii(C[i], i));
                 ~~^~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 10 ms 1036 KB Correct
2 Correct 10 ms 1056 KB Correct
3 Correct 11 ms 972 KB Correct
4 Correct 10 ms 1060 KB Correct
5 Correct 10 ms 1060 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 62 ms 5832 KB Correct
2 Correct 116 ms 9628 KB Correct
3 Correct 120 ms 10356 KB Correct
4 Correct 127 ms 10328 KB Correct
5 Correct 121 ms 10328 KB Correct
6 Correct 120 ms 10196 KB Correct
7 Correct 121 ms 10416 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 81 ms 5964 KB Correct
2 Correct 153 ms 9644 KB Correct
3 Correct 147 ms 10448 KB Correct
4 Correct 180 ms 10444 KB Correct
5 Correct 158 ms 10444 KB Correct
6 Correct 164 ms 10436 KB Correct
7 Correct 134 ms 10364 KB Correct
8 Correct 123 ms 10456 KB Correct