Ghost0fSparta's blog

By Ghost0fSparta, history, 6 years ago, In English

I want "GhostOfSparta" handle but I am denied telling me that this handle is already taken. MikeMirzayanov please allot me this handle if it does not exist.

PS: As pointed out by dreamoon_love_AA, subhamdubeyinfo previously used this handle and has changed it now. So now I should be given access to this handle as it not not held by anybody.
PS: Settled this with "Gost0fSparta" instead of "GhostOfSparta". Hopefully the difference is not visible :p

Full text and comments »

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

By Ghost0fSparta, history, 6 years ago, In English

Hello cf, according to the editorial of 241C problem the group which will pay maximum should be assigned to the smallest sized table to which it can fit. Can anybody prove this is optimal strategy?
Also the problem has a tag of dp, so how to solve this problem using dp?
Any help is highly appreciated.

Those who are downvoting the post should kindly state why in the comments. According to me this is a perfectly valid question and I can't understand why are people downvoting it. Let me guess. Yes, they are a**holes.

Full text and comments »

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

By Ghost0fSparta, history, 6 years ago, In English

Hi CF, it is my humble request to change the time of Div3 round as it is clashing with codechef Lunchtime and many people would like to give both rounds. I am requesting CF to change the round timings as codechef announced their contest quite a time ago.

P.S. Thanks CF. Problem solved!

Full text and comments »

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

By Ghost0fSparta, 6 years ago, In English

I have coded GSS1 using segment tree but it is giving WA on test case 9. Please help
Problem My Code
EDIT: The problem is solved. Just remove the "else" from "else if" in constructST function and get it AC :) I am keeping this code here for reference to somebody who is in need of it.

Full text and comments »

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

By Ghost0fSparta, history, 7 years ago, In English

Hello CF, I have been recently trying to solve 427C. As per the editorial I have found all the strong connected components and then have found the minimum cost for each SCC component. Also I have found the number of junctions having the minimum value. But I am getting wrong answer for test case 71. My solution is here. I can't figure out my mistake can anybody help?

Let me jot down which function is doing what in my code
1) dfs_visit : Used for applying dfs on the graph provided and obtain the sequence of nodes according to their ending time which is stored in stack named seq.
2) scc_comp : Used to get the different SCCs for the reverse graph t_v which will be stored in scc.


The second issue is why are these two submissions giving different answers on Test case 71 Solution1 and Solution2.
Any optimization suggestions are also welcomed.
Thanks:)

Full text and comments »

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