正文
增加 15 行删除 15 行
32 行未改动33343536373839404126 行未改动686970717273747576777879808182838485868788899023 行未改动11411511611711811912012112212312412512668 行未改动19519619719819920020120220313 行未改动21721821922022122222322422522622722822923023123242 行未改动27527627727827928028128228331 行未改动3153163173183193203213223236 行未改动33033133233333433533633733833934034134211 行未改动3543553563573583593603613625 行未改动32 行未改动int T, n;int gcd(int x, int y) {return y ? gcd(y, x % y) : x;}int U(int x) {while(1) {x++;26 行未改动}}signed main() {ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);cin >> T;while(T--) {cin >> n;int u = U(n), v = V(n);int ans1 = u * v - u * 2 - v * 2 + n * 2 + 2, ans2 = u * v * 2, w = gcd(ans1, ans2);ans1 /= w;ans2 /= w;cout << ans1 << "/" << ans2 << "\n";}return 0;}```23 行未改动return (i - 1) * m + j;}signed main() {ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);cin >> n >> m;for(int i = 1; i <= n; i++) {cin >> s[i];s[i] = " " + s[i];68 行未改动}else {cout << dis[id(tx, ty)]<< "\n";}return 0;}```13 行未改动const int N = 2010, M = 110;int n, k, m, dp[M][M][N][2], a[N], b[N], c[N], w[M][N], lsh[N], lshc, ans;// dp[l][r][t][0/1] 代表当前访问过的区间为[l,r],用时为t,当前位置在最左侧/最右侧时的最大分数int main() {ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);cin >> n >> k >> m;for(int i = 1; i <= m; i++) {cin >> a[i] >> b[i] >> c[i];lsh[++lshc] = a[i];42 行未改动}}}cout << ans << "\n";return 0;}```31 行未改动}dfs1(y, x);dp[x] += dp[y] + sz[y] * max(0ll, w - a[x]);sz[x] += sz[y];}}void dfs2(int x, int fa) {for(int i = 0; i < E[x].size(); i++) {6 行未改动}}signed main() {ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);cin >> n;for(int i = 1; i <= n; i++) {cin >> a[i];}11 行未改动ans1 = dp[i];}}cout << ans2 << "\n" << ans1 << "\n";return 0;}```5 行未改动32 行未改动33343536373839404126 行未改动686970717273747576777879808182838485868788899023 行未改动11411511611711811912012112212312412512668 行未改动19519619719819920020120220313 行未改动21721821922022122222322422522622722822923023123242 行未改动27527627727827928028128228331 行未改动3153163173183193203213223236 行未改动33033133233333433533633733833934034134211 行未改动3543553563573583593603613625 行未改动32 行未改动int T, n;int gcd(int x, int y) {return y ? gcd(y, x % y) : x;}int U(int x) {while(1) {x++;26 行未改动}}signed main() {ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);cin >> T;while(T--) {cin >> n;int u = U(n), v = V(n);int ans1 = u * v - u * 2 - v * 2 + n * 2 + 2, ans2 = u * v * 2, w = gcd(ans1, ans2);ans1 /= w;ans2 /= w;cout << ans1 << "/" << ans2 << "\n";}return 0;}```23 行未改动return (i - 1) * m + j;}signed main() {ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);cin >> n >> m;for(int i = 1; i <= n; i++) {cin >> s[i];s[i] = " " + s[i];68 行未改动}else {cout << dis[id(tx, ty)]<< "\n";}return 0;}```13 行未改动const int N = 2010, M = 110;int n, k, m, dp[M][M][N][2], a[N], b[N], c[N], w[M][N], lsh[N], lshc, ans;// dp[l][r][t][0/1] 代表当前访问过的区间为[l,r],用时为t,当前位置在最左侧/最右侧时的最大分数int main() {ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);cin >> n >> k >> m;for(int i = 1; i <= m; i++) {cin >> a[i] >> b[i] >> c[i];lsh[++lshc] = a[i];42 行未改动}}}cout << ans << "\n";return 0;}```31 行未改动}dfs1(y, x);dp[x] += dp[y] + sz[y] * max(0ll, w - a[x]);sz[x] += sz[y];}}void dfs2(int x, int fa) {for(int i = 0; i < E[x].size(); i++) {6 行未改动}}signed main() {ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);cin >> n;for(int i = 1; i <= n; i++) {cin >> a[i];}11 行未改动ans1 = dp[i];}}cout << ans2 << "\n" << ans1 << "\n";return 0;}```5 行未改动