답안 #151149

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
151149 2019-09-01T21:39:58 Z kuroni King of Chairs (FXCUP4_chairs) C++17
100 / 100
148 ms 10572 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;

set<pair<int, int>> se;

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

int Maid(int W)
{
	auto it = se.lower_bound({W, -1});
	if (it == se.end())
		return -1;
	else
	{
		int u = it->second;
		se.erase(it);
		return u;
	}
}

Compilation message

vassal.cpp: In function 'void Init(long long int, std::vector<int>)':
vassal.cpp:9:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 0; i < C.size(); i++)
                  ~~^~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 760 KB Correct
2 Correct 4 ms 1012 KB Correct
3 Correct 4 ms 760 KB Correct
4 Correct 4 ms 876 KB Correct
5 Correct 4 ms 760 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 54 ms 5556 KB Correct
2 Correct 98 ms 9584 KB Correct
3 Correct 108 ms 10572 KB Correct
4 Correct 108 ms 10528 KB Correct
5 Correct 107 ms 10524 KB Correct
6 Correct 107 ms 10456 KB Correct
7 Correct 108 ms 10572 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 72 ms 5624 KB Correct
2 Correct 133 ms 9392 KB Correct
3 Correct 126 ms 10176 KB Correct
4 Correct 143 ms 10060 KB Correct
5 Correct 148 ms 10144 KB Correct
6 Correct 143 ms 10176 KB Correct
7 Correct 126 ms 10180 KB Correct
8 Correct 122 ms 10152 KB Correct