답안 #148448

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
148448 2019-09-01T04:25:23 Z CHT를 사랑하는 모임(#3587, moonrabbit2, Retro3014, gs18115) King of Chairs (FXCUP4_chairs) C++17
100 / 100
157 ms 10452 KB
#include"king.h"
#include<algorithm>
#define eb emplace_back
#define fi first
#define se second
#define all(x) (x).begin(),(x).end()
using namespace std;
typedef long long ll;
typedef pair<int,int>pi;
typedef pair<ll,ll>pl;
const ll inf=1e18;

long long SendInfo(vector<int>W,vector<int>C)
{
	return 0;
}
#include"vassal.h"
#include<set>
#include<algorithm>
#define eb emplace_back
#define fi first
#define se second
#define all(x) (x).begin(),(x).end()
using namespace std;
typedef long long ll;
typedef pair<int,int>pi;
typedef pair<ll,ll>pl;
const ll inf=1e18;
set<pi>S;
void Init(long long B,vector<int>C)
{
	for(int i=0;i<C.size();i++)
		S.emplace(C[i],i);
	return;
}
int Maid(int W)
{
	set<pi>::iterator it=S.lower_bound(pi(W,-inf));
	if(it==S.end())
		return-1;
	int t=it->se;
	S.erase(it);
	return t;
}

Compilation message

vassal.cpp: In function 'void Init(long long int, std::vector<int>)':
vassal.cpp:16: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 1060 KB Correct
2 Correct 10 ms 1056 KB Correct
3 Correct 10 ms 808 KB Correct
4 Correct 10 ms 1060 KB Correct
5 Correct 10 ms 1052 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 64 ms 5936 KB Correct
2 Correct 106 ms 9640 KB Correct
3 Correct 119 ms 10452 KB Correct
4 Correct 117 ms 10452 KB Correct
5 Correct 115 ms 10452 KB Correct
6 Correct 114 ms 10452 KB Correct
7 Correct 115 ms 10452 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 76 ms 5876 KB Correct
2 Correct 139 ms 9644 KB Correct
3 Correct 129 ms 10448 KB Correct
4 Correct 157 ms 10452 KB Correct
5 Correct 150 ms 10452 KB Correct
6 Correct 151 ms 10444 KB Correct
7 Correct 130 ms 10448 KB Correct
8 Correct 123 ms 10452 KB Correct