895
This commit is contained in:
parent
94383fbaf7
commit
26f66e43d8
97 changed files with 5337 additions and 42 deletions
|
|
@ -1,4 +1,4 @@
|
|||
#include <bits/stdc++.h> // {{{
|
||||
#include <bits/stdc++.h> // {{{
|
||||
|
||||
// https://codeforces.com/blog/entry/96344
|
||||
|
||||
|
|
@ -7,19 +7,23 @@
|
|||
|
||||
using namespace std;
|
||||
|
||||
template <typename T> [[nodiscard]] static T MIN() {
|
||||
template <typename T>
|
||||
[[nodiscard]] static T MIN() {
|
||||
return std::numeric_limits<T>::min();
|
||||
}
|
||||
|
||||
template <typename T> [[nodiscard]] static T MAX() {
|
||||
template <typename T>
|
||||
[[nodiscard]] static T MAX() {
|
||||
return std::numeric_limits<T>::max();
|
||||
}
|
||||
|
||||
template <typename T> [[nodiscard]] static T sc(auto &&x) {
|
||||
template <typename T>
|
||||
[[nodiscard]] static T sc(auto &&x) {
|
||||
return static_cast<T>(x);
|
||||
}
|
||||
|
||||
template <typename T> [[nodiscard]] static T sz(auto &&x) {
|
||||
template <typename T>
|
||||
[[nodiscard]] static T sz(auto &&x) {
|
||||
return static_cast<T>(x.size());
|
||||
}
|
||||
|
||||
|
|
@ -31,22 +35,38 @@ template <typename T> [[nodiscard]] static T sz(auto &&x) {
|
|||
#define dbg(...) std::print(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
inline static void NO() { prln("NO"); }
|
||||
inline static void NO() {
|
||||
prln("NO");
|
||||
}
|
||||
|
||||
inline static void YES() { prln("YES"); }
|
||||
inline static void YES() {
|
||||
prln("YES");
|
||||
}
|
||||
|
||||
using ll = long long;
|
||||
using ld = long double;
|
||||
template <typename T> using ve = std::vector<T>;
|
||||
template <typename T, size_t N> using ar = std::array<T, N>;
|
||||
template <typename T1, typename T2> using pa = std::pair<T1, T2>;
|
||||
template <typename... Ts> using tu = std::tuple<Ts...>;
|
||||
template <typename... Ts> using dq = std::deque<Ts...>;
|
||||
template <typename... Ts> using qu = std::queue<Ts...>;
|
||||
template <typename... Ts> using pq = std::priority_queue<Ts...>;
|
||||
template <typename... Ts> using st = std::stack<Ts...>;
|
||||
auto lb = [](auto... args) { return std::lower_bound(args...); };
|
||||
auto ub = [](auto... args) { return std::upper_bound(args...); };
|
||||
template <typename T>
|
||||
using ve = std::vector<T>;
|
||||
template <typename T, size_t N>
|
||||
using ar = std::array<T, N>;
|
||||
template <typename T1, typename T2>
|
||||
using pa = std::pair<T1, T2>;
|
||||
template <typename... Ts>
|
||||
using tu = std::tuple<Ts...>;
|
||||
template <typename... Ts>
|
||||
using dq = std::deque<Ts...>;
|
||||
template <typename... Ts>
|
||||
using qu = std::queue<Ts...>;
|
||||
template <typename... Ts>
|
||||
using pq = std::priority_queue<Ts...>;
|
||||
template <typename... Ts>
|
||||
using st = std::stack<Ts...>;
|
||||
auto lb = [](auto... args) {
|
||||
return std::lower_bound(args...);
|
||||
};
|
||||
auto ub = [](auto... args) {
|
||||
return std::upper_bound(args...);
|
||||
};
|
||||
|
||||
#define ff first
|
||||
#define ss second
|
||||
|
|
@ -63,7 +83,7 @@ void solve() {
|
|||
prln("{}", ceill(abs((b - a) / 2) / c));
|
||||
}
|
||||
|
||||
int main() { // {{{
|
||||
int main() { // {{{
|
||||
cin.tie(nullptr)->sync_with_stdio(false);
|
||||
cin.exceptions(cin.failbit);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue