답안 #150119

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
150119 2019-09-01T07:45:30 Z HSNU(#3687, joylintp, 147, wiwiho) King of Chairs (FXCUP4_chairs) C++17
0 / 100
41 ms 3008 KB
#include "king.h"

#include <bits/stdc++.h>

#define StarBurstStream ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define iter(a) a.begin(), a.end()
#define riter(a) a.rbegin(), a.rend()
#define lsort(a) sort(iter(a))
#define gsort(a) sort(riter(a))
#define mp(a, b) make_pair(a, b)
#define pb(a) push_back(a)
#define pf(a) push_front(a)
#define pob pop_back()
#define pof pop_front()
#define F first
#define S second
#define printv(a, b) {bool pvaspace=false; \
for(auto pva : a){ \
    if(pvaspace) b << " "; pvaspace=true;\
    b << pva;\
}\
b << "\n";}
#define pii pair<int, int>
#define pll pair<ll, ll>
#define modadd(a, b) (((a % MOD) + (b % MOD)) % MOD)
#define modtimes(a, b) (((a % MOD) * (b % MOD)) % MOD)

//#define TEST

typedef long long ll;
typedef unsigned long long ull;

using namespace std;

const ll MOD = 1000000007;
const ll MAX = 2147483647;

long long SendInfo(std::vector<int> W, std::vector<int> C) {
	lsort(W);
	lsort(C);

	int wp = 0, cp = 0;
	int ans = 0;
	int n = W.size();
	while(wp < n && cp < n){
		if(W[wp] < C[cp]){
			ans++;
			wp++;
		}
		cp++;
	}

	return ans - 1000000000;
}
#include "vassal.h"

#include <bits/stdc++.h>

#define StarBurstStream ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define iter(a) a.begin(), a.end()
#define riter(a) a.rbegin(), a.rend()
#define lsort(a) sort(iter(a))
#define gsort(a) sort(riter(a))
#define mp(a, b) make_pair(a, b)
#define pb(a) push_back(a)
#define pf(a) push_front(a)
#define pob pop_back()
#define pof pop_front()
#define F first
#define S second
#define printv(a, b) {bool pvaspace=false; \
for(auto pva : a){ \
    if(pvaspace) b << " "; pvaspace=true;\
    b << pva;\
}\
b << "\n";}
#define pii pair<int, int>
#define pll pair<ll, ll>
#define modadd(a, b) (((a % MOD) + (b % MOD)) % MOD)
#define modtimes(a, b) (((a % MOD) * (b % MOD)) % MOD)

//#define TEST

typedef long long ll;
typedef unsigned long long ull;

using namespace std;

const ll MOD = 1000000007;
const ll MAX = 2147483647;

long long BB;
std::vector<int> c;
int n;
vector<bool> b;
void Init(long long B, std::vector<int> C){
	BB = B + 1000000000;
	c = C;
	n = c.size();
	b.resize(n);
}

int Maid(int W){
	int s = upper_bound(iter(c), W) - c.begin();
	for(; s < n; s++){
		if(b[s]) continue;
		b[s] = true;
		return s;
	}
	return -1;
}
# 결과 실행 시간 메모리 Grader output
1 Runtime error 11 ms 1040 KB Execution failed because the return code was nonzero
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 38 ms 3008 KB Execution failed because the return code was nonzero
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 41 ms 3008 KB Execution failed because the return code was nonzero
2 Halted 0 ms 0 KB -