yosako's blog

By yosako, history, 2 years ago, In English

I forgot to mention K <= 10^18 and A[i] <= 10^9. Please help !!!

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

| Write comment?
»
2 years ago, # |
  Vote: I like it +5 Vote: I do not like it

You can solve it using Inclusion Exclusion, but becareful of overflow

»
2 years ago, # |
  Vote: I like it +5 Vote: I do not like it

google "solution to CSES 2185" and paste the link of the problem next time.