# WA WEASELTX (SEPT17)

I am Getting WA i WEASELTX From Sept Long Challenge 2017

Need TESTCASE for which my code is Failing.

Link to Problem :https://www.codechef.com/SEPT17/problems/WEASELTX/

Link to solution : https://www.codechef.com/viewsolution/15403653

PS : Not failing on delta = 0.

4 3

0 1

1 2

0 3

1 5 8 7

0

1

2

Note that Delta can be 0.

The random variables and stuff were so hard to figure out. Please try to give some comments atleast that what stuff is done by what.

There you go.

``````Input
4 4
0 1
1 2
0 3
1 5 8 7
1
2
30000000000000
4
Your Output
RE:SIGEMT
``````

The fault-

``````ll bb[600];
.
.
.
for(c=0;c<b;c++)
{
cin>>d;//   fs(d);//d can be upto 10^18
cout<<bb[d]<<"\n";
}
``````

Test case-

``````Input
8 7
0 1
1 2
2 3
3 4
4 5
4 6
4 7
0 0 0 0 0 1 0 0
1
2
3
4
5
6
7
Your Output
1
0
1
0
0
0
0
Expected Output
1
0
1
0
0
1
0``````

Still Getting WA !!

Ya, that was a mistake.
But Still Getting WA after correcting it.
I have compared the test cases with solutions which Got AC but still couldnâ€™t find my mistake.
https://www.codechef.com/viewsolution/15416462

The mistake is obvious. The size of bb is just 600. It should atleast be as much as N, but then you will get TLE instead of WA in final subtask. There can be as many as N different values for del, so if you are storing only 600 of those, some values are getting lost.

https://www.codechef.com/viewsolution/15416516

But if it is correct then It should run for atleast first subtask Where no of days is less than equal to 500

I appreciate the comments in the code. Looking at your code, just commented to tell that I appreciate that you inserted comments for better understanding

1 Like