正文
增加 4 行删除 4 行
43 行未改动444546474849505152535421 行未改动7677787980818283848543 行未改动signed main() {ios::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr);memset(st, true, sizeof st);cin >> n >> q;for (int i = 1; i <= n; i ++) cin >> per[i];for (int i = 0; i < q; i ++) {int op;21 行未改动st[op] = true;if (per[op]) cnt --;}}for (int i = 1; i <= n; i ++) cout << per[i] << ' ';return 0;}```43 行未改动444546474849505152535421 行未改动7677787980818283848543 行未改动signed main() {ios::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr);memset(st, true, sizeof st);cin >> n >> q;for (int i = 1; i <= n; i ++) cin >> per[i];for (int i = 0; i < q; i ++) {int op;21 行未改动st[op] = true;if (per[op]) cnt --;}}for (int i = 1; i <= n; i ++) cout << per[i] << ' ';return 0;}```