Submission #149535

#TimeUsernameProblemLanguageResultExecution timeMemory
149535distutpia (#200)King of Chairs (FXCUP4_chairs)C++17
100 / 100
174 ms10456 KiB
#include "king.h" long long SendInfo(std::vector<int> W, std::vector<int> C) { int N = W.size(); return 0; }
#include "vassal.h" #include<set> #include<algorithm> long long BB; int siz; std::multiset<std::pair<int, int> > a; void Init(long long B, std::vector<int> C){ int N = C.size(); siz=N; for(int i=0; i<N; i++){ a.insert(std::make_pair(C[i], i)); } // ToDo } int Maid(int W){ std::multiset<std::pair<int, int> >::iterator ite; ite=a.upper_bound(std::make_pair(W-1, siz)); if(ite==a.end()){ return -1; }else{ std::pair<int, int> now=*ite; a.erase(ite); return now.second; } }

Compilation message (stderr)

king.cpp: In function 'long long int SendInfo(std::vector<int>, std::vector<int>)':
king.cpp:4:6: warning: unused variable 'N' [-Wunused-variable]
  int N = W.size();
      ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...