版本比较
分块与莫队——最优美的暴力
正文
增加 2 行删除 2 行
322 行未改动全部展开323324325326327327328329330331101 行未改动全部展开433434435436437437438439440441427 行未改动全部展开322 行未改动全部展开 ls[i] = t; } } cout << ans << endl; } } return 0;}```
101 行未改动全部展开}int rnd(int l, int r){ return l + rand() % (r - l + 1);}int dx[4] = {1, 0, -1, 0}; int dx[4] = {1, 0, -1, 0};int dy[4] = {0, -1, 0, 1};ll dp[200005];int hv[350][100005], fl[500], ans;int n, m, sq, lss[200005], ls[200005], nw[200005], a[200005];427 行未改动全部展开