uoj 246 套路 (sqrt)
#include using namespace std;#define N 200020#define LL long long#define inf 0x3f3f3f3fint n, m, k;int a[N];int dp[N];int last[N], pos[N];int main() { scanf("%d%d%d", &n, &m, &k); for(in