ARIF_30's blog

By ARIF_30, history, 6 months ago, In English

Hi everyone,

I solved a problem in the last contest and initially got a "Wrong Answer". After modifying my solution to use a map instead of a multiset, it got accepted. However, I’m not sure why my original solution with multiset failed.

Can anyone explain why using map worked while multiset didn't?

Thanks in advance for your help! https://codeforces.net/contest/1980/submission/264037860 (**WA**264037860) https://codeforces.net/contest/1980/submission/263990207 submission:263990207

Full text and comments »

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

By ARIF_30, history, 20 months ago, In English

"Are the conditions 'if(sum%2)' and 'if(sum%2==1)' the same? If not, could you please clarify the matter? If they are the same, I have two submissions, one is accepted (AC) and the other is rejected (WA), but the only difference between them is the use of the two aforementioned conditions. I would be grateful if someone could help me with this." https://codeforces.net/contest/1807/submission/199213689 (Accepted). https://codeforces.net/contest/1807/submission/199213510 (Wrong Answer).

Full text and comments »

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