Kyopro Library
 
読み取り中…
検索中…
一致する文字列を見つけられません
template.hpp
[詳解]
1#pragma once
2#include <bits/stdc++.h>
3using namespace std;
4#define ALL(x) (x).begin(),(x).end()
5#define REP(i, n) for(ll i=0; i<(ll)(n); i++)
6#define PER(i, n) for(ll i=(ll)(n)-1; i>=0; i--)
7
8template<typename T> int LB(const vector<T>& v, T x) { return lower_bound(ALL(v),x)-v.begin(); }
9template<typename T> int UQ(T& v) { sort(ALL(v)); v.erase(unique(ALL(v)),v.end()); return v.size(); }
10template<typename T> bool chmax(T &a, T b) { return a<b ? a=b, true : false; }
11template<typename T> bool chmin(T &a, T b) { return a>b ? a=b, true : false; }
12template<typename T> using rpriority_queue = priority_queue<T,vector<T>,greater<T>>;
13using ll=long long; const int INF=1e9+10; const ll INFL=4e18;
14using ld=long double; using lll=__int128_t; using ull=unsigned long long;
15using VI=vector<int>; using VVI=vector<VI>; using VL=vector<ll>; using VVL=vector<VL>;
16using PL=pair<ll,ll>; using VP=vector<PL>; using WG=vector<vector<pair<int,ll>>>;
17
18
19#ifdef LOCAL
20#include "./debug.hpp"
21#else
22#define debug(...)
23#define print_line
24#endif
25
26using std::cout;
const int INF
Definition template.hpp:13
const ll INFL
Definition template.hpp:13
int LB(const vector< T > &v, T x)
Definition template.hpp:8
bool chmax(T &a, T b)
Definition template.hpp:10
#define ALL(x)
Definition template.hpp:4
int UQ(T &v)
Definition template.hpp:9
bool chmin(T &a, T b)
Definition template.hpp:11