Submission #149022

#TimeUsernameProblemLanguageResultExecution timeMemory
149022코딩은 체육과목입니다 (#200)King of Chairs (FXCUP4_chairs)C++17
100 / 100
165 ms10452 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> using namespace std; long long BB; multiset<pair<int,int>> CC; void Init(long long B, std::vector<int> C){ int N = C.size(); BB = B; // ToDo for (int i=0;i<C.size();i++){ CC.emplace(C[i], i); } } int Maid(int W){ auto it = CC.lower_bound(pair<int,int>(W, 0)); if (it == CC.end())return -1; int ans = (*it).second; CC.erase(it); return ans; }

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();
      ^

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