Submission #148969

# Submission time Handle Problem Language Result Execution time Memory
148969 2019-09-01T05:28:59 Z ummm(#3574, cerberus, aayush9, knandy) King of Chairs (FXCUP4_chairs) C++17
100 / 100
163 ms 10452 KB
#include "king.h"

long long SendInfo(std::vector<int> W, std::vector<int> C) {
	// int N = W.size();
	// return W[0]*100 + W[1]*10 + W[2]*1;
	return 0;
}
/* cerberus97 - Hanit Banga */

#include <iostream>
#include <iomanip>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <vector>
#include <algorithm>
#include "vassal.h"

using namespace std;

#define pb push_back
#define fast_cin() ios_base::sync_with_stdio(false); cin.tie(NULL)

typedef long long ll;
typedef long double ld;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;

const int N = 1e5 + 10;

ll BB;
set<pii> available;
void Init(ll B, std::vector<int> C) {
	int N = C.size();
	BB = B;
	for (int i = 0; i < N; ++i) {
		available.insert({C[i], i});
	}
	// ToDo
}

int Maid(int W) {
	auto it = available.lower_bound({W, -1});
	if (it != available.end()) {
		int ans = it->second;
		available.erase(it);
		return ans;
	} else {
		return -1;
	}
}
# Verdict Execution time Memory Grader output
1 Correct 10 ms 1052 KB Correct
2 Correct 10 ms 1060 KB Correct
3 Correct 10 ms 964 KB Correct
4 Correct 10 ms 544 KB Correct
5 Correct 10 ms 1060 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 68 ms 5952 KB Correct
2 Correct 111 ms 9648 KB Correct
3 Correct 117 ms 10452 KB Correct
4 Correct 118 ms 10448 KB Correct
5 Correct 125 ms 10192 KB Correct
6 Correct 113 ms 10176 KB Correct
7 Correct 119 ms 10192 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 76 ms 5948 KB Correct
2 Correct 154 ms 9580 KB Correct
3 Correct 147 ms 10444 KB Correct
4 Correct 157 ms 10440 KB Correct
5 Correct 156 ms 10452 KB Correct
6 Correct 163 ms 10452 KB Correct
7 Correct 136 ms 10444 KB Correct
8 Correct 131 ms 10436 KB Correct