As said in this comment, More than half of the ACs on Problem E from the last Edu round are simply Cheated. I mean why the hell are we investing our time & energy for CF rounds?
Before my eyes chatGPT took around 3min to come up with
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MOD = 998244353;
// Fast modular exponentiation mod MOD.
ll modexp(ll base, ll exp) {
ll res = 1 % MOD;
base %= MOD;
while(exp > 0){
if(exp & 1) res = (res * base) % MOD;
base = (base * base) % MOD;
exp >>= 1;
}
return res;
}
// Iterative digit DP to compute Q(A,B):
// Q(A,B) = number of quadruples (p,q,r,s) with 0 <= p < q <= A, 0 <= r < s <= B
// such that p XOR q equals r XOR s, computed mod MOD.
ll computeQuadrupleCount(ll A_val, ll B_val) {
// Compute bit–lengths.
int bitsA = 0, bitsB = 0;
{
ll tmp = A_val;
if(tmp == 0) bitsA = 1;
else while(tmp > 0){ bitsA++; tmp >>= 1; }
}
{
ll tmp = B_val;
if(tmp == 0) bitsB = 1;
else while(tmp > 0){ bitsB++; tmp >>= 1; }
}
int R = max(bitsA, bitsB);
// Build binary representations (length R, index 0 = MSB).
vector<int> A_bits(R, 0), B_bits(R, 0);
for (int i = 0; i < R; i++){
int pos = R - 1 - i;
A_bits[i] = ((A_val >> pos) & 1LL) ? 1 : 0;
}
for (int i = 0; i < R; i++){
int pos = R - 1 - i;
B_bits[i] = ((B_val >> pos) & 1LL) ? 1 : 0;
}
// Our DP state for each pair consists of 3 bits:
// For the A–pair (p,q):
// - ta: whether p is still “tight” with A’s prefix,
// - tb: whether q is still “tight”,
// - oa: order flag (0 means not yet determined that p < q; 1 means p < q already).
// For the B–pair (r,s): similarly (tu, tv, ob).
// We encode these 6 flags into an integer (bits: ta at bit5, tb at bit4, oa at bit3,
// tu at bit2, tv at bit1, ob at bit0). (There are 64 states.)
const int STATE_COUNT = 1 << 6;
// dp[i][state]: number of ways to assign bits from position i to R-1.
vector<vector<ll>> dp(R+1, vector<ll>(STATE_COUNT, 0));
// initial state: for A–pair, ta=1, tb=1, oa=0; for B–pair, tu=1, tv=1, ob=0.
// That is encoded as: (1<<5) | (1<<4) | (0<<3) | (1<<2) | (1<<1) | (0) = 54.
dp[0][54] = 1;
// Process positions 0..R-1.
for (int pos = 0; pos < R; pos++){
int A_cur = A_bits[pos]; // current bit of A
int B_cur = B_bits[pos]; // current bit of B
for (int st = 0; st < STATE_COUNT; st++){
ll ways = dp[pos][st];
if(!ways) continue;
// Decode state:
int ta = (st >> 5) & 1; // A–pair: p is tight?
int tb = (st >> 4) & 1; // A–pair: q is tight?
int oa = (st >> 3) & 1; // A–pair: order determined? (p < q)
int tu = (st >> 2) & 1; // B–pair: r is tight?
int tv = (st >> 1) & 1; // B–pair: s is tight?
int ob = st & 1; // B–pair: order determined? (r < s)
// For the A–pair, choose bits (aBit, bBit) for (p, q).
// If order is not yet determined (oa==0), we disallow (1,0) because that would make p > q.
vector<pair<int,int>> choicesA;
if(oa == 0){
choicesA.push_back({0,0});
choicesA.push_back({0,1});
choicesA.push_back({1,1});
} else {
// If order is already determined, any pair is allowed.
choicesA.push_back({0,0});
choicesA.push_back({0,1});
choicesA.push_back({1,0});
choicesA.push_back({1,1});
}
// Similarly for the B–pair.
vector<pair<int,int>> choicesB;
if(ob == 0){
choicesB.push_back({0,0});
choicesB.push_back({0,1});
choicesB.push_back({1,1});
} else {
choicesB.push_back({0,0});
choicesB.push_back({0,1});
choicesB.push_back({1,0});
choicesB.push_back({1,1});
}
for(auto &pChoice: choicesA) {
int aBit = pChoice.first, bBit = pChoice.second;
// Check tight constraints for A: if still tight, the chosen bit cannot exceed the corresponding bit of A.
if(ta && aBit > A_cur) continue;
if(tb && bBit > A_cur) continue;
int nta = (ta && (aBit == A_cur)) ? 1 : 0;
int ntb = (tb && (bBit == A_cur)) ? 1 : 0;
// Update order flag: if not already determined and aBit < bBit, then order becomes determined.
int noa = oa;
if(oa == 0 && aBit < bBit) noa = 1;
for(auto &rChoice: choicesB) {
int uBit = rChoice.first, vBit = rChoice.second;
if(tu && uBit > B_cur) continue;
if(tv && vBit > B_cur) continue;
int ntu = (tu && (uBit == B_cur)) ? 1 : 0;
int ntv = (tv && (vBit == B_cur)) ? 1 : 0;
int nob = ob;
if(ob == 0 && uBit < vBit) nob = 1;
// Enforce: (aBit XOR bBit) must equal (uBit XOR vBit)
if((aBit ^ bBit) != (uBit ^ vBit)) continue;
int nst = (nta << 5) | (ntb << 4) | (noa << 3) | (ntu << 2) | (ntv << 1) | (nob);
dp[pos+1][nst] = (dp[pos+1][nst] + ways) % MOD;
}
}
}
}
// Sum over final states (pos==R) that have order flags 1 for both pairs (i.e. p<q and r<s hold).
ll res = 0;
for (int st = 0; st < STATE_COUNT; st++){
int oa = (st >> 3) & 1;
int ob = st & 1;
if(oa == 1 && ob == 1)
res = (res + dp[R][st]) % MOD;
}
return res;
}
// Main – combine the four cases.
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int t;
cin >> t;
while(t--){
// Read: n, m, A, B.
ll n, m, A, B;
cin >> n >> m >> A >> B;
// Case 1: Both arrays constant.
ll case1 = ((A + 1) % MOD) * ((B + 1) % MOD) % MOD;
// Precompute 2^n and 2^m mod MOD.
ll two_n = modexp(2, n);
ll two_m = modexp(2, m);
// For arrays that are exactly 2–valued, the count is:
// (number of ways to choose an unordered pair from [0,X]) * (2^L - 2)
// with X = A for a and X = B for b.
ll chooseA = (((A + 1) * A) / 2) % MOD; // = binom(A+1,2)
ll chooseB = (((B + 1) * B) / 2) % MOD; // = binom(B+1,2)
// Case 2: a constant, b exactly 2–valued.
ll case2 = ((A + 1) % MOD) * (chooseB * ((two_m - 2 + MOD) % MOD) % MOD) % MOD;
// Case 3: a exactly 2–valued, b constant.
ll case3 = ((B + 1) % MOD) * (chooseA * ((two_n - 2 + MOD) % MOD) % MOD) % MOD;
// Case 4: both arrays exactly 2–valued AND the two chosen unordered pairs have the same XOR difference.
ll QAB = computeQuadrupleCount(A, B); // computed mod MOD
ll case4 = (((two_n - 2 + MOD) % MOD) * ((two_m - 2 + MOD) % MOD)) % MOD;
case4 = (case4 * QAB) % MOD;
ll ans = (case1 + case2 + case3 + case4) % MOD;
if(ans < 0) ans += MOD;
cout << ans % MOD << "\n";
}
return 0;
}
which even got accepted in a single submission! This is just madness!!
People getting into top 10 with just ChatGPT nowadays, like bdyby2010010, malikhuhuna5! Seems like this is the end of online contests.
I woke up from a terrible dream, saw one of my friends crying badly who wasted three years of his life in our Unversity's Competitive Programming Lab just dreaming about doing well in CF rounds and still stuck at Expert!
Enough is enough. Something needs to done soon! Boycott CF until they can take any visible measure!
ironically, the image was generated with ai
What does cronc answer mean
It is not cronc but crong. but your question is still valid what does wrong means
Boycotting CF won't change anything,these losers will ruin other platforms too.Their motive isn't to improve,its to show off or satisfy their false ego's that they are really good at something.The satisfaction you have after solving a hard problem during contest by yourself is a far distant feeling for them.Only solution is to strengthen plag detector and making accused start from 0 (or maybe even less -50 or something). However, this is all easier said than done.
it's easy to say that as you have given only 1 contest, but it hurts when you have spent more than one year and still grey, by the way i like your profile name.
Yeah you can say that as i haven't given even 5 contests but i do know the current scenario for users who are legit and are working hard daily.But still i do have some hope,so you should too.
yeh i do have, thanks
Boycotting CF is stupid. Every week CF provides you fresh problems. You should be grateful for that.
There will be cheaters always. I don't think Mike is standing around doing nothing. Just be in patience.
Years ago I was cursing TopCoder for its hard to use Arena Applet.
Now I am actually thinking that a standalone app with monitoring and You-Can-Only-Type-In-This-Box style problem page is not a Bad Idea (TM), at least for combating AI generated code
Bro people have keyboard, they can type.
This solution only delays all the submissions, but fixes nothing.
What model of ChatGPT did you use?
Default model
"TIME LIMIT EXCEEIDED"
"VRONG ANSWER"
"CRONC ANSWER"
lol AI is so bad in generating these images
Because of these cheaters, many of us are losing interest in problem solving nowadays. Measures should be taken against them to keep this domain as exciting as it was! It's been 6 years, I still feel the same way I did when I first saw 'Accepted'...
I really appreciate your resilience sir, your level of patience and passion for CP is impressive.
Thanks a lot, bro. It's not over until I win...
Bro I know this is very concerning but let them do whatever they want to do we will give contest in a honest manner. Because most of the ppl do cp to get good job, in India it is the most probable case i don't know about other countries so they will feel like hell during the interview(dsa)...
I know cheating is bad, really bad but I simply do CP because of the passion and the need of improving at problem solving, I don't really care about my rank or other's rank. I think whether they cheat or not, it does not affect me at all. It's not like video games (Counter-Strike for example) where cheaters can ruin your games. In the world of online CP contests, they could not. We still have contests to participate, problems to solve. Try to ignore the cheaters, it's not worth it.
Artificial intelligence-based cheating threatens the integrity of coding contests. For integrity to reign, I would like to implement stricter practices like:
ChatGPTs code is so pleasent to read. I can understand essentially everything.
CP is not about rating. It's about your personal growth
This is the example of disputing an argument which never has been written, said nor implied. Personal growth is the main motivation for people who do not cheat. I doubt you can seriously do CP without concerning about it. But let's be honest: when you do any hobby or sports, most of your excitement comes from a competitive part of the stuff. We are social creatures and get lots of emotional feedback from social incentives. You read the rules, you obey them and then get more and more successful over time. This of course leads to your personal growth, but good performance within the rules gives you great satisfaction. And when you encounter a massive rule violation, you lose that and get discouraged. You can't just say, "ignore the cheaters and do your own stuff".