답안 #151181

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
151181 2019-09-02T04:10:24 Z dongwon0427 King of Chairs (FXCUP4_chairs) C++17
100 / 100
172 ms 10440 KB
#include "king.h"
#include <bits/stdc++.h>
using namespace std;

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>> S;
void Init(long long B, std::vector<int> C2){
    for(int i=0;i<C2.size();i++) {
        S.insert(pair<int,int>(C2[i],i));
    }
}

int Maid(int W){
    set<pair<int,int>>::iterator it = S.lower_bound(pair<int,int>(W,-1));
    if(it == S.end()) {
        return -1;
    }
    S.erase(it);
    //cout<<W<<' '<<(*it).second<<'\n';
    return (*it).second;
}

Compilation message

vassal.cpp: In function 'void Init(long long int, std::vector<int>)':
vassal.cpp:6:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i=0;i<C2.size();i++) {
                 ~^~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 760 KB Correct
2 Correct 4 ms 868 KB Correct
3 Correct 4 ms 988 KB Correct
4 Correct 5 ms 780 KB Correct
5 Correct 4 ms 636 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 55 ms 5636 KB Correct
2 Correct 99 ms 9312 KB Correct
3 Correct 113 ms 10176 KB Correct
4 Correct 110 ms 10080 KB Correct
5 Correct 108 ms 10268 KB Correct
6 Correct 108 ms 10160 KB Correct
7 Correct 108 ms 10300 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 73 ms 5772 KB Correct
2 Correct 137 ms 9328 KB Correct
3 Correct 130 ms 10176 KB Correct
4 Correct 158 ms 10188 KB Correct
5 Correct 172 ms 10308 KB Correct
6 Correct 164 ms 10440 KB Correct
7 Correct 148 ms 10432 KB Correct
8 Correct 124 ms 10036 KB Correct