Блог пользователя ka16

Автор ka16, история, 11 лет назад, По-английски

To get better at Golang, I decided to try solving Codeforces (CF) problems in Go. I was a bit surprised that the current Go version on CF is (out-of-dated) 1.2, while the current stable Go version is 1.5.
Having said that, my solution for this C div 2 produced correct answers for the given two sample testcases on my computer (with Go 1.5), but gave wrong answers on CF. I've looked at the issue for a while, but could not understand the cause. Could anyone give me some hint?

By the way, is there any plan to update the Go version on Codeforces? I'm not sure who (Mike Mirzayanov?) I should ask for this, though.

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
11 лет назад, скрыть # |
Rev. 3  
Проголосовать: нравится +5 Проголосовать: не нравится

add "\n" to Scanf

fmt.Scanf("%d\n", &n)
....
fmt.Scanf("%d %d %d\n", &vi, &di, &pi),

Accepted: 13594647

»
11 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +8 Проголосовать: не нравится

I would be also glad to see the update to the Go compiler.

I think it would be a positive change for the CodeForces project as a whole to update all the compilers (if there're new versions of course) at least once a year.

PS: I understand that I can't ask or demand anything, when CodeForces is already awesome :)

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Why are Golang's Scanf very slow. I usually get TLE.