Submission #150119

#TimeUsernameProblemLanguageResultExecution timeMemory
150119HSNU (#200)King of Chairs (FXCUP4_chairs)C++17
0 / 100
41 ms3008 KiB
#include "king.h" #include <bits/stdc++.h> #define StarBurstStream ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); #define iter(a) a.begin(), a.end() #define riter(a) a.rbegin(), a.rend() #define lsort(a) sort(iter(a)) #define gsort(a) sort(riter(a)) #define mp(a, b) make_pair(a, b) #define pb(a) push_back(a) #define pf(a) push_front(a) #define pob pop_back() #define pof pop_front() #define F first #define S second #define printv(a, b) {bool pvaspace=false; \ for(auto pva : a){ \ if(pvaspace) b << " "; pvaspace=true;\ b << pva;\ }\ b << "\n";} #define pii pair<int, int> #define pll pair<ll, ll> #define modadd(a, b) (((a % MOD) + (b % MOD)) % MOD) #define modtimes(a, b) (((a % MOD) * (b % MOD)) % MOD) //#define TEST typedef long long ll; typedef unsigned long long ull; using namespace std; const ll MOD = 1000000007; const ll MAX = 2147483647; long long SendInfo(std::vector<int> W, std::vector<int> C) { lsort(W); lsort(C); int wp = 0, cp = 0; int ans = 0; int n = W.size(); while(wp < n && cp < n){ if(W[wp] < C[cp]){ ans++; wp++; } cp++; } return ans - 1000000000; }
#include "vassal.h" #include <bits/stdc++.h> #define StarBurstStream ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); #define iter(a) a.begin(), a.end() #define riter(a) a.rbegin(), a.rend() #define lsort(a) sort(iter(a)) #define gsort(a) sort(riter(a)) #define mp(a, b) make_pair(a, b) #define pb(a) push_back(a) #define pf(a) push_front(a) #define pob pop_back() #define pof pop_front() #define F first #define S second #define printv(a, b) {bool pvaspace=false; \ for(auto pva : a){ \ if(pvaspace) b << " "; pvaspace=true;\ b << pva;\ }\ b << "\n";} #define pii pair<int, int> #define pll pair<ll, ll> #define modadd(a, b) (((a % MOD) + (b % MOD)) % MOD) #define modtimes(a, b) (((a % MOD) * (b % MOD)) % MOD) //#define TEST typedef long long ll; typedef unsigned long long ull; using namespace std; const ll MOD = 1000000007; const ll MAX = 2147483647; long long BB; std::vector<int> c; int n; vector<bool> b; void Init(long long B, std::vector<int> C){ BB = B + 1000000000; c = C; n = c.size(); b.resize(n); } int Maid(int W){ int s = upper_bound(iter(c), W) - c.begin(); for(; s < n; s++){ if(b[s]) continue; b[s] = true; return s; } return -1; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...