版本比较
Educational Codeforces Round 118 比赛记录
正文
增加 5 行删除 5 行
49 行未改动50515253545556575849 行未改动10810911011111211311411511630 行未改动14714814915015115215315415530 行未改动18618718818919019119219319449 行未改动24424524624724824925025125223 行未改动49 行未改动#### 代码```cpp#include <iostream>#include <cstdio>using namespace std;int main() {int T; cin >> T;while (T--) {49 行未改动int m = n / 2;for (int i = 1; i <= n; i++) cin >> a[i];sort(a + 1, a + n + 1);n = unique(a + 1, a + n + 1) - a - 1;for (int i = 2; i <= m + 1; i++) cout << a[i] << ' ' << a[1] << '\n';}return 0;}```30 行未改动if (check(mid)) ans = mid, r = mid - 1;else l = mid + 1;}cout << ans << '\n';}return 0;}```### D. MEX Sequences30 行未改动using namespace std;int n, a[500005], dp[500005][2];signed main() {ios::sync_with_stdio(false);cin.tie(NULL), cout.tie(NULL);int T; cin >> T;while (T--) {cin >> n;for (int i = 1; i <= n; i++) cin >> a[i];49 行未改动int xx = x + dx[i], yy = y + dy[i];if (xx < 0 || yy < 0 || xx >= n || yy >= m) continue;if (a[xx][yy] == '.') dfs(xx, yy);}}}int main() {int T; cin >> T;while (T--) {23 行未改动49 行未改动50515253545556575849 行未改动10810911011111211311411511630 行未改动14714814915015115215315415530 行未改动18618718818919019119219319449 行未改动24424524624724824925025125223 行未改动49 行未改动#### 代码```cpp#include <iostream>#include <cstdio>using namespace std;int main() {int T; cin >> T;while (T--) {49 行未改动int m = n / 2;for (int i = 1; i <= n; i++) cin >> a[i];sort(a + 1, a + n + 1);n = unique(a + 1, a + n + 1) - a - 1;for (int i = 2; i <= m + 1; i++) cout << a[i] << ' ' << a[1] << '\n';}return 0;}```30 行未改动if (check(mid)) ans = mid, r = mid - 1;else l = mid + 1;}cout << ans << '\n';}return 0;}```### D. MEX Sequences30 行未改动using namespace std;int n, a[500005], dp[500005][2];signed main() {ios::sync_with_stdio(false);cin.tie(NULL), cout.tie(NULL);int T; cin >> T;while (T--) {cin >> n;for (int i = 1; i <= n; i++) cin >> a[i];49 行未改动int xx = x + dx[i], yy = y + dy[i];if (xx < 0 || yy < 0 || xx >= n || yy >= m) continue;if (a[xx][yy] == '.') dfs(xx, yy);}}}int main() {int T; cin >> T;while (T--) {23 行未改动