Philosophi's blog

By Philosophi, history, 2 months ago, In English

Hi everyone, im currently solving this problem. I dont know why if i test on my computer, the answer is right but when i submit, i get WA. I suspect its because of some memory issues, but i cant find any.

https://mirror.codeforces.com/contest/1712/submission/366889551

Heres the test

4 1 2 2 3 1000000000

Full text and comments »

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

By Philosophi, history, 3 months ago, In English

https://mirror.codeforces.com/contest/1726/submission/365331041 Can anyone tell me where did i do wrong in this solution ? thanks

Update: My answer in the first test can be drawn in a pic like this

If we remove blue we get 2 connected components, if we remove red we get 1 connected component. So in total we get 3, which is the same with the answer. Was my understanding wrong somewhere?

Full text and comments »

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

By Philosophi, history, 13 months ago, In English

Hi everyone, I am recently solving this problem and my code is here. Can anyone tell me why i can not pass the 9th test ? thank you so much !!!

Full text and comments »

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