Khkazz's blog

By Khkazz, history, 3 months ago, In English

Hello CODEFORCES,

In the recent Codeforces Round 1109 (Div. 3), the problem D has a testcase added due to incorrect hack, which fails to follow the problem's constraints.

During the contest my submission was Accepted, but it turned to WA on testcase #8. After further pondering over the hacks on problem D, I found the hack responsible for the addition of the testcase. (Hack #1178111 by Carnade on Krypt0x).

The constraints of problem D stated that the elements of B will be distinct.

But the hack generation script generated multiple instances of element 131293 in array B.

n=200000
#print (n,0,10**9)
mask = (1<<17) - 1
fill = int((1<<15)*1.3+1)
arr = [mask+2]*2
x = 6
for i in range(1,fill):
    arr.append(x)
    x = x * 5 + 1
    x = x & mask
arr.extend([131293]*(n-len(arr)))
arr.sort()
#max_value = 2*10**5
N = n
print(1)
print(N,N)
print(*arr)
print(*arr)

I would request the setter itz_pabloo and coordinator Vladosiya to please verify this claim, as lots of participants may have gotten incorrect WA, due to the faulty testcase.

Thank you so much for preparing and organizing this contest!!

  • Vote: I like it
  • +17
  • Vote: I do not like it

»
3 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Thanks a lot for pointing out! There was a bug in validation, which let such test to system tests. We will fix it and rejudge affected solutions soon.