lorenzotinfena's blog

By lorenzotinfena, history, 8 months ago, In English

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 .

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

»
8 months ago, # |
  Vote: I like it -11 Vote: I do not like it

Awesome template!

»
8 months ago, # |
  Vote: I like it 0 Vote: I do not like it

you can use bufio for input and output

for example 250680018

  • »
    »
    8 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    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.