Invalid Hack in Round 1109 (Div. 3) — Problem D

Правка en1, от Khkazz, 2026-07-15 15:00:48

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

Теги codeforces round #1109, hack, wrong testcase

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Khkazz 2026-07-15 15:00:48 1369 Initial revision (published)