Submission #149390

# Submission time Handle Problem Language Result Execution time Memory
149390 2019-09-01T06:22:54 Z Cafe Maru(#3599, bryan, pps789, kazel) King of Chairs (FXCUP4_chairs) C++17
100 / 100
154 ms 10456 KB
#include "king.h"

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

set<pair<int,int>> S;

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


int Maid(int W){
    auto ret = S.lower_bound({W,0});
    if (ret == S.end()) return -1;
    int ans = ret->second;
    S.erase(ret);
	return ans;
}

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 = W.size();
      ^
# Verdict Execution time Memory Grader output
1 Correct 10 ms 792 KB Correct
2 Correct 11 ms 1056 KB Correct
3 Correct 11 ms 1048 KB Correct
4 Correct 10 ms 1052 KB Correct
5 Correct 10 ms 1052 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 61 ms 5948 KB Correct
2 Correct 108 ms 9640 KB Correct
3 Correct 115 ms 10436 KB Correct
4 Correct 114 ms 10440 KB Correct
5 Correct 115 ms 10328 KB Correct
6 Correct 114 ms 10456 KB Correct
7 Correct 112 ms 10456 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 75 ms 5948 KB Correct
2 Correct 137 ms 9644 KB Correct
3 Correct 127 ms 10456 KB Correct
4 Correct 151 ms 10444 KB Correct
5 Correct 149 ms 10444 KB Correct
6 Correct 154 ms 10452 KB Correct
7 Correct 135 ms 10440 KB Correct
8 Correct 123 ms 10448 KB Correct