#include <bits/stdc++.h>
using namespace std;
namespace Config
{
bool USACO = false;
const string USACO_IO = "shell";
bool TEST_CASES = false;
inline constexpr bool STDERR_ON_SERVER = false;
}
#ifdef LOCAL
const int INF = INT32_MAX - 10;
#endif // LOCAL
#ifndef LOCAL
const long long INF = LLONG_MAX - 10;
#define int long long
#endif // LOCAL
struct Coordinate
{
int x, y;
static void sortByX(vector<Coordinate*>& vec)
{
sort(vec.begin(), vec.end(), [](Coordinate* a, Coordinate* b) {
return a->x < b->x;
});
}
static void sortByY(vector<Coordinate*>& vec)
{
sort(vec.begin(), vec.end(), [](Coordinate* a, Coordinate* b) {
return a->y < b->y;
});
}
};
struct Rect
{
int x1, y1, x2, y2;
friend ostream& operator<<(ostream& os, const Rect& rect)
{
return os << rect.x1 << ' ' << rect.y1 << ' ' << rect.x2 << ' ' << rect.y2;
}
friend istream& operator>>(istream& is, Rect& rect)
{
return is >> rect.x1 >> rect.y1 >> rect.x2 >> rect.y2;
}
};
void cartesianPrint(int* arr, int rows, int cols) {
for (int y = rows - 1; y >= 0; --y) {
cerr << setw(3) << y << " | ";
for (int x = 0; x < cols; ++x) {
cerr << setw(3) << setfill(' ') << arr[y * cols + x] << ' ';
}
cerr << '\n';
} cerr << " ";
for (int x = 0; x < cols; ++x) {
cerr << "----";
} cerr << '\n'; cerr << " ";
for (int x = 0; x < cols; ++x) {
cerr << setw(3) << x << ' ';
}
cerr << '\n';
}
long long max(signed x, long long y) { return max((long long) x, y); }
long long max(long long y, signed x) { return max((long long) x, y); }
const vector<pair<int, int>> dirs = {
{1, 0}, {0, 1}, {-1, 0}, {0, -1},
{1, 1}, {-1, 1}, {-1, -1}, {1, -1}
};
const int MOD = 1000000007;
struct NullDebug {
template <class T>
constexpr NullDebug& operator<<(T&&) noexcept { return *this; }
constexpr NullDebug& operator<<(std::ostream& (*)(std::ostream&)) noexcept { return *this; }
constexpr NullDebug& operator<<(std::ios_base& (*)(std::ios_base&)) noexcept { return *this; }
};
class RealDebug {
public:
RealDebug()
#if defined(LOCAL)
: out(std::cout)
#else
: out(std::cerr)
#endif
{}
template <class T>
RealDebug& operator<<(const T& v) {
if (at_line_start) { out << "\tdebug: "; at_line_start = false; }
out << v;
return *this;
}
RealDebug& operator<<(std::ostream& (*manip)(std::ostream&)) {
// avoid endl flush
if (manip == static_cast<std::ostream& (*)(std::ostream&)>(std::endl)) {
out << '\n';
at_line_start = true;
} else {
if (at_line_start) { out << "\tdebug: "; at_line_start = false; }
out << manip;
}
return *this;
}
RealDebug& operator<<(std::ios_base& (*manip)(std::ios_base&)) {
if (at_line_start) { out << "\tdebug: "; at_line_start = false; }
out << manip;
return *this;
}
private:
std::ostream& out;
bool at_line_start = true;
};
#if Config::STDERR_ON_SERVER
inline RealDebug debug;
#else
inline NullDebug debug;
#endif
signed main(signed argc, char** args)
{
void solve();
#ifdef LOCAL
cout << "Code running w/ test cases locally" << endl;
cout << "Is USACO mode on? " << (Config::USACO ? "True" : "False");
if (Config::USACO) cout << "\twill read from " << Config::USACO_IO << ".in";
cout << endl;
cout << "Multi-test-cases on? " << (Config::TEST_CASES ? "True" : "False") << "\n\n";
// freopen("shell.txt", "r", stdin)
// note: freopen deleted for using designated competitive programming editor
#endif // LOCAL
#ifndef LOCAL
if (Config::USACO)
{
freopen((Config::USACO_IO + ".in").c_str(), "r", stdin);
freopen((Config::USACO_IO + ".out").c_str(), "w", stdout);
}
if (Config::STDERR_ON_SERVER == false)
cerr << "stderr on server is off" << endl;
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
#endif // LOCAL
if (Config::TEST_CASES)
{
int test_cases_numbers_main; cin >> test_cases_numbers_main;
for (int test_case_main = 0; test_case_main < test_cases_numbers_main; test_case_main++)
solve();
}
else
solve();
return 0;
}
constexpr int N1E5 = 100005;
constexpr int N1E6 = 1000006;
constexpr int N1E9 = 1000000009;
/*------------------------------------------------------------------------*/
void solve()
{
}