Submission #148641

# Submission time Handle Problem Language Result Execution time Memory
148641 2019-09-01T04:50:37 Z koosaga fan club(#3590, xiaowuc1) King of Chairs (FXCUP4_chairs) C++17
100 / 100
160 ms 10460 KB
#include "king.h"

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

using namespace std;

typedef pair<int, int> pii;

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

int Maid(int W){
	auto it = s.upper_bound({W, -1});
	if(it == s.end()) return -1;
	int ret = it->second;
	s.erase(it);
	return ret;
}

Compilation message

vassal.cpp: In function 'void Init(long long int, std::vector<int>)':
vassal.cpp:11:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i = 0; i < C.size(); i++) {
                 ~~^~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 10 ms 1056 KB Correct
2 Correct 10 ms 1056 KB Correct
3 Correct 10 ms 1060 KB Correct
4 Correct 11 ms 1056 KB Correct
5 Correct 11 ms 1056 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 65 ms 5828 KB Correct
2 Correct 108 ms 9644 KB Correct
3 Correct 118 ms 10444 KB Correct
4 Correct 114 ms 10448 KB Correct
5 Correct 115 ms 10444 KB Correct
6 Correct 121 ms 10460 KB Correct
7 Correct 117 ms 10404 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 77 ms 5952 KB Correct
2 Correct 144 ms 9644 KB Correct
3 Correct 138 ms 10452 KB Correct
4 Correct 153 ms 10444 KB Correct
5 Correct 154 ms 10452 KB Correct
6 Correct 160 ms 10456 KB Correct
7 Correct 135 ms 10316 KB Correct
8 Correct 124 ms 10452 KB Correct