Submission #149307

# Submission time Handle Problem Language Result Execution time Memory
149307 2019-09-01T06:11:37 Z Showing Hands(#3746, hamzqq9, yusufake) King of Chairs (FXCUP4_chairs) C++17
100 / 100
154 ms 10468 KB
#include "king.h"

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

long long SendInfo(std::vector<int> W, std::vector<int> C) {
	return 0;
	int i,j,n = W.size();

    sort(W.begin() , W.end());
    
    for(i=j=0; i<n && j<n ;i++,j++){
        for(;j<n && C[j] < W[i] ; j++);
    }
        
    return i ? W[i-1] : 0;
}
#include "vassal.h"

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

multiset< pair<int,int> > S;
multiset< pair<int,int> > :: iterator it;

long long B;

void Init(long long BB, std::vector<int> C){
	int i, n = C.size();
	B = BB;
	for(i=0;i<n;i++)
	    S.insert(make_pair(C[i],i));
}

int Maid(int W){
    it = S.lower_bound(make_pair(W,0));
    if(it == S.end()) return -1;
    int i = it -> second;
    S.erase(it);
    return i;
}
# Verdict Execution time Memory Grader output
1 Correct 10 ms 1040 KB Correct
2 Correct 10 ms 1040 KB Correct
3 Correct 10 ms 1048 KB Correct
4 Correct 10 ms 532 KB Correct
5 Correct 11 ms 972 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 71 ms 6192 KB Correct
2 Correct 109 ms 9124 KB Correct
3 Correct 122 ms 10440 KB Correct
4 Correct 120 ms 10436 KB Correct
5 Correct 113 ms 10184 KB Correct
6 Correct 115 ms 9920 KB Correct
7 Correct 118 ms 10444 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 82 ms 5944 KB Correct
2 Correct 138 ms 9628 KB Correct
3 Correct 139 ms 9932 KB Correct
4 Correct 153 ms 10436 KB Correct
5 Correct 154 ms 10468 KB Correct
6 Correct 154 ms 10436 KB Correct
7 Correct 135 ms 10436 KB Correct
8 Correct 126 ms 10436 KB Correct