Submission #151181

#TimeUsernameProblemLanguageResultExecution timeMemory
151181dongwon0427King of Chairs (FXCUP4_chairs)C++17
100 / 100
172 ms10440 KiB
#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 (stderr)

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++) {
                 ~^~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...