Codeforces Round 1133 (Div. 1, Div. 2) is coming soon! Register here. ×

gagannagpal68's blog

By gagannagpal68, history, 7 years ago, In English

My hash has 3 fields

f1 = size of interval

f2 = sum of array elements over interval(a[i] +a[i+1]...a[j])

f2 = sum of squares of array elements over interval(a[i]^2 + a[i+1]^2 .. a[j]^2).

if all 3 matches, then elements are indeed same. Can this be broken?

P.S. While in attempt to solve D from previous contest(https://codeforces.me/contest/1284/problem/D). I was looking for this question.

  • Vote: I like it
  • -25
  • Vote: I do not like it

| Write comment?
»
7 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by gagannagpal68 (previous revision, new revision, compare).

»
7 years ago, hide # |
 
Vote: I like it +10 Vote: I do not like it

(5, 12, 10) and (6, 8, 13) have the same hash.