Submission #151149

#TimeUsernameProblemLanguageResultExecution timeMemory
151149kuroniKing of Chairs (FXCUP4_chairs)C++17
100 / 100
148 ms10572 KiB
#include "king.h" 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>> se; void Init(long long B, std::vector<int> C) { for (int i = 0; i < C.size(); i++) se.insert({C[i], i}); } int Maid(int W) { auto it = se.lower_bound({W, -1}); if (it == se.end()) return -1; else { int u = it->second; se.erase(it); return u; } }

Compilation message (stderr)

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