Submission #150169

#TimeUsernameProblemLanguageResultExecution timeMemory
150169Ian and 2-bit memory (#200)King of Chairs (FXCUP4_chairs)C++17
87 / 100
165 ms10440 KiB
#include "king.h" #include <bits/stdc++.h> using namespace std; long long SendInfo(std::vector<int> W, std::vector<int> C) { int N = W.size(); return W[0]*100 + W[1]*10 + W[2]*1; }
#include "vassal.h" #include <bits/stdc++.h> using namespace std; long long BB; typedef pair<int, int> P; #define ft first #define sd second set<P> s; void Init(long long B, std::vector<int> C){ int N = C.size(); BB = B; s.clear(); for (int i = 0; i < N; i++) { s.insert(P(C[i], i)); } } int Maid(int W){ auto ite = s.lower_bound(P(W, -1)); if (ite == s.end()) return -1; int res = ite->sd; s.erase(ite); return res; }

Compilation message (stderr)

king.cpp: In function 'long long int SendInfo(std::vector<int>, std::vector<int>)':
king.cpp:6: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...