Codeforces и Polygon могут быть недоступны в период с 23 мая, 7:00 (МСК) по 23 мая, 11:00 (МСК) в связи с проведением технических работ. ×

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

Автор lorenzotinfena, история, 2 месяца назад, По-английски

Hi! I created this template: https://github.com/lorenzotinfena/competitive-go . For input it uses directly syscall.Read (I'm planning to do the same also for the output), and then I added a little setting (very little detail) that can lower the time, but increase the memory, or the contrary or keeping balanced, it uses debug.SetGCPercent .

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

»
2 месяца назад, # |
  Проголосовать: нравится -11 Проголосовать: не нравится

Awesome template!

»
2 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

you can use bufio for input and output

for example 250680018

  • »
    »
    2 месяца назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    I should take a better look at it, but I think using directly syscall.Read permits you to make assumptions to the input such as ignoring errors, which improve performance, but of course in many cases these are little details.