Submission #151147

#TimeUsernameProblemLanguageResultExecution timeMemory
151147kuroniKing of Chairs (FXCUP4_chairs)C++17
49 / 100
179 ms10744 KiB
#include "king.h" long long SendInfo(std::vector<int> W, std::vector<int> C) { return 133769420; }
#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...