Help_Needed_'s blog

By Help_Needed_, history, 3 years ago, In English

Given n piles of stones, and there are only 2 kinds of move.

  • Remove non-zero number of stones from one of the pile
  • Divide one of the pile into 2 piles(not necessarily equal), and remove stone from one of the two newly formed piles.

Two players are playing this game, who will win?

Constraints: 1 <= sum of stones in all the piles <= 10^5

Full text and comments »

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

By Help_Needed_, history, 3 years ago, In English

Can anyone please help me in one problem?

Problem: You are given a an undirected connected graph, and Q queries, in each query you will be given a vertex 'v' and output for each query should be largest connected component size after removal of vertex 'v'.

number of nodes <= 10^5

queries <= 10^5

Note: Queries are independent.

Full text and comments »

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

By Help_Needed_, history, 3 years ago, In English

how to solve this problem?

Full text and comments »

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