Submission #149895

# Submission time Handle Problem Language Result Execution time Memory
149895 2019-09-01T07:21:45 Z 요까할 로뭘 은명팀(#3558, mario05092929, foja001, earthk) King of Chairs (FXCUP4_chairs) C++17
100 / 100
161 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;
vector <int> a;
multiset <pair <int,int> > s;
int n;

long long BB;
void Init(long long B, std::vector<int> C){
	BB = B;
	n = C.size();
	for(int i = 0;i < n;i++) s.insert({C[i],i});
	//for(auto i : s) printf("%d %d\n",i.first,i.second);
	// ToDo
}

int Maid(int w){
    auto it = s.lower_bound({w,-1});
    if(it == s.end()) return -1;
    pair <int,int> it2 = *it;
    //cout << it2.first << " " << it2.second << '\n';
    s.erase(it);
    return it2.second;
}
# Verdict Execution time Memory Grader output
1 Correct 10 ms 952 KB Correct
2 Correct 10 ms 1060 KB Correct
3 Correct 10 ms 1060 KB Correct
4 Correct 11 ms 972 KB Correct
5 Correct 10 ms 1056 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 66 ms 5960 KB Correct
2 Correct 124 ms 9388 KB Correct
3 Correct 120 ms 10448 KB Correct
4 Correct 122 ms 10196 KB Correct
5 Correct 120 ms 10196 KB Correct
6 Correct 118 ms 10440 KB Correct
7 Correct 115 ms 10452 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 78 ms 5952 KB Correct
2 Correct 145 ms 9636 KB Correct
3 Correct 133 ms 10448 KB Correct
4 Correct 161 ms 10452 KB Correct
5 Correct 144 ms 10448 KB Correct
6 Correct 159 ms 10392 KB Correct
7 Correct 137 ms 10452 KB Correct
8 Correct 124 ms 10320 KB Correct