OneHotEncoderr's blog

By OneHotEncoderr, 4 years ago, In English

I'm trying to solve this graph problem.

My idea so far is:
1.Build dfs tree.
2.Direct every span edge upwards.
3.Direct every back-edge downwards.
4.Traverse tree from the bottom (i.e. maximum level vertices).
5.Do the operation 2(instruction no. 2) described in the problem.
6.Flip the back-edges for the vertices which are at the current level(L).Move to the next level(i.e L-1)
7.Stop when we reach the root.

But This approach is using more than 700 moves of the 2nd type, which exceeds the limit.
Does anyone have a better approach?

Full text and comments »

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

By OneHotEncoderr, history, 4 years ago, In English

Lately I've noticed that there have been very few(almost none) Graph,Binary Search,Data Structures,Two Pointer,Dp (and other known concept) problems in Div.2 C and Div2 D. Most of Div2C&D have been contructive problems. It's kind of a trend now. I don't hate these problems but why are Div2 A,B,C,D all based on some logic and don't use any of the well known concepts like binary search,Data Structures,graph,Dp etc. I mean I would like to see all kind of problems rather than just constructive in every contest. Have you guys noticed this as well ?Why are contest setters doing so?

Tagging some problem setters to find out the reason :DeadlyCritic Ashishgup awoo BledDest MagentaCobra vovuh adedalic Monogon Errichto antontrygubO_o Ari Roms

Full text and comments »

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