Submission #149307

#TimeUsernameProblemLanguageResultExecution timeMemory
149307Showing Hands (#200)King of Chairs (FXCUP4_chairs)C++17
100 / 100
154 ms10468 KiB
#include "king.h" #include<bits/stdc++.h> using namespace std; long long SendInfo(std::vector<int> W, std::vector<int> C) { return 0; int i,j,n = W.size(); sort(W.begin() , W.end()); for(i=j=0; i<n && j<n ;i++,j++){ for(;j<n && C[j] < W[i] ; j++); } return i ? W[i-1] : 0; }
#include "vassal.h" #include<bits/stdc++.h> using namespace std; multiset< pair<int,int> > S; multiset< pair<int,int> > :: iterator it; long long B; void Init(long long BB, std::vector<int> C){ int i, n = C.size(); B = BB; for(i=0;i<n;i++) S.insert(make_pair(C[i],i)); } int Maid(int W){ it = S.lower_bound(make_pair(W,0)); if(it == S.end()) return -1; int i = it -> second; S.erase(it); return i; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...