Submission #148881

#TimeUsernameProblemLanguageResultExecution timeMemory
148881mit한의대지망생 (#200)King of Chairs (FXCUP4_chairs)C++17
100 / 100
158 ms10456 KiB
#include "king.h" #include <vector> using namespace std; typedef long long llong; llong SendInfo(vector<int> W, vector<int> C) { return 0; }
#include "vassal.h" #include <vector> #include <set> #include <tuple> #define fs first #define se second using namespace std; typedef long long llong; typedef pair<int, int> pii; multiset<pii> sp; void Init(llong B, vector<int> C) { for (int i = 0; i < C.size(); ++i) { sp.emplace(C[i], i); } } int Maid(int w) { auto it = sp.lower_bound(pii(w, 0)); if (it == sp.end()) return -1; int ret = it->se; sp.erase(it); return ret; }

Compilation message (stderr)

vassal.cpp: In function 'void Init(llong, std::vector<int>)':
vassal.cpp:14:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 0; i < C.size(); ++i) {
                  ~~^~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...