#include using namespace std; using ll = long long; #include using namespace atcoder; using mint =modint998244353; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); ll N,K; cin>>N>>K; vector A(K*2); for(int i=0;i>A[i]; A[i+K]=A[i]+2*N; } ll d=1e18; assert(K<1e4); for(int i=0;i<2*K;i++){ for(int j=0;j+1