imtinanjibon's blog

By imtinanjibon, history, 5 years ago, In English

I am trying to solve 1358C - Celex Update . Here is my submission 81604588 but getting runtime error. how can i fix this?

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

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

First of all, the answer is not $$$^{N}C_M$$$ as you think. You might want to think again or check the editorial.
Secondly, factorial grows faster than exponential, so it won't fit the integer limit or even long long after a small n. The submission shows the exception and the line number so you can try replacing the int by long long but I'm pretty sure it still won't help.