Блог пользователя Astroflexx

Автор Astroflexx, история, 12 месяцев назад, По-английски

I attempted to solve this problem E — Count Sequences 2 from the recent ABC. This was my submission, using my modint template. But it received WA on 45 testcases. Replacing my template with taking mod with % passed easily (submission). Is there a bug in my modint template? Please help me out, I can't figure out any mistake. The template is taken mostly from the-tourist/algo and atcoder library.

  • Проголосовать: нравится
  • -7
  • Проголосовать: не нравится

»
12 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

the unsigned int can fuck up the modulo if you under/over flow

»
12 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

The first submission wouldn't be correct with any modint implementation. Check diff between the two submissions.