답안 #149434

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
149434 2019-09-01T06:28:38 Z JeffreyHo(#3776, JeffreyHo) King of Chairs (FXCUP4_chairs) C++17
100 / 100
176 ms 10456 KB
#include "king.h"

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

std::multiset<pair<int, int>> a;

long long BB;
void Init(long long B, std::vector<int> c){
	int n = (int)c.size();
    for (int i = 0; i < n; i++) a.insert({c[i], i});
    a.insert({1000000007, -1});
    BB = B;
}

int Maid(int x) {
    pair<int, int> y = *a.lower_bound({x, 0});
    if (y.first == 1000000007) return -1;
    a.erase(a.find(y));
	return y.second;
}

Compilation message

king.cpp: In function 'long long int SendInfo(std::vector<int>, std::vector<int>)':
king.cpp:4:6: warning: unused variable 'n' [-Wunused-variable]
  int n = (int)W.size();
      ^
# 결과 실행 시간 메모리 Grader output
1 Correct 11 ms 1048 KB Correct
2 Correct 10 ms 1056 KB Correct
3 Correct 11 ms 1056 KB Correct
4 Correct 11 ms 1060 KB Correct
5 Correct 10 ms 1056 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 68 ms 5948 KB Correct
2 Correct 113 ms 9640 KB Correct
3 Correct 118 ms 10364 KB Correct
4 Correct 114 ms 10452 KB Correct
5 Correct 120 ms 10456 KB Correct
6 Correct 121 ms 10444 KB Correct
7 Correct 118 ms 10448 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 87 ms 5640 KB Correct
2 Correct 147 ms 9384 KB Correct
3 Correct 137 ms 10448 KB Correct
4 Correct 167 ms 10448 KB Correct
5 Correct 176 ms 10444 KB Correct
6 Correct 170 ms 10448 KB Correct
7 Correct 144 ms 10452 KB Correct
8 Correct 121 ms 10452 KB Correct