답안 #149406

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
149406 2019-09-01T06:25:08 Z 본인 방금 올솔하는 상상함(#3610, gs18113, dennisstar, red1108) King of Chairs (FXCUP4_chairs) C++17
100 / 100
172 ms 10452 KB
#include "king.h"

long long SendInfo(std::vector<int> W, std::vector<int> C) {
	return 0;
}
#include "vassal.h"
#include <bits/stdc++.h>
using namespace std;
set<pair<int,int>> se;\
void Init(long long B, vector<int> C){
	for(int i=0;i<C.size();i++){
		se.insert(make_pair(C[i],i));
	}
}

int Maid(int W){
	auto it = se.lower_bound(make_pair(W,0));
	if (it==se.end()) return -1;
	int ret = it->second;
	if((it->first)<W) return -1;
	se.erase(it);
	return ret;
}

Compilation message

vassal.cpp: In function 'void Init(long long int, std::vector<int>)':
vassal.cpp:6:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=0;i<C.size();i++){
              ~^~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 10 ms 1044 KB Correct
2 Correct 10 ms 1064 KB Correct
3 Correct 10 ms 544 KB Correct
4 Correct 10 ms 1056 KB Correct
5 Correct 10 ms 972 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 67 ms 5952 KB Correct
2 Correct 117 ms 9644 KB Correct
3 Correct 119 ms 10444 KB Correct
4 Correct 123 ms 10440 KB Correct
5 Correct 122 ms 10444 KB Correct
6 Correct 118 ms 10292 KB Correct
7 Correct 120 ms 10444 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 81 ms 5948 KB Correct
2 Correct 149 ms 9576 KB Correct
3 Correct 148 ms 10408 KB Correct
4 Correct 154 ms 10448 KB Correct
5 Correct 155 ms 10448 KB Correct
6 Correct 172 ms 10448 KB Correct
7 Correct 141 ms 10364 KB Correct
8 Correct 125 ms 10452 KB Correct