版本比较
contest 127046 solution
正文
增加 10 行删除 10 行
100 行未改动101102103104105105106107108107108109110111112123 行未改动全部展开2362372382392402402412422432442 行未改动24724824925025125125225325325425525625625725825825926026126228 行未改动29129229329429529529629729829974 行未改动37437537637737837837938038138217 行未改动100 行未改动using namespace std;typedef long long ll;const int N = 200005, M = 25;int n, m, a, b, c;struct kuai struct kuai{ int x, y, z; bool operator < (const kuai cmp) const int x, y, z; bool operator < (const kuai cmp) const { return x < cmp.x; }} q[N];123 行未改动全部展开
```cpp#include <bits/stdc++.h>using namespace std;typedef long long ll; typedef long long ll;const int N = 1048600;int m, a, b, op, x[25], y[25];deque <int> q;ll ans, f[N], g;2 行未改动 int len = q.size(), mid = len / 2;// for (int i = 1; i <= len; i++)// cerr << q.front() << " ", q.push_back(q.front()), q.pop_front(); ans = 0; for (int i = 1; i <= mid; i++) for (int i = 1; i <= mid; i++) { x[i] = q.front(); x[i] = q.front(); q.push_back(x[i]); q.pop_front(); } for (int i = mid + 1; i <= len; i++) for (int i = mid + 1; i <= len; i++) { y[i - mid] = q.front(); y[i - mid] = q.front(); q.push_back(y[i - mid]); q.pop_front(); } memset(f, 0, sizeof(f)); for (int S = 0; S < (1 << mid); S++)28 行未改动 case 4: q.pop_back(); break; case 5: cin >> a >> b; work(a, b); break; default: cout << "qwq"; break; }// cerr << q.size() << "\n"; // cerr << q.size() << "\n"; } return 0;}```74 行未改动signed main(){ // freopen("temp.in","r",stdin); // freopen("std.out","w",stdout); scanf("%d%d",&n,&q); for(int i=1;i<=n;i++)scanf("%d",&c[i]); for(int i=1;i<=n;i++)scanf("%d",&c[i]); for(int i=1;i<n;i++){ int x,y; scanf("%d%d",&x,&y); e[x].push_back(y);e[y].push_back(x);17 行未改动