版本比较
2026/3/13 蒋
正文
增加 26 行删除 26 行
10 行未改动1112131415151617181920192021222324252627282829303132333435363738383940414221 行未改动646566676868697071727374757677777879808113 行未改动95969798999910010110210210310410510510610710810911011111111211311411511611711811811912012112212312412512612712812812913013113231 行未改动1641651661671681681691701711721731741741751761771771781791791801811821835 行未改动18919019119219319419519319419519619719819920020120220320420320420520620720823 行未改动2322332342352362362372382392407 行未改动2482492502512522522532542552562572572582592602615 行未改动2672682692702712712722732742754 行未改动10 行未改动#include<bits/stdc++.h>
using namespace std;
int t, n, m; int t, n, m;
void solve(){ cin >> n >> m; cin >> n >> m;
if(m % 2 != 0) { if(n == 0) { cout << "No" << "\n"; return ; }
cout << "Yes" << "\n"; } else { if(n != 0) { cout << "No" << "\n"; return ; }
cout << "Yes" << "\n"; }}
21 行未改动## 代码:```cpp#include<bits/stdc++.h>
#define int long long #define int long long
using namespace std;
int t, n;
void solve(){ cin >> n;
string sa = "", sb = ""; int o = 0; for(int i = 30; i >= 0; i--) {13 行未改动 } } else { if(o < 2) if(o < 2) { sa += '0'; sb += '0'; sb += '0'; } else { { sa += '1'; sb += '1'; } } }
int a = 0, b = 0, chang = 1; for(int i = 0; i < sa.size(); i++) { a = a * 2 + (sa[i] - '0'); b = b * 2 + (sb[i] - '0'); }
cout << a + b << "\n"; return ;}
signed main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
cin >> t; while(t--) { solve();31 行未改动 for(int i = 1; i <= n; i++) { cin >> a[i]; }
int o = a[1]; for(int i = 2; i <= n; i++) { o ^= a[i]; }
for(int i = 1; i <= n; i++) { a[i] ^= o; a[i] ^= o; }
if(n % 2 == 1) { for(int i = 1; i <= n; i++) {5 行未改动 if(k % 2 == 1) { for(int i = 1; i <= n; i++) { cout << a[i] << " "; } } cout << a[i] << " "; } } else { for(int i = 1; i <= n; i++) { cout << (a[i] ^ o) << " "; } } } }
cout << "\n"; } return 0;}23 行未改动 for(int i = 1; i <= n; i++) { cin >> s[i]; }
int maxi = -1e9; for(int i = 0; i < s[1].size(); i++) { int ans1 = 0, ans0 = 0;7 行未改动 { ans1++; } }
if(ans1 >= 2 && ans0 >= 1) { continue; }
if(ans1 >= 2) { maxi = max(maxi, 1); }5 行未改动 { maxi = max(maxi, 2 - ans1 + 1); } }
if(maxi == -1e9) { maxi = 0; }4 行未改动