Skip to content

Instantly share code, notes, and snippets.

@tosone
Last active October 25, 2020 06:50
Show Gist options
  • Save tosone/26b58e2b57d7940631a677af5499b6ca to your computer and use it in GitHub Desktop.
Save tosone/26b58e2b57d7940631a677af5499b6ca to your computer and use it in GitHub Desktop.
exactcover problem
package main
import (
"fmt"
)
func tester(input [9]byte) bool {
return false
}
func main() {
var input1 = [9]byte{1, 2, 3, 4, 5, 6, 7, 8, 9}
fmt.Println(tester(input1)) // except: true
var input2 = [9]byte{1, 1, 3, 4, 5, 6, 7, 8, 9}
fmt.Println(tester(input1)) // except: false
var input3 = [9]byte{9, 1, 3, 4, 5, 6, 7, 8, 2}
fmt.Println(tester(input1)) // except: true
var input4 = [9]byte{1, 2, 3, 4, 5, 6, 7, 8, '.'}
fmt.Println(tester(input1)) // except: false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment