artish19's blog

By artish19, history, 3 years ago, In English

This is a code template for Modular, which I copied from this. I made some changes to the code and to check, I ran this on B. Divide and Sum and it failed.

Here is my code.

Please highlight my mistake and also it will be nice if you can tell, how to better my template. Thanks.

  • Vote: I like it
  • +2
  • Vote: I do not like it

»
3 years ago, # |
  Vote: I like it +3 Vote: I do not like it
FOR(i,2*n){
    cin>>in; a[i] = in%MOD; // Ooooopssss....
}
sort(all(a));

Plus there can be counter-test on fact that $$$998244353 \lt 10^9$$$: your calculations can print number between them.

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

    now, i understand . This was a very stupid thing to do.