frissky9's blog

By frissky9, history, 9 hours ago, In English

Hey! I hope you all are doing good.

I have been trying to figure out the solution for the problem. I am maintaining the state as [x][y][prevDir] as, the prevDir i took to reach [x][y], and pushing the new co-ordinate with same steps if newDir is same as prevDir else steps + 1, but its kinda confusing how to fix the direction for any cell as for example:

If the grid is:

S . .

X X .

F . .

We can reach grid[2][0] by [0][2] and [0][1] and now its kinda confusing what direction I should give [1][2] to move forward, as I know it should have [1][2][D] as it will give me optimal solution but [0][1] pushes [1][2] first so it sets [1][2][RD]. I hope I was able to explain my confusion.

Code

Thank you!!

Full text and comments »

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

By frissky9, history, 3 months ago, In English

Hey! I just wanna know is there any atcoder's delta predictor as an extension like carrot for Codeforces (or any alternative).

Thank you!!

Full text and comments »

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