C++初期
| 投稿者 | ルク |
|---|---|
| 言語 | C++23(gcc16) |
| 更新日時 (JST) | 2026-11-28 14:02:29 |
| サイズ | 1,202 Byte |
| 参照URL | |
更新すると更新日時が変わるので、不都合がある場合は新しく投稿してください。
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vl = vector<ll>;
using vvl = vector<vl>;
using vvvl = vector<vvl>;
using vi = vector<int>;
using vvi = vector<vi>;
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(x) x.begin(), x.end()
constexpr ll dx[] = {1, 0, -1, 0, 1, -1, -1, 1};
constexpr ll dy[] = {0, 1, 0, -1, 1, 1, -1, -1};
struct Init {
Init() {
ios::sync_with_stdio(0);
cin.tie(0);
cout << fixed << setprecision(15);
}
} init;
template <typename T, typename U>
ostream& operator<<(ostream& os, const pair<T, U>& pair_var) {
os << "(" << pair_var.first << ", " << pair_var.second << ")";
return os;
}
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& vec) {
os << "[";
rep(i, vec.size()) {
os << vec[i];
if (i != vec.size() - 1) os << ", ";
}
os << "]";
return os;
}
template <typename T>
ostream& operator<<(ostream& os, const vector<vector<T>>& vec) {
os << "[";
rep(i, vec.size()) {
os << vec[i];
if (i != vec.size() - 1) os << ", ";
}
os << "]";
return os;
}
int main() { return 0; }