Submission #149853

#TimeUsernameProblemLanguageResultExecution timeMemory
149853GucciBelt (#200)King of Chairs (FXCUP4_chairs)C++17
100 / 100
160 ms10444 KiB
#include "king.h" #include <bits/stdc++.h> #define long long long using namespace std; long SendInfo(vector<int> W, vector<int> C) { return 0; }
#include "vassal.h" #include <bits/stdc++.h> #define long long long #define pii pair<int, int> #define x first #define y second using namespace std; set<pii> S; void Init(long B, vector<int> C){ for(int i = 0; i < C.size(); i++) S.emplace(C[i], i); } int Maid(int W){ auto it = S.lower_bound(pii(W, -1)); if(it == S.end()) return -1; else { int ret = it->y; S.erase(it); return ret; } }

Compilation message (stderr)

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