Codeforces and Polygon may be unavailable from December 6, 19:00 (UTC) to December 6, 21:00 (UTC) due to technical maintenance. ×

Tensor's blog

By Tensor, 10 years ago, In English

please can anyone explain to me why we use combinations in such problems like problem D ?!

thanks in advance and happy new year :-)

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
10 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Otherwise you cannot calculate the answer. No of triplets=n*(n-1)*(n-2) and n<=10^5. This means roughly 10^15 triplets which cannot be calculated individually. So you have to use combinations to generate the answer.

  • »
    »
    10 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    thank you for replying ... i can see why now :-)

»
10 years ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

Offtopic in first edit.

Also Happy New Year! =)

»
10 years ago, # |
Rev. 2   Vote: I like it +1 Vote: I do not like it

UPD: never mind

»
10 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Your Handle seems to be a new year present :P

  • »
    »
    10 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    yeah xD ... I see you got your present too :')

    Happy New Year xD