Submission #148802

#TimeUsernameProblemLanguageResultExecution timeMemory
148802graneli (#200)King of Chairs (FXCUP4_chairs)C++17
100 / 100
167 ms10460 KiB
#include "king.h" long long SendInfo(std::vector<int> W, std::vector<int> C) { return 0; }
#include "vassal.h" #include <bits/stdc++.h> #define F first #define S second #define mp make_pair #define pb push_back //#define ll __int128 #define ll long long #define LEFT(a) ((a)<<1) #define RIGHT(a) (LEFT(a) + 1) #define MID(a,b) ((a+b)>>1) #define MAX(a,b) ((a)>(b)?(a):(b)) #define MIN(a,b) ((a)<(b)?(a):(b)) #define y1 y122 using namespace std; const int N = 1000005; set < pair < int, int > > S; set < pair < int, int > >::iterator I; int n; void Init(long long B, std::vector<int> C){ int n = (int)C.size(); for (int i = 0; i < n; i++) S.insert ({C[i], i}); } int Maid(int W){ I = S.lower_bound ({W, 0}); if (I == S.end()) return -1; int pas = (*I).S; S.erase (I); return pas; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...