Submission #148633

#TimeUsernameProblemLanguageResultExecution timeMemory
148633욱방켜!! (twitch.tv/wookje) (#200)King of Chairs (FXCUP4_chairs)C++17
55 / 100
185 ms15220 KiB
#include "king.h" #include <bits/stdc++.h> long long SendInfo(std::vector<int> W, std::vector<int> C) { int N = W.size(); std::multiset<int> CC(C.begin(),C.end()); std::sort(W.begin(),W.end()); for(int i=0;i<N;i++) { auto it=CC.lower_bound(W[i]); if(it==CC.end()) return W[i]-1; CC.erase(it); } return W[N-1]; }
#include "vassal.h" #include <bits/stdc++.h> long long BB; std::set<std::pair<int,int>> S; void Init(long long B, std::vector<int> C){ int N = C.size(); BB = B; for(int i=0;i<N;i++) S.insert({C[i],i}); } int Maid(int W){ int ret; auto it=S.lower_bound(std::make_pair(W,-1)); if(W>BB || it==S.end()) return -1; ret=it->second; S.erase(it); return ret; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...