This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"fmt" | |
"os" | |
) | |
func main() { | |
var scanner = bufio.NewScanner(os.Stdin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
type Object struct { | |
Capacity float64 | |
Velocity float64 | |
Contents float64 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
type Set struct { | |
weight int | |
value int | |
} | |
var ( | |
W = 5 | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
) | |
type Set struct { | |
weight int | |
value int | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
) | |
type Set struct { | |
weight int | |
value int | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"sort" | |
) | |
type Slice struct { | |
List []int | |
m int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
var LARGE = 100000 | |
var p = [][]string{ | |
[]string{"S", "#", "#", "#"}, | |
[]string{".", ".", ".", "#"}, | |
[]string{"#", ".", ".", "."}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
var p = [][]string{ | |
[]string{".", ".", ".", "."}, | |
[]string{".", "W", "W", "."}, | |
[]string{"W", "W", ".", "."}, | |
[]string{"W", "W", ".", "W"}, | |
[]string{"W", "W", ".", "W"}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
var k int = 5 | |
var p []int = []int{0, 1, 1, 5} | |
func sum(s, i int) (int, bool) { | |
if i == len(p) { | |
return s, false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM centos:centos7 | |
RUN mkdir -p /opt/loopback | |
WORKDIR /opt/loopback | |
ENV GOROOT="/usr/lib/golang" \ | |
GOPATH="/usr/local/gocode" \ | |
PATH=$PATH:$GOROOT/bin:$GOPATH/bin | |
RUN yum -y install epel-release && yum install -y golang fuse git |