Itachi_Uchiha13's blog

By Itachi_Uchiha13, history, 3 years ago, In English

In this problem 1857/F, I used a binary search to solve this. I wrote the code in Go, but it is giving TLE. I'm not very experienced with Go, so I'd really appreciate it if someone could explain why this is happening.

Link to submission: 222520517

Thanks for the help in advance!

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

| Write comment?
»
3 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by Itachi_Uchiha13 (previous revision, new revision, compare).

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

You can apply fast IO for Go.

And pass numCount by reference:

func getValue(x, y int64, numCount *map[int64]int64) int64