#ifdef INCLUDED_MAIN // const ll ansmod = 998244353; // const ll ansmod = 1000000007; auto solve() { GETSTR(S); return "Hello World!"; } int main() { auto ans = solve(); // auto ans = (ansmod + (solve() % ansmod)) % ansmod; print(ans); } // ラムダ再帰 // auto ff = [&](auto &&f, ll x) {}; // ff(ff, 0); // 以下は動作確認未実施 #else #define INCLUDED_MAIN #ifdef LOCAL #include "../mytemplate.hpp" #else #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #endif using namespace std; // clang-format off /* accelration */ // 高速バイナリ生成 #ifndef LOCAL #pragma GCC target("avx") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #endif /* alias */ using ull = __uint128_t; // using ll = long long; // __int128でTLEするときに切り替える。 using ll = __int128; using ld = long double; using vi = vector; using vl = vector; using vll = vector; using vd = vector; using vvi = vector; using vvl = vector; using vvll = vector; using vvvll = vector; using vvd = vector; using vvvd = vector; using vc = vector; using vvc = vector; using vs = vector; using vvs = vector; using vvvs = vector; using pii = pair; using pll = pair; using umpll = unordered_map; using umpsl = unordered_map; using mpll = map; using sll = set; using msll = multiset; using heapqll = priority_queue>; using heapqllrev = priority_queue; using dll = deque; /* REP macro */ #define _overload4(_1,_2,_3,_4,name,...) name #define _rep(i,n) reps(i,0,n) #define reps(i,a,n) for (ll i = (a); i < (ll)(n); ++i) #define repsp(i,a,n,s) for (ll i = (a); i < (ll)(n); i += s) #define rep(...) _overload4(__VA_ARGS__,repsp, reps,_rep,)(__VA_ARGS__) #define rrep(i, n) reps(i, 1, n + 1) #define repd(i,n) for(ll i=n-1;i>=0;i--) #define rrepd(i,n) for(ll i=n;i>=1;i--) #define repdict(key, value, dict) for (const auto& [key, value] : dict) #define repset(x, st) for(auto x : st) /* define short */ #define endl "\n" #define pf emplace_front #define pb emplace_back #define popleft pop_front #define popright pop_back #define mp make_pair #define ump unordered_map #define all(obj) (obj).begin(), (obj).end() #define rall(obj) (obj).rbegin(), (obj).rend() #define len(x) (ll)(x.size()) #define MAX(x) *max_element(all(x)) #define MIN(x) *min_element(all(x)) #define ARGMAX(x) distance(x.begin(), max_element(all(x))) #define ARGMIN(x) distance(x.begin(), min_element(all(x))) #define CLAMP(L, X, R) min(max(L, X), R) #define IN(L, X, R) (L <= X && X <= R) #define SET(x) sll(all(x)) #define VEC(x) vll(all(x)) #define GET(x) ll x = in_ll(); #define GET2(x, y) ll x, y; {vll _A_ = in_lls(); x = _A_[0]; y = _A_[1];} #define GET3(x, y, z) ll x, y, z; {vll _A_ = in_lls(); x = _A_[0]; y = _A_[1]; z = _A_[2];} #define GET4(x, y, z, a) ll x, y, z, a; {vll _A_ = in_lls(); x = _A_[0]; y = _A_[1]; z = _A_[2]; a = _A_[3];} #define GET5(x, y, z, a, b) ll x, y, z, a, b; {vll _A_ = in_lls(); x = _A_[0]; y = _A_[1]; z = _A_[2]; a = _A_[3]; b = _A_[4];} #define GET6(x, y, z, a, b, c) ll x, y, z, a, b, c; {vll _A_ = in_lls(); x = _A_[0]; y = _A_[1]; z = _A_[2]; a = _A_[3]; b = _A_[4]; c = _A_[5];} #define GETVLL(x) vll x = in_lls(); #define GETVVLL(x, N) vvll x; rep(i, N) {GETVLL(ab); x.pb(ab);} #define GETD(x) ld x = in_d(); #define GET2D(x, y) ld x, y; {vd _A_ = in_ds(); x = _A_[0]; y = _A_[1];} #define GET3D(x, y, z) ld x, y, z; {vd _A_ = in_ds(); x = _A_[0]; y = _A_[1]; z = _A_[2];} #define GET4D(x, y, z, a) ld x, y, z, a; {vd _A_ = in_ds(); x = _A_[0]; y = _A_[1]; z = _A_[2]; a = _A_[3];} #define GET5D(x, y, z, a, b) ld x, y, z, a, b; {vd _A_ = in_ds(); x = _A_[0]; y = _A_[1]; z = _A_[2]; a = _A_[3]; b = _A_[4];} #define GET6D(x, y, z, a, b, c) ld x, y, z, a, b, c; {vd _A_ = in_ds(); x = _A_[0]; y = _A_[1]; z = _A_[2]; a = _A_[3]; b = _A_[4]; c = _A_[5];} #define GETVD(x) vd x = in_ds(); #define GETVVD(x, N) vvd x; rep(i, N) {GETVD(ab); x.pb(ab);} #define GETSTR(x) string x = in_str(); #define GETSTRS(x) vs x; x = in_strs(); #define GETVVS(x, N) vvs x; rep(i, N) x.pb(in_strs()); #define GETVSTR(x, N) vs x; rep(i, N) x.pb(in_str()); #define INI(x, vec) auto x = vec[0]; #define INI2(x, y, vec) auto x = vec[0], y = vec[1]; #define INI3(x, y, z, vec) auto x = vec[0], y = vec[1], z = vec[2]; #define INI4(x, y, z, a, vec) auto x = vec[0], y = vec[1], z = vec[2], a = vec[3]; #define INI5(x, y, z, a, b, vec) auto x = vec[0], y = vec[1], z = vec[2], a = vec[3], b = vec[4]; #define INI6(x, y, z, a, b, c, vec) auto x = vec[0], y = vec[1], z = vec[2], a = vec[3], b = vec[4], c = vec[5]; #define SETPERM(x, N) vll x(N); iota(all(x), 0); #define SETPERMS(x, s, N) vll x(N); iota(all(x), s); #define UNUSED(x) ((void)x); #define printF(x) print(x); cout << flush; // [INT|LLONG|DBL|LDBL]_[MAX|MIN] 最大最小表現 // 型変換 #define CHARSTR(x) (""s + x) #define STRBIN2LL(x) std::stoull(x, nullptr, 2) #define STRLL(x) parse(x) #define STRD(x) std::stod(x) #define CHARLL(x) std::stoll(CHARSTR(x)) /* sort */ #define SORT(x) stable_sort(all(x)) #define RSORT(x) stable_sort(rall(x)) #define SORT_IDX(x, idx) stable_sort(all(x), [&](const vll &_a_, const vll &_b_){return _a_[idx] < _b_[idx];}) #define RSORT_IDX(x, idx) stable_sort(all(x), [&](const vll &_a_, const vll &_b_){return _a_[idx] > _b_[idx];}) #define LB_IDX_VEC(c, x) distance((c).begin(), lower_bound(all(c), x)) // O(log N) x未満の最大値についてその右側のidxが求まる #define UB_IDX_VEC(c, x) distance((c).begin(), upper_bound(all(c), x)) // O(log N) x以上の最小値についてその右側のidxが求まる #define LB_ITR_VEC(c, x) lower_bound(all(c), x) #define UB_ITR_VEC(c, x) upper_bound(all(c), x) // #define LB_IDX_SET(c, x) distance((c).begin(), c.lower_bound(x)) // O(N) // #define UB_IDX_SET(c, x) distance((c).begin(), c.upper_bound(x)) // O(N) #define LB_ITR_SET(c, x) c.lower_bound(x) #define UB_ITR_SET(c, x) c.upper_bound(x) #define LB_ITR_MAP(c, x) c.lower_bound(x) #define UB_ITR_MAP(c, x) c.upper_bound(x) #define KEY_CHANGE(c, k1, k2) { auto i_ = c.extract(k1); i_.key() = k2; c.insert(std::move(i_));} #define EXIST(key, dict) (dict.find(key) != dict.end()) #define REV(x) reverse(all(x)) namespace // 直値のデフォルトの型をllに。 { ll _0 = 0; ll _1 = 1; ll _2 = 2; ll _3 = 3; ll _4 = 4; ll _5 = 5; ll _6 = 6; ll _7 = 7; ll _8 = 8; ll _9 = 9; ll _10 = 10; ll _11 = 11; ll _12 = 12; ll _13 = 13; ll _14 = 14; ll _15 = 15; ll _16 = 16; ll _17 = 17; ll _30 = 30; ll _31 = 31; ll _32 = 32; ll _33 = 33; ll _63 = 63; ll _64 = 64; ll _65 = 65; ll _66 = 66; ll _126 = 126; ll _127 = 127; ll _128 = 128; ll _129 = 129; }; void ignore_warning() // ワーニング対策 { _0 = _0; _1 = _1; _2 = _2; _3 = _3; _4 = _4; _5 = _5; _6 = _6; _7 = _7; _8 = _8; _9 = _9; _10 = _10; _11 = _11; _12 = _12; _13 = _13; _14 = _14; _15 = _15; _16 = _16; _17 = _17; _30 = _30; _31 = _31; _32 = _32; _33 = _33; _63 = _63; _64 = _64; _65 = _65; _66 = _66; _126 = _126; _127 = _127; _128 = _128; _129 = _129; } /* helper func */ std::ostream &operator<<(std::ostream &dest, __int128 value) { std::ostream::sentry s(dest); if (s) { __uint128_t tmp = value < 0 ? -value : value; char buffer[128]; char *d = std::end(buffer); do { --d; *d = "0123456789"[tmp % 10]; tmp /= 10; } while (tmp != 0); if (value < 0) { --d; *d = '-'; } int len = std::end(buffer) - d; if (dest.rdbuf()->sputn(d, len) != len) { dest.setstate(std::ios_base::badbit); } } return dest; } ll parse(string &s) { ll ret = 0; bool isplus = true; for (ll i = 0; i < s.length(); i++) if ('0' <= s[i] && s[i] <= '9') ret = 10 * ret + s[i] - '0'; else if (s[i] == '-') isplus ^= isplus; return isplus ? ret : -ret; } string STR(const vector &cs) { return string(cs.begin(), cs.end()); } string RSTR(const vector &cs) { return string(cs.rbegin(), cs.rend()); } template string STR(T v) { ostringstream ss; ss << v; return ss.str(); } ll SUM(const vll &v) { ll total = 0; rep(i, len(v)) { total += v[i]; } return total; } template constexpr auto min(T... a){ return min(initializer_list>{a...}); } template constexpr auto max(T... a){ return max(initializer_list>{a...}); } // search_length: 走査するベクトル長の上限(先頭から何要素目までを検索対象とするか、1始まりで) template inline bool vector_finder(std::vector vec, T element, unsigned int search_length) { auto itr = std::find(vec.begin(), vec.end(), element); size_t index = std::distance( vec.begin(), itr ); if (index == vec.size() || index >= search_length) {return false;} else {return true;} } inline void print(const sll& v, string s = " ") {bool first = true; for(auto &p : v) { if(first) {first = false; cout << p;} else cout << s << p;} cout << endl;} inline void print(const msll& v, string s = " ") {bool first = true; for(auto &p : v) { if(first) {first = false; cout << p;} else cout << s << p;} cout << endl;} template inline void print(const vector& v, string s = " ") {rep(i, v.size()) cout << v[i] << (i != (ll)v.size() - 1 ? s : "\n");} inline void print(const vvll& v, string s = " ") {rep(i, len(v)) print(v[i], s);} template inline void print(const pair& p) {cout << p.first << " " << p.second << endl;} template inline void print(const T& x) {cout << x << endl;} template inline void print(const vector>& v) {for (auto&& p : v) print(p);} template inline void print(const unordered_map& d) {for (const auto& [key, value] : d) {cout << key << " "; print(value);}} template inline void print(const map& d) {for (const auto& [key, value] : d) {cout << key << " "; print(value);}} inline void print(const vc &d) {rep(i, len(d)) cout << d[i]; cout << endl;} // 第一引数と第二引数を比較し、第一引数(a)をより大きい/小さい値に上書き template inline bool chmin(T& a, const T& b) {bool compare = a > b; if (a > b) a = b; return compare;} template inline bool chmax(T& a, const T& b) {bool compare = a < b; if (a < b) a = b; return compare;} /* func */ inline ll in_ll() {string s; getline(cin, s); return STRLL(s);} inline ld in_d() {string s; getline(cin, s); return STRD(s);} inline string in_str() {string s; getline(cin, s); return s;} inline string YESNO(bool cond) {return cond ? "YES" : "NO";} inline string yesno(bool cond) {return cond ? "yes" : "no";} inline string YesNo(bool cond) {return cond ? "Yes" : "No";} /* debug */ namespace debug_print_func { std::ostream& os = std::cerr; template auto has_cbegin(int) -> decltype(std::cbegin(std::declval()), std::true_type {}); template auto has_cbegin(...) -> std::false_type; template auto has_value_type(int) -> decltype(std::declval(), std::true_type {}); template auto has_value_type(...) -> std::false_type; template [[maybe_unused]] constexpr bool is_iteratable_container_v = decltype(has_cbegin(int {}))::value; template [[maybe_unused]] constexpr bool is_container_v = decltype(has_value_type(int {}))::value || is_iteratable_container_v; template <> [[maybe_unused]] constexpr bool is_iteratable_container_v = false; template <> [[maybe_unused]] constexpr bool is_container_v = false; #if (defined _GLIBCXX_STRING) || (defined _LIBCPP_STRING) template <> [[maybe_unused]] constexpr bool is_iteratable_container_v = false; template <> [[maybe_unused]] constexpr bool is_container_v = false; #endif template struct first_element { using type = Tp; }; template using first_t = typename first_element::type; template (int {}))::value, std::nullptr_t> = nullptr> auto check_elem(int) -> decltype(*std::cbegin(std::declval())); template (int {}))::value, std::nullptr_t> = nullptr> auto check_elem(int) -> typename Tp::value_type; template auto check_elem(...) -> void; template using elem_t = decltype(check_elem(int {})); template [[maybe_unused]] constexpr bool is_multidim_container_v = is_container_v && is_container_v>; template std::enable_if_t> out(const Tp&); void out(const char&); void out(const char*); void out(const std::string_view&); #if (defined _GLIBCXX_STRING) || (defined _LIBCPP_STRING) void out(const std::string&); #endif #ifdef __SIZEOF_INT128__ void out(const __int128&); void out(const unsigned __int128&); #endif template void out(const std::pair&); #if (defined _GLIBCXX_TUPLE) || (defined _LIBCPP_TUPLE) template void out(const std::tuple&); #endif #if (defined _GLIBCXX_STACK) || (defined _LIBCPP_STACK) template void out(std::stack); #endif #if (defined _GLIBCXX_QUEUE) || (defined _LIBCPP_QUEUE) template void out(std::queue); template void out(std::priority_queue); #endif template std::enable_if_t> out(const C&); template std::enable_if_t> out(const Tp& arg) { os << arg; } void out(const char& arg) { os << '\'' << arg << '\''; } void out(const char* arg) { os << '\"' << arg << '\"'; } void out(const ld arg) { if (arg == LDBL_MAX) { os << "∞"; } else if (arg == -LDBL_MAX) { os << "-∞"; } else { os << arg; } } void out(const std::string_view& arg) { os << '\"' << arg << '\"'; } #if (defined _GLIBCXX_STRING) || (defined _LIBCPP_STRING) void out(const std::string& arg) { os << '\"' << arg << '\"'; } #endif #ifdef __SIZEOF_INT128__ void out(const __int128& arg) { if (arg == ULLONG_MAX) { os << "∞"; } else { int sign = (arg < 0) ? (-1) : 1; if (sign == -1) os << '-'; __int128 base = sign; while (sign * arg >= sign * base * 10) base *= 10; while (base) { os << static_cast('0' + (arg / base % 10)); base /= 10; } } } void out(const unsigned __int128& arg) { if (arg == ULLONG_MAX) { os << "∞"; } else { unsigned __int128 base = 1; while (arg >= base * 10) base *= 10; while (base) { os << static_cast('0' + (arg / base % 10)); base /= 10; } } } #endif template void out(const std::pair& arg) { os << '('; out(arg.first); os << ", "; out(arg.second); os << ')'; } #if (defined _GLIBCXX_TUPLE) || (defined _LIBCPP_TUPLE) template void print_tuple(const T& arg, std::index_sequence) { static_cast(((os << (Is == 0 ? "" : ", "), out(std::get(arg))), ...)); } template void out(const std::tuple& arg) { os << '('; print_tuple(arg, std::make_index_sequence()); os << ')'; } #endif #if (defined _GLIBCXX_STACK) || (defined _LIBCPP_STACK) template void out(std::stack arg) { if (arg.empty()) { os << ""; return; } os << "[ "; while (!arg.empty()) { out(arg.top()); os << ' '; arg.pop(); } os << ']'; } #endif #if (defined _GLIBCXX_QUEUE) || (defined _LIBCPP_QUEUE) template void out(std::queue arg) { if (arg.empty()) { os << ""; return; } os << "[ "; while (!arg.empty()) { out(arg.front()); os << ' '; arg.pop(); } os << ']'; } template void out(std::priority_queue arg) { if (arg.empty()) { os << ""; return; } os << "[ "; while (!arg.empty()) { out(arg.top()); os << ' '; arg.pop(); } os << ']'; } #endif template std::enable_if_t> out(const Container& arg) { if (std::distance(std::cbegin(arg), std::cend(arg)) == 0) { os << ""; return; } os << "[ "; std::for_each(std::cbegin(arg), std::cend(arg), [](const elem_t& elem) { out(elem); os << ' '; }); os << ']'; } template std::enable_if_t> print(std::string_view name, const Tp& arg) { os << name << ": "; out(arg); if constexpr (is_container_v) os << '\n'; } template std::enable_if_t> print(std::string_view name, const Tp& arg) { os << name << ": "; if (std::distance(std::cbegin(arg), std::cend(arg)) == 0) { os << "\n"; return; } std::for_each(std::cbegin(arg), std::cend(arg), [&name, is_first_elem = true](const elem_t& elem) mutable { if (is_first_elem) is_first_elem = false; else for (std::size_t i = 0; i < name.length() + 2; i++) os << ' '; out(elem); os << '\n'; }); } template void multi_print(std::string_view names, const Tp& arg, const Ts&... args) { if constexpr (sizeof...(Ts) == 0) { names.remove_suffix( std::distance( names.crbegin(), std::find_if_not(names.crbegin(), names.crend(), [](const char c) { return std::isspace(c); }) ) ); print(names, arg); if constexpr (!is_container_v) os << '\n'; } else { std::size_t comma_pos = 0; for (std::size_t i = 0, paren_depth = 0, inside_quote = false; i < names.length(); i++) { if (!inside_quote && paren_depth == 0 && i > 0 && names[i - 1] != '\'' && names[i] == ',') { comma_pos = i; break; } if (names[i] == '\"') { if (i > 0 && names[i - 1] == '\\') continue; inside_quote ^= true; } if (!inside_quote && names[i] == '(' && (i == 0 || names[i - 1] != '\'')) paren_depth++; if (!inside_quote && names[i] == ')' && (i == 0 || names[i - 1] != '\'')) paren_depth--; } const std::size_t first_varname_length = comma_pos - std::distance( names.crend() - comma_pos, std::find_if_not( names.crend() - comma_pos, names.crend(), [](const char c) { return std::isspace(c); } ) ); print(names.substr(0, first_varname_length), arg); if constexpr (!is_container_v) { if constexpr (is_container_v>) os << '\n'; else os << " | "; } const std::size_t next_varname_begins_at = std::distance( names.cbegin(), std::find_if_not( names.cbegin() + comma_pos + 1, names.cend(), [](const char c) { return std::isspace(c); } ) ); names.remove_prefix(next_varname_begins_at); multi_print(names, args...); } } } // namespace debug_print #ifdef LOCAL # define debug(...) cerr << "\033[33m(line:" << __LINE__ << ") " << endl; debug_print_func::multi_print(#__VA_ARGS__, __VA_ARGS__); cerr << "\033[m"; #else # define debug(...) ; #endif /* 標準入力 */ vs in_strs(const string &delimiter = " ") { string s; getline(cin, s); vs output; bitset<255> delims; for (unsigned char c: delimiter) { delims[c] = true; } string::const_iterator beg; bool in_token = false; for( string::const_iterator it = s.cbegin(), end = s.cend(); it != end; ++it ) { if( delims[*it] ) { if( in_token ) { output.pb(beg, it); in_token = false; } } else if( !in_token ) { beg = it; in_token = true; } } if( in_token ) output.pb(beg, s.cend()); return output; } inline vll in_lls() { vll vals; vs tokens = in_strs(); for (string i: tokens) vals.pb(STRLL(i)); return vals; } inline vd in_ds() { vd vals; vs tokens = in_strs(); for (string i: tokens) vals.pb(STRD(i)); return vals; } inline vvll in_llss(ll line) // 複数行文字列解析 { vvll valss; rep(i, line) valss.pb(in_lls()); return valss; } inline vs in_vs(ll line) // 複数行文字列解析 { vs vecs; rep(i, line) { vecs.pb(in_str()); } return vecs; } inline ll popcnt(ll x) { return __builtin_popcountll(x); } template T ceil(T x, U y) { return (x > 0 ? (x + y - 1) / y : x / y); } template T floor(T x, U y) { return (x > 0 ? x / y : (x - y + 1) / y); } template vector accsum(const vector &vec, ll ansmod = 0) { if (len(vec) == 0) return vector(); vector acc = {0}; if (ansmod != 0) { rep (i, len(vec)) acc.pb((acc[i] + vec[i]) % ansmod); } else { rep (i, len(vec)) acc.pb(acc[i] + vec[i]); } return acc; } template vector accmax(const vector &vec) { if (len(vec) == 0) return vector(); vector acc = {vec[0]}; reps (i, 1, len(vec)) acc.pb(max(acc[i - 1], vec[i])); return acc; } template vector accmin(const vector &vec) { if (len(vec) == 0) return vector(); vector acc = {vec[0]}; reps (i, 1, len(vec)) acc.pb(min(acc[i - 1], vec[i])); return acc; } #include __FILE__ #endif