Vesper_Lynd's blog

By Vesper_Lynd, history, 5 years ago, In English

can anybody who has seen the problem "pylons" explain briefly about the test case 2 solution,i read the analysis section but could not understand it so it would be really helpful if someone could explain it!! LINK FOR THE PROBLEM

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

»
5 years ago, # |
  Vote: I like it +3 Vote: I do not like it

pylon can be solved in two ways. O(r*c) make 2*n,3*n split few case will fail have to hard code them in my case 4*4,4*6,6*4,6*6 https://shashankmishracoder.wordpress.com/2019/04/13/google-code-jam-2019-round1a-pylon/

another way is to use dfs and backtracks for depth r*c O(r^2*c^2) https://shashankmishracoder.wordpress.com/2019/04/13/google-code-jam-2019-round-1a-pylon-dfs-and-backtracking-approach/