Skip to content

Commit

Permalink
use all the memory there is
Browse files Browse the repository at this point in the history
  • Loading branch information
adomaskizogian committed Sep 15, 2023
1 parent 6908579 commit 790a901
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions go/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ type teamData struct {

func main() {
scanner := bufio.NewScanner(os.Stdin)

// One could split tokens by space rather than by newline
// Or one could close their eyes before 16MB max size buffer
scanner.Buffer(make([]byte, 4096), 16*1024*1024)

res := make(map[string]teamData)
var teamOccurrenceOrder []string

Expand Down

0 comments on commit 790a901

Please sign in to comment.