답안 #230672

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
230672 2020-05-11T02:45:53 Z jiahng King of Chairs (FXCUP4_chairs) C++17
100 / 100
159 ms 14788 KB
#include "king.h"

#include <bits/stdc++.h>
using namespace std;

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

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef pair<ll,ll> pi;
typedef vector <ll> vi;
typedef vector <pi> vpi;
#define f first
#define s second
#define FOR(i,s,e) for(ll i=s;i<=ll(e);++i)
#define DEC(i,s,e) for(ll i=s;i>=ll(e);--i)
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define lbd(x, y) lower_bound(all(x), y)
#define ubd(x, y) upper_bound(all(x), y)
#define aFOR(i,x) for (auto i: x)
#define mem(x,i) memset(x,i,sizeof x)
#define fast ios_base::sync_with_stdio(false),cin.tie(0)

long long BB;
multiset <pi> S;
int n;
void Init(long long B, std::vector<int> C){
	n = C.size();
	FOR(i,0,n-1){
		S.insert(pi(C[i],i));
	}
}

int Maid(int W){
	auto it = S.lower_bound(pi(W,1e9));
	if (it != S.end()){
		int ans = it->s;
		S.erase(it);
		return ans;
	}else return -1;	
}
# 결과 실행 시간 메모리 Grader output
1 Correct 9 ms 776 KB Correct
2 Correct 9 ms 780 KB Correct
3 Correct 9 ms 888 KB Correct
4 Correct 8 ms 1020 KB Correct
5 Correct 9 ms 788 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 61 ms 7888 KB Correct
2 Correct 112 ms 13264 KB Correct
3 Correct 111 ms 14732 KB Correct
4 Correct 111 ms 14372 KB Correct
5 Correct 112 ms 14544 KB Correct
6 Correct 112 ms 14788 KB Correct
7 Correct 108 ms 14532 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 77 ms 7984 KB Correct
2 Correct 143 ms 13340 KB Correct
3 Correct 138 ms 14408 KB Correct
4 Correct 148 ms 14620 KB Correct
5 Correct 154 ms 14652 KB Correct
6 Correct 159 ms 14528 KB Correct
7 Correct 128 ms 14524 KB Correct
8 Correct 120 ms 14504 KB Correct