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

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

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!!

  • Проголосовать: нравится
  • +17
  • Проголосовать: не нравится

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

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.