Блог пользователя jackylova_fan_fan_fan

Автор jackylova_fan_fan_fan, история, 23 месяца назад, По-английски

In problem 2028F - Alice's Adventures in Addition, when I hack other's code, the return verdict is "Unexpected verdict", can someone tells me why, thanks.

@applepi216

And this is my generator

#include<bits/stdc++.h>
using namespace std;
mt19937 rnd(233);
main()
{
	int t=1,n=2e5,m=1e4;
	cout<<t<<endl;
	cout<<n<<' '<<m<<endl;
	for(int i=1;i<=n;i++)
	{
		if(i==1||i==2)cout<<1;
		else if(i==n)cout<<int(1e4);
		else
		{
			if(rnd()%1000==0)cout<<0;
			else cout<<2;
		}
		cout<<" \n"[i==n];
	}
}
  • Проголосовать: нравится
  • +28
  • Проголосовать: не нравится

»
23 месяца назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I think you might have accidentally hacked Codeforces' code instead of the other's code

»
23 месяца назад, скрыть # |
 
Проголосовать: нравится +64 Проголосовать: не нравится

It means that your hack managed to hack an intended solution. So you hacked the solution of an author or a tester, which was intended to pass.

»
23 месяца назад, скрыть # |
 
Проголосовать: нравится +13 Проголосовать: не нравится

Pypy sometimes has branch misprediction, and it seems this testcase sometimes causes that (I'm able to reproduce it infrequently locally). This should be fixed now, thanks!