版本比较
题解:P15946 [JOI Final 2026] 稻草人 2 / Scarecrows 2
正文
增加 3 行删除 3 行
28 行未改动293031323334353637383928 行未改动6869707172737475762 行未改动28 行未改动};priority_queue<Stu> q;int res;int cal(int k, int d) {while(!q.empty())q.pop();int ans = 0;for (int i = 1; i <= tot[k]; i++) {if(x[k][i].op == 2)q.push(Stu{x[k][i].c, 1});else {28 行未改动r = mid;}res = 0;int t = cal(0, l) + cal(1, l);if(t < k)cout << -1 << endl;elsecout << res - l * k << endl;return 0;2 行未改动28 行未改动293031323334353637383928 行未改动6869707172737475762 行未改动28 行未改动};priority_queue<Stu> q;int res;int cal(int k, int d) {while(!q.empty())q.pop();int ans = 0;for (int i = 1; i <= tot[k]; i++) {if(x[k][i].op == 2)q.push(Stu{x[k][i].c, 1});else {28 行未改动r = mid;}res = 0;int t = cal(0, l) + cal(1, l);if(t < k)cout << -1 << endl;elsecout << res - l * k << endl;return 0;2 行未改动