TheDark_Knight's blog

By TheDark_Knight, history, 17 months ago, In English

Hey, I have been stuck at this problem for quite long 327E - Axis Walking. According to the editorial the author specified an approach involving "meet in the middle", but my implementation caused a TLE 76646016. Then he had mentioned that a bitmask DP approach of O(n*(2^n)) somehow unintentionally manages to pass the test cases & referenced to a particular submission 4017915. I had gone through the code but once again when implemented it caused a TLE. To figure out the reason behind this I tried to step by step make my code similar to the AC submission ( 4017915 ) mentioned in the editorial but again failed at the end with my submission as: 76648464.

Any kind of help would be appreciated.

Edit: This issue has been solved by converting all long long to int everywhere.

Read more »

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