/* * 後ろから 2 つ目を見忘れる */ #include #include #include #include #include template using numr=std::numeric_limits; using i64 = std::int_least64_t; using usize = std::size_t; auto cmn=[](auto&x,auto y){if(x>y){x=y;return true;}return false;}; template T read_int(char end, T min, T max) { T x = 0; while (true) { char c = std::getchar(); if (!std::isdigit(c)) { assert(c==end); break; } x = 10*x + c-'0'; assert(x<=100'000'000); } assert(min <= x && x <= max); return x; } int main(){ usize n = read_int(' ', 1u, 100'000u); i64 k = read_int('\n', 0ll, 100'000'000ll); i64 inf = numr::max(); std::vector a(n), b(n), time(n, inf); for (usize i=0; i(i==n-1?'\n':' ', 0ll, 100'000'000ll); } for (usize i=0; i(i==n-1?'\n':' ', 0ll, 100'000'000ll); } assert(std::getchar()==EOF); time.at(0) = 0; for (usize i=1; i