I think that many people cheated while solving 1918C - XOR-distance in the recent round Codeforces Round 922 (Div. 2).
All the following codes are quite similar to this code:
ll a,b,c; cin>>a>>b>>c;
if(a<b) swap(a,b);
ll ans = a-b, cnt=0, mn=ans;
for(int i=60; i>=0; i--){
if(((b>>i)&1)==0 && ((a>>i)&1)==1 && cnt+(1ll<<i)<=c){
if(ans>=2*(1ll<<i)){
cnt+=(1ll<<i);
ans-=2*(1ll<<i);
}
else{
mn = min(mn,2*(1ll<<i)-ans);
}
}
}
cout<<min(ans,mn)<<endl;
I found some codes which are pretty similar:
- 244143635
- 244143608
- 244143291
- 244145231
- 244145223
- 244145221
- 244145187
- 244145165
- 244144917 (interesting blank lines btw)
- 244144909
These are just a few, but there are many more. I imagine that the code was published somewhere and everyone copied from there, but I couldn't find the source (if anyone finds it, please comment).