hdu 5618 Jam's problem again #include <bits/stdc++.h> #define MAXN 100010 using namespace std; int n,k,T,xx; int ans[MAXN],c[MAXN],f[MAXN]; struct Node{ int x,y,z,id; }a[100010],b[100010]; inline int read(){ char ch; bool f=false; int res=0; while (…