문 제 소 스 코 드 #include #include #include constexpr int MAX{ 100'000 }; typedef std::queue BFS; bool arr[MAX + 1] = { false , }; int main() { std::ios_base::sync_with_stdio(false); std::cin.tie(NULL); std::cout.tie(NULL); int N, K; std::cin >> N >> K; BFS bfs; bfs.push(std::make_pair(N, 0)); arr[N] = true; int sec{ 0x7fff'ffff }; while (!bfs.empty()) { int pos{ bfs.front().first }; int level{ bfs.f..