正文
增加 11 行删除 11 行
20 行未改动21222324252627282919 行未改动4950515253545556573 行未改动616263646566676869128 行未改动全部展开1981992002012022032042052067 行未改动21421521621721821922022122215 行未改动238239240241242243244245246100 行未改动3473483493503513523533543557 行未改动36336436536636736836937037115 行未改动38738838939039139239339439541 行未改动43743843944044144244344444510 行未改动45645745845946046146246346422 行未改动20 行未改动08:50 发现了 $m=2$ 的特殊性质,$70pts$ 到手。08:55 手玩样例,想到了正解,狂敲代码。09:00 四个大样例全部通过!跟 $m \leq 2$ 的骗分代码开始对拍,开 B 题。#### 解法当 $m=1$ 时,每个字符串都是一个单独的字符,这时无法进行字符交换,只有 ASCII 值最小的那**种**字符才有可能(ASCII 值最小的字符不一定唯一)。19 行未改动int main() {freopen("dict.in", "r", stdin);freopen("dict.out", "w", stdout);cin >> n >> m;for (int i = 1; i <= n; i ++) {cin >> iarr[i];if (minstr > iarr[i]) {3 行未改动sort(sarr[i].begin(), sarr[i].end());jarr[i] = sarr[i];reverse(jarr[i].begin(), jarr[i].end());}if (m == 1) {for (int i = 1; i <= n; i ++) {if (iarr[i] == minstr) {cout << "1";128 行未改动全部展开int main() {freopen("expand.in", "r", stdin);freopen("expand.out", "w", stdout);cin >> C >> n >> m >> q;for (int i = 1; i <= n; i ++) {cin >> a[i];ca[i] = a[i];7 行未改动else cout << "1";} else {work();}for (int ti = 1; ti <= q; ti ++) {cin >> kx >> ky;for (int i = 1; i <= n; i ++) ca[i] = a[i];for (int i = 1; i <= m; i ++) cb[i] = b[i];15 行未改动work();}}return 0;}```### C 双序列扩展100 行未改动int main() {freopen("expand.in", "r", stdin);freopen("expand.out", "w", stdout);cin >> C >> n >> m >> q;for (int i = 1; i <= n; i ++) {cin >> a[i];ca[i] = a[i];7 行未改动else cout << "1";} else {work();}for (int ti = 1; ti <= q; ti ++) {cin >> kx >> ky;for (int i = 1; i <= n; i ++) ca[i] = a[i];for (int i = 1; i <= m; i ++) cb[i] = b[i];15 行未改动work();}}return 0;}```### D 天天爱打卡41 行未改动freopen("run.in", "r", stdin);freopen("run.out", "w", stdout);ios::sync_with_stdio(false);cin.tie(0);cin >> C >> T;// scanf("%lld%lld", &C, &T);while (T--) {// scanf("%lld%lld%lld%lld", &n, &m, &k, &d);10 行未改动} else {vis[j + 1] = 0;}}bool boom = false;for (int j = k + 1; j <= n; j ++) {if (check_k(j)) {boom = true;22 行未改动20 行未改动21222324252627282919 行未改动4950515253545556573 行未改动616263646566676869128 行未改动全部展开1981992002012022032042052067 行未改动21421521621721821922022122215 行未改动238239240241242243244245246100 行未改动3473483493503513523533543557 行未改动36336436536636736836937037115 行未改动38738838939039139239339439541 行未改动43743843944044144244344444510 行未改动45645745845946046146246346422 行未改动20 行未改动08:50 发现了 $m=2$ 的特殊性质,$70pts$ 到手。08:55 手玩样例,想到了正解,狂敲代码。09:00 四个大样例全部通过!跟 $m \leq 2$ 的骗分代码开始对拍,开 B 题。#### 解法当 $m=1$ 时,每个字符串都是一个单独的字符,这时无法进行字符交换,只有 ASCII 值最小的那**种**字符才有可能(ASCII 值最小的字符不一定唯一)。19 行未改动int main() {freopen("dict.in", "r", stdin);freopen("dict.out", "w", stdout);cin >> n >> m;for (int i = 1; i <= n; i ++) {cin >> iarr[i];if (minstr > iarr[i]) {3 行未改动sort(sarr[i].begin(), sarr[i].end());jarr[i] = sarr[i];reverse(jarr[i].begin(), jarr[i].end());}if (m == 1) {for (int i = 1; i <= n; i ++) {if (iarr[i] == minstr) {cout << "1";128 行未改动全部展开int main() {freopen("expand.in", "r", stdin);freopen("expand.out", "w", stdout);cin >> C >> n >> m >> q;for (int i = 1; i <= n; i ++) {cin >> a[i];ca[i] = a[i];7 行未改动else cout << "1";} else {work();}for (int ti = 1; ti <= q; ti ++) {cin >> kx >> ky;for (int i = 1; i <= n; i ++) ca[i] = a[i];for (int i = 1; i <= m; i ++) cb[i] = b[i];15 行未改动work();}}return 0;}```### C 双序列扩展100 行未改动int main() {freopen("expand.in", "r", stdin);freopen("expand.out", "w", stdout);cin >> C >> n >> m >> q;for (int i = 1; i <= n; i ++) {cin >> a[i];ca[i] = a[i];7 行未改动else cout << "1";} else {work();}for (int ti = 1; ti <= q; ti ++) {cin >> kx >> ky;for (int i = 1; i <= n; i ++) ca[i] = a[i];for (int i = 1; i <= m; i ++) cb[i] = b[i];15 行未改动work();}}return 0;}```### D 天天爱打卡41 行未改动freopen("run.in", "r", stdin);freopen("run.out", "w", stdout);ios::sync_with_stdio(false);cin.tie(0);cin >> C >> T;// scanf("%lld%lld", &C, &T);while (T--) {// scanf("%lld%lld%lld%lld", &n, &m, &k, &d);10 行未改动} else {vis[j + 1] = 0;}}bool boom = false;for (int j = k + 1; j <= n; j ++) {if (check_k(j)) {boom = true;22 行未改动