// compile: make data
// run: ./data < data.in
#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
#ifdef LOCAL
#include <debug/codeforces.h>
#define debug(x...) _debug_print(#x, x);
#define Debug(x...) _debug_print_format(#x, x);
std::ifstream terminal("/dev/tty");
#define PP cerr<<"\033[1;30mpause...\e[0m",terminal.ignore();
#else
#define debug(x...)
#define Debug(x...)
#define PP
#endif
template<typename...Args> void print_(Args...args){((cout<<args<<" "),...)<<endl;}
#define rep(i,a,b) for(int i=(a);i<(int)(b);++i)
#define sz(v) ((int)(v).size())
#define print(...) print_(__VA_ARGS__);
#define FIND(a, x) ((find(a.begin(),a.end(),(x))!=a.end())?1:0)
#define cmin(x,...) x=min({(x),__VA_ARGS__})
#define cmax(x,...) x=max({(x),__VA_ARGS__})
#define INTMAX (int)(9223372036854775807)
#define INF (int)(1152921504606846976)
#define NaN (int)(0x8b88e1d0595d51d1)
#define double long double
#define int long long
#define uint unsigned long long
#define MAXN 200010
template <typename T> int corcomp(vector<T> &a, int index = 0, function<int(T)> get = [](int x) {return x; }, function<void(T&, int)> set = [](T &x, int y) {x = y; }) {
int maxv = 0;
vector<pair<T, int>> l(sz(a));
vector<pair<int, int>> r(sz(a));
rep(i, 0, sz(a)) l[i] = {a[i], i};
sort(l.begin(), l.end(), [&get](pair<T, int> x, pair<T, int> y) {
return get(x.first) < get(y.first);
});
r[0] = {l[0].second, 0};
rep(i, 1, sz(a)) {
r[i].first = l[i].second;
r[i].second = r[i-1].second + (get(l[i].first) != get(l[i-1].first));
}
maxv = r.back().second;
sort(r.begin(), r.end());
rep(i, 0, sz(a)) set(a[i], r[i].second + index);
return maxv + index;
}
int32_t main() {
ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
int n; cin >> n;
vector<int> t(2*n);
rep(i, 0, 2*n) cin >> t[i];
int N = corcomp(t);
vector<pair<int, int>> a(n);
rep(i, 0, n) a[i] = {t[2*i], t[2*i+1]};
sort(a.begin(), a.end(), [](pair<int, int> x, pair<int, int> y) {
return x.second < y.second;
});
int end = 0, total = 0;
rep(i, 0, n) {
if (a[i].first >= end) {
end = a[i].second;
++total;
}
}
cout << total << endl;
return 0;
}
Jillibet, huh? Never heard of it before. Always be careful and do some research before putting too much money on an unfamiliar site. Here’s the link to checkout: jillibet
8kBetApp is the next thing on my list! Seems easy to use which is exactly what I’m looking for. Download it here: 8kbetapp
Yo, if you’re looking to get into 20Bet, 20betlogin.info is a good starting point. Helped me get in and start betting. The platform is pretty solid once you’re in. Good luck out there! 20betlogin
I’ve tried a few sites lately but this one is really smooth. The games load fast and the payouts are fair. Definitely my new favorite spot! phjili588
Everything about this site is professional and user friendly. The games are fair and the rewards are real. Check out jilibet178casinologin