답안 #151502

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
151502 2019-09-03T12:23:56 Z leduykhongngu King of Chairs (FXCUP4_chairs) C++17
100 / 100
162 ms 12908 KB
#include <vector>
long long SendInfo(std::vector<int> W, std::vector<int> C)
{
    return 0;
}
#include <vector>
#include <set>
#include <utility>
std::set< std::pair< int, int > > myset;
void Init(long long B, std::vector<int> C)
{
    for (int i = 0; i < C.size(); ++i)
        myset.insert({C[i], i});
}
int Maid(int W)
{
    auto it = myset.lower_bound({W, -1});
    if (it == myset.end()) return -1;
    int res = (it->second);
    myset.erase(it);
    return res;
}

Compilation message

vassal.cpp: In function 'void Init(long long int, std::vector<int>)':
vassal.cpp:7:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int i = 0; i < C.size(); ++i)
                     ~~^~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 640 KB Correct
2 Correct 4 ms 892 KB Correct
3 Correct 4 ms 636 KB Correct
4 Correct 4 ms 772 KB Correct
5 Correct 4 ms 644 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 55 ms 6752 KB Correct
2 Correct 99 ms 11932 KB Correct
3 Correct 109 ms 12792 KB Correct
4 Correct 108 ms 12768 KB Correct
5 Correct 106 ms 12776 KB Correct
6 Correct 108 ms 12844 KB Correct
7 Correct 109 ms 12888 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 72 ms 7004 KB Correct
2 Correct 139 ms 12016 KB Correct
3 Correct 129 ms 12848 KB Correct
4 Correct 162 ms 12800 KB Correct
5 Correct 156 ms 12904 KB Correct
6 Correct 148 ms 12816 KB Correct
7 Correct 128 ms 12824 KB Correct
8 Correct 123 ms 12908 KB Correct