답안 #613258

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
613258 2022-07-30T04:12:08 Z ajpiano King of Chairs (FXCUP4_chairs) C++17
100 / 100
186 ms 10076 KB
#include "king.h"

using namespace std;

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

using namespace std;

set<pair<int,int>> chairs; //weight index

void Init(long long B, vector<int> c){
  int n = c.size();
  for(int i = 0; i < n; i++){
    chairs.insert({c[i],i});
  }
}

int Maid(int w){
  auto it = chairs.lower_bound({w,0});
  if(it == chairs.end()) return -1;
  else{
    int ans = it->second;
    chairs.erase(it);
    return ans;
  }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 512 KB Correct
2 Correct 2 ms 568 KB Correct
3 Correct 1 ms 528 KB Correct
4 Correct 2 ms 472 KB Correct
5 Correct 2 ms 544 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 61 ms 5272 KB Correct
2 Correct 80 ms 9040 KB Correct
3 Correct 104 ms 9916 KB Correct
4 Correct 112 ms 9800 KB Correct
5 Correct 115 ms 9720 KB Correct
6 Correct 93 ms 9784 KB Correct
7 Correct 130 ms 9944 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 75 ms 5308 KB Correct
2 Correct 119 ms 9100 KB Correct
3 Correct 133 ms 9992 KB Correct
4 Correct 186 ms 9976 KB Correct
5 Correct 138 ms 10076 KB Correct
6 Correct 144 ms 9908 KB Correct
7 Correct 117 ms 9796 KB Correct
8 Correct 111 ms 9788 KB Correct