正文
增加 4 行删除 4 行
33 行未改动34353637383940414224 行未改动67686970717273747514 行未改动9091929394959697989910010110210310410533 行未改动```cpp#include<bits/stdc++.h>using namespace std;const int N = 2e3 + 5, M = 1e6 + 2e3 + 5, C = 1e7, inf = 1e9;int k, n, x, a[N], s, t, L, R;int head[N], now[N], tot = 1;int dep[N], ans;bool yfz[C + 5];24 行未改动if(!k) dep[v] = inf;e[i].w -= k, e[i ^ 1].w += k;sum -= k, res += k;}return res;}inline bool check(int p){if(p <= 2 || p % 2 == 0) return false;for(int i = 2; i * i <= p;++i)14 行未改动else add(j, i, 1), add(i, j, 0);}}inline void solve(){while(bfs()) ans += dfs(s, inf);int pipei = ans;ans += (L - pipei) / 2 * 2 + (R - pipei) / 2 * 2;if((L - pipei) & 1) ans += 3;}signed main(){build();solve();cout << ans;return 0;}```33 行未改动34353637383940414224 行未改动67686970717273747514 行未改动9091929394959697989910010110210310410533 行未改动```cpp#include<bits/stdc++.h>using namespace std;const int N = 2e3 + 5, M = 1e6 + 2e3 + 5, C = 1e7, inf = 1e9;int k, n, x, a[N], s, t, L, R;int head[N], now[N], tot = 1;int dep[N], ans;bool yfz[C + 5];24 行未改动if(!k) dep[v] = inf;e[i].w -= k, e[i ^ 1].w += k;sum -= k, res += k;}return res;}inline bool check(int p){if(p <= 2 || p % 2 == 0) return false;for(int i = 2; i * i <= p;++i)14 行未改动else add(j, i, 1), add(i, j, 0);}}inline void solve(){while(bfs()) ans += dfs(s, inf);int pipei = ans;ans += (L - pipei) / 2 * 2 + (R - pipei) / 2 * 2;if((L - pipei) & 1) ans += 3;}signed main(){build();solve();cout << ans;return 0;}```