After Educational Codeforces Round 120, I went through all the successful hacks and found something suspicious. A couple submissions of the same problem (problem A) by an account called [user:SIMON_MOLODETS,2021-12-29] have been successfully hacked. I got curious and viewed his code, and this is what I found:↵
[submission:140819355] [submission:140819499] [submission:140819706] [submission:140819908] [submission:140820020] [submission:140820234] [submission:140820399] [submission:140820592] [submission:140820839]↵
↵
The following is one of his submissions:↵
↵
~~~~~↵
#include <iostream>↵
#include <vector>↵
#include <algorithm>↵
using namespace std;↵
int main(){↵
int n;↵
cin>>n;↵
if(n!=67){↵
for(int i=0;i<n;i++){↵
int a;↵
int b;↵
int c;↵
cin>>a>>b>>c;↵
if(a+b==c or a+c==b or c+b==a) {↵
cout<<"YES"<<"\n";↵
continue;↵
}↵
if((a==b and c%2==0) or (c==b and a%2==0) or (a==c and b%2==0)){↵
cout<<"YES"<<"\n";↵
continue;↵
}↵
else{↵
cout<<"NO"<<"\n";↵
}↵
} ↵
}↵
else{↵
for(int i=0;i<67;i++){↵
cout<<"NO"<<"\n";↵
}↵
}↵
}↵
~~~~~↵
↵
All the submissions above are almost identical. The only difference between them is line 8. He used if(n!=67) to deliberately output a wrong answer on specific inputs that did not appear in the pretests, in order to trick the judge into believing the code is correct, and thenused another account to hacked the code with the specific inputs using other accounts. I believe this is a form of cheating and anyone who does this should be punished, but it doesn't seem to be in the rules.
[submission:140819355] [submission:140819499] [submission:140819706] [submission:140819908] [submission:140820020] [submission:140820234] [submission:140820399] [submission:140820592] [submission:140820839]↵
↵
The following is one of his submissions:↵
↵
~~~~~↵
#include <iostream>↵
#include <vector>↵
#include <algorithm>↵
using namespace std;↵
int main(){↵
int n;↵
cin>>n;↵
if(n!=67){↵
for(int i=0;i<n;i++){↵
int a;↵
int b;↵
int c;↵
cin>>a>>b>>c;↵
if(a+b==c or a+c==b or c+b==a) {↵
cout<<"YES"<<"\n";↵
continue;↵
}↵
if((a==b and c%2==0) or (c==b and a%2==0) or (a==c and b%2==0)){↵
cout<<"YES"<<"\n";↵
continue;↵
}↵
else{↵
cout<<"NO"<<"\n";↵
}↵
} ↵
}↵
else{↵
for(int i=0;i<67;i++){↵
cout<<"NO"<<"\n";↵
}↵
}↵
}↵
~~~~~↵
↵
All the submissions above are almost identical. The only difference between them is line 8. He used if(n!=67) to deliberately output a wrong answer on specific inputs that did not appear in the pretests, in order to trick the judge into believing the code is correct, and then