diff --git a/.gitignore b/.gitignore index 74b0ac39e..b73abbc47 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,9 @@ # Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 .glide/ *.cookie -.vscode/ *.toml -helper \ No newline at end of file +helper +*.zip +tasks.txt +testDir/ +coverage.txt \ No newline at end of file diff --git a/.vscode/bookmarks.json b/.vscode/bookmarks.json new file mode 100644 index 000000000..26f099add --- /dev/null +++ b/.vscode/bookmarks.json @@ -0,0 +1,8 @@ +{ + "onDidClearBookmarkEmitter": {}, + "onDidClearAllBookmarksEmitter": {}, + "onDidAddBookmarkEmitter": {}, + "onDidRemoveBookmarkEmitter": {}, + "onDidUpdateBookmarkEmitter": {}, + "bookmarks": [] +} \ No newline at end of file diff --git a/.vscode/tags b/.vscode/tags new file mode 100644 index 000000000..33ed9e868 --- /dev/null +++ b/.vscode/tags @@ -0,0 +1,6 @@ +!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ +!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ +!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/ +!_TAG_PROGRAM_NAME Exuberant Ctags // +!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ +!_TAG_PROGRAM_VERSION 5.9~svn20110310 // diff --git a/Algorithms/0031.next-permutation/next-permutation.go b/Algorithms/0031.next-permutation/next-permutation.go index 27dd68a45..4458e8716 100755 --- a/Algorithms/0031.next-permutation/next-permutation.go +++ b/Algorithms/0031.next-permutation/next-permutation.go @@ -3,13 +3,13 @@ package Problem0031 import "sort" func nextPermutation(nums []int) { - var i int length := len(nums) if length <= 1 { return } + var i int for i = length - 1; i >= 1; i-- { if nums[i] > nums[i-1] { break diff --git a/Algorithms/0043.multiply-strings/multiply-strings.go b/Algorithms/0043.multiply-strings/multiply-strings.go index 1e83cf938..1002c2c0e 100755 --- a/Algorithms/0043.multiply-strings/multiply-strings.go +++ b/Algorithms/0043.multiply-strings/multiply-strings.go @@ -33,7 +33,7 @@ func multiply(num1 string, num2 string) string { // 转换结果 // temp 选用为[]int,而不是[]byte,是因为 - // golang中,byte的基础结构是uint8,最大值为255。 + // Go中,byte的基础结构是uint8,最大值为255。 // 不考虑进位的话,temp会溢出 res := make([]byte, len(temp)) for i := 0; i < len(temp); i++ { diff --git a/Algorithms/0050.powx-n/README.md b/Algorithms/0050.powx-n/README.md index d2d3747e8..57545777d 100755 --- a/Algorithms/0050.powx-n/README.md +++ b/Algorithms/0050.powx-n/README.md @@ -1,9 +1,12 @@ # [50. Pow(x, n)](https://leetcode.com/problems/powx-n/) ## 题目 + Implement pow(x, n). ## 解题思路 + 注意到指数是整数,所以,可以利用乘法计算幂 ## 总结 + o(N)的算法会浪费很多时间,o(lgN)的算法要快的多。 diff --git a/Algorithms/0095.unique-binary-search-trees-ii/unique-binary-search-trees-ii.go b/Algorithms/0095.unique-binary-search-trees-ii/unique-binary-search-trees-ii.go index 7871212b7..529aea2b1 100755 --- a/Algorithms/0095.unique-binary-search-trees-ii/unique-binary-search-trees-ii.go +++ b/Algorithms/0095.unique-binary-search-trees-ii/unique-binary-search-trees-ii.go @@ -2,7 +2,7 @@ package Problem0095 import ( "fmt" - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" ) type TreeNode = kit.TreeNode diff --git a/Algorithms/0095.unique-binary-search-trees-ii/unique-binary-search-trees-ii_test.go b/Algorithms/0095.unique-binary-search-trees-ii/unique-binary-search-trees-ii_test.go index 5068eda0f..d80b6aa97 100755 --- a/Algorithms/0095.unique-binary-search-trees-ii/unique-binary-search-trees-ii_test.go +++ b/Algorithms/0095.unique-binary-search-trees-ii/unique-binary-search-trees-ii_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" "github.com/stretchr/testify/assert" ) diff --git a/Algorithms/0098.validate-binary-search-tree/validate-binary-search-tree.go b/Algorithms/0098.validate-binary-search-tree/validate-binary-search-tree.go index 9604d869a..51bf458c2 100755 --- a/Algorithms/0098.validate-binary-search-tree/validate-binary-search-tree.go +++ b/Algorithms/0098.validate-binary-search-tree/validate-binary-search-tree.go @@ -1,13 +1,13 @@ package Problem0098 import ( - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" ) type TreeNode = kit.TreeNode func isValidBST(root *TreeNode) bool { - // Golang int 类型的最小值与最大值 + // Go int 类型的最小值与最大值 MIN, MAX := -1<<63, 1<<63-1 return recur(MIN, MAX, root) diff --git a/Algorithms/0098.validate-binary-search-tree/validate-binary-search-tree_test.go b/Algorithms/0098.validate-binary-search-tree/validate-binary-search-tree_test.go index 4a20680ae..4d891f541 100755 --- a/Algorithms/0098.validate-binary-search-tree/validate-binary-search-tree_test.go +++ b/Algorithms/0098.validate-binary-search-tree/validate-binary-search-tree_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" "github.com/stretchr/testify/assert" ) diff --git a/Algorithms/0099.recover-binary-search-tree/recover-binary-search-tree.go b/Algorithms/0099.recover-binary-search-tree/recover-binary-search-tree.go index d183d64e8..7c6efa3c5 100755 --- a/Algorithms/0099.recover-binary-search-tree/recover-binary-search-tree.go +++ b/Algorithms/0099.recover-binary-search-tree/recover-binary-search-tree.go @@ -1,7 +1,7 @@ package Problem0099 import ( - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" ) type TreeNode = kit.TreeNode diff --git a/Algorithms/0099.recover-binary-search-tree/recover-binary-search-tree_test.go b/Algorithms/0099.recover-binary-search-tree/recover-binary-search-tree_test.go index 8c084a51e..db60f5b4f 100755 --- a/Algorithms/0099.recover-binary-search-tree/recover-binary-search-tree_test.go +++ b/Algorithms/0099.recover-binary-search-tree/recover-binary-search-tree_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" "github.com/stretchr/testify/assert" ) diff --git a/Algorithms/0100.same-tree/same-tree.go b/Algorithms/0100.same-tree/same-tree.go index d3f9022ff..54d3ddf02 100755 --- a/Algorithms/0100.same-tree/same-tree.go +++ b/Algorithms/0100.same-tree/same-tree.go @@ -1,7 +1,7 @@ package Problem0100 import ( - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" ) type TreeNode = kit.TreeNode diff --git a/Algorithms/0100.same-tree/same-tree_test.go b/Algorithms/0100.same-tree/same-tree_test.go index bde10dc29..c7bf88a86 100755 --- a/Algorithms/0100.same-tree/same-tree_test.go +++ b/Algorithms/0100.same-tree/same-tree_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" "github.com/stretchr/testify/assert" ) diff --git a/Algorithms/0101.symmetric-tree/symmetric-tree.go b/Algorithms/0101.symmetric-tree/symmetric-tree.go index 37e14fbeb..9966f2e87 100755 --- a/Algorithms/0101.symmetric-tree/symmetric-tree.go +++ b/Algorithms/0101.symmetric-tree/symmetric-tree.go @@ -1,7 +1,7 @@ package Problem0101 import ( - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" ) type TreeNode = kit.TreeNode diff --git a/Algorithms/0101.symmetric-tree/symmetric-tree_test.go b/Algorithms/0101.symmetric-tree/symmetric-tree_test.go index 167f0f062..3780aab4d 100755 --- a/Algorithms/0101.symmetric-tree/symmetric-tree_test.go +++ b/Algorithms/0101.symmetric-tree/symmetric-tree_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" "github.com/stretchr/testify/assert" ) diff --git a/Algorithms/0102.binary-tree-level-order-traversal/binary-tree-level-order-traversal.go b/Algorithms/0102.binary-tree-level-order-traversal/binary-tree-level-order-traversal.go index a3fa819e3..df12b74dd 100755 --- a/Algorithms/0102.binary-tree-level-order-traversal/binary-tree-level-order-traversal.go +++ b/Algorithms/0102.binary-tree-level-order-traversal/binary-tree-level-order-traversal.go @@ -1,7 +1,7 @@ package Problem0102 import ( - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" ) type TreeNode = kit.TreeNode diff --git a/Algorithms/0102.binary-tree-level-order-traversal/binary-tree-level-order-traversal_test.go b/Algorithms/0102.binary-tree-level-order-traversal/binary-tree-level-order-traversal_test.go index 935ebe083..8a265bd58 100755 --- a/Algorithms/0102.binary-tree-level-order-traversal/binary-tree-level-order-traversal_test.go +++ b/Algorithms/0102.binary-tree-level-order-traversal/binary-tree-level-order-traversal_test.go @@ -2,7 +2,7 @@ package Problem0102 import ( "fmt" - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" "testing" "github.com/stretchr/testify/assert" diff --git a/Algorithms/0103.binary-tree-zigzag-level-order-traversal/binary-tree-zigzag-level-order-traversal.go b/Algorithms/0103.binary-tree-zigzag-level-order-traversal/binary-tree-zigzag-level-order-traversal.go index 9ee3f1b1c..742f16f62 100755 --- a/Algorithms/0103.binary-tree-zigzag-level-order-traversal/binary-tree-zigzag-level-order-traversal.go +++ b/Algorithms/0103.binary-tree-zigzag-level-order-traversal/binary-tree-zigzag-level-order-traversal.go @@ -1,7 +1,7 @@ package Problem0103 import ( - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" ) type TreeNode = kit.TreeNode diff --git a/Algorithms/0103.binary-tree-zigzag-level-order-traversal/binary-tree-zigzag-level-order-traversal_test.go b/Algorithms/0103.binary-tree-zigzag-level-order-traversal/binary-tree-zigzag-level-order-traversal_test.go index d24bd0891..42c5fcd03 100755 --- a/Algorithms/0103.binary-tree-zigzag-level-order-traversal/binary-tree-zigzag-level-order-traversal_test.go +++ b/Algorithms/0103.binary-tree-zigzag-level-order-traversal/binary-tree-zigzag-level-order-traversal_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" "github.com/stretchr/testify/assert" ) diff --git a/Algorithms/0104.maximum-depth-of-binary-tree/maximum-depth-of-binary-tree.go b/Algorithms/0104.maximum-depth-of-binary-tree/maximum-depth-of-binary-tree.go index 196bd2ea9..df310641c 100755 --- a/Algorithms/0104.maximum-depth-of-binary-tree/maximum-depth-of-binary-tree.go +++ b/Algorithms/0104.maximum-depth-of-binary-tree/maximum-depth-of-binary-tree.go @@ -1,7 +1,7 @@ package Problem0104 import ( - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" ) type TreeNode = kit.TreeNode diff --git a/Algorithms/0104.maximum-depth-of-binary-tree/maximum-depth-of-binary-tree_test.go b/Algorithms/0104.maximum-depth-of-binary-tree/maximum-depth-of-binary-tree_test.go index 6a704a4ac..a8bf315d9 100755 --- a/Algorithms/0104.maximum-depth-of-binary-tree/maximum-depth-of-binary-tree_test.go +++ b/Algorithms/0104.maximum-depth-of-binary-tree/maximum-depth-of-binary-tree_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" "github.com/stretchr/testify/assert" ) diff --git a/Algorithms/0105.construct-binary-tree-from-preorder-and-inorder-traversal/construct-binary-tree-from-preorder-and-inorder-traversal.go b/Algorithms/0105.construct-binary-tree-from-preorder-and-inorder-traversal/construct-binary-tree-from-preorder-and-inorder-traversal.go index 38ea92290..0d9a4db82 100755 --- a/Algorithms/0105.construct-binary-tree-from-preorder-and-inorder-traversal/construct-binary-tree-from-preorder-and-inorder-traversal.go +++ b/Algorithms/0105.construct-binary-tree-from-preorder-and-inorder-traversal/construct-binary-tree-from-preorder-and-inorder-traversal.go @@ -1,6 +1,6 @@ package Problem0105 import ( - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" ) type TreeNode = kit.TreeNode diff --git a/Algorithms/0105.construct-binary-tree-from-preorder-and-inorder-traversal/construct-binary-tree-from-preorder-and-inorder-traversal_test.go b/Algorithms/0105.construct-binary-tree-from-preorder-and-inorder-traversal/construct-binary-tree-from-preorder-and-inorder-traversal_test.go index a486a66ef..5bf7faaf6 100755 --- a/Algorithms/0105.construct-binary-tree-from-preorder-and-inorder-traversal/construct-binary-tree-from-preorder-and-inorder-traversal_test.go +++ b/Algorithms/0105.construct-binary-tree-from-preorder-and-inorder-traversal/construct-binary-tree-from-preorder-and-inorder-traversal_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" "github.com/stretchr/testify/assert" ) diff --git a/Algorithms/0106.construct-binary-tree-from-inorder-and-postorder-traversal/construct-binary-tree-from-inorder-and-postorder-traversal.go b/Algorithms/0106.construct-binary-tree-from-inorder-and-postorder-traversal/construct-binary-tree-from-inorder-and-postorder-traversal.go index ecf24e4aa..b7f013d20 100755 --- a/Algorithms/0106.construct-binary-tree-from-inorder-and-postorder-traversal/construct-binary-tree-from-inorder-and-postorder-traversal.go +++ b/Algorithms/0106.construct-binary-tree-from-inorder-and-postorder-traversal/construct-binary-tree-from-inorder-and-postorder-traversal.go @@ -1,7 +1,7 @@ package Problem0106 import ( - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" ) type TreeNode = kit.TreeNode diff --git a/Algorithms/0106.construct-binary-tree-from-inorder-and-postorder-traversal/construct-binary-tree-from-inorder-and-postorder-traversal_test.go b/Algorithms/0106.construct-binary-tree-from-inorder-and-postorder-traversal/construct-binary-tree-from-inorder-and-postorder-traversal_test.go index b82c45aa6..1d7e981d9 100755 --- a/Algorithms/0106.construct-binary-tree-from-inorder-and-postorder-traversal/construct-binary-tree-from-inorder-and-postorder-traversal_test.go +++ b/Algorithms/0106.construct-binary-tree-from-inorder-and-postorder-traversal/construct-binary-tree-from-inorder-and-postorder-traversal_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" "github.com/stretchr/testify/assert" ) diff --git a/Algorithms/0107.binary-tree-level-order-traversal-ii/binary-tree-level-order-traversal-ii.go b/Algorithms/0107.binary-tree-level-order-traversal-ii/binary-tree-level-order-traversal-ii.go index 2ac3f2c18..1b5b1563a 100755 --- a/Algorithms/0107.binary-tree-level-order-traversal-ii/binary-tree-level-order-traversal-ii.go +++ b/Algorithms/0107.binary-tree-level-order-traversal-ii/binary-tree-level-order-traversal-ii.go @@ -1,7 +1,7 @@ package Problem0107 import ( - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" ) type TreeNode = kit.TreeNode diff --git a/Algorithms/0107.binary-tree-level-order-traversal-ii/binary-tree-level-order-traversal-ii_test.go b/Algorithms/0107.binary-tree-level-order-traversal-ii/binary-tree-level-order-traversal-ii_test.go index 1c4231f4a..accd9fc47 100755 --- a/Algorithms/0107.binary-tree-level-order-traversal-ii/binary-tree-level-order-traversal-ii_test.go +++ b/Algorithms/0107.binary-tree-level-order-traversal-ii/binary-tree-level-order-traversal-ii_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" "github.com/stretchr/testify/assert" ) diff --git a/Algorithms/0108.convert-sorted-array-to-binary-search-tree/convert-sorted-array-to-binary-search-tree.go b/Algorithms/0108.convert-sorted-array-to-binary-search-tree/convert-sorted-array-to-binary-search-tree.go index e9c4676b1..116f1e054 100755 --- a/Algorithms/0108.convert-sorted-array-to-binary-search-tree/convert-sorted-array-to-binary-search-tree.go +++ b/Algorithms/0108.convert-sorted-array-to-binary-search-tree/convert-sorted-array-to-binary-search-tree.go @@ -1,7 +1,7 @@ package Problem0108 import ( - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" ) type TreeNode = kit.TreeNode diff --git a/Algorithms/0108.convert-sorted-array-to-binary-search-tree/convert-sorted-array-to-binary-search-tree_test.go b/Algorithms/0108.convert-sorted-array-to-binary-search-tree/convert-sorted-array-to-binary-search-tree_test.go index fb5fb9e36..a9a688eea 100755 --- a/Algorithms/0108.convert-sorted-array-to-binary-search-tree/convert-sorted-array-to-binary-search-tree_test.go +++ b/Algorithms/0108.convert-sorted-array-to-binary-search-tree/convert-sorted-array-to-binary-search-tree_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" "github.com/stretchr/testify/assert" ) diff --git a/Algorithms/0109.convert-sorted-list-to-binary-search-tree/convert-sorted-list-to-binary-search-tree.go b/Algorithms/0109.convert-sorted-list-to-binary-search-tree/convert-sorted-list-to-binary-search-tree.go index 08ba241fd..f63fe8395 100755 --- a/Algorithms/0109.convert-sorted-list-to-binary-search-tree/convert-sorted-list-to-binary-search-tree.go +++ b/Algorithms/0109.convert-sorted-list-to-binary-search-tree/convert-sorted-list-to-binary-search-tree.go @@ -1,7 +1,7 @@ package Problem0109 import ( - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" ) type ListNode = kit.ListNode diff --git a/Algorithms/0109.convert-sorted-list-to-binary-search-tree/convert-sorted-list-to-binary-search-tree_test.go b/Algorithms/0109.convert-sorted-list-to-binary-search-tree/convert-sorted-list-to-binary-search-tree_test.go index c5746ad00..9bcf401ad 100755 --- a/Algorithms/0109.convert-sorted-list-to-binary-search-tree/convert-sorted-list-to-binary-search-tree_test.go +++ b/Algorithms/0109.convert-sorted-list-to-binary-search-tree/convert-sorted-list-to-binary-search-tree_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" "github.com/stretchr/testify/assert" ) @@ -34,6 +34,6 @@ func Test_Problem0109(t *testing.T) { for _, tc := range tcs { fmt.Printf("~~%v~~\n", tc) - ast.Equal(tc.ans, kit.Tree2Inorder(sortedListToBST(kit.Slice2List(tc.head))), "输入:%v", tc) + ast.Equal(tc.ans, kit.Tree2Inorder(sortedListToBST(kit.Ints2List(tc.head))), "输入:%v", tc) } } diff --git a/Algorithms/0110.balanced-binary-tree/balanced-binary-tree.go b/Algorithms/0110.balanced-binary-tree/balanced-binary-tree.go index 3e99fdd0d..d851cbb37 100755 --- a/Algorithms/0110.balanced-binary-tree/balanced-binary-tree.go +++ b/Algorithms/0110.balanced-binary-tree/balanced-binary-tree.go @@ -1,7 +1,7 @@ package Problem0110 import ( - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" ) type TreeNode = kit.TreeNode diff --git a/Algorithms/0110.balanced-binary-tree/balanced-binary-tree_test.go b/Algorithms/0110.balanced-binary-tree/balanced-binary-tree_test.go index 3b93b9b83..2b8ed578f 100755 --- a/Algorithms/0110.balanced-binary-tree/balanced-binary-tree_test.go +++ b/Algorithms/0110.balanced-binary-tree/balanced-binary-tree_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" "github.com/stretchr/testify/assert" ) diff --git a/Algorithms/0111.minimum-depth-of-binary-tree/minimum-depth-of-binary-tree.go b/Algorithms/0111.minimum-depth-of-binary-tree/minimum-depth-of-binary-tree.go index aac711ee9..c54a5768a 100755 --- a/Algorithms/0111.minimum-depth-of-binary-tree/minimum-depth-of-binary-tree.go +++ b/Algorithms/0111.minimum-depth-of-binary-tree/minimum-depth-of-binary-tree.go @@ -1,7 +1,7 @@ package Problem0111 import ( - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" ) type TreeNode = kit.TreeNode diff --git a/Algorithms/0111.minimum-depth-of-binary-tree/minimum-depth-of-binary-tree_test.go b/Algorithms/0111.minimum-depth-of-binary-tree/minimum-depth-of-binary-tree_test.go index 2f29eda5b..7f3cbdb24 100755 --- a/Algorithms/0111.minimum-depth-of-binary-tree/minimum-depth-of-binary-tree_test.go +++ b/Algorithms/0111.minimum-depth-of-binary-tree/minimum-depth-of-binary-tree_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" "github.com/stretchr/testify/assert" ) diff --git a/Algorithms/0112.path-sum/path-sum.go b/Algorithms/0112.path-sum/path-sum.go index 0cac5bdee..9a25613a8 100755 --- a/Algorithms/0112.path-sum/path-sum.go +++ b/Algorithms/0112.path-sum/path-sum.go @@ -1,7 +1,7 @@ package Problem0112 import ( - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" ) type TreeNode = kit.TreeNode diff --git a/Algorithms/0112.path-sum/path-sum_test.go b/Algorithms/0112.path-sum/path-sum_test.go index f8bc376f0..ba1e9abc3 100755 --- a/Algorithms/0112.path-sum/path-sum_test.go +++ b/Algorithms/0112.path-sum/path-sum_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" "github.com/stretchr/testify/assert" ) diff --git a/Algorithms/0113.path-sum-ii/path-sum-ii.go b/Algorithms/0113.path-sum-ii/path-sum-ii.go index 38fe38918..2926b8a93 100755 --- a/Algorithms/0113.path-sum-ii/path-sum-ii.go +++ b/Algorithms/0113.path-sum-ii/path-sum-ii.go @@ -1,7 +1,7 @@ package Problem0113 import ( - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" ) type TreeNode = kit.TreeNode diff --git a/Algorithms/0113.path-sum-ii/path-sum-ii_test.go b/Algorithms/0113.path-sum-ii/path-sum-ii_test.go index 69b742627..e1dbb6a5a 100755 --- a/Algorithms/0113.path-sum-ii/path-sum-ii_test.go +++ b/Algorithms/0113.path-sum-ii/path-sum-ii_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" "github.com/stretchr/testify/assert" ) diff --git a/Algorithms/0114.flatten-binary-tree-to-linked-list/flatten-binary-tree-to-linked-list.go b/Algorithms/0114.flatten-binary-tree-to-linked-list/flatten-binary-tree-to-linked-list.go index a9479246f..674c97fca 100755 --- a/Algorithms/0114.flatten-binary-tree-to-linked-list/flatten-binary-tree-to-linked-list.go +++ b/Algorithms/0114.flatten-binary-tree-to-linked-list/flatten-binary-tree-to-linked-list.go @@ -1,7 +1,7 @@ package Problem0114 import ( - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" ) type TreeNode = kit.TreeNode diff --git a/Algorithms/0114.flatten-binary-tree-to-linked-list/flatten-binary-tree-to-linked-list_test.go b/Algorithms/0114.flatten-binary-tree-to-linked-list/flatten-binary-tree-to-linked-list_test.go index ae8fe5595..246de4ea8 100755 --- a/Algorithms/0114.flatten-binary-tree-to-linked-list/flatten-binary-tree-to-linked-list_test.go +++ b/Algorithms/0114.flatten-binary-tree-to-linked-list/flatten-binary-tree-to-linked-list_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" "github.com/stretchr/testify/assert" ) diff --git a/Algorithms/0124.binary-tree-maximum-path-sum/binary-tree-maximum-path-sum.go b/Algorithms/0124.binary-tree-maximum-path-sum/binary-tree-maximum-path-sum.go index ed41d3edb..6bdbb9c90 100755 --- a/Algorithms/0124.binary-tree-maximum-path-sum/binary-tree-maximum-path-sum.go +++ b/Algorithms/0124.binary-tree-maximum-path-sum/binary-tree-maximum-path-sum.go @@ -1,7 +1,7 @@ package Problem0124 import ( - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" ) type TreeNode = kit.TreeNode diff --git a/Algorithms/0124.binary-tree-maximum-path-sum/binary-tree-maximum-path-sum_test.go b/Algorithms/0124.binary-tree-maximum-path-sum/binary-tree-maximum-path-sum_test.go index ef1922d96..f62aa032e 100755 --- a/Algorithms/0124.binary-tree-maximum-path-sum/binary-tree-maximum-path-sum_test.go +++ b/Algorithms/0124.binary-tree-maximum-path-sum/binary-tree-maximum-path-sum_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" "github.com/stretchr/testify/assert" ) diff --git a/Algorithms/0127.word-ladder/127.100.png b/Algorithms/0127.word-ladder/127.100.png new file mode 100644 index 000000000..cef950144 Binary files /dev/null and b/Algorithms/0127.word-ladder/127.100.png differ diff --git a/Algorithms/0127.word-ladder/README.md b/Algorithms/0127.word-ladder/README.md index d3b8f4a29..8d9a33b75 100755 --- a/Algorithms/0127.word-ladder/README.md +++ b/Algorithms/0127.word-ladder/README.md @@ -26,3 +26,6 @@ The wordList parameter had been changed to a list of strings (instead of a set o ## 解题思路 见程序注释 + +反复尝试以后,将最短时间降低了 2 毫秒。 +![100%](127.100.png) \ No newline at end of file diff --git a/Algorithms/0127.word-ladder/word-ladder.go b/Algorithms/0127.word-ladder/word-ladder.go index 45af40d3e..22fe99882 100755 --- a/Algorithms/0127.word-ladder/word-ladder.go +++ b/Algorithms/0127.word-ladder/word-ladder.go @@ -1,77 +1,76 @@ package Problem0127 func ladderLength(beginWord string, endWord string, words []string) int { - dictMap := make(map[string]byte) - + // 把 words 存入字典 + // 可以利用快速地添加,删除和查找单词 + dict := make(map[string]bool, len(words)) for i := 0; i < len(words); i++ { - if _, ok := dictMap[words[i]]; !ok { - dictMap[words[i]] = byte(1) - } + dict[words[i]] = true } + // 删除 dict 中的 beginWord + delete(dict, beginWord) - var wq wordQueue - dist := 2 + // queue 用于存放被 trans 到的 word + queue := make([]string, 0, len(words)) - addNextWords(beginWord, dictMap, &wq) - for !wq.empty() { - wqLen := wq.size() - for i := 0; i < wqLen; i++ { - word := wq.popNext() - if word == endWord { - return dist - } + var trans func(string) bool + // trans 用来把 words 中 word 能够 trans 到的单词,放入 queue + // 如果 trans 过程中,遇到了 endWord,则返回 true + trans = func(word string) bool { + bytes := []byte(word) + for i := 0; i < len(bytes); i++ { + diffLetter := bytes[i] + // 找出仅在索引 i 上不同的单词 + for j := 0; j < 26; j++ { + b := 'a' + byte(j) + if b == diffLetter { + continue + } - addNextWords(word, dictMap, &wq) - } - dist++ - } + bytes[i] = b + // 此时 bytes 为 word 所 trans 的单词 - return 0 -} + // 令 temp := string(bytes),会增加 70% 的时间 -func addNextWords(beginWord string, dictMap map[string]byte, wq *wordQueue) { - bytes := []byte(beginWord) - delete(dictMap, beginWord) - for i := 0; i < len(bytes); i++ { - diffLetter := bytes[i] - for j := 0; j < 26; j++ { - b := 'a' + byte(j) - if b == diffLetter { - continue - } + if dict[string(bytes)] { + // words 中存在 string(bytes) + if string(bytes) == endWord { + // trans 到了 endWord + // 提前结束 + return true + } - bytes[i] = b - if _, ok := dictMap[string(bytes)]; ok { - wq.push(string(bytes)) - delete(dictMap, string(bytes)) + // 把 string(bytes) 放入 queue 的尾部 + queue = append(queue, string(bytes)) + delete(dict, string(bytes)) + } } + bytes[i] = diffLetter } - bytes[i] = diffLetter - } -} -type wordQueue struct { - words []string -} + return false + } -func (wq *wordQueue) empty() bool { - return len(wq.words) == 0 -} + queue = append(queue, beginWord) + dist := 1 + for len(queue) > 0 { + qLen := len(queue) -func (wq *wordQueue) popNext() string { - if len(wq.words) == 0 { - return "" - } + // 这个 for 循环,是按照每个 word 的 dist 值,来切分 queue 的 + for i := 0; i < qLen; i++ { + // word 出列 + word := queue[0] + queue = queue[1:] - s := wq.words[0] - wq.words = wq.words[1:] - return s -} + if trans(word) { + // word 能够 trans 到 endWord + // 提前结束 + return dist + 1 + } + } -func (wq *wordQueue) push(s string) { - wq.words = append(wq.words, s) -} + dist++ + } -func (wq *wordQueue) size() int { - return len(wq.words) + return 0 } diff --git a/Algorithms/0127.word-ladder/word-ladder_test.go b/Algorithms/0127.word-ladder/word-ladder_test.go index a3c3d5f2f..768d27780 100755 --- a/Algorithms/0127.word-ladder/word-ladder_test.go +++ b/Algorithms/0127.word-ladder/word-ladder_test.go @@ -7,44 +7,112 @@ import ( "github.com/stretchr/testify/assert" ) +// tcs is testcase slice +var tcs = []struct { + beginWord string + endWord string + wordList []string + ans int +}{ + + { + "hit", + "cog", + []string{"hot", "dot", "dog", "lot", "log"}, + 0, + }, + + { + "hot", + "dog", + []string{"hot", "dog", "dot"}, + 3, + }, + + { + "hit", + "cog", + []string{"hot", "dot", "dog", "lot", "log", "cog"}, + 5, + }, + + { + "hit", + "hot", + []string{"hot", "dot", "dog", "lot", "log", "cog"}, + 2, + }, + + { + "cet", + "ism", + []string{"kid", "tag", "pup", "ail", "tun", "woo", "erg", "luz", "brr", "gay", "sip", "kay", "per", "val", "mes", "ohs", "now", "boa", "cet", "pal", "bar", "die", "war", "hay", "eco", "pub", "lob", "rue", "fry", "lit", "rex", "jan", "cot", "bid", "ali", "pay", "col", "gum", "ger", "row", "won", "dan", "rum", "fad", "tut", "sag", "yip", "sui", "ark", "has", "zip", "fez", "own", "ump", "dis", "ads", "max", "jaw", "out", "btu", "ana", "gap", "cry", "led", "abe", "box", "ore", "pig", "fie", "toy", "fat", "cal", "lie", "noh", "sew", "ono", "tam", "flu", "mgm", "ply", "awe", "pry", "tit", "tie", "yet", "too", "tax", "jim", "san", "pan", "map", "ski", "ova", "wed", "non", "wac", "nut", "why", "bye", "lye", "oct", "old", "fin", "feb", "chi", "sap", "owl", "log", "tod", "dot", "bow", "fob", "for", "joe", "ivy", "fan", "age", "fax", "hip", "jib", "mel", "hus", "sob", "ifs", "tab", "ara", "dab", "jag", "jar", "arm", "lot", "tom", "sax", "tex", "yum", "pei", "wen", "wry", "ire", "irk", "far", "mew", "wit", "doe", "gas", "rte", "ian", "pot", "ask", "wag", "hag", "amy", "nag", "ron", "soy", "gin", "don", "tug", "fay", "vic", "boo", "nam", "ave", "buy", "sop", "but", "orb", "fen", "paw", "his", "sub", "bob", "yea", "oft", "inn", "rod", "yam", "pew", "web", "hod", "hun", "gyp", "wei", "wis", "rob", "gad", "pie", "mon", "dog", "bib", "rub", "ere", "dig", "era", "cat", "fox", "bee", "mod", "day", "apr", "vie", "nev", "jam", "pam", "new", "aye", "ani", "and", "ibm", "yap", "can", "pyx", "tar", "kin", "fog", "hum", "pip", "cup", "dye", "lyx", "jog", "nun", "par", "wan", "fey", "bus", "oak", "bad", "ats", "set", "qom", "vat", "eat", "pus", "rev", "axe", "ion", "six", "ila", "lao", "mom", "mas", "pro", "few", "opt", "poe", "art", "ash", "oar", "cap", "lop", "may", "shy", "rid", "bat", "sum", "rim", "fee", "bmw", "sky", "maj", "hue", "thy", "ava", "rap", "den", "fla", "auk", "cox", "ibo", "hey", "saw", "vim", "sec", "ltd", "you", "its", "tat", "dew", "eva", "tog", "ram", "let", "see", "zit", "maw", "nix", "ate", "gig", "rep", "owe", "ind", "hog", "eve", "sam", "zoo", "any", "dow", "cod", "bed", "vet", "ham", "sis", "hex", "via", "fir", "nod", "mao", "aug", "mum", "hoe", "bah", "hal", "keg", "hew", "zed", "tow", "gog", "ass", "dem", "who", "bet", "gos", "son", "ear", "spy", "kit", "boy", "due", "sen", "oaf", "mix", "hep", "fur", "ada", "bin", "nil", "mia", "ewe", "hit", "fix", "sad", "rib", "eye", "hop", "haw", "wax", "mid", "tad", "ken", "wad", "rye", "pap", "bog", "gut", "ito", "woe", "our", "ado", "sin", "mad", "ray", "hon", "roy", "dip", "hen", "iva", "lug", "asp", "hui", "yak", "bay", "poi", "yep", "bun", "try", "lad", "elm", "nat", "wyo", "gym", "dug", "toe", "dee", "wig", "sly", "rip", "geo", "cog", "pas", "zen", "odd", "nan", "lay", "pod", "fit", "hem", "joy", "bum", "rio", "yon", "dec", "leg", "put", "sue", "dim", "pet", "yaw", "nub", "bit", "bur", "sid", "sun", "oil", "red", "doc", "moe", "caw", "eel", "dix", "cub", "end", "gem", "off", "yew", "hug", "pop", "tub", "sgt", "lid", "pun", "ton", "sol", "din", "yup", "jab", "pea", "bug", "gag", "mil", "jig", "hub", "low", "did", "tin", "get", "gte", "sox", "lei", "mig", "fig", "lon", "use", "ban", "flo", "nov", "jut", "bag", "mir", "sty", "lap", "two", "ins", "con", "ant", "net", "tux", "ode", "stu", "mug", "cad", "nap", "gun", "fop", "tot", "sow", "sal", "sic", "ted", "wot", "del", "imp", "cob", "way", "ann", "tan", "mci", "job", "wet", "ism", "err", "him", "all", "pad", "hah", "hie", "aim", "ike", "jed", "ego", "mac", "baa", "min", "com", "ill", "was", "cab", "ago", "ina", "big", "ilk", "gal", "tap", "duh", "ola", "ran", "lab", "top", "gob", "hot", "ora", "tia", "kip", "han", "met", "hut", "she", "sac", "fed", "goo", "tee", "ell", "not", "act", "gil", "rut", "ala", "ape", "rig", "cid", "god", "duo", "lin", "aid", "gel", "awl", "lag", "elf", "liz", "ref", "aha", "fib", "oho", "tho", "her", "nor", "ace", "adz", "fun", "ned", "coo", "win", "tao", "coy", "van", "man", "pit", "guy", "foe", "hid", "mai", "sup", "jay", "hob", "mow", "jot", "are", "pol", "arc", "lax", "aft", "alb", "len", "air", "pug", "pox", "vow", "got", "meg", "zoe", "amp", "ale", "bud", "gee", "pin", "dun", "pat", "ten", "mob"}, + 11, + }, + + // 可以多个 testcase +} + func Test_Problem0127(t *testing.T) { ast := assert.New(t) - // tcs is testcase slice - tcs := []struct { - beginWord string - endWord string - wordList []string - ans int - }{ - - { - "hit", - "cog", - []string{"hot", "dot", "dog", "lot", "log"}, - 0, - }, - - { - "hot", - "dog", - []string{"hot", "dog", "dot"}, - 3, - }, - - { - "hit", - "cog", - []string{"hot", "dot", "dog", "lot", "log", "cog"}, - 5, - }, - - // 可以多个 testcase - } - for _, tc := range tcs { fmt.Printf("~~%v~~\n", tc) ast.Equal(tc.ans, ladderLength(tc.beginWord, tc.endWord, tc.wordList), "输入:%v", tc) } } + +func Benchmark_Problem0127(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + ladderLength(tc.beginWord, tc.endWord, tc.wordList) + } + } +} + +func isTransable(a, b string) bool { + // onceAgain == true 说明已经出现过不同的字符了 + onceAgain := false + for i := range a { + if a[i] != b[i] { + if onceAgain { + return false + } + onceAgain = true + } + } + + return true +} + +func Benchmark_isTransable(b *testing.B) { + difStrs := []string{"abc", "bbc", "acc", "aba"} + std := "abc" + + for i := 0; i < b.N; i++ { + for _, str := range difStrs { + isTransable(std, str) + } + } +} + +func isTransformer(a, b string) bool { + for i := 0; i < len(a); i++ { + if a[:i]+a[i+1:] == b[:i]+b[i+1:] { + return true + } + } + return false +} + +func Benchmark_isTransformer(b *testing.B) { + difStrs := []string{"abc", "bbc", "acc", "aba"} + std := "abc" + + for i := 0; i < b.N; i++ { + for _, str := range difStrs { + isTransformer(std, str) + } + } +} diff --git a/Algorithms/0128.longest-consecutive-sequence/README.md b/Algorithms/0128.longest-consecutive-sequence/README.md new file mode 100755 index 000000000..d6993ff5b --- /dev/null +++ b/Algorithms/0128.longest-consecutive-sequence/README.md @@ -0,0 +1,21 @@ +# [128. Longest Consecutive Sequence](https://leetcode.com/problems/longest-consecutive-sequence/) + +## 题目 +Given an unsorted array of integers, find the length of the longest consecutive elements sequence. + +For example, +``` +Given [100, 4, 200, 1, 3, 2], +The longest consecutive elements sequence is [1, 2, 3, 4]. Return its length: 4. +``` + +Your algorithm should run in O(n) complexity. + +## 解题思路 +``` +consecutive +英[kənˈsekjətɪv], 美[kənˈsɛkjətɪv] +adj. 连续的,连贯的; [语] 表示结果的; +``` + +见程序注释 diff --git a/Algorithms/0128.longest-consecutive-sequence/longest-consecutive-sequence.go b/Algorithms/0128.longest-consecutive-sequence/longest-consecutive-sequence.go new file mode 100755 index 000000000..a55370de0 --- /dev/null +++ b/Algorithms/0128.longest-consecutive-sequence/longest-consecutive-sequence.go @@ -0,0 +1,29 @@ +package Problem0128 + +import ( + "sort" +) + +func longestConsecutive(nums []int) int { + if len(nums) <= 1 { + return len(nums) + } + + sort.Ints(nums) + + max, temp := 0, 1 + for i := 1; i < len(nums); i++ { + if nums[i]-1 == nums[i-1] { + temp++ + } else if nums[i] != nums[i-1] { + // [0,1,1,2] 仍然可以视为连续 + temp = 1 + } + // 更新 max + if max < temp { + max = temp + } + } + + return max +} diff --git a/Algorithms/0128.longest-consecutive-sequence/longest-consecutive-sequence_test.go b/Algorithms/0128.longest-consecutive-sequence/longest-consecutive-sequence_test.go new file mode 100755 index 000000000..d3d39c08f --- /dev/null +++ b/Algorithms/0128.longest-consecutive-sequence/longest-consecutive-sequence_test.go @@ -0,0 +1,69 @@ +package Problem0128 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans int +}{ + + { + []int{1, 2, 0, 1}, + 3, + }, + + { + []int{0, -1}, + 2, + }, + + { + []int{}, + 0, + }, + + { + []int{0, 0}, + 1, + }, + + { + []int{0}, + 1, + }, + + { + []int{100, 4, 200, 1, 3, 2}, + 4, + }, + + { + []int{9000, 8999, 8998, 8997, 8996, 8995, 8994, 8993, 8992, 8991, 8990, 8989, 8988, 8987, 8986, 8985, 8984, 8983, 8982, 8981, 8980, 8979, 8978, 8977, 8976, 8975, 8974, 8973, 8972, 8971, 8970, 8969, 8968, 8967, 8966, 8965, 8964, 8963, 8962, 8961, 8960, 8959, 8958, 8957, 8956, 8955, 8954, 8953, 8952, 8951, 8950, 8949, 8948, 8947, 8946, 8945, 8944, 8943, 8942, 8941, 8940, 8939, 8938, 8937, 8936, 8935, 8934, 8933, 8932, 8931, 8930, 8929, 8928, 8927, 8926, 8925, 8924, 8923, 8922, 8921, 8920, 8919, 8918, 8917, 8916, 8915, 8914, 8913, 8912, 8911, 8910, 8909, 8908, 8907, 8906, 8905, 8904, 8903, 8902, 8901, 8900, 8899, 8898, 8897, 8896, 8895, 8894, 8893, 8892, 8891, 8890, 8889, 8888, 8887, 8886, 8885, 8884, 8883, 8882, 8881, 8880, 8879, 8878, 8877, 8876, 8875, 8874, 8873, 8872, 8871, 8870, 8869, 8868, 8867, 8866, 8865, 8864, 8863, 8862, 8861, 8860, 8859, 8858, 8857, 8856, 8855, 8854, 8853, 8852, 8851, 8850, 8849, 8848, 8847, 8846, 8845, 8844, 8843, 8842, 8841, 8840, 8839, 8838, 8837, 8836, 8835, 8834, 8833, 8832, 8831, 8830, 8829, 8828, 8827, 8826, 8825, 8824, 8823, 8822, 8821, 8820, 8819, 8818, 8817, 8816, 8815, 8814, 8813, 8812, 8811, 8810, 8809, 8808, 8807, 8806, 8805, 8804, 8803, 8802, 8801, 8800, 8799, 8798, 8797, 8796, 8795, 8794, 8793, 8792, 8791, 8790, 8789, 8788, 8787, 8786, 8785, 8784, 8783, 8782, 8781, 8780, 8779, 8778, 8777, 8776, 8775, 8774, 8773, 8772, 8771, 8770, 8769, 8768, 8767, 8766, 8765, 8764, 8763, 8762, 8761, 8760, 8759, 8758, 8757, 8756, 8755, 8754, 8753, 8752, 8751, 8750, 8749, 8748, 8747, 8746, 8745, 8744, 8743, 8742, 8741, 8740, 8739, 8738, 8737, 8736, 8735, 8734, 8733, 8732, 8731, 8730, 8729, 8728, 8727, 8726, 8725, 8724, 8723, 8722, 8721, 8720, 8719, 8718, 8717, 8716, 8715, 8714, 8713, 8712, 8711, 8710, 8709, 8708, 8707, 8706, 8705, 8704, 8703, 8702, 8701, 8700, 8699, 8698, 8697, 8696, 8695, 8694, 8693, 8692, 8691, 8690, 8689, 8688, 8687, 8686, 8685, 8684, 8683, 8682, 8681, 8680, 8679, 8678, 8677, 8676, 8675, 8674, 8673, 8672, 8671, 8670, 8669, 8668, 8667, 8666, 8665, 8664, 8663, 8662, 8661, 8660, 8659, 8658, 8657, 8656, 8655, 8654, 8653, 8652, 8651, 8650, 8649, 8648, 8647, 8646, 8645, 8644, 8643, 8642, 8641, 8640, 8639, 8638, 8637, 8636, 8635, 8634, 8633, 8632, 8631, 8630, 8629, 8628, 8627, 8626, 8625, 8624, 8623, 8622, 8621, 8620, 8619, 8618, 8617, 8616, 8615, 8614, 8613, 8612, 8611, 8610, 8609, 8608, 8607, 8606, 8605, 8604, 8603, 8602, 8601, 8600, 8599, 8598, 8597, 8596, 8595, 8594, 8593, 8592, 8591, 8590, 8589, 8588, 8587, 8586, 8585, 8584, 8583, 8582, 8581, 8580, 8579, 8578, 8577, 8576, 8575, 8574, 8573, 8572, 8571, 8570, 8569, 8568, 8567, 8566, 8565, 8564, 8563, 8562, 8561, 8560, 8559, 8558, 8557, 8556, 8555, 8554, 8553, 8552, 8551, 8550, 8549, 8548, 8547, 8546, 8545, 8544, 8543, 8542, 8541, 8540, 8539, 8538, 8537, 8536, 8535, 8534, 8533, 8532, 8531, 8530, 8529, 8528, 8527, 8526, 8525, 8524, 8523, 8522, 8521, 8520, 8519, 8518, 8517, 8516, 8515, 8514, 8513, 8512, 8511, 8510, 8509, 8508, 8507, 8506, 8505, 8504, 8503, 8502, 8501, 8500, 8499, 8498, 8497, 8496, 8495, 8494, 8493, 8492, 8491, 8490, 8489, 8488, 8487, 8486, 8485, 8484, 8483, 8482, 8481, 8480, 8479, 8478, 8477, 8476, 8475, 8474, 8473, 8472, 8471, 8470, 8469, 8468, 8467, 8466, 8465, 8464, 8463, 8462, 8461, 8460, 8459, 8458, 8457, 8456, 8455, 8454, 8453, 8452, 8451, 8450, 8449, 8448, 8447, 8446, 8445, 8444, 8443, 8442, 8441, 8440, 8439, 8438, 8437, 8436, 8435, 8434, 8433, 8432, 8431, 8430, 8429, 8428, 8427, 8426, 8425, 8424, 8423, 8422, 8421, 8420, 8419, 8418, 8417, 8416, 8415, 8414, 8413, 8412, 8411, 8410, 8409, 8408, 8407, 8406, 8405, 8404, 8403, 8402, 8401, 8400, 8399, 8398, 8397, 8396, 8395, 8394, 8393, 8392, 8391, 8390, 8389, 8388, 8387, 8386, 8385, 8384, 8383, 8382, 8381, 8380, 8379, 8378, 8377, 8376, 8375, 8374, 8373, 8372, 8371, 8370, 8369, 8368, 8367, 8366, 8365, 8364, 8363, 8362, 8361, 8360, 8359, 8358, 8357, 8356, 8355, 8354, 8353, 8352, 8351, 8350, 8349, 8348, 8347, 8346, 8345, 8344, 8343, 8342, 8341, 8340, 8339, 8338, 8337, 8336, 8335, 8334, 8333, 8332, 8331, 8330, 8329, 8328, 8327, 8326, 8325, 8324, 8323, 8322, 8321, 8320, 8319, 8318, 8317, 8316, 8315, 8314, 8313, 8312, 8311, 8310, 8309, 8308, 8307, 8306, 8305, 8304, 8303, 8302, 8301, 8300, 8299, 8298, 8297, 8296, 8295, 8294, 8293, 8292, 8291, 8290, 8289, 8288, 8287, 8286, 8285, 8284, 8283, 8282, 8281, 8280, 8279, 8278, 8277, 8276, 8275, 8274, 8273, 8272, 8271, 8270, 8269, 8268, 8267, 8266, 8265, 8264, 8263, 8262, 8261, 8260, 8259, 8258, 8257, 8256, 8255, 8254, 8253, 8252, 8251, 8250, 8249, 8248, 8247, 8246, 8245, 8244, 8243, 8242, 8241, 8240, 8239, 8238, 8237, 8236, 8235, 8234, 8233, 8232, 8231, 8230, 8229, 8228, 8227, 8226, 8225, 8224, 8223, 8222, 8221, 8220, 8219, 8218, 8217, 8216, 8215, 8214, 8213, 8212, 8211, 8210, 8209, 8208, 8207, 8206, 8205, 8204, 8203, 8202, 8201, 8200, 8199, 8198, 8197, 8196, 8195, 8194, 8193, 8192, 8191, 8190, 8189, 8188, 8187, 8186, 8185, 8184, 8183, 8182, 8181, 8180, 8179, 8178, 8177, 8176, 8175, 8174, 8173, 8172, 8171, 8170, 8169, 8168, 8167, 8166, 8165, 8164, 8163, 8162, 8161, 8160, 8159, 8158, 8157, 8156, 8155, 8154, 8153, 8152, 8151, 8150, 8149, 8148, 8147, 8146, 8145, 8144, 8143, 8142, 8141, 8140, 8139, 8138, 8137, 8136, 8135, 8134, 8133, 8132, 8131, 8130, 8129, 8128, 8127, 8126, 8125, 8124, 8123, 8122, 8121, 8120, 8119, 8118, 8117, 8116, 8115, 8114, 8113, 8112, 8111, 8110, 8109, 8108, 8107, 8106, 8105, 8104, 8103, 8102, 8101, 8100, 8099, 8098, 8097, 8096, 8095, 8094, 8093, 8092, 8091, 8090, 8089, 8088, 8087, 8086, 8085, 8084, 8083, 8082, 8081, 8080, 8079, 8078, 8077, 8076, 8075, 8074, 8073, 8072, 8071, 8070, 8069, 8068, 8067, 8066, 8065, 8064, 8063, 8062, 8061, 8060, 8059, 8058, 8057, 8056, 8055, 8054, 8053, 8052, 8051, 8050, 8049, 8048, 8047, 8046, 8045, 8044, 8043, 8042, 8041, 8040, 8039, 8038, 8037, 8036, 8035, 8034, 8033, 8032, 8031, 8030, 8029, 8028, 8027, 8026, 8025, 8024, 8023, 8022, 8021, 8020, 8019, 8018, 8017, 8016, 8015, 8014, 8013, 8012, 8011, 8010, 8009, 8008, 8007, 8006, 8005, 8004, 8003, 8002, 8001, 8000, 7999, 7998, 7997, 7996, 7995, 7994, 7993, 7992, 7991, 7990, 7989, 7988, 7987, 7986, 7985, 7984, 7983, 7982, 7981, 7980, 7979, 7978, 7977, 7976, 7975, 7974, 7973, 7972, 7971, 7970, 7969, 7968, 7967, 7966, 7965, 7964, 7963, 7962, 7961, 7960, 7959, 7958, 7957, 7956, 7955, 7954, 7953, 7952, 7951, 7950, 7949, 7948, 7947, 7946, 7945, 7944, 7943, 7942, 7941, 7940, 7939, 7938, 7937, 7936, 7935, 7934, 7933, 7932, 7931, 7930, 7929, 7928, 7927, 7926, 7925, 7924, 7923, 7922, 7921, 7920, 7919, 7918, 7917, 7916, 7915, 7914, 7913, 7912, 7911, 7910, 7909, 7908, 7907, 7906, 7905, 7904, 7903, 7902, 7901, 7900, 7899, 7898, 7897, 7896, 7895, 7894, 7893, 7892, 7891, 7890, 7889, 7888, 7887, 7886, 7885, 7884, 7883, 7882, 7881, 7880, 7879, 7878, 7877, 7876, 7875, 7874, 7873, 7872, 7871, 7870, 7869, 7868, 7867, 7866, 7865, 7864, 7863, 7862, 7861, 7860, 7859, 7858, 7857, 7856, 7855, 7854, 7853, 7852, 7851, 7850, 7849, 7848, 7847, 7846, 7845, 7844, 7843, 7842, 7841, 7840, 7839, 7838, 7837, 7836, 7835, 7834, 7833, 7832, 7831, 7830, 7829, 7828, 7827, 7826, 7825, 7824, 7823, 7822, 7821, 7820, 7819, 7818, 7817, 7816, 7815, 7814, 7813, 7812, 7811, 7810, 7809, 7808, 7807, 7806, 7805, 7804, 7803, 7802, 7801, 7800, 7799, 7798, 7797, 7796, 7795, 7794, 7793, 7792, 7791, 7790, 7789, 7788, 7787, 7786, 7785, 7784, 7783, 7782, 7781, 7780, 7779, 7778, 7777, 7776, 7775, 7774, 7773, 7772, 7771, 7770, 7769, 7768, 7767, 7766, 7765, 7764, 7763, 7762, 7761, 7760, 7759, 7758, 7757, 7756, 7755, 7754, 7753, 7752, 7751, 7750, 7749, 7748, 7747, 7746, 7745, 7744, 7743, 7742, 7741, 7740, 7739, 7738, 7737, 7736, 7735, 7734, 7733, 7732, 7731, 7730, 7729, 7728, 7727, 7726, 7725, 7724, 7723, 7722, 7721, 7720, 7719, 7718, 7717, 7716, 7715, 7714, 7713, 7712, 7711, 7710, 7709, 7708, 7707, 7706, 7705, 7704, 7703, 7702, 7701, 7700, 7699, 7698, 7697, 7696, 7695, 7694, 7693, 7692, 7691, 7690, 7689, 7688, 7687, 7686, 7685, 7684, 7683, 7682, 7681, 7680, 7679, 7678, 7677, 7676, 7675, 7674, 7673, 7672, 7671, 7670, 7669, 7668, 7667, 7666, 7665, 7664, 7663, 7662, 7661, 7660, 7659, 7658, 7657, 7656, 7655, 7654, 7653, 7652, 7651, 7650, 7649, 7648, 7647, 7646, 7645, 7644, 7643, 7642, 7641, 7640, 7639, 7638, 7637, 7636, 7635, 7634, 7633, 7632, 7631, 7630, 7629, 7628, 7627, 7626, 7625, 7624, 7623, 7622, 7621, 7620, 7619, 7618, 7617, 7616, 7615, 7614, 7613, 7612, 7611, 7610, 7609, 7608, 7607, 7606, 7605, 7604, 7603, 7602, 7601, 7600, 7599, 7598, 7597, 7596, 7595, 7594, 7593, 7592, 7591, 7590, 7589, 7588, 7587, 7586, 7585, 7584, 7583, 7582, 7581, 7580, 7579, 7578, 7577, 7576, 7575, 7574, 7573, 7572, 7571, 7570, 7569, 7568, 7567, 7566, 7565, 7564, 7563, 7562, 7561, 7560, 7559, 7558, 7557, 7556, 7555, 7554, 7553, 7552, 7551, 7550, 7549, 7548, 7547, 7546, 7545, 7544, 7543, 7542, 7541, 7540, 7539, 7538, 7537, 7536, 7535, 7534, 7533, 7532, 7531, 7530, 7529, 7528, 7527, 7526, 7525, 7524, 7523, 7522, 7521, 7520, 7519, 7518, 7517, 7516, 7515, 7514, 7513, 7512, 7511, 7510, 7509, 7508, 7507, 7506, 7505, 7504, 7503, 7502, 7501, 7500, 7499, 7498, 7497, 7496, 7495, 7494, 7493, 7492, 7491, 7490, 7489, 7488, 7487, 7486, 7485, 7484, 7483, 7482, 7481, 7480, 7479, 7478, 7477, 7476, 7475, 7474, 7473, 7472, 7471, 7470, 7469, 7468, 7467, 7466, 7465, 7464, 7463, 7462, 7461, 7460, 7459, 7458, 7457, 7456, 7455, 7454, 7453, 7452, 7451, 7450, 7449, 7448, 7447, 7446, 7445, 7444, 7443, 7442, 7441, 7440, 7439, 7438, 7437, 7436, 7435, 7434, 7433, 7432, 7431, 7430, 7429, 7428, 7427, 7426, 7425, 7424, 7423, 7422, 7421, 7420, 7419, 7418, 7417, 7416, 7415, 7414, 7413, 7412, 7411, 7410, 7409, 7408, 7407, 7406, 7405, 7404, 7403, 7402, 7401, 7400, 7399, 7398, 7397, 7396, 7395, 7394, 7393, 7392, 7391, 7390, 7389, 7388, 7387, 7386, 7385, 7384, 7383, 7382, 7381, 7380, 7379, 7378, 7377, 7376, 7375, 7374, 7373, 7372, 7371, 7370, 7369, 7368, 7367, 7366, 7365, 7364, 7363, 7362, 7361, 7360, 7359, 7358, 7357, 7356, 7355, 7354, 7353, 7352, 7351, 7350, 7349, 7348, 7347, 7346, 7345, 7344, 7343, 7342, 7341, 7340, 7339, 7338, 7337, 7336, 7335, 7334, 7333, 7332, 7331, 7330, 7329, 7328, 7327, 7326, 7325, 7324, 7323, 7322, 7321, 7320, 7319, 7318, 7317, 7316, 7315, 7314, 7313, 7312, 7311, 7310, 7309, 7308, 7307, 7306, 7305, 7304, 7303, 7302, 7301, 7300, 7299, 7298, 7297, 7296, 7295, 7294, 7293, 7292, 7291, 7290, 7289, 7288, 7287, 7286, 7285, 7284, 7283, 7282, 7281, 7280, 7279, 7278, 7277, 7276, 7275, 7274, 7273, 7272, 7271, 7270, 7269, 7268, 7267, 7266, 7265, 7264, 7263, 7262, 7261, 7260, 7259, 7258, 7257, 7256, 7255, 7254, 7253, 7252, 7251, 7250, 7249, 7248, 7247, 7246, 7245, 7244, 7243, 7242, 7241, 7240, 7239, 7238, 7237, 7236, 7235, 7234, 7233, 7232, 7231, 7230, 7229, 7228, 7227, 7226, 7225, 7224, 7223, 7222, 7221, 7220, 7219, 7218, 7217, 7216, 7215, 7214, 7213, 7212, 7211, 7210, 7209, 7208, 7207, 7206, 7205, 7204, 7203, 7202, 7201, 7200, 7199, 7198, 7197, 7196, 7195, 7194, 7193, 7192, 7191, 7190, 7189, 7188, 7187, 7186, 7185, 7184, 7183, 7182, 7181, 7180, 7179, 7178, 7177, 7176, 7175, 7174, 7173, 7172, 7171, 7170, 7169, 7168, 7167, 7166, 7165, 7164, 7163, 7162, 7161, 7160, 7159, 7158, 7157, 7156, 7155, 7154, 7153, 7152, 7151, 7150, 7149, 7148, 7147, 7146, 7145, 7144, 7143, 7142, 7141, 7140, 7139, 7138, 7137, 7136, 7135, 7134, 7133, 7132, 7131, 7130, 7129, 7128, 7127, 7126, 7125, 7124, 7123, 7122, 7121, 7120, 7119, 7118, 7117, 7116, 7115, 7114, 7113, 7112, 7111, 7110, 7109, 7108, 7107, 7106, 7105, 7104, 7103, 7102, 7101, 7100, 7099, 7098, 7097, 7096, 7095, 7094, 7093, 7092, 7091, 7090, 7089, 7088, 7087, 7086, 7085, 7084, 7083, 7082, 7081, 7080, 7079, 7078, 7077, 7076, 7075, 7074, 7073, 7072, 7071, 7070, 7069, 7068, 7067, 7066, 7065, 7064, 7063, 7062, 7061, 7060, 7059, 7058, 7057, 7056, 7055, 7054, 7053, 7052, 7051, 7050, 7049, 7048, 7047, 7046, 7045, 7044, 7043, 7042, 7041, 7040, 7039, 7038, 7037, 7036, 7035, 7034, 7033, 7032, 7031, 7030, 7029, 7028, 7027, 7026, 7025, 7024, 7023, 7022, 7021, 7020, 7019, 7018, 7017, 7016, 7015, 7014, 7013, 7012, 7011, 7010, 7009, 7008, 7007, 7006, 7005, 7004, 7003, 7002, 7001, 7000, 6999, 6998, 6997, 6996, 6995, 6994, 6993, 6992, 6991, 6990, 6989, 6988, 6987, 6986, 6985, 6984, 6983, 6982, 6981, 6980, 6979, 6978, 6977, 6976, 6975, 6974, 6973, 6972, 6971, 6970, 6969, 6968, 6967, 6966, 6965, 6964, 6963, 6962, 6961, 6960, 6959, 6958, 6957, 6956, 6955, 6954, 6953, 6952, 6951, 6950, 6949, 6948, 6947, 6946, 6945, 6944, 6943, 6942, 6941, 6940, 6939, 6938, 6937, 6936, 6935, 6934, 6933, 6932, 6931, 6930, 6929, 6928, 6927, 6926, 6925, 6924, 6923, 6922, 6921, 6920, 6919, 6918, 6917, 6916, 6915, 6914, 6913, 6912, 6911, 6910, 6909, 6908, 6907, 6906, 6905, 6904, 6903, 6902, 6901, 6900, 6899, 6898, 6897, 6896, 6895, 6894, 6893, 6892, 6891, 6890, 6889, 6888, 6887, 6886, 6885, 6884, 6883, 6882, 6881, 6880, 6879, 6878, 6877, 6876, 6875, 6874, 6873, 6872, 6871, 6870, 6869, 6868, 6867, 6866, 6865, 6864, 6863, 6862, 6861, 6860, 6859, 6858, 6857, 6856, 6855, 6854, 6853, 6852, 6851, 6850, 6849, 6848, 6847, 6846, 6845, 6844, 6843, 6842, 6841, 6840, 6839, 6838, 6837, 6836, 6835, 6834, 6833, 6832, 6831, 6830, 6829, 6828, 6827, 6826, 6825, 6824, 6823, 6822, 6821, 6820, 6819, 6818, 6817, 6816, 6815, 6814, 6813, 6812, 6811, 6810, 6809, 6808, 6807, 6806, 6805, 6804, 6803, 6802, 6801, 6800, 6799, 6798, 6797, 6796, 6795, 6794, 6793, 6792, 6791, 6790, 6789, 6788, 6787, 6786, 6785, 6784, 6783, 6782, 6781, 6780, 6779, 6778, 6777, 6776, 6775, 6774, 6773, 6772, 6771, 6770, 6769, 6768, 6767, 6766, 6765, 6764, 6763, 6762, 6761, 6760, 6759, 6758, 6757, 6756, 6755, 6754, 6753, 6752, 6751, 6750, 6749, 6748, 6747, 6746, 6745, 6744, 6743, 6742, 6741, 6740, 6739, 6738, 6737, 6736, 6735, 6734, 6733, 6732, 6731, 6730, 6729, 6728, 6727, 6726, 6725, 6724, 6723, 6722, 6721, 6720, 6719, 6718, 6717, 6716, 6715, 6714, 6713, 6712, 6711, 6710, 6709, 6708, 6707, 6706, 6705, 6704, 6703, 6702, 6701, 6700, 6699, 6698, 6697, 6696, 6695, 6694, 6693, 6692, 6691, 6690, 6689, 6688, 6687, 6686, 6685, 6684, 6683, 6682, 6681, 6680, 6679, 6678, 6677, 6676, 6675, 6674, 6673, 6672, 6671, 6670, 6669, 6668, 6667, 6666, 6665, 6664, 6663, 6662, 6661, 6660, 6659, 6658, 6657, 6656, 6655, 6654, 6653, 6652, 6651, 6650, 6649, 6648, 6647, 6646, 6645, 6644, 6643, 6642, 6641, 6640, 6639, 6638, 6637, 6636, 6635, 6634, 6633, 6632, 6631, 6630, 6629, 6628, 6627, 6626, 6625, 6624, 6623, 6622, 6621, 6620, 6619, 6618, 6617, 6616, 6615, 6614, 6613, 6612, 6611, 6610, 6609, 6608, 6607, 6606, 6605, 6604, 6603, 6602, 6601, 6600, 6599, 6598, 6597, 6596, 6595, 6594, 6593, 6592, 6591, 6590, 6589, 6588, 6587, 6586, 6585, 6584, 6583, 6582, 6581, 6580, 6579, 6578, 6577, 6576, 6575, 6574, 6573, 6572, 6571, 6570, 6569, 6568, 6567, 6566, 6565, 6564, 6563, 6562, 6561, 6560, 6559, 6558, 6557, 6556, 6555, 6554, 6553, 6552, 6551, 6550, 6549, 6548, 6547, 6546, 6545, 6544, 6543, 6542, 6541, 6540, 6539, 6538, 6537, 6536, 6535, 6534, 6533, 6532, 6531, 6530, 6529, 6528, 6527, 6526, 6525, 6524, 6523, 6522, 6521, 6520, 6519, 6518, 6517, 6516, 6515, 6514, 6513, 6512, 6511, 6510, 6509, 6508, 6507, 6506, 6505, 6504, 6503, 6502, 6501, 6500, 6499, 6498, 6497, 6496, 6495, 6494, 6493, 6492, 6491, 6490, 6489, 6488, 6487, 6486, 6485, 6484, 6483, 6482, 6481, 6480, 6479, 6478, 6477, 6476, 6475, 6474, 6473, 6472, 6471, 6470, 6469, 6468, 6467, 6466, 6465, 6464, 6463, 6462, 6461, 6460, 6459, 6458, 6457, 6456, 6455, 6454, 6453, 6452, 6451, 6450, 6449, 6448, 6447, 6446, 6445, 6444, 6443, 6442, 6441, 6440, 6439, 6438, 6437, 6436, 6435, 6434, 6433, 6432, 6431, 6430, 6429, 6428, 6427, 6426, 6425, 6424, 6423, 6422, 6421, 6420, 6419, 6418, 6417, 6416, 6415, 6414, 6413, 6412, 6411, 6410, 6409, 6408, 6407, 6406, 6405, 6404, 6403, 6402, 6401, 6400, 6399, 6398, 6397, 6396, 6395, 6394, 6393, 6392, 6391, 6390, 6389, 6388, 6387, 6386, 6385, 6384, 6383, 6382, 6381, 6380, 6379, 6378, 6377, 6376, 6375, 6374, 6373, 6372, 6371, 6370, 6369, 6368, 6367, 6366, 6365, 6364, 6363, 6362, 6361, 6360, 6359, 6358, 6357, 6356, 6355, 6354, 6353, 6352, 6351, 6350, 6349, 6348, 6347, 6346, 6345, 6344, 6343, 6342, 6341, 6340, 6339, 6338, 6337, 6336, 6335, 6334, 6333, 6332, 6331, 6330, 6329, 6328, 6327, 6326, 6325, 6324, 6323, 6322, 6321, 6320, 6319, 6318, 6317, 6316, 6315, 6314, 6313, 6312, 6311, 6310, 6309, 6308, 6307, 6306, 6305, 6304, 6303, 6302, 6301, 6300, 6299, 6298, 6297, 6296, 6295, 6294, 6293, 6292, 6291, 6290, 6289, 6288, 6287, 6286, 6285, 6284, 6283, 6282, 6281, 6280, 6279, 6278, 6277, 6276, 6275, 6274, 6273, 6272, 6271, 6270, 6269, 6268, 6267, 6266, 6265, 6264, 6263, 6262, 6261, 6260, 6259, 6258, 6257, 6256, 6255, 6254, 6253, 6252, 6251, 6250, 6249, 6248, 6247, 6246, 6245, 6244, 6243, 6242, 6241, 6240, 6239, 6238, 6237, 6236, 6235, 6234, 6233, 6232, 6231, 6230, 6229, 6228, 6227, 6226, 6225, 6224, 6223, 6222, 6221, 6220, 6219, 6218, 6217, 6216, 6215, 6214, 6213, 6212, 6211, 6210, 6209, 6208, 6207, 6206, 6205, 6204, 6203, 6202, 6201, 6200, 6199, 6198, 6197, 6196, 6195, 6194, 6193, 6192, 6191, 6190, 6189, 6188, 6187, 6186, 6185, 6184, 6183, 6182, 6181, 6180, 6179, 6178, 6177, 6176, 6175, 6174, 6173, 6172, 6171, 6170, 6169, 6168, 6167, 6166, 6165, 6164, 6163, 6162, 6161, 6160, 6159, 6158, 6157, 6156, 6155, 6154, 6153, 6152, 6151, 6150, 6149, 6148, 6147, 6146, 6145, 6144, 6143, 6142, 6141, 6140, 6139, 6138, 6137, 6136, 6135, 6134, 6133, 6132, 6131, 6130, 6129, 6128, 6127, 6126, 6125, 6124, 6123, 6122, 6121, 6120, 6119, 6118, 6117, 6116, 6115, 6114, 6113, 6112, 6111, 6110, 6109, 6108, 6107, 6106, 6105, 6104, 6103, 6102, 6101, 6100, 6099, 6098, 6097, 6096, 6095, 6094, 6093, 6092, 6091, 6090, 6089, 6088, 6087, 6086, 6085, 6084, 6083, 6082, 6081, 6080, 6079, 6078, 6077, 6076, 6075, 6074, 6073, 6072, 6071, 6070, 6069, 6068, 6067, 6066, 6065, 6064, 6063, 6062, 6061, 6060, 6059, 6058, 6057, 6056, 6055, 6054, 6053, 6052, 6051, 6050, 6049, 6048, 6047, 6046, 6045, 6044, 6043, 6042, 6041, 6040, 6039, 6038, 6037, 6036, 6035, 6034, 6033, 6032, 6031, 6030, 6029, 6028, 6027, 6026, 6025, 6024, 6023, 6022, 6021, 6020, 6019, 6018, 6017, 6016, 6015, 6014, 6013, 6012, 6011, 6010, 6009, 6008, 6007, 6006, 6005, 6004, 6003, 6002, 6001, 6000, 5999, 5998, 5997, 5996, 5995, 5994, 5993, 5992, 5991, 5990, 5989, 5988, 5987, 5986, 5985, 5984, 5983, 5982, 5981, 5980, 5979, 5978, 5977, 5976, 5975, 5974, 5973, 5972, 5971, 5970, 5969, 5968, 5967, 5966, 5965, 5964, 5963, 5962, 5961, 5960, 5959, 5958, 5957, 5956, 5955, 5954, 5953, 5952, 5951, 5950, 5949, 5948, 5947, 5946, 5945, 5944, 5943, 5942, 5941, 5940, 5939, 5938, 5937, 5936, 5935, 5934, 5933, 5932, 5931, 5930, 5929, 5928, 5927, 5926, 5925, 5924, 5923, 5922, 5921, 5920, 5919, 5918, 5917, 5916, 5915, 5914, 5913, 5912, 5911, 5910, 5909, 5908, 5907, 5906, 5905, 5904, 5903, 5902, 5901, 5900, 5899, 5898, 5897, 5896, 5895, 5894, 5893, 5892, 5891, 5890, 5889, 5888, 5887, 5886, 5885, 5884, 5883, 5882, 5881, 5880, 5879, 5878, 5877, 5876, 5875, 5874, 5873, 5872, 5871, 5870, 5869, 5868, 5867, 5866, 5865, 5864, 5863, 5862, 5861, 5860, 5859, 5858, 5857, 5856, 5855, 5854, 5853, 5852, 5851, 5850, 5849, 5848, 5847, 5846, 5845, 5844, 5843, 5842, 5841, 5840, 5839, 5838, 5837, 5836, 5835, 5834, 5833, 5832, 5831, 5830, 5829, 5828, 5827, 5826, 5825, 5824, 5823, 5822, 5821, 5820, 5819, 5818, 5817, 5816, 5815, 5814, 5813, 5812, 5811, 5810, 5809, 5808, 5807, 5806, 5805, 5804, 5803, 5802, 5801, 5800, 5799, 5798, 5797, 5796, 5795, 5794, 5793, 5792, 5791, 5790, 5789, 5788, 5787, 5786, 5785, 5784, 5783, 5782, 5781, 5780, 5779, 5778, 5777, 5776, 5775, 5774, 5773, 5772, 5771, 5770, 5769, 5768, 5767, 5766, 5765, 5764, 5763, 5762, 5761, 5760, 5759, 5758, 5757, 5756, 5755, 5754, 5753, 5752, 5751, 5750, 5749, 5748, 5747, 5746, 5745, 5744, 5743, 5742, 5741, 5740, 5739, 5738, 5737, 5736, 5735, 5734, 5733, 5732, 5731, 5730, 5729, 5728, 5727, 5726, 5725, 5724, 5723, 5722, 5721, 5720, 5719, 5718, 5717, 5716, 5715, 5714, 5713, 5712, 5711, 5710, 5709, 5708, 5707, 5706, 5705, 5704, 5703, 5702, 5701, 5700, 5699, 5698, 5697, 5696, 5695, 5694, 5693, 5692, 5691, 5690, 5689, 5688, 5687, 5686, 5685, 5684, 5683, 5682, 5681, 5680, 5679, 5678, 5677, 5676, 5675, 5674, 5673, 5672, 5671, 5670, 5669, 5668, 5667, 5666, 5665, 5664, 5663, 5662, 5661, 5660, 5659, 5658, 5657, 5656, 5655, 5654, 5653, 5652, 5651, 5650, 5649, 5648, 5647, 5646, 5645, 5644, 5643, 5642, 5641, 5640, 5639, 5638, 5637, 5636, 5635, 5634, 5633, 5632, 5631, 5630, 5629, 5628, 5627, 5626, 5625, 5624, 5623, 5622, 5621, 5620, 5619, 5618, 5617, 5616, 5615, 5614, 5613, 5612, 5611, 5610, 5609, 5608, 5607, 5606, 5605, 5604, 5603, 5602, 5601, 5600, 5599, 5598, 5597, 5596, 5595, 5594, 5593, 5592, 5591, 5590, 5589, 5588, 5587, 5586, 5585, 5584, 5583, 5582, 5581, 5580, 5579, 5578, 5577, 5576, 5575, 5574, 5573, 5572, 5571, 5570, 5569, 5568, 5567, 5566, 5565, 5564, 5563, 5562, 5561, 5560, 5559, 5558, 5557, 5556, 5555, 5554, 5553, 5552, 5551, 5550, 5549, 5548, 5547, 5546, 5545, 5544, 5543, 5542, 5541, 5540, 5539, 5538, 5537, 5536, 5535, 5534, 5533, 5532, 5531, 5530, 5529, 5528, 5527, 5526, 5525, 5524, 5523, 5522, 5521, 5520, 5519, 5518, 5517, 5516, 5515, 5514, 5513, 5512, 5511, 5510, 5509, 5508, 5507, 5506, 5505, 5504, 5503, 5502, 5501, 5500, 5499, 5498, 5497, 5496, 5495, 5494, 5493, 5492, 5491, 5490, 5489, 5488, 5487, 5486, 5485, 5484, 5483, 5482, 5481, 5480, 5479, 5478, 5477, 5476, 5475, 5474, 5473, 5472, 5471, 5470, 5469, 5468, 5467, 5466, 5465, 5464, 5463, 5462, 5461, 5460, 5459, 5458, 5457, 5456, 5455, 5454, 5453, 5452, 5451, 5450, 5449, 5448, 5447, 5446, 5445, 5444, 5443, 5442, 5441, 5440, 5439, 5438, 5437, 5436, 5435, 5434, 5433, 5432, 5431, 5430, 5429, 5428, 5427, 5426, 5425, 5424, 5423, 5422, 5421, 5420, 5419, 5418, 5417, 5416, 5415, 5414, 5413, 5412, 5411, 5410, 5409, 5408, 5407, 5406, 5405, 5404, 5403, 5402, 5401, 5400, 5399, 5398, 5397, 5396, 5395, 5394, 5393, 5392, 5391, 5390, 5389, 5388, 5387, 5386, 5385, 5384, 5383, 5382, 5381, 5380, 5379, 5378, 5377, 5376, 5375, 5374, 5373, 5372, 5371, 5370, 5369, 5368, 5367, 5366, 5365, 5364, 5363, 5362, 5361, 5360, 5359, 5358, 5357, 5356, 5355, 5354, 5353, 5352, 5351, 5350, 5349, 5348, 5347, 5346, 5345, 5344, 5343, 5342, 5341, 5340, 5339, 5338, 5337, 5336, 5335, 5334, 5333, 5332, 5331, 5330, 5329, 5328, 5327, 5326, 5325, 5324, 5323, 5322, 5321, 5320, 5319, 5318, 5317, 5316, 5315, 5314, 5313, 5312, 5311, 5310, 5309, 5308, 5307, 5306, 5305, 5304, 5303, 5302, 5301, 5300, 5299, 5298, 5297, 5296, 5295, 5294, 5293, 5292, 5291, 5290, 5289, 5288, 5287, 5286, 5285, 5284, 5283, 5282, 5281, 5280, 5279, 5278, 5277, 5276, 5275, 5274, 5273, 5272, 5271, 5270, 5269, 5268, 5267, 5266, 5265, 5264, 5263, 5262, 5261, 5260, 5259, 5258, 5257, 5256, 5255, 5254, 5253, 5252, 5251, 5250, 5249, 5248, 5247, 5246, 5245, 5244, 5243, 5242, 5241, 5240, 5239, 5238, 5237, 5236, 5235, 5234, 5233, 5232, 5231, 5230, 5229, 5228, 5227, 5226, 5225, 5224, 5223, 5222, 5221, 5220, 5219, 5218, 5217, 5216, 5215, 5214, 5213, 5212, 5211, 5210, 5209, 5208, 5207, 5206, 5205, 5204, 5203, 5202, 5201, 5200, 5199, 5198, 5197, 5196, 5195, 5194, 5193, 5192, 5191, 5190, 5189, 5188, 5187, 5186, 5185, 5184, 5183, 5182, 5181, 5180, 5179, 5178, 5177, 5176, 5175, 5174, 5173, 5172, 5171, 5170, 5169, 5168, 5167, 5166, 5165, 5164, 5163, 5162, 5161, 5160, 5159, 5158, 5157, 5156, 5155, 5154, 5153, 5152, 5151, 5150, 5149, 5148, 5147, 5146, 5145, 5144, 5143, 5142, 5141, 5140, 5139, 5138, 5137, 5136, 5135, 5134, 5133, 5132, 5131, 5130, 5129, 5128, 5127, 5126, 5125, 5124, 5123, 5122, 5121, 5120, 5119, 5118, 5117, 5116, 5115, 5114, 5113, 5112, 5111, 5110, 5109, 5108, 5107, 5106, 5105, 5104, 5103, 5102, 5101, 5100, 5099, 5098, 5097, 5096, 5095, 5094, 5093, 5092, 5091, 5090, 5089, 5088, 5087, 5086, 5085, 5084, 5083, 5082, 5081, 5080, 5079, 5078, 5077, 5076, 5075, 5074, 5073, 5072, 5071, 5070, 5069, 5068, 5067, 5066, 5065, 5064, 5063, 5062, 5061, 5060, 5059, 5058, 5057, 5056, 5055, 5054, 5053, 5052, 5051, 5050, 5049, 5048, 5047, 5046, 5045, 5044, 5043, 5042, 5041, 5040, 5039, 5038, 5037, 5036, 5035, 5034, 5033, 5032, 5031, 5030, 5029, 5028, 5027, 5026, 5025, 5024, 5023, 5022, 5021, 5020, 5019, 5018, 5017, 5016, 5015, 5014, 5013, 5012, 5011, 5010, 5009, 5008, 5007, 5006, 5005, 5004, 5003, 5002, 5001, 5000, 4999, 4998, 4997, 4996, 4995, 4994, 4993, 4992, 4991, 4990, 4989, 4988, 4987, 4986, 4985, 4984, 4983, 4982, 4981, 4980, 4979, 4978, 4977, 4976, 4975, 4974, 4973, 4972, 4971, 4970, 4969, 4968, 4967, 4966, 4965, 4964, 4963, 4962, 4961, 4960, 4959, 4958, 4957, 4956, 4955, 4954, 4953, 4952, 4951, 4950, 4949, 4948, 4947, 4946, 4945, 4944, 4943, 4942, 4941, 4940, 4939, 4938, 4937, 4936, 4935, 4934, 4933, 4932, 4931, 4930, 4929, 4928, 4927, 4926, 4925, 4924, 4923, 4922, 4921, 4920, 4919, 4918, 4917, 4916, 4915, 4914, 4913, 4912, 4911, 4910, 4909, 4908, 4907, 4906, 4905, 4904, 4903, 4902, 4901, 4900, 4899, 4898, 4897, 4896, 4895, 4894, 4893, 4892, 4891, 4890, 4889, 4888, 4887, 4886, 4885, 4884, 4883, 4882, 4881, 4880, 4879, 4878, 4877, 4876, 4875, 4874, 4873, 4872, 4871, 4870, 4869, 4868, 4867, 4866, 4865, 4864, 4863, 4862, 4861, 4860, 4859, 4858, 4857, 4856, 4855, 4854, 4853, 4852, 4851, 4850, 4849, 4848, 4847, 4846, 4845, 4844, 4843, 4842, 4841, 4840, 4839, 4838, 4837, 4836, 4835, 4834, 4833, 4832, 4831, 4830, 4829, 4828, 4827, 4826, 4825, 4824, 4823, 4822, 4821, 4820, 4819, 4818, 4817, 4816, 4815, 4814, 4813, 4812, 4811, 4810, 4809, 4808, 4807, 4806, 4805, 4804, 4803, 4802, 4801, 4800, 4799, 4798, 4797, 4796, 4795, 4794, 4793, 4792, 4791, 4790, 4789, 4788, 4787, 4786, 4785, 4784, 4783, 4782, 4781, 4780, 4779, 4778, 4777, 4776, 4775, 4774, 4773, 4772, 4771, 4770, 4769, 4768, 4767, 4766, 4765, 4764, 4763, 4762, 4761, 4760, 4759, 4758, 4757, 4756, 4755, 4754, 4753, 4752, 4751, 4750, 4749, 4748, 4747, 4746, 4745, 4744, 4743, 4742, 4741, 4740, 4739, 4738, 4737, 4736, 4735, 4734, 4733, 4732, 4731, 4730, 4729, 4728, 4727, 4726, 4725, 4724, 4723, 4722, 4721, 4720, 4719, 4718, 4717, 4716, 4715, 4714, 4713, 4712, 4711, 4710, 4709, 4708, 4707, 4706, 4705, 4704, 4703, 4702, 4701, 4700, 4699, 4698, 4697, 4696, 4695, 4694, 4693, 4692, 4691, 4690, 4689, 4688, 4687, 4686, 4685, 4684, 4683, 4682, 4681, 4680, 4679, 4678, 4677, 4676, 4675, 4674, 4673, 4672, 4671, 4670, 4669, 4668, 4667, 4666, 4665, 4664, 4663, 4662, 4661, 4660, 4659, 4658, 4657, 4656, 4655, 4654, 4653, 4652, 4651, 4650, 4649, 4648, 4647, 4646, 4645, 4644, 4643, 4642, 4641, 4640, 4639, 4638, 4637, 4636, 4635, 4634, 4633, 4632, 4631, 4630, 4629, 4628, 4627, 4626, 4625, 4624, 4623, 4622, 4621, 4620, 4619, 4618, 4617, 4616, 4615, 4614, 4613, 4612, 4611, 4610, 4609, 4608, 4607, 4606, 4605, 4604, 4603, 4602, 4601, 4600, 4599, 4598, 4597, 4596, 4595, 4594, 4593, 4592, 4591, 4590, 4589, 4588, 4587, 4586, 4585, 4584, 4583, 4582, 4581, 4580, 4579, 4578, 4577, 4576, 4575, 4574, 4573, 4572, 4571, 4570, 4569, 4568, 4567, 4566, 4565, 4564, 4563, 4562, 4561, 4560, 4559, 4558, 4557, 4556, 4555, 4554, 4553, 4552, 4551, 4550, 4549, 4548, 4547, 4546, 4545, 4544, 4543, 4542, 4541, 4540, 4539, 4538, 4537, 4536, 4535, 4534, 4533, 4532, 4531, 4530, 4529, 4528, 4527, 4526, 4525, 4524, 4523, 4522, 4521, 4520, 4519, 4518, 4517, 4516, 4515, 4514, 4513, 4512, 4511, 4510, 4509, 4508, 4507, 4506, 4505, 4504, 4503, 4502, 4501, 4500, 4499, 4498, 4497, 4496, 4495, 4494, 4493, 4492, 4491, 4490, 4489, 4488, 4487, 4486, 4485, 4484, 4483, 4482, 4481, 4480, 4479, 4478, 4477, 4476, 4475, 4474, 4473, 4472, 4471, 4470, 4469, 4468, 4467, 4466, 4465, 4464, 4463, 4462, 4461, 4460, 4459, 4458, 4457, 4456, 4455, 4454, 4453, 4452, 4451, 4450, 4449, 4448, 4447, 4446, 4445, 4444, 4443, 4442, 4441, 4440, 4439, 4438, 4437, 4436, 4435, 4434, 4433, 4432, 4431, 4430, 4429, 4428, 4427, 4426, 4425, 4424, 4423, 4422, 4421, 4420, 4419, 4418, 4417, 4416, 4415, 4414, 4413, 4412, 4411, 4410, 4409, 4408, 4407, 4406, 4405, 4404, 4403, 4402, 4401, 4400, 4399, 4398, 4397, 4396, 4395, 4394, 4393, 4392, 4391, 4390, 4389, 4388, 4387, 4386, 4385, 4384, 4383, 4382, 4381, 4380, 4379, 4378, 4377, 4376, 4375, 4374, 4373, 4372, 4371, 4370, 4369, 4368, 4367, 4366, 4365, 4364, 4363, 4362, 4361, 4360, 4359, 4358, 4357, 4356, 4355, 4354, 4353, 4352, 4351, 4350, 4349, 4348, 4347, 4346, 4345, 4344, 4343, 4342, 4341, 4340, 4339, 4338, 4337, 4336, 4335, 4334, 4333, 4332, 4331, 4330, 4329, 4328, 4327, 4326, 4325, 4324, 4323, 4322, 4321, 4320, 4319, 4318, 4317, 4316, 4315, 4314, 4313, 4312, 4311, 4310, 4309, 4308, 4307, 4306, 4305, 4304, 4303, 4302, 4301, 4300, 4299, 4298, 4297, 4296, 4295, 4294, 4293, 4292, 4291, 4290, 4289, 4288, 4287, 4286, 4285, 4284, 4283, 4282, 4281, 4280, 4279, 4278, 4277, 4276, 4275, 4274, 4273, 4272, 4271, 4270, 4269, 4268, 4267, 4266, 4265, 4264, 4263, 4262, 4261, 4260, 4259, 4258, 4257, 4256, 4255, 4254, 4253, 4252, 4251, 4250, 4249, 4248, 4247, 4246, 4245, 4244, 4243, 4242, 4241, 4240, 4239, 4238, 4237, 4236, 4235, 4234, 4233, 4232, 4231, 4230, 4229, 4228, 4227, 4226, 4225, 4224, 4223, 4222, 4221, 4220, 4219, 4218, 4217, 4216, 4215, 4214, 4213, 4212, 4211, 4210, 4209, 4208, 4207, 4206, 4205, 4204, 4203, 4202, 4201, 4200, 4199, 4198, 4197, 4196, 4195, 4194, 4193, 4192, 4191, 4190, 4189, 4188, 4187, 4186, 4185, 4184, 4183, 4182, 4181, 4180, 4179, 4178, 4177, 4176, 4175, 4174, 4173, 4172, 4171, 4170, 4169, 4168, 4167, 4166, 4165, 4164, 4163, 4162, 4161, 4160, 4159, 4158, 4157, 4156, 4155, 4154, 4153, 4152, 4151, 4150, 4149, 4148, 4147, 4146, 4145, 4144, 4143, 4142, 4141, 4140, 4139, 4138, 4137, 4136, 4135, 4134, 4133, 4132, 4131, 4130, 4129, 4128, 4127, 4126, 4125, 4124, 4123, 4122, 4121, 4120, 4119, 4118, 4117, 4116, 4115, 4114, 4113, 4112, 4111, 4110, 4109, 4108, 4107, 4106, 4105, 4104, 4103, 4102, 4101, 4100, 4099, 4098, 4097, 4096, 4095, 4094, 4093, 4092, 4091, 4090, 4089, 4088, 4087, 4086, 4085, 4084, 4083, 4082, 4081, 4080, 4079, 4078, 4077, 4076, 4075, 4074, 4073, 4072, 4071, 4070, 4069, 4068, 4067, 4066, 4065, 4064, 4063, 4062, 4061, 4060, 4059, 4058, 4057, 4056, 4055, 4054, 4053, 4052, 4051, 4050, 4049, 4048, 4047, 4046, 4045, 4044, 4043, 4042, 4041, 4040, 4039, 4038, 4037, 4036, 4035, 4034, 4033, 4032, 4031, 4030, 4029, 4028, 4027, 4026, 4025, 4024, 4023, 4022, 4021, 4020, 4019, 4018, 4017, 4016, 4015, 4014, 4013, 4012, 4011, 4010, 4009, 4008, 4007, 4006, 4005, 4004, 4003, 4002, 4001, 4000, 3999, 3998, 3997, 3996, 3995, 3994, 3993, 3992, 3991, 3990, 3989, 3988, 3987, 3986, 3985, 3984, 3983, 3982, 3981, 3980, 3979, 3978, 3977, 3976, 3975, 3974, 3973, 3972, 3971, 3970, 3969, 3968, 3967, 3966, 3965, 3964, 3963, 3962, 3961, 3960, 3959, 3958, 3957, 3956, 3955, 3954, 3953, 3952, 3951, 3950, 3949, 3948, 3947, 3946, 3945, 3944, 3943, 3942, 3941, 3940, 3939, 3938, 3937, 3936, 3935, 3934, 3933, 3932, 3931, 3930, 3929, 3928, 3927, 3926, 3925, 3924, 3923, 3922, 3921, 3920, 3919, 3918, 3917, 3916, 3915, 3914, 3913, 3912, 3911, 3910, 3909, 3908, 3907, 3906, 3905, 3904, 3903, 3902, 3901, 3900, 3899, 3898, 3897, 3896, 3895, 3894, 3893, 3892, 3891, 3890, 3889, 3888, 3887, 3886, 3885, 3884, 3883, 3882, 3881, 3880, 3879, 3878, 3877, 3876, 3875, 3874, 3873, 3872, 3871, 3870, 3869, 3868, 3867, 3866, 3865, 3864, 3863, 3862, 3861, 3860, 3859, 3858, 3857, 3856, 3855, 3854, 3853, 3852, 3851, 3850, 3849, 3848, 3847, 3846, 3845, 3844, 3843, 3842, 3841, 3840, 3839, 3838, 3837, 3836, 3835, 3834, 3833, 3832, 3831, 3830, 3829, 3828, 3827, 3826, 3825, 3824, 3823, 3822, 3821, 3820, 3819, 3818, 3817, 3816, 3815, 3814, 3813, 3812, 3811, 3810, 3809, 3808, 3807, 3806, 3805, 3804, 3803, 3802, 3801, 3800, 3799, 3798, 3797, 3796, 3795, 3794, 3793, 3792, 3791, 3790, 3789, 3788, 3787, 3786, 3785, 3784, 3783, 3782, 3781, 3780, 3779, 3778, 3777, 3776, 3775, 3774, 3773, 3772, 3771, 3770, 3769, 3768, 3767, 3766, 3765, 3764, 3763, 3762, 3761, 3760, 3759, 3758, 3757, 3756, 3755, 3754, 3753, 3752, 3751, 3750, 3749, 3748, 3747, 3746, 3745, 3744, 3743, 3742, 3741, 3740, 3739, 3738, 3737, 3736, 3735, 3734, 3733, 3732, 3731, 3730, 3729, 3728, 3727, 3726, 3725, 3724, 3723, 3722, 3721, 3720, 3719, 3718, 3717, 3716, 3715, 3714, 3713, 3712, 3711, 3710, 3709, 3708, 3707, 3706, 3705, 3704, 3703, 3702, 3701, 3700, 3699, 3698, 3697, 3696, 3695, 3694, 3693, 3692, 3691, 3690, 3689, 3688, 3687, 3686, 3685, 3684, 3683, 3682, 3681, 3680, 3679, 3678, 3677, 3676, 3675, 3674, 3673, 3672, 3671, 3670, 3669, 3668, 3667, 3666, 3665, 3664, 3663, 3662, 3661, 3660, 3659, 3658, 3657, 3656, 3655, 3654, 3653, 3652, 3651, 3650, 3649, 3648, 3647, 3646, 3645, 3644, 3643, 3642, 3641, 3640, 3639, 3638, 3637, 3636, 3635, 3634, 3633, 3632, 3631, 3630, 3629, 3628, 3627, 3626, 3625, 3624, 3623, 3622, 3621, 3620, 3619, 3618, 3617, 3616, 3615, 3614, 3613, 3612, 3611, 3610, 3609, 3608, 3607, 3606, 3605, 3604, 3603, 3602, 3601, 3600, 3599, 3598, 3597, 3596, 3595, 3594, 3593, 3592, 3591, 3590, 3589, 3588, 3587, 3586, 3585, 3584, 3583, 3582, 3581, 3580, 3579, 3578, 3577, 3576, 3575, 3574, 3573, 3572, 3571, 3570, 3569, 3568, 3567, 3566, 3565, 3564, 3563, 3562, 3561, 3560, 3559, 3558, 3557, 3556, 3555, 3554, 3553, 3552, 3551, 3550, 3549, 3548, 3547, 3546, 3545, 3544, 3543, 3542, 3541, 3540, 3539, 3538, 3537, 3536, 3535, 3534, 3533, 3532, 3531, 3530, 3529, 3528, 3527, 3526, 3525, 3524, 3523, 3522, 3521, 3520, 3519, 3518, 3517, 3516, 3515, 3514, 3513, 3512, 3511, 3510, 3509, 3508, 3507, 3506, 3505, 3504, 3503, 3502, 3501, 3500, 3499, 3498, 3497, 3496, 3495, 3494, 3493, 3492, 3491, 3490, 3489, 3488, 3487, 3486, 3485, 3484, 3483, 3482, 3481, 3480, 3479, 3478, 3477, 3476, 3475, 3474, 3473, 3472, 3471, 3470, 3469, 3468, 3467, 3466, 3465, 3464, 3463, 3462, 3461, 3460, 3459, 3458, 3457, 3456, 3455, 3454, 3453, 3452, 3451, 3450, 3449, 3448, 3447, 3446, 3445, 3444, 3443, 3442, 3441, 3440, 3439, 3438, 3437, 3436, 3435, 3434, 3433, 3432, 3431, 3430, 3429, 3428, 3427, 3426, 3425, 3424, 3423, 3422, 3421, 3420, 3419, 3418, 3417, 3416, 3415, 3414, 3413, 3412, 3411, 3410, 3409, 3408, 3407, 3406, 3405, 3404, 3403, 3402, 3401, 3400, 3399, 3398, 3397, 3396, 3395, 3394, 3393, 3392, 3391, 3390, 3389, 3388, 3387, 3386, 3385, 3384, 3383, 3382, 3381, 3380, 3379, 3378, 3377, 3376, 3375, 3374, 3373, 3372, 3371, 3370, 3369, 3368, 3367, 3366, 3365, 3364, 3363, 3362, 3361, 3360, 3359, 3358, 3357, 3356, 3355, 3354, 3353, 3352, 3351, 3350, 3349, 3348, 3347, 3346, 3345, 3344, 3343, 3342, 3341, 3340, 3339, 3338, 3337, 3336, 3335, 3334, 3333, 3332, 3331, 3330, 3329, 3328, 3327, 3326, 3325, 3324, 3323, 3322, 3321, 3320, 3319, 3318, 3317, 3316, 3315, 3314, 3313, 3312, 3311, 3310, 3309, 3308, 3307, 3306, 3305, 3304, 3303, 3302, 3301, 3300, 3299, 3298, 3297, 3296, 3295, 3294, 3293, 3292, 3291, 3290, 3289, 3288, 3287, 3286, 3285, 3284, 3283, 3282, 3281, 3280, 3279, 3278, 3277, 3276, 3275, 3274, 3273, 3272, 3271, 3270, 3269, 3268, 3267, 3266, 3265, 3264, 3263, 3262, 3261, 3260, 3259, 3258, 3257, 3256, 3255, 3254, 3253, 3252, 3251, 3250, 3249, 3248, 3247, 3246, 3245, 3244, 3243, 3242, 3241, 3240, 3239, 3238, 3237, 3236, 3235, 3234, 3233, 3232, 3231, 3230, 3229, 3228, 3227, 3226, 3225, 3224, 3223, 3222, 3221, 3220, 3219, 3218, 3217, 3216, 3215, 3214, 3213, 3212, 3211, 3210, 3209, 3208, 3207, 3206, 3205, 3204, 3203, 3202, 3201, 3200, 3199, 3198, 3197, 3196, 3195, 3194, 3193, 3192, 3191, 3190, 3189, 3188, 3187, 3186, 3185, 3184, 3183, 3182, 3181, 3180, 3179, 3178, 3177, 3176, 3175, 3174, 3173, 3172, 3171, 3170, 3169, 3168, 3167, 3166, 3165, 3164, 3163, 3162, 3161, 3160, 3159, 3158, 3157, 3156, 3155, 3154, 3153, 3152, 3151, 3150, 3149, 3148, 3147, 3146, 3145, 3144, 3143, 3142, 3141, 3140, 3139, 3138, 3137, 3136, 3135, 3134, 3133, 3132, 3131, 3130, 3129, 3128, 3127, 3126, 3125, 3124, 3123, 3122, 3121, 3120, 3119, 3118, 3117, 3116, 3115, 3114, 3113, 3112, 3111, 3110, 3109, 3108, 3107, 3106, 3105, 3104, 3103, 3102, 3101, 3100, 3099, 3098, 3097, 3096, 3095, 3094, 3093, 3092, 3091, 3090, 3089, 3088, 3087, 3086, 3085, 3084, 3083, 3082, 3081, 3080, 3079, 3078, 3077, 3076, 3075, 3074, 3073, 3072, 3071, 3070, 3069, 3068, 3067, 3066, 3065, 3064, 3063, 3062, 3061, 3060, 3059, 3058, 3057, 3056, 3055, 3054, 3053, 3052, 3051, 3050, 3049, 3048, 3047, 3046, 3045, 3044, 3043, 3042, 3041, 3040, 3039, 3038, 3037, 3036, 3035, 3034, 3033, 3032, 3031, 3030, 3029, 3028, 3027, 3026, 3025, 3024, 3023, 3022, 3021, 3020, 3019, 3018, 3017, 3016, 3015, 3014, 3013, 3012, 3011, 3010, 3009, 3008, 3007, 3006, 3005, 3004, 3003, 3002, 3001, 3000, 2999, 2998, 2997, 2996, 2995, 2994, 2993, 2992, 2991, 2990, 2989, 2988, 2987, 2986, 2985, 2984, 2983, 2982, 2981, 2980, 2979, 2978, 2977, 2976, 2975, 2974, 2973, 2972, 2971, 2970, 2969, 2968, 2967, 2966, 2965, 2964, 2963, 2962, 2961, 2960, 2959, 2958, 2957, 2956, 2955, 2954, 2953, 2952, 2951, 2950, 2949, 2948, 2947, 2946, 2945, 2944, 2943, 2942, 2941, 2940, 2939, 2938, 2937, 2936, 2935, 2934, 2933, 2932, 2931, 2930, 2929, 2928, 2927, 2926, 2925, 2924, 2923, 2922, 2921, 2920, 2919, 2918, 2917, 2916, 2915, 2914, 2913, 2912, 2911, 2910, 2909, 2908, 2907, 2906, 2905, 2904, 2903, 2902, 2901, 2900, 2899, 2898, 2897, 2896, 2895, 2894, 2893, 2892, 2891, 2890, 2889, 2888, 2887, 2886, 2885, 2884, 2883, 2882, 2881, 2880, 2879, 2878, 2877, 2876, 2875, 2874, 2873, 2872, 2871, 2870, 2869, 2868, 2867, 2866, 2865, 2864, 2863, 2862, 2861, 2860, 2859, 2858, 2857, 2856, 2855, 2854, 2853, 2852, 2851, 2850, 2849, 2848, 2847, 2846, 2845, 2844, 2843, 2842, 2841, 2840, 2839, 2838, 2837, 2836, 2835, 2834, 2833, 2832, 2831, 2830, 2829, 2828, 2827, 2826, 2825, 2824, 2823, 2822, 2821, 2820, 2819, 2818, 2817, 2816, 2815, 2814, 2813, 2812, 2811, 2810, 2809, 2808, 2807, 2806, 2805, 2804, 2803, 2802, 2801, 2800, 2799, 2798, 2797, 2796, 2795, 2794, 2793, 2792, 2791, 2790, 2789, 2788, 2787, 2786, 2785, 2784, 2783, 2782, 2781, 2780, 2779, 2778, 2777, 2776, 2775, 2774, 2773, 2772, 2771, 2770, 2769, 2768, 2767, 2766, 2765, 2764, 2763, 2762, 2761, 2760, 2759, 2758, 2757, 2756, 2755, 2754, 2753, 2752, 2751, 2750, 2749, 2748, 2747, 2746, 2745, 2744, 2743, 2742, 2741, 2740, 2739, 2738, 2737, 2736, 2735, 2734, 2733, 2732, 2731, 2730, 2729, 2728, 2727, 2726, 2725, 2724, 2723, 2722, 2721, 2720, 2719, 2718, 2717, 2716, 2715, 2714, 2713, 2712, 2711, 2710, 2709, 2708, 2707, 2706, 2705, 2704, 2703, 2702, 2701, 2700, 2699, 2698, 2697, 2696, 2695, 2694, 2693, 2692, 2691, 2690, 2689, 2688, 2687, 2686, 2685, 2684, 2683, 2682, 2681, 2680, 2679, 2678, 2677, 2676, 2675, 2674, 2673, 2672, 2671, 2670, 2669, 2668, 2667, 2666, 2665, 2664, 2663, 2662, 2661, 2660, 2659, 2658, 2657, 2656, 2655, 2654, 2653, 2652, 2651, 2650, 2649, 2648, 2647, 2646, 2645, 2644, 2643, 2642, 2641, 2640, 2639, 2638, 2637, 2636, 2635, 2634, 2633, 2632, 2631, 2630, 2629, 2628, 2627, 2626, 2625, 2624, 2623, 2622, 2621, 2620, 2619, 2618, 2617, 2616, 2615, 2614, 2613, 2612, 2611, 2610, 2609, 2608, 2607, 2606, 2605, 2604, 2603, 2602, 2601, 2600, 2599, 2598, 2597, 2596, 2595, 2594, 2593, 2592, 2591, 2590, 2589, 2588, 2587, 2586, 2585, 2584, 2583, 2582, 2581, 2580, 2579, 2578, 2577, 2576, 2575, 2574, 2573, 2572, 2571, 2570, 2569, 2568, 2567, 2566, 2565, 2564, 2563, 2562, 2561, 2560, 2559, 2558, 2557, 2556, 2555, 2554, 2553, 2552, 2551, 2550, 2549, 2548, 2547, 2546, 2545, 2544, 2543, 2542, 2541, 2540, 2539, 2538, 2537, 2536, 2535, 2534, 2533, 2532, 2531, 2530, 2529, 2528, 2527, 2526, 2525, 2524, 2523, 2522, 2521, 2520, 2519, 2518, 2517, 2516, 2515, 2514, 2513, 2512, 2511, 2510, 2509, 2508, 2507, 2506, 2505, 2504, 2503, 2502, 2501, 2500, 2499, 2498, 2497, 2496, 2495, 2494, 2493, 2492, 2491, 2490, 2489, 2488, 2487, 2486, 2485, 2484, 2483, 2482, 2481, 2480, 2479, 2478, 2477, 2476, 2475, 2474, 2473, 2472, 2471, 2470, 2469, 2468, 2467, 2466, 2465, 2464, 2463, 2462, 2461, 2460, 2459, 2458, 2457, 2456, 2455, 2454, 2453, 2452, 2451, 2450, 2449, 2448, 2447, 2446, 2445, 2444, 2443, 2442, 2441, 2440, 2439, 2438, 2437, 2436, 2435, 2434, 2433, 2432, 2431, 2430, 2429, 2428, 2427, 2426, 2425, 2424, 2423, 2422, 2421, 2420, 2419, 2418, 2417, 2416, 2415, 2414, 2413, 2412, 2411, 2410, 2409, 2408, 2407, 2406, 2405, 2404, 2403, 2402, 2401, 2400, 2399, 2398, 2397, 2396, 2395, 2394, 2393, 2392, 2391, 2390, 2389, 2388, 2387, 2386, 2385, 2384, 2383, 2382, 2381, 2380, 2379, 2378, 2377, 2376, 2375, 2374, 2373, 2372, 2371, 2370, 2369, 2368, 2367, 2366, 2365, 2364, 2363, 2362, 2361, 2360, 2359, 2358, 2357, 2356, 2355, 2354, 2353, 2352, 2351, 2350, 2349, 2348, 2347, 2346, 2345, 2344, 2343, 2342, 2341, 2340, 2339, 2338, 2337, 2336, 2335, 2334, 2333, 2332, 2331, 2330, 2329, 2328, 2327, 2326, 2325, 2324, 2323, 2322, 2321, 2320, 2319, 2318, 2317, 2316, 2315, 2314, 2313, 2312, 2311, 2310, 2309, 2308, 2307, 2306, 2305, 2304, 2303, 2302, 2301, 2300, 2299, 2298, 2297, 2296, 2295, 2294, 2293, 2292, 2291, 2290, 2289, 2288, 2287, 2286, 2285, 2284, 2283, 2282, 2281, 2280, 2279, 2278, 2277, 2276, 2275, 2274, 2273, 2272, 2271, 2270, 2269, 2268, 2267, 2266, 2265, 2264, 2263, 2262, 2261, 2260, 2259, 2258, 2257, 2256, 2255, 2254, 2253, 2252, 2251, 2250, 2249, 2248, 2247, 2246, 2245, 2244, 2243, 2242, 2241, 2240, 2239, 2238, 2237, 2236, 2235, 2234, 2233, 2232, 2231, 2230, 2229, 2228, 2227, 2226, 2225, 2224, 2223, 2222, 2221, 2220, 2219, 2218, 2217, 2216, 2215, 2214, 2213, 2212, 2211, 2210, 2209, 2208, 2207, 2206, 2205, 2204, 2203, 2202, 2201, 2200, 2199, 2198, 2197, 2196, 2195, 2194, 2193, 2192, 2191, 2190, 2189, 2188, 2187, 2186, 2185, 2184, 2183, 2182, 2181, 2180, 2179, 2178, 2177, 2176, 2175, 2174, 2173, 2172, 2171, 2170, 2169, 2168, 2167, 2166, 2165, 2164, 2163, 2162, 2161, 2160, 2159, 2158, 2157, 2156, 2155, 2154, 2153, 2152, 2151, 2150, 2149, 2148, 2147, 2146, 2145, 2144, 2143, 2142, 2141, 2140, 2139, 2138, 2137, 2136, 2135, 2134, 2133, 2132, 2131, 2130, 2129, 2128, 2127, 2126, 2125, 2124, 2123, 2122, 2121, 2120, 2119, 2118, 2117, 2116, 2115, 2114, 2113, 2112, 2111, 2110, 2109, 2108, 2107, 2106, 2105, 2104, 2103, 2102, 2101, 2100, 2099, 2098, 2097, 2096, 2095, 2094, 2093, 2092, 2091, 2090, 2089, 2088, 2087, 2086, 2085, 2084, 2083, 2082, 2081, 2080, 2079, 2078, 2077, 2076, 2075, 2074, 2073, 2072, 2071, 2070, 2069, 2068, 2067, 2066, 2065, 2064, 2063, 2062, 2061, 2060, 2059, 2058, 2057, 2056, 2055, 2054, 2053, 2052, 2051, 2050, 2049, 2048, 2047, 2046, 2045, 2044, 2043, 2042, 2041, 2040, 2039, 2038, 2037, 2036, 2035, 2034, 2033, 2032, 2031, 2030, 2029, 2028, 2027, 2026, 2025, 2024, 2023, 2022, 2021, 2020, 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011, 2010, 2009, 2008, 2007, 2006, 2005, 2004, 2003, 2002, 2001, 2000, 1999, 1998, 1997, 1996, 1995, 1994, 1993, 1992, 1991, 1990, 1989, 1988, 1987, 1986, 1985, 1984, 1983, 1982, 1981, 1980, 1979, 1978, 1977, 1976, 1975, 1974, 1973, 1972, 1971, 1970, 1969, 1968, 1967, 1966, 1965, 1964, 1963, 1962, 1961, 1960, 1959, 1958, 1957, 1956, 1955, 1954, 1953, 1952, 1951, 1950, 1949, 1948, 1947, 1946, 1945, 1944, 1943, 1942, 1941, 1940, 1939, 1938, 1937, 1936, 1935, 1934, 1933, 1932, 1931, 1930, 1929, 1928, 1927, 1926, 1925, 1924, 1923, 1922, 1921, 1920, 1919, 1918, 1917, 1916, 1915, 1914, 1913, 1912, 1911, 1910, 1909, 1908, 1907, 1906, 1905, 1904, 1903, 1902, 1901, 1900, 1899, 1898, 1897, 1896, 1895, 1894, 1893, 1892, 1891, 1890, 1889, 1888, 1887, 1886, 1885, 1884, 1883, 1882, 1881, 1880, 1879, 1878, 1877, 1876, 1875, 1874, 1873, 1872, 1871, 1870, 1869, 1868, 1867, 1866, 1865, 1864, 1863, 1862, 1861, 1860, 1859, 1858, 1857, 1856, 1855, 1854, 1853, 1852, 1851, 1850, 1849, 1848, 1847, 1846, 1845, 1844, 1843, 1842, 1841, 1840, 1839, 1838, 1837, 1836, 1835, 1834, 1833, 1832, 1831, 1830, 1829, 1828, 1827, 1826, 1825, 1824, 1823, 1822, 1821, 1820, 1819, 1818, 1817, 1816, 1815, 1814, 1813, 1812, 1811, 1810, 1809, 1808, 1807, 1806, 1805, 1804, 1803, 1802, 1801, 1800, 1799, 1798, 1797, 1796, 1795, 1794, 1793, 1792, 1791, 1790, 1789, 1788, 1787, 1786, 1785, 1784, 1783, 1782, 1781, 1780, 1779, 1778, 1777, 1776, 1775, 1774, 1773, 1772, 1771, 1770, 1769, 1768, 1767, 1766, 1765, 1764, 1763, 1762, 1761, 1760, 1759, 1758, 1757, 1756, 1755, 1754, 1753, 1752, 1751, 1750, 1749, 1748, 1747, 1746, 1745, 1744, 1743, 1742, 1741, 1740, 1739, 1738, 1737, 1736, 1735, 1734, 1733, 1732, 1731, 1730, 1729, 1728, 1727, 1726, 1725, 1724, 1723, 1722, 1721, 1720, 1719, 1718, 1717, 1716, 1715, 1714, 1713, 1712, 1711, 1710, 1709, 1708, 1707, 1706, 1705, 1704, 1703, 1702, 1701, 1700, 1699, 1698, 1697, 1696, 1695, 1694, 1693, 1692, 1691, 1690, 1689, 1688, 1687, 1686, 1685, 1684, 1683, 1682, 1681, 1680, 1679, 1678, 1677, 1676, 1675, 1674, 1673, 1672, 1671, 1670, 1669, 1668, 1667, 1666, 1665, 1664, 1663, 1662, 1661, 1660, 1659, 1658, 1657, 1656, 1655, 1654, 1653, 1652, 1651, 1650, 1649, 1648, 1647, 1646, 1645, 1644, 1643, 1642, 1641, 1640, 1639, 1638, 1637, 1636, 1635, 1634, 1633, 1632, 1631, 1630, 1629, 1628, 1627, 1626, 1625, 1624, 1623, 1622, 1621, 1620, 1619, 1618, 1617, 1616, 1615, 1614, 1613, 1612, 1611, 1610, 1609, 1608, 1607, 1606, 1605, 1604, 1603, 1602, 1601, 1600, 1599, 1598, 1597, 1596, 1595, 1594, 1593, 1592, 1591, 1590, 1589, 1588, 1587, 1586, 1585, 1584, 1583, 1582, 1581, 1580, 1579, 1578, 1577, 1576, 1575, 1574, 1573, 1572, 1571, 1570, 1569, 1568, 1567, 1566, 1565, 1564, 1563, 1562, 1561, 1560, 1559, 1558, 1557, 1556, 1555, 1554, 1553, 1552, 1551, 1550, 1549, 1548, 1547, 1546, 1545, 1544, 1543, 1542, 1541, 1540, 1539, 1538, 1537, 1536, 1535, 1534, 1533, 1532, 1531, 1530, 1529, 1528, 1527, 1526, 1525, 1524, 1523, 1522, 1521, 1520, 1519, 1518, 1517, 1516, 1515, 1514, 1513, 1512, 1511, 1510, 1509, 1508, 1507, 1506, 1505, 1504, 1503, 1502, 1501, 1500, 1499, 1498, 1497, 1496, 1495, 1494, 1493, 1492, 1491, 1490, 1489, 1488, 1487, 1486, 1485, 1484, 1483, 1482, 1481, 1480, 1479, 1478, 1477, 1476, 1475, 1474, 1473, 1472, 1471, 1470, 1469, 1468, 1467, 1466, 1465, 1464, 1463, 1462, 1461, 1460, 1459, 1458, 1457, 1456, 1455, 1454, 1453, 1452, 1451, 1450, 1449, 1448, 1447, 1446, 1445, 1444, 1443, 1442, 1441, 1440, 1439, 1438, 1437, 1436, 1435, 1434, 1433, 1432, 1431, 1430, 1429, 1428, 1427, 1426, 1425, 1424, 1423, 1422, 1421, 1420, 1419, 1418, 1417, 1416, 1415, 1414, 1413, 1412, 1411, 1410, 1409, 1408, 1407, 1406, 1405, 1404, 1403, 1402, 1401, 1400, 1399, 1398, 1397, 1396, 1395, 1394, 1393, 1392, 1391, 1390, 1389, 1388, 1387, 1386, 1385, 1384, 1383, 1382, 1381, 1380, 1379, 1378, 1377, 1376, 1375, 1374, 1373, 1372, 1371, 1370, 1369, 1368, 1367, 1366, 1365, 1364, 1363, 1362, 1361, 1360, 1359, 1358, 1357, 1356, 1355, 1354, 1353, 1352, 1351, 1350, 1349, 1348, 1347, 1346, 1345, 1344, 1343, 1342, 1341, 1340, 1339, 1338, 1337, 1336, 1335, 1334, 1333, 1332, 1331, 1330, 1329, 1328, 1327, 1326, 1325, 1324, 1323, 1322, 1321, 1320, 1319, 1318, 1317, 1316, 1315, 1314, 1313, 1312, 1311, 1310, 1309, 1308, 1307, 1306, 1305, 1304, 1303, 1302, 1301, 1300, 1299, 1298, 1297, 1296, 1295, 1294, 1293, 1292, 1291, 1290, 1289, 1288, 1287, 1286, 1285, 1284, 1283, 1282, 1281, 1280, 1279, 1278, 1277, 1276, 1275, 1274, 1273, 1272, 1271, 1270, 1269, 1268, 1267, 1266, 1265, 1264, 1263, 1262, 1261, 1260, 1259, 1258, 1257, 1256, 1255, 1254, 1253, 1252, 1251, 1250, 1249, 1248, 1247, 1246, 1245, 1244, 1243, 1242, 1241, 1240, 1239, 1238, 1237, 1236, 1235, 1234, 1233, 1232, 1231, 1230, 1229, 1228, 1227, 1226, 1225, 1224, 1223, 1222, 1221, 1220, 1219, 1218, 1217, 1216, 1215, 1214, 1213, 1212, 1211, 1210, 1209, 1208, 1207, 1206, 1205, 1204, 1203, 1202, 1201, 1200, 1199, 1198, 1197, 1196, 1195, 1194, 1193, 1192, 1191, 1190, 1189, 1188, 1187, 1186, 1185, 1184, 1183, 1182, 1181, 1180, 1179, 1178, 1177, 1176, 1175, 1174, 1173, 1172, 1171, 1170, 1169, 1168, 1167, 1166, 1165, 1164, 1163, 1162, 1161, 1160, 1159, 1158, 1157, 1156, 1155, 1154, 1153, 1152, 1151, 1150, 1149, 1148, 1147, 1146, 1145, 1144, 1143, 1142, 1141, 1140, 1139, 1138, 1137, 1136, 1135, 1134, 1133, 1132, 1131, 1130, 1129, 1128, 1127, 1126, 1125, 1124, 1123, 1122, 1121, 1120, 1119, 1118, 1117, 1116, 1115, 1114, 1113, 1112, 1111, 1110, 1109, 1108, 1107, 1106, 1105, 1104, 1103, 1102, 1101, 1100, 1099, 1098, 1097, 1096, 1095, 1094, 1093, 1092, 1091, 1090, 1089, 1088, 1087, 1086, 1085, 1084, 1083, 1082, 1081, 1080, 1079, 1078, 1077, 1076, 1075, 1074, 1073, 1072, 1071, 1070, 1069, 1068, 1067, 1066, 1065, 1064, 1063, 1062, 1061, 1060, 1059, 1058, 1057, 1056, 1055, 1054, 1053, 1052, 1051, 1050, 1049, 1048, 1047, 1046, 1045, 1044, 1043, 1042, 1041, 1040, 1039, 1038, 1037, 1036, 1035, 1034, 1033, 1032, 1031, 1030, 1029, 1028, 1027, 1026, 1025, 1024, 1023, 1022, 1021, 1020, 1019, 1018, 1017, 1016, 1015, 1014, 1013, 1012, 1011, 1010, 1009, 1008, 1007, 1006, 1005, 1004, 1003, 1002, 1001, 1000, 999, 998, 997, 996, 995, 994, 993, 992, 991, 990, 989, 988, 987, 986, 985, 984, 983, 982, 981, 980, 979, 978, 977, 976, 975, 974, 973, 972, 971, 970, 969, 968, 967, 966, 965, 964, 963, 962, 961, 960, 959, 958, 957, 956, 955, 954, 953, 952, 951, 950, 949, 948, 947, 946, 945, 944, 943, 942, 941, 940, 939, 938, 937, 936, 935, 934, 933, 932, 931, 930, 929, 928, 927, 926, 925, 924, 923, 922, 921, 920, 919, 918, 917, 916, 915, 914, 913, 912, 911, 910, 909, 908, 907, 906, 905, 904, 903, 902, 901, 900, 899, 898, 897, 896, 895, 894, 893, 892, 891, 890, 889, 888, 887, 886, 885, 884, 883, 882, 881, 880, 879, 878, 877, 876, 875, 874, 873, 872, 871, 870, 869, 868, 867, 866, 865, 864, 863, 862, 861, 860, 859, 858, 857, 856, 855, 854, 853, 852, 851, 850, 849, 848, 847, 846, 845, 844, 843, 842, 841, 840, 839, 838, 837, 836, 835, 834, 833, 832, 831, 830, 829, 828, 827, 826, 825, 824, 823, 822, 821, 820, 819, 818, 817, 816, 815, 814, 813, 812, 811, 810, 809, 808, 807, 806, 805, 804, 803, 802, 801, 800, 799, 798, 797, 796, 795, 794, 793, 792, 791, 790, 789, 788, 787, 786, 785, 784, 783, 782, 781, 780, 779, 778, 777, 776, 775, 774, 773, 772, 771, 770, 769, 768, 767, 766, 765, 764, 763, 762, 761, 760, 759, 758, 757, 756, 755, 754, 753, 752, 751, 750, 749, 748, 747, 746, 745, 744, 743, 742, 741, 740, 739, 738, 737, 736, 735, 734, 733, 732, 731, 730, 729, 728, 727, 726, 725, 724, 723, 722, 721, 720, 719, 718, 717, 716, 715, 714, 713, 712, 711, 710, 709, 708, 707, 706, 705, 704, 703, 702, 701, 700, 699, 698, 697, 696, 695, 694, 693, 692, 691, 690, 689, 688, 687, 686, 685, 684, 683, 682, 681, 680, 679, 678, 677, 676, 675, 674, 673, 672, 671, 670, 669, 668, 667, 666, 665, 664, 663, 662, 661, 660, 659, 658, 657, 656, 655, 654, 653, 652, 651, 650, 649, 648, 647, 646, 645, 644, 643, 642, 641, 640, 639, 638, 637, 636, 635, 634, 633, 632, 631, 630, 629, 628, 627, 626, 625, 624, 623, 622, 621, 620, 619, 618, 617, 616, 615, 614, 613, 612, 611, 610, 609, 608, 607, 606, 605, 604, 603, 602, 601, 600, 599, 598, 597, 596, 595, 594, 593, 592, 591, 590, 589, 588, 587, 586, 585, 584, 583, 582, 581, 580, 579, 578, 577, 576, 575, 574, 573, 572, 571, 570, 569, 568, 567, 566, 565, 564, 563, 562, 561, 560, 559, 558, 557, 556, 555, 554, 553, 552, 551, 550, 549, 548, 547, 546, 545, 544, 543, 542, 541, 540, 539, 538, 537, 536, 535, 534, 533, 532, 531, 530, 529, 528, 527, 526, 525, 524, 523, 522, 521, 520, 519, 518, 517, 516, 515, 514, 513, 512, 511, 510, 509, 508, 507, 506, 505, 504, 503, 502, 501, 500, 499, 498, 497, 496, 495, 494, 493, 492, 491, 490, 489, 488, 487, 486, 485, 484, 483, 482, 481, 480, 479, 478, 477, 476, 475, 474, 473, 472, 471, 470, 469, 468, 467, 466, 465, 464, 463, 462, 461, 460, 459, 458, 457, 456, 455, 454, 453, 452, 451, 450, 449, 448, 447, 446, 445, 444, 443, 442, 441, 440, 439, 438, 437, 436, 435, 434, 433, 432, 431, 430, 429, 428, 427, 426, 425, 424, 423, 422, 421, 420, 419, 418, 417, 416, 415, 414, 413, 412, 411, 410, 409, 408, 407, 406, 405, 404, 403, 402, 401, 400, 399, 398, 397, 396, 395, 394, 393, 392, 391, 390, 389, 388, 387, 386, 385, 384, 383, 382, 381, 380, 379, 378, 377, 376, 375, 374, 373, 372, 371, 370, 369, 368, 367, 366, 365, 364, 363, 362, 361, 360, 359, 358, 357, 356, 355, 354, 353, 352, 351, 350, 349, 348, 347, 346, 345, 344, 343, 342, 341, 340, 339, 338, 337, 336, 335, 334, 333, 332, 331, 330, 329, 328, 327, 326, 325, 324, 323, 322, 321, 320, 319, 318, 317, 316, 315, 314, 313, 312, 311, 310, 309, 308, 307, 306, 305, 304, 303, 302, 301, 300, 299, 298, 297, 296, 295, 294, 293, 292, 291, 290, 289, 288, 287, 286, 285, 284, 283, 282, 281, 280, 279, 278, 277, 276, 275, 274, 273, 272, 271, 270, 269, 268, 267, 266, 265, 264, 263, 262, 261, 260, 259, 258, 257, 256, 255, 254, 253, 252, 251, 250, 249, 248, 247, 246, 245, 244, 243, 242, 241, 240, 239, 238, 237, 236, 235, 234, 233, 232, 231, 230, 229, 228, 227, 226, 225, 224, 223, 222, 221, 220, 219, 218, 217, 216, 215, 214, 213, 212, 211, 210, 209, 208, 207, 206, 205, 204, 203, 202, 201, 200, 199, 198, 197, 196, 195, 194, 193, 192, 191, 190, 189, 188, 187, 186, 185, 184, 183, 182, 181, 180, 179, 178, 177, 176, 175, 174, 173, 172, 171, 170, 169, 168, 167, 166, 165, 164, 163, 162, 161, 160, 159, 158, 157, 156, 155, 154, 153, 152, 151, 150, 149, 148, 147, 146, 145, 144, 143, 142, 141, 140, 139, 138, 137, 136, 135, 134, 133, 132, 131, 130, 129, 128, 127, 126, 125, 124, 123, 122, 121, 120, 119, 118, 117, 116, 115, 114, 113, 112, 111, 110, 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20, -21, -22, -23, -24, -25, -26, -27, -28, -29, -30, -31, -32, -33, -34, -35, -36, -37, -38, -39, -40, -41, -42, -43, -44, -45, -46, -47, -48, -49, -50, -51, -52, -53, -54, -55, -56, -57, -58, -59, -60, -61, -62, -63, -64, -65, -66, -67, -68, -69, -70, -71, -72, -73, -74, -75, -76, -77, -78, -79, -80, -81, -82, -83, -84, -85, -86, -87, -88, -89, -90, -91, -92, -93, -94, -95, -96, -97, -98, -99, -100, -101, -102, -103, -104, -105, -106, -107, -108, -109, -110, -111, -112, -113, -114, -115, -116, -117, -118, -119, -120, -121, -122, -123, -124, -125, -126, -127, -128, -129, -130, -131, -132, -133, -134, -135, -136, -137, -138, -139, -140, -141, -142, -143, -144, -145, -146, -147, -148, -149, -150, -151, -152, -153, -154, -155, -156, -157, -158, -159, -160, -161, -162, -163, -164, -165, -166, -167, -168, -169, -170, -171, -172, -173, -174, -175, -176, -177, -178, -179, -180, -181, -182, -183, -184, -185, -186, -187, -188, -189, -190, -191, -192, -193, -194, -195, -196, -197, -198, -199, -200, -201, -202, -203, -204, -205, -206, -207, -208, -209, -210, -211, -212, -213, -214, -215, -216, -217, -218, -219, -220, -221, -222, -223, -224, -225, -226, -227, -228, -229, -230, -231, -232, -233, -234, -235, -236, -237, -238, -239, -240, -241, -242, -243, -244, -245, -246, -247, -248, -249, -250, -251, -252, -253, -254, -255, -256, -257, -258, -259, -260, -261, -262, -263, -264, -265, -266, -267, -268, -269, -270, -271, -272, -273, -274, -275, -276, -277, -278, -279, -280, -281, -282, -283, -284, -285, -286, -287, -288, -289, -290, -291, -292, -293, -294, -295, -296, -297, -298, -299, -300, -301, -302, -303, -304, -305, -306, -307, -308, -309, -310, -311, -312, -313, -314, -315, -316, -317, -318, -319, -320, -321, -322, -323, -324, -325, -326, -327, -328, -329, -330, -331, -332, -333, -334, -335, -336, -337, -338, -339, -340, -341, -342, -343, -344, -345, -346, -347, -348, -349, -350, -351, -352, -353, -354, -355, -356, -357, -358, -359, -360, -361, -362, -363, -364, -365, -366, -367, -368, -369, -370, -371, -372, -373, -374, -375, -376, -377, -378, -379, -380, -381, -382, -383, -384, -385, -386, -387, -388, -389, -390, -391, -392, -393, -394, -395, -396, -397, -398, -399, -400, -401, -402, -403, -404, -405, -406, -407, -408, -409, -410, -411, -412, -413, -414, -415, -416, -417, -418, -419, -420, -421, -422, -423, -424, -425, -426, -427, -428, -429, -430, -431, -432, -433, -434, -435, -436, -437, -438, -439, -440, -441, -442, -443, -444, -445, -446, -447, -448, -449, -450, -451, -452, -453, -454, -455, -456, -457, -458, -459, -460, -461, -462, -463, -464, -465, -466, -467, -468, -469, -470, -471, -472, -473, -474, -475, -476, -477, -478, -479, -480, -481, -482, -483, -484, -485, -486, -487, -488, -489, -490, -491, -492, -493, -494, -495, -496, -497, -498, -499, -500, -501, -502, -503, -504, -505, -506, -507, -508, -509, -510, -511, -512, -513, -514, -515, -516, -517, -518, -519, -520, -521, -522, -523, -524, -525, -526, -527, -528, -529, -530, -531, -532, -533, -534, -535, -536, -537, -538, -539, -540, -541, -542, -543, -544, -545, -546, -547, -548, -549, -550, -551, -552, -553, -554, -555, -556, -557, -558, -559, -560, -561, -562, -563, -564, -565, -566, -567, -568, -569, -570, -571, -572, -573, -574, -575, -576, -577, -578, -579, -580, -581, -582, -583, -584, -585, -586, -587, -588, -589, -590, -591, -592, -593, -594, -595, -596, -597, -598, -599, -600, -601, -602, -603, -604, -605, -606, -607, -608, -609, -610, -611, -612, -613, -614, -615, -616, -617, -618, -619, -620, -621, -622, -623, -624, -625, -626, -627, -628, -629, -630, -631, -632, -633, -634, -635, -636, -637, -638, -639, -640, -641, -642, -643, -644, -645, -646, -647, -648, -649, -650, -651, -652, -653, -654, -655, -656, -657, -658, -659, -660, -661, -662, -663, -664, -665, -666, -667, -668, -669, -670, -671, -672, -673, -674, -675, -676, -677, -678, -679, -680, -681, -682, -683, -684, -685, -686, -687, -688, -689, -690, -691, -692, -693, -694, -695, -696, -697, -698, -699, -700, -701, -702, -703, -704, -705, -706, -707, -708, -709, -710, -711, -712, -713, -714, -715, -716, -717, -718, -719, -720, -721, -722, -723, -724, -725, -726, -727, -728, -729, -730, -731, -732, -733, -734, -735, -736, -737, -738, -739, -740, -741, -742, -743, -744, -745, -746, -747, -748, -749, -750, -751, -752, -753, -754, -755, -756, -757, -758, -759, -760, -761, -762, -763, -764, -765, -766, -767, -768, -769, -770, -771, -772, -773, -774, -775, -776, -777, -778, -779, -780, -781, -782, -783, -784, -785, -786, -787, -788, -789, -790, -791, -792, -793, -794, -795, -796, -797, -798, -799, -800, -801, -802, -803, -804, -805, -806, -807, -808, -809, -810, -811, -812, -813, -814, -815, -816, -817, -818, -819, -820, -821, -822, -823, -824, -825, -826, -827, -828, -829, -830, -831, -832, -833, -834, -835, -836, -837, -838, -839, -840, -841, -842, -843, -844, -845, -846, -847, -848, -849, -850, -851, -852, -853, -854, -855, -856, -857, -858, -859, -860, -861, -862, -863, -864, -865, -866, -867, -868, -869, -870, -871, -872, -873, -874, -875, -876, -877, -878, -879, -880, -881, -882, -883, -884, -885, -886, -887, -888, -889, -890, -891, -892, -893, -894, -895, -896, -897, -898, -899, -900, -901, -902, -903, -904, -905, -906, -907, -908, -909, -910, -911, -912, -913, -914, -915, -916, -917, -918, -919, -920, -921, -922, -923, -924, -925, -926, -927, -928, -929, -930, -931, -932, -933, -934, -935, -936, -937, -938, -939, -940, -941, -942, -943, -944, -945, -946, -947, -948, -949, -950, -951, -952, -953, -954, -955, -956, -957, -958, -959, -960, -961, -962, -963, -964, -965, -966, -967, -968, -969, -970, -971, -972, -973, -974, -975, -976, -977, -978, -979, -980, -981, -982, -983, -984, -985, -986, -987, -988, -989, -990, -991, -992, -993, -994, -995, -996, -997, -998, -999}, + 10000, + }, + + // 可以有多个 testcase +} + +func Test_longestConsecutive(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, longestConsecutive(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_longestConsecutive(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + longestConsecutive(tc.nums) + } + } +} diff --git a/Algorithms/0129.sum-root-to-leaf-numbers/README.md b/Algorithms/0129.sum-root-to-leaf-numbers/README.md new file mode 100755 index 000000000..f1f06a2e4 --- /dev/null +++ b/Algorithms/0129.sum-root-to-leaf-numbers/README.md @@ -0,0 +1,24 @@ +# [129. Sum Root to Leaf Numbers](https://leetcode.com/problems/sum-root-to-leaf-numbers/) + +## 题目 +Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. + +An example is the root-to-leaf path 1->2->3 which represents the number 123. + +Find the total sum of all root-to-leaf numbers. + +For example, +``` + 1 + / \ + 2 3 + +The root-to-leaf path 1->2 represents the number 12. +The root-to-leaf path 1->3 represents the number 13. + +Return the sum = 12 + 13 = 25. +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0129.sum-root-to-leaf-numbers/sum-root-to-leaf-numbers.go b/Algorithms/0129.sum-root-to-leaf-numbers/sum-root-to-leaf-numbers.go new file mode 100755 index 000000000..917d8d8b3 --- /dev/null +++ b/Algorithms/0129.sum-root-to-leaf-numbers/sum-root-to-leaf-numbers.go @@ -0,0 +1,32 @@ +package Problem0129 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" +) + +type TreeNode = kit.TreeNode + +func sumNumbers(root *TreeNode) int { + res := 0 + + var dfs func(*TreeNode, int) + dfs = func(root *TreeNode, temp int) { + if root == nil { + return + } + + temp = temp*10 + root.Val + + if root.Left == nil && root.Right == nil { + res += temp + return + } + + dfs(root.Left, temp) + dfs(root.Right, temp) + } + + dfs(root, 0) + + return res +} diff --git a/Algorithms/0129.sum-root-to-leaf-numbers/sum-root-to-leaf-numbers_test.go b/Algorithms/0129.sum-root-to-leaf-numbers/sum-root-to-leaf-numbers_test.go new file mode 100755 index 000000000..06394322a --- /dev/null +++ b/Algorithms/0129.sum-root-to-leaf-numbers/sum-root-to-leaf-numbers_test.go @@ -0,0 +1,53 @@ +package Problem0129 + +import ( + "fmt" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + pre, in []int + ans int +}{ + + { + []int{1, 2, 3, 4}, + []int{2, 1, 3, 4}, + 146, + }, + + { + []int{1, 2, 3}, + []int{2, 1, 3}, + 25, + }, + + // 可以有多个 testcase +} + +func Test_sumNumbers(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + + root := kit.PreIn2Tree(tc.pre, tc.in) + ast.Equal(tc.ans, sumNumbers(root), "输入:%v", tc) + } +} + +func Benchmark_sumNumbers(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + b.StopTimer() + root := kit.PreIn2Tree(tc.pre, tc.in) + b.StartTimer() + sumNumbers(root) + } + } +} diff --git a/Algorithms/0130.surrounded-regions/README.md b/Algorithms/0130.surrounded-regions/README.md new file mode 100755 index 000000000..c915353e7 --- /dev/null +++ b/Algorithms/0130.surrounded-regions/README.md @@ -0,0 +1,24 @@ +# [130. Surrounded Regions](https://leetcode.com/problems/surrounded-regions/) + +## 题目 +Given a 2D board containing 'X' and 'O' (the letter O), capture all regions surrounded by 'X'. + +A region is captured by flipping all 'O's into 'X's in that surrounded region. +For example, +``` +X X X X +X O O X +X X O X +X O X X +``` +After running your function, the board should be: +``` +X X X X +X X X X +X X X X +X O X X +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0130.surrounded-regions/surrounded-regions.go b/Algorithms/0130.surrounded-regions/surrounded-regions.go new file mode 100755 index 000000000..41a4bcfe0 --- /dev/null +++ b/Algorithms/0130.surrounded-regions/surrounded-regions.go @@ -0,0 +1,90 @@ +package Problem0130 + +func solve(board [][]byte) { + m := len(board) + if m <= 2 { + return + } + + n := len(board[0]) + if n <= 2 { + return + } + + // isEscaped[i][j] == true,表示 (i,j) 点是联通的。 + // 也可以用来查看点 (i,j) 是否已经检查过了 + isEscaped := make([][]bool, m) + for i := 0; i < m; i++ { + isEscaped[i] = make([]bool, n) + } + + // idxM,idxN 分别记录点 (i,j) 的坐标值 + idxM := make([]int, 0, m*n) + idxN := make([]int, 0, m*n) + + bfs := func(i, j int) { + isEscaped[i][j] = true + idxM = append(idxM, i) + idxN = append(idxN, j) + + for len(idxM) > 0 { + i := idxM[0] + j := idxN[0] + idxM = idxM[1:] + idxN = idxN[1:] + + // 依次对 (i,j) 的上左下右点进行,bfs检查 + + if 0 <= i-1 && board[i-1][j] == 'O' && !isEscaped[i-1][j] { + idxM = append(idxM, i-1) + idxN = append(idxN, j) + isEscaped[i-1][j] = true + } + + if 0 <= j-1 && board[i][j-1] == 'O' && !isEscaped[i][j-1] { + idxM = append(idxM, i) + idxN = append(idxN, j-1) + isEscaped[i][j-1] = true + } + + if i+1 < m && board[i+1][j] == 'O' && !isEscaped[i+1][j] { + idxM = append(idxM, i+1) + idxN = append(idxN, j) + isEscaped[i+1][j] = true + } + + if j+1 < n && board[i][j+1] == 'O' && !isEscaped[i][j+1] { + idxM = append(idxM, i) + idxN = append(idxN, j+1) + isEscaped[i][j+1] = true + } + } + } + + // 联通的区域一定会到达四周,所以从4周开始检查所有的联通区域 + for j := 0; j < n; j++ { + if board[0][j] == 'O' && !isEscaped[0][j] { + bfs(0, j) + } + if board[m-1][j] == 'O' && !isEscaped[m-1][j] { + bfs(m-1, j) + } + } + for i := 0; i < m; i++ { + if board[i][0] == 'O' && !isEscaped[i][0] { + bfs(i, 0) + } + if board[i][n-1] == 'O' && !isEscaped[i][n-1] { + bfs(i, n-1) + } + } + + for i := 1; i < m-1; i++ { + for j := 1; j < n-1; j++ { + // 修改内部被占领的 'O' + if board[i][j] == 'O' && !isEscaped[i][j] { + board[i][j] = 'X' + } + } + } +} diff --git a/Algorithms/0130.surrounded-regions/surrounded-regions_test.go b/Algorithms/0130.surrounded-regions/surrounded-regions_test.go new file mode 100755 index 000000000..1b7ceb53c --- /dev/null +++ b/Algorithms/0130.surrounded-regions/surrounded-regions_test.go @@ -0,0 +1,192 @@ +package Problem0130 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + board [][]byte + ans [][]byte +}{ + + { + [][]byte{ + []byte("OXXXXXOO"), + []byte("OOOXXXXO"), + []byte("XXXXOOOO"), + []byte("XOXOOXXX"), + []byte("OXOXXXOO"), + []byte("OXXOOXXO"), + []byte("OXOXXXOO"), + []byte("OXXXXOXX"), + }, + [][]byte{ + []byte("OXXXXXOO"), + []byte("OOOXXXXO"), + []byte("XXXXOOOO"), + []byte("XXXOOXXX"), + []byte("OXXXXXOO"), + []byte("OXXXXXXO"), + []byte("OXXXXXOO"), + []byte("OXXXXOXX"), + }, + }, + + { + [][]byte{ + []byte("XXXXOX"), + []byte("OXXOOX"), + []byte("XOXOOO"), + []byte("XOOOXO"), + []byte("OOXXOX"), + []byte("XOXOXX"), + }, + [][]byte{ + []byte("XXXXOX"), + []byte("OXXOOX"), + []byte("XOXOOO"), + []byte("XOOOXO"), + []byte("OOXXXX"), + []byte("XOXOXX"), + }, + }, + + { + [][]byte{ + []byte("OXOOXX"), + []byte("OXXXOX"), + []byte("XOOXOO"), + []byte("XOXXXX"), + []byte("OOXOXX"), + []byte("XXOOOO"), + }, + [][]byte{ + []byte("OXOOXX"), + []byte("OXXXOX"), + []byte("XOOXOO"), + []byte("XOXXXX"), + []byte("OOXOXX"), + []byte("XXOOOO"), + }, + }, + + { + [][]byte{ + []byte("XOXOXOOOXO"), + []byte("XOOXXXOOOX"), + []byte("OOOOOOOOXX"), + []byte("OOOOOOXOOX"), + []byte("OOXXOXXOOO"), + []byte("XOOXXXOXXO"), + []byte("XOXOOXXOXO"), + []byte("XXOXXOXOOX"), + []byte("OOOOXOXOXO"), + []byte("XXOXXXXOOO"), + }, + [][]byte{ + []byte("XOXOXOOOXO"), + []byte("XOOXXXOOOX"), + []byte("OOOOOOOOXX"), + []byte("OOOOOOXOOX"), + []byte("OOXXOXXOOO"), + []byte("XOOXXXXXXO"), + []byte("XOXXXXXOXO"), + []byte("XXOXXXXOOX"), + []byte("OOOOXXXOXO"), + []byte("XXOXXXXOOO"), + }, + }, + + { + [][]byte{ + []byte("XXXX"), + []byte("XOOX"), + []byte("XOOX"), + []byte("XXXX"), + }, + [][]byte{ + []byte("XXXX"), + []byte("XXXX"), + []byte("XXXX"), + []byte("XXXX"), + }, + }, + + { + [][]byte{ + []byte("OXXOX"), + []byte("XOOXO"), + []byte("XOXOX"), + []byte("OXOOO"), + []byte("XXOXO"), + }, + [][]byte{ + []byte("OXXOX"), + []byte("XXXXO"), + []byte("XXXOX"), + []byte("OXOOO"), + []byte("XXOXO"), + }, + }, + + { + [][]byte{ + []byte("XXXX"), + []byte("XOOX"), + []byte("XXOX"), + []byte("XOXX"), + }, + [][]byte{ + []byte("XXXX"), + []byte("XXXX"), + []byte("XXXX"), + []byte("XOXX"), + }, + }, + + { + [][]byte{ + []byte("XXXX"), + }, + [][]byte{ + []byte("XXXX"), + }, + }, + + { + [][]byte{ + []byte("X"), + []byte("X"), + []byte("X"), + }, + [][]byte{ + []byte("X"), + []byte("X"), + []byte("X"), + }, + }, + + // 可以有多个 testcase +} + +func Test_solve(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + solve(tc.board) + ast.Equal(tc.ans, tc.board, "输入:%v", tc) + } +} + +func Benchmark_solve(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + solve(tc.board) + } + } +} diff --git a/Algorithms/0131.palindrome-partitioning/README.md b/Algorithms/0131.palindrome-partitioning/README.md new file mode 100755 index 000000000..f36e231a4 --- /dev/null +++ b/Algorithms/0131.palindrome-partitioning/README.md @@ -0,0 +1,23 @@ +# [131. Palindrome Partitioning](https://leetcode.com/problems/palindrome-partitioning/) + +## 题目 +Given a string s, partition s such that every substring of the partition is a palindrome. + +Return all possible palindrome partitioning of s. + +``` +For example, + +given s = "aab", + +Return + +[ + ["aa","b"], + ["a","a","b"] +] +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0131.palindrome-partitioning/palindrome-partitioning.go b/Algorithms/0131.palindrome-partitioning/palindrome-partitioning.go new file mode 100755 index 000000000..78bc252a2 --- /dev/null +++ b/Algorithms/0131.palindrome-partitioning/palindrome-partitioning.go @@ -0,0 +1,42 @@ +package Problem0131 + +func partition(s string) [][]string { + result := [][]string{} + current := make([]string, 0, len(s)) + dfs(s, 0, current, &result) + return result +} + +func dfs(s string, i int, cur []string, result *[][]string) { + if i == len(s) { + tmp := make([]string, len(cur)) + copy(tmp, cur) + *result = append(*result, tmp) + return + } + + for j := i; j < len(s); j++ { + // i == 0 时, + // 按照 len(cur[0]) 的不同,来划分 res + // 并以此类推 + if par(s[i : j+1]) { + dfs(s, j+1, append(cur, s[i:j+1]), result) + } + } +} + +// s 为回文,则返回 true +func par(s string) bool { + if len(s) <= 1 { + return true + } + a, b := 0, len(s)-1 + for a < b { + if s[a] != s[b] { + return false + } + a++ + b-- + } + return true +} diff --git a/Algorithms/0131.palindrome-partitioning/palindrome-partitioning_test.go b/Algorithms/0131.palindrome-partitioning/palindrome-partitioning_test.go new file mode 100755 index 000000000..55462a88a --- /dev/null +++ b/Algorithms/0131.palindrome-partitioning/palindrome-partitioning_test.go @@ -0,0 +1,72 @@ +package Problem0131 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + ans [][]string +}{ + + { + "cbbbcc", + [][]string{ + []string{"c", "b", "b", "b", "c", "c"}, + []string{"c", "b", "b", "b", "cc"}, + []string{"c", "b", "bb", "c", "c"}, + []string{"c", "b", "bb", "cc"}, + []string{"c", "bb", "b", "c", "c"}, + []string{"c", "bb", "b", "cc"}, + []string{"c", "bbb", "c", "c"}, + []string{"c", "bbb", "cc"}, + []string{"cbbbc", "c"}, + }, + }, + + { + "efe", + [][]string{ + []string{"e", "f", "e"}, + []string{"efe"}, + }, + }, + + { + "a", + [][]string{ + []string{"a"}, + }, + }, + + { + "aab", + [][]string{ + []string{"a", "a", "b"}, + []string{"aa", "b"}, + }, + }, + + // 可以有多个 testcase +} + +func Test_partition(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, partition(tc.s), "输入:%v", tc) + } +} + +func Benchmark_partition(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + partition(tc.s) + } + } +} diff --git a/Algorithms/0132.palindrome-partitioning-ii/README.md b/Algorithms/0132.palindrome-partitioning-ii/README.md new file mode 100755 index 000000000..694ae5677 --- /dev/null +++ b/Algorithms/0132.palindrome-partitioning-ii/README.md @@ -0,0 +1,11 @@ +# [132. Palindrome Partitioning II](https://leetcode.com/problems/palindrome-partitioning-ii/) + +## 题目 +Given a string s, partition s such that every substring of the partition is a palindrome. + +Return the minimum cuts needed for a palindrome partitioning of s. + +For example, given s = "aab", +Return 1 since the palindrome partitioning ["aa","b"] could be produced using 1 cut. + +## 解题思路 diff --git a/Algorithms/0132.palindrome-partitioning-ii/palindrome-partitioning-ii.go b/Algorithms/0132.palindrome-partitioning-ii/palindrome-partitioning-ii.go new file mode 100755 index 000000000..f94bdd7f3 --- /dev/null +++ b/Algorithms/0132.palindrome-partitioning-ii/palindrome-partitioning-ii.go @@ -0,0 +1,37 @@ +package Problem0132 + +func minCut(s string) int { + n := len(s) + if n == 0 { + return 0 + } + + // dp[i] == minCut(s[:i]) + dp := make([]int, n+1) + for i := 0; i < n+1; i++ { + dp[i] = i - 1 + } + + for i := 0; i < n+1; i++ { + // With char at i as the center to check palindrome and set the new min cut number for + // the up-boundary of the palindrome to be minimum of its current number and the min of + // the low-boundary plus 1. + // Need to check char at i to be the center for odd and event length of palindrome. + for j := 0; 0 <= i-j && i+j < n && s[i-j] == s[i+j]; j++ { + dp[i+j+1] = min(dp[i-j]+1, dp[i+j+1]) + } + + for j := 1; 0 <= i-j+1 && i+j < n && s[i-j+1] == s[i+j]; j++ { + dp[i+j+1] = min(dp[i-j+1]+1, dp[i+j+1]) + } + } + + return dp[n] +} + +func min(a int, b int) int { + if a < b { + return a + } + return b +} diff --git a/Algorithms/0132.palindrome-partitioning-ii/palindrome-partitioning-ii_test.go b/Algorithms/0132.palindrome-partitioning-ii/palindrome-partitioning-ii_test.go new file mode 100755 index 000000000..e6ca4b33e --- /dev/null +++ b/Algorithms/0132.palindrome-partitioning-ii/palindrome-partitioning-ii_test.go @@ -0,0 +1,66 @@ +package Problem0132 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + ans int +}{ + + { + "apjesgpsxoeiokmqmfgvjslcjukbqxpsobyhjpbgdfruqdkeiszrlmtwgfxyfostpqczidfljwfbbrflkgdvtytbgqalguewnhvvmcgxboycffopmtmhtfizxkmeftcucxpobxmelmjtuzigsxnncxpaibgpuijwhankxbplpyejxmrrjgeoevqozwdtgospohznkoyzocjlracchjqnggbfeebmuvbicbvmpuleywrpzwsihivnrwtxcukwplgtobhgxukwrdlszfaiqxwjvrgxnsveedxseeyeykarqnjrtlaliyudpacctzizcftjlunlgnfwcqqxcqikocqffsjyurzwysfjmswvhbrmshjuzsgpwyubtfbnwajuvrfhlccvfwhxfqthkcwhatktymgxostjlztwdxritygbrbibdgkezvzajizxasjnrcjwzdfvdnwwqeyumkamhzoqhnqjfzwzbixclcxqrtniznemxeahfozp", + 452, + }, + + { + "abcdd", + 3, + }, + + { + "aaabaa", + 1, + }, + + { + "aaaaacbbbc", + 1, + }, + + { + "aab", + 1, + }, + + { + "", + 0, + }, + + // 可以有多个 testcase +} + +func Test_minCut(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + fmt.Println(len(tc.s)) + + ast.Equal(tc.ans, minCut(tc.s), "输入:%v", tc) + } +} + +func Benchmark_minCut(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + minCut(tc.s) + } + } +} diff --git a/Algorithms/0134.gas-station/README.md b/Algorithms/0134.gas-station/README.md new file mode 100755 index 000000000..ac6941df5 --- /dev/null +++ b/Algorithms/0134.gas-station/README.md @@ -0,0 +1,15 @@ +# [134. Gas Station](https://leetcode.com/problems/gas-station/) + +## 题目 +There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. + +You have a car with an unlimited gas tank and it costs cost[i] of gas to travel from station i to its next station (i+1). You begin the journey with an empty tank at one of the gas stations. + +Return the starting gas station's index if you can travel around the circuit once, otherwise return -1. + +Note: +The solution is guaranteed to be unique. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0134.gas-station/gas-station.go b/Algorithms/0134.gas-station/gas-station.go new file mode 100755 index 000000000..2b56c3bf8 --- /dev/null +++ b/Algorithms/0134.gas-station/gas-station.go @@ -0,0 +1,25 @@ +package Problem0134 + +func canCompleteCircuit(gas []int, cost []int) int { + remains, debts, start := 0, 0, 0 + + for i, g := range gas { + remains += g - cost[i] + if remains < 0 { + // i + 1 处重新开始 + start = i + 1 + // 记录沿路一共欠缺的油量 + debts += remains + // remain 至零 + remains = 0 + } + } + + if debts+remains < 0 { + // 最后的剩余的油量,如法全部偿还前期欠缺的油量 + // 则,无法跑完一圈 + return -1 + } + + return start +} diff --git a/Algorithms/0134.gas-station/gas-station_test.go b/Algorithms/0134.gas-station/gas-station_test.go new file mode 100755 index 000000000..338b6f50d --- /dev/null +++ b/Algorithms/0134.gas-station/gas-station_test.go @@ -0,0 +1,46 @@ +package Problem0134 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + gas []int + cost []int + ans int +}{ + + { + []int{4}, + []int{5}, + -1, + }, + + { + []int{4, 3}, + []int{5, 1}, + 1, + }, + // 可以有多个 testcase +} + +func Test_canCompleteCircuit(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, canCompleteCircuit(tc.gas, tc.cost), "输入:%v", tc) + } +} + +func Benchmark_canCompleteCircuit(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + canCompleteCircuit(tc.gas, tc.cost) + } + } +} diff --git a/Algorithms/0135.candy/README.md b/Algorithms/0135.candy/README.md new file mode 100755 index 000000000..5641cca00 --- /dev/null +++ b/Algorithms/0135.candy/README.md @@ -0,0 +1,14 @@ +# [135. Candy](https://leetcode.com/problems/candy/) + +## 题目 +There are N children standing in a line. Each child is assigned a rating value. + +You are giving candies to these children subjected to the following requirements: +1. Each child must have at least one candy. +1. Children with a higher rating get more candies than their neighbors. + +What is the minimum candies you must give? + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0135.candy/candy.go b/Algorithms/0135.candy/candy.go new file mode 100755 index 000000000..74ebccdba --- /dev/null +++ b/Algorithms/0135.candy/candy.go @@ -0,0 +1,48 @@ +package Problem0135 + +func candy(ratings []int) int { + n := len(ratings) + if n <= 1 { + return n + } + + // left == big than left + left := make([]int, n) + // right == big than right + right := make([]int, n) + left[0] = 1 + right[n-1] = 1 + + for i := 1; i < n; i++ { + if ratings[i-1] < ratings[i] { + // i 比左边的大 + // 所以,他的数量要比左边的多一个 + left[i] = left[i-1] + 1 + } else { + left[i] = 1 + } + + if ratings[n-i-1] > ratings[n-i] { + // n-i-1 比右边的大 + // 所以,他的数量要比右边的多一个 + right[n-i-1] = right[n-i] + 1 + } else { + right[n-i-1] = 1 + } + } + + res := 0 + for i := 0; i < n; i++ { + // i 的实际数量应该是max(left[i], right[i] + res += max(left[i], right[i]) + } + + return res +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} diff --git a/Algorithms/0135.candy/candy_test.go b/Algorithms/0135.candy/candy_test.go new file mode 100755 index 000000000..95edbee4f --- /dev/null +++ b/Algorithms/0135.candy/candy_test.go @@ -0,0 +1,69 @@ +package Problem0135 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + ratings []int + ans int +}{ + + { + []int{1, 2, 3, 3, 3, 1}, + 10, + }, + + { + []int{1, 2, 3, 3, 1}, + 9, + }, + + { + []int{1, 2, 3, 2, 1}, + 9, + }, + + { + []int{1, 2, 3, 4, 3}, + 11, + }, + + { + []int{1, 2, 3, 4, 4}, + 11, + }, + + { + []int{1, 2, 3, 4, 5}, + 15, + }, + + { + []int{0}, + 1, + }, + + // 可以有多个 testcase +} + +func Test_candy(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, candy(tc.ratings), "输入:%v", tc) + } +} + +func Benchmark_candy(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + candy(tc.ratings) + } + } +} diff --git a/Algorithms/0136.single-number/README.md b/Algorithms/0136.single-number/README.md new file mode 100755 index 000000000..c15abf7a4 --- /dev/null +++ b/Algorithms/0136.single-number/README.md @@ -0,0 +1,11 @@ +# [136. Single Number](https://leetcode.com/problems/single-number/) + +## 题目 +Given an array of integers, every element appears twice except for one. Find that single one. + +Note: +Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory? + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0136.single-number/single-number.go b/Algorithms/0136.single-number/single-number.go new file mode 100755 index 000000000..b8b03d090 --- /dev/null +++ b/Algorithms/0136.single-number/single-number.go @@ -0,0 +1,11 @@ +package Problem0136 + +func singleNumber(nums []int) int { + res := 0 + for _, n := range nums { + // n^n == 0 + // a^b^a^b^a == a + res ^= n + } + return res +} diff --git a/Algorithms/0136.single-number/single-number_test.go b/Algorithms/0136.single-number/single-number_test.go new file mode 100755 index 000000000..41d0f3fbe --- /dev/null +++ b/Algorithms/0136.single-number/single-number_test.go @@ -0,0 +1,39 @@ +package Problem0136 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans int +}{ + + { + []int{1, 1, 2}, + 2, + }, + + // 可以有多个 testcase +} + +func Test_singleNumber(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, singleNumber(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_singleNumber(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + singleNumber(tc.nums) + } + } +} diff --git a/Algorithms/0137.single-number-ii/README.md b/Algorithms/0137.single-number-ii/README.md new file mode 100755 index 000000000..5d0059918 --- /dev/null +++ b/Algorithms/0137.single-number-ii/README.md @@ -0,0 +1,11 @@ +# [137. Single Number II](https://leetcode.com/problems/single-number-ii/) + +## 题目 +Given an array of integers, every element appears three times except for one, which appears exactly once. Find that single one. + +Note: +Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory? + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0137.single-number-ii/single-number-ii.go b/Algorithms/0137.single-number-ii/single-number-ii.go new file mode 100755 index 000000000..3f2efad0a --- /dev/null +++ b/Algorithms/0137.single-number-ii/single-number-ii.go @@ -0,0 +1,19 @@ +package Problem0137 + +// 假设 nums 中的数字为 32 bit +func singleNumber(nums []int) int { + n := len(nums) + res := 0 + + var i uint + for ; i < 64; i++ { + temp := 0 + for j := 0; j < n; j++ { + temp += nums[j] >> i & 1 //首先把输入数字的第i位加起来。 + } + temp %= 3 //然后求它们除以3的余数。 + res |= temp << i //把二进制表示的结果转化为十进制表示的结果 + } + + return res +} diff --git a/Algorithms/0137.single-number-ii/single-number-ii_test.go b/Algorithms/0137.single-number-ii/single-number-ii_test.go new file mode 100755 index 000000000..87fb787c0 --- /dev/null +++ b/Algorithms/0137.single-number-ii/single-number-ii_test.go @@ -0,0 +1,49 @@ +package Problem0137 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans int +}{ + + { + []int{43, 16, 45, 89, 45, -2147483648, 45, 2147483646, -2147483647, -2147483648, 43, 2147483647, -2147483646, -2147483648, 89, -2147483646, 89, -2147483646, -2147483647, 2147483646, -2147483647, 16, 16, 2147483646, 43}, + 2147483647, + }, + + { + []int{-2, -2, 1, 1, -3, 1, -3, -3, -4, -2}, + -4, + }, + + { + []int{1, 1, 1, 2, 2, 2, 3}, + 3, + }, + + // 可以有多个 testcase +} + +func Test_singleNumber(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, singleNumber(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_singleNumber(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + singleNumber(tc.nums) + } + } +} diff --git a/Algorithms/0139.word-break/README.md b/Algorithms/0139.word-break/README.md new file mode 100755 index 000000000..0956b8cd4 --- /dev/null +++ b/Algorithms/0139.word-break/README.md @@ -0,0 +1,18 @@ +# [139. Word Break](https://leetcode.com/problems/word-break/) + +## 题目 +Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s can be segmented into a space-separated sequence of one or more dictionary words. You may assume the dictionary does not contain duplicate words. + +For example, given +``` +s = "leetcode", +dict = ["leet", "code"]. + +Return true because "leetcode" can be segmented as "leet code". +``` +UPDATE (2017/1/4): +The wordDict parameter had been changed to a list of strings (instead of a set of strings). Please reload the code definition to get the latest changes. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0139.word-break/word-break.go b/Algorithms/0139.word-break/word-break.go new file mode 100755 index 000000000..f34fbf221 --- /dev/null +++ b/Algorithms/0139.word-break/word-break.go @@ -0,0 +1,42 @@ +package Problem0139 + +import "sort" + +func wordBreak(s string, wordDict []string) bool { + if len(wordDict) == 0 { + return false + } + + dict := make(map[string]bool, len(wordDict)) + length := make(map[int]bool, len(wordDict)) + + for _, w := range wordDict { + length[len(w)] = true + dict[w] = true + } + + sizes := make([]int, 0, len(length)) + for k := range length { + sizes = append(sizes, k) + } + + sort.Ints(sizes) + + // dp[i] == true,等于 wordBreak(s[:i+1], wordDict) == true + dp := make([]bool, len(s)+1) + dp[0] = true + n := len(s) + for i := 0; i <= n; i++ { + if !dp[i] { + continue + } + + for _, size := range sizes { + if i+size <= n { + dp[i+size] = dp[i+size] || dict[s[i:i+size]] + } + } + } + + return dp[n] +} diff --git a/Algorithms/0139.word-break/word-break_test.go b/Algorithms/0139.word-break/word-break_test.go new file mode 100755 index 000000000..62f101484 --- /dev/null +++ b/Algorithms/0139.word-break/word-break_test.go @@ -0,0 +1,77 @@ +package Problem0139 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + wordDict []string + ans bool +}{ + + { + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab", + []string{"a", "aa", "aaa", "aaaa", "aaaaa", "aaaaaa", "aaaaaaa", "aaaaaaaa", "aaaaaaaaa", "aaaaaaaaaa"}, + false, + }, + + { + "bb", + []string{"a", "b", "bbb", "bbbb"}, + true, + }, + + { + "a", + []string{}, + false, + }, + + { + "aaaaaaa", + []string{"aaaa", "aaa"}, + true, + }, + + { + "leetc", + []string{"leet", "code"}, + false, + }, + + { + "leetcode", + []string{"leet", "code"}, + true, + }, + + { + "leetleet", + []string{"leet", "code"}, + true, + }, + + // 可以有多个 testcase +} + +func Test_wordBreak(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, wordBreak(tc.s, tc.wordDict), "输入:%v", tc) + } +} + +func Benchmark_wordBreak(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + wordBreak(tc.s, tc.wordDict) + } + } +} diff --git a/Algorithms/0140.word-break-ii/README.md b/Algorithms/0140.word-break-ii/README.md new file mode 100755 index 000000000..b5335d90f --- /dev/null +++ b/Algorithms/0140.word-break-ii/README.md @@ -0,0 +1,22 @@ +# [140. Word Break II](https://leetcode.com/problems/word-break-ii/) + +## 题目 +Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, add spaces in s to construct a sentence where each word is a valid dictionary word. You may assume the dictionary does not contain duplicate words. + +Return all such possible sentences. + +For example, given +``` +s = "catsanddog", +dict = ["cat", "cats", "and", "sand", "dog"]. + +A solution is ["cats and dog", "cat sand dog"]. +``` +UPDATE (2017/1/4): +The wordDict parameter had been changed to a list of strings (instead of a set of strings). Please reload the code definition to get the latest changes. + +## 解题思路 + +从这一题要学会估算复杂度 + +见程序注释 diff --git a/Algorithms/0140.word-break-ii/word-break-ii.go b/Algorithms/0140.word-break-ii/word-break-ii.go new file mode 100755 index 000000000..ed35bd5eb --- /dev/null +++ b/Algorithms/0140.word-break-ii/word-break-ii.go @@ -0,0 +1,72 @@ +package Problem0140 + +import "sort" + +func wordBreak(s string, wordDict []string) []string { + if len(wordDict) == 0 { + return []string{} + } + + // dict 方便查找 wordDict 中的单词 + dict := make(map[string]bool, len(wordDict)) + length := make(map[int]bool, len(wordDict)) + + for _, w := range wordDict { + dict[w] = true + length[len(w)] = true + } + + // sizes 是 wordDict 中单词长度的集合 + // sizes 可以加快 for 循环 + sizes := make([]int, 0, len(length)) + for k := range length { + sizes = append(sizes, k) + } + sort.Ints(sizes) + + n := len(s) + + // dp[i] 等于 len(wordBreak(s[:i+1], wordDict)) + dp := make([]float64, len(s)+1) + dp[0] = 1 + + for i := 0; i <= n; i++ { + if dp[i] == 0 { + continue + } + + for _, size := range sizes { + if i+size <= n && dict[s[i:i+size]] { + dp[i+size] += dp[i] + } + } + } + + // 利用 dp[n] 统计解的数量,可以避免无用功 + // 取消下一行的注释符号,看看各个 test case 的 dp + // fmt.Println(dp) + if dp[n] == 0 { + return []string{} + } + + res := make([]string, 0, int(dp[n])) + + // 利用 dfs 获取所有的解 + var dfs func(int, string) + dfs = func(i int, str string) { + if i == len(s) { + res = append(res, str[1:]) + return + } + + for _, size := range sizes { + if i+size <= len(s) && dict[s[i:i+size]] { + dfs(i+size, str+" "+s[i:i+size]) + } + } + } + + dfs(0, "") + + return res +} diff --git a/Algorithms/0140.word-break-ii/word-break-ii_test.go b/Algorithms/0140.word-break-ii/word-break-ii_test.go new file mode 100755 index 000000000..c7818e70b --- /dev/null +++ b/Algorithms/0140.word-break-ii/word-break-ii_test.go @@ -0,0 +1,53 @@ +package Problem0140 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + wordDict []string + ans []string +}{ + + { + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + []string{"a", "aa", "aaa", "aaaa", "aaaaa", "aaaaaa", "aaaaaaa", "aaaaaaaa", "aaaaaaaaa", "aaaaaaaaaa"}, + []string{}, + }, + + { + "catsanddog", + []string{"cat", "cats", "and", "sand", "dog"}, + []string{"cat sand dog", "cats and dog"}, + }, + + { + "catsanddog", + []string{}, + []string{}, + }, + + // 可以有多个 testcase +} + +func Test_wordBreak(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, wordBreak(tc.s, tc.wordDict), "输入:%v", tc) + } +} + +func Benchmark_wordBreak(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + wordBreak(tc.s, tc.wordDict) + } + } +} diff --git a/Algorithms/0143.reorder-list/README.md b/Algorithms/0143.reorder-list/README.md new file mode 100755 index 000000000..334d1b004 --- /dev/null +++ b/Algorithms/0143.reorder-list/README.md @@ -0,0 +1,14 @@ +# [143. Reorder List](https://leetcode.com/problems/reorder-list/) + +## 题目 +Given a singly linked list L: L0->L1->…->Ln-1->Ln, + +reorder it to: L0->Ln->L1->Ln-1->L2->Ln-2->… + +You must do this in-place without altering the nodes' values. + +For example, Given {1,2,3,4}, reorder it to {1,4,2,3}. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0143.reorder-list/reorder-list.go b/Algorithms/0143.reorder-list/reorder-list.go new file mode 100755 index 000000000..d4496d846 --- /dev/null +++ b/Algorithms/0143.reorder-list/reorder-list.go @@ -0,0 +1,58 @@ +package Problem0143 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" +) + +type ListNode = kit.ListNode + +func reorderList(head *ListNode) { + if head == nil { + return + } + + // 获取 list 的长度 size + cur := head + size := 0 + for cur != nil { + cur = cur.Next + size++ + } + + // size 为奇数, cur 指向 list 的中间节点 + // size 为偶数, cur 指向 list 前一半的最后一个节点 + cur = head + for i := 0; i < (size-1)/2; i++ { + cur = cur.Next + } + + // head -> 1 -> 2 -> 3 -> 4 -> 5 -> 6 + // ^ + // | + // cur + + // reverse cur 后面的 list + next := cur.Next + for next != nil { + temp := next.Next + next.Next = cur + cur = next + next = temp + } + end := cur + + // head -> 1 -> 2 -> 3 <-> 4 <- 5 <- 6 <- end + + // 从两头开始,整合链条 + for head != end { + hNext := head.Next + eNext := end.Next + head.Next = end + end.Next = hNext + head = hNext + end = eNext + } + + // 封闭 list, 避免出现环状 list + end.Next = nil +} diff --git a/Algorithms/0143.reorder-list/reorder-list_test.go b/Algorithms/0143.reorder-list/reorder-list_test.go new file mode 100755 index 000000000..3dad5c1da --- /dev/null +++ b/Algorithms/0143.reorder-list/reorder-list_test.go @@ -0,0 +1,60 @@ +package Problem0143 + +import ( + "fmt" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + head []int + ans []int +}{ + { + []int{}, + []int{}, + }, + + { + []int{1, 2, 3}, + []int{1, 3, 2}, + }, + + { + []int{1, 2, 3, 4}, + []int{1, 4, 2, 3}, + }, + + { + []int{1, 2, 3, 4, 5, 6, 7, 8}, + []int{1, 8, 2, 7, 3, 6, 4, 5}, + }, + + // 可以有多个 testcase +} + +func Test_reorderList(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + + head := kit.Ints2List(tc.head) + reorderList(head) + ans := kit.List2Ints(head) + + ast.Equal(tc.ans, ans, "输入:%v", tc) + } +} + +func Benchmark_reorderList(b *testing.B) { + is := []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500} + head := kit.Ints2List(is) + for i := 0; i < b.N; i++ { + reorderList(head) + } +} diff --git a/Algorithms/0144.binary-tree-preorder-traversal/README.md b/Algorithms/0144.binary-tree-preorder-traversal/README.md new file mode 100755 index 000000000..f9dff3225 --- /dev/null +++ b/Algorithms/0144.binary-tree-preorder-traversal/README.md @@ -0,0 +1,23 @@ +# [144. Binary Tree Preorder Traversal](https://leetcode.com/problems/binary-tree-preorder-traversal/) + +## 题目 +Given a binary tree, return the preorder traversal of its nodes' values. + + +For example: +Given binary tree {1,#,2,3}, +``` + 1 + \ + 2 + / + 3 +``` + +return [1,2,3]. + +Note: Recursive solution is trivial, could you do it iteratively? + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0144.binary-tree-preorder-traversal/binary-tree-preorder-traversal.go b/Algorithms/0144.binary-tree-preorder-traversal/binary-tree-preorder-traversal.go new file mode 100755 index 000000000..5fbbf98b4 --- /dev/null +++ b/Algorithms/0144.binary-tree-preorder-traversal/binary-tree-preorder-traversal.go @@ -0,0 +1,40 @@ +package Problem0144 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" +) + +type TreeNode = kit.TreeNode + +func preorderTraversal(root *TreeNode) []int { + // rightStack 用来暂存右侧节点 + var rightStack []*TreeNode + var res []int + + for cur := root; cur != nil; { + res = append(res, cur.Val) + + if cur.Left != nil { + if cur.Right != nil { + rightStack = append(rightStack, cur.Right) + } + cur = cur.Left + } else { // cur.Left == nil + if cur.Right != nil { + cur = cur.Right + } else { // cur.Left == cur.Right == nil + // stack 已空 + // 说明已经完成遍历了 + if len(rightStack) == 0 { + break + } + // 否则 + // 取出最后放入的右侧节点,继续 for 循环 + cur = rightStack[len(rightStack)-1] + rightStack = rightStack[:len(rightStack)-1] + } + } + } + + return res +} diff --git a/Algorithms/0144.binary-tree-preorder-traversal/binary-tree-preorder-traversal_test.go b/Algorithms/0144.binary-tree-preorder-traversal/binary-tree-preorder-traversal_test.go new file mode 100755 index 000000000..60afcacba --- /dev/null +++ b/Algorithms/0144.binary-tree-preorder-traversal/binary-tree-preorder-traversal_test.go @@ -0,0 +1,51 @@ +package Problem0144 + +import ( + "fmt" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + pre, in, post []int +}{ + + { + []int{1, 2, 3}, + []int{1, 3, 2}, + []int{3, 2, 1}, + }, + + { + []int{1, 2, 4, 5, 3, 6, 7}, + []int{4, 2, 5, 1, 6, 3, 7}, + []int{4, 5, 2, 6, 7, 3, 1}, + }, + + // 可以有多个 testcase +} + +func Test_preorderTraversal(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + + root := kit.InPost2Tree(tc.in, tc.post) + ast.Equal(tc.pre, preorderTraversal(root), "输入:%v", tc) + } +} + +func Benchmark_preorderTraversal(b *testing.B) { + pre := []int{1, 2, 4, 5, 3, 6, 7} + in := []int{4, 2, 5, 1, 6, 3, 7} + root := kit.PreIn2Tree(pre, in) + + for i := 0; i < b.N; i++ { + preorderTraversal(root) + } +} diff --git a/Algorithms/0145.binary-tree-postorder-traversal/README.md b/Algorithms/0145.binary-tree-postorder-traversal/README.md new file mode 100755 index 000000000..e84f9cf28 --- /dev/null +++ b/Algorithms/0145.binary-tree-postorder-traversal/README.md @@ -0,0 +1,21 @@ +# [145. Binary Tree Postorder Traversal](https://leetcode.com/problems/binary-tree-postorder-traversal/) + +## 题目 +Given a binary tree, return the postorder traversal of its nodes' values. + +For example: +Given binary tree {1,#,2,3}, +``` + 1 + \ + 2 + / + 3 +``` +return [3,2,1]. + +Note: Recursive solution is trivial, could you do it iteratively? + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0145.binary-tree-postorder-traversal/binary-tree-postorder-traversal.go b/Algorithms/0145.binary-tree-postorder-traversal/binary-tree-postorder-traversal.go new file mode 100755 index 000000000..13bb2af9d --- /dev/null +++ b/Algorithms/0145.binary-tree-postorder-traversal/binary-tree-postorder-traversal.go @@ -0,0 +1,47 @@ +package Problem0145 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" +) + +type TreeNode = kit.TreeNode + +func postorderTraversal(root *TreeNode) []int { + // 保存以后才处理的节点 + var stack []*TreeNode + res := []int{} + + cur := root + for cur != nil { + if cur.Left == nil && cur.Right == nil { // 到达 leaf 节点 + res = append(res, cur.Val) + // 空 stack 说明,已经完成了遍历 + if len(stack) == 0 { + break + } + // 从 stack 中取出下个节点 + cur = stack[len(stack)-1] + stack = stack[:len(stack)-1] + } else { + // cur 不是 leaf,就先让 cur 入 stack + // 暂存 cur 的左右节点 + left, right := cur.Left, cur.Right + // 裁剪 cur,避免重复访问 + cur.Left, cur.Right = nil, nil + stack = append(stack, cur) + + // 移动 cur + if left != nil { + cur = left + if right != nil { + // 非空的 right 入 stack + stack = append(stack, right) + } + } else { // left == nil + cur = right + } + } + } + + return res +} diff --git a/Algorithms/0145.binary-tree-postorder-traversal/binary-tree-postorder-traversal_test.go b/Algorithms/0145.binary-tree-postorder-traversal/binary-tree-postorder-traversal_test.go new file mode 100755 index 000000000..1a5e1022a --- /dev/null +++ b/Algorithms/0145.binary-tree-postorder-traversal/binary-tree-postorder-traversal_test.go @@ -0,0 +1,51 @@ +package Problem0145 + +import ( + "fmt" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + pre, in, post []int +}{ + + { + []int{1, 2, 3}, + []int{1, 3, 2}, + []int{3, 2, 1}, + }, + + { + []int{1, 2, 4, 5, 3, 6, 7}, + []int{4, 2, 5, 1, 6, 3, 7}, + []int{4, 5, 2, 6, 7, 3, 1}, + }, + + // 可以有多个 testcase +} + +func Test_postorderTraversal(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + + root := kit.PreIn2Tree(tc.pre, tc.in) + ast.Equal(tc.post, postorderTraversal(root), "输入:%v", tc) + } +} + +func Benchmark_postorderTraversal(b *testing.B) { + pre := []int{1, 2, 4, 5, 3, 6, 7} + in := []int{4, 2, 5, 1, 6, 3, 7} + root := kit.PreIn2Tree(pre, in) + + for i := 0; i < b.N; i++ { + postorderTraversal(root) + } +} diff --git a/Algorithms/0146.lru-cache/README.md b/Algorithms/0146.lru-cache/README.md new file mode 100755 index 000000000..878c97127 --- /dev/null +++ b/Algorithms/0146.lru-cache/README.md @@ -0,0 +1,30 @@ +# [146. LRU Cache](https://leetcode.com/problems/lru-cache/) + +## 题目 +Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and put. + +get(key) - Get the value (will always be positive) of the key if the key exists in the cache, otherwise return -1. +put(key, value) - Set or insert the value if the key is not already present. When the cache reached its capacity, it should invalidate the least recently used item before inserting a new item. + +Follow up: +Could you do both operations in O(1) time complexity? + +Example: +``` +LRUCache cache = new LRUCache( 2 /* capacity */ ); + +cache.put(1, 1); +cache.put(2, 2); +cache.get(1); // returns 1 +cache.put(3, 3); // evicts key 2 +cache.get(2); // returns -1 (not found) +cache.put(4, 4); // evicts key 1 +cache.get(1); // returns -1 (not found) +cache.get(3); // returns 3 +cache.get(4); // returns 4 +``` +## 解题思路 + +LRU缓存利用了这样的一种思想。LRU是Least Recently Used 的缩写,翻译过来就是“最近最少使用”,也就是说,LRU缓存把最近最少使用的数据移除,让给最新读取的数据。而往往最常读取的,也是读取次数最多的,所以,利用LRU缓存,我们能够提高系统的performance. + +见程序注释 diff --git a/Algorithms/0146.lru-cache/lru-cache.go b/Algorithms/0146.lru-cache/lru-cache.go new file mode 100755 index 000000000..87c174fac --- /dev/null +++ b/Algorithms/0146.lru-cache/lru-cache.go @@ -0,0 +1,117 @@ +package Problem0146 + +/** + * Your LRUCache object will be instantiated and called as such: + * obj := Constructor(capacity); + * param_1 := obj.Get(key); + * obj.Put(key,value); + */ + +// doublyLinkedNode 是双向链节点 +type doublyLinkedNode struct { + prev, next *doublyLinkedNode + key, val int +} + +// LRUCache 利用 双向链条 + hashtabl 实现 +type LRUCache struct { + // cache 的 长度 和 容量 + len, cap int + // 分别指向双向链的首尾节点 + first, last *doublyLinkedNode + // 节点的 hashTable,方便查找节点是否存在 + nodes map[int]*doublyLinkedNode +} + +// Constructor 创建容量为 capacity 的 cache +func Constructor(capacity int) LRUCache { + return LRUCache{ + cap: capacity, + nodes: make(map[int]*doublyLinkedNode, capacity), + } +} + +// Get 获取 cache 中的数据 +func (c *LRUCache) Get(key int) int { + // 利用 hashTable 查询 key + if node, ok := c.nodes[key]; ok { + // key 存在的话 + // 把对应的 node 移动到 cache 的双向链的 first 位 + c.moveToFirst(node) + return node.val + } + + // key 不存在,按照题意,返回 -1 + return -1 +} + +// Put is 放入新数据 +func (c *LRUCache) Put(key int, value int) { + node, ok := c.nodes[key] + + if ok { // 更新旧 node + // 更新 node 中的值 + node.val = value + // 把 node 放入双向链的 first 位 + c.moveToFirst(node) + } else { // 放入新 node + if c.len == c.cap { + // cache 已满,删除 last 位,为新 node 腾地方 + // 删除 hashTable 中的记录 + delete(c.nodes, c.last.key) + // 删除双向链中的 last 位 + c.removeLast() + } else { + c.len++ + } + // 为 key 和 value 新建一个节点 + node = &doublyLinkedNode{ + key: key, + val: value, + } + // 在 hashTable 中添加记录 + c.nodes[key] = node + // 把新 node 放入 first 位 + c.insertToFirst(node) + } +} + +func (c *LRUCache) removeLast() { + if c.last.prev != nil { // 双向链长度 >1 + c.last.prev.next = nil + } else { // 双向链长度 == 1,firt,last 指向同一个节点 + c.first = nil + } + + c.last = c.last.prev +} + +func (c *LRUCache) moveToFirst(node *doublyLinkedNode) { + switch node { + case c.first: + return + case c.last: + c.removeLast() + default: + // 在双向链中,删除 node 节点 + node.prev.next = node.next + node.next.prev = node.prev + } + + // 策略是 + // 如果需要移动 node 的话 + // 先删除,再插入 + c.insertToFirst(node) +} + +func (c *LRUCache) insertToFirst(node *doublyLinkedNode) { + if c.last == nil { // **空**双向链 + c.last = node + } else { // **非空**双向链 + // 默认 node != nil + node.next = c.first + c.first.prev = node + } + + c.first = node +} diff --git a/Algorithms/0146.lru-cache/lru-cache_test.go b/Algorithms/0146.lru-cache/lru-cache_test.go new file mode 100755 index 000000000..b6594141e --- /dev/null +++ b/Algorithms/0146.lru-cache/lru-cache_test.go @@ -0,0 +1,76 @@ +package Problem0146 + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +// capacity is 3 +func Test_3(t *testing.T) { + ast := assert.New(t) + + cache := Constructor(3) + + cache.Put(0, 0) + // [(0,0)] + + cache.Put(1, 1) + // [(1,1), (0,0)] + + cache.Put(2, 2) + // [(2,2), (1,1), (0,0)] + + ast.Equal(1, cache.Get(1), "get 1 from [(2,2), (1,1), (0,0)]") + // [(1,1), (2,2), (0,0)] + + cache.Put(3, 3) + // [(3,3), (1,1), (2,2)] + + ast.Equal(-1, cache.Get(0), "get 2 from [(3,3), (1,1), (2,2)]") + + cache.Put(4, 4) + // [(4,4), (3,3), (1,1)] + + ast.Equal(-1, cache.Get(2), "get 1 from [(4,4), (3,3), (1,1)]") + + ast.Equal(3, cache.Get(3), "get 3 from [(4,4), (3,3), (1,1)]") + // [(3,3), (4,4), (1,1)] + + ast.Equal(3, cache.Get(3), "get 3 from [(3,3), (4,4), (1,1)]") + // [(3,3), (4,4), (1,1)] + + ast.Equal(4, cache.Get(4), "get 4 from [(3,3), (4,4), (1,1)]") + // [(4,4), (3,3), (1,1)] + + ast.Equal(1, cache.Get(1), "get 4 from [(3,3), (4,4), (1,1)]") + // [(1,1), (4,4), (3,3)] + + cache.Put(5, 5) + // [(5,5), (1,1), (4,4)] +} + +// capacity is 1 +func Test_1(t *testing.T) { + ast := assert.New(t) + + cache := Constructor(1) + + cache.Put(0, 0) + // [(0,0)] + + cache.Put(1, 1) + // [(1,1)] + + cache.Put(2, 2) + // [(2,2)] + + ast.Equal(-1, cache.Get(1), "get 1 from [(2,2)]") + // [(1,1), (2,2), (0,0)] + + cache.Put(3, 3) + // [(3,3)] + + cache.Put(3, 33) + // [(3,33)] +} diff --git a/Algorithms/0147.insertion-sort-list/README.md b/Algorithms/0147.insertion-sort-list/README.md new file mode 100755 index 000000000..632977db6 --- /dev/null +++ b/Algorithms/0147.insertion-sort-list/README.md @@ -0,0 +1,8 @@ +# [147. Insertion Sort List](https://leetcode.com/problems/insertion-sort-list/) + +## 题目 +Sort a linked list using insertion sort. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0147.insertion-sort-list/insertion-sort-list.go b/Algorithms/0147.insertion-sort-list/insertion-sort-list.go new file mode 100755 index 000000000..bec529846 --- /dev/null +++ b/Algorithms/0147.insertion-sort-list/insertion-sort-list.go @@ -0,0 +1,38 @@ +package Problem0147 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" +) + +type ListNode = kit.ListNode + +func insertionSortList(head *ListNode) *ListNode { + headPre := &ListNode{Next: head} + + cur := head + for cur != nil && cur.Next != nil { + p := cur.Next + if cur.Val <= p.Val { + // p 不是需要插入到 cur 之前的元素 + cur = p + continue + } + + // p 是需要插入的元素 + // 把 p 从 cur 后删除 + cur.Next = p.Next + // 要把 p 插入到合适的 pre 和 next 之间 + pre, next := headPre, headPre.Next + // 合适的位置的意思是 + // pre.Val < p.Val <= next.Val + for next.Val < p.Val { + pre = next + next = next.Next + } + // 插入 + pre.Next = p + p.Next = next + } + + return headPre.Next +} diff --git a/Algorithms/0147.insertion-sort-list/insertion-sort-list_test.go b/Algorithms/0147.insertion-sort-list/insertion-sort-list_test.go new file mode 100755 index 000000000..73e85ccff --- /dev/null +++ b/Algorithms/0147.insertion-sort-list/insertion-sort-list_test.go @@ -0,0 +1,42 @@ +package Problem0147 + +import ( + "fmt" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + head []int + ans []int +}{ + + { + []int{2, 4, 3, 1, 5}, + []int{1, 2, 3, 4, 5}, + }, + + // 可以有多个 testcase +} + +func Test_insertionSortList(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + + head := kit.Ints2List(tc.head) + ast.Equal(tc.ans, kit.List2Ints(insertionSortList(head)), "输入:%v", tc) + } +} + +func Benchmark_insertionSortList(b *testing.B) { + head := kit.Ints2List([]int{9, 6, 3, 1, 4, 8, 2, 5, 7, 19, 16, 13, 11, 14, 18, 12, 15, 17, 29, 26, 23, 21, 24, 28, 22, 25, 27, 39, 36, 33, 31, 34, 38, 32, 35, 37, 49, 46, 43, 41, 44, 48, 42, 45, 47}) + for i := 0; i < b.N; i++ { + insertionSortList(head) + } +} diff --git a/Algorithms/0148.sort-list/README.md b/Algorithms/0148.sort-list/README.md new file mode 100755 index 000000000..d43c0726b --- /dev/null +++ b/Algorithms/0148.sort-list/README.md @@ -0,0 +1,8 @@ +# [148. Sort List](https://leetcode.com/problems/sort-list/) + +## 题目 +Sort a linked list in O(n log n) time using constant space complexity. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0148.sort-list/sort-list.go b/Algorithms/0148.sort-list/sort-list.go new file mode 100755 index 000000000..476fc740e --- /dev/null +++ b/Algorithms/0148.sort-list/sort-list.go @@ -0,0 +1,72 @@ +package Problem0148 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" +) + +type ListNode = kit.ListNode + +func sortList(head *ListNode) *ListNode { + if head == nil || head.Next == nil { + return head + } + + secHead := split(head) + return merge(sortList(head), sortList(secHead)) +} + +// 从中间位置,切分 list +func split(head *ListNode) *ListNode { + // head.Next != nil + // 因为, sortList 已经帮忙检查过了 + + // fast 的变化速度是 slow 的两倍 + // 当 fast 到达末尾的时候,slow 正好在 list 的中间 + slow, fast := head, head + var tail *ListNode + for fast != nil && fast.Next != nil { + tail = slow + slow = slow.Next + fast = fast.Next.Next + } + // 斩断 list + tail.Next = nil + return slow +} + +// 把已经排序好了的两个 list left 和 right +// 进行合并 +func merge(left, right *ListNode) *ListNode { + // left != nil , right != nil + // 因为, sortList 已经帮忙检查过了 + + var head, cur, pre *ListNode + for left != nil && right != nil { + // cur 指向 left 和 right 中最小的节点 + if left.Val < right.Val { + cur = left + left = left.Next + } else { + cur = right + right = right.Next + } + // 生成 head 节点 + // 或者 链接 pre 节点 + if head == nil { + head = cur + } else { + pre.Next = cur + } + // 移动 pre 节点 + pre = cur + } + + // 处理 left 或 right 中,剩下的节点 + if left == nil { + pre.Next = right + } else { + pre.Next = left + } + + return head +} diff --git a/Algorithms/0148.sort-list/sort-list_test.go b/Algorithms/0148.sort-list/sort-list_test.go new file mode 100755 index 000000000..adf485a6d --- /dev/null +++ b/Algorithms/0148.sort-list/sort-list_test.go @@ -0,0 +1,42 @@ +package Problem0148 + +import ( + "fmt" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + head []int + ans []int +}{ + + { + []int{2, 4, 3, 1, 5, 6, 100, 200, 300}, + []int{1, 2, 3, 4, 5, 6, 100, 200, 300}, + }, + + // 可以有多个 testcase +} + +func Test_insertionSortList(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + + head := kit.Ints2List(tc.head) + ast.Equal(tc.ans, kit.List2Ints(sortList(head)), "输入:%v", tc) + } +} + +func Benchmark_insertionSortList(b *testing.B) { + head := kit.Ints2List([]int{9, 6, 3, 1, 4, 8, 2, 5, 7, 19, 16, 13, 11, 14, 18, 12, 15, 17, 29, 26, 23, 21, 24, 28, 22, 25, 27, 39, 36, 33, 31, 34, 38, 32, 35, 37, 49, 46, 43, 41, 44, 48, 42, 45, 47}) + for i := 0; i < b.N; i++ { + sortList(head) + } +} diff --git a/Algorithms/0149.max-points-on-a-line/149.100.png b/Algorithms/0149.max-points-on-a-line/149.100.png new file mode 100644 index 000000000..da3088582 Binary files /dev/null and b/Algorithms/0149.max-points-on-a-line/149.100.png differ diff --git a/Algorithms/0149.max-points-on-a-line/README.md b/Algorithms/0149.max-points-on-a-line/README.md new file mode 100755 index 000000000..0bfe10c57 --- /dev/null +++ b/Algorithms/0149.max-points-on-a-line/README.md @@ -0,0 +1,10 @@ +# [149. Max Points on a Line](https://leetcode.com/problems/max-points-on-a-line/) + +## 题目 +Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. + +## 解题思路 + +见程序注释 + +![100%](149.100.png) diff --git a/Algorithms/0149.max-points-on-a-line/max-points-on-a-line.go b/Algorithms/0149.max-points-on-a-line/max-points-on-a-line.go new file mode 100755 index 000000000..b575d0fab --- /dev/null +++ b/Algorithms/0149.max-points-on-a-line/max-points-on-a-line.go @@ -0,0 +1,56 @@ +package Problem0149 + +// Point 是关于点的定义 +type Point struct { + X int + Y int +} + +func maxPoints(points []Point) int { + n := len(points) + // diffMap 用来过滤掉相同的点,并记录他们的个数 + diffMap := make(map[Point]int, n) + + for i := 0; i < n; i++ { + diffMap[points[i]]++ + } + + size := len(diffMap) + + // 不超过 2 个不同的点 + // 则,所有的点都在同一条直线上 + if size <= 2 { + return n + } + + max := 0 + // 存在相同的点, + // 则,提取所有不同的点,可以大大减少后面 3 个嵌套的 for 循环的次数 + if size < n { + points = make([]Point, 0, size) + for p := range diffMap { + points = append(points, p) + } + } + + for i := 0; i < size-1; i++ { + for j := i + 1; j < size; j++ { + count := 0 + // 所有的点,都要检查,是否与 i, j 共线 + for k := 0; k < size; k++ { + if isSameLine(points[i], points[j], points[k]) { + count += diffMap[points[k]] + } + } + if max < count { + max = count + } + } + } + + return max +} + +func isSameLine(p1, p2, p3 Point) bool { + return (p3.X-p1.X)*(p2.Y-p1.Y) == (p2.X-p1.X)*(p3.Y-p1.Y) +} diff --git a/Algorithms/0149.max-points-on-a-line/max-points-on-a-line_test.go b/Algorithms/0149.max-points-on-a-line/max-points-on-a-line_test.go new file mode 100755 index 000000000..82fc1f28d --- /dev/null +++ b/Algorithms/0149.max-points-on-a-line/max-points-on-a-line_test.go @@ -0,0 +1,65 @@ +package Problem0149 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + xy [][]int + ans int +}{ + + { + [][]int{[]int{-54, -297}, []int{-36, -222}, []int{3, -2}, []int{30, 53}, []int{-5, 1}, []int{-36, -222}, []int{0, 2}, []int{1, 3}, []int{6, -47}, []int{0, 4}, []int{2, 3}, []int{5, 0}, []int{48, 128}, []int{24, 28}, []int{0, -5}, []int{48, 128}, []int{-12, -122}, []int{-54, -297}, []int{-42, -247}, []int{-5, 0}, []int{2, 4}, []int{0, 0}, []int{54, 153}, []int{-30, -197}, []int{4, 5}, []int{4, 3}, []int{-42, -247}, []int{6, -47}, []int{-60, -322}, []int{-4, -2}, []int{-18, -147}, []int{6, -47}, []int{60, 178}, []int{30, 53}, []int{-5, 3}, []int{-42, -247}, []int{2, -2}, []int{12, -22}, []int{24, 28}, []int{0, -72}, []int{3, -4}, []int{-60, -322}, []int{48, 128}, []int{0, -72}, []int{-5, 3}, []int{5, 5}, []int{-24, -172}, []int{-48, -272}, []int{36, 78}, []int{-3, 3}}, + 30, + }, + + { + [][]int{}, + 0, + }, + + { + [][]int{ + []int{1, 1}, + []int{1, 1}, + []int{1, 1}, + }, + 3, + }, + + // 可以有多个 testcase +} + +func Test_maxPoints(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + points := makePoints(tc.xy) + ast.Equal(tc.ans, maxPoints(points), "输入:%v", tc) + } +} + +func Benchmark_maxPoints(b *testing.B) { + points := makePoints( + [][]int{[]int{-54, -297}, []int{-36, -222}, []int{3, -2}, []int{30, 53}, []int{-5, 1}, []int{-36, -222}, []int{0, 2}, []int{1, 3}, []int{6, -47}, []int{0, 4}, []int{2, 3}, []int{5, 0}, []int{48, 128}, []int{24, 28}, []int{0, -5}, []int{48, 128}, []int{-12, -122}, []int{-54, -297}, []int{-42, -247}, []int{-5, 0}, []int{2, 4}, []int{0, 0}, []int{54, 153}, []int{-30, -197}, []int{4, 5}, []int{4, 3}, []int{-42, -247}, []int{6, -47}, []int{-60, -322}, []int{-4, -2}, []int{-18, -147}, []int{6, -47}, []int{60, 178}, []int{30, 53}, []int{-5, 3}, []int{-42, -247}, []int{2, -2}, []int{12, -22}, []int{24, 28}, []int{0, -72}, []int{3, -4}, []int{-60, -322}, []int{48, 128}, []int{0, -72}, []int{-5, 3}, []int{5, 5}, []int{-24, -172}, []int{-48, -272}, []int{36, 78}, []int{-3, 3}}, + ) + + for i := 0; i < b.N; i++ { + maxPoints(points) + } +} + +func makePoints(xy [][]int) []Point { + res := make([]Point, len(xy)) + for i := 0; i < len(xy); i++ { + res[i] = Point{X: xy[i][0], Y: xy[i][1]} + } + + return res +} diff --git a/Algorithms/0150.evaluate-reverse-polish-notation/README.md b/Algorithms/0150.evaluate-reverse-polish-notation/README.md new file mode 100755 index 000000000..087c38f87 --- /dev/null +++ b/Algorithms/0150.evaluate-reverse-polish-notation/README.md @@ -0,0 +1,16 @@ +# [150. Evaluate Reverse Polish Notation](https://leetcode.com/problems/evaluate-reverse-polish-notation/) + +## 题目 +Evaluate the value of an arithmetic expression in Reverse Polish Notation. + +Valid operators are +, -, *, /. Each operand may be an integer or another expression. + +Some examples: +``` + ["2", "1", "+", "3", "*"] -> ((2 + 1) * 3) -> 9 + ["4", "13", "5", "/", "+"] -> (4 + (13 / 5)) -> 6 +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0150.evaluate-reverse-polish-notation/evaluate-reverse-polish-notation.go b/Algorithms/0150.evaluate-reverse-polish-notation/evaluate-reverse-polish-notation.go new file mode 100755 index 000000000..cb8b5fa0a --- /dev/null +++ b/Algorithms/0150.evaluate-reverse-polish-notation/evaluate-reverse-polish-notation.go @@ -0,0 +1,42 @@ +package Problem0150 + +import ( + "strconv" +) + +func evalRPN(tokens []string) int { + // 用于存放数字的栈 + nums := make([]int, 0, len(tokens)) + for _, s := range tokens { + if s == "+" || + s == "-" || + s == "*" || + s == "/" { + // 遇到操作符, 数字出栈 + b, a := nums[len(nums)-1], nums[len(nums)-2] + nums = nums[:len(nums)-2] + // 运算后的结果,重新入栈 + nums = append(nums, compute(a, b, s)) + } else { + // 遇到数字,则直接入栈 + temp, _ := strconv.Atoi(s) + nums = append(nums, temp) + } + } + + return nums[0] +} + +// 计算 +func compute(a, b int, opt string) int { + switch opt { + case "+": + return a + b + case "-": + return a - b + case "*": + return a * b + default: + return a / b + } +} diff --git a/Algorithms/0150.evaluate-reverse-polish-notation/evaluate-reverse-polish-notation_test.go b/Algorithms/0150.evaluate-reverse-polish-notation/evaluate-reverse-polish-notation_test.go new file mode 100755 index 000000000..bd1918c65 --- /dev/null +++ b/Algorithms/0150.evaluate-reverse-polish-notation/evaluate-reverse-polish-notation_test.go @@ -0,0 +1,49 @@ +package Problem0150 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + tokens []string + ans int +}{ + + { + []string{"2", "1", "-"}, + 1, + }, + + { + []string{"2", "1", "+", "3", "*"}, + 9, + }, + + { + []string{"4", "13", "5", "/", "+"}, + 6, + }, + + // 可以有多个 testcase +} + +func Test_evalRPN(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, evalRPN(tc.tokens), "输入:%v", tc) + } +} + +func Benchmark_evalRPN(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + evalRPN(tc.tokens) + } + } +} diff --git a/Algorithms/0155.min-stack/README.md b/Algorithms/0155.min-stack/README.md new file mode 100755 index 000000000..b955e86d4 --- /dev/null +++ b/Algorithms/0155.min-stack/README.md @@ -0,0 +1,24 @@ +# [155. Min Stack](https://leetcode.com/problems/min-stack/) + +## 题目 +Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. +- push(x) -- Push element x onto stack. +- pop() -- Removes the element on top of the stack. +- top() -- Get the top element. +- getMin() -- Retrieve the minimum element in the stack. + +Example: +``` +MinStack minStack = new MinStack(); +minStack.push(-2); +minStack.push(0); +minStack.push(-3); +minStack.getMin(); --> Returns -3. +minStack.pop(); +minStack.top(); --> Returns 0. +minStack.getMin(); --> Returns -2. +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0155.min-stack/min-stack.go b/Algorithms/0155.min-stack/min-stack.go new file mode 100755 index 000000000..54ade2c98 --- /dev/null +++ b/Algorithms/0155.min-stack/min-stack.go @@ -0,0 +1,38 @@ +package Problem0155 + +// MinStack 是可以返回最小值的栈 +type MinStack struct { + stack []item +} +type item struct { + min, x int +} + +// Constructor 构造 MinStack +func Constructor() MinStack { + return MinStack{} +} + +// Push 存入数据 +func (s *MinStack) Push(x int) { + min := x + if len(s.stack) > 0 && s.GetMin() < x { + min = s.GetMin() + } + s.stack = append(s.stack, item{min: min, x: x}) +} + +// Pop 抛弃最后一个入栈的值 +func (s *MinStack) Pop() { + s.stack = s.stack[:len(s.stack)-1] +} + +// Top 返回最大值 +func (s *MinStack) Top() int { + return s.stack[len(s.stack)-1].x +} + +// GetMin 返回最小值 +func (s *MinStack) GetMin() int { + return s.stack[len(s.stack)-1].min +} diff --git a/Algorithms/0155.min-stack/min-stack_test.go b/Algorithms/0155.min-stack/min-stack_test.go new file mode 100755 index 000000000..b11854e11 --- /dev/null +++ b/Algorithms/0155.min-stack/min-stack_test.go @@ -0,0 +1,50 @@ +package Problem0155 + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_Problem155_1(t *testing.T) { + ast := assert.New(t) + + s := Constructor() + + s.Push(-2) + // [-2] + s.Push(0) + // [-2, 0] + s.Push(-3) + // [-2, 0, -3] + ast.Equal(-3, s.GetMin(), "get min from [-2, 0, -3]") + // [-2, 0, -3] + s.Pop() + // [-2, 0] + ast.Equal(0, s.Top(), "get top from [-2, 0]") + // [-2, 0] + ast.Equal(-2, s.GetMin(), "get min from [-2, 0]") + // [-2, 0] +} +func Test_Problem155_2(t *testing.T) { + ast := assert.New(t) + + s := Constructor() + + s.Push(-2) + // [-2] + s.Push(0) + // [-2, 0] + s.Push(-1) + // [-2, 0, -1] + ast.Equal(-2, s.GetMin(), "get min from [-2, -1, 0]") + // [-2, 0, -1] + ast.Equal(-1, s.Top(), "get top from [-2, -1, 0]") + // [-2, 0, -1] + s.Pop() + // [-2, 0] + ast.Equal(-2, s.GetMin(), "get top from [0, -1]") + // [-2, 0] + s.Pop() + // [-2] +} diff --git a/Algorithms/0164.maximum-gap/README.md b/Algorithms/0164.maximum-gap/README.md new file mode 100755 index 000000000..a6ce4ef2d --- /dev/null +++ b/Algorithms/0164.maximum-gap/README.md @@ -0,0 +1,14 @@ +# [164. Maximum Gap](https://leetcode.com/problems/maximum-gap/) + +## 题目 +Given an unsorted array, find the maximum difference between the successive elements in its sorted form. + +Try to solve it in linear time/space. + +Return 0 if the array contains less than 2 elements. + +You may assume all elements in the array are non-negative integers and fit in the 32-bit signed integer range. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0164.maximum-gap/maximum-gap.go b/Algorithms/0164.maximum-gap/maximum-gap.go new file mode 100755 index 000000000..74115e481 --- /dev/null +++ b/Algorithms/0164.maximum-gap/maximum-gap.go @@ -0,0 +1,43 @@ +package Problem0164 + +func maximumGap(nums []int) int { + if len(nums) < 2 { + return 0 + } + + // 自己实现了一个简易的快排 + var quickSort func(i, j int) + quickSort = func(i, j int) { + ci, cj := i, j + c := i + for i < j { + for nums[j] >= nums[c] && i < j { + j-- + } + for nums[i] <= nums[c] && i < j { + i++ + } + nums[i], nums[j] = nums[j], nums[i] + } + nums[i], nums[c] = nums[c], nums[i] + c = i + if ci < c { + quickSort(ci, c) + } + if c+1 < cj { + quickSort(c+1, cj) + } + } + + quickSort(0, len(nums)-1) + + ret := 0 + for i := 1; i < len(nums); i++ { + tmp := nums[i] - nums[i-1] + if ret < tmp { + ret = tmp + } + } + + return ret +} diff --git a/Algorithms/0164.maximum-gap/maximum-gap_test.go b/Algorithms/0164.maximum-gap/maximum-gap_test.go new file mode 100755 index 000000000..f4ce43673 --- /dev/null +++ b/Algorithms/0164.maximum-gap/maximum-gap_test.go @@ -0,0 +1,49 @@ +package Problem0164 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans int +}{ + + { + []int{1}, + 0, + }, + + { + []int{1, 10000000}, + 9999999, + }, + + { + []int{9, 8, 7, 6, 5, 4, 3, 3, 1}, + 2, + }, + + // 可以有多个 testcase +} + +func Test_maximumGap(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, maximumGap(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_maximumGap(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + maximumGap(tc.nums) + } + } +} diff --git a/Algorithms/0165.compare-version-numbers/README.md b/Algorithms/0165.compare-version-numbers/README.md new file mode 100755 index 000000000..145979ebb --- /dev/null +++ b/Algorithms/0165.compare-version-numbers/README.md @@ -0,0 +1,18 @@ +# [165. Compare Version Numbers](https://leetcode.com/problems/compare-version-numbers/) + +## 题目 +Compare two version numbers version1 and version2. +If version1 > version2 return 1, if version1 < version2 return -1, otherwise return 0. + +You may assume that the version strings are non-empty and contain only digits and the . character. +The . character does not represent a decimal point and is used to separate number sequences. +For instance, 2.5 is not "two and a half" or "half way to version three", it is the fifth second-level revision of the second first-level revision. + +Here is an example of version numbers ordering: +``` +0.1 < 1.1 < 1.2 < 13.37 +``` + +## 解题思路 + +见程序注释 \ No newline at end of file diff --git a/Algorithms/0165.compare-version-numbers/compare-version-numbers.go b/Algorithms/0165.compare-version-numbers/compare-version-numbers.go new file mode 100755 index 000000000..6f486a551 --- /dev/null +++ b/Algorithms/0165.compare-version-numbers/compare-version-numbers.go @@ -0,0 +1,47 @@ +package Problem0165 + +import ( + "strconv" + "strings" +) + +func compareVersion(version1 string, version2 string) int { + v1s := conv(version1) + v2s := conv(version2) + + if len(v1s) != len(v2s) { + v1s, v2s = toSameLen(v1s, v2s) + } + + for i := 0; i < len(v1s); i++ { + if v1s[i] < v2s[i] { + return -1 + } else if v1s[i] > v2s[i] { + return 1 + } + } + + return 0 +} + +func conv(version string) []int { + vs := strings.Split(version, ".") + res := make([]int, len(vs)) + + for i, v := range vs { + res[i], _ = strconv.Atoi(v) + } + + return res +} + +func toSameLen(a1, a2 []int) ([]int, []int) { + if len(a1) > len(a2) { + res := make([]int, len(a1)) + copy(res, a2) + return a1, res + } + + r2, r1 := toSameLen(a2, a1) + return r1, r2 +} diff --git a/Algorithms/0165.compare-version-numbers/compare-version-numbers_test.go b/Algorithms/0165.compare-version-numbers/compare-version-numbers_test.go new file mode 100755 index 000000000..d8983815b --- /dev/null +++ b/Algorithms/0165.compare-version-numbers/compare-version-numbers_test.go @@ -0,0 +1,84 @@ +package Problem0165 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + version1 string + version2 string + ans int +}{ + + + { + "1", + "1.0.1", + -1, + }, + + { + "1.0.1", + "1", + 1, + }, + + { + "1", + "0", + 1, + }, + + { + "0.1", + "0.2", + -1, + }, + + { + "0.1", + "1.0", + -1, + }, + + { + "1.2", + "1.1", + 1, + }, + + { + "1.0", + "0.1", + 1, + }, + + { + "1.1", + "1.1", + 0, + }, + + // 可以有多个 testcase +} + +func Test_compareVersion(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, compareVersion(tc.version1, tc.version2), "输入:%v", tc) + } +} + +func Benchmark_compareVersion(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + compareVersion(tc.version1, tc.version2) + } + } +} diff --git a/Algorithms/0166.fraction-to-recurring-decimal/README.md b/Algorithms/0166.fraction-to-recurring-decimal/README.md new file mode 100755 index 000000000..96fe49a17 --- /dev/null +++ b/Algorithms/0166.fraction-to-recurring-decimal/README.md @@ -0,0 +1,20 @@ +# [166. Fraction to Recurring Decimal](https://leetcode.com/problems/fraction-to-recurring-decimal/) + +## 题目 +Given two integers representing the numerator and denominator of a fraction, return the fraction in string format. + +If the fractional part is repeating, enclose the repeating part in parentheses. + +For example, + +Given numerator = 1, denominator = 2, return "0.5". +Given numerator = 2, denominator = 1, return "2". +Given numerator = 2, denominator = 3, return "0.(6)". + + + +Credits:Special thanks to @Shangrila for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0166.fraction-to-recurring-decimal/fraction-to-recurring-decimal.go b/Algorithms/0166.fraction-to-recurring-decimal/fraction-to-recurring-decimal.go new file mode 100755 index 000000000..a266d41fd --- /dev/null +++ b/Algorithms/0166.fraction-to-recurring-decimal/fraction-to-recurring-decimal.go @@ -0,0 +1,62 @@ +package Problem0166 + +import ( + "fmt" + "strconv" +) + +func fractionToDecimal(n int, d int) string { + if n == 0 { + return "0" + } + + if n*d < 0 { + // n, d 异号,则结果前面有负号 + return "-" + fractionToDecimal(abs(n), abs(d)) + } + + // 确保 n 和 d 是非负数 + n, d = abs(n), abs(d) + + if n >= d { + // n / d 的小数部分 + ds := fractionToDecimal(n%d, d) + return strconv.Itoa(n/d) + ds[1:] + } + + // digits 用来保存 n/d 的结果 + digits := make([]byte, 2, 1024) + digits[0] = '0' + digits[1] = '.' + // idx 是 n/d 的结果的在 digits 的索引号 + idx := 2 + // rec[n] = idx + rec := make(map[int]int, 1024) + for { + if i, ok := rec[n]; ok { + // n 重复出现,则说明 n/d 是下一个循环的开始 + // 循环部分的起点,就是 n 上次出现的 idx 值 + return fmt.Sprintf("%s(%s)", string(digits[:i]), string(digits[i:])) + } + + rec[n] = idx + + n *= 10 + idx++ + + digits = append(digits, byte(n/d)+'0') + n %= d + + if n == 0 { + // 不会有循环部分 + return string(digits) + } + } +} + +func abs(a int) int { + if a >= 0 { + return a + } + return -a +} diff --git a/Algorithms/0166.fraction-to-recurring-decimal/fraction-to-recurring-decimal_test.go b/Algorithms/0166.fraction-to-recurring-decimal/fraction-to-recurring-decimal_test.go new file mode 100755 index 000000000..9f379a08c --- /dev/null +++ b/Algorithms/0166.fraction-to-recurring-decimal/fraction-to-recurring-decimal_test.go @@ -0,0 +1,89 @@ +package Problem0166 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + numerator int + denominator int + ans string +}{ + + { + -7, + -12, + "0.58(3)", + }, + + { + 7, + -12, + "-0.58(3)", + }, + + { + 1, + 90, + "0.0(1)", + }, + + { + 5425221, + -45664, + "-118.80739(75122634898388227049754730203223545900490539593552908199018920812894183601962158374211632796075683251576734407848633496846531184302733006306937631394533987386124737210932025227750525578135949544498948843728100911002102312543798177995795374912403644008409250175192711983181499649614576033637000700770847932725998598458304134548002803083391730903994393833216538192011212333566923615977575332866152768044849334267694463910301331464611072179397337070777855641205325858444288717589348283111422564821303433777154870357393132445690259285213735108619481429572529782761037140854940434477925718290119131044148563419761737911702873160476524176594253679046951646811492641906096706377014716187806587245970567624386825508058864)", + }, + + { + 5425221, + 45664, + "118.80739(75122634898388227049754730203223545900490539593552908199018920812894183601962158374211632796075683251576734407848633496846531184302733006306937631394533987386124737210932025227750525578135949544498948843728100911002102312543798177995795374912403644008409250175192711983181499649614576033637000700770847932725998598458304134548002803083391730903994393833216538192011212333566923615977575332866152768044849334267694463910301331464611072179397337070777855641205325858444288717589348283111422564821303433777154870357393132445690259285213735108619481429572529782761037140854940434477925718290119131044148563419761737911702873160476524176594253679046951646811492641906096706377014716187806587245970567624386825508058864)", + }, + + { + 1, + 2, + "0.5", + }, + + { + 2, + 1, + "2", + }, + + { + 2, + 3, + "0.(6)", + }, + + { + 4, + 7, + "0.(571428)", + }, + + // 可以有多个 testcase +} + +func Test_fractionToDecimal(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, fractionToDecimal(tc.numerator, tc.denominator), "输入:%v", tc) + } +} + +func Benchmark_fractionToDecimal(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + fractionToDecimal(tc.numerator, tc.denominator) + } + } +} diff --git a/Algorithms/0168.excel-sheet-column-title/README.md b/Algorithms/0168.excel-sheet-column-title/README.md new file mode 100755 index 000000000..0474282df --- /dev/null +++ b/Algorithms/0168.excel-sheet-column-title/README.md @@ -0,0 +1,19 @@ +# [168. Excel Sheet Column Title](https://leetcode.com/problems/excel-sheet-column-title/) + +## 题目 +Given a positive integer, return its corresponding column title as appear in an Excel sheet. + +For example: +``` + 1 -> A + 2 -> B + 3 -> C + ... + 26 -> Z + 27 -> AA + 28 -> AB +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0168.excel-sheet-column-title/excel-sheet-column-title.go b/Algorithms/0168.excel-sheet-column-title/excel-sheet-column-title.go new file mode 100755 index 000000000..fe68358dd --- /dev/null +++ b/Algorithms/0168.excel-sheet-column-title/excel-sheet-column-title.go @@ -0,0 +1,13 @@ +package Problem0168 + +func convertToTitle(n int) string { + res := "" + + for n > 0 { + n-- + res = string(byte(n%26)+'A') + res + n /= 26 + } + + return res +} diff --git a/Algorithms/0168.excel-sheet-column-title/excel-sheet-column-title_test.go b/Algorithms/0168.excel-sheet-column-title/excel-sheet-column-title_test.go new file mode 100755 index 000000000..c4b70a442 --- /dev/null +++ b/Algorithms/0168.excel-sheet-column-title/excel-sheet-column-title_test.go @@ -0,0 +1,69 @@ +package Problem0168 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + n int + ans string +}{ + + { + 100, + "CV", + }, + + { + 1000, + "ALL", + }, + + { + 53, + "BA", + }, + + { + 52, + "AZ", + }, + + { + 26, + "Z", + }, + + { + 1, + "A", + }, + + { + 28, + "AB", + }, + + // 可以有多个 testcase +} + +func Test_convertToTitle(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, convertToTitle(tc.n), "输入:%v", tc) + } +} + +func Benchmark_convertToTitle(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + convertToTitle(tc.n) + } + } +} diff --git a/Algorithms/0171.excel-sheet-column-number/README.md b/Algorithms/0171.excel-sheet-column-number/README.md new file mode 100755 index 000000000..8c8d84848 --- /dev/null +++ b/Algorithms/0171.excel-sheet-column-number/README.md @@ -0,0 +1,20 @@ +# [171. Excel Sheet Column Number](https://leetcode.com/problems/excel-sheet-column-number/) + +## 题目 +Related to question Excel Sheet Column Title +Given a column title as appear in an Excel sheet, return its corresponding column number. + +For example: +``` + A -> 1 + B -> 2 + C -> 3 + ... + Z -> 26 + AA -> 27 + AB -> 28 +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0171.excel-sheet-column-number/excel-sheet-column-number.go b/Algorithms/0171.excel-sheet-column-number/excel-sheet-column-number.go new file mode 100755 index 000000000..dc8b14364 --- /dev/null +++ b/Algorithms/0171.excel-sheet-column-number/excel-sheet-column-number.go @@ -0,0 +1,12 @@ +package Problem0171 + +func titleToNumber(s string) int { + res := 0 + + for i := 0; i < len(s); i++ { + temp := int(s[i] - 'A' + 1) + res = res*26 + temp + } + + return res +} diff --git a/Algorithms/0171.excel-sheet-column-number/excel-sheet-column-number_test.go b/Algorithms/0171.excel-sheet-column-number/excel-sheet-column-number_test.go new file mode 100755 index 000000000..6ff5a2ffa --- /dev/null +++ b/Algorithms/0171.excel-sheet-column-number/excel-sheet-column-number_test.go @@ -0,0 +1,39 @@ +package Problem0171 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + ans int +}{ + + { + "AA", + 27, + }, + + // 可以有多个 testcase +} + +func Test_titleToNumber(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, titleToNumber(tc.s), "输入:%v", tc) + } +} + +func Benchmark_titleToNumber(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + titleToNumber(tc.s) + } + } +} diff --git a/Algorithms/0172.factorial-trailing-zeroes/README.md b/Algorithms/0172.factorial-trailing-zeroes/README.md new file mode 100755 index 000000000..1a03a9a83 --- /dev/null +++ b/Algorithms/0172.factorial-trailing-zeroes/README.md @@ -0,0 +1,12 @@ +# [172. Factorial Trailing Zeroes](https://leetcode.com/problems/factorial-trailing-zeroes/) + +## 题目 +Given an integer n, return the number of trailing zeroes in n!. + +Note: Your solution should be in logarithmic time complexity. + +Credits:Special thanks to @ts for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0172.factorial-trailing-zeroes/factorial-trailing-zeroes.go b/Algorithms/0172.factorial-trailing-zeroes/factorial-trailing-zeroes.go new file mode 100755 index 000000000..64911bd74 --- /dev/null +++ b/Algorithms/0172.factorial-trailing-zeroes/factorial-trailing-zeroes.go @@ -0,0 +1,12 @@ +package Problem0172 + +func trailingZeroes(n int) int { + res := 0 + + for n >= 5 { + n /= 5 + res += n + } + + return res +} diff --git a/Algorithms/0172.factorial-trailing-zeroes/factorial-trailing-zeroes_test.go b/Algorithms/0172.factorial-trailing-zeroes/factorial-trailing-zeroes_test.go new file mode 100755 index 000000000..d61b1a6c8 --- /dev/null +++ b/Algorithms/0172.factorial-trailing-zeroes/factorial-trailing-zeroes_test.go @@ -0,0 +1,69 @@ +package Problem0172 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + n int + ans int +}{ + + { + 100000, + 24999, + }, + + { + 10000, + 2499, + }, + + { + 1000, + 249, + }, + + { + 100, + 24, + }, + + { + 25, + 6, + }, + + { + 10, + 2, + }, + + { + 3, + 0, + }, + + // 可以有多个 testcase +} + +func Test_trailingZeroes(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, trailingZeroes(tc.n), "输入:%v", tc) + } +} + +func Benchmark_trailingZeroes(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + trailingZeroes(tc.n) + } + } +} diff --git a/Algorithms/0174.dungeon-game/174.100.png b/Algorithms/0174.dungeon-game/174.100.png new file mode 100644 index 000000000..857610c99 Binary files /dev/null and b/Algorithms/0174.dungeon-game/174.100.png differ diff --git a/Algorithms/0174.dungeon-game/README.md b/Algorithms/0174.dungeon-game/README.md new file mode 100755 index 000000000..08be20c7d --- /dev/null +++ b/Algorithms/0174.dungeon-game/README.md @@ -0,0 +1,35 @@ +# [174. Dungeon Game](https://leetcode.com/problems/dungeon-game/) + +## 题目 + +The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of M x N rooms laid out in a 2D grid. Our valiant knight (K) was initially positioned in the top-left room and must fight his way through the dungeon to rescue the princess. + +The knight has an initial health point represented by a positive integer. If at any point his health point drops to 0 or below, he dies immediately. + +Some of the rooms are guarded by demons, so the knight loses health (negative integers) upon entering these rooms; + +other rooms are either empty (0's) or contain magic orbs that increase the knight's health (positive integers). + +In order to reach the princess as quickly as possible, the knight decides to move only rightward or downward in each step. + +Write a function to determine the knight's minimum initial health so that he is able to rescue the princess. + +For example, given the dungeon below, the initial health of the knight must be at least 7 if he follows the optimal path `RIGHT-> RIGHT -> DOWN -> DOWN`. + +![dungeon](dungeon.png) + +Notes: +- The knight's health has no upper bound. +- Any room can contain threats or power-ups, even the first room the knight enters and the bottom-right room where the princess is imprisoned. + +## 解题思路 +在走完最后一个房间的时候血量至少要剩下1,因此最后的状态可以当成是初始状态,由后往前依次决定在每一个位置至少要有多少血量, 这样一个位置的状态是由其下面一个和和左边一个的较小状态决定 .因此一个基本的状态方程是: +``` +dp[i][j] + dungeon[i][j] = min(dp[i+1][j], dp[i][j+1]) +``` +但是还有一个条件就是在每一个状态必须血量都要大于1,因此我们还需要一个方程在保证在每一个状态都大于1,即:dp[i][j] = max(dp[i][j], 1); 也就是说虽然当前的血量到最后能够剩下1,但是现在已经低于1了,我们需要为其提升血量维持每一个状态至少都为1. + +见程序注释 + +再次感谢 LeetCode 服务器 +![100](174.100.png) \ No newline at end of file diff --git a/Algorithms/0174.dungeon-game/dungeon-game.go b/Algorithms/0174.dungeon-game/dungeon-game.go new file mode 100755 index 000000000..8e63d9c0a --- /dev/null +++ b/Algorithms/0174.dungeon-game/dungeon-game.go @@ -0,0 +1,63 @@ +package Problem0174 + +func calculateMinimumHP(dungeon [][]int) int { + m := len(dungeon) + if m == 0 { + return 1 + } + + n := len(dungeon[0]) + if n == 0 { + return 1 + } + + intMax := 1<<63 - 1 + // dp[i][j] 到达 (i,j) 点**前**的健康值 + dp := make([][]int, m+1) + for i := range dp { + dp[i] = make([]int, n+1) + for j := range dp[i] { + // (i,j) 点的健康值达到上限,可以保证到达 (m-1, n-1) 点 + dp[i][j] = intMax + } + } + + // health 是到达 (i,j) 点**前**的健康值 + health := 0 + // 把 dp[m][n-1] = 1 更换成 dp[m-1][n] = 1,程序一样可以通过 + // 可以这样认为 + // 还存在一个 dungeon[m][n-1] == 0 的房间 + // 骑士救出公主后,向下移动一格,达到这个 (m, n-1) 房间 + // 骑士在这个房间的健康值 只需要为 1 就可以了。 + dp[m][n-1] = 1 + for i := m - 1; i >= 0; i-- { + for j := n - 1; j >= 0; j-- { + // health + dungeon[i][j] == min(dp[i+1][j], dp[i][j+1]) 的意思是 + // 骑士达到 (i,j) 点**前**的健康值, + // 要能够保证他至少移动到 右边 或者 左边 房间中的一个 + health = min(dp[i+1][j], dp[i][j+1]) - dungeon[i][j] + // 由于 dungeon[i][j] 也可能是正数 + // 可能会导致 health < 1 。此时,骑士无法到达 (i,j) 房间,这不符合题意 + // 因此,当 health < 1 时, + // dp[i][j] = 1 + dp[i][j] = max(health, 1) + } + } + + // dp[0][0] 是骑士进入 (0,0) 房间前的健康值 + return dp[0][0] +} + +func min(a, b int) int { + if a < b { + return a + } + return b +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} diff --git a/Algorithms/0174.dungeon-game/dungeon-game_test.go b/Algorithms/0174.dungeon-game/dungeon-game_test.go new file mode 100755 index 000000000..5d373cbcf --- /dev/null +++ b/Algorithms/0174.dungeon-game/dungeon-game_test.go @@ -0,0 +1,154 @@ +package Problem0174 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + dungeon [][]int + ans int +}{ + + { + [][]int{ + []int{1, -3, 3}, + []int{0, -2, 0}, + []int{-3, -3, -3}, + }, + 3, + }, + + { + [][]int{ + []int{1, -2, 3}, + []int{2, -2, -2}, + }, + 2, + }, + + { + [][]int{ + []int{3, -20, 30}, + []int{-3, 4, 0}, + }, + 1, + }, + + { + [][]int{ + []int{2, -8, -79, -88, -12, -87, -5, -56, -55, -42, 18, -91, 1, -30, -36, 42, -96, -26, -17, -69, 38, 18, 44, -58, -33, 20, -45, -11, 11, 15, -40, -92, -62, -51, -23, 20, -86, -2, -90, -64, -100, -42, -16, -55, 29, -62, -81, -60, 7, -5, 31, -7, 40, 19, -53, -81, -77, 42, -87, 37, -43, 37, -50, -21, -86, -28, 13, -18, -65, -76}, + []int{-67, -23, -62, 45, -94, -1, -95, -66, -41, 37, 33, -96, -95, -17, 12, 30, -4, 40, -40, -89, -89, -25, -62, 10, -19, -53, -36, 38, -21, 1, -41, -81, -62, 3, -96, -17, -75, -81, 37, 32, -9, -80, -41, -13, -58, 1, 40, -13, -85, -78, -67, -36, -7, 48, -16, 2, -69, -85, 9, 15, -91, -32, -16, -84, -9, -31, -62, 35, -11, 28}, + []int{39, -28, 1, -31, -4, -39, -64, -86, -68, -72, -68, 21, -33, -73, 37, -39, 2, -59, -71, -17, -60, 4, -16, -92, -15, 10, -99, -37, 21, -70, 31, -10, -9, -45, 6, 26, 8, 30, 13, -72, 5, 37, -94, 35, 9, 36, -96, 47, -61, 15, -22, -60, -96, -94, -60, 43, -48, -79, 19, 24, -40, 33, -18, -33, 50, 42, -42, -6, -59, -17}, + []int{-95, -40, -96, 42, -49, -3, 6, -47, -38, 31, -25, -61, -18, -52, -80, -55, 29, 27, 22, 6, 29, -89, -9, 14, -77, -26, -2, -7, -2, -64, -100, 40, -52, -15, -76, 13, -27, -83, -70, 13, -62, -54, -92, -71, -65, -18, 26, 37, 0, -58, 4, 43, -5, -33, -47, -21, -65, -58, 21, 2, -67, -62, -32, 30, -4, -46, 18, 21, 2, -5}, + []int{-5, 34, 41, 11, 45, -46, -86, 31, -57, 42, -92, 43, -37, -9, 42, -29, -3, 41, -71, 13, -8, 37, -36, 23, 17, -74, -12, -55, -18, -17, -13, -76, -18, -90, -5, 14, 7, -82, -19, -16, 44, -96, -88, 37, -98, 8, 17, 9, -2, -29, 11, -39, -49, -95, 20, -33, -37, -42, 42, 26, -28, -21, -44, -9, 17, -26, -27, 24, -60, -19}, + []int{-95, -73, -88, -4, 32, 7, 20, 19, -17, 36, -81, -91, -6, -74, 20, 47, -24, 15, 40, -5, -28, -5, 23, -30, 6, -97, 49, -12, -57, 21, 1, 11, -64, -32, -95, -33, 10, 50, 47, 41, -11, -51, 22, -84, 39, 10, -36, -72, -27, -60, -19, -51, -11, 37, 2, -62, 22, -66, -61, 29, -50, -94, 48, -23, 18, -37, -92, -92, -4, -97}, + []int{46, 4, -96, -31, 14, -25, -74, -73, -40, -46, 38, -31, 23, -34, 12, 25, 34, 42, -43, -91, 3, 34, -17, -64, 21, -98, 11, -70, -36, -66, 2, -19, 30, -88, 43, -62, 33, -75, -11, 45, -95, -65, -25, 27, -35, -57, -81, 2, 10, 33, -46, -40, -4, -15, -94, 48, -95, 24, -87, -12, 12, -70, 35, 42, -69, 19, -74, -14, -81, 2}, + []int{32, 17, -79, -89, 25, 19, -98, -60, -81, -47, -8, -61, -41, -33, -33, -81, 15, -75, 8, -99, -29, -75, -23, -54, 27, 41, -23, -70, 19, -60, -91, -60, 34, 42, -35, 25, -61, -46, 41, 44, -27, -57, -24, -87, 4, -55, -40, -74, -20, 44, 37, 14, -48, -89, -26, -15, -40, -38, 14, 22, 24, 47, -62, -65, -73, -86, 50, -62, 24, -53}, + []int{-24, 10, 32, 7, -21, 44, -23, 5, -98, 40, -21, -4, -63, 38, -89, 26, -62, -98, -87, -67, 7, -50, -84, 6, -12, -10, -25, 7, -96, 0, -78, -36, 6, 22, -83, 39, -94, -15, -63, -70, -4, -91, -96, -73, -11, 33, 11, -24, -11, -64, 7, 49, 7, -55, -91, -88, -100, 45, -48, 31, 28, -97, -88, -96, -14, -22, -41, -97, 6, 31}, + []int{-12, -9, -71, -55, -40, -66, -21, 48, 30, 38, -64, -13, -22, 9, -61, -41, 12, -26, -92, -55, -33, -67, -59, -31, -77, 19, 13, -28, 8, -13, -13, -19, -31, -87, 2, -93, -95, 14, 6, 34, -38, -88, 48, 38, -52, -92, -62, -76, -55, 45, 50, 24, -76, -54, -70, -35, 35, -90, -99, 16, 12, 39, 21, -88, -68, 6, 6, -2, -72, 26}, + []int{-58, 5, -60, 16, -84, -67, -28, -11, -63, -49, -4, -41, -99, 3, -1, 47, 12, -69, -69, -20, -78, -21, 20, -67, 6, 14, -86, -35, 7, 7, 7, 3, 10, -18, 33, -14, 36, -75, -89, -90, -29, -3, -89, 18, 48, -61, 48, 25, -17, -28, -46, 44, 5, 48, -10, -21, -4, 49, -57, 37, -16, 28, 22, -95, 39, 7, -82, 13, -68, 23}, + []int{-77, -64, -34, -54, -25, -19, -63, -57, -33, -76, -89, -21, -70, -62, -97, 50, -14, -55, -27, -16, -17, 7, 29, 9, -95, -77, 45, -71, -12, 27, -68, -62, -66, -100, -60, -86, -15, 38, 19, -50, 43, -9, 47, -97, -96, -31, -51, 48, -24, 2, 13, -25, -8, -44, -34, -100, -14, -5, -4, -69, 25, -63, -70, -99, -9, -68, -88, -24, 5, -69}, + []int{25, -88, -91, -26, -73, -52, -81, -96, -53, 2, -35, -77, -1, 2, 16, 10, -14, 15, 42, -52, -42, -48, -68, 21, 3, -26, -75, 45, 12, -82, 25, -29, 15, 18, -37, 4, 41, -26, -98, -94, -74, -5, -15, 11, 11, -68, -94, -100, -100, 29, -83, -99, -75, -9, -62, -31, 23, -47, -68, -8, 8, -100, -1, -76, -17, -58, 36, -84, -32, -93}, + []int{-81, 37, 19, -5, 18, 15, -34, -29, -84, -35, -67, -64, -57, -99, 46, 26, -38, -37, -79, 0, -6, 32, 50, 37, -63, 27, -56, 11, -3, -66, -72, 34, 13, -4, 30, -82, 32, -71, -35, -30, 10, -48, -93, -94, -92, -4, -21, -34, -67, -80, -98, -28, 32, -86, -22, 6, 46, -75, -40, -100, -7, 11, -44, -12, -36, -24, 46, -1, 26, -20}, + []int{-81, -20, -54, -75, -78, 23, -76, -90, 46, -20, -5, 30, -59, -37, -82, -68, 36, 8, 50, -72, 48, -97, -93, -10, -31, -91, -81, -59, 27, -47, -65, -75, -19, 26, 12, 41, 16, -30, 33, 9, -28, -23, 45, -32, -68, 39, -24, -89, -47, -41, -71, -96, -45, -34, -43, -23, 39, -32, -99, -19, 46, 30, -89, -8, -65, -94, 42, 8, -14, -50}, + []int{-49, -64, 20, -6, -82, -30, -99, -79, -27, -2, -17, 30, -14, 47, -3, -47, 31, 2, -28, -7, -83, -56, -43, 11, -46, -85, -17, -30, -47, -84, -88, -36, 42, -71, -39, -28, 8, -78, -39, 49, 8, 11, 37, 6, -38, 33, -36, -36, -37, -44, -77, 41, 45, -47, -63, -58, -28, -31, -97, 23, -94, -72, 35, -39, -2, 27, -87, 3, 13, -66}, + []int{49, 27, -43, -84, 27, -93, 38, 25, 18, 43, 48, 49, -35, -51, 28, 27, 2, 29, 0, -47, -30, -25, -90, -92, -93, 0, -73, -73, 0, -62, -73, 12, -15, -40, -50, 11, -97, -74, 42, -55, -27, -7, 49, -32, -30, -6, -54, -88, -73, 43, -46, -29, -50, -50, -11, 5, 23, 6, 12, 20, -59, 47, -98, -77, 47, -5, -17, 23, -31, -14}, + []int{-28, 23, -90, -47, 41, 32, -38, 32, -56, -29, -20, -34, -79, 41, 6, -52, 41, -43, -24, -55, -81, 3, -42, 6, 26, 31, -64, 35, 7, -85, -38, 14, -29, 8, -88, 26, -100, 9, -11, -79, -59, 2, 38, 47, 23, 39, 46, -65, -62, -61, 1, 43, -58, -90, 33, 36, -30, 38, -11, -37, 19, 41, -2, -94, -8, 20, -38, -82, -73, 28}, []int{-54, -64, 24, -40, -33, 34, 36, 3, -56, -36, 23, -91, 50, 16, 27, -26, 25, 41, -15, -64, -30, -53, 50, -46, 11, -89, -98, 11, -81, -66, -76, -40, 12, 4, -21, -67, 48, -86, -43, 22, -70, 46, 48, -82, -94, -13, 0, 29, 29, 36, -19, -1, -55, 48, -63, 47, -30, -81, 1, -43, -83, 16, 12, 48, 47, -51, -4, 44, 16, -86}, + []int{-63, 31, 1, -65, -78, 42, -14, -99, -77, -62, 27, -51, 46, -58, 40, 15, -19, 45, 10, 0, -67, 42, -86, -100, -40, 30, -75, 0, -82, 10, -14, -43, 26, -26, -97, -31, -68, -76, 13, -85, 35, -60, -82, -67, -99, 12, -22, 8, 21, -93, -70, 48, 36, -57, -57, -91, 8, -32, -60, 28, -73, -59, -72, -69, -32, 33, 6, -8, -45, 35}, + []int{18, -51, -21, 48, -18, 22, -46, -52, -55, -30, 27, -88, -29, -64, 22, -34, -62, -23, -60, -76, -41, -64, -82, 15, 18, -10, -37, -97, 38, -50, 12, -28, -48, -57, -53, -48, -81, -75, -85, -12, 38, -87, -72, -82, -59, -3, 25, -46, 9, -95, -28, -79, -67, 14, -71, -18, 14, 0, -65, -37, 26, 30, 35, -33, -37, 1, 33, -70, -28, 47}, + []int{-78, -43, -64, -91, -78, 35, -8, 38, -79, -15, -11, 17, 11, -78, -32, -14, -15, -64, 18, -90, 32, -48, 38, 33, -19, 32, -23, -29, -68, -23, -53, -58, -20, 1, -22, -51, -29, 1, -60, -91, 8, -15, -12, -71, -16, -23, 3, -84, -89, 15, 14, 18, -99, -27, -70, -18, 29, -14, 15, 0, -49, 0, 17, -97, -23, -30, -49, -46, -52, 41}, + []int{-34, -39, 42, 34, -54, 43, 32, 49, 46, -23, 24, 24, -1, -21, -12, -15, -3, -72, -61, -75, -53, -49, -47, -64, 40, -56, -63, -95, -52, 3, -26, -12, -58, 49, 5, 21, -47, 32, -92, -46, -10, 28, -90, -83, 46, 9, -49, -19, 32, -41, 34, 29, 0, -98, -40, 26, -30, -10, -51, 20, -54, 33, 16, -24, -52, 44, 49, 15, -58, -56}, + []int{31, -24, -28, -5, 40, 32, -74, -1, 28, -81, 8, -96, 8, -22, -27, 32, 22, -24, 16, 40, -68, -50, -49, -84, 25, -55, -7, -100, -77, 25, -40, -6, -68, -90, -88, -74, -77, -24, -17, 6, -72, 46, 23, -52, 40, -71, -41, 21, 28, -29, 31, -71, 16, -83, 42, 25, -3, -84, 33, -66, -33, -24, -65, -39, -5, 21, -36, -87, 3, 38}, + []int{-98, -64, 38, 45, -90, 44, -63, 20, -44, 32, -4, 0, -22, -39, -8, 19, -20, -58, 5, 1, 32, -92, -36, 25, -82, 45, -55, 23, -50, -89, -81, -33, 16, -18, -7, 21, 40, -62, -16, -84, -19, -37, -66, 48, -30, 30, -8, 1, -70, -6, -65, 15, -11, -66, -71, -26, -15, 48, -80, -6, -41, 29, -80, -82, -6, -73, -56, -38, 44, 23}, + []int{14, -29, 19, -13, -93, -33, -29, -16, 21, -51, 8, 6, -63, 24, -23, 14, 47, -84, -27, -11, -56, -65, 0, -11, -28, -55, 11, -67, 18, -6, -87, -34, -44, -24, -77, -34, -22, -8, 36, -11, -89, -75, -43, -92, -94, -73, 41, -27, -63, 30, -37, -82, 22, -60, -92, -58, 11, -27, -98, -68, 45, -3, 50, -83, -45, 6, 12, -48, -16, 27}, + []int{47, -61, 2, 7, -84, 26, -67, -32, 33, -100, -66, -64, -25, 25, -4, -51, -69, -92, 39, 6, -82, -36, -14, -59, -40, -48, -30, -42, 5, -72, 33, -85, -65, 9, 45, -11, -28, 32, -19, -71, -51, -73, -34, -21, -35, -52, -27, -76, 40, 44, 12, -18, -14, 28, -31, 19, -20, -84, -28, -32, -75, -84, 21, 44, 3, -70, -59, -6, -27, -39}, + []int{-65, -41, -22, 29, -31, -62, -26, -40, -100, -40, 48, -34, 44, -20, 20, -29, -65, 2, -81, 0, -29, -64, -59, 38, 30, -58, 31, -87, 7, 37, -95, 28, 48, 40, -81, 25, -81, -96, 4, 15, 15, -96, 14, 24, 20, -35, -37, -98, 5, -82, 34, -39, -43, -63, 35, 1, -10, -83, 34, -21, -78, -65, -44, 48, -32, -5, -1, -18, -97, 28}, + []int{11, 34, 47, 21, -69, 17, -38, -4, -25, -89, -64, 50, 7, 4, 44, 44, -5, -16, -99, 31, 9, -57, 11, -100, 41, -93, 21, -20, 28, -39, -23, -6, -34, -61, -24, 31, -76, -66, -54, 34, 2, -85, -2, 45, 28, -51, -48, -67, -20, -83, -12, -55, -83, -2, -86, -44, -80, -9, 4, 43, -98, -24, -82, 34, -27, -63, -9, -12, -94, -15}, + []int{20, -49, -91, -71, 37, 39, -50, -93, -93, -94, 13, 32, -99, -26, -25, -79, -10, -18, 27, 38, 13, 18, -55, -37, -66, 10, -61, 32, 49, -27, -60, -69, -92, -54, -96, -89, -40, -5, -29, 5, -85, 20, -22, -5, -49, -31, -83, 28, -62, -92, -2, 28, -24, 20, -12, -92, -30, -92, -76, 46, 22, -55, 28, -81, -59, 23, -22, -3, 36, 20}, + []int{31, -79, 31, -22, -47, -47, -42, -10, -32, -38, 27, 2, -39, -28, -33, 4, -54, -80, -89, 24, 23, -1, 30, -60, -31, -35, 0, -37, -46, -33, 33, 44, 7, 10, -27, -98, 6, 22, -48, 14, -72, -69, 42, 23, 6, -50, -84, -62, -15, -69, 4, 32, 16, -61, 48, 42, -41, -8, -82, -62, -79, -15, -88, -11, -61, -96, -63, -95, 24, -49}, + []int{5, 9, -93, -50, -42, -54, 50, 17, 22, 12, -11, -5, -35, -7, -65, -71, -4, 27, 42, -13, -100, -21, -7, 14, -86, 16, -42, 33, -54, 24, -44, -1, -89, 42, -34, -99, -74, -15, -70, -40, -69, -41, -17, 47, 48, 33, -100, -64, -39, 47, -75, -1, -97, -45, -71, -48, -80, -86, 14, 6, -97, -80, -75, -59, -3, -1, -66, -93, -65, -14}, + []int{-67, -57, -41, 41, -54, 10, -25, -78, 7, 21, -2, 27, 32, -68, 35, -61, 46, -80, -89, -20, -87, -1, -97, -81, 4, 11, -56, -31, -38, 15, -70, -11, -15, -9, -76, 1, 40, -72, -66, -52, 30, -97, 15, 22, 41, -57, 15, 13, -53, -71, -50, -39, 18, -18, 6, -20, -41, 32, -16, 22, -1, -47, -82, -2, -92, -93, -6, 28, -60, -100}, + []int{-88, 16, -14, -3, -12, 16, -94, -49, 3, -6, 8, -45, -36, -81, 21, -37, 38, -53, -54, -78, -99, 38, -60, 10, 22, 10, 20, 43, -27, -10, 24, -15, -3, 28, -51, -93, 32, -9, -68, -22, 34, -91, -34, -7, -48, -6, -49, -13, -54, -7, -56, -79, -5, 36, -58, -36, -8, 10, -20, -72, -82, 13, -70, -98, 39, -88, -62, -25, 19, -62}, + []int{-16, 50, -27, -22, 32, -30, 50, -88, 4, -71, -14, -39, -52, -16, -43, -62, 20, 11, -73, -10, 13, 31, -71, -68, -79, 21, 5, -55, 48, 33, -36, 35, -14, -65, 37, 29, -54, 15, 40, -3, -68, -11, -48, -25, 33, -78, -41, -81, -48, -63, -100, -56, -70, 3, 31, -20, -80, 17, -95, 14, -80, 11, -31, -38, -54, -17, 0, -93, -2, 1}, + []int{-16, -16, -36, 0, -78, -8, 22, -90, 21, -46, 26, 42, 16, -54, -72, -27, -69, -33, -82, -41, 29, 39, -46, -100, -78, -80, -85, -81, 15, -66, -65, 45, -21, 9, 16, -42, 12, -62, 50, -71, -44, -44, -85, -68, 8, -52, -77, 4, -19, -29, 50, 39, -73, -92, 2, -88, 31, -47, -12, -31, -33, -6, -75, -71, 18, -61, -43, 25, -73, 33}, + []int{-40, -74, -34, -81, 8, 1, -52, -65, 13, -10, 48, -31, 38, -26, -33, 7, 31, 38, -70, -93, -34, -85, -4, 7, -9, -23, -97, -18, -13, -12, -11, -63, -25, -6, -42, -44, 38, -26, -28, -52, -7, -43, -85, -76, 31, 37, 29, 47, -83, -55, -8, -32, 8, 49, 5, -49, -18, 5, -59, -27, -37, -60, 36, -27, -45, -87, -8, -74, -92, -49}, + []int{-18, -35, -84, 28, 15, -99, -37, -96, -29, 44, 11, -50, -78, -56, 41, -42, -13, 14, 8, 14, -96, 8, -52, -33, 41, -4, -65, -65, -79, -18, -73, 1, -69, 1, -82, 33, -33, -10, 19, 2, -51, 20, -19, -30, -28, -40, 38, 35, 10, -3, 44, -29, 22, -95, -2, -97, -1, -16, 29, -2, -7, -92, -38, -19, -88, -16, 28, -54, -94, -65}, + []int{-75, -38, -79, -54, 11, -45, 11, 23, 15, 24, -39, 1, 50, -61, -44, -83, 13, 7, -2, 0, 38, 16, -90, 40, -42, 34, 46, -62, 37, -90, 34, -87, -2, -86, -53, 7, -33, 17, -34, -93, 31, -52, -63, 30, 49, -71, -84, -82, 23, 39, 45, 22, -90, 24, -99, -75, -32, -31, -73, 10, -59, -34, -40, 26, -1, -17, -1, 31, 43, -32}, + []int{-74, -98, -55, -88, -76, -62, -48, 2, -50, 39, -6, -34, 39, -37, -52, -8, -23, -66, -23, -31, -38, 44, 38, -75, -57, 21, 15, -25, -68, -20, -16, -15, -78, 36, -69, -21, -72, 8, -63, -92, -75, -5, -98, -96, -67, -88, -91, 1, -20, -43, -81, -68, 49, -83, 35, -3, -2, 3, -84, -63, 46, 30, -63, -36, 14, 28, -68, -33, 8, -33}, + []int{7, -89, 34, -58, -15, 27, -37, -1, -83, -28, -95, 13, -50, -100, 34, 41, -88, -61, -37, 2, -38, -97, -88, -14, -39, -58, 17, -95, 40, -93, -33, 15, -83, -13, -32, -91, -77, -44, -93, 1, 3, 26, -73, 41, -63, -24, 1, -30, -84, 18, -5, -3, 13, 30, 45, 42, -81, -91, -75, -63, -66, 24, -22, 40, 30, 37, -2, -97, -43, -4}, + []int{50, 3, 17, -6, -11, -67, -48, 46, -22, -74, -17, -41, -24, -60, 35, 10, -85, -48, 14, -36, 4, -42, -88, -10, 38, -67, -98, -70, -52, -36, -72, -66, -77, -51, -98, -19, -50, -77, 47, 27, -80, -28, -4, 31, 39, -28, 27, -16, 11, -7, -13, 41, -15, -60, 16, 1, -66, -34, 30, 45, -41, 29, -23, -89, -96, 9, -75, -57, -17, 19}, + []int{20, -18, -68, -61, -93, 48, -31, -29, 9, -100, -27, -9, -81, -45, -44, -2, 7, 38, -27, 15, 41, -66, 25, -49, 1, 36, -66, -30, -53, -67, -75, 12, 5, -2, -96, 13, -27, -36, 3, 1, -65, -47, -86, -65, 40, 19, 36, -16, 15, -49, -30, -28, -56, -57, 1, -28, -82, -64, 8, 40, -87, -56, 45, -37, -15, -72, -42, 44, -66, -34}, + []int{-75, 40, -87, -89, -27, 50, -20, -1, 27, -41, -90, -72, 38, -26, 43, -84, -4, -1, 38, 39, -8, -82, -99, 7, -56, -55, -70, 10, -27, 15, -56, 50, -69, -48, -44, 7, -83, -68, -27, -24, -22, -34, 20, 26, -66, -58, -7, -87, 29, 33, -15, 18, -47, -70, -22, 35, 3, -87, -14, 8, -75, 41, 26, 38, -83, 42, 24, 20, 42, 8}, + []int{16, -11, -22, 45, 13, -9, 43, 15, -100, -16, -65, -81, -36, 42, 26, -13, -64, 28, 16, -52, 4, -87, 50, 1, -9, -62, 27, -42, -65, -21, -53, -53, -28, -78, -6, -95, -18, -76, 27, -65, 33, 33, -99, -27, 28, -2, -80, -63, -9, -89, -20, -49, -38, 43, 11, -27, -63, -62, -42, -33, -96, -39, 16, -79, -53, 18, -8, -84, -55, -2}, + []int{-57, 4, -74, 1, -94, -72, -58, -81, -97, 24, -53, 33, -66, -17, -12, -61, -89, -30, 7, -56, 11, -20, 26, 30, 2, -92, 40, 11, 30, -32, -23, -31, -90, -61, -13, 33, -59, -74, 6, -76, 23, 31, -63, 16, -9, -22, 29, 17, 18, -22, -55, -25, -45, -98, -86, -81, -32, -100, -83, -40, -1, -99, -51, -55, -87, -8, 44, -94, 9, -50}, + []int{40, -19, -54, -78, -12, -20, 13, 3, -36, -98, 19, 49, -69, 29, -63, -41, -81, -84, -83, -32, -25, 30, -56, -96, -48, 50, -87, -100, 33, -15, -66, 47, 45, -26, -60, -1, 27, -64, -4, -77, -57, -52, 9, 2, -72, -66, -73, -23, -39, -66, 43, 34, -26, 17, -98, -68, -39, 49, -14, -20, -32, -50, 18, -37, -61, 10, 16, -75, 2, -32}, + []int{-29, -13, -75, -3, -9, 49, -77, 10, -65, 18, -97, -63, -14, -10, -65, -26, 17, -53, -49, -68, -46, -65, -47, -5, 15, 22, -26, -40, 24, -89, -12, 27, -60, 11, 20, 8, -4, 32, -47, -62, 2, 9, -85, -40, -18, -80, -56, -12, 42, -59, -97, -68, 2, -4, 48, -12, 50, -17, -45, -100, 20, 7, -13, -22, 20, 26, 48, -52, 13, 16}, + []int{-40, -95, -48, -83, -69, -46, -81, -19, -47, -50, 42, -53, 32, -39, -51, -54, -95, 8, -44, -67, -42, -38, 40, 19, 43, 18, 12, -64, -59, 13, 31, 17, 24, -63, -44, 21, -36, -16, -38, -20, -83, -28, 36, -14, 23, -71, 29, 49, -65, 1, 37, 49, 38, 31, -30, -34, 32, 14, -85, 3, -41, -80, -29, -53, -88, 45, 39, -39, -1, 36}, + []int{-85, -62, -8, -76, -89, -74, -36, 36, -86, 5, 3, -55, -44, -98, 48, 47, -3, -75, -31, -11, 26, -66, -82, 46, -73, -96, 10, -95, -19, 30, -79, 0, 32, -22, -43, -51, -22, -49, 5, 48, -30, -20, 8, -20, -44, 20, 15, 3, -56, 28, -17, -87, 19, -22, -71, -72, -57, -91, -62, -1, -99, 36, -57, 19, 47, -62, -52, -42, 7, 4}, + []int{-24, -8, 47, -83, -3, 29, 25, -28, 9, -13, -57, 3, -5, 40, -16, -81, 39, -89, -56, -56, -85, -34, -17, -95, -63, -20, 1, -93, 31, 12, 15, -70, -46, 43, 16, -3, 26, -50, -23, -77, 18, 10, 33, 30, -8, -6, 37, -97, -73, 32, 21, 19, -30, -28, 14, 5, 36, -78, -85, 36, 21, 15, 22, -32, -11, -45, 21, -58, 24, -68}, + []int{-87, -90, 0, -38, 18, 22, -52, 28, -83, 50, -81, -76, 28, -46, 16, -6, -84, -100, -58, -34, 25, 5, 19, -41, -12, -20, -42, -44, -70, -6, -9, -6, 25, -91, -43, -40, -39, -13, -89, -11, 33, 12, -72, -6, -60, -96, -90, 6, 34, 34, -88, 26, 6, -98, -99, -47, -3, 10, -88, -80, -97, 25, 8, -63, 21, 33, 26, 12, -67, 16}, + []int{3, -32, -39, 46, -14, -100, 30, 27, -22, -48, -11, 8, -97, 36, -33, 47, 42, -78, 46, 26, -50, 5, -81, 1, -58, 18, 8, -36, -63, -100, -47, -25, -42, -97, 25, -30, -73, -84, 18, 11, 47, -33, -27, -16, -82, 20, -4, -30, -62, 47, -90, 2, 41, -3, -91, -26, -5, 24, -48, -75, -53, 16, -7, -42, -52, -73, 45, -30, -78, -98}, + []int{-80, 12, -48, -80, -64, -42, -70, 28, 46, 16, 11, -10, 20, 24, 30, -37, 2, -3, -41, 4, -47, 6, -33, 28, 35, 27, 33, -4, -91, -87, -13, -62, -72, -43, 48, 9, 20, 21, 24, 36, 27, -10, 34, 42, 13, -61, -54, -30, -15, 10, -99, 45, 39, -13, -18, 25, -49, 23, 47, -79, 20, -28, -94, 16, 19, 43, -94, 4, -35, -40}, + []int{-30, -96, -46, -81, -73, 18, -50, 37, 29, -68, -12, -85, 28, -90, 43, -22, -46, -22, 6, 23, -43, -46, -32, -54, 14, 28, -20, 25, -87, -97, 24, -55, 25, -70, -27, 40, -77, 22, 16, -85, -7, -63, -59, -99, -97, 8, 50, -62, 11, -70, -5, -28, -11, -8, 41, -4, 34, -31, -17, 24, -10, 23, -3, -61, -51, -89, 42, 18, 50, -94}, + []int{-63, 32, 36, -75, -79, -31, -12, 10, -87, 20, -85, -10, -61, -81, 4, -78, -71, -41, 44, -70, 25, -92, 44, -52, -59, -29, -57, -77, -54, -10, -92, -40, -60, -3, -24, -47, 24, 35, 24, -27, 26, -10, -64, 15, -41, 25, -44, 16, 41, -82, 18, 8, 43, -55, 31, 30, 13, -83, 12, -22, 29, -97, -2, -46, -23, 30, -32, 25, -3, 44}, + []int{50, 11, -49, -5, -25, 4, 12, 27, -90, -27, 48, 16, -67, -58, -22, 48, -8, -85, -39, 29, 8, -7, -22, 18, 41, 20, 30, 12, -37, -18, 7, -89, -5, -66, 23, 5, -87, 6, -44, -6, -63, -42, -21, 18, -60, -98, -77, -56, -2, -21, 35, 2, 5, 29, 36, -49, -82, 5, 24, 49, 11, -37, -80, -51, -8, -21, 11, 21, -70, -79}, + []int{-59, -6, -91, 3, -83, 29, 1, -44, -13, -60, -19, -91, -13, -31, -72, 19, -24, -68, 0, -19, -86, -40, 49, -83, -3, 47, 35, -67, 26, -63, 35, -95, -10, -7, -55, 47, -49, -17, -10, 39, -8, -93, 34, -86, 37, -31, -33, -49, -1, -7, -37, -77, 20, -24, -72, 38, -5, -31, -40, -69, -93, -4, -63, -73, -71, -11, -47, 42, 17, -73}, + []int{-12, -56, -25, -7, -91, -6, -62, -34, -27, -88, -58, -90, -12, -3, 23, -6, -42, 36, 27, 39, -48, -1, -92, -8, 23, -91, -50, -84, 5, 19, -63, 32, 30, 31, -67, 36, -15, 44, -60, -57, -33, 18, 49, 11, -55, -54, -27, -31, -96, -20, 1, 36, -14, -15, 44, -72, -88, -41, 24, -7, -4, 48, 34, 33, 19, -41, -11, -91, 39, -9}, + []int{-98, -47, -87, -97, -82, 15, 9, 13, -56, 35, -7, 50, -70, 34, 27, 3, -24, -72, -63, -56, -95, -60, -59, 32, -29, 31, 49, 43, 40, -75, -54, 3, -87, -84, -37, 46, 30, -5, -74, -36, -76, -91, -40, 28, -20, 26, -78, -27, 2, 44, -24, 14, -15, 29, -86, -55, 24, -80, -24, 10, -53, -98, 50, -63, -61, 25, -90, 24, 24, -92}, + }, + 85, + }, + + { + [][]int{ + []int{-2, -3, 3}, + []int{-5, -10, 1}, + []int{10, 30, -5}, + }, + 7, + }, + + { + [][]int{ + []int{-2, -3, 3}, + []int{-5, -10, 1}, + []int{10, 30, -10}, + }, + 8, + }, + + { + [][]int{ + []int{}, + }, + 1, + }, + + { + [][]int{}, + 1, + }, + + // 可以有多个 testcase +} + +func Test_calculateMinimumHP(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, calculateMinimumHP(tc.dungeon), "输入:%v", tc) + } +} + +func Benchmark_calculateMinimumHP(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + calculateMinimumHP(tc.dungeon) + } + } +} diff --git a/Algorithms/0174.dungeon-game/dungeon.png b/Algorithms/0174.dungeon-game/dungeon.png new file mode 100644 index 000000000..066ed5a38 Binary files /dev/null and b/Algorithms/0174.dungeon-game/dungeon.png differ diff --git a/Algorithms/0179.largest-number/README.md b/Algorithms/0179.largest-number/README.md new file mode 100755 index 000000000..930451c4b --- /dev/null +++ b/Algorithms/0179.largest-number/README.md @@ -0,0 +1,12 @@ +# [179. Largest Number](https://leetcode.com/problems/largest-number/) + +## 题目 +Given a list of non negative integers, arrange them such that they form the largest number. + +For example, given [3, 30, 34, 5, 9], the largest formed number is 9534330. + +Note: The result may be very large, so you need to return a string instead of an integer. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0179.largest-number/largest-number.go b/Algorithms/0179.largest-number/largest-number.go new file mode 100755 index 000000000..111c2095c --- /dev/null +++ b/Algorithms/0179.largest-number/largest-number.go @@ -0,0 +1,68 @@ +package Problem0179 + +import ( + "sort" + "strconv" +) + +func largestNumber(nums []int) string { + size := len(nums) + b := make(bytes, size) + resSize := 0 + + // 转换 nums + for i := range b { + b[i] = []byte(strconv.Itoa(nums[i])) + resSize += len(b[i]) + } + + // 按照题意的规则,对 b 进行排序 + sort.Sort(b) + + // 串联 b 成 res + res := make([]byte, 0, resSize) + for i := size - 1; i >= 0; i-- { + res = append(res, b[i]...) + } + + // 处理 res 以 0 开头的情况 + // 比如,[0, 0, 0] 的结果是 "000" + i := 0 + for i < resSize-1 && res[i] == '0' { + i++ + } + + return string(res[i:]) +} + +type bytes [][]byte + +func (b bytes) Len() int { + return len(b) +} + +func (b bytes) Less(i, j int) bool { + size := len(b[i]) + len(b[j]) + + bij := make([]byte, 0, size) + bij = append(bij, b[i]...) + bij = append(bij, b[j]...) + + bji := make([]byte, 0, size) + bji = append(bji, b[j]...) + bji = append(bji, b[i]...) + + for k := 0; k < size; k++ { + if bij[k] < bji[k] { + return true + } else if bij[k] > bji[k] { + return false + } + } + + return false +} + +func (b bytes) Swap(i, j int) { + b[i], b[j] = b[j], b[i] +} diff --git a/Algorithms/0179.largest-number/largest-number_test.go b/Algorithms/0179.largest-number/largest-number_test.go new file mode 100755 index 000000000..404ae548d --- /dev/null +++ b/Algorithms/0179.largest-number/largest-number_test.go @@ -0,0 +1,59 @@ +package Problem0179 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans string +}{ + + { + []int{824, 938, 1399, 5607, 6973, 5703, 9609, 4398, 8247}, + "9609938824824769735703560743981399", + }, + + { + []int{0, 0}, + "0", + }, + + { + []int{1, 20}, + "201", + }, + + { + []int{3, 30, 34, 5, 9}, + "9534330", + }, + + { + []int{3, 30, 34, 5, 9, 30}, + "953433030", + }, + + // 可以有多个 testcase +} + +func Test_largestNumber(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, largestNumber(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_largestNumber(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + largestNumber(tc.nums) + } + } +} diff --git a/Algorithms/0187.repeated-dna-sequences/README.md b/Algorithms/0187.repeated-dna-sequences/README.md new file mode 100755 index 000000000..c21050e00 --- /dev/null +++ b/Algorithms/0187.repeated-dna-sequences/README.md @@ -0,0 +1,17 @@ +# [187. Repeated DNA Sequences](https://leetcode.com/problems/repeated-dna-sequences/) + +## 题目 +All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying DNA, it is sometimes useful to identify repeated sequences within the DNA. + +Write a function to find all the 10-letter-long sequences (substrings) that occur more than once in a DNA molecule. + +For example, +``` +Given s = "AAAAACCCCCAAAAACCCCCCAAAAAGGGTTT", +Return: +["AAAAACCCCC", "CCCCCAAAAA"]. +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0187.repeated-dna-sequences/repeated-dna-sequences.go b/Algorithms/0187.repeated-dna-sequences/repeated-dna-sequences.go new file mode 100755 index 000000000..015892c9a --- /dev/null +++ b/Algorithms/0187.repeated-dna-sequences/repeated-dna-sequences.go @@ -0,0 +1,28 @@ +package Problem0187 + +import ( + "sort" +) + +func findRepeatedDnaSequences(s string) []string { + var res []string + if len(s) <= 10 { + return nil + } + + str := "" + // rec 记录各个 subString 出现的次数 + rec := make(map[string]int, len(s)-9) + for i := 0; i+10 <= len(s); i++ { + str = s[i : i+10] + if v := rec[str]; v == 1 { + // 把已经出现过一次的 subString 存放入 res + res = append(res, str) + } + rec[str]++ + } + + sort.Strings(res) + + return res +} diff --git a/Algorithms/0187.repeated-dna-sequences/repeated-dna-sequences_test.go b/Algorithms/0187.repeated-dna-sequences/repeated-dna-sequences_test.go new file mode 100755 index 000000000..2648aaca9 --- /dev/null +++ b/Algorithms/0187.repeated-dna-sequences/repeated-dna-sequences_test.go @@ -0,0 +1,54 @@ +package Problem0187 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + ans []string +}{ + + { + "", + nil, + }, + + { + "ACACA", + nil, + }, + + { + "ACACACACACACA", + []string{"ACACACACAC", "CACACACACA"}, + }, + + { + "AAAAACCCCCAAAAACCCCCCAAAAAGGGTTT", + []string{"AAAAACCCCC", "CCCCCAAAAA"}, + }, + + // 可以有多个 testcase +} + +func Test_findRepeatedDnaSequences(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findRepeatedDnaSequences(tc.s), "输入:%v", tc) + } +} + +func Benchmark_findRepeatedDnaSequences(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findRepeatedDnaSequences(tc.s) + } + } +} diff --git a/Algorithms/0198.house-robber/README.md b/Algorithms/0198.house-robber/README.md new file mode 100755 index 000000000..f2fda767f --- /dev/null +++ b/Algorithms/0198.house-robber/README.md @@ -0,0 +1,12 @@ +# [198. House Robber](https://leetcode.com/problems/house-robber/) + +## 题目 +You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent houses have security system connected and it will automatically contact the police if two adjacent houses were broken into on the same night. + +Given a list of non-negative integers representing the amount of money of each house, determine the maximum amount of money you can rob tonight without alerting the police. + +Credits:Special thanks to @ifanchu for adding this problem and creating all test cases. Also thanks to @ts for adding additional test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0198.house-robber/house-robber.go b/Algorithms/0198.house-robber/house-robber.go new file mode 100755 index 000000000..3f05db35a --- /dev/null +++ b/Algorithms/0198.house-robber/house-robber.go @@ -0,0 +1,23 @@ +package Problem0198 + +func rob(nums []int) int { + // a 对于偶数位上的最大值的记录 + // b 对于奇数位上的最大值的记录 + var a, b int + for i, v := range nums { + if i%2 == 0 { + a = max(a+v, b) + } else { + b = max(a, b+v) + } + } + + return max(a, b) +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} diff --git a/Algorithms/0198.house-robber/house-robber_test.go b/Algorithms/0198.house-robber/house-robber_test.go new file mode 100755 index 000000000..bd5a51459 --- /dev/null +++ b/Algorithms/0198.house-robber/house-robber_test.go @@ -0,0 +1,64 @@ +package Problem0198 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans int +}{ + + { + []int{226, 174, 214, 16, 218, 48, 153, 131, 128, 17, 157, 142, 88, 43, 37, 157, 43, 221, 191, 68, 206, 23, 225, 82, 54, 118, 111, 46, 80, 49, 245, 63, 25, 194, 72, 80, 143, 55, 209, 18, 55, 122, 65, 66, 177, 101, 63, 201, 172, 130, 103, 225, 142, 46, 86, 185, 62, 138, 212, 192, 125, 77, 223, 188, 99, 228, 90, 25, 193, 211, 84, 239, 119, 234, 85, 83, 123, 120, 131, 203, 219, 10, 82, 35, 120, 180, 249, 106, 37, 169, 225, 54, 103, 55, 166, 124}, + 7102, + }, + + { + []int{100, 1, 1, 100, 1, 1, 100, 1, 1, 100}, + 400, + }, + + { + []int{2, 1, 1, 2}, + 4, + }, + + { + []int{}, + 0, + }, + + { + []int{1, 2, 3, 4, 5, 6, 7, 8}, + 20, + }, + + { + []int{1, 2, 3, 4, 5, 6, 7, 8, 9}, + 25, + }, + + // 可以有多个 testcase +} + +func Test_rob(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, rob(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_rob(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + rob(tc.nums) + } + } +} diff --git a/Algorithms/0199.binary-tree-right-side-view/README.md b/Algorithms/0199.binary-tree-right-side-view/README.md new file mode 100755 index 000000000..5940e7d05 --- /dev/null +++ b/Algorithms/0199.binary-tree-right-side-view/README.md @@ -0,0 +1,22 @@ +# [199. Binary Tree Right Side View](https://leetcode.com/problems/binary-tree-right-side-view/) + +## 题目 +Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom. + +For example: +Given the following binary tree, +``` + 1 <--- + / \ +2 3 <--- + \ \ + 5 4 <--- + +You should return [1, 3, 4]. +``` + +Credits:Special thanks to @amrsaqr for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0199.binary-tree-right-side-view/binary-tree-right-side-view.go b/Algorithms/0199.binary-tree-right-side-view/binary-tree-right-side-view.go new file mode 100755 index 000000000..06cb231bd --- /dev/null +++ b/Algorithms/0199.binary-tree-right-side-view/binary-tree-right-side-view.go @@ -0,0 +1,33 @@ +package Problem0199 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" +) + +type TreeNode = kit.TreeNode + +func rightSideView(root *TreeNode) []int { + if root == nil { + return nil + } + + if root.Left == nil && root.Right == nil { + return []int{root.Val} + } + + // 递归求解 + ls := rightSideView(root.Left) + rs := rightSideView(root.Right) + + // 左边的分支比右边长的部分,还是可以从右边看到 + if len(ls) > len(rs) { + rs = append(rs, ls[len(rs):]...) + } + + // 添加 root 节点的值 + res := make([]int, len(rs)+1) + res[0] = root.Val + copy(res[1:], rs) + + return res +} diff --git a/Algorithms/0199.binary-tree-right-side-view/binary-tree-right-side-view_test.go b/Algorithms/0199.binary-tree-right-side-view/binary-tree-right-side-view_test.go new file mode 100755 index 000000000..a8314daea --- /dev/null +++ b/Algorithms/0199.binary-tree-right-side-view/binary-tree-right-side-view_test.go @@ -0,0 +1,57 @@ +package Problem0199 + +import ( + "fmt" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + pre, in []int + ans []int +}{ + + { + []int{}, + []int{}, + nil, + }, + + { + []int{1, 2, 5, 3}, + []int{2, 5, 1, 3}, + []int{1, 3, 5}, + }, + + { + []int{1, 2, 5, 3, 4}, + []int{2, 5, 1, 3, 4}, + []int{1, 3, 4}, + }, + + // 可以有多个 testcase +} + +func Test_rightSideView(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + + root := kit.PreIn2Tree(tc.pre, tc.in) + ast.Equal(tc.ans, rightSideView(root), "输入:%v", tc) + } +} + +func Benchmark_rightSideView(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + root := kit.PreIn2Tree(tc.pre, tc.in) + rightSideView(root) + } + } +} diff --git a/Algorithms/0200.number-of-islands/README.md b/Algorithms/0200.number-of-islands/README.md new file mode 100755 index 000000000..d93f0d403 --- /dev/null +++ b/Algorithms/0200.number-of-islands/README.md @@ -0,0 +1,25 @@ +# [200. Number of Islands](https://leetcode.com/problems/number-of-islands/) + +## 题目 +Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are all surrounded by water. + +Example 1: +``` +11110 +11010 +11000 +00000 +Answer: 1 +``` +Example 2: +``` +11000 +11000 +00100 +00011 +Answer: 3 +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0200.number-of-islands/number-of-islands.go b/Algorithms/0200.number-of-islands/number-of-islands.go new file mode 100755 index 000000000..84c0461b1 --- /dev/null +++ b/Algorithms/0200.number-of-islands/number-of-islands.go @@ -0,0 +1,71 @@ +package Problem0200 + +func numIslands(grid [][]byte) int { + // 获取 grid 的大小 + m := len(grid) + if m == 0 { + return 0 + } + n := len(grid[0]) + + // bfs 搜索时,存放点坐标的队列 + x := make([]int, 0, m*n) + y := make([]int, 0, m*n) + + // 往队列中添加 (i,j) 点,并修改 (i,j) 点的值 + // 避免重复搜索 + var add = func(i, j int) { + x = append(x, i) + y = append(y, j) + grid[i][j] = '0' + } + + // 从坐标队列中,取出坐标点 + var pop = func() (int, int) { + i := x[0] + x = x[1:] + j := y[0] + y = y[1:] + return i, j + } + + var bfs = func(i, j int) int { + if grid[i][j] == '0' { + return 0 + } + + add(i, j) + + for len(x) > 0 { + i, j = pop() + + // 搜索 (i,j) 点的 上下左右 四个方位 + if 0 <= i-1 && grid[i-1][j] == '1' { + add(i-1, j) + } + + if 0 <= j-1 && grid[i][j-1] == '1' { + add(i, j-1) + } + + if i+1 < m && grid[i+1][j] == '1' { + add(i+1, j) + } + + if j+1 < n && grid[i][j+1] == '1' { + add(i, j+1) + } + } + + return 1 + } + + res := 0 + for i := 0; i < m; i++ { + for j := 0; j < n; j++ { + res += bfs(i, j) + } + } + + return res +} diff --git a/Algorithms/0200.number-of-islands/number-of-islands_test.go b/Algorithms/0200.number-of-islands/number-of-islands_test.go new file mode 100755 index 000000000..46bbb33c9 --- /dev/null +++ b/Algorithms/0200.number-of-islands/number-of-islands_test.go @@ -0,0 +1,68 @@ +package Problem0200 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + grid [][]byte + ans int +}{ + + { + [][]byte{}, + 0, + }, + + { + [][]byte{ + []byte("111001"), + []byte("010001"), + []byte("111111"), + }, + 1, + }, + + { + [][]byte{ + []byte("11110"), + []byte("11010"), + []byte("11000"), + []byte("00000"), + }, + 1, + }, + + { + [][]byte{ + []byte("11000"), + []byte("11000"), + []byte("00100"), + []byte("00011"), + }, + 3, + }, + + // 可以有多个 testcase +} + +func Test_numIslands(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, numIslands(tc.grid), "输入:%v", tc) + } +} + +func Benchmark_numIslands(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + numIslands(tc.grid) + } + } +} diff --git a/Algorithms/0201.bitwise-and-of-numbers-range/README.md b/Algorithms/0201.bitwise-and-of-numbers-range/README.md new file mode 100755 index 000000000..7994d82f9 --- /dev/null +++ b/Algorithms/0201.bitwise-and-of-numbers-range/README.md @@ -0,0 +1,30 @@ +# [201. Bitwise AND of Numbers Range](https://leetcode.com/problems/bitwise-and-of-numbers-range/) + +## 题目 +Given a range [m, n] where 0 <= m <= n <= 2147483647, return the bitwise AND of all numbers in this range, inclusive. + +For example, given the range [5, 7], you should return 4. + +Credits:Special thanks to @amrsaqr for adding this problem and creating all test cases. + +## 解题思路 + +在草稿纸上,演算以下两组参数,就可以明白程序的用意了。 +1. +``` +m = 5, n = 7 +5 : 0101 +6 : 0110 +7 : 0111 +结果 +4 : 0100 +``` +2. +``` +m = 6, n = 8 +6 : 0110 +7 : 0111 +8 : 1000 +结果 +0 : 0000 +``` \ No newline at end of file diff --git a/Algorithms/0201.bitwise-and-of-numbers-range/bitwise-and-of-numbers-range.go b/Algorithms/0201.bitwise-and-of-numbers-range/bitwise-and-of-numbers-range.go new file mode 100755 index 000000000..741e629b4 --- /dev/null +++ b/Algorithms/0201.bitwise-and-of-numbers-range/bitwise-and-of-numbers-range.go @@ -0,0 +1,17 @@ +package Problem0201 + +func rangeBitwiseAnd(m int, n int) int { + res := uint(0) + + for m >= 1 && n >= 1 { + if m == n { + return m << res + } + + m >>= 1 + n >>= 1 + res++ + } + + return 0 +} diff --git a/Algorithms/0201.bitwise-and-of-numbers-range/bitwise-and-of-numbers-range_test.go b/Algorithms/0201.bitwise-and-of-numbers-range/bitwise-and-of-numbers-range_test.go new file mode 100755 index 000000000..c75dceb0c --- /dev/null +++ b/Algorithms/0201.bitwise-and-of-numbers-range/bitwise-and-of-numbers-range_test.go @@ -0,0 +1,59 @@ +package Problem0201 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + m int + n int + ans int +}{ + + { + 4, + 5, + 4, + }, + + { + 3, + 3, + 3, + }, + + { + 4000000, + 2147483646, + 0, + }, + + { + 5, + 7, + 4, + }, + + // 可以有多个 testcase +} + +func Test_rangeBitwiseAnd(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, rangeBitwiseAnd(tc.m, tc.n), "输入:%v", tc) + } +} + +func Benchmark_rangeBitwiseAnd(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + rangeBitwiseAnd(tc.m, tc.n) + } + } +} diff --git a/Algorithms/0202.happy-number/README.md b/Algorithms/0202.happy-number/README.md new file mode 100755 index 000000000..d314b2ff4 --- /dev/null +++ b/Algorithms/0202.happy-number/README.md @@ -0,0 +1,22 @@ +# [202. Happy Number](https://leetcode.com/problems/happy-number/) + +## 题目 +Write an algorithm to determine if a number is "happy". + +A happy number is a number defined by the following process: +1. Starting with any positive integer, replace the number by the sum of the squares of its digits, +1. and repeat the process until the number equals 1 (where it will stay), or it loops endlessly in a cycle which does not include 1. Those numbers for which this process ends in 1 are happy numbers. + +Example: 19 is a happy number +``` +1^2 + 9^2 = 82 +8^2 + 2^2 = 68 +6^2 + 8^2 = 100 +1^2 + 0^2 + 0^2 = 1 +``` + +Credits:Special thanks to @mithmatt and @ts for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0202.happy-number/happy-number.go b/Algorithms/0202.happy-number/happy-number.go new file mode 100755 index 000000000..0af52233f --- /dev/null +++ b/Algorithms/0202.happy-number/happy-number.go @@ -0,0 +1,22 @@ +package Problem0202 + +func isHappy(n int) bool { + slow, fast := n, trans(n) + for slow != fast { + slow = trans(slow) + fast = trans(trans(fast)) + } + if slow == 1 { + return true + } + return false +} + +func trans(n int) int { + res := 0 + for n != 0 { + res += (n % 10) * (n % 10) + n /= 10 + } + return res +} diff --git a/Algorithms/0202.happy-number/happy-number_test.go b/Algorithms/0202.happy-number/happy-number_test.go new file mode 100755 index 000000000..469022bc0 --- /dev/null +++ b/Algorithms/0202.happy-number/happy-number_test.go @@ -0,0 +1,66 @@ +package Problem0202 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + n int + ans bool +}{ + + { + 2, + false, + }, + + { + 77, + false, + }, + + { + 19, + true, + }, + + // 可以有多个 testcase +} + +func Test_isHappy(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, isHappy(tc.n), "输入:%v", tc) + } +} + +func Benchmark_isHappy(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + isHappy(tc.n) + } + } +} + +func Benchmark_mult(b *testing.B) { + n := 12345 + for i := 0; i < b.N; i++ { + _ = (n % 10) * (n % 10) + } +} +func Benchmark_square(b *testing.B) { + n := 12345 + for i := 0; i < b.N; i++ { + _ = square(n % 10) + } +} + +func square(a int) int { + return a * a +} diff --git a/Algorithms/0203.remove-linked-list-elements/README.md b/Algorithms/0203.remove-linked-list-elements/README.md new file mode 100755 index 000000000..3fd7a5eea --- /dev/null +++ b/Algorithms/0203.remove-linked-list-elements/README.md @@ -0,0 +1,15 @@ +# [203. Remove Linked List Elements](https://leetcode.com/problems/remove-linked-list-elements/) + +## 题目 +Remove all elements from a linked list of integers that have value val. + +Example +``` +Given: 1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6, val = 6 +Return: 1 --> 2 --> 3 --> 4 --> 5 +``` +Credits:Special thanks to @mithmatt for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0203.remove-linked-list-elements/remove-linked-list-elements.go b/Algorithms/0203.remove-linked-list-elements/remove-linked-list-elements.go new file mode 100755 index 000000000..f9844fae2 --- /dev/null +++ b/Algorithms/0203.remove-linked-list-elements/remove-linked-list-elements.go @@ -0,0 +1,23 @@ +package Problem0203 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" +) + +type ListNode = kit.ListNode + +func removeElements(head *ListNode, val int) *ListNode { + headPre := ListNode{Next: head} + + temp := &headPre + for temp.Next != nil { + if temp.Next.Val == val { + // 删除符合条件的节点 + temp.Next = temp.Next.Next + } else { + temp = temp.Next + } + } + + return headPre.Next +} diff --git a/Algorithms/0203.remove-linked-list-elements/remove-linked-list-elements_test.go b/Algorithms/0203.remove-linked-list-elements/remove-linked-list-elements_test.go new file mode 100755 index 000000000..4a77d87fb --- /dev/null +++ b/Algorithms/0203.remove-linked-list-elements/remove-linked-list-elements_test.go @@ -0,0 +1,45 @@ +package Problem0203 + +import ( + "fmt" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + ints []int + val int + ans []int +}{ + + { + []int{1, 2, 6, 3, 4, 5, 6}, + 6, + []int{1, 2, 3, 4, 5}, + }, + + // 可以有多个 testcase +} + +func Test_removeElements(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + head := kit.Ints2List(tc.ints) + ast.Equal(tc.ans, kit.List2Ints(removeElements(head, tc.val)), "输入:%v", tc) + } +} + +func Benchmark_removeElements(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + head := kit.Ints2List(tc.ints) + removeElements(head, tc.val) + } + } +} diff --git a/Algorithms/0204.count-primes/README.md b/Algorithms/0204.count-primes/README.md new file mode 100755 index 000000000..73647f2ae --- /dev/null +++ b/Algorithms/0204.count-primes/README.md @@ -0,0 +1,11 @@ +# [204. Count Primes](https://leetcode.com/problems/count-primes/) + +## 题目 +Description: +Count the number of prime numbers less than a non-negative number, n. + +Credits:Special thanks to @mithmatt for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0204.count-primes/count-primes.go b/Algorithms/0204.count-primes/count-primes.go new file mode 100755 index 000000000..d7ebf887e --- /dev/null +++ b/Algorithms/0204.count-primes/count-primes.go @@ -0,0 +1,33 @@ +package Problem0204 + +func countPrimes(n int) int { + if n < 3 { + return 0 + } + + // composite:合数,prime 的反义词 + isComposite := make([]bool, n) + // 小于 n 的数中,有一半是偶数,除2以外,都不是质数 + // 所以,count 的上限是 n / 2 + count := n / 2 + + for i := 3; i*i < n; i += 2 { + if isComposite[i] { + continue + } + + // j 是 i 的倍数,所以 j 肯定不是 质数 + // 对所有的 j 进行标记 + for j := i * i; j < n; j += 2 * i { + if !isComposite[j] { + // j 还没有被别的 i 标记过了 + // 修改 count + count-- + // 对 j 进行标记 + isComposite[j] = true + } + } + } + + return count +} diff --git a/Algorithms/0204.count-primes/count-primes_test.go b/Algorithms/0204.count-primes/count-primes_test.go new file mode 100755 index 000000000..61b1a4891 --- /dev/null +++ b/Algorithms/0204.count-primes/count-primes_test.go @@ -0,0 +1,59 @@ +package Problem0204 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + n int + ans int +}{ + + { + 499979, + 41537, + }, + + { + 2, + 0, + }, + + { + 5, + 2, + }, + + { + 10, + 4, + }, + + { + 100, + 25, + }, + + // 可以有多个 testcase +} + +func Test_countPrimes(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, countPrimes(tc.n), "输入:%v", tc) + } +} + +func Benchmark_countPrimes(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + countPrimes(tc.n) + } + } +} diff --git a/Algorithms/0205.isomorphic-strings/README.md b/Algorithms/0205.isomorphic-strings/README.md new file mode 100755 index 000000000..6c3684b66 --- /dev/null +++ b/Algorithms/0205.isomorphic-strings/README.md @@ -0,0 +1,24 @@ +# [205. Isomorphic Strings](https://leetcode.com/problems/isomorphic-strings/) + +## 题目 + +Given two strings s and t, determine if they are isomorphic. + +Two strings are isomorphic if the characters in s can be replaced to get t. + +All occurrences of a character must be replaced with another character while preserving the order of characters. No two characters may map to the same character but a character may map to itself. + +For example, + +Given "egg", "add", return true. + +Given "foo", "bar", return false. + +Given "paper", "title", return true. + +Note: +You may assume both s and t have the same length. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0205.isomorphic-strings/isomorphic-strings.go b/Algorithms/0205.isomorphic-strings/isomorphic-strings.go new file mode 100755 index 000000000..dc5613260 --- /dev/null +++ b/Algorithms/0205.isomorphic-strings/isomorphic-strings.go @@ -0,0 +1,21 @@ +package Problem0205 + +func isIsomorphic(s string, t string) bool { + if len(s) != len(t) { + return false + } + + m1 := make([]int, 256) + m2 := make([]int, 256) + + for i := 0; i < len(s); i++ { + if m1[int(s[i])] != m2[int(t[i])] { + return false + } + + m1[int(s[i])] = i + 1 + m2[int(t[i])] = i + 1 + } + + return true +} diff --git a/Algorithms/0205.isomorphic-strings/isomorphic-strings_test.go b/Algorithms/0205.isomorphic-strings/isomorphic-strings_test.go new file mode 100755 index 000000000..402b8e501 --- /dev/null +++ b/Algorithms/0205.isomorphic-strings/isomorphic-strings_test.go @@ -0,0 +1,43 @@ +package Problem0205 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + t string + ans bool +}{ + + {"ba", "a", false}, + {"a", "a", true}, + {"aba", "baa", false}, + {"ab", "aa", false}, + {"egg", "add", true}, + {"foo", "bar", false}, + {"paper", "title", true}, + + // 可以有多个 testcase +} + +func Test_isIsomorphic(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, isIsomorphic(tc.s, tc.t), "输入:%v", tc) + } +} + +func Benchmark_isIsomorphic(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + isIsomorphic(tc.s, tc.t) + } + } +} diff --git a/Algorithms/0207.course-schedule/README.md b/Algorithms/0207.course-schedule/README.md new file mode 100755 index 000000000..1d1ffad7e --- /dev/null +++ b/Algorithms/0207.course-schedule/README.md @@ -0,0 +1,36 @@ +# [207. Course Schedule](https://leetcode.com/problems/course-schedule/) + +## 题目 +There are a total of n courses you have to take, labeled from 0 to n - 1. + +Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is expressed as a pair: [0,1] + +Given the total number of courses and a list of prerequisite pairs, is it possible for you to finish all courses? + +For example: +``` +2, [[1,0]] +``` +There are a total of 2 courses to take. To take course 1 you should have finished course 0. So it is possible. +``` +2, [[1,0],[0,1]] +``` +There are a total of 2 courses to take. To take course 1 you should have finished course 0, and to take course 0 you should also have finished course 1. So it is impossible. + +Note: +1. The input prerequisites is a graph represented by a list of edges, not adjacency matrices. Read more about how a graph is represented. +1. You may assume that there are no duplicate edges in the input prerequisites. + +click to show more hints. + +Hints: + +This problem is equivalent to finding if a cycle exists in a directed graph. If a cycle exists, no topological ordering exists and therefore it will be impossible to take all courses. + +Topological Sort via DFS - A great video tutorial (21 minutes) on Coursera explaining the basic concepts of Topological Sort. + +Topological sort could also be done via BFS. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0207.course-schedule/course-schedule.go b/Algorithms/0207.course-schedule/course-schedule.go new file mode 100755 index 000000000..b80c29c1f --- /dev/null +++ b/Algorithms/0207.course-schedule/course-schedule.go @@ -0,0 +1,63 @@ +package Problem0207 + +func canFinish(numCourses int, prerequisites [][]int) bool { + // next[i][j] : i -> next[i]... ,i 是 next[i] 的先修课 + next := buildNext(numCourses, prerequisites) + // pres[i] : i 的先修课程的**个数** + pres := buildPres(next) + + return check(next, pres, numCourses) +} + +func buildNext(n int, prereq [][]int) [][]int { + next := make([][]int, n) + + for _, pair := range prereq { + next[pair[1]] = append(next[pair[1]], pair[0]) + } + + return next +} + +func buildPres(next [][]int) []int { + pres := make([]int, len(next)) + + for _, neighbours := range next { + for _, n := range neighbours { + pres[n]++ + } + } + + return pres +} + +func check(next [][]int, pres []int, numCourses int) bool { + var i, j int + + // 第 i 个完成的课程的代号是 j + for i = 0; i < numCourses; i++ { + // 完成首先遇到的,无需先修课程的课程 + for j = 0; j < numCourses; j++ { + if pres[j] == 0 { + break + } + } + + // 每个课程都需要先修课 + // 出现了环路 + if j >= numCourses { + return false + } + + // 修改 pres[j] 为负数 + // 避免重修 + pres[j] = -1 + // 完成 j 课程后 + // j 的后续课程的,先修课程数量都可以 -1 + for _, c := range next[j] { + pres[c]-- + } + } + + return true +} diff --git a/Algorithms/0207.course-schedule/course-schedule_test.go b/Algorithms/0207.course-schedule/course-schedule_test.go new file mode 100755 index 000000000..dad396fad --- /dev/null +++ b/Algorithms/0207.course-schedule/course-schedule_test.go @@ -0,0 +1,86 @@ +package Problem0207 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + numCourses int + prerequisites [][]int + ans bool +}{ + + { + 4, + [][]int{ + []int{1, 0}, + []int{2, 1}, + []int{2, 0}, + []int{3, 0}, + []int{3, 1}, + []int{3, 2}, + }, + true, + }, + + { + 4, + [][]int{ + []int{1, 0}, + []int{2, 1}, + []int{2, 0}, + []int{3, 0}, + []int{3, 1}, + []int{3, 2}, + []int{2, 3}, + }, + false, + }, + + { + 2, + [][]int{ + []int{0, 1}, + }, + true, + }, + + { + 2, + [][]int{ + []int{1, 0}, + }, + true, + }, + + { + 2, + [][]int{ + []int{1, 0}, + []int{0, 1}, + }, + false, + }, + // 可以有多个 testcase +} + +func Test_canFinish(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, canFinish(tc.numCourses, tc.prerequisites), "输入:%v", tc) + } +} + +func Benchmark_canFinish(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + canFinish(tc.numCourses, tc.prerequisites) + } + } +} diff --git a/Algorithms/0208.implement-trie-prefix-tree/README.md b/Algorithms/0208.implement-trie-prefix-tree/README.md new file mode 100755 index 000000000..a24aa3deb --- /dev/null +++ b/Algorithms/0208.implement-trie-prefix-tree/README.md @@ -0,0 +1,11 @@ +# [208. Implement Trie (Prefix Tree)](https://leetcode.com/problems/implement-trie-prefix-tree/) + +## 题目 +Implement a trie with insert, search, and startsWith methods. + +Note: +You may assume that all inputs are consist of lowercase letters a-z. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0208.implement-trie-prefix-tree/implement-trie-prefix-tree.go b/Algorithms/0208.implement-trie-prefix-tree/implement-trie-prefix-tree.go new file mode 100755 index 000000000..02386624e --- /dev/null +++ b/Algorithms/0208.implement-trie-prefix-tree/implement-trie-prefix-tree.go @@ -0,0 +1,42 @@ +package Problem0208 + +/** + * Your Trie object will be instantiated and called as such: + * obj := Constructor(); + * obj.Insert(word); + * param_2 := obj.Search(word); + * param_3 := obj.StartsWith(prefix); + */ + +// Trie 是便于 word 插入与查找的数据结构 +type Trie struct { + dict map[string]bool + dictPrefix map[string]bool +} + +// Constructor initialize your data structure here. +func Constructor() Trie { + d := make(map[string]bool, 1024) + p := make(map[string]bool, 4096) + p[""] = true + return Trie{dict: d, dictPrefix: p} +} + +// Insert a word into the trie. +func (t *Trie) Insert(word string) { + t.dict[word] = true + for i := 1; i < len(word); i++ { + t.dictPrefix[word[:i]] = true + } +} + +// Search returns true if the word is in the trie. +func (t *Trie) Search(word string) bool { + return t.dict[word] +} + +// StartsWith returns true if there is any word in the trie that starts with the given prefix. +func (t *Trie) StartsWith(prefix string) bool { + // dict 比较小,先检查 + return t.dict[prefix] || t.dictPrefix[prefix] +} diff --git a/Algorithms/0208.implement-trie-prefix-tree/implement-trie-prefix-tree_test.go b/Algorithms/0208.implement-trie-prefix-tree/implement-trie-prefix-tree_test.go new file mode 100755 index 000000000..63010ecd1 --- /dev/null +++ b/Algorithms/0208.implement-trie-prefix-tree/implement-trie-prefix-tree_test.go @@ -0,0 +1,28 @@ +package Problem0208 + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_Constructor(t *testing.T) { + ast := assert.New(t) + + trie := Constructor() + + trie.Insert("abc") + // ["abc"] + + ast.True(trie.Search("abc"), "Search abc in [abc]") + // ["abc"] + + ast.False(trie.Search("abcd"), "Search abcd in [abc]") + // ["abc"] + + ast.True(trie.StartsWith("abc"), "Search startWith abc in [abc]") + // ["abc"] + + ast.False(trie.StartsWith("bc"), "Search startWith bc in [abc]") + // ["abc"] +} diff --git a/Algorithms/0210.course-schedule-ii/README.md b/Algorithms/0210.course-schedule-ii/README.md new file mode 100755 index 000000000..f0278e97e --- /dev/null +++ b/Algorithms/0210.course-schedule-ii/README.md @@ -0,0 +1,36 @@ +# [210. Course Schedule II](https://leetcode.com/problems/course-schedule-ii/) + +## 题目 +There are a total of n courses you have to take, labeled from 0 to n - 1. + +Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is expressed as a pair: [0,1] + + +Given the total number of courses and a list of prerequisite pairs, return the ordering of courses you should take to finish all courses. + +There may be multiple correct orders, you just need to return one of them. If it is impossible to finish all courses, return an empty array. + + +For example: +``` +2, [[1,0]] +There are a total of 2 courses to take. To take course 1 you should have finished course 0. So the correct course order is [0,1] + +4, [[1,0],[2,0],[3,1],[3,2]] +There are a total of 4 courses to take. To take course 3 you should have finished both courses 1 and 2. Both courses 1 and 2 should be taken after you finished course 0. So one correct course order is [0,1,2,3]. Another correct ordering is[0,2,1,3]. +``` + +Note: +1. The input prerequisites is a graph represented by a list of edges, not adjacency matrices. Read more about how a graph is represented. +1. You may assume that there are no duplicate edges in the input prerequisites. + +click to show more hints. + +Hints: +1. This problem is equivalent to finding the topological order in a directed graph. If a cycle exists, no topological ordering exists and therefore it will be impossible to take all courses. +1. Topological Sort via DFS - A great video tutorial (21 minutes) on Coursera explaining the basic concepts of Topological Sort. +1. Topological sort could also be done via BFS. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0210.course-schedule-ii/course-schedule-ii.go b/Algorithms/0210.course-schedule-ii/course-schedule-ii.go new file mode 100755 index 000000000..a128cdd9b --- /dev/null +++ b/Algorithms/0210.course-schedule-ii/course-schedule-ii.go @@ -0,0 +1,55 @@ +package Problem0210 + +func findOrder(numCourses int, prerequisites [][]int) []int { + n, p := build(numCourses, prerequisites) + return search(n, p) +} + +func build(num int, requires [][]int) (next [][]int, pre []int) { + // next[i][j] : i -> next[i]... ,i 是 next[i] 的先修课 + next = make([][]int, num) + // pres[i] : i 的先修课程的**个数** + pre = make([]int, num) + + for _, r := range requires { + next[r[1]] = append(next[r[1]], r[0]) + pre[r[0]]++ + } + + return +} + +func search(next [][]int, pre []int) []int { + n := len(pre) + res := make([]int, n) + var i, j int + // 第 i 个完成的课程的代号是 j + for i = 0; i < n; i++ { + // 完成首先遇到的,先修课程为 0 的课程 + for j = 0; j < n; j++ { + if pre[j] == 0 { + break + } + } + // 每个课程都需要先修课 + // 出现了环路 + if j == n { + return nil + } + + // 修改 pres[j] 为负数 + // 避免重修 + pre[j] = -1 + + // 完成 j 课程后 + // j 的后续课程的,先修课程数量都可以 -1 + for _, c := range next[j] { + pre[c]-- + } + + // 把课程代号放入答案 + res[i] = j + } + + return res +} diff --git a/Algorithms/0210.course-schedule-ii/course-schedule-ii_test.go b/Algorithms/0210.course-schedule-ii/course-schedule-ii_test.go new file mode 100755 index 000000000..62cb5bc32 --- /dev/null +++ b/Algorithms/0210.course-schedule-ii/course-schedule-ii_test.go @@ -0,0 +1,86 @@ +package Problem0210 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + numCourses int + prerequisites [][]int + ans []int +}{ + + { + 4, + [][]int{ + []int{1, 0}, + []int{2, 1}, + []int{2, 0}, + []int{3, 0}, + []int{3, 1}, + []int{3, 2}, + }, + []int{0, 1, 2, 3}, + }, + + { + 4, + [][]int{ + []int{1, 0}, + []int{2, 1}, + []int{2, 0}, + []int{3, 0}, + []int{3, 1}, + []int{3, 2}, + []int{2, 3}, + }, + nil, + }, + + { + 2, + [][]int{ + []int{0, 1}, + }, + []int{1, 0}, + }, + + { + 2, + [][]int{ + []int{1, 0}, + }, + []int{0, 1}, + }, + + { + 2, + [][]int{ + []int{1, 0}, + []int{0, 1}, + }, + nil, + }, + // 可以有多个 testcase +} + +func Test_findOrder(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findOrder(tc.numCourses, tc.prerequisites), "输入:%v", tc) + } +} + +func Benchmark_findOrder(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findOrder(tc.numCourses, tc.prerequisites) + } + } +} diff --git a/Algorithms/0211.add-and-search-word-data-structure-design/README.md b/Algorithms/0211.add-and-search-word-data-structure-design/README.md new file mode 100755 index 000000000..f3c004969 --- /dev/null +++ b/Algorithms/0211.add-and-search-word-data-structure-design/README.md @@ -0,0 +1,31 @@ +# [211. Add and Search Word - Data structure design](https://leetcode.com/problems/add-and-search-word-data-structure-design/) + +## 题目 +Design a data structure that supports the following two operations: +``` +void addWord(word) +bool search(word) +``` +search(word) can search a literal word or a regular expression string containing only letters `a-z` or `.`. A `.` means it can represent any one letter. + +For example: +``` +addWord("bad") +addWord("dad") +addWord("mad") +search("pad") -> false +search("bad") -> true +search(".ad") -> true +search("b..") -> true +``` + +Note: +You may assume that all words are consist of lowercase letters a-z. + +click to show hint. + +You should be familiar with how a Trie works. If not, please work on this problem: Implement Trie (Prefix Tree) first. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0211.add-and-search-word-data-structure-design/add-and-search-word-data-structure-design.go b/Algorithms/0211.add-and-search-word-data-structure-design/add-and-search-word-data-structure-design.go new file mode 100755 index 000000000..20eb12309 --- /dev/null +++ b/Algorithms/0211.add-and-search-word-data-structure-design/add-and-search-word-data-structure-design.go @@ -0,0 +1,52 @@ +package Problem0211 + +// WordDictionary 是字典 +type WordDictionary struct { + dict []string +} + +// Constructor 构建 WordDictionary +// Initialize your data structure here. +func Constructor() WordDictionary { + return WordDictionary{} +} + +// AddWord 往 WordDictionary 中添加 word +// Adds a word into the data structure. +func (d *WordDictionary) AddWord(word string) { + d.dict = append(d.dict, word) +} + +// Search 返回 true 如果 WordDictionary 中包含有 word +// Returns if the word is in the data structure. +// A word could contain the dot character '.' to represent any one letter. +func (d *WordDictionary) Search(word string) bool { + size := len(word) + i := 0 + for _, w := range d.dict { + // w 和 word 的长度要一致 + if len(w) != size { + continue + } + + i = 0 + for ; i < size; i++ { + if word[i] != '.' && word[i] != w[i] { + break + } + } + // 匹配完成 + if i == size { + return true + } + } + + return false +} + +/** + * Your WordDictionary object will be instantiated and called as such: + * obj := Constructor(); + * obj.AddWord(word); + * param_2 := obj.Search(word); + */ diff --git a/Algorithms/0211.add-and-search-word-data-structure-design/add-and-search-word-data-structure-design_test.go b/Algorithms/0211.add-and-search-word-data-structure-design/add-and-search-word-data-structure-design_test.go new file mode 100755 index 000000000..7f5d36f50 --- /dev/null +++ b/Algorithms/0211.add-and-search-word-data-structure-design/add-and-search-word-data-structure-design_test.go @@ -0,0 +1,27 @@ +package Problem0211 + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_Constructor(t *testing.T) { + ast := assert.New(t) + + d := Constructor() + d.AddWord("bad") + // [bad] + d.AddWord("dad") + // [bad, dad] + d.AddWord("ma") + // [bad, dad, ma] + + ast.False(d.Search("pad"), "search pad from [bad, dad, ma]") + + ast.True(d.Search("bad"), "search bad from [bad, dad, ma]") + + ast.True(d.Search(".ad"), "search .ad from [bad, dad, ma]") + + ast.True(d.Search("b.."), "search b.. from [bad, dad, ma]") +} diff --git a/Algorithms/0212.word-search-ii/README.md b/Algorithms/0212.word-search-ii/README.md new file mode 100755 index 000000000..a006dde73 --- /dev/null +++ b/Algorithms/0212.word-search-ii/README.md @@ -0,0 +1,32 @@ +# [212. Word Search II](https://leetcode.com/problems/word-search-ii/) + +## 题目 +Given a 2D board and a list of words from the dictionary, find all words in the board. + +Each word must be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizontally or vertically neighboring. The same letter cell may not be used more than once in a word. + +For example, +Given words = `["oath","pea","eat","rain"]` and board = +``` +[ + ['o','a','a','n'], + ['e','t','a','e'], + ['i','h','k','r'], + ['i','f','l','v'] +] +``` + +Return `["eat","oath"]`. + +Note: +You may assume that all inputs are consist of lowercase letters a-z. + +click to show hint. + +You would need to optimize your backtracking to pass the larger test. Could you stop backtracking earlier? + +If the current candidate does not exist in all words' prefix, you could stop backtracking immediately. What kind of data structure could answer such query efficiently? Does a hash table work? Why or why not? How about a Trie? If you would like to learn how to implement a basic trie, please work on this problem: Implement Trie (Prefix Tree) first. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0212.word-search-ii/word-search-ii.go b/Algorithms/0212.word-search-ii/word-search-ii.go new file mode 100755 index 000000000..dcd838c59 --- /dev/null +++ b/Algorithms/0212.word-search-ii/word-search-ii.go @@ -0,0 +1,81 @@ +package Problem0212 + +func findWords(board [][]byte, words []string) []string { + var results []string + + m := len(board) + if m == 0 { + return results + } + + n := len(board[0]) + if n == 0 { + return results + } + + trie := buildTrie(words) + + for i := 0; i < m; i++ { + for j := 0; j < n; j++ { + dfs(board, i, j, trie, &results) + } + } + + return results +} + +func dfs(board [][]byte, i int, j int, trie *TrieNode, results *[]string) { + c := board[i][j] + if c == '#' || trie.next[int(c-'a')] == nil { + return + } + + trie = trie.next[int(c-'a')] + if len(trie.word) > 0 { + // Found one + *results = append(*results, trie.word) + trie.word = "" + } + + board[i][j] = '#' + if i > 0 { + dfs(board, i-1, j, trie, results) + } + + if i < len(board)-1 { + dfs(board, i+1, j, trie, results) + } + + if j > 0 { + dfs(board, i, j-1, trie, results) + } + + if j < len(board[0])-1 { + dfs(board, i, j+1, trie, results) + } + + board[i][j] = c +} + +func buildTrie(words []string) *TrieNode { + root := new(TrieNode) + for _, word := range words { + cur := root + for _, c := range word { + cidx := int(c - 'a') + if cur.next[cidx] == nil { + cur.next[cidx] = new(TrieNode) + } + cur = cur.next[cidx] + } + cur.word = word + } + + return root +} + +// TrieNode 是 trie 的节点 +type TrieNode struct { + next [26]*TrieNode + word string +} diff --git a/Algorithms/0212.word-search-ii/word-search-ii_test.go b/Algorithms/0212.word-search-ii/word-search-ii_test.go new file mode 100755 index 000000000..fc760ffce --- /dev/null +++ b/Algorithms/0212.word-search-ii/word-search-ii_test.go @@ -0,0 +1,68 @@ +package Problem0212 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + board [][]byte + words []string + ans []string +}{ + + { + [][]byte{ + []byte("a"), + }, + []string{"a", "a"}, + []string{"a"}, + }, + + { + [][]byte{}, + []string{"a", "a"}, + nil, + }, + + { + [][]byte{ + []byte{}, + }, + []string{"a", "a"}, + nil, + }, + + { + [][]byte{ + []byte("oaan"), + []byte("etae"), + []byte("ihkr"), + []byte("iflv"), + }, + []string{"oath", "pea", "eat", "rain", "eakat"}, + []string{"oath", "eat"}, + }, + + // 可以有多个 testcase +} + +func Test_findWords(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findWords(tc.board, tc.words), "输入:%v", tc) + } +} + +func Benchmark_findWords(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findWords(tc.board, tc.words) + } + } +} diff --git a/Algorithms/0213.house-robber-ii/README.md b/Algorithms/0213.house-robber-ii/README.md new file mode 100755 index 000000000..14674e8d6 --- /dev/null +++ b/Algorithms/0213.house-robber-ii/README.md @@ -0,0 +1,14 @@ +# [213. House Robber II](https://leetcode.com/problems/house-robber-ii/) + +## 题目 +Note: This is an extension of House Robber. + +After robbing those houses on that street, the thief has found himself a new place for his thievery so that he will not get too much attention. This time, all houses at this place are arranged in a circle. That means the first house is the neighbor of the last one. Meanwhile, the security system for these houses remain the same as for those in the previous street. + +Given a list of non-negative integers representing the amount of money of each house, determine the maximum amount of money you can rob tonight without alerting the police. + +Credits:Special thanks to @Freezen for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0213.house-robber-ii/house-robber-ii.go b/Algorithms/0213.house-robber-ii/house-robber-ii.go new file mode 100755 index 000000000..912aba0c9 --- /dev/null +++ b/Algorithms/0213.house-robber-ii/house-robber-ii.go @@ -0,0 +1,35 @@ +package Problem0213 + +func rob(nums []int) int { + size := len(nums) + switch size { + case 0: + return 0 + case 1: + return nums[0] + } + // 把环斩断,就变成了 198 题 + // 斩断的方式分为,在 0 位和不在 0 位 两种。 + return max(robbing(nums[1:]), robbing(nums[:size-1])) +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} +func robbing(nums []int) int { + // a 对于偶数位上的最大值的记录 + // b 对于奇数位上的最大值的记录 + var a, b int + for i, v := range nums { + if i%2 == 0 { + a = max(a+v, b) + } else { + b = max(a, b+v) + } + } + + return max(a, b) +} diff --git a/Algorithms/0213.house-robber-ii/house-robber-ii_test.go b/Algorithms/0213.house-robber-ii/house-robber-ii_test.go new file mode 100755 index 000000000..7d2b66254 --- /dev/null +++ b/Algorithms/0213.house-robber-ii/house-robber-ii_test.go @@ -0,0 +1,69 @@ +package Problem0213 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans int +}{ + + { + []int{226, 174, 214, 16, 218, 48, 153, 131, 128, 17, 157, 142, 88, 43, 37, 157, 43, 221, 191, 68, 206, 23, 225, 82, 54, 118, 111, 46, 80, 49, 245, 63, 25, 194, 72, 80, 143, 55, 209, 18, 55, 122, 65, 66, 177, 101, 63, 201, 172, 130, 103, 225, 142, 46, 86, 185, 62, 138, 212, 192, 125, 77, 223, 188, 99, 228, 90, 25, 193, 211, 84, 239, 119, 234, 85, 83, 123, 120, 131, 203, 219, 10, 82, 35, 120, 180, 249, 106, 37, 169, 225, 54, 103, 55, 166, 124}, + 7102, + }, + + { + []int{100, 1, 1, 100, 1, 1, 100, 1, 1, 100}, + 301, + }, + + { + []int{2, 1, 1, 2}, + 3, + }, + + { + []int{1}, + 1, + }, + + { + []int{}, + 0, + }, + + { + []int{1, 2, 3, 4, 5, 6, 7, 8}, + 20, + }, + + { + []int{1, 2, 3, 4, 5, 6, 7, 8, 9}, + 24, + }, + + // 可以有多个 testcase +} + +func Test_rob(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, rob(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_rob(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + rob(tc.nums) + } + } +} diff --git a/Algorithms/0214.shortest-palindrome/README.md b/Algorithms/0214.shortest-palindrome/README.md new file mode 100755 index 000000000..ef487f516 --- /dev/null +++ b/Algorithms/0214.shortest-palindrome/README.md @@ -0,0 +1,17 @@ +# [214. Shortest Palindrome](https://leetcode.com/problems/shortest-palindrome/) + +## 题目 +Given a string S, you are allowed to convert it to a palindrome by adding characters in front of it. Find and return the shortest palindrome you can find by performing this transformation. + +For example: +``` +Given "aacecaaa", return "aaacecaaa". +Given "abcd", return "dcbabcd". +``` + +Credits:Special thanks to @ifanchu for adding this problem and creating all test cases. Thanks to @Freezen for additional test cases. + +## 解题思路 +[字符串匹配的KMP算法](http://www.ruanyifeng.com/blog/2013/05/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm.html) + +见程序注释 diff --git a/Algorithms/0214.shortest-palindrome/shortest-palindrome.go b/Algorithms/0214.shortest-palindrome/shortest-palindrome.go new file mode 100755 index 000000000..01043297b --- /dev/null +++ b/Algorithms/0214.shortest-palindrome/shortest-palindrome.go @@ -0,0 +1,48 @@ +package Problem0214 + +func shortestPalindrome(s string) string { + if len(s) <= 1 { + return s + } + + i := getIndex(s + "#" + reverse(s)) + + return reverse(s[i:]) + s +} + +func reverse(s string) string { + size := len(s) + bytes := make([]byte, size) + for i := 0; i < size; i++ { + bytes[i] = s[size-1-i] + } + + return string(bytes) +} + +func getIndex(s string) int { + size := len(s) + // table[i] 是 s[:i+1] 的前缀集与后缀集中,最长公共元素的长度 + // "abcd" 的前缀集是 ["", "a", "ab", "abc"] + // "abcd" 的后缀集是 ["", "d", "cd", "bcd"] + // "abcd" 的前缀集与后缀集的最长公共元素是"", 它的长度是 0 + table := make([]int, size) + klen, i := 0, 1 + + for i < size { + if s[i] == s[klen] { + klen++ + table[i] = klen + i++ + } else { + if klen == 0 { + table[i] = 0 + i++ + } else { + klen = table[klen-1] + } + } + } + + return table[len(s)-1] +} diff --git a/Algorithms/0214.shortest-palindrome/shortest-palindrome_test.go b/Algorithms/0214.shortest-palindrome/shortest-palindrome_test.go new file mode 100755 index 000000000..583eb5404 --- /dev/null +++ b/Algorithms/0214.shortest-palindrome/shortest-palindrome_test.go @@ -0,0 +1,59 @@ +package Problem0214 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + ans string +}{ + + { + "abaa", + "aabaa", + }, + + { + "a", + "a", + }, + + { + "abcba", + "abcba", + }, + + { + "aacecaaa", + "aaacecaaa", + }, + + { + "abcd", + "dcbabcd", + }, + + // 可以有多个 testcase +} + +func Test_shortestPalindrome(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, shortestPalindrome(tc.s), "输入:%v", tc) + } +} + +func Benchmark_shortestPalindrome(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + shortestPalindrome(tc.s) + } + } +} diff --git a/Algorithms/0215.kth-largest-element-in-an-array/README.md b/Algorithms/0215.kth-largest-element-in-an-array/README.md new file mode 100755 index 000000000..c035530e0 --- /dev/null +++ b/Algorithms/0215.kth-largest-element-in-an-array/README.md @@ -0,0 +1,18 @@ +# [215. Kth Largest Element in an Array](https://leetcode.com/problems/kth-largest-element-in-an-array/) + +## 题目 +Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element. + +For example, +Given [3,2,1,5,6,4] and k = 2, return 5. + +Note: +You may assume k is always valid, 1 ≤ k ≤ array's length. + +Credits:Special thanks to @mithmatt for adding this problem and creating all test cases. + +## 解题思路 + +利用堆排序的特性,依次找出最大值。 + +见程序注释 diff --git a/Algorithms/0215.kth-largest-element-in-an-array/kth-largest-element-in-an-array.go b/Algorithms/0215.kth-largest-element-in-an-array/kth-largest-element-in-an-array.go new file mode 100755 index 000000000..87ccb51a2 --- /dev/null +++ b/Algorithms/0215.kth-largest-element-in-an-array/kth-largest-element-in-an-array.go @@ -0,0 +1,46 @@ +package Problem0215 + +import "container/heap" + +func findKthLargest(nums []int, k int) int { + temp := highHeap(nums) + h := &temp + heap.Init(h) + + if k == 1 { + return (*h)[0] + } + + for i := 1; i < k; i++ { + heap.Remove(h, 0) + } + + return (*h)[0] +} + +// highHeap 实现了 heap 的接口 +type highHeap []int + +func (h highHeap) Len() int { + return len(h) +} +func (h highHeap) Less(i, j int) bool { + // h[i] > h[j] 使得 h[0] == max(h...) + return h[i] > h[j] +} +func (h highHeap) Swap(i, j int) { + h[i], h[j] = h[j], h[i] +} +func (h *highHeap) Push(x interface{}) { + // Push 使用 *h,是因为 + // Push 增加了 h 的长度 + *h = append(*h, x.(int)) +} + +func (h *highHeap) Pop() interface{} { + // Pop 使用 *h ,是因为 + // Pop 减短了 h 的长度 + res := (*h)[len(*h)-1] + *h = (*h)[0 : len(*h)-1] + return res +} diff --git a/Algorithms/0215.kth-largest-element-in-an-array/kth-largest-element-in-an-array_test.go b/Algorithms/0215.kth-largest-element-in-an-array/kth-largest-element-in-an-array_test.go new file mode 100755 index 000000000..c3c97e5a0 --- /dev/null +++ b/Algorithms/0215.kth-largest-element-in-an-array/kth-largest-element-in-an-array_test.go @@ -0,0 +1,56 @@ +package Problem0215 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + k int + ans int +}{ + + { + []int{3, 3, 3, 3, 3, 3, 3, 3, 3}, + 1, + 3, + }, + + { + []int{3, 2, 1, 5, 6, 4}, + 2, + 5, + }, + + // 可以有多个 testcase +} + +func Test_findKthLargest(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findKthLargest(tc.nums, tc.k), "输入:%v", tc) + } +} +func Test_heap(t *testing.T) { + ast := assert.New(t) + + h := new(highHeap) + + i := 5 + h.Push(i) + ast.Equal(i, h.Pop(), "Pop() after Push(%d)", i) + +} +func Benchmark_findKthLargest(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findKthLargest(tc.nums, tc.k) + } + } +} diff --git a/Algorithms/0218.the-skyline-problem/README.md b/Algorithms/0218.the-skyline-problem/README.md new file mode 100755 index 000000000..5605df309 --- /dev/null +++ b/Algorithms/0218.the-skyline-problem/README.md @@ -0,0 +1,24 @@ +# [218. The Skyline Problem](https://leetcode.com/problems/the-skyline-problem/) + +## 题目 +A city's skyline is the outer contour of the silhouette formed by all the buildings in that city when viewed from a distance. Now suppose you are given the locations and height of all the buildings as shown on a cityscape photo (Figure A), write a program to output the skyline formed by these buildings collectively (Figure B). + +![a](a.jpg)![b](b.jpg) + +The geometric information of each building is represented by a triplet of integers [Li, Ri, Hi], where Li and Ri are the x coordinates of the left and right edge of the ith building, respectively, and Hi is its height. It is guaranteed that 0 ≤ Li, Ri ≤ INT_MAX, 0 < Hi ≤ INT_MAX, and Ri - Li > 0. You may assume all buildings are perfect rectangles grounded on an absolutely flat surface at height 0. + +For instance, the dimensions of all buildings in Figure A are recorded as: [ [2 9 10], [3 7 15], [5 12 12], [15 20 10], [19 24 8] ] . + +The output is a list of "key points" (red dots in Figure B) in the format of [ [x1,y1], [x2, y2], [x3, y3], ... ] that uniquely defines a skyline. A key point is the left endpoint of a horizontal line segment. Note that the last key point, where the rightmost building ends, is merely used to mark the termination of the skyline, and always has zero height. Also, the ground in between any two adjacent buildings should be considered part of the skyline contour. + +For instance, the skyline in Figure B should be represented as:[ [2 10], [3 15], [7 12], [12 0], [15 10], [20 8], [24, 0] ]. + +Notes: +- The number of buildings in any input list is guaranteed to be in the range [0, 10000]. +- The input list is already sorted in ascending order by the left x position Li. +- The output list must be sorted by the x position. +- There must be no consecutive horizontal lines of equal height in the output skyline. For instance, [...[2 3], [4 5], [7 5], [11 5], [12 7]...] is not acceptable; the three lines of height 5 should be merged into one in the final output as such: [...[2 3], [4 5], [12 7], ...] + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0218.the-skyline-problem/a.jpg b/Algorithms/0218.the-skyline-problem/a.jpg new file mode 100644 index 000000000..21a63ab00 Binary files /dev/null and b/Algorithms/0218.the-skyline-problem/a.jpg differ diff --git a/Algorithms/0218.the-skyline-problem/b.jpg b/Algorithms/0218.the-skyline-problem/b.jpg new file mode 100644 index 000000000..54effe777 Binary files /dev/null and b/Algorithms/0218.the-skyline-problem/b.jpg differ diff --git a/Algorithms/0218.the-skyline-problem/the-skyline-problem.go b/Algorithms/0218.the-skyline-problem/the-skyline-problem.go new file mode 100755 index 000000000..34256a546 --- /dev/null +++ b/Algorithms/0218.the-skyline-problem/the-skyline-problem.go @@ -0,0 +1,105 @@ +package Problem0218 + +import ( + "container/heap" + "sort" +) + +func getSkyline(buildings [][]int) [][]int { + points := [][]int{} + + highs := new(highHeap) + heap.Init(highs) + // pre 是 天际线 最左边的高度 + pre := 0 + heap.Push(highs, pre) + + edges := make([][3]int, 0, 2*len(buildings)) + for _, b := range buildings { + // e[2] == -1 为 进入边 + edges = append(edges, [3]int{b[0], b[2], -1}) + // e[2] == 1 为 退出边 + edges = append(edges, [3]int{b[1], b[2], 1}) + } + sort.Sort(edgeSlice(edges)) + + // 从左往右,依次扫描 edges + for _, e := range edges { + if e[2] < 0 { + // 遇到 进入边 + // 添加 e[1] 到 high + heap.Push(highs, e[1]) + } else { + // 遇到 退出边 + i := 0 + for i < len(*highs) { + if (*highs)[i] == e[1] { + break + } + i++ + } + // 从 high 中删除 e[1] + heap.Remove(highs, i) + } + // now 是当前的 high 中的最大值 + now := (*highs)[0] + if pre != now { + // 天际线的高度发生变化 + // 需要添加 key point + points = append(points, []int{e[0], now}) + pre = now + } + } + + // 结题的关键是监控 最高线 的变化 + // 出现新的最高线时,就可以添加关键点了 + return points +} + +// highHeap 实现了 heap 的接口 +type highHeap []int + +func (h highHeap) Len() int { + return len(h) +} +func (h highHeap) Less(i, j int) bool { + // h[i] > h[j] 使得 h[0] == max(h...) + return h[i] > h[j] +} +func (h highHeap) Swap(i, j int) { + h[i], h[j] = h[j], h[i] +} +func (h *highHeap) Push(x interface{}) { + // Push 使用 *h,是因为 + // Push 增加了 h 的长度 + *h = append(*h, x.(int)) +} +func (h *highHeap) Pop() interface{} { + // Pop 使用 *h ,是因为 + // Pop 减短了 h 的长度 + res := (*h)[len(*h)-1] + *h = (*h)[0 : len(*h)-1] + return res +} + +type edgeSlice [][3]int + +func (es edgeSlice) Len() int { + return len(es) +} +func (es edgeSlice) Less(i, j int) bool { + if es[i][0] != es[j][0] { + return es[i][0] < es[j][0] + } + // 当 es[i][0] == es[j][0] 的时候 + // i,j 分别为 进入边 与 退出边 + // 则,进入边应在前 + // i,j 同为 进入边 + // 则,e[1] 高的在前 + // i,j 同为 退出边 + // 则,e[1] 低的在前 + return es[i][1]*es[i][2] < es[j][1]*es[j][2] +} +func (es edgeSlice) Swap(i, j int) { + es[i], es[j] = es[j], es[i] +} diff --git a/Algorithms/0218.the-skyline-problem/the-skyline-problem_test.go b/Algorithms/0218.the-skyline-problem/the-skyline-problem_test.go new file mode 100755 index 000000000..a655b787d --- /dev/null +++ b/Algorithms/0218.the-skyline-problem/the-skyline-problem_test.go @@ -0,0 +1,92 @@ +package Problem0218 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + buildings [][]int + ans [][]int +}{ + + { + [][]int{ + []int{2, 9, 10}, + []int{3, 7, 15}, + []int{5, 12, 12}, + []int{15, 20, 10}, + []int{19, 24, 8}, + }, + [][]int{ + []int{2, 10}, + []int{3, 15}, + []int{7, 12}, + []int{12, 0}, + []int{15, 10}, + []int{20, 8}, + []int{24, 0}, + }, + }, + + { + [][]int{ + []int{1, 6, 1}, + []int{2, 3, 2}, + []int{4, 5, 2}, + }, + [][]int{ + []int{1, 1}, + []int{2, 2}, + []int{3, 1}, + []int{4, 2}, + []int{5, 1}, + []int{6, 0}, + }, + }, + + { + [][]int{ + []int{1, 2, 1}, + []int{2, 3, 2}, + }, + [][]int{ + []int{1, 1}, + []int{2, 2}, + []int{3, 0}, + }, + }, + + { + [][]int{ + []int{1, 2, 1}, + []int{1, 2, 2}, + []int{1, 2, 3}, + }, + [][]int{ + []int{1, 3}, + []int{2, 0}, + }, + }, + // 可以有多个 testcase +} + +func Test_getSkyline(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, getSkyline(tc.buildings), "输入:%v", tc) + } +} + +func Benchmark_getSkyline(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + getSkyline(tc.buildings) + } + } +} diff --git a/Algorithms/0220.contains-duplicate-iii/README.md b/Algorithms/0220.contains-duplicate-iii/README.md new file mode 100755 index 000000000..f4e10e6c9 --- /dev/null +++ b/Algorithms/0220.contains-duplicate-iii/README.md @@ -0,0 +1,10 @@ +# [220. Contains Duplicate III](https://leetcode.com/problems/contains-duplicate-iii/) + +## 题目 +Given an array of integers, find out whether there are two distinct indices i and j in the array such that the absolute difference between nums[i] and nums[j] is at most t and the absolute difference between i and j is at most k. + +## 解题思路 +``` +存在 | i - j | <= k 使得 | nums[i] - nums[j] | <= t +``` +见程序注释 diff --git a/Algorithms/0220.contains-duplicate-iii/contains-duplicate-iii.go b/Algorithms/0220.contains-duplicate-iii/contains-duplicate-iii.go new file mode 100755 index 000000000..b9d1cd528 --- /dev/null +++ b/Algorithms/0220.contains-duplicate-iii/contains-duplicate-iii.go @@ -0,0 +1,86 @@ +package Problem0220 + +func containsNearbyAlmostDuplicate(nums []int, k, t int) bool { + size := len(nums) + if k == 0 || t < 0 || size <= 1 { + return false + } + // t 可以为 0 + // t 需要当除数 + // t++ 后,避免了除0错误。 + // 但 <=t 变成了 4==t + // 答案是不会 + // 因为程序在遇到 6 之前,就已经因为 3/4 == 0/4 返回 true 了 + nMap[m] = ni + if i >= k { + // 删除需不需要检查的点 + delete(nMap, nums[i-k]/t) + } + } + + return false +} + +func abs(a, b int) int { + if a > b { + return a - b + } + return b - a +} diff --git a/Algorithms/0220.contains-duplicate-iii/contains-duplicate-iii_test.go b/Algorithms/0220.contains-duplicate-iii/contains-duplicate-iii_test.go new file mode 100755 index 000000000..9b37312fc --- /dev/null +++ b/Algorithms/0220.contains-duplicate-iii/contains-duplicate-iii_test.go @@ -0,0 +1,106 @@ +package Problem0220 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + k int + t int + ans bool +}{ + + { + []int{-1, 3}, + 1, + 3, + false, + }, + + { + []int{3, 0, 6}, + 2, + 3, + true, + }, + + { + []int{2, 1}, + 1, + 1, + true, + }, + + { + []int{7, 2, 8}, + 2, + 1, + true, + }, + + { + []int{7, 1, 3}, + 2, + 3, + true, + }, + + { + []int{2, 2}, + 3, + 0, + true, + }, + + { + []int{2}, + 3, + 0, + false, + }, + + { + []int{2, 4, 3, 8}, + 2, + 1, + true, + }, + + { + []int{-2, 4, -3, 8}, + 2, + 1, + true, + }, + + { + []int{6, 4, 2, 8}, + 1, + 1, + false, + }, + + // 可以有多个 testcase +} + +func Test_containsNearbyAlmostDuplicate(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, containsNearbyAlmostDuplicate(tc.nums, tc.k, tc.t), "输入:%v", tc) + } +} + +func Benchmark_containsNearbyAlmostDuplicate(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + containsNearbyAlmostDuplicate(tc.nums, tc.k, tc.t) + } + } +} diff --git a/Algorithms/0221.maximal-square/README.md b/Algorithms/0221.maximal-square/README.md new file mode 100755 index 000000000..e07d41b3b --- /dev/null +++ b/Algorithms/0221.maximal-square/README.md @@ -0,0 +1,21 @@ +# [221. Maximal Square](https://leetcode.com/problems/maximal-square/) + +## 题目 +Given a 2D binary matrix filled with 0's and 1's, find the largest square containing only 1's and return its area. + + +For example, given the following matrix: +``` +1 0 1 0 0 +1 0 1 1 1 +1 1 1 1 1 +1 0 0 1 0 +``` +Return 4. + + +Credits:Special thanks to @Freezen for adding this problem and creating all test cases. + +## 解题思路 + +[[解题报告] LeetCode 221. Maximal Square](http://zxi.mytechroad.com/blog/dynamic-programming/leetcode-221-maximal-square/) diff --git a/Algorithms/0221.maximal-square/maximal-square.go b/Algorithms/0221.maximal-square/maximal-square.go new file mode 100755 index 000000000..d937de74d --- /dev/null +++ b/Algorithms/0221.maximal-square/maximal-square.go @@ -0,0 +1,62 @@ +package Problem0221 + +func maximalSquare(matrix [][]byte) int { + m := len(matrix) + if m == 0 { + return 0 + } + n := len(matrix[0]) + if n == 0 { + return 0 + } + + maxEdge := 0 + // dp[i][j] == 以 (i,j) 点为右下角点的符合题意的最大正方形的边长 + // TODO: 由于 dp[i][j] 只与上,左上,左的数据有关,可以把 dp 压缩成一维的 + dp := make([][]int, m) + for i := range dp { + dp[i] = make([]int, n) + if matrix[i][0] == '1' { + dp[i][0] = 1 + maxEdge = 1 + } + } + for j := 1; j < n; j++ { + if matrix[0][j] == '1' { + dp[0][j] = 1 + maxEdge = 1 + } + } + + for i := 1; i < m; i++ { + for j := 1; j < n; j++ { + if matrix[i][j] == '1' { + dp[i][j] = 1 + + min( + dp[i-1][j-1], + min( + dp[i-1][j], + dp[i][j-1], + ), + ) + maxEdge = max(maxEdge, dp[i][j]) + } + } + } + + return maxEdge * maxEdge +} + +func min(a int, b int) int { + if a < b { + return a + } + return b +} + +func max(a int, b int) int { + if a > b { + return a + } + return b +} diff --git a/Algorithms/0221.maximal-square/maximal-square_test.go b/Algorithms/0221.maximal-square/maximal-square_test.go new file mode 100755 index 000000000..6ff9a6036 --- /dev/null +++ b/Algorithms/0221.maximal-square/maximal-square_test.go @@ -0,0 +1,100 @@ +package Problem0221 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + matrix [][]byte + ans int +}{ + + { + [][]byte{ + []byte("01"), + }, + 1, + }, + + { + [][]byte{ + []byte("1"), + }, + 1, + }, + + { + [][]byte{ + []byte("11111111"), + []byte("11111110"), + []byte("11111110"), + []byte("11111000"), + []byte("01111000"), + }, + 16, + }, + { + [][]byte{ + []byte("0001"), + []byte("1101"), + []byte("1111"), + []byte("0111"), + []byte("0111"), + }, + 9, + }, + + { + [][]byte{}, + 0, + }, + + { + [][]byte{ + []byte(""), + }, + 0, + }, + + { + [][]byte{ + []byte("11111"), + []byte("11111"), + []byte("11111"), + }, + 9, + }, + + { + [][]byte{ + []byte("10100"), + []byte("10111"), + []byte("11111"), + []byte("10010"), + }, + 4, + }, + + // 可以有多个 testcase +} + +func Test_maximalSquare(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, maximalSquare(tc.matrix), "输入:%v", tc) + } +} + +func Benchmark_maximalSquare(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + maximalSquare(tc.matrix) + } + } +} diff --git a/Algorithms/0223.rectangle-area/223.png b/Algorithms/0223.rectangle-area/223.png new file mode 100644 index 000000000..2fbf05b40 Binary files /dev/null and b/Algorithms/0223.rectangle-area/223.png differ diff --git a/Algorithms/0223.rectangle-area/README.md b/Algorithms/0223.rectangle-area/README.md new file mode 100755 index 000000000..77d982b7d --- /dev/null +++ b/Algorithms/0223.rectangle-area/README.md @@ -0,0 +1,15 @@ +# [223. Rectangle Area](https://leetcode.com/problems/rectangle-area/) + +## 题目 +Find the total area covered by two rectilinear rectangles in a 2D plane. +Each rectangle is defined by its bottom left corner and top right corner as shown in the figure. + +![223](223.png) + +Assume that the total area is never beyond the maximum possible value of int. + +Credits:Special thanks to @mithmatt for adding this problem, creating the above image and all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0223.rectangle-area/rectangle-area.go b/Algorithms/0223.rectangle-area/rectangle-area.go new file mode 100755 index 000000000..e61a50fd5 --- /dev/null +++ b/Algorithms/0223.rectangle-area/rectangle-area.go @@ -0,0 +1,29 @@ +package Problem0223 + +func computeArea(A int, B int, C int, D int, E int, F int, G int, H int) int { + return area(A, B, C, D) + area(E, F, G, H) - area(max(A, E), max(B, F), min(C, G), min(D, H)) +} + +func area(A, B, C, D int) int { + return edge(A, C) * edge(B, D) +} + +func edge(A, C int) int { + // 边长应该大于 0 + // 这样做就统一了两个正方形相交或者不相交的情况 + return max(0, C-A) +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} + +func min(a, b int) int { + if a < b { + return a + } + return b +} diff --git a/Algorithms/0223.rectangle-area/rectangle-area_test.go b/Algorithms/0223.rectangle-area/rectangle-area_test.go new file mode 100755 index 000000000..def875248 --- /dev/null +++ b/Algorithms/0223.rectangle-area/rectangle-area_test.go @@ -0,0 +1,65 @@ +package Problem0223 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + A int + B int + C int + D int + E int + F int + G int + H int + ans int +}{ + + { + -2, + -2, + 2, + 2, + -2, + -2, + 2, + 2, + 16, + }, + + { + -3, + 0, + 3, + 4, + 0, + -1, + 9, + 2, + 45, + }, + + // 可以有多个 testcase +} + +func Test_computeArea(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, computeArea(tc.A, tc.B, tc.C, tc.D, tc.E, tc.F, tc.G, tc.H), "输入:%v", tc) + } +} + +func Benchmark_computeArea(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + computeArea(tc.A, tc.B, tc.C, tc.D, tc.E, tc.F, tc.G, tc.H) + } + } +} diff --git a/Algorithms/0224.basic-calculator/README.md b/Algorithms/0224.basic-calculator/README.md new file mode 100755 index 000000000..b26e4ea5c --- /dev/null +++ b/Algorithms/0224.basic-calculator/README.md @@ -0,0 +1,21 @@ +# [224. Basic Calculator](https://leetcode.com/problems/basic-calculator/) + +## 题目 +Implement a basic calculator to evaluate a simple expression string. + +The expression string may contain open ( and closing parentheses ), the plus + or minus sign -, non-negative integers and empty spaces . + +You may assume that the given expression is always valid. + +Some examples: +``` +"1 + 1" = 2 +" 2-1 + 2 " = 3 +"(1+(4+5+2)-3)+(6+8)" = 23 +``` + +Note: Do not use the eval built-in library function. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0224.basic-calculator/basic-calculator.go b/Algorithms/0224.basic-calculator/basic-calculator.go new file mode 100755 index 000000000..79206adca --- /dev/null +++ b/Algorithms/0224.basic-calculator/basic-calculator.go @@ -0,0 +1,48 @@ +package Problem0224 + +func calculate(s string) int { + res := 0 + stack := make([]int, 0, len(s)) + sign := 1 + num := 0 + + for i := 0; i < len(s); i++ { + switch s[i] { + case '1', '2', '3', '4', '5', '6', '7', '8', '9', '0': + // 提取 s 中的数字 + num = 0 + for ; i < len(s) && s[i] >= '0' && s[i] <= '9'; i++ { + num = 10*num + int(s[i]-'0') + } + // 根据前面的记录,进行运算 + res += sign * num + // 此时 s[i] 已经不是数字了 + // for 语句中,会再+1,所以这里先 -1 + i-- + case '+': + // 记录运算符 + sign = 1 + case '-': + // 记录运算符 + sign = -1 + case '(': + // 遇到 '(' 就把当前的 res 和 sign 入栈,保存好当前的运行环境 + stack = append(stack, res, sign) + // 对 res 和 sign 赋予新的值 + res = 0 + sign = 1 + case ')': + // 遇到 ')' 出栈 + // sign 是与这个 ')' 匹配的 '(' 前的运算符号 + sign = stack[len(stack)-1] + // temp 是 sign 前的运算结果 + temp := stack[len(stack)-2] + stack = stack[:len(stack)-2] + // '(' 与 ')' 之间的运算结果 + // ↓ + res = sign*res + temp + } + } + + return res +} diff --git a/Algorithms/0224.basic-calculator/basic-calculator_test.go b/Algorithms/0224.basic-calculator/basic-calculator_test.go new file mode 100755 index 000000000..f0cab68e8 --- /dev/null +++ b/Algorithms/0224.basic-calculator/basic-calculator_test.go @@ -0,0 +1,59 @@ +package Problem0224 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + ans int +}{ + + { + "42-(18+16)", + 8, + }, + + { + "1 + 1", + 2, + }, + + { + " 2-1 + 2 ", + 3, + }, + + { + "(1+(4+5+2)-3)+(6+8)", + 23, + }, + + { + "2147483647", + 2147483647, + }, + + // 可以有多个 testcase +} + +func Test_calculate(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, calculate(tc.s), "输入:%v", tc) + } +} + +func Benchmark_calculate(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + calculate(tc.s) + } + } +} diff --git a/Algorithms/0225.implement-stack-using-queues/README.md b/Algorithms/0225.implement-stack-using-queues/README.md new file mode 100755 index 000000000..cc07f03fa --- /dev/null +++ b/Algorithms/0225.implement-stack-using-queues/README.md @@ -0,0 +1,22 @@ +# [225. Implement Stack using Queues](https://leetcode.com/problems/implement-stack-using-queues/) + +## 题目 + +Implement the following operations of a stack using queues. + +- push(x) -- Push element x onto stack. +- pop() -- Removes the element on top of the stack. +- top() -- Get the top element. +- empty() -- Return whether the stack is empty. + +Notes: + +1. You must use only standard operations of a queue -- which means only push to back, peek/pop from front, size, and is empty operations are valid. +1. Depending on your language, queue may not be supported natively. You may simulate a queue by using a list or deque (double-ended queue), as long as you use only standard operations of a queue. +1. You may assume that all operations are valid (for example, no pop or top operations will be called on an empty stack). + +Credits:Special thanks to @jianchao.li.fighter for adding this problem and all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0225.implement-stack-using-queues/implement-stack-using-queues.go b/Algorithms/0225.implement-stack-using-queues/implement-stack-using-queues.go new file mode 100755 index 000000000..a41fea9a4 --- /dev/null +++ b/Algorithms/0225.implement-stack-using-queues/implement-stack-using-queues.go @@ -0,0 +1,85 @@ +package Problem0225 + +// MyStack 是用 Queue 实现的 栈 +type MyStack struct { + a, b *Queue +} + +// Constructor Initialize your data structure here. +func Constructor() MyStack { + return MyStack{a: NewQueue(), b: NewQueue()} +} + +// Push Push element x onto stack. +func (ms *MyStack) Push(x int) { + if ms.a.Len() == 0 { + ms.a, ms.b = ms.b, ms.a + } + ms.a.Push(x) +} + +// Pop Removes the element on top of the stack and returns that element. +func (ms *MyStack) Pop() int { + if ms.a.Len() == 0 { + ms.a, ms.b = ms.b, ms.a + } + + for ms.a.Len() > 1 { + ms.b.Push(ms.a.Pop()) + } + + return ms.a.Pop() +} + +// Top Get the top element. +func (ms *MyStack) Top() int { + res := ms.Pop() + ms.Push(res) + return res +} + +// Empty Returns whether the stack is empty. +func (ms *MyStack) Empty() bool { + return (ms.a.Len() + ms.b.Len()) == 0 +} + +/** + * Your MyStack object will be instantiated and called as such: + * obj := Constructor(); + * obj.Push(x); + * param_2 := obj.Pop(); + * param_3 := obj.Top(); + * param_4 := obj.Empty(); + */ + +// Queue 是用于存放 int 的队列 +type Queue struct { + nums []int +} + +// NewQueue 返回 *kit.Queue +func NewQueue() *Queue { + return &Queue{nums: []int{}} +} + +// Push 把 n 放入队列 +func (q *Queue) Push(n int) { + q.nums = append(q.nums, n) +} + +// Pop 从 q 中取出最先进入队列的值 +func (q *Queue) Pop() int { + res := q.nums[0] + q.nums = q.nums[1:] + return res +} + +// Len 返回 q 的长度 +func (q *Queue) Len() int { + return len(q.nums) +} + +// IsEmpty 反馈 q 是否为空 +func (q *Queue) IsEmpty() bool { + return q.Len() == 0 +} diff --git a/Algorithms/0225.implement-stack-using-queues/implement-stack-using-queues_test.go b/Algorithms/0225.implement-stack-using-queues/implement-stack-using-queues_test.go new file mode 100755 index 000000000..58730158d --- /dev/null +++ b/Algorithms/0225.implement-stack-using-queues/implement-stack-using-queues_test.go @@ -0,0 +1,47 @@ +package Problem0225 + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_MyStack(t *testing.T) { + ast := assert.New(t) + + s := Constructor() + ast.True(s.Empty(), "检查新建的 s 是否为空") + + start, end := 0, 10 + + for i := start; i < end; i++ { + s.Push(i) + ast.Equal(i, s.Top(), "查看 s.Top()") + } + + for i := end - 1; i >= start; i-- { + ast.Equal(i, s.Pop(), "从 s 中 pop 出数来。") + } + + ast.True(s.Empty(), "检查 Pop 完毕后的 s 是否为空") +} + +func Test_Queue(t *testing.T) { + ast := assert.New(t) + + q := NewQueue() + ast.True(q.IsEmpty(), "检查新建的 q 是否为空") + + start, end := 0, 100 + + for i := start; i < end; i++ { + q.Push(i) + ast.Equal(i-start+1, q.Len(), "Push 后检查 q 的长度。") + } + + for i := start; i < end; i++ { + ast.Equal(i, q.Pop(), "从 q 中 pop 出数来。") + } + + ast.True(q.IsEmpty(), "检查 Pop 完毕后的 q 是否为空") +} diff --git a/Algorithms/0226.invert-binary-tree/README.md b/Algorithms/0226.invert-binary-tree/README.md new file mode 100755 index 000000000..841e2eaf3 --- /dev/null +++ b/Algorithms/0226.invert-binary-tree/README.md @@ -0,0 +1,27 @@ +# [226. Invert Binary Tree](https://leetcode.com/problems/invert-binary-tree/) + +## 题目 + +Invert a binary tree. + +```text + 4 + / \ + 2 7 + / \ / \ +1 3 6 9 +``` + +to + +```text + 4 + / \ + 7 2 + / \ / \ +9 6 3 1 +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0226.invert-binary-tree/invert-binary-tree.go b/Algorithms/0226.invert-binary-tree/invert-binary-tree.go new file mode 100755 index 000000000..7de9657a4 --- /dev/null +++ b/Algorithms/0226.invert-binary-tree/invert-binary-tree.go @@ -0,0 +1,18 @@ +package Problem0226 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" +) + +type TreeNode = kit.TreeNode + +func invertTree(root *TreeNode) *TreeNode { + if root == nil || + (root.Left == nil && root.Right == nil) { + return root + } + + root.Left, root.Right = invertTree(root.Right), invertTree(root.Left) + + return root +} diff --git a/Algorithms/0226.invert-binary-tree/invert-binary-tree_test.go b/Algorithms/0226.invert-binary-tree/invert-binary-tree_test.go new file mode 100755 index 000000000..d5796d5d8 --- /dev/null +++ b/Algorithms/0226.invert-binary-tree/invert-binary-tree_test.go @@ -0,0 +1,36 @@ +package Problem0226 + +import ( + "fmt" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + pre, in []int + ans []int // inorder +}{ + + { + []int{4, 2, 1, 3, 7, 6, 9}, + []int{1, 2, 3, 4, 6, 7, 9}, + []int{9, 7, 6, 4, 3, 2, 1}, + }, + + // 可以有多个 testcase +} + +func Test_invertTree(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + root := kit.PreIn2Tree(tc.pre, tc.in) + ans := invertTree(root) + ast.Equal(tc.ans, kit.Tree2Inorder(ans), "输入:%v", tc) + } +} diff --git a/Algorithms/0227.basic-calculator-ii/227.100.png b/Algorithms/0227.basic-calculator-ii/227.100.png new file mode 100644 index 000000000..d93793cd2 Binary files /dev/null and b/Algorithms/0227.basic-calculator-ii/227.100.png differ diff --git a/Algorithms/0227.basic-calculator-ii/README.md b/Algorithms/0227.basic-calculator-ii/README.md new file mode 100755 index 000000000..7c9c6e46c --- /dev/null +++ b/Algorithms/0227.basic-calculator-ii/README.md @@ -0,0 +1,23 @@ +# [227. Basic Calculator II](https://leetcode.com/problems/basic-calculator-ii/) + +## 题目 +Implement a basic calculator to evaluate a simple expression string. + +The expression string contains only non-negative integers, +, -, *, / operators and empty spaces . The integer division should truncate toward zero. + +You may assume that the given expression is always valid. + +Some examples: +``` +"3+2*2" = 7 +" 3/2 " = 1 +" 3+5 / 2 " = 5 +``` + +Note: Do not use the eval built-in library function. + +## 解题思路 + +见程序注释 + +![100](227.100.png) \ No newline at end of file diff --git a/Algorithms/0227.basic-calculator-ii/basic-calculator-ii.go b/Algorithms/0227.basic-calculator-ii/basic-calculator-ii.go new file mode 100755 index 000000000..7a63c28c2 --- /dev/null +++ b/Algorithms/0227.basic-calculator-ii/basic-calculator-ii.go @@ -0,0 +1,72 @@ +package Problem0227 + +func calculate(s string) int { + // n1 opt1 n2 opt2 n3 + // ↓ ↓ ↓ ↓ ↓ + // 1 + 2 * 3 + var n1, n2, n3 int + var opt1, opt2 byte + opt1 = '+' + + idx := 0 + nextN := func() int { + n := 0 + // 跳过空格 + for idx < len(s) && s[idx] == ' ' { + idx++ + } + // 获取数值 + for idx < len(s) && '0' <= s[idx] && s[idx] <= '9' { + n = n*10 + int(s[idx]-'0') + idx++ + } + return n + } + + nextOpt := func() byte { + // opt 默认为 +,与 nextN() 的默认值为 0 配合 + // 当 s 的结尾为 空格 的时候,程序会进行一次 +0 的运算,但这不会影响结果。 + opt := byte('+') + // 跳过空格 + for idx < len(s) && s[idx] == ' ' { + idx++ + } + // 获取操作符 + if idx < len(s) { + opt = s[idx] + idx++ + } + return opt + } + + n2 = nextN() + for idx < len(s) { + opt2 = nextOpt() + n3 = nextN() + + if opt2 == '*' || opt2 == '/' { + // 先乘除 + n2 = operate(n2, n3, opt2) + } else { + // 后加减 + n1 = operate(n1, n2, opt1) + opt1 = opt2 + n2 = n3 + } + } + + return operate(n1, n2, opt1) +} + +func operate(a, b int, opt byte) int { + switch opt { + case '+': + return a + b + case '-': + return a - b + case '*': + return a * b + default: // '/' + return a / b + } +} diff --git a/Algorithms/0227.basic-calculator-ii/basic-calculator-ii_test.go b/Algorithms/0227.basic-calculator-ii/basic-calculator-ii_test.go new file mode 100755 index 000000000..63812d2d8 --- /dev/null +++ b/Algorithms/0227.basic-calculator-ii/basic-calculator-ii_test.go @@ -0,0 +1,49 @@ +package Problem0227 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + ans int +}{ + + { + " 3/2 ", + 1, + }, + + { + " 3+5 / 2 ", + 5, + }, + + { + "3- 2*2", + -1, + }, + + // 可以有多个 testcase +} + +func Test_calculate(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, calculate(tc.s), "输入:%v", tc) + } +} + +func Benchmark_calculate(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + calculate(tc.s) + } + } +} diff --git a/Algorithms/0230.kth-smallest-element-in-a-bst/README.md b/Algorithms/0230.kth-smallest-element-in-a-bst/README.md new file mode 100755 index 000000000..936f2daf8 --- /dev/null +++ b/Algorithms/0230.kth-smallest-element-in-a-bst/README.md @@ -0,0 +1,19 @@ +# [230. Kth Smallest Element in a BST](https://leetcode.com/problems/kth-smallest-element-in-a-bst/) + +## 题目 +Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. + +Note: +You may assume k is always valid, 1 ≤ k ≤ BST's total elements. + +Follow up: +What if the BST is modified (insert/delete operations) often and you need to find the kth smallest frequently? How would you optimize the kthSmallest routine? + +## 解题思路 +以下是[BST](https://zh.wikipedia.org/zh-cn/%E4%BA%8C%E5%85%83%E6%90%9C%E5%B0%8B%E6%A8%B9)的性质: +1. 若任意节点的左子树不空,则左子树上所有节点的值均小于它的根节点的值; +1. 若任意节点的右子树不空,则右子树上所有节点的值均大于它的根节点的值; +1. 任意节点的左、右子树也分别为二叉查找树; +1. 没有键值相等的节点。 + +见程序注释 diff --git a/Algorithms/0230.kth-smallest-element-in-a-bst/kth-smallest-element-in-a-bst.go b/Algorithms/0230.kth-smallest-element-in-a-bst/kth-smallest-element-in-a-bst.go new file mode 100755 index 000000000..e6eaa42a7 --- /dev/null +++ b/Algorithms/0230.kth-smallest-element-in-a-bst/kth-smallest-element-in-a-bst.go @@ -0,0 +1,30 @@ +package Problem0230 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" +) + +type TreeNode = kit.TreeNode + +func kthSmallest(root *TreeNode, k int) int { + leftSize := getSize(root.Left) + switch { + case k <= leftSize: + // 答案存在于 root.Left 中 + return kthSmallest(root.Left, k) + case leftSize+1 < k: + // 答案存在于 root.Right 中 + return kthSmallest(root.Right, k-leftSize-1) + default: + // 答案是 root.Val + return root.Val + } +} + +// 获取 root 树的节点数量 +func getSize(root *TreeNode) int { + if root == nil { + return 0 + } + return 1 + getSize(root.Left) + getSize(root.Right) +} diff --git a/Algorithms/0230.kth-smallest-element-in-a-bst/kth-smallest-element-in-a-bst_test.go b/Algorithms/0230.kth-smallest-element-in-a-bst/kth-smallest-element-in-a-bst_test.go new file mode 100755 index 000000000..e71e7e3f0 --- /dev/null +++ b/Algorithms/0230.kth-smallest-element-in-a-bst/kth-smallest-element-in-a-bst_test.go @@ -0,0 +1,67 @@ +package Problem0230 + +import ( + "fmt" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + pre, in []int + k int + ans int +}{ + + { + []int{1, 2}, + []int{1, 2}, + 2, + 2, + }, + + { + []int{2, 1, 3}, + []int{1, 2, 3}, + 1, + 1, + }, + + { + []int{2, 1, 3}, + []int{1, 2, 3}, + 2, + 2, + }, + + { + []int{2, 1, 3}, + []int{1, 2, 3}, + 3, + 3, + }, + + // 可以有多个 testcase +} + +func Test_kthSmallest(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + root := kit.PreIn2Tree(tc.pre, tc.in) + ast.Equal(tc.ans, kthSmallest(root, tc.k), "输入:%v", tc) + } +} + +func Benchmark_kthSmallest(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + root := kit.PreIn2Tree(tc.pre, tc.in) + kthSmallest(root, tc.k) + } + } +} diff --git a/Algorithms/0231.power-of-two/README.md b/Algorithms/0231.power-of-two/README.md new file mode 100755 index 000000000..fea858c8e --- /dev/null +++ b/Algorithms/0231.power-of-two/README.md @@ -0,0 +1,11 @@ +# [231. Power of Two](https://leetcode.com/problems/power-of-two/) + +## 题目 + +Given an integer, write a function to determine if it is a power of two. + +Credits:Special thanks to @jianchao.li.fighter for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0231.power-of-two/power-of-two.go b/Algorithms/0231.power-of-two/power-of-two.go new file mode 100755 index 000000000..0613fa8b5 --- /dev/null +++ b/Algorithms/0231.power-of-two/power-of-two.go @@ -0,0 +1,16 @@ +package Problem0231 + +func isPowerOfTwo(n int) bool { + if n < 1 { + return false + } + + for n > 1 { + if n%2 == 1 { + return false + } + n /= 2 + } + + return true +} diff --git a/Algorithms/0231.power-of-two/power-of-two_test.go b/Algorithms/0231.power-of-two/power-of-two_test.go new file mode 100755 index 000000000..08823318e --- /dev/null +++ b/Algorithms/0231.power-of-two/power-of-two_test.go @@ -0,0 +1,39 @@ +package Problem0231 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + n int + ans bool +}{ + + {1, true}, + {2, true}, + {3, false}, + {-1, false}, + + // 可以有多个 testcase +} + +func Test_isPowerOfTwo(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, isPowerOfTwo(tc.n), "输入:%v", tc) + } +} + +func Benchmark_isPowerOfTwo(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + isPowerOfTwo(tc.n) + } + } +} diff --git a/Algorithms/0232.implement-queue-using-stacks/README.md b/Algorithms/0232.implement-queue-using-stacks/README.md new file mode 100755 index 000000000..3acbdaffd --- /dev/null +++ b/Algorithms/0232.implement-queue-using-stacks/README.md @@ -0,0 +1,28 @@ +# [232. Implement Queue using Stacks](https://leetcode.com/problems/implement-queue-using-stacks/) + +## 题目 + +Implement the following operations of a queue using stacks. + + +push(x) -- Push element x to the back of queue. + + +pop() -- Removes the element from in front of queue. + + +peek() -- Get the front element. + + +empty() -- Return whether the queue is empty. + + +Notes: + +You must use only standard operations of a stack -- which means only push to top, peek/pop from top, size, and is empty operations are valid. +Depending on your language, stack may not be supported natively. You may simulate a stack by using a list or deque (double-ended queue), as long as you use only standard operations of a stack. +You may assume that all operations are valid (for example, no pop or peek operations will be called on an empty queue). + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0232.implement-queue-using-stacks/implement-queue-using-stacks.go b/Algorithms/0232.implement-queue-using-stacks/implement-queue-using-stacks.go new file mode 100755 index 000000000..02875a484 --- /dev/null +++ b/Algorithms/0232.implement-queue-using-stacks/implement-queue-using-stacks.go @@ -0,0 +1,80 @@ +package Problem0232 + +// MyQueue 是利用 栈 实现的队列 +type MyQueue struct { + a, b *Stack +} + +// Constructor Initialize your data structure here. +func Constructor() MyQueue { + return MyQueue{a: NewStack(), b: NewStack()} +} + +// Push element x to the back of queue. +func (mq *MyQueue) Push(x int) { + mq.a.Push(x) +} + +// Pop Removes the element from in front of queue and returns that element. +func (mq *MyQueue) Pop() int { + if mq.b.Len() == 0 { + for mq.a.Len() > 0 { + mq.b.Push(mq.a.Pop()) + } + } + + return mq.b.Pop() +} + +// Peek Get the front element. +func (mq *MyQueue) Peek() int { + res := mq.Pop() + mq.b.Push(res) + return res +} + +// Empty returns whether the queue is empty. +func (mq *MyQueue) Empty() bool { + return mq.a.Len() == 0 && mq.b.Len() == 0 +} + +/** + * Your MyQueue object will be instantiated and called as such: + * obj := Constructor(); + * obj.Push(x); + * param_2 := obj.Pop(); + * param_3 := obj.Peek(); + * param_4 := obj.Empty(); + */ + +// Stack 是用于存放 int 的 栈 +type Stack struct { + nums []int +} + +// NewStack 返回 *kit.Stack +func NewStack() *Stack { + return &Stack{nums: []int{}} +} + +// Push 把 n 放入 栈 +func (s *Stack) Push(n int) { + s.nums = append(s.nums, n) +} + +// Pop 从 s 中取出最后放入 栈 的值 +func (s *Stack) Pop() int { + res := s.nums[len(s.nums)-1] + s.nums = s.nums[:len(s.nums)-1] + return res +} + +// Len 返回 s 的长度 +func (s *Stack) Len() int { + return len(s.nums) +} + +// IsEmpty 反馈 s 是否为空 +func (s *Stack) IsEmpty() bool { + return s.Len() == 0 +} diff --git a/Algorithms/0232.implement-queue-using-stacks/implement-queue-using-stacks_test.go b/Algorithms/0232.implement-queue-using-stacks/implement-queue-using-stacks_test.go new file mode 100755 index 000000000..7e95b9375 --- /dev/null +++ b/Algorithms/0232.implement-queue-using-stacks/implement-queue-using-stacks_test.go @@ -0,0 +1,46 @@ +package Problem0232 + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_MyQueue(t *testing.T) { + ast := assert.New(t) + + q := Constructor() + ast.True(q.Empty(), "检查新建的 q 是否为空") + + start, end := 0, 3 + + for i := start; i < end; i++ { + q.Push(i) + ast.Equal(start , q.Peek(), "查看 q.Peek()") + } + + for i := start; i < end; i++ { + ast.Equal(i, q.Pop(), "从 q 中 pop 出数来。") + } + + ast.True(q.Empty(), "检查 Pop 完毕后的 q 是否为空") +} +func Test_Stack(t *testing.T) { + ast := assert.New(t) + + s := NewStack() + ast.True(s.IsEmpty(), "检查新建的 s 是否为空") + + start, end := 0, 100 + + for i := start; i < end; i++ { + s.Push(i) + ast.Equal(i-start+1, s.Len(), "Push 后检查 q 的长度。") + } + + for i := end - 1; i >= start; i-- { + ast.Equal(i, s.Pop(), "从 s 中 pop 出数来。") + } + + ast.True(s.IsEmpty(), "检查 Pop 完毕后的 s 是否为空") +} diff --git a/Algorithms/0233.number-of-digit-one/README.md b/Algorithms/0233.number-of-digit-one/README.md new file mode 100755 index 000000000..8662c8782 --- /dev/null +++ b/Algorithms/0233.number-of-digit-one/README.md @@ -0,0 +1,22 @@ +# [233. Number of Digit One](https://leetcode.com/problems/number-of-digit-one/) + +## 题目 +Given an integer n, count the total number of digit 1 appearing in all non-negative integers less than or equal to n. + +For example: +``` +Given n = 13, +Return 6, because digit 1 occurred in the following numbers: 1, 10, 11, 12, 13. +``` + +## 解题思路 + +以算百位上1为例子: 假设百位上是0, 1, 和 >=2 三种情况: +1. n=41092, m=100, a=n/m=410, b=n%m=92. 计算百位上1的个数应该为 41 *100 次. +1. n=41192, m=100, a=n/m=411, b=n%m=92. 计算百位上1的个数应该为 41 *100 + (92+1) 次. +1. n=41592, m=100, a=n/m=415, b=n%m=92. 计算百位上1的个数应该为 (41+1) *100 次. +以上三种情况可以用 一个公式概括: +``` +(a + 8) / 10 * m + (a % 10 == 1) * (b + 1); +``` +见程序注释 diff --git a/Algorithms/0233.number-of-digit-one/number-of-digit-one.go b/Algorithms/0233.number-of-digit-one/number-of-digit-one.go new file mode 100755 index 000000000..ed9e42011 --- /dev/null +++ b/Algorithms/0233.number-of-digit-one/number-of-digit-one.go @@ -0,0 +1,15 @@ +package Problem0233 + +func countDigitOne(n int) int { + var a, b, ones int + m := 1 + for m <= n { + a, b = n/m, n%m + ones += (a + 8) / 10 * m + if a%10 == 1 { + ones += b + 1 + } + m *= 10 + } + return ones +} diff --git a/Algorithms/0233.number-of-digit-one/number-of-digit-one_test.go b/Algorithms/0233.number-of-digit-one/number-of-digit-one_test.go new file mode 100755 index 000000000..4a196f279 --- /dev/null +++ b/Algorithms/0233.number-of-digit-one/number-of-digit-one_test.go @@ -0,0 +1,54 @@ +package Problem0233 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + n int + ans int +}{ + + { + 13, + 6, + }, + + { + 111, + 36, + }, + + { + 123456, + 93553, + }, + + { + 12345678, + 11824417, + }, + + // 可以有多个 testcase +} + +func Test_countDigitOne(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, countDigitOne(tc.n), "输入:%v", tc) + } +} + +func Benchmark_countDigitOne(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + countDigitOne(tc.n) + } + } +} diff --git a/Algorithms/0234.palindrome-linked-list/README.md b/Algorithms/0234.palindrome-linked-list/README.md new file mode 100755 index 000000000..304166079 --- /dev/null +++ b/Algorithms/0234.palindrome-linked-list/README.md @@ -0,0 +1,12 @@ +# [234. Palindrome Linked List](https://leetcode.com/problems/palindrome-linked-list/) + +## 题目 + +Given a singly linked list, determine if it is a palindrome. + +Follow up: +Could you do it in O(n) time and O(1) space? + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0234.palindrome-linked-list/palindrome-linked-list.go b/Algorithms/0234.palindrome-linked-list/palindrome-linked-list.go new file mode 100755 index 000000000..835db6ffd --- /dev/null +++ b/Algorithms/0234.palindrome-linked-list/palindrome-linked-list.go @@ -0,0 +1,27 @@ +package Problem0234 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" +) + +type ListNode = kit.ListNode + +func isPalindrome(head *ListNode) bool { + // 获取 list 中的值 + nums := make([]int, 0, 64) + for head != nil { + nums = append(nums, head.Val) + head = head.Next + } + + // 按照规则对比值 + l, r := 0, len(nums)-1 + for l < r { + if nums[l] != nums[r] { + return false + } + l++ + r-- + } + return true +} \ No newline at end of file diff --git a/Algorithms/0234.palindrome-linked-list/palindrome-linked-list_test.go b/Algorithms/0234.palindrome-linked-list/palindrome-linked-list_test.go new file mode 100755 index 000000000..b03e0495d --- /dev/null +++ b/Algorithms/0234.palindrome-linked-list/palindrome-linked-list_test.go @@ -0,0 +1,41 @@ +package Problem0234 + +import ( + "fmt" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans bool +}{ + + {[]int{1, 2, 3, 2, 1}, true}, + {[]int{1, 3, 2, 1}, false}, + + // 可以有多个 testcase +} + +func Test_isPalindrome(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + head := kit.Ints2List(tc.nums) + ast.Equal(tc.ans, isPalindrome(head), "输入:%v", tc) + } +} + +func Benchmark_isPalindrome(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + head := kit.Ints2List(tc.nums) + isPalindrome(head) + } + } +} diff --git a/Algorithms/0239.sliding-window-maximum/README.md b/Algorithms/0239.sliding-window-maximum/README.md new file mode 100755 index 000000000..b2376f9e9 --- /dev/null +++ b/Algorithms/0239.sliding-window-maximum/README.md @@ -0,0 +1,30 @@ +# [239. Sliding Window Maximum](https://leetcode.com/problems/sliding-window-maximum/) + +## 题目 +Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sliding window moves right by one position. + +For example, +``` +Given nums = [1,3,-1,-3,5,3,6,7], and k = 3. + +Window position Max +--------------- ----- +[1 3 -1] -3 5 3 6 7 3 + 1 [3 -1 -3] 5 3 6 7 3 + 1 3 [-1 -3 5] 3 6 7 5 + 1 3 -1 [-3 5 3] 6 7 5 + 1 3 -1 -3 [5 3 6] 7 6 + 1 3 -1 -3 5 [3 6 7] 7 +``` + +Therefore, return the max sliding window as [3,3,5,5,6,7]. + +Note: +You may assume k is always valid, ie: 1 ≤ k ≤ input array's size for non-empty array. + +Follow up: +Could you solve it in linear time? + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0239.sliding-window-maximum/sliding-window-maximum.go b/Algorithms/0239.sliding-window-maximum/sliding-window-maximum.go new file mode 100755 index 000000000..5f45f5945 --- /dev/null +++ b/Algorithms/0239.sliding-window-maximum/sliding-window-maximum.go @@ -0,0 +1,28 @@ +package Problem0239 + +func maxSlidingWindow(nums []int, k int) []int { + // 题目里面说好了 1 <= k 的 + // testcase 里面还是出现了 k == 0 + if k == 0 { + return nil + } + + // res 的长度是可计算的 + res := make([]int, len(nums)-k+1) + for i := 0; i+k <= len(nums); i++ { + res[i] = maxOf(nums[i : i+k]) + } + + return res +} + +// 获取局部的最大值 +func maxOf(nums []int) int { + max := nums[0] + for i := 1; i < len(nums); i++ { + if max < nums[i] { + max = nums[i] + } + } + return max +} diff --git a/Algorithms/0239.sliding-window-maximum/sliding-window-maximum_test.go b/Algorithms/0239.sliding-window-maximum/sliding-window-maximum_test.go new file mode 100755 index 000000000..8c1ccd370 --- /dev/null +++ b/Algorithms/0239.sliding-window-maximum/sliding-window-maximum_test.go @@ -0,0 +1,47 @@ +package Problem0239 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + k int + ans []int +}{ + + { + []int{}, + 0, + nil, + }, + + { + []int{1, 3, -1, -3, 5, 3, 6, 7}, + 3, + []int{3, 3, 5, 5, 6, 7}, + }, + + // 可以有多个 testcase +} + +func Test_maxSlidingWindow(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, maxSlidingWindow(tc.nums, tc.k), "输入:%v", tc) + } +} + +func Benchmark_maxSlidingWindow(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + maxSlidingWindow(tc.nums, tc.k) + } + } +} diff --git a/Algorithms/0240.search-a-2d-matrix-ii/README.md b/Algorithms/0240.search-a-2d-matrix-ii/README.md new file mode 100755 index 000000000..9035d07cf --- /dev/null +++ b/Algorithms/0240.search-a-2d-matrix-ii/README.md @@ -0,0 +1,26 @@ +# [240. Search a 2D Matrix II](https://leetcode.com/problems/search-a-2d-matrix-ii/) + +## 题目 +Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: +- Integers in each row are sorted in ascending from left to right. +- Integers in each column are sorted in ascending from top to bottom. + +For example, + +Consider the following matrix: +``` +[ + [1, 4, 7, 11, 15], + [2, 5, 8, 12, 19], + [3, 6, 9, 16, 22], + [10, 13, 14, 17, 24], + [18, 21, 23, 26, 30] +] +``` + +Given target = 5, return true. +Given target = 20, return false. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0240.search-a-2d-matrix-ii/search-a-2d-matrix-ii.go b/Algorithms/0240.search-a-2d-matrix-ii/search-a-2d-matrix-ii.go new file mode 100755 index 000000000..5199b74d7 --- /dev/null +++ b/Algorithms/0240.search-a-2d-matrix-ii/search-a-2d-matrix-ii.go @@ -0,0 +1,31 @@ +package Problem0240 + +func searchMatrix(matrix [][]int, target int) bool { + m := len(matrix) + if m == 0 { + return false + } + n := len(matrix[0]) + if n == 0 { + return false + } + + i, j := m-1, 0 + for 0 <= i && j < n { + if matrix[i][j] == target { + return true + } + + if matrix[i][j] < target { + j++ + // 排除了 (i,j) 上方的所有比 matrix[i][j] 小的元素 + } else { + i-- + // 排除了 (i,j) 右方的所有比 matrix[i][j] 大的元素 + } + } + // 这种方法的效率,取决于 m 与 n 的相对大小关系 + // 当 m == n 时,效率最高 + // 当 m == 1 或 n ==1 时,效率最低 + return false +} diff --git a/Algorithms/0240.search-a-2d-matrix-ii/search-a-2d-matrix-ii_test.go b/Algorithms/0240.search-a-2d-matrix-ii/search-a-2d-matrix-ii_test.go new file mode 100755 index 000000000..28e95da66 --- /dev/null +++ b/Algorithms/0240.search-a-2d-matrix-ii/search-a-2d-matrix-ii_test.go @@ -0,0 +1,71 @@ +package Problem0240 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +var m = [][]int{ + []int{1, 4, 7, 11, 15}, + []int{2, 5, 8, 12, 19}, + []int{3, 6, 9, 16, 22}, + []int{10, 13, 14, 17, 24}, + []int{18, 21, 23, 26, 30}, +} + +// tcs is testcase slice +var tcs = []struct { + matrix [][]int + target int + ans bool +}{ + + { + m, + 5, + true, + }, + + { + m, + 15, + true, + }, + { + m, + 20, + false, + }, + + { + [][]int{}, + 5, + false, + }, + + { + [][]int{[]int{}}, + 5, + false, + }, + // 可以有多个 testcase +} + +func Test_searchMatrix(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, searchMatrix(tc.matrix, tc.target), "输入:%v", tc) + } +} + +func Benchmark_searchMatrix(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + searchMatrix(tc.matrix, tc.target) + } + } +} diff --git a/Algorithms/0241.different-ways-to-add-parentheses/README.md b/Algorithms/0241.different-ways-to-add-parentheses/README.md new file mode 100755 index 000000000..4bad637fb --- /dev/null +++ b/Algorithms/0241.different-ways-to-add-parentheses/README.md @@ -0,0 +1,29 @@ +# [241. Different Ways to Add Parentheses](https://leetcode.com/problems/different-ways-to-add-parentheses/) + +## 题目 +Given a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators. The valid operators are +, - and *. + +Example 1 +``` +Input: "2-1-1". +((2-1)-1) = 0 +(2-(1-1)) = 2 +``` +Output: [0, 2] + +Example 2 +``` +Input: "2*3-4*5" +(2*(3-(4*5))) = -34 +((2*3)-(4*5)) = -14 +((2*(3-4))*5) = -10 +(2*((3-4)*5)) = -10 +(((2*3)-4)*5) = 10 +``` +Output: [-34, -14, -10, -10, 10] + +Credits:Special thanks to @mithmatt for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0241.different-ways-to-add-parentheses/different-ways-to-add-parentheses.go b/Algorithms/0241.different-ways-to-add-parentheses/different-ways-to-add-parentheses.go new file mode 100755 index 000000000..308e5b1d5 --- /dev/null +++ b/Algorithms/0241.different-ways-to-add-parentheses/different-ways-to-add-parentheses.go @@ -0,0 +1,47 @@ +package Problem0241 + +import "strconv" + +func diffWaysToCompute(input string) []int { + cache := make(map[string][]int) + var dfs func(string) []int + dfs = func(s string) []int { + res := make([]int, 0, len(s)) + if t, ok := cache[s]; ok { + return t + } + + for i := range s { + if s[i] == '+' || s[i] == '-' || s[i] == '*' { + // 此时,s[i] 作为最后一个运算的运算符 + for _, left := range dfs(s[:i]) { + for _, right := range dfs(s[i+1:]) { + res = append(res, operate(left, right, s[i])) + } + } + } + } + + // s 中不存在运算符 + if len(res) == 0 { + temp, _ := strconv.Atoi(s) + res = append(res, temp) + } + + cache[s] = res + return res + } + + return dfs(input) +} + +func operate(a, b int, opt byte) int { + switch opt { + case '+': + return a + b + case '-': + return a - b + default: + return a * b + } +} diff --git a/Algorithms/0241.different-ways-to-add-parentheses/different-ways-to-add-parentheses_test.go b/Algorithms/0241.different-ways-to-add-parentheses/different-ways-to-add-parentheses_test.go new file mode 100755 index 000000000..befa0746e --- /dev/null +++ b/Algorithms/0241.different-ways-to-add-parentheses/different-ways-to-add-parentheses_test.go @@ -0,0 +1,52 @@ +package Problem0241 + +import ( + "fmt" + "sort" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + input string + ans []int +}{ + + { + "2+2+2+2", + []int{8, 8, 8, 8, 8}, + }, + + { + "2-1-1", + []int{0, 2}, + }, + + { + "2*3-4*5", + []int{-34, -14, -10, -10, 10}, + }, + + // 可以有多个 testcase +} + +func Test_diffWaysToCompute(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ans := diffWaysToCompute(tc.input) + sort.Ints(ans) + ast.Equal(tc.ans, ans, "输入:%v", tc) + } +} + +func Benchmark_diffWaysToCompute(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + diffWaysToCompute(tc.input) + } + } +} diff --git a/Algorithms/0242.valid-anagram/README.md b/Algorithms/0242.valid-anagram/README.md new file mode 100755 index 000000000..02ca97f28 --- /dev/null +++ b/Algorithms/0242.valid-anagram/README.md @@ -0,0 +1,24 @@ +# [242. Valid Anagram](https://leetcode.com/problems/valid-anagram/) + +## 题目 + +Given two strings s and t, write a function to determine if t is an anagram of s. + +For example, + +```text +s = "anagram", t = "nagaram", return true. +s = "rat", t = "car", return false. +``` + +Note: +You may assume the string contains only lowercase alphabets. + +Follow up: +What if the inputs contain unicode characters? How would you adapt your solution to such case? + +## 解题思路 + +易位构词游戏的英文词汇是 anagram,这个词来源于有“反向”或“再次”的含义的希腊语字根ana-和有“书写”、“写下”的意思的词根grahpein。易位构词是一类文字游戏(更准确地说是一类“词语游戏”),是将组成一个词或短句的字母重新排列顺序,原文中所有字母的每次出现都被使用一次,这样构造出另外一些新的词或短句。 + +见程序注释 diff --git a/Algorithms/0242.valid-anagram/valid-anagram.go b/Algorithms/0242.valid-anagram/valid-anagram.go new file mode 100755 index 000000000..32055ec3f --- /dev/null +++ b/Algorithms/0242.valid-anagram/valid-anagram.go @@ -0,0 +1,27 @@ +package Problem0242 + +func isAnagram(s string, t string) bool { + if len(s) != len(t) { + return false + } + + // 把 string 转换成 []rune 可以适应 Unicode 字符 + sr := []rune(s) + tr := []rune(t) + + // 因为使用了 []rune,rec 只好使用 map + // 不然的话,使用 [26]int 数组,效率更高 + rec := make(map[rune]int, len(sr)) + for i := range sr { + rec[sr[i]]++ + rec[tr[i]]-- + } + + for _, n := range rec { + if n != 0 { + return false + } + } + + return true +} diff --git a/Algorithms/0242.valid-anagram/valid-anagram_test.go b/Algorithms/0242.valid-anagram/valid-anagram_test.go new file mode 100755 index 000000000..f7713680c --- /dev/null +++ b/Algorithms/0242.valid-anagram/valid-anagram_test.go @@ -0,0 +1,41 @@ +package Problem0242 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + t string + ans bool +}{ + + {"anagram", "nagaram", true}, + {"rat", "car", false}, + {"at", "car", false}, + {"", "", true}, + {"世界和平", "和平世界", true}, + + // 可以有多个 testcase +} + +func Test_isAnagram(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, isAnagram(tc.s, tc.t), "输入:%v", tc) + } +} + +func Benchmark_isAnagram(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + isAnagram(tc.s, tc.t) + } + } +} diff --git a/Algorithms/0257.binary-tree-paths/README.md b/Algorithms/0257.binary-tree-paths/README.md new file mode 100755 index 000000000..ff2015438 --- /dev/null +++ b/Algorithms/0257.binary-tree-paths/README.md @@ -0,0 +1,27 @@ +# [257. Binary Tree Paths](https://leetcode.com/problems/binary-tree-paths/) + +## 题目 + +Given a binary tree, return all root-to-leaf paths. + + +For example, given the following binary tree: + + + 1 + / \ +2 3 + \ + 5 + + + +All root-to-leaf paths are: +["1->2->5", "1->3"] + + +Credits:Special thanks to @jianchao.li.fighter for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0257.binary-tree-paths/binary-tree-paths.go b/Algorithms/0257.binary-tree-paths/binary-tree-paths.go new file mode 100755 index 000000000..1f7b7b544 --- /dev/null +++ b/Algorithms/0257.binary-tree-paths/binary-tree-paths.go @@ -0,0 +1,41 @@ +package Problem0257 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" + "strconv" +) + +type TreeNode = kit.TreeNode + +func binaryTreePaths(root *TreeNode) []string { + if root == nil { + return nil + } + + res := make([]string, 0, 16) + + var dfs func(string, *TreeNode) + dfs = func(pre string, root *TreeNode) { + if pre == "" { + pre = strconv.Itoa(root.Val) + } else { + pre += "->" + strconv.Itoa(root.Val) + } + + if root.Left != nil { + dfs(pre, root.Left) + } + + if root.Right != nil { + dfs(pre, root.Right) + } + + if root.Left == nil && root.Right == nil { + res = append(res, pre) + } + } + + dfs("", root) + + return res +} diff --git a/Algorithms/0257.binary-tree-paths/binary-tree-paths_test.go b/Algorithms/0257.binary-tree-paths/binary-tree-paths_test.go new file mode 100755 index 000000000..e889850ba --- /dev/null +++ b/Algorithms/0257.binary-tree-paths/binary-tree-paths_test.go @@ -0,0 +1,50 @@ +package Problem0257 + +import ( + "fmt" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + pre, in []int + ans []string +}{ + + { + []int{}, + []int{}, + nil, + }, + + { + []int{1, 2, 5, 3}, + []int{2, 5, 1, 3}, + []string{"1->2->5", "1->3"}, + }, + + // 可以有多个 testcase +} + +func Test_binaryTreePaths(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + root := kit.PreIn2Tree(tc.pre, tc.in) + ast.Equal(tc.ans, binaryTreePaths(root), "输入:%v", tc) + } +} + +func Benchmark_binaryTreePaths(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + root := kit.PreIn2Tree(tc.pre, tc.in) + binaryTreePaths(root) + } + } +} diff --git a/Algorithms/0258.add-digits/README.md b/Algorithms/0258.add-digits/README.md new file mode 100755 index 000000000..154be2f6d --- /dev/null +++ b/Algorithms/0258.add-digits/README.md @@ -0,0 +1,20 @@ +# [258. Add Digits](https://leetcode.com/problems/add-digits/) + +## 题目 + +Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. + +For example: + +```text +Given num = 38, the process is like: 3 + 8 = 11, 1 + 1 = 2. Since 2 has only one digit, return it. +``` + +Follow up: +Could you do it without any loop/recursion in O(1) runtime? + +Credits:Special thanks to @jianchao.li.fighter for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0258.add-digits/add-digits.go b/Algorithms/0258.add-digits/add-digits.go new file mode 100755 index 000000000..ba44802c2 --- /dev/null +++ b/Algorithms/0258.add-digits/add-digits.go @@ -0,0 +1,5 @@ +package Problem0258 + +func addDigits(n int) int { + return (n-1)%9 + 1 +} diff --git a/Algorithms/0258.add-digits/add-digits_test.go b/Algorithms/0258.add-digits/add-digits_test.go new file mode 100755 index 000000000..c82221830 --- /dev/null +++ b/Algorithms/0258.add-digits/add-digits_test.go @@ -0,0 +1,39 @@ +package Problem0258 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + num int + ans int +}{ + + { + 38, + 2, + }, + + // 可以有多个 testcase +} + +func Test_addDigits(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, addDigits(tc.num), "输入:%v", tc) + } +} + +func Benchmark_addDigits(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + addDigits(tc.num) + } + } +} diff --git a/Algorithms/0260.single-number-iii/README.md b/Algorithms/0260.single-number-iii/README.md new file mode 100755 index 000000000..43c816933 --- /dev/null +++ b/Algorithms/0260.single-number-iii/README.md @@ -0,0 +1,18 @@ +# [260. Single Number III](https://leetcode.com/problems/single-number-iii/) + +## 题目 +Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements that appear only once. + +For example: + +Given nums = [1, 2, 1, 3, 2, 5], return [3, 5]. + +Note: +1. The order of the result is not important. So in the above example, [5, 3] is also correct. +1. Your algorithm should run in linear runtime complexity. Could you implement it using only constant space complexity? + +Credits:Special thanks to @jianchao.li.fighter for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0260.single-number-iii/single-number-iii.go b/Algorithms/0260.single-number-iii/single-number-iii.go new file mode 100755 index 000000000..870d2ca16 --- /dev/null +++ b/Algorithms/0260.single-number-iii/single-number-iii.go @@ -0,0 +1,20 @@ +package Problem0260 + +func singleNumber(nums []int) []int { + var xor int + for _, num := range nums { + xor ^= num + } + + lowest := xor & -xor + + var a, b int + for _, num := range nums { + if num&lowest == 0 { + a ^= num + } else { + b ^= num + } + } + return []int{a, b} +} diff --git a/Algorithms/0260.single-number-iii/single-number-iii_test.go b/Algorithms/0260.single-number-iii/single-number-iii_test.go new file mode 100755 index 000000000..7b80283bb --- /dev/null +++ b/Algorithms/0260.single-number-iii/single-number-iii_test.go @@ -0,0 +1,47 @@ +package Problem0260 + +import ( + "fmt" + "sort" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans []int +}{ + + { + []int{1, 2, 3, 1, 2, 5}, + []int{3, 5}, + }, + + { + []int{1, 2, -1, 1, 2, 0}, + []int{-1, 0}, + }, + // 可以有多个 testcase +} + +func Test_singleNumber(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + + ans := singleNumber(tc.nums) + sort.Ints(ans) + ast.Equal(tc.ans, ans, "输入:%v", tc) + } +} + +func Benchmark_singleNumber(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + singleNumber(tc.nums) + } + } +} diff --git a/Algorithms/0263.ugly-number/README.md b/Algorithms/0263.ugly-number/README.md new file mode 100755 index 000000000..e426523e0 --- /dev/null +++ b/Algorithms/0263.ugly-number/README.md @@ -0,0 +1,14 @@ +# [263. Ugly Number](https://leetcode.com/problems/ugly-number/) + +## 题目 +Write a program to check whether a given number is an ugly number. + +Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 6, 8 are ugly while 14 is not ugly since it includes another prime factor 7. + +Note that 1 is typically treated as an ugly number. + +Credits:Special thanks to @jianchao.li.fighter for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0263.ugly-number/ugly-number.go b/Algorithms/0263.ugly-number/ugly-number.go new file mode 100755 index 000000000..96a65acc3 --- /dev/null +++ b/Algorithms/0263.ugly-number/ugly-number.go @@ -0,0 +1,26 @@ +package Problem0263 + +func isUgly(num int) bool { + if num <= 0 { + return false + } + + if num <= 6 { + // 1,2,3,4,5,6 确实都是 ugly 的 + return true + } + + if num%2 == 0 { + return isUgly(num / 2) + } + + if num%3 == 0 { + return isUgly(num / 3) + } + + if num%5 == 0 { + return isUgly(num / 5) + } + + return false +} diff --git a/Algorithms/0263.ugly-number/ugly-number_test.go b/Algorithms/0263.ugly-number/ugly-number_test.go new file mode 100755 index 000000000..c380f88d9 --- /dev/null +++ b/Algorithms/0263.ugly-number/ugly-number_test.go @@ -0,0 +1,67 @@ +package Problem0263 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + num int + ans bool +}{ + { + -2147483648, + false, + }, + + { + 0, + false, + }, + + { + 2123366402, + false, + }, + + { + 23, + false, + }, + + { + 12, + true, + }, + + { + 1, + true, + }, + + { + 2123366400, + true, + }, + // 可以有多个 testcase +} + +func Test_isUgly(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, isUgly(tc.num), "输入:%v", tc) + } +} + +func Benchmark_isUgly(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + isUgly(tc.num) + } + } +} diff --git a/Algorithms/0264.ugly-number-ii/README.md b/Algorithms/0264.ugly-number-ii/README.md new file mode 100755 index 000000000..897ecc9da --- /dev/null +++ b/Algorithms/0264.ugly-number-ii/README.md @@ -0,0 +1,14 @@ +# [264. Ugly Number II](https://leetcode.com/problems/ugly-number-ii/) + +## 题目 +Write a program to find the n-th ugly number. + +Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 1, 2, 3, 4, 5, 6, 8, 9, 10, 12 is the sequence of the first 10 ugly numbers. + +Note that 1 is typically treated as an ugly number, and n does not exceed 1690. + +Credits:Special thanks to @jianchao.li.fighter for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0264.ugly-number-ii/ugly-number-ii.go b/Algorithms/0264.ugly-number-ii/ugly-number-ii.go new file mode 100755 index 000000000..c63ce10e0 --- /dev/null +++ b/Algorithms/0264.ugly-number-ii/ugly-number-ii.go @@ -0,0 +1,44 @@ +package Problem0264 + +func nthUglyNumber(n int) int { + if n <= 6 { + return n + } + + pos := []int{0, 0, 0} + factors := []int{2, 3, 5} + candidates := []int{2, 3, 5} + + res := make([]int, n) + + res[0] = 1 + + for i := 1; i < n; i++ { + res[i] = min(candidates) + for j := 0; j < 3; j++ { + if res[i] == candidates[j] { + pos[j]++ + candidates[j] = res[pos[j]] * factors[j] + } + } + } + + return res[n-1] +} + +func min(candidates []int) int { + return lesser( + candidates[0], + lesser( + candidates[1], + candidates[2], + ), + ) +} + +func lesser(a, b int) int { + if a < b { + return a + } + return b +} diff --git a/Algorithms/0264.ugly-number-ii/ugly-number-ii_test.go b/Algorithms/0264.ugly-number-ii/ugly-number-ii_test.go new file mode 100755 index 000000000..f33a3580b --- /dev/null +++ b/Algorithms/0264.ugly-number-ii/ugly-number-ii_test.go @@ -0,0 +1,54 @@ +package Problem0264 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + n int + ans int +}{ + + { + 11, + 15, + }, + + { + 12, + 16, + }, + + { + 1690, + 2123366400, + }, + + { + 1, + 1, + }, + + // 可以有多个 testcase +} + +func Test_nthUglyNumber(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, nthUglyNumber(tc.n), "输入:%v", tc) + } +} + +func Benchmark_nthUglyNumber(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + nthUglyNumber(tc.n) + } + } +} diff --git a/Algorithms/0273.integer-to-english-words/README.md b/Algorithms/0273.integer-to-english-words/README.md new file mode 100755 index 000000000..634e31526 --- /dev/null +++ b/Algorithms/0273.integer-to-english-words/README.md @@ -0,0 +1,17 @@ +# [273. Integer to English Words](https://leetcode.com/problems/integer-to-english-words/) + +## 题目 + +Convert a non-negative integer to its english words representation. Given input is guaranteed to be less than 2^31 - 1. + +For example, + +```text +123 -> "One Hundred Twenty Three" +12345 -> "Twelve Thousand Three Hundred Forty Five" +1234567 -> "One Million Two Hundred Thirty Four Thousand Five Hundred Sixty Seven" +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0273.integer-to-english-words/integer-to-english-words.go b/Algorithms/0273.integer-to-english-words/integer-to-english-words.go new file mode 100755 index 000000000..23a9a45d8 --- /dev/null +++ b/Algorithms/0273.integer-to-english-words/integer-to-english-words.go @@ -0,0 +1,86 @@ +package Problem0273 + +import ( + "strings" +) + +var lessThan21 = []string{ + "", + "One", + "Two", + "Three", + "Four", + "Five", + "Six", + "Seven", + "Eight", + "Nine", + "Ten", + "Eleven", + "Twelve", + "Thirteen", + "Fourteen", + "Fifteen", + "Sixteen", + "Seventeen", + "Eighteen", + "Nineteen", + "Twenty", +} + +var ten = []string{ + "", + "", + "Twenty", + "Thirty", + "Forty", + "Fifty", + "Sixty", + "Seventy", + "Eighty", + "Ninety", +} + +var thousand = []string{ + "", + "Thousand", + "Million", + "Billion", +} + +func numberToWords(num int) string { + if num == 0 { + return "Zero" + } + + res := "" + i := 0 + + for num > 0 { + if num%1000 != 0 { + res = lessK(num%1000) + thousand[i] + " " + res + } + + num /= 1000 + i++ + } + + return strings.TrimRight(res, " ") +} + +// 处理小于 1000 的数字 +func lessK(num int) string { + if num == 0 { + return "" + } + + if num <= 20 { + return lessThan21[num] + " " + } + + if num < 100 { + return ten[num/10] + " " + lessK(num%10) + } + + return lessThan21[num/100] + " Hundred " + lessK(num%100) +} diff --git a/Algorithms/0273.integer-to-english-words/integer-to-english-words_test.go b/Algorithms/0273.integer-to-english-words/integer-to-english-words_test.go new file mode 100755 index 000000000..a3b4aec61 --- /dev/null +++ b/Algorithms/0273.integer-to-english-words/integer-to-english-words_test.go @@ -0,0 +1,54 @@ +package Problem0273 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + num int + ans string +}{ + {50868, "Fifty Thousand Eight Hundred Sixty Eight"}, + {100, "One Hundred"}, + {30, "Thirty"}, + {21, "Twenty One"}, + {0, "Zero"}, + {123, "One Hundred Twenty Three"}, + {12345, "Twelve Thousand Three Hundred Forty Five"}, + {1234567, "One Million Two Hundred Thirty Four Thousand Five Hundred Sixty Seven"}, + {101, "One Hundred One"}, + {1, "One"}, + {11, "Eleven"}, + {111, "One Hundred Eleven"}, + {1111, "One Thousand One Hundred Eleven"}, + {11111, "Eleven Thousand One Hundred Eleven"}, + {111111, "One Hundred Eleven Thousand One Hundred Eleven"}, + {1111111, "One Million One Hundred Eleven Thousand One Hundred Eleven"}, + {11111111, "Eleven Million One Hundred Eleven Thousand One Hundred Eleven"}, + {111111111, "One Hundred Eleven Million One Hundred Eleven Thousand One Hundred Eleven"}, + {1111111111, "One Billion One Hundred Eleven Million One Hundred Eleven Thousand One Hundred Eleven"}, + {1000000000, "One Billion"}, + + // 可以有多个 testcase +} + +func Test_numberToWords(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, numberToWords(tc.num), "输入:%v", tc) + } +} + +func Benchmark_numberToWords(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + numberToWords(tc.num) + } + } +} diff --git a/Algorithms/0274.h-index/README.md b/Algorithms/0274.h-index/README.md new file mode 100755 index 000000000..b52656b4f --- /dev/null +++ b/Algorithms/0274.h-index/README.md @@ -0,0 +1,17 @@ +# [274. H-Index](https://leetcode.com/problems/h-index/) + +## 题目 + +Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to compute the researcher's h-index. + +According to the definition of h-index on Wikipedia: "A scientist has index h if h of his/her N papers have at least h citations each, and the other N − h papers have no more than h citations each." + +For example, given citations = [3, 0, 6, 1, 5], which means the researcher has 5 papers in total and each of them had received 3, 0, 6, 1, 5 citations respectively. Since the researcher has 3 papers with at least 3 citations each and the remaining two with no more than 3 citations each, his h-index is 3. + +Note: If there are several possible values for h, the maximum one is taken as the h-index. + +Credits:Special thanks to @jianchao.li.fighter for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0274.h-index/h-index.go b/Algorithms/0274.h-index/h-index.go new file mode 100755 index 000000000..4118dae04 --- /dev/null +++ b/Algorithms/0274.h-index/h-index.go @@ -0,0 +1,23 @@ +package Problem0274 + +import "sort" + +func hIndex(d []int) int { + // 对 citations 进行降序排列 + sort.Sort(sort.Reverse(sort.IntSlice(d))) + size := len(d) + + // 二分查找法 + lo, hi := 0, size-1 + var mi int + for lo <= hi { + mi = (lo + hi) / 2 + if d[mi] > mi { + lo = mi + 1 + } else { + hi = mi - 1 + } + } + + return lo +} diff --git a/Algorithms/0274.h-index/h-index_test.go b/Algorithms/0274.h-index/h-index_test.go new file mode 100755 index 000000000..9cec2708f --- /dev/null +++ b/Algorithms/0274.h-index/h-index_test.go @@ -0,0 +1,39 @@ +package Problem0274 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + citations []int + ans int +}{ + + { + []int{3, 0, 6, 1, 5}, + 3, + }, + + // 可以有多个 testcase +} + +func Test_hIndex(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, hIndex(tc.citations), "输入:%v", tc) + } +} + +func Benchmark_hIndex(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + hIndex(tc.citations) + } + } +} diff --git a/Algorithms/0275.h-index-ii/README.md b/Algorithms/0275.h-index-ii/README.md new file mode 100755 index 000000000..8fe739a91 --- /dev/null +++ b/Algorithms/0275.h-index-ii/README.md @@ -0,0 +1,11 @@ +# [275. H-Index II](https://leetcode.com/problems/h-index-ii/) + +## 题目 + +Follow up for H-Index: What if the citations array is sorted in ascending order? Could you optimize your algorithm? + +## 解题思路 + +ascending order: 升序 + +见程序注释 diff --git a/Algorithms/0275.h-index-ii/h-index-ii.go b/Algorithms/0275.h-index-ii/h-index-ii.go new file mode 100755 index 000000000..1f8043cf4 --- /dev/null +++ b/Algorithms/0275.h-index-ii/h-index-ii.go @@ -0,0 +1,25 @@ +package Problem0275 + +// a 为升序排列 +func hIndex(a []int) int { + size := len(a) + + // 二分查找法 + lo, hi := 0, size-1 + // lo, miD, hi 都是降序切片 d 中的序列号 + // 因为 a 是 d 的逆序,即 a 是升序切片 + // d[miD] , a[miA] 是同一个数 + // 所以,存在数量关系,miD + miA +1 == size + var miD, miA int + for lo <= hi { + miD = (lo + hi) / 2 + miA = size - miD - 1 + if a[miA] > miD { + lo = miD + 1 + } else { + hi = miD - 1 + } + } + + return lo +} diff --git a/Algorithms/0275.h-index-ii/h-index-ii_test.go b/Algorithms/0275.h-index-ii/h-index-ii_test.go new file mode 100755 index 000000000..4d97eadca --- /dev/null +++ b/Algorithms/0275.h-index-ii/h-index-ii_test.go @@ -0,0 +1,54 @@ +package Problem0275 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + citations []int + ans int +}{ + + { + []int{1}, + 1, + }, + + { + []int{0, 0}, + 0, + }, + + { + []int{0}, + 0, + }, + + { + []int{3, 3, 3, 3, 5, 6}, + 3, + }, + + // 可以有多个 testcase +} + +func Test_hIndex(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, hIndex(tc.citations), "输入:%v", tc) + } +} + +func Benchmark_hIndex(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + hIndex(tc.citations) + } + } +} diff --git a/Algorithms/0279.perfect-squares/README.md b/Algorithms/0279.perfect-squares/README.md new file mode 100755 index 000000000..eda76a4d6 --- /dev/null +++ b/Algorithms/0279.perfect-squares/README.md @@ -0,0 +1,13 @@ +# [279. Perfect Squares](https://leetcode.com/problems/perfect-squares/) + +## 题目 + +Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n. + +For example, given n = 12, return 3 because 12 = 4 + 4 + 4; given n = 13, return 2 because 13 = 4 + 9. + +Credits:Special thanks to @jianchao.li.fighter for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0279.perfect-squares/perfect-squares.go b/Algorithms/0279.perfect-squares/perfect-squares.go new file mode 100755 index 000000000..0ec881224 --- /dev/null +++ b/Algorithms/0279.perfect-squares/perfect-squares.go @@ -0,0 +1,30 @@ +package Problem0279 + +import ( + "math" +) + +func numSquares(n int) int { + perfects := []int{} + for i := 1; i*i <= n; i++ { + perfects = append(perfects, i*i) + } + + // dp[i] 表示 the least number of perfect square numbers which sum to i + dp := make([]int, n+1) + for i := 1; i < len(dp); i++ { + dp[i] = math.MaxInt32 + } + + for _, p := range perfects { + for i := p; i < len(dp); i++ { + if dp[i] > dp[i-p]+1 { + // 因为 i = ( i - p ) + p,p 是 平方数 + // 所以 dp[i] = dp[i-p] + 1 + dp[i] = dp[i-p] + 1 + } + } + } + + return dp[n] +} diff --git a/Algorithms/0279.perfect-squares/perfect-squares_test.go b/Algorithms/0279.perfect-squares/perfect-squares_test.go new file mode 100755 index 000000000..8d429b33e --- /dev/null +++ b/Algorithms/0279.perfect-squares/perfect-squares_test.go @@ -0,0 +1,97 @@ +package Problem0279 + +import ( + "fmt" + "math" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + n int + ans int +}{ + + { + 123456, + 3, + }, + + { + 16, + 1, + }, + + { + 15, + 4, + }, + + { + 14, + 3, + }, + + { + 13, + 2, + }, + + { + 12, + 3, + }, + + // 可以有多个 testcase +} + +func Test_numSquares(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, numSquares(tc.n), "输入:%v", tc) + } +} + +func Benchmark_numSquares(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + numSquares(tc.n) + } + } +} + +var max = 10000000 + +func Benchmark_math_sqrt(b *testing.B) { + for i := 0; i < b.N; i++ { + for j := 10; j <= max; j++ { + _ = int(math.Sqrt(float64(j))) + } + } +} + +func Benchmark_intSqrt(b *testing.B) { + for i := 0; i < b.N; i++ { + for j := 10; j <= max; j *= 10 { + _ = intSqrt(j) + } + } +} + +// 返回 x 的平方根的整数部分 +// 这个函数比 int(math.Sqrt(float64(x))) 快的多 +// 详见 benchmark 的结果 +func intSqrt(x int) int { + res := x + + // 牛顿法求平方根 + for res*res > x { + res = (res + x/res) / 2 + } + + return res +} diff --git a/Algorithms/0282.expression-add-operators/README.md b/Algorithms/0282.expression-add-operators/README.md new file mode 100755 index 000000000..38093f9f8 --- /dev/null +++ b/Algorithms/0282.expression-add-operators/README.md @@ -0,0 +1,21 @@ +# [282. Expression Add Operators](https://leetcode.com/problems/expression-add-operators/) + +## 题目 + +Given a string that contains only digits 0-9 and a target value, return all possibilities to add binary operators (not unary) +, -, or * between the digits so they evaluate to the target value. + +Examples: + +```text +"123", 6 -> ["1+2+3", "1*2*3"] +"232", 8 -> ["2*3+2", "2+3*2"] +"105", 5 -> ["1*0+5","10-5"] +"00", 0 -> ["0+0", "0-0", "0*0"] +"3456237490", 9191 -> [] +``` + +Credits:Special thanks to @davidtan1890 for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0282.expression-add-operators/expression-add-operators.go b/Algorithms/0282.expression-add-operators/expression-add-operators.go new file mode 100755 index 000000000..3bbbf94b6 --- /dev/null +++ b/Algorithms/0282.expression-add-operators/expression-add-operators.go @@ -0,0 +1,65 @@ +package Problem0282 + +func addOperators(s string, target int) []string { + res := []string{} + + var dfs func(string, string, int, int) + + dfs = func(s, resStr string, result, prevAdd int) { + var currStr, nextS string + var currNum int + + // s 切分完成 + if len(s) == 0 { + // 检查是否符合 target + if result == target { + res = append(res, resStr) + } + return + } + + for i := 1; i <= len(s); i++ { + currStr = s[:i] + // 排除类似 "01" 的数 + if currStr[0] == '0' && len(currStr) > 1 { + // 不是 continue + // 因为出现了一次 "01" 以后,后面的 str 都只会是 "01X" 之类的。 + return + } + + currNum = integer(currStr) + nextS = s[i:] + + if len(resStr) == 0 { + dfs(nextS, currStr, currNum, currNum) + } else { + /* + 当 运算符 opt 为 + 或 - 时,把计算式 + result = result opt currNum + 统一成 + result += prevAdd, prevAdd = 0 opt currNum + 这样做的原因是,当 opt 为 * 时,可以先利用 prevAdd 保证 乘法 运算的优先性 + result -= prevAdd + prevAdd *= currNum + result += prevAdd + */ + dfs(nextS, resStr+"+"+currStr, result+currNum, currNum) + dfs(nextS, resStr+"-"+currStr, result-currNum, -currNum) + dfs(nextS, resStr+"*"+currStr, result-prevAdd+prevAdd*currNum, prevAdd*currNum) + } + } + } + + dfs(s, "", 0, 0) + + return res +} + +// 把 string 转换成 int +func integer(s string) int { + res := int(s[0] - '0') + for i := 1; i < len(s); i++ { + res = res*10 + int(s[i]-'0') + } + return res +} diff --git a/Algorithms/0282.expression-add-operators/expression-add-operators_test.go b/Algorithms/0282.expression-add-operators/expression-add-operators_test.go new file mode 100755 index 000000000..77dabee5d --- /dev/null +++ b/Algorithms/0282.expression-add-operators/expression-add-operators_test.go @@ -0,0 +1,117 @@ +package Problem0282 + +import ( + "fmt" + "sort" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + num string + target int + ans []string +}{ + + { + "1210", + 120, + []string{"12*10"}, + }, + + { + "100100", + 10000, + []string{"100*100"}, + }, + + { + "011", + 0, + []string{"0*1*1", "0*11", "0+1-1", "0-1+1"}, + }, + + { + "17", + 17, + []string{"17"}, + }, + + { + "", + 5, + []string{}, + }, + + { + "5", + 5, + []string{"5"}, + }, + + { + "5", + 3, + []string{}, + }, + + { + "123", + 6, + []string{"1+2+3", "1*2*3"}, + }, + + { + "232", + 8, + []string{"2*3+2", "2+3*2"}, + }, + + { + "105", + 5, + []string{"1*0+5", "10-5"}, + }, + + { + "00", + 0, + []string{"0+0", "0-0", "0*0"}, + }, + + { + "3456237490", + 9191, + []string{}, + }, + + { + "000", + 0, + []string{"0*0*0", "0*0+0", "0*0-0", "0+0*0", "0+0+0", "0+0-0", "0-0*0", "0-0+0", "0-0-0"}, + }, + + // 可以有多个 testcase +} + +func Test_addOperators(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + sort.Strings(tc.ans) + ans := addOperators(tc.num, tc.target) + sort.Strings(ans) + ast.Equal(tc.ans, ans, "输入:%v", tc) + } +} + +func Benchmark_addOperators(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + addOperators(tc.num, tc.target) + } + } +} diff --git a/Algorithms/0290.word-pattern/README.md b/Algorithms/0290.word-pattern/README.md new file mode 100755 index 000000000..6552103ca --- /dev/null +++ b/Algorithms/0290.word-pattern/README.md @@ -0,0 +1,25 @@ +# [290. Word Pattern](https://leetcode.com/problems/word-pattern/) + +## 题目 + +Given a pattern and a string str, find if str follows the same pattern. + +Here follow means a full match, such that there is a bijection between a letter in pattern and a non-empty word in str. + +Examples: + +```text +pattern = "abba", str = "dog cat cat dog" should return true. +pattern = "abba", str = "dog cat cat fish" should return false. +pattern = "aaaa", str = "dog cat cat dog" should return false. +pattern = "abba", str = "dog dog dog dog" should return false. +``` + +Notes: +You may assume pattern contains only lowercase letters, and str contains lowercase letters separated by a single space. + +Credits:Special thanks to @minglotus6 for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0290.word-pattern/word-pattern.go b/Algorithms/0290.word-pattern/word-pattern.go new file mode 100755 index 000000000..4967535cf --- /dev/null +++ b/Algorithms/0290.word-pattern/word-pattern.go @@ -0,0 +1,37 @@ +package Problem0290 + +import ( + "strings" +) + +func wordPattern(pattern string, str string) bool { + ps := strings.Split(pattern, "") + ss := strings.Split(str, " ") + + if len(ps) != len(ss) { + return false + } + + return isMatch(ps, ss) && isMatch(ss, ps) +} + +func isMatch(s1, s2 []string) bool { + size := len(s1) + + m := make(map[string]string, size) + + var i int + var w string + var ok bool + + for i = 0; i < size; i++ { + if w, ok = m[s1[i]]; ok { + if w != s2[i] { + return false + } + } else { + m[s1[i]] = s2[i] + } + } + return true +} diff --git a/Algorithms/0290.word-pattern/word-pattern_test.go b/Algorithms/0290.word-pattern/word-pattern_test.go new file mode 100755 index 000000000..48ad8c718 --- /dev/null +++ b/Algorithms/0290.word-pattern/word-pattern_test.go @@ -0,0 +1,41 @@ +package Problem0290 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + pattern string + str string + ans bool +}{ + + {"abba", "dog cat cat dog", true}, + {"abba", "dog cat cat fish", false}, + {"aaaa", "dog cat cat dog", false}, + {"abba", "dog dog dog dog", false}, + {"aaa", "aa aa aa aa", false}, + + // 可以有多个 testcase +} + +func Test_wordPattern(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, wordPattern(tc.pattern, tc.str), "输入:%v", tc) + } +} + +func Benchmark_wordPattern(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + wordPattern(tc.pattern, tc.str) + } + } +} diff --git a/Algorithms/0292.nim-game/README.md b/Algorithms/0292.nim-game/README.md new file mode 100755 index 000000000..35ccf736f --- /dev/null +++ b/Algorithms/0292.nim-game/README.md @@ -0,0 +1,15 @@ +# [292. Nim Game](https://leetcode.com/problems/nim-game/) + +## 题目 + +You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 stones. The one who removes the last stone will be the winner. You will take the first turn to remove the stones. + +Both of you are very clever and have optimal strategies for the game. Write a function to determine whether you can win the game given the number of stones in the heap. + +For example, if there are 4 stones in the heap, then you will never win the game: no matter 1, 2, or 3 stones you remove, the last stone will always be removed by your friend. + +Credits:Special thanks to @jianchao.li.fighter for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0292.nim-game/nim-game.go b/Algorithms/0292.nim-game/nim-game.go new file mode 100755 index 000000000..4f8227f52 --- /dev/null +++ b/Algorithms/0292.nim-game/nim-game.go @@ -0,0 +1,5 @@ +package Problem0292 + +func canWinNim(n int) bool { + return n%4 != 0 +} diff --git a/Algorithms/0292.nim-game/nim-game_test.go b/Algorithms/0292.nim-game/nim-game_test.go new file mode 100755 index 000000000..1b9a18744 --- /dev/null +++ b/Algorithms/0292.nim-game/nim-game_test.go @@ -0,0 +1,39 @@ +package Problem0292 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + n int + ans bool +}{ + + {4, false}, + {5, true}, + {41, true}, + + // 可以有多个 testcase +} + +func Test_canWinNim(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, canWinNim(tc.n), "输入:%v", tc) + } + +} + +func Benchmark_canWinNim(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + canWinNim(tc.n) + } + } +} diff --git a/Algorithms/0295.find-median-from-data-stream/295.100.png b/Algorithms/0295.find-median-from-data-stream/295.100.png new file mode 100644 index 000000000..97287f97f Binary files /dev/null and b/Algorithms/0295.find-median-from-data-stream/295.100.png differ diff --git a/Algorithms/0295.find-median-from-data-stream/README.md b/Algorithms/0295.find-median-from-data-stream/README.md new file mode 100755 index 000000000..3ca8721d7 --- /dev/null +++ b/Algorithms/0295.find-median-from-data-stream/README.md @@ -0,0 +1,37 @@ +# [295. Find Median from Data Stream](https://leetcode.com/problems/find-median-from-data-stream/) + +## 题目 + +Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two middle value. + +Examples: + +```text +[2,3,4] , the median is 3 +[2,3], the median is (2 + 3) / 2 = 2.5 +``` + +Design a data structure that supports the following two operations: + +- void addNum(int num) - Add a integer number from the data stream to the data structure. +- double findMedian() - Return the median of all elements so far. + +For example: + +```text +addNum(1) +addNum(2) +findMedian() -> 1.5 +addNum(3) +findMedian() -> 2 +``` + +Credits:Special thanks to @Louis1992 for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 + +感谢 LeetCode 服务器 + +![100](295.100.png) \ No newline at end of file diff --git a/Algorithms/0295.find-median-from-data-stream/find-median-from-data-stream.go b/Algorithms/0295.find-median-from-data-stream/find-median-from-data-stream.go new file mode 100755 index 000000000..dfc892021 --- /dev/null +++ b/Algorithms/0295.find-median-from-data-stream/find-median-from-data-stream.go @@ -0,0 +1,97 @@ +package Problem0295 + +import ( + "container/heap" +) + +// MedianFinder 用于寻找 Median +type MedianFinder struct { + // nums 按个数被平均分配到 left 和 right 中。left.Len() >= right.Len() + left *maxHeap + right *minHeap +} + +// Constructor initialize your data structure here. +func Constructor() MedianFinder { + left := new(maxHeap) + heap.Init(left) + right := new(minHeap) + heap.Init(right) + + return MedianFinder{ + left: left, + right: right, + } +} + +// AddNum 给 MedianFinder 添加数 +func (mf *MedianFinder) AddNum(n int) { + if mf.left.Len() == mf.right.Len() { + heap.Push(mf.left, n) + } else { + heap.Push(mf.right, n) + } + + if mf.right.Len() > 0 && mf.left.intHeap[0] > mf.right.intHeap[0] { + mf.left.intHeap[0], mf.right.intHeap[0] = mf.right.intHeap[0], mf.left.intHeap[0] + heap.Fix(mf.left, 0) + heap.Fix(mf.right, 0) + } +} + +// FindMedian 给出 Median +func (mf *MedianFinder) FindMedian() float64 { + if mf.left.Len() == mf.right.Len() { + return float64(mf.left.intHeap[0]+mf.right.intHeap[0]) / 2 + } + return float64(mf.left.intHeap[0]) +} + +/** + * Your MedianFinder object will be instantiated and called as such: + * obj := Constructor(); + * obj.AddNum(num); + * param_2 := obj.FindMedian(); + */ + +// maxHeap.intHeap[0] == max(maxHeap.intHeap) +type maxHeap struct { + intHeap +} + +func (h maxHeap) Less(i, j int) bool { + return h.intHeap[i] > h.intHeap[j] +} + +// minHeap.intHeap[0] == min(minHeap.intHeap) +type minHeap struct { + intHeap +} + +// intHeap 实现了 heap 的接口 +type intHeap []int + +func (h intHeap) Len() int { + return len(h) +} + +func (h intHeap) Less(i, j int) bool { + return h[i] < h[j] +} + +func (h intHeap) Swap(i, j int) { + h[i], h[j] = h[j], h[i] +} +func (h *intHeap) Push(x interface{}) { + // Push 使用 *h,是因为 + // Push 增加了 h 的长度 + *h = append(*h, x.(int)) +} + +func (h *intHeap) Pop() interface{} { + // Pop 使用 *h ,是因为 + // Pop 减短了 h 的长度 + res := (*h)[len(*h)-1] + *h = (*h)[0 : len(*h)-1] + return res +} diff --git a/Algorithms/0295.find-median-from-data-stream/find-median-from-data-stream_test.go b/Algorithms/0295.find-median-from-data-stream/find-median-from-data-stream_test.go new file mode 100755 index 000000000..3f2a35cf9 --- /dev/null +++ b/Algorithms/0295.find-median-from-data-stream/find-median-from-data-stream_test.go @@ -0,0 +1,40 @@ +package Problem0295 + +import ( + "math/rand" + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_MedianFinder(t *testing.T) { + ast := assert.New(t) + + mf := Constructor() + + for i := 1; i < 10; i++ { + mf.AddNum(i) + ast.Equal(float64(1+i)/2, mf.FindMedian(), "median of %v %v", mf.left.intHeap, mf.right.intHeap) + } + + mf = Constructor() + for i := -1; i >= -10; i-- { + mf.AddNum(i) + ast.Equal(float64(-1+i)/2, mf.FindMedian(), "median of %v %v", mf.left.intHeap, mf.right.intHeap) + } + + // 没有用到 Pop 这里只为了 100% 覆盖率 + mf.left.Pop() +} + +func Benchmark_MedianFinder(b *testing.B) { + size := 100 + mf := Constructor() + + for i := 0; i < b.N; i++ { + for j := 0; j < size; j++ { + mf.AddNum(rand.Int()) + mf.FindMedian() + } + } +} diff --git a/Algorithms/0299.bulls-and-cows/README.md b/Algorithms/0299.bulls-and-cows/README.md new file mode 100755 index 000000000..c83e4a86d --- /dev/null +++ b/Algorithms/0299.bulls-and-cows/README.md @@ -0,0 +1,33 @@ +# [299. Bulls and Cows](https://leetcode.com/problems/bulls-and-cows/) + +## 题目 + +You are playing the following Bulls and Cows game with your friend: You write down a number and ask your friend to guess what the number is. Each time your friend makes a guess, you provide a hint that indicates how many digits in said guess match your secret number exactly in both digit and position (called "bulls") and how many digits match the secret number but locate in the wrong position (called "cows"). Your friend will use successive guesses and hints to eventually derive the secret number. + +For example: + +```text +Secret number: "1807" +Friend's guess: "7810" +``` + +Hint: 1 bull and 3 cows. (The bull is 8, the cows are 0, 1 and 7.) + +Write a function to return a hint according to the secret number and friend's guess, use A to indicate the bulls and B to indicate the cows. In the above example, your function should return "1A3B". + +Please note that both secret number and friend's guess may contain duplicate digits, for example: + +```text +Secret number: "1123" +Friend's guess: "0111" +``` + +In this case, the 1st 1 in friend's guess is a bull, the 2nd or 3rd 1 is a cow, and your function should return "1A1B". + +You may assume that the secret number and your friend's guess only contain digits, and their lengths are always equal. + +Credits:Special thanks to @jeantimex for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0299.bulls-and-cows/bulls-and-cows.go b/Algorithms/0299.bulls-and-cows/bulls-and-cows.go new file mode 100755 index 000000000..e82ca0a44 --- /dev/null +++ b/Algorithms/0299.bulls-and-cows/bulls-and-cows.go @@ -0,0 +1,38 @@ +package Problem0299 + +import "strconv" + +func getHint(secret string, guess string) string { + var bull, cow int + // countS[n] > 0 表示 数字 n 在 secret 前面出现过,且没有被匹配为 bull + // countG[n] > 0 表示 数字 n 在 guess 前面出现过,且没有被匹配为 bull + var countS, countG [10]int + + size := len(secret) + for i := 0; i < size; i++ { + ns := int(secret[i] - '0') + ng := int(guess[i] - '0') + + if ns == ng { + bull++ + } else { + // 检查 ns 能否在 guess[:i] 中匹配为 cow + if countG[ns] > 0 { + cow++ + countG[ns]-- + } else { + countS[ns]++ + } + + // 检查 ng 能否在 secret[:i] 中匹配为 cow + if countS[ng] > 0 { + cow++ + countS[ng]-- + } else { + countG[ng]++ + } + } + } + + return strconv.Itoa(bull) + "A" + strconv.Itoa(cow) + "B" +} diff --git a/Algorithms/0299.bulls-and-cows/bulls-and-cows_test.go b/Algorithms/0299.bulls-and-cows/bulls-and-cows_test.go new file mode 100755 index 000000000..2f86987a1 --- /dev/null +++ b/Algorithms/0299.bulls-and-cows/bulls-and-cows_test.go @@ -0,0 +1,47 @@ +package Problem0299 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + secret string + guess string + ans string +}{ + + { + "1807", + "7810", + "1A3B", + }, + + { + "1123456789", + "0111111111", + "1A1B", + }, + + // 可以有多个 testcase +} + +func Test_getHint(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, getHint(tc.secret, tc.guess), "输入:%v", tc) + } +} + +func Benchmark_getHint(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + getHint(tc.secret, tc.guess) + } + } +} diff --git a/Algorithms/0300.longest-increasing-subsequence/README.md b/Algorithms/0300.longest-increasing-subsequence/README.md new file mode 100755 index 000000000..eed81d7b9 --- /dev/null +++ b/Algorithms/0300.longest-increasing-subsequence/README.md @@ -0,0 +1,21 @@ +# [300. Longest Increasing Subsequence](https://leetcode.com/problems/longest-increasing-subsequence/) + +## 题目 + +Given an unsorted array of integers, find the length of longest increasing subsequence. + +For example, + +Given [10, 9, 2, 5, 3, 7, 101, 18], + +The longest increasing subsequence is [2, 3, 7, 101], therefore the length is 4. Note that there may be more than one LIS combination, it is only necessary for you to return the length. + +Your algorithm should run in O(n2) complexity. + +Follow up: Could you improve it to O(n log n) time complexity? + +Credits:Special thanks to @pbrother for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0300.longest-increasing-subsequence/longest-increasing-subsequence.go b/Algorithms/0300.longest-increasing-subsequence/longest-increasing-subsequence.go new file mode 100755 index 000000000..ea8adfd63 --- /dev/null +++ b/Algorithms/0300.longest-increasing-subsequence/longest-increasing-subsequence.go @@ -0,0 +1,22 @@ +package Problem0300 + +import "sort" + +func lengthOfLIS(nums []int) int { + tails := make([]int, 0, len(nums)) + + for _, n := range nums { + at := sort.SearchInts(tails, n) + if at == len(tails) { + // n 比 tails 中所有的数都大 + // 把 n 放入 tails 的尾部 + tails = append(tails, n) + } else if tails[at] > n { + // tails[at-1] < n < tails[at] + // tails[at] = n, 不会改变 tail 的递增性,却增加了加入更多数的可能性 + tails[at] = n + } + } + + return len(tails) +} diff --git a/Algorithms/0300.longest-increasing-subsequence/longest-increasing-subsequence_test.go b/Algorithms/0300.longest-increasing-subsequence/longest-increasing-subsequence_test.go new file mode 100755 index 000000000..a8ace7c48 --- /dev/null +++ b/Algorithms/0300.longest-increasing-subsequence/longest-increasing-subsequence_test.go @@ -0,0 +1,59 @@ +package Problem0300 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans int +}{ + + { + []int{3, 5, 6, 2, 5, 4, 19, 5, 6, 7, 12}, + 6, + }, + + { + []int{10, 9, 2, 3, 8, 1, 4, 5, 6, 101, 18}, + 6, + }, + + { + []int{10, 9, 2, 5, 3, 3, 7, 101, 18}, + 4, + }, + + { + []int{10, 9, 2, 5, 3, 7, 101, 18}, + 4, + }, + + { + []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141, 1142, 1143, 1144, 1145, 1146, 1147, 1148, 1149, 1150, 1151, 1152, 1153, 1154, 1155, 1156, 1157, 1158, 1159, 1160, 1161, 1162, 1163, 1164, 1165, 1166, 1167, 1168, 1169, 1170, 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1179, 1180, 1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 1190, 1191, 1192, 1193, 1194, 1195, 1196, 1197, 1198, 1199, 1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 1220, 1221, 1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1239, 1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1259, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, 1269, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1279, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289, 1290, 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 1310, 1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 1320, 1321, 1322, 1323, 1324, 1325, 1326, 1327, 1328, 1329, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 1350, 1351, 1352, 1353, 1354, 1355, 1356, 1357, 1358, 1359, 1360, 1361, 1362, 1363, 1364, 1365, 1366, 1367, 1368, 1369, 1370, 1371, 1372, 1373, 1374, 1375, 1376, 1377, 1378, 1379, 1380, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 1390, 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 1410, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 1420, 1421, 1422, 1423, 1424, 1425, 1426, 1427, 1428, 1429, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, 1458, 1459, 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 1470, 1471, 1472, 1473, 1474, 1475, 1476, 1477, 1478, 1479, 1480, 1481, 1482, 1483, 1484, 1485, 1486, 1487, 1488, 1489, 1490, 1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, 1499, 1500, 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 1510, 1511, 1512, 1513, 1514, 1515, 1516, 1517, 1518, 1519, 1520, 1521, 1522, 1523, 1524, 1525, 1526, 1527, 1528, 1529, 1530, 1531, 1532, 1533, 1534, 1535, 1536, 1537, 1538, 1539, 1540, 1541, 1542, 1543, 1544, 1545, 1546, 1547, 1548, 1549, 1550, 1551, 1552, 1553, 1554, 1555, 1556, 1557, 1558, 1559, 1560, 1561, 1562, 1563, 1564, 1565, 1566, 1567, 1568, 1569, 1570, 1571, 1572, 1573, 1574, 1575, 1576, 1577, 1578, 1579, 1580, 1581, 1582, 1583, 1584, 1585, 1586, 1587, 1588, 1589, 1590, 1591, 1592, 1593, 1594, 1595, 1596, 1597, 1598, 1599, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 1610, 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1618, 1619, 1620, 1621, 1622, 1623, 1624, 1625, 1626, 1627, 1628, 1629, 1630, 1631, 1632, 1633, 1634, 1635, 1636, 1637, 1638, 1639, 1640, 1641, 1642, 1643, 1644, 1645, 1646, 1647, 1648, 1649, 1650, 1651, 1652, 1653, 1654, 1655, 1656, 1657, 1658, 1659, 1660, 1661, 1662, 1663, 1664, 1665, 1666, 1667, 1668, 1669, 1670, 1671, 1672, 1673, 1674, 1675, 1676, 1677, 1678, 1679, 1680, 1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688, 1689, 1690, 1691, 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1699, 1700, 1701, 1702, 1703, 1704, 1705, 1706, 1707, 1708, 1709, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 1718, 1719, 1720, 1721, 1722, 1723, 1724, 1725, 1726, 1727, 1728, 1729, 1730, 1731, 1732, 1733, 1734, 1735, 1736, 1737, 1738, 1739, 1740, 1741, 1742, 1743, 1744, 1745, 1746, 1747, 1748, 1749, 1750, 1751, 1752, 1753, 1754, 1755, 1756, 1757, 1758, 1759, 1760, 1761, 1762, 1763, 1764, 1765, 1766, 1767, 1768, 1769, 1770, 1771, 1772, 1773, 1774, 1775, 1776, 1777, 1778, 1779, 1780, 1781, 1782, 1783, 1784, 1785, 1786, 1787, 1788, 1789, 1790, 1791, 1792, 1793, 1794, 1795, 1796, 1797, 1798, 1799, 1800, 1801, 1802, 1803, 1804, 1805, 1806, 1807, 1808, 1809, 1810, 1811, 1812, 1813, 1814, 1815, 1816, 1817, 1818, 1819, 1820, 1821, 1822, 1823, 1824, 1825, 1826, 1827, 1828, 1829, 1830, 1831, 1832, 1833, 1834, 1835, 1836, 1837, 1838, 1839, 1840, 1841, 1842, 1843, 1844, 1845, 1846, 1847, 1848, 1849, 1850, 1851, 1852, 1853, 1854, 1855, 1856, 1857, 1858, 1859, 1860, 1861, 1862, 1863, 1864, 1865, 1866, 1867, 1868, 1869, 1870, 1871, 1872, 1873, 1874, 1875, 1876, 1877, 1878, 1879, 1880, 1881, 1882, 1883, 1884, 1885, 1886, 1887, 1888, 1889, 1890, 1891, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 1900, 1901, 1902, 1903, 1904, 1905, 1906, 1907, 1908, 1909, 1910, 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 1920, 1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928, 1929, 1930, 1931, 1932, 1933, 1934, 1935, 1936, 1937, 1938, 1939, 1940, 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, 1959, 1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1969, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 2030, 2031, 2032, 2033, 2034, 2035, 2036, 2037, 2038, 2039, 2040, 2041, 2042, 2043, 2044, 2045, 2046, 2047, 2048, 2049, 2050, 2051, 2052, 2053, 2054, 2055, 2056, 2057, 2058, 2059, 2060, 2061, 2062, 2063, 2064, 2065, 2066, 2067, 2068, 2069, 2070, 2071, 2072, 2073, 2074, 2075, 2076, 2077, 2078, 2079, 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2087, 2088, 2089, 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2097, 2098, 2099, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114, 2115, 2116, 2117, 2118, 2119, 2120, 2121, 2122, 2123, 2124, 2125, 2126, 2127, 2128, 2129, 2130, 2131, 2132, 2133, 2134, 2135, 2136, 2137, 2138, 2139, 2140, 2141, 2142, 2143, 2144, 2145, 2146, 2147, 2148, 2149, 2150, 2151, 2152, 2153, 2154, 2155, 2156, 2157, 2158, 2159, 2160, 2161, 2162, 2163, 2164, 2165, 2166, 2167, 2168, 2169, 2170, 2171, 2172, 2173, 2174, 2175, 2176, 2177, 2178, 2179, 2180, 2181, 2182, 2183, 2184, 2185, 2186, 2187, 2188, 2189, 2190, 2191, 2192, 2193, 2194, 2195, 2196, 2197, 2198, 2199, 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 2210, 2211, 2212, 2213, 2214, 2215, 2216, 2217, 2218, 2219, 2220, 2221, 2222, 2223, 2224, 2225, 2226, 2227, 2228, 2229, 2230, 2231, 2232, 2233, 2234, 2235, 2236, 2237, 2238, 2239, 2240, 2241, 2242, 2243, 2244, 2245, 2246, 2247, 2248, 2249, 2250, 2251, 2252, 2253, 2254, 2255, 2256, 2257, 2258, 2259, 2260, 2261, 2262, 2263, 2264, 2265, 2266, 2267, 2268, 2269, 2270, 2271, 2272, 2273, 2274, 2275, 2276, 2277, 2278, 2279, 2280, 2281, 2282, 2283, 2284, 2285, 2286, 2287, 2288, 2289, 2290, 2291, 2292, 2293, 2294, 2295, 2296, 2297, 2298, 2299, 2300, 2301, 2302, 2303, 2304, 2305, 2306, 2307, 2308, 2309, 2310, 2311, 2312, 2313, 2314, 2315, 2316, 2317, 2318, 2319, 2320, 2321, 2322, 2323, 2324, 2325, 2326, 2327, 2328, 2329, 2330, 2331, 2332, 2333, 2334, 2335, 2336, 2337, 2338, 2339, 2340, 2341, 2342, 2343, 2344, 2345, 2346, 2347, 2348, 2349, 2350, 2351, 2352, 2353, 2354, 2355, 2356, 2357, 2358, 2359, 2360, 2361, 2362, 2363, 2364, 2365, 2366, 2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, 2380, 2381, 2382, 2383, 2384, 2385, 2386, 2387, 2388, 2389, 2390, 2391, 2392, 2393, 2394, 2395, 2396, 2397, 2398, 2399, 2400, 2401, 2402, 2403, 2404, 2405, 2406, 2407, 2408, 2409, 2410, 2411, 2412, 2413, 2414, 2415, 2416, 2417, 2418, 2419, 2420, 2421, 2422, 2423, 2424, 2425, 2426, 2427, 2428, 2429, 2430, 2431, 2432, 2433, 2434, 2435, 2436, 2437, 2438, 2439, 2440, 2441, 2442, 2443, 2444, 2445, 2446, 2447, 2448, 2449, 2450, 2451, 2452, 2453, 2454, 2455, 2456, 2457, 2458, 2459, 2460, 2461, 2462, 2463, 2464, 2465, 2466, 2467, 2468, 2469, 2470, 2471, 2472, 2473, 2474, 2475, 2476, 2477, 2478, 2479, 2480, 2481, 2482, 2483, 2484, 2485, 2486, 2487, 2488, 2489, 2490, 2491, 2492, 2493, 2494, 2495, 2496, 2497, 2498, 2499, 2500}, + 2500, + }, + + // 可以有多个 testcase +} + +func Test_lengthOfLIS(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, lengthOfLIS(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_lengthOfLIS(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + lengthOfLIS(tc.nums) + } + } +} diff --git a/Algorithms/0301.remove-invalid-parentheses/README.md b/Algorithms/0301.remove-invalid-parentheses/README.md new file mode 100755 index 000000000..f8331d260 --- /dev/null +++ b/Algorithms/0301.remove-invalid-parentheses/README.md @@ -0,0 +1,21 @@ +# [301. Remove Invalid Parentheses](https://leetcode.com/problems/remove-invalid-parentheses/) + +## 题目 + +Remove the minimum number of invalid parentheses in order to make the input string valid. Return all possible results. + +Note: The input string may contain letters other than the parentheses ( and ). + +Examples: + +```text +"()())()" -> ["()()()", "(())()"] +"(a)())()" -> ["(a)()()", "(a())()"] +")(" -> [""] +``` + +Credits:Special thanks to @hpplayer for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0301.remove-invalid-parentheses/remove-invalid-parentheses.go b/Algorithms/0301.remove-invalid-parentheses/remove-invalid-parentheses.go new file mode 100755 index 000000000..16c576ff2 --- /dev/null +++ b/Algorithms/0301.remove-invalid-parentheses/remove-invalid-parentheses.go @@ -0,0 +1,82 @@ +package Problem0301 + +func removeInvalidParentheses(s string) []string { + res := []string{} + return dfs(s, "()", 0, 0, res) +} + +func dfs(s, pair string, first, last int, res []string) []string { + var i, j, count int + var temp string + + // s[:last] 是合法的,即对于 pair 配对来说,没有无法配对的 pair[1] + for j = last; j < len(s); j++ { + if s[j] == pair[0] { + count++ + } else if s[j] == pair[1] { + count-- + } + if count >= 0 { + continue + } + // count == -1 + // 此时 s[:j+1] 中,多了一个 pair[1] + // 需要从 s[i:j+1]中,删除一个 pair[1],使得删除后的 s[:j] 是合法的 + for i = first; i <= j; i++ { + // 此时 s[:j+1] 会有两种情况 + // 情况①: + // i j + // ()())() + // 0123456 + // s[i] == pair[1] && s[i-1] != pair[1] 保证被删除的是 s[1] 或 s[3] + // 避免了,删除 s[1] 或 s[3] 或 s[4] 后导致的重复情况 + // 情况②: + // i j + // ((())))))( + // 0123456789 + // s[i] == pair[1] && i == first 保证了在删除 s[3] 后面的递归中, + // 被删除的是 s[4] 和 s[5],避免了由于 s[i-1] != pair[1] 导致的遗漏 + if s[i] == pair[1] && (i == first || s[i-1] != pair[1]) { + temp = s[:i] + s[i+1:] + // i 是对删除元素位置的一个记录 + // 换一个 i 就是对 res 的一次划分 + res = dfs(temp, pair, i, j, res) + } + } + + return res + } + + // 此时 j == len(s),由于 s[:j] 始终都是相对于 pair 合法的 + // 因为不合法的话,就会进入 for i 循环进行删除处理。 + // 所以,此时 s 相对于 pair 就是合法的啦 + + // 上面的代码是 + // 从左往右,删除了 "()" pair 中无法配对的 ")" + // 还需要 + // 从右往左,去删除 "()" pair 中无法配对的 "(" + // 通过同时逆转 s 和 pair,可以重用前面的代码,完成上述工作 + reversed := reverse(s) + + if pair == "()" { + return dfs(reversed, ")(", 0, 0, res) + } + + // 此时 pair == ")(" + // 说明: + // s 是逆转的 + // reversed 才是正常顺序的。 + // reversed 已经完成了两个方向的删除工作。就是最后的答案了。 + return append(res, reversed) +} + +func reverse(s string) string { + buf := []byte(s) + i, j := 0, len(buf)-1 + for i < j { + buf[i], buf[j] = buf[j], buf[i] + i++ + j-- + } + return string(buf) +} diff --git a/Algorithms/0301.remove-invalid-parentheses/remove-invalid-parentheses_test.go b/Algorithms/0301.remove-invalid-parentheses/remove-invalid-parentheses_test.go new file mode 100755 index 000000000..e8089cc0b --- /dev/null +++ b/Algorithms/0301.remove-invalid-parentheses/remove-invalid-parentheses_test.go @@ -0,0 +1,45 @@ +package Problem0301 + +import ( + "fmt" + "sort" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + ans []string +}{ + + {"(a)())()", []string{"(a)()()", "(a())()"}}, + {"()())()", []string{"()()()", "(())()"}}, + {"()())())", []string{"(()())", "(())()", "()(())", "()()()"}}, + {"((())))))((()", []string{"((()))()"}}, + {")d))", []string{"d"}}, + {")(", []string{""}}, + + // 可以有多个 testcase +} + +func Test_removeInvalidParentheses(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ans := removeInvalidParentheses(tc.s) + sort.Strings(ans) + sort.Strings(tc.ans) + ast.Equal(tc.ans, ans, "输入:%v", tc) + } +} + +func Benchmark_removeInvalidParentheses(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + removeInvalidParentheses(tc.s) + } + } +} diff --git a/Algorithms/0303.range-sum-query-immutable/README.md b/Algorithms/0303.range-sum-query-immutable/README.md new file mode 100755 index 000000000..226d65a8a --- /dev/null +++ b/Algorithms/0303.range-sum-query-immutable/README.md @@ -0,0 +1,24 @@ +# [303. Range Sum Query - Immutable](https://leetcode.com/problems/range-sum-query-immutable/) + +## 题目 + +Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. + +Example: + +```text +Given nums = [-2, 0, 3, -5, 2, -1] + +sumRange(0, 2) -> 1 +sumRange(2, 5) -> -1 +sumRange(0, 5) -> -3 +``` + +Note: + +1. You may assume that the array does not change. +1. There are many calls to sumRange function. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0303.range-sum-query-immutable/range-sum-query-immutable.go b/Algorithms/0303.range-sum-query-immutable/range-sum-query-immutable.go new file mode 100755 index 000000000..a40a72970 --- /dev/null +++ b/Algorithms/0303.range-sum-query-immutable/range-sum-query-immutable.go @@ -0,0 +1,29 @@ +package Problem0303 + +// NumArray 是切片的和切片 +type NumArray struct { + dp []int +} + +// Constructor 返回 NumArray +func Constructor(nums []int) NumArray { + size := len(nums) + // dp[i+1] == SumRange(0,i) + dp := make([]int, size+1) + for i := 1; i <= size; i++ { + dp[i] = dp[i-1] + nums[i-1] + } + + return NumArray{dp: dp} +} + +// SumRange (i,j) == sum(nums[i:j+1]) +func (na *NumArray) SumRange(i int, j int) int { + return na.dp[j+1] - na.dp[i] +} + +/** + * Your NumArray object will be instantiated and called as such: + * obj := Constructor(nums); + * param_1 := obj.SumRange(i,j); + */ diff --git a/Algorithms/0303.range-sum-query-immutable/range-sum-query-immutable_test.go b/Algorithms/0303.range-sum-query-immutable/range-sum-query-immutable_test.go new file mode 100755 index 000000000..754dbc7c9 --- /dev/null +++ b/Algorithms/0303.range-sum-query-immutable/range-sum-query-immutable_test.go @@ -0,0 +1,54 @@ +package Problem0303 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +var nums = []int{-2, 0, 3, -5, 2, -1} + +// tcs is testcase slice +var tcs = []struct { + i, j int + ans int +}{ + + { + 0, 2, + 1, + }, + + { + 2, 5, + -1, + }, + + { + 0, 5, + -3, + }, + // 可以有多个 testcase +} + +func Test_SumRange(t *testing.T) { + ast := assert.New(t) + + na := Constructor(nums) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, na.SumRange(tc.i, tc.j), "输入:%v,%v,%v", nums, na.dp, tc) + } +} + +func Benchmark_Constructor(b *testing.B) { + na := Constructor(nums) + + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + na.SumRange(tc.i, tc.j) + } + } +} diff --git a/Algorithms/0304.range-sum-query-2d-immutable/README.md b/Algorithms/0304.range-sum-query-2d-immutable/README.md new file mode 100755 index 000000000..4f31a6589 --- /dev/null +++ b/Algorithms/0304.range-sum-query-2d-immutable/README.md @@ -0,0 +1,35 @@ +# [304. Range Sum Query 2D - Immutable](https://leetcode.com/problems/range-sum-query-2d-immutable/) + +## 题目 + +Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined by its upper left corner (row1, col1) and lower right corner (row2, col2). + +![range_sum_query_2d](range_sum_query_2d.png) + +The above rectangle (with the red border) is defined by (row1, col1) = (2, 1) and (row2, col2) = (4, 3), which contains sum = 8. + +Example: + +```text +Given matrix = [ + [3, 0, 1, 4, 2], + [5, 6, 3, 2, 1], + [1, 2, 0, 1, 5], + [4, 1, 0, 1, 7], + [1, 0, 3, 0, 5] +] + +sumRegion(2, 1, 4, 3) -> 8 +sumRegion(1, 1, 2, 2) -> 11 +sumRegion(1, 2, 2, 4) -> 12 +``` + +Note: + +1. You may assume that the matrix does not change. +1. There are many calls to sumRegion function. +1. You may assume that row1 ≤ row2 and col1 ≤ col2. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0304.range-sum-query-2d-immutable/range-sum-query-2d-immutable.go b/Algorithms/0304.range-sum-query-2d-immutable/range-sum-query-2d-immutable.go new file mode 100755 index 000000000..0e6f82709 --- /dev/null +++ b/Algorithms/0304.range-sum-query-2d-immutable/range-sum-query-2d-immutable.go @@ -0,0 +1,41 @@ +package Problem0304 + +// NumMatrix 包含了需要求和的矩阵 +type NumMatrix struct { + dp [][]int +} + +// Constructor 创建 NumMatrix +func Constructor(matrix [][]int) NumMatrix { + var m, n int + if len(matrix) == 0 || len(matrix[0]) == 0 { + m, n = 0, 0 + } else { + m, n = len(matrix), len(matrix[0]) + } + + // dp[i][j] 表示 sumRegion(0,i-1,0,j-1) + dp := make([][]int, m+1) + for i := range dp { + dp[i] = make([]int, n+1) + } + + for i := 1; i <= m; i++ { + for j := 1; j <= n; j++ { + dp[i][j] = matrix[i-1][j-1] + dp[i-1][j] + dp[i][j-1] - dp[i-1][j-1] + } + } + + return NumMatrix{dp: dp} +} + +// SumRegion 求和 +func (nm *NumMatrix) SumRegion(row1 int, col1 int, row2 int, col2 int) int { + return nm.dp[row2+1][col2+1] - nm.dp[row2+1][col1] - nm.dp[row1][col2+1] + nm.dp[row1][col1] +} + +/** + * Your NumMatrix object will be instantiated and called as such: + * obj := Constructor(matrix); + * param_1 := obj.SumRegion(row1,col1,row2,col2); + */ diff --git a/Algorithms/0304.range-sum-query-2d-immutable/range-sum-query-2d-immutable_test.go b/Algorithms/0304.range-sum-query-2d-immutable/range-sum-query-2d-immutable_test.go new file mode 100755 index 000000000..30f4cb98d --- /dev/null +++ b/Algorithms/0304.range-sum-query-2d-immutable/range-sum-query-2d-immutable_test.go @@ -0,0 +1,70 @@ +package Problem0304 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +var matrix = [][]int{ + []int{3, 0, 1, 4, 2}, + []int{5, 6, 3, 2, 1}, + []int{1, 2, 0, 1, 5}, + []int{4, 1, 0, 1, 7}, + []int{1, 0, 3, 0, 5}, +} + +// tcs is testcase slice +var tcs = []struct { + row1, col1, row2, col2 int + ans int +}{ + + { + 2, 1, 4, 3, + 8, + }, + + { + 1, 1, 2, 2, + 11, + }, + + { + 1, 2, 2, 4, + 12, + }, + + // 可以有多个 testcase +} + +func Test_SumRegion(t *testing.T) { + ast := assert.New(t) + + nm := Constructor(matrix) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, nm.SumRegion(tc.row1, tc.col1, tc.row2, tc.col2), "输入:%v", tc) + } +} + +func Test_Constructor(t *testing.T) { + ast := assert.New(t) + + actual := Constructor([][]int{}) + expected := [][]int{[]int{0}} + + ast.Equal(expected, actual.dp) +} + +func Benchmark_SumRegion(b *testing.B) { + nm := Constructor(matrix) + + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + nm.SumRegion(tc.row1, tc.col1, tc.row2, tc.col2) + } + } +} diff --git a/Algorithms/0304.range-sum-query-2d-immutable/range_sum_query_2d.png b/Algorithms/0304.range-sum-query-2d-immutable/range_sum_query_2d.png new file mode 100644 index 000000000..9da1a76f9 Binary files /dev/null and b/Algorithms/0304.range-sum-query-2d-immutable/range_sum_query_2d.png differ diff --git a/Algorithms/0306.additive-number/README.md b/Algorithms/0306.additive-number/README.md new file mode 100755 index 000000000..cbce9f44d --- /dev/null +++ b/Algorithms/0306.additive-number/README.md @@ -0,0 +1,34 @@ +# [306. Additive Number](https://leetcode.com/problems/additive-number/) + +## 题目 + +Additive number is a string whose digits can form additive sequence. + +A valid additive sequence should contain at least three numbers. Except for the first two numbers, each subsequent number in the sequence must be the sum of the preceding two. + +For example: + +"112358" is an additive number because the digits can form an additive sequence: 1, 1, 2, 3, 5, 8. + +```text +1 + 1 = 2, 1 + 2 = 3, 2 + 3 = 5, 3 + 5 = 8 +``` + +"199100199" is also an additive number, the additive sequence is: 1, 99, 100, 199. + +```text +1 + 99 = 100, 99 + 100 = 199 +``` + +Note: Numbers in the additive sequence cannot have leading zeros, so sequence 1, 2, 03 or 1, 02, 3 is invalid. + +Given a string containing only digits '0'-'9', write a function to determine if it's an additive number. + +Follow up: +How would you handle overflow for very large input integers? + +Credits:Special thanks to @jeantimex for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0306.additive-number/additive-number.go b/Algorithms/0306.additive-number/additive-number.go new file mode 100755 index 000000000..4a693c082 --- /dev/null +++ b/Algorithms/0306.additive-number/additive-number.go @@ -0,0 +1,64 @@ +package Problem0306 + +import ( + "strconv" +) + +func isAdditiveNumber(num string) bool { + if len(num) < 3 { + return false + } + + var dfs func(int, int, string) bool + dfs = func(n1, n2 int, num string) bool { + n3 := n1 + n2 + s3 := strconv.Itoa(n3) + if len(s3) > len(num) { + return false + } + + if len(s3) == len(num) { + if s3 == num { + return true + } + return false + } + + if s3 != num[:len(s3)] { + return false + } + + return dfs(n2, n3, num[len(s3):]) + } + + // n1 = num[:i] + // n2 = num[i:j] + // n3 = num[j:j+x], x = 1,2,3.. + var i, j int + // Jmax 是 j 的最大值 + // n1, n2 中较大数的 size 的最小值为 (j+1)/2 + // n3 的 size 的最大值为 len(num)-j + // 当 (j+1)/2 <= len(num)-j 才有可能使得 n1+n2==n3 成立 + // 可得 j <= (2* len(num)-1)/3 < len(num) * 2 / 3 + // 考虑到 int 除法的特性 + // Jmax = len(num) * 2 / 3 + Jmax := len(num) * 2 / 3 + + for i = 1; i <= Jmax-1; i++ { + if len(num[:i]) > 1 && num[0] == '0' { + return false + } + for j = i + 1; j <= Jmax; j++ { + if len(num[i:j]) > 1 && num[i] == '0' { + break + } + n1, _ := strconv.Atoi(num[:i]) + n2, _ := strconv.Atoi(num[i:j]) + if dfs(n1, n2, num[j:]) { + return true + } + } + } + + return false +} diff --git a/Algorithms/0306.additive-number/additive-number_test.go b/Algorithms/0306.additive-number/additive-number_test.go new file mode 100755 index 000000000..052e6c5df --- /dev/null +++ b/Algorithms/0306.additive-number/additive-number_test.go @@ -0,0 +1,48 @@ +package Problem0306 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + num string + ans bool +}{ + + {"0000000000", true}, + {"10112", true}, + {"101", true}, + {"112358", true}, + {"199100199", true}, + {"1991001991", false}, + {"11", false}, + {"00123", false}, + {"100100200", true}, + {"100000100000200000", true}, + {"9999991998", true}, + {"99911000", true}, + {"9981999", true}, + + // 可以有多个 testcase +} + +func Test_isAdditiveNumber(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, isAdditiveNumber(tc.num), "输入:%v", tc) + } +} + +func Benchmark_isAdditiveNumber(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + isAdditiveNumber(tc.num) + } + } +} diff --git a/Algorithms/0307.range-sum-query-mutable/README.md b/Algorithms/0307.range-sum-query-mutable/README.md new file mode 100755 index 000000000..06276ae21 --- /dev/null +++ b/Algorithms/0307.range-sum-query-mutable/README.md @@ -0,0 +1,26 @@ +# [307. Range Sum Query - Mutable](https://leetcode.com/problems/range-sum-query-mutable/) + +## 题目 + +Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. + +The update(i, val) function modifies nums by updating the element at index i to val. + +Example: + +```text +Given nums = [1, 3, 5] + +sumRange(0, 2) -> 9 +update(1, 2) +sumRange(0, 2) -> 8 +``` + +Note: + +1. The array is only modifiable by the update function. +1. You may assume the number of calls to update and sumRange function is distributed evenly. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0307.range-sum-query-mutable/range-sum-query-mutable.go b/Algorithms/0307.range-sum-query-mutable/range-sum-query-mutable.go new file mode 100755 index 000000000..ebda608b3 --- /dev/null +++ b/Algorithms/0307.range-sum-query-mutable/range-sum-query-mutable.go @@ -0,0 +1,32 @@ +package Problem0307 + +// NumArray 是 nums 的和的切片 +type NumArray struct { + nums []int +} + +// Constructor 返回 NumArray +func Constructor(nums []int) NumArray { + return NumArray{nums: nums} +} + +// Update 更新 nums +func (na *NumArray) Update(i int, v int) { + na.nums[i] = v +} + +// SumRange 返回 sum(nums[i:j+1]) +func (na *NumArray) SumRange(i int, j int) int { + res := 0 + for k := i; k <= j; k++ { + res += na.nums[k] + } + return res +} + +/** + * Your NumArray object will be instantiated and called as such: + * obj := Constructor(nums); + * obj.Update(i,val); + * param_2 := obj.SumRange(i,j); + */ diff --git a/Algorithms/0307.range-sum-query-mutable/range-sum-query-mutable_test.go b/Algorithms/0307.range-sum-query-mutable/range-sum-query-mutable_test.go new file mode 100755 index 000000000..7323e5758 --- /dev/null +++ b/Algorithms/0307.range-sum-query-mutable/range-sum-query-mutable_test.go @@ -0,0 +1,35 @@ +package Problem0307 + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_SumRange(t *testing.T) { + ast := assert.New(t) + + nums := []int{1, 3, 5} + + na := Constructor(nums) + + ast.Equal(9, na.SumRange(0, 2), "update 前,SumRange(0, 2)") + + na.Update(1, 2) + + ast.Equal(8, na.SumRange(0, 2), "update 后,SumRange(0, 2)") +} + +func Test_SumRange_2(t *testing.T) { + ast := assert.New(t) + + nums := []int{-1} + + na := Constructor(nums) + + ast.Equal(-1, na.SumRange(0, 0), "update 前,SumRange(0, 0)") + + na.Update(0, 1) + + ast.Equal(1, na.SumRange(0, 0), "update 后,SumRange(0, 2)") +} diff --git a/Algorithms/0309.best-time-to-buy-and-sell-stock-with-cooldown/README.md b/Algorithms/0309.best-time-to-buy-and-sell-stock-with-cooldown/README.md new file mode 100755 index 000000000..447804246 --- /dev/null +++ b/Algorithms/0309.best-time-to-buy-and-sell-stock-with-cooldown/README.md @@ -0,0 +1,27 @@ +# [309. Best Time to Buy and Sell Stock with Cooldown](https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/) + +## 题目 + +Say you have an array for which the ith element is the price of a given stock on day i. + +Design an algorithm to find the maximum profit. You may complete as many transactions as you like +(ie, buy one and sell one share of the stock multiple times) with the following restrictions: + +1. You may not engage in multiple transactions at the same time (ie, you must sell the stock before you buy again). +1. After you sell your stock, you cannot buy stock on next day. (ie, cooldown 1 day) + +Example: + +```text +prices = [1, 2, 3, 0, 2] +maxProfit = 3 +transactions = [buy, sell, cooldown, buy, sell] +``` + +Credits:Special thanks to @dietpepsi for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 + +[别人的答题笔记](http://www.bijishequ.com/detail/464527) \ No newline at end of file diff --git a/Algorithms/0309.best-time-to-buy-and-sell-stock-with-cooldown/best-time-to-buy-and-sell-stock-with-cooldown.go b/Algorithms/0309.best-time-to-buy-and-sell-stock-with-cooldown/best-time-to-buy-and-sell-stock-with-cooldown.go new file mode 100755 index 000000000..a537faf1f --- /dev/null +++ b/Algorithms/0309.best-time-to-buy-and-sell-stock-with-cooldown/best-time-to-buy-and-sell-stock-with-cooldown.go @@ -0,0 +1,27 @@ +package Problem0309 + +func maxProfit(prices []int) int { + n := len(prices) + if n == 0 { + return 0 + } + + // prices[i] 表示 第 i 天的价格 + buy := make([]int, n+1) + buy[1] = 0 - prices[0] + sel := make([]int, n+1) + + for i := 2; i <= n; i++ { + buy[i] = max(buy[i-1], sel[i-2]-prices[i-1]) + sel[i] = max(sel[i-1], buy[i-1]+prices[i-1]) + } + + return sel[n] +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} diff --git a/Algorithms/0309.best-time-to-buy-and-sell-stock-with-cooldown/best-time-to-buy-and-sell-stock-with-cooldown_test.go b/Algorithms/0309.best-time-to-buy-and-sell-stock-with-cooldown/best-time-to-buy-and-sell-stock-with-cooldown_test.go new file mode 100755 index 000000000..df0f21398 --- /dev/null +++ b/Algorithms/0309.best-time-to-buy-and-sell-stock-with-cooldown/best-time-to-buy-and-sell-stock-with-cooldown_test.go @@ -0,0 +1,38 @@ +package Problem0309 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + prices []int + ans int +}{ + + {[]int{1, 2, 3, 0, 2}, 3}, + {[]int{}, 0}, + {[]int{3, 3}, 0}, + + // 可以有多个 testcase +} + +func Test_maxProfit(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, maxProfit(tc.prices), "输入:%v", tc) + } +} + +func Benchmark_maxProfit(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + maxProfit(tc.prices) + } + } +} diff --git a/Algorithms/0310.minimum-height-trees/310.100.png b/Algorithms/0310.minimum-height-trees/310.100.png new file mode 100644 index 000000000..c39b852fc Binary files /dev/null and b/Algorithms/0310.minimum-height-trees/310.100.png differ diff --git a/Algorithms/0310.minimum-height-trees/README.md b/Algorithms/0310.minimum-height-trees/README.md new file mode 100755 index 000000000..8155d3c22 --- /dev/null +++ b/Algorithms/0310.minimum-height-trees/README.md @@ -0,0 +1,56 @@ +# [310. Minimum Height Trees](https://leetcode.com/problems/minimum-height-trees/) + +## 题目 + +For a undirected graph with tree characteristics, we can choose any node as the root. The result graph is then a rooted tree. Among all possible rooted trees, those with minimum height are called minimum height trees (MHTs). +Given such a graph, write a function to find all the MHTs and return a list of their root labels. + +Format + +The graph contains n nodes which are labeled from 0 to n - 1. +You will be given the number n and a list of undirected edges (each edge is a pair of labels). + +You can assume that no duplicate edges will appear in edges. Since all edges are undirected, [0, 1] is the same as [1, 0] and thus will not appear together in edges. + +Example 1: + +```text +Given n = 4, edges = [[1, 0], [1, 2], [1, 3]] + + 0 + | + 1 + / \ + 2 3 + +return [1] +``` + +Example 2: + +```text +Given n = 6, edges = [[0, 3], [1, 3], [2, 3], [4, 3], [5, 4]] + + 0 1 2 + \ | / + 3 + | + 4 + | + 5 + +return [3, 4] +``` + +Note: + +1. According to the definition of tree on Wikipedia: “a tree is an undirected graph in which any two vertices are connected by exactly one path. In other words, any connected graph without simple cycles is a tree.” +1. The height of a rooted tree is the number of edges on the longest downward path between the root and a leaf. + +Credits:Special thanks to @dietpepsi for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 + +![100](310.100.png) \ No newline at end of file diff --git a/Algorithms/0310.minimum-height-trees/minimum-height-trees.go b/Algorithms/0310.minimum-height-trees/minimum-height-trees.go new file mode 100755 index 000000000..f0ef538ba --- /dev/null +++ b/Algorithms/0310.minimum-height-trees/minimum-height-trees.go @@ -0,0 +1,55 @@ +package Problem0310 + +func findMinHeightTrees(n int, edges [][]int) []int { + if n == 1 { + return []int{0} + } + + // 所有与 i 节点相连接的节点名称,保存在 linkNodes[i] + linkNodes := make([][]int, n) + for i := 0; i < n; i++ { + linkNodes[i] = make([]int, 0, 5) + } + + // count[i] 保存了与 i 节点链接的点的个数 + count := make([]int, n) + for _, e := range edges { + linkNodes[e[0]] = append(linkNodes[e[0]], e[1]) + linkNodes[e[1]] = append(linkNodes[e[1]], e[0]) + count[e[0]]++ + count[e[1]]++ + } + + // 收集所有的 叶子 节点 + var leafs = make([]int, 0, n) + for i := 0; i < n; i++ { + if count[i] == 1 { + leafs = append(leafs, i) + } + } + + var nd, leaf int + + // 反复裁剪掉 叶子 节点。 + // 当剩余节点数 <=2 时,就是答案 + for n > 2 { + newLeafs := make([]int, 0, len(leafs)) + for _, leaf = range leafs { + n-- + for _, nd = range linkNodes[leaf] { + count[nd]-- + if count[nd] == 1 { + newLeafs = append(newLeafs, nd) + } + } + } + leafs = newLeafs + } + + var res = make([]int, 0, len(leafs)) + for _, v := range leafs { + res = append(res, v) + } + + return res +} diff --git a/Algorithms/0310.minimum-height-trees/minimum-height-trees_test.go b/Algorithms/0310.minimum-height-trees/minimum-height-trees_test.go new file mode 100755 index 000000000..16574c2bf --- /dev/null +++ b/Algorithms/0310.minimum-height-trees/minimum-height-trees_test.go @@ -0,0 +1,72 @@ +package Problem0310 + +import ( + "sort" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + n int + edges [][]int + ans []int +}{ + { + 1, + [][]int{}, + []int{0}, + }, + + { + 6, + [][]int{[]int{0, 3}, []int{1, 3}, []int{2, 3}, []int{4, 3}, []int{5, 4}}, + []int{3, 4}, + }, + + { + 3, [][]int{[]int{0, 1}, []int{0, 2}}, + []int{0}, + }, + + { + 4, + [][]int{[]int{1, 0}, []int{1, 2}, []int{1, 3}}, + []int{1}, + }, + + { + 10002, + [][]int{[]int{0,1},[]int{1,2},[]int{0,3},[]int{0,4},[]int{3,5},[]int{0,6},[]int{3,7},[]int{7,8},[]int{4,9},[]int{6,10},[]int{1,11},[]int{5,12},[]int{2,13},[]int{13,14},[]int{6,15},[]int{1,16},[]int{9,17},[]int{17,18},[]int{4,19},[]int{12,20},[]int{1,21},[]int{4,22},[]int{13,23},[]int{22,24},[]int{11,25},[]int{8,26},[]int{16,27},[]int{0,28},[]int{22,29},[]int{26,30},[]int{9,31},[]int{16,32},[]int{7,33},[]int{17,34},[]int{11,35},[]int{0,36},[]int{15,37},[]int{23,38},[]int{33,39},[]int{3,40},[]int{33,41},[]int{40,42},[]int{5,43},[]int{33,44},[]int{38,45},[]int{3,46},[]int{14,47},[]int{1,48},[]int{31,49},[]int{2,50},[]int{19,51},[]int{43,52},[]int{18,53},[]int{33,54},[]int{6,55},[]int{27,56},[]int{37,57},[]int{13,58},[]int{54,59},[]int{13,60},[]int{59,61},[]int{24,62},[]int{5,63},[]int{32,64},[]int{61,65},[]int{7,66},[]int{36,67},[]int{55,68},[]int{20,69},[]int{62,70},[]int{33,71},[]int{45,72},[]int{35,73},[]int{33,74},[]int{74,75},[]int{45,76},[]int{7,77},[]int{4,78},[]int{48,79},[]int{40,80},[]int{32,81},[]int{72,82},[]int{60,83},[]int{40,84},[]int{42,85},[]int{76,86},[]int{26,87},[]int{55,88},[]int{70,89},[]int{52,90},[]int{85,91},[]int{49,92},[]int{18,93},[]int{64,94},[]int{31,95},[]int{42,96},[]int{88,97},[]int{30,98},[]int{41,99},[]int{97,100},[]int{41,101},[]int{54,102},[]int{81,103},[]int{88,104},[]int{83,105},[]int{95,106},[]int{93,107},[]int{89,108},[]int{21,109},[]int{81,110},[]int{39,111},[]int{94,112},[]int{73,113},[]int{113,114},[]int{12,115},[]int{69,116},[]int{82,117},[]int{24,118},[]int{83,119},[]int{78,120},[]int{22,121},[]int{5,122},[]int{69,123},[]int{43,124},[]int{93,125},[]int{71,126},[]int{24,127},[]int{60,128},[]int{83,129},[]int{48,130},[]int{14,131},[]int{34,132},[]int{109,133},[]int{115,134},[]int{105,135},[]int{89,136},[]int{9,137},[]int{137,138},[]int{37,139},[]int{37,140},[]int{129,141},[]int{32,142},[]int{137,143},[]int{103,144},[]int{30,145},[]int{141,146},[]int{126,147},[]int{112,148},[]int{118,149},[]int{74,150},[]int{23,151},[]int{118,152},[]int{115,153},[]int{53,154},[]int{35,155},[]int{143,156},[]int{67,157},[]int{36,158},[]int{42,159},[]int{152,160},[]int{119,161},[]int{114,162},[]int{160,163},[]int{139,164},[]int{101,165},[]int{56,166},[]int{9,167},[]int{108,168},[]int{105,169},[]int{91,170},[]int{120,171},[]int{166,172},[]int{111,173},[]int{84,174},[]int{110,175},[]int{54,176},[]int{31,177},[]int{39,178},[]int{25,179},[]int{59,180},[]int{114,181},[]int{90,182},[]int{31,183},[]int{137,184},[]int{17,185},[]int{52,186},[]int{157,187},[]int{21,188},[]int{176,189},[]int{50,190},[]int{126,191},[]int{190,192},[]int{86,193},[]int{76,194},[]int{34,195},[]int{155,196},[]int{100,197},[]int{12,198},[]int{182,199},[]int{76,200},[]int{10,201},[]int{181,202},[]int{100,203},[]int{191,204},[]int{163,205},[]int{22,206},[]int{57,207},[]int{176,208},[]int{49,209},[]int{141,210},[]int{69,211},[]int{76,212},[]int{156,213},[]int{54,214},[]int{194,215},[]int{43,216},[]int{13,217},[]int{72,218},[]int{184,219},[]int{133,220},[]int{16,221},[]int{196,222},[]int{34,223},[]int{137,224},[]int{45,225},[]int{15,226},[]int{148,227},[]int{182,228},[]int{53,229},[]int{16,230},[]int{203,231},[]int{230,232},[]int{1,233},[]int{123,234},[]int{162,235},[]int{155,236},[]int{75,237},[]int{129,238},[]int{67,239},[]int{73,240},[]int{39,241},[]int{214,242},[]int{136,243},[]int{146,244},[]int{27,245},[]int{147,246},[]int{225,247},[]int{154,248},[]int{236,249},[]int{91,250},[]int{160,251},[]int{92,252},[]int{22,253},[]int{198,254},[]int{141,255},[]int{229,256},[]int{213,257},[]int{180,258},[]int{245,259},[]int{76,260},[]int{150,261},[]int{123,262},[]int{39,263},[]int{78,264},[]int{206,265},[]int{195,266},[]int{113,267},[]int{128,268},[]int{108,269},[]int{52,270},[]int{36,271},[]int{196,272},[]int{56,273},[]int{239,274},[]int{107,275},[]int{221,276},[]int{159,277},[]int{89,278},[]int{180,279},[]int{72,280},[]int{41,281},[]int{95,282},[]int{96,283},[]int{68,284},[]int{243,285},[]int{143,286},[]int{177,287},[]int{189,288},[]int{241,289},[]int{203,290},[]int{111,291},[]int{57,292},[]int{52,293},[]int{77,294},[]int{183,295},[]int{135,296},[]int{173,297},[]int{249,298},[]int{60,299},[]int{206,300},[]int{130,301},[]int{151,302},[]int{70,303},[]int{118,304},[]int{109,305},[]int{196,306},[]int{5,307},[]int{82,308},[]int{131,309},[]int{161,310},[]int{173,311},[]int{273,312},[]int{71,313},[]int{86,314},[]int{60,315},[]int{59,316},[]int{227,317},[]int{292,318},[]int{307,319},[]int{205,320},[]int{1,321},[]int{220,322},[]int{10,323},[]int{289,324},[]int{22,325},[]int{33,326},[]int{4,327},[]int{6,328},[]int{223,329},[]int{75,330},[]int{216,331},[]int{311,332},[]int{173,333},[]int{327,334},[]int{105,335},[]int{178,336},[]int{13,337},[]int{179,338},[]int{122,339},[]int{19,340},[]int{258,341},[]int{80,342},[]int{57,343},[]int{283,344},[]int{247,345},[]int{174,346},[]int{286,347},[]int{36,348},[]int{304,349},[]int{271,350},[]int{296,351},[]int{115,352},[]int{319,353},[]int{326,354},[]int{169,355},[]int{185,356},[]int{83,357},[]int{218,358},[]int{231,359},[]int{6,360},[]int{11,361},[]int{61,362},[]int{337,363},[]int{32,364},[]int{206,365},[]int{339,366},[]int{314,367},[]int{45,368},[]int{122,369},[]int{211,370},[]int{149,371},[]int{6,372},[]int{196,373},[]int{182,374},[]int{127,375},[]int{112,376},[]int{19,377},[]int{144,378},[]int{208,379},[]int{63,380},[]int{22,381},[]int{271,382},[]int{244,383},[]int{352,384},[]int{347,385},[]int{192,386},[]int{261,387},[]int{128,388},[]int{122,389},[]int{3,390},[]int{154,391},[]int{349,392},[]int{288,393},[]int{86,394},[]int{390,395},[]int{374,396},[]int{212,397},[]int{348,398},[]int{141,399},[]int{27,400},[]int{147,401},[]int{342,402},[]int{37,403},[]int{230,404},[]int{316,405},[]int{342,406},[]int{122,407},[]int{204,408},[]int{347,409},[]int{350,410},[]int{309,411},[]int{284,412},[]int{206,413},[]int{412,414},[]int{57,415},[]int{203,416},[]int{342,417},[]int{14,418},[]int{117,419},[]int{46,420},[]int{355,421},[]int{31,422},[]int{356,423},[]int{325,424},[]int{348,425},[]int{399,426},[]int{190,427},[]int{92,428},[]int{260,429},[]int{77,430},[]int{288,431},[]int{175,432},[]int{282,433},[]int{48,434},[]int{158,435},[]int{282,436},[]int{99,437},[]int{23,438},[]int{388,439},[]int{60,440},[]int{45,441},[]int{192,442},[]int{54,443},[]int{327,444},[]int{414,445},[]int{121,446},[]int{84,447},[]int{294,448},[]int{116,449},[]int{57,450},[]int{447,451},[]int{327,452},[]int{19,453},[]int{217,454},[]int{104,455},[]int{274,456},[]int{113,457},[]int{415,458},[]int{346,459},[]int{290,460},[]int{314,461},[]int{201,462},[]int{328,463},[]int{367,464},[]int{411,465},[]int{289,466},[]int{85,467},[]int{141,468},[]int{421,469},[]int{380,470},[]int{30,471},[]int{244,472},[]int{368,473},[]int{109,474},[]int{450,475},[]int{105,476},[]int{8,477},[]int{116,478},[]int{232,479},[]int{422,480},[]int{65,481},[]int{207,482},[]int{389,483},[]int{347,484},[]int{451,485},[]int{480,486},[]int{382,487},[]int{169,488},[]int{301,489},[]int{100,490},[]int{447,491},[]int{472,492},[]int{410,493},[]int{366,494},[]int{223,495},[]int{316,496},[]int{414,497},[]int{279,498},[]int{247,499},[]int{172,500},[]int{206,501},[]int{410,502},[]int{165,503},[]int{296,504},[]int{461,505},[]int{423,506},[]int{265,507},[]int{205,508},[]int{80,509},[]int{135,510},[]int{181,511},[]int{493,512},[]int{203,513},[]int{373,514},[]int{305,515},[]int{338,516},[]int{35,517},[]int{320,518},[]int{267,519},[]int{454,520},[]int{11,521},[]int{349,522},[]int{480,523},[]int{150,524},[]int{484,525},[]int{513,526},[]int{250,527},[]int{29,528},[]int{323,529},[]int{482,530},[]int{508,531},[]int{164,532},[]int{122,533},[]int{504,534},[]int{329,535},[]int{307,536},[]int{450,537},[]int{345,538},[]int{380,539},[]int{262,540},[]int{1,541},[]int{163,542},[]int{207,543},[]int{292,544},[]int{350,545},[]int{471,546},[]int{378,547},[]int{101,548},[]int{440,549},[]int{382,550},[]int{107,551},[]int{53,552},[]int{46,553},[]int{436,554},[]int{174,555},[]int{300,556},[]int{472,557},[]int{555,558},[]int{100,559},[]int{260,560},[]int{552,561},[]int{362,562},[]int{198,563},[]int{146,564},[]int{275,565},[]int{395,566},[]int{365,567},[]int{250,568},[]int{195,569},[]int{516,570},[]int{495,571},[]int{410,572},[]int{279,573},[]int{48,574},[]int{483,575},[]int{266,576},[]int{241,577},[]int{22,578},[]int{330,579},[]int{238,580},[]int{405,581},[]int{351,582},[]int{239,583},[]int{129,584},[]int{398,585},[]int{55,586},[]int{240,587},[]int{211,588},[]int{31,589},[]int{191,590},[]int{388,591},[]int{6,592},[]int{180,593},[]int{542,594},[]int{471,595},[]int{357,596},[]int{156,597},[]int{529,598},[]int{486,599},[]int{584,600},[]int{127,601},[]int{586,602},[]int{372,603},[]int{449,604},[]int{591,605},[]int{491,606},[]int{181,607},[]int{485,608},[]int{390,609},[]int{79,610},[]int{456,611},[]int{323,612},[]int{201,613},[]int{127,614},[]int{506,615},[]int{239,616},[]int{559,617},[]int{574,618},[]int{496,619},[]int{170,620},[]int{133,621},[]int{136,622},[]int{79,623},[]int{214,624},[]int{208,625},[]int{174,626},[]int{501,627},[]int{416,628},[]int{550,629},[]int{193,630},[]int{433,631},[]int{515,632},[]int{528,633},[]int{553,634},[]int{603,635},[]int{485,636},[]int{622,637},[]int{424,638},[]int{214,639},[]int{360,640},[]int{501,641},[]int{434,642},[]int{537,643},[]int{159,644},[]int{583,645},[]int{21,646},[]int{574,647},[]int{474,648},[]int{360,649},[]int{221,650},[]int{164,651},[]int{57,652},[]int{389,653},[]int{560,654},[]int{642,655},[]int{217,656},[]int{558,657},[]int{640,658},[]int{632,659},[]int{649,660},[]int{387,661},[]int{132,662},[]int{657,663},[]int{157,664},[]int{141,665},[]int{550,666},[]int{108,667},[]int{587,668},[]int{650,669},[]int{171,670},[]int{215,671},[]int{616,672},[]int{589,673},[]int{313,674},[]int{560,675},[]int{66,676},[]int{121,677},[]int{49,678},[]int{125,679},[]int{440,680},[]int{196,681},[]int{364,682},[]int{606,683},[]int{232,684},[]int{449,685},[]int{372,686},[]int{15,687},[]int{83,688},[]int{71,689},[]int{537,690},[]int{249,691},[]int{300,692},[]int{365,693},[]int{198,694},[]int{584,695},[]int{666,696},[]int{594,697},[]int{625,698},[]int{18,699},[]int{24,700},[]int{400,701},[]int{697,702},[]int{306,703},[]int{632,704},[]int{417,705},[]int{557,706},[]int{586,707},[]int{216,708},[]int{687,709},[]int{79,710},[]int{562,711},[]int{298,712},[]int{191,713},[]int{106,714},[]int{714,715},[]int{19,716},[]int{415,717},[]int{249,718},[]int{327,719},[]int{263,720},[]int{539,721},[]int{503,722},[]int{121,723},[]int{103,724},[]int{405,725},[]int{168,726},[]int{550,727},[]int{727,728},[]int{1,729},[]int{590,730},[]int{413,731},[]int{503,732},[]int{482,733},[]int{434,734},[]int{256,735},[]int{141,736},[]int{458,737},[]int{698,738},[]int{737,739},[]int{678,740},[]int{157,741},[]int{136,742},[]int{605,743},[]int{87,744},[]int{172,745},[]int{305,746},[]int{476,747},[]int{290,748},[]int{303,749},[]int{470,750},[]int{218,751},[]int{346,752},[]int{405,753},[]int{409,754},[]int{320,755},[]int{584,756},[]int{70,757},[]int{638,758},[]int{726,759},[]int{544,760},[]int{53,761},[]int{43,762},[]int{666,763},[]int{340,764},[]int{74,765},[]int{205,766},[]int{417,767},[]int{283,768},[]int{27,769},[]int{332,770},[]int{134,771},[]int{62,772},[]int{145,773},[]int{151,774},[]int{558,775},[]int{57,776},[]int{500,777},[]int{763,778},[]int{547,779},[]int{174,780},[]int{406,781},[]int{528,782},[]int{86,783},[]int{208,784},[]int{180,785},[]int{159,786},[]int{690,787},[]int{541,788},[]int{144,789},[]int{157,790},[]int{716,791},[]int{680,792},[]int{680,793},[]int{436,794},[]int{208,795},[]int{675,796},[]int{720,797},[]int{608,798},[]int{317,799},[]int{278,800},[]int{148,801},[]int{375,802},[]int{243,803},[]int{202,804},[]int{210,805},[]int{198,806},[]int{341,807},[]int{157,808},[]int{120,809},[]int{763,810},[]int{553,811},[]int{253,812},[]int{304,813},[]int{158,814},[]int{380,815},[]int{604,816},[]int{85,817},[]int{719,818},[]int{774,819},[]int{552,820},[]int{597,821},[]int{431,822},[]int{68,823},[]int{429,824},[]int{94,825},[]int{43,826},[]int{666,827},[]int{180,828},[]int{297,829},[]int{750,830},[]int{183,831},[]int{433,832},[]int{404,833},[]int{417,834},[]int{192,835},[]int{541,836},[]int{248,837},[]int{133,838},[]int{799,839},[]int{742,840},[]int{709,841},[]int{520,842},[]int{370,843},[]int{581,844},[]int{618,845},[]int{276,846},[]int{380,847},[]int{691,848},[]int{662,849},[]int{511,850},[]int{92,851},[]int{464,852},[]int{125,853},[]int{510,854},[]int{465,855},[]int{616,856},[]int{105,857},[]int{374,858},[]int{427,859},[]int{43,860},[]int{807,861},[]int{840,862},[]int{422,863},[]int{97,864},[]int{263,865},[]int{562,866},[]int{555,867},[]int{111,868},[]int{449,869},[]int{656,870},[]int{178,871},[]int{809,872},[]int{742,873},[]int{52,874},[]int{741,875},[]int{429,876},[]int{141,877},[]int{751,878},[]int{484,879},[]int{457,880},[]int{644,881},[]int{128,882},[]int{137,883},[]int{401,884},[]int{248,885},[]int{113,886},[]int{601,887},[]int{136,888},[]int{353,889},[]int{828,890},[]int{67,891},[]int{877,892},[]int{563,893},[]int{434,894},[]int{65,895},[]int{665,896},[]int{754,897},[]int{76,898},[]int{642,899},[]int{884,900},[]int{569,901},[]int{204,902},[]int{143,903},[]int{218,904},[]int{328,905},[]int{688,906},[]int{816,907},[]int{425,908},[]int{649,909},[]int{266,910},[]int{581,911},[]int{49,912},[]int{327,913},[]int{416,914},[]int{781,915},[]int{811,916},[]int{643,917},[]int{394,918},[]int{71,919},[]int{135,920},[]int{13,921},[]int{25,922},[]int{458,923},[]int{457,924},[]int{248,925},[]int{733,926},[]int{204,927},[]int{334,928},[]int{197,929},[]int{526,930},[]int{481,931},[]int{609,932},[]int{410,933},[]int{718,934},[]int{175,935},[]int{109,936},[]int{205,937},[]int{264,938},[]int{710,939},[]int{74,940},[]int{64,941},[]int{192,942},[]int{711,943},[]int{0,944},[]int{528,945},[]int{546,946},[]int{941,947},[]int{587,948},[]int{207,949},[]int{124,950},[]int{619,951},[]int{722,952},[]int{276,953},[]int{931,954},[]int{287,955},[]int{58,956},[]int{478,957},[]int{58,958},[]int{8,959},[]int{244,960},[]int{438,961},[]int{626,962},[]int{282,963},[]int{400,964},[]int{77,965},[]int{774,966},[]int{696,967},[]int{789,968},[]int{286,969},[]int{726,970},[]int{356,971},[]int{762,972},[]int{644,973},[]int{304,974},[]int{52,975},[]int{890,976},[]int{931,977},[]int{220,978},[]int{614,979},[]int{879,980},[]int{682,981},[]int{925,982},[]int{546,983},[]int{940,984},[]int{306,985},[]int{329,986},[]int{411,987},[]int{302,988},[]int{106,989},[]int{982,990},[]int{92,991},[]int{319,992},[]int{440,993},[]int{504,994},[]int{604,995},[]int{711,996},[]int{145,997},[]int{194,998},[]int{408,999},[]int{950,1000},[]int{740,1001},[]int{941,1002},[]int{331,1003},[]int{403,1004},[]int{422,1005},[]int{190,1006},[]int{37,1007},[]int{754,1008},[]int{145,1009},[]int{192,1010},[]int{447,1011},[]int{753,1012},[]int{466,1013},[]int{789,1014},[]int{762,1015},[]int{698,1016},[]int{368,1017},[]int{52,1018},[]int{693,1019},[]int{373,1020},[]int{148,1021},[]int{36,1022},[]int{187,1023},[]int{667,1024},[]int{552,1025},[]int{680,1026},[]int{805,1027},[]int{269,1028},[]int{82,1029},[]int{86,1030},[]int{122,1031},[]int{446,1032},[]int{137,1033},[]int{813,1034},[]int{817,1035},[]int{823,1036},[]int{58,1037},[]int{819,1038},[]int{1025,1039},[]int{749,1040},[]int{628,1041},[]int{625,1042},[]int{657,1043},[]int{492,1044},[]int{176,1045},[]int{257,1046},[]int{170,1047},[]int{976,1048},[]int{142,1049},[]int{304,1050},[]int{973,1051},[]int{125,1052},[]int{800,1053},[]int{561,1054},[]int{270,1055},[]int{753,1056},[]int{936,1057},[]int{982,1058},[]int{499,1059},[]int{982,1060},[]int{143,1061},[]int{375,1062},[]int{763,1063},[]int{871,1064},[]int{868,1065},[]int{253,1066},[]int{1060,1067},[]int{360,1068},[]int{575,1069},[]int{164,1070},[]int{578,1071},[]int{542,1072},[]int{494,1073},[]int{431,1074},[]int{720,1075},[]int{96,1076},[]int{757,1077},[]int{519,1078},[]int{228,1079},[]int{209,1080},[]int{384,1081},[]int{786,1082},[]int{657,1083},[]int{151,1084},[]int{995,1085},[]int{395,1086},[]int{1009,1087},[]int{2,1088},[]int{149,1089},[]int{641,1090},[]int{13,1091},[]int{410,1092},[]int{159,1093},[]int{498,1094},[]int{691,1095},[]int{597,1096},[]int{122,1097},[]int{588,1098},[]int{301,1099},[]int{385,1100},[]int{928,1101},[]int{826,1102},[]int{785,1103},[]int{699,1104},[]int{755,1105},[]int{956,1106},[]int{803,1107},[]int{961,1108},[]int{424,1109},[]int{364,1110},[]int{435,1111},[]int{442,1112},[]int{463,1113},[]int{1004,1114},[]int{613,1115},[]int{868,1116},[]int{367,1117},[]int{599,1118},[]int{24,1119},[]int{999,1120},[]int{398,1121},[]int{403,1122},[]int{159,1123},[]int{273,1124},[]int{893,1125},[]int{453,1126},[]int{238,1127},[]int{870,1128},[]int{1023,1129},[]int{231,1130},[]int{838,1131},[]int{842,1132},[]int{912,1133},[]int{830,1134},[]int{151,1135},[]int{341,1136},[]int{355,1137},[]int{1020,1138},[]int{240,1139},[]int{1036,1140},[]int{112,1141},[]int{1088,1142},[]int{201,1143},[]int{215,1144},[]int{788,1145},[]int{675,1146},[]int{667,1147},[]int{759,1148},[]int{1087,1149},[]int{629,1150},[]int{196,1151},[]int{501,1152},[]int{138,1153},[]int{570,1154},[]int{125,1155},[]int{116,1156},[]int{380,1157},[]int{992,1158},[]int{554,1159},[]int{452,1160},[]int{1082,1161},[]int{911,1162},[]int{126,1163},[]int{976,1164},[]int{261,1165},[]int{686,1166},[]int{1039,1167},[]int{179,1168},[]int{1161,1169},[]int{611,1170},[]int{22,1171},[]int{275,1172},[]int{904,1173},[]int{526,1174},[]int{934,1175},[]int{747,1176},[]int{746,1177},[]int{407,1178},[]int{266,1179},[]int{1072,1180},[]int{890,1181},[]int{121,1182},[]int{59,1183},[]int{895,1184},[]int{0,1185},[]int{246,1186},[]int{39,1187},[]int{185,1188},[]int{307,1189},[]int{1186,1190},[]int{308,1191},[]int{371,1192},[]int{609,1193},[]int{308,1194},[]int{695,1195},[]int{237,1196},[]int{252,1197},[]int{1095,1198},[]int{259,1199},[]int{583,1200},[]int{697,1201},[]int{573,1202},[]int{610,1203},[]int{28,1204},[]int{726,1205},[]int{1125,1206},[]int{467,1207},[]int{651,1208},[]int{415,1209},[]int{295,1210},[]int{505,1211},[]int{1183,1212},[]int{934,1213},[]int{429,1214},[]int{1027,1215},[]int{90,1216},[]int{588,1217},[]int{1206,1218},[]int{783,1219},[]int{1098,1220},[]int{250,1221},[]int{1155,1222},[]int{1057,1223},[]int{657,1224},[]int{383,1225},[]int{437,1226},[]int{947,1227},[]int{679,1228},[]int{556,1229},[]int{892,1230},[]int{1193,1231},[]int{998,1232},[]int{630,1233},[]int{104,1234},[]int{1110,1235},[]int{1162,1236},[]int{537,1237},[]int{907,1238},[]int{447,1239},[]int{635,1240},[]int{905,1241},[]int{1040,1242},[]int{402,1243},[]int{816,1244},[]int{402,1245},[]int{880,1246},[]int{726,1247},[]int{346,1248},[]int{218,1249},[]int{588,1250},[]int{11,1251},[]int{658,1252},[]int{876,1253},[]int{1036,1254},[]int{994,1255},[]int{1192,1256},[]int{228,1257},[]int{944,1258},[]int{764,1259},[]int{401,1260},[]int{1056,1261},[]int{1186,1262},[]int{776,1263},[]int{660,1264},[]int{103,1265},[]int{757,1266},[]int{1047,1267},[]int{609,1268},[]int{329,1269},[]int{259,1270},[]int{343,1271},[]int{350,1272},[]int{498,1273},[]int{590,1274},[]int{436,1275},[]int{380,1276},[]int{819,1277},[]int{439,1278},[]int{1274,1279},[]int{978,1280},[]int{201,1281},[]int{261,1282},[]int{74,1283},[]int{517,1284},[]int{1181,1285},[]int{1090,1286},[]int{986,1287},[]int{748,1288},[]int{210,1289},[]int{483,1290},[]int{840,1291},[]int{215,1292},[]int{864,1293},[]int{1138,1294},[]int{101,1295},[]int{164,1296},[]int{230,1297},[]int{348,1298},[]int{358,1299},[]int{357,1300},[]int{623,1301},[]int{1300,1302},[]int{919,1303},[]int{1105,1304},[]int{209,1305},[]int{719,1306},[]int{89,1307},[]int{1197,1308},[]int{1220,1309},[]int{287,1310},[]int{9,1311},[]int{119,1312},[]int{672,1313},[]int{512,1314},[]int{166,1315},[]int{499,1316},[]int{53,1317},[]int{651,1318},[]int{1288,1319},[]int{115,1320},[]int{163,1321},[]int{262,1322},[]int{580,1323},[]int{797,1324},[]int{764,1325},[]int{336,1326},[]int{1054,1327},[]int{379,1328},[]int{747,1329},[]int{13,1330},[]int{123,1331},[]int{870,1332},[]int{1099,1333},[]int{1285,1334},[]int{844,1335},[]int{968,1336},[]int{740,1337},[]int{142,1338},[]int{183,1339},[]int{1113,1340},[]int{924,1341},[]int{793,1342},[]int{1277,1343},[]int{701,1344},[]int{1262,1345},[]int{810,1346},[]int{165,1347},[]int{93,1348},[]int{1170,1349},[]int{788,1350},[]int{685,1351},[]int{303,1352},[]int{624,1353},[]int{120,1354},[]int{339,1355},[]int{1187,1356},[]int{657,1357},[]int{583,1358},[]int{1339,1359},[]int{540,1360},[]int{1003,1361},[]int{0,1362},[]int{729,1363},[]int{917,1364},[]int{252,1365},[]int{401,1366},[]int{751,1367},[]int{1366,1368},[]int{32,1369},[]int{1110,1370},[]int{720,1371},[]int{491,1372},[]int{406,1373},[]int{734,1374},[]int{661,1375},[]int{1271,1376},[]int{850,1377},[]int{1090,1378},[]int{677,1379},[]int{725,1380},[]int{1002,1381},[]int{574,1382},[]int{261,1383},[]int{1308,1384},[]int{362,1385},[]int{765,1386},[]int{669,1387},[]int{606,1388},[]int{85,1389},[]int{948,1390},[]int{728,1391},[]int{92,1392},[]int{1234,1393},[]int{255,1394},[]int{1353,1395},[]int{312,1396},[]int{306,1397},[]int{1306,1398},[]int{690,1399},[]int{944,1400},[]int{133,1401},[]int{703,1402},[]int{644,1403},[]int{823,1404},[]int{1331,1405},[]int{563,1406},[]int{873,1407},[]int{506,1408},[]int{874,1409},[]int{1228,1410},[]int{811,1411},[]int{289,1412},[]int{96,1413},[]int{580,1414},[]int{114,1415},[]int{248,1416},[]int{1307,1417},[]int{501,1418},[]int{441,1419},[]int{752,1420},[]int{1158,1421},[]int{1080,1422},[]int{546,1423},[]int{335,1424},[]int{166,1425},[]int{351,1426},[]int{995,1427},[]int{637,1428},[]int{1067,1429},[]int{837,1430},[]int{93,1431},[]int{506,1432},[]int{238,1433},[]int{838,1434},[]int{1379,1435},[]int{245,1436},[]int{134,1437},[]int{72,1438},[]int{539,1439},[]int{1114,1440},[]int{85,1441},[]int{841,1442},[]int{769,1443},[]int{1196,1444},[]int{1349,1445},[]int{157,1446},[]int{239,1447},[]int{92,1448},[]int{242,1449},[]int{936,1450},[]int{861,1451},[]int{1415,1452},[]int{891,1453},[]int{730,1454},[]int{423,1455},[]int{649,1456},[]int{1196,1457},[]int{420,1458},[]int{494,1459},[]int{471,1460},[]int{738,1461},[]int{1246,1462},[]int{123,1463},[]int{1271,1464},[]int{808,1465},[]int{855,1466},[]int{428,1467},[]int{413,1468},[]int{1149,1469},[]int{1002,1470},[]int{1379,1471},[]int{874,1472},[]int{626,1473},[]int{143,1474},[]int{1146,1475},[]int{874,1476},[]int{176,1477},[]int{1146,1478},[]int{1413,1479},[]int{1247,1480},[]int{657,1481},[]int{754,1482},[]int{291,1483},[]int{154,1484},[]int{768,1485},[]int{129,1486},[]int{204,1487},[]int{1085,1488},[]int{799,1489},[]int{424,1490},[]int{1068,1491},[]int{722,1492},[]int{1026,1493},[]int{313,1494},[]int{870,1495},[]int{460,1496},[]int{724,1497},[]int{321,1498},[]int{623,1499},[]int{1156,1500},[]int{661,1501},[]int{734,1502},[]int{493,1503},[]int{703,1504},[]int{602,1505},[]int{1002,1506},[]int{1394,1507},[]int{199,1508},[]int{1363,1509},[]int{752,1510},[]int{1015,1511},[]int{1331,1512},[]int{838,1513},[]int{494,1514},[]int{435,1515},[]int{897,1516},[]int{910,1517},[]int{229,1518},[]int{842,1519},[]int{703,1520},[]int{117,1521},[]int{1493,1522},[]int{1339,1523},[]int{955,1524},[]int{1242,1525},[]int{612,1526},[]int{1238,1527},[]int{692,1528},[]int{785,1529},[]int{682,1530},[]int{707,1531},[]int{469,1532},[]int{34,1533},[]int{295,1534},[]int{370,1535},[]int{237,1536},[]int{712,1537},[]int{190,1538},[]int{1513,1539},[]int{1487,1540},[]int{677,1541},[]int{1363,1542},[]int{1300,1543},[]int{1109,1544},[]int{789,1545},[]int{777,1546},[]int{991,1547},[]int{133,1548},[]int{510,1549},[]int{977,1550},[]int{890,1551},[]int{1029,1552},[]int{1023,1553},[]int{419,1554},[]int{496,1555},[]int{956,1556},[]int{203,1557},[]int{553,1558},[]int{1049,1559},[]int{516,1560},[]int{437,1561},[]int{1391,1562},[]int{877,1563},[]int{419,1564},[]int{1465,1565},[]int{204,1566},[]int{496,1567},[]int{967,1568},[]int{558,1569},[]int{364,1570},[]int{960,1571},[]int{1219,1572},[]int{156,1573},[]int{1340,1574},[]int{1460,1575},[]int{921,1576},[]int{41,1577},[]int{927,1578},[]int{1007,1579},[]int{1444,1580},[]int{415,1581},[]int{1190,1582},[]int{1089,1583},[]int{113,1584},[]int{241,1585},[]int{201,1586},[]int{603,1587},[]int{67,1588},[]int{470,1589},[]int{1109,1590},[]int{88,1591},[]int{1336,1592},[]int{128,1593},[]int{311,1594},[]int{703,1595},[]int{928,1596},[]int{757,1597},[]int{1201,1598},[]int{1083,1599},[]int{1506,1600},[]int{615,1601},[]int{1032,1602},[]int{1333,1603},[]int{705,1604},[]int{1312,1605},[]int{870,1606},[]int{1147,1607},[]int{1530,1608},[]int{1070,1609},[]int{717,1610},[]int{1505,1611},[]int{1475,1612},[]int{1372,1613},[]int{975,1614},[]int{696,1615},[]int{1560,1616},[]int{185,1617},[]int{461,1618},[]int{375,1619},[]int{190,1620},[]int{734,1621},[]int{158,1622},[]int{993,1623},[]int{92,1624},[]int{1024,1625},[]int{208,1626},[]int{1151,1627},[]int{1144,1628},[]int{1582,1629},[]int{977,1630},[]int{1375,1631},[]int{1201,1632},[]int{199,1633},[]int{796,1634},[]int{781,1635},[]int{663,1636},[]int{920,1637},[]int{399,1638},[]int{904,1639},[]int{421,1640},[]int{379,1641},[]int{127,1642},[]int{1114,1643},[]int{847,1644},[]int{168,1645},[]int{1583,1646},[]int{1187,1647},[]int{109,1648},[]int{714,1649},[]int{997,1650},[]int{658,1651},[]int{1451,1652},[]int{288,1653},[]int{945,1654},[]int{717,1655},[]int{1515,1656},[]int{1586,1657},[]int{1316,1658},[]int{600,1659},[]int{713,1660},[]int{110,1661},[]int{287,1662},[]int{161,1663},[]int{41,1664},[]int{547,1665},[]int{522,1666},[]int{34,1667},[]int{1380,1668},[]int{212,1669},[]int{162,1670},[]int{352,1671},[]int{1397,1672},[]int{1073,1673},[]int{1302,1674},[]int{237,1675},[]int{471,1676},[]int{662,1677},[]int{1484,1678},[]int{510,1679},[]int{789,1680},[]int{239,1681},[]int{531,1682},[]int{799,1683},[]int{685,1684},[]int{1027,1685},[]int{1415,1686},[]int{214,1687},[]int{1570,1688},[]int{260,1689},[]int{1338,1690},[]int{856,1691},[]int{1524,1692},[]int{301,1693},[]int{746,1694},[]int{58,1695},[]int{1342,1696},[]int{1428,1697},[]int{1150,1698},[]int{1072,1699},[]int{1452,1700},[]int{138,1701},[]int{1589,1702},[]int{1335,1703},[]int{191,1704},[]int{544,1705},[]int{322,1706},[]int{103,1707},[]int{175,1708},[]int{874,1709},[]int{561,1710},[]int{1384,1711},[]int{516,1712},[]int{21,1713},[]int{805,1714},[]int{1379,1715},[]int{864,1716},[]int{109,1717},[]int{1243,1718},[]int{194,1719},[]int{172,1720},[]int{401,1721},[]int{732,1722},[]int{1231,1723},[]int{1254,1724},[]int{525,1725},[]int{385,1726},[]int{156,1727},[]int{36,1728},[]int{623,1729},[]int{1211,1730},[]int{171,1731},[]int{764,1732},[]int{1498,1733},[]int{1458,1734},[]int{1487,1735},[]int{351,1736},[]int{1499,1737},[]int{902,1738},[]int{1314,1739},[]int{19,1740},[]int{603,1741},[]int{369,1742},[]int{747,1743},[]int{29,1744},[]int{859,1745},[]int{592,1746},[]int{812,1747},[]int{1673,1748},[]int{378,1749},[]int{1710,1750},[]int{166,1751},[]int{703,1752},[]int{722,1753},[]int{1452,1754},[]int{28,1755},[]int{1094,1756},[]int{298,1757},[]int{1670,1758},[]int{572,1759},[]int{590,1760},[]int{881,1761},[]int{1584,1762},[]int{1274,1763},[]int{806,1764},[]int{1121,1765},[]int{1065,1766},[]int{592,1767},[]int{913,1768},[]int{920,1769},[]int{1035,1770},[]int{1359,1771},[]int{56,1772},[]int{283,1773},[]int{1299,1774},[]int{458,1775},[]int{837,1776},[]int{1331,1777},[]int{1000,1778},[]int{703,1779},[]int{346,1780},[]int{1163,1781},[]int{1058,1782},[]int{1771,1783},[]int{44,1784},[]int{1627,1785},[]int{1194,1786},[]int{540,1787},[]int{1656,1788},[]int{1082,1789},[]int{490,1790},[]int{86,1791},[]int{561,1792},[]int{234,1793},[]int{27,1794},[]int{117,1795},[]int{1352,1796},[]int{1208,1797},[]int{1102,1798},[]int{1342,1799},[]int{144,1800},[]int{509,1801},[]int{1001,1802},[]int{518,1803},[]int{1576,1804},[]int{482,1805},[]int{638,1806},[]int{624,1807},[]int{1392,1808},[]int{203,1809},[]int{1659,1810},[]int{1178,1811},[]int{745,1812},[]int{1794,1813},[]int{252,1814},[]int{835,1815},[]int{1786,1816},[]int{350,1817},[]int{1048,1818},[]int{1205,1819},[]int{496,1820},[]int{1661,1821},[]int{106,1822},[]int{537,1823},[]int{1248,1824},[]int{131,1825},[]int{1367,1826},[]int{1491,1827},[]int{1796,1828},[]int{931,1829},[]int{702,1830},[]int{1499,1831},[]int{489,1832},[]int{756,1833},[]int{1206,1834},[]int{1587,1835},[]int{765,1836},[]int{983,1837},[]int{107,1838},[]int{684,1839},[]int{49,1840},[]int{408,1841},[]int{305,1842},[]int{1014,1843},[]int{141,1844},[]int{664,1845},[]int{1405,1846},[]int{262,1847},[]int{131,1848},[]int{331,1849},[]int{132,1850},[]int{1539,1851},[]int{578,1852},[]int{907,1853},[]int{1467,1854},[]int{773,1855},[]int{817,1856},[]int{1053,1857},[]int{49,1858},[]int{534,1859},[]int{880,1860},[]int{443,1861},[]int{601,1862},[]int{1182,1863},[]int{1055,1864},[]int{1233,1865},[]int{881,1866},[]int{865,1867},[]int{1654,1868},[]int{754,1869},[]int{472,1870},[]int{115,1871},[]int{573,1872},[]int{523,1873},[]int{1572,1874},[]int{1780,1875},[]int{966,1876},[]int{694,1877},[]int{176,1878},[]int{142,1879},[]int{148,1880},[]int{145,1881},[]int{260,1882},[]int{733,1883},[]int{514,1884},[]int{1535,1885},[]int{1242,1886},[]int{231,1887},[]int{117,1888},[]int{1182,1889},[]int{559,1890},[]int{857,1891},[]int{11,1892},[]int{625,1893},[]int{948,1894},[]int{788,1895},[]int{1695,1896},[]int{108,1897},[]int{326,1898},[]int{1103,1899},[]int{895,1900},[]int{1491,1901},[]int{94,1902},[]int{1217,1903},[]int{1512,1904},[]int{1453,1905},[]int{1772,1906},[]int{1642,1907},[]int{1320,1908},[]int{1268,1909},[]int{6,1910},[]int{1423,1911},[]int{1512,1912},[]int{1177,1913},[]int{831,1914},[]int{1542,1915},[]int{641,1916},[]int{777,1917},[]int{178,1918},[]int{1311,1919},[]int{771,1920},[]int{138,1921},[]int{1814,1922},[]int{760,1923},[]int{1686,1924},[]int{521,1925},[]int{1456,1926},[]int{1904,1927},[]int{1261,1928},[]int{1635,1929},[]int{1243,1930},[]int{100,1931},[]int{108,1932},[]int{681,1933},[]int{1676,1934},[]int{1299,1935},[]int{597,1936},[]int{623,1937},[]int{1066,1938},[]int{1177,1939},[]int{1527,1940},[]int{1532,1941},[]int{531,1942},[]int{1434,1943},[]int{348,1944},[]int{1058,1945},[]int{43,1946},[]int{1636,1947},[]int{62,1948},[]int{1303,1949},[]int{714,1950},[]int{178,1951},[]int{1037,1952},[]int{1460,1953},[]int{1041,1954},[]int{1242,1955},[]int{455,1956},[]int{1801,1957},[]int{24,1958},[]int{1192,1959},[]int{636,1960},[]int{871,1961},[]int{1368,1962},[]int{1833,1963},[]int{553,1964},[]int{779,1965},[]int{1149,1966},[]int{641,1967},[]int{1129,1968},[]int{424,1969},[]int{398,1970},[]int{1824,1971},[]int{1232,1972},[]int{1656,1973},[]int{686,1974},[]int{1971,1975},[]int{1756,1976},[]int{45,1977},[]int{482,1978},[]int{943,1979},[]int{204,1980},[]int{1715,1981},[]int{34,1982},[]int{1727,1983},[]int{1864,1984},[]int{103,1985},[]int{132,1986},[]int{200,1987},[]int{747,1988},[]int{1245,1989},[]int{823,1990},[]int{125,1991},[]int{1097,1992},[]int{1737,1993},[]int{1659,1994},[]int{943,1995},[]int{226,1996},[]int{1156,1997},[]int{866,1998},[]int{1031,1999},[]int{600,2000},[]int{1637,2001},[]int{186,2002},[]int{859,2003},[]int{617,2004},[]int{1862,2005},[]int{1118,2006},[]int{1953,2007},[]int{1227,2008},[]int{794,2009},[]int{675,2010},[]int{1217,2011},[]int{1677,2012},[]int{1815,2013},[]int{1129,2014},[]int{1505,2015},[]int{679,2016},[]int{530,2017},[]int{101,2018},[]int{1767,2019},[]int{883,2020},[]int{1214,2021},[]int{465,2022},[]int{1869,2023},[]int{120,2024},[]int{1368,2025},[]int{1436,2026},[]int{1835,2027},[]int{1336,2028},[]int{85,2029},[]int{589,2030},[]int{1540,2031},[]int{277,2032},[]int{1249,2033},[]int{334,2034},[]int{1970,2035},[]int{1908,2036},[]int{162,2037},[]int{984,2038},[]int{557,2039},[]int{734,2040},[]int{1542,2041},[]int{1541,2042},[]int{519,2043},[]int{257,2044},[]int{167,2045},[]int{1044,2046},[]int{1166,2047},[]int{1708,2048},[]int{1065,2049},[]int{200,2050},[]int{76,2051},[]int{1394,2052},[]int{1405,2053},[]int{1837,2054},[]int{1856,2055},[]int{1189,2056},[]int{208,2057},[]int{226,2058},[]int{511,2059},[]int{642,2060},[]int{1160,2061},[]int{815,2062},[]int{1723,2063},[]int{725,2064},[]int{1966,2065},[]int{1626,2066},[]int{736,2067},[]int{80,2068},[]int{920,2069},[]int{393,2070},[]int{1838,2071},[]int{1329,2072},[]int{1427,2073},[]int{614,2074},[]int{1488,2075},[]int{622,2076},[]int{993,2077},[]int{1003,2078},[]int{1947,2079},[]int{1284,2080},[]int{372,2081},[]int{507,2082},[]int{133,2083},[]int{628,2084},[]int{543,2085},[]int{944,2086},[]int{73,2087},[]int{1051,2088},[]int{438,2089},[]int{845,2090},[]int{1626,2091},[]int{1740,2092},[]int{841,2093},[]int{1375,2094},[]int{1382,2095},[]int{1563,2096},[]int{1773,2097},[]int{1523,2098},[]int{119,2099},[]int{697,2100},[]int{1148,2101},[]int{415,2102},[]int{63,2103},[]int{1375,2104},[]int{778,2105},[]int{1235,2106},[]int{1548,2107},[]int{1961,2108},[]int{1533,2109},[]int{1443,2110},[]int{1779,2111},[]int{1066,2112},[]int{1605,2113},[]int{141,2114},[]int{1179,2115},[]int{1129,2116},[]int{622,2117},[]int{1131,2118},[]int{682,2119},[]int{1374,2120},[]int{614,2121},[]int{379,2122},[]int{1973,2123},[]int{674,2124},[]int{1906,2125},[]int{1970,2126},[]int{31,2127},[]int{413,2128},[]int{1729,2129},[]int{1757,2130},[]int{1162,2131},[]int{727,2132},[]int{904,2133},[]int{615,2134},[]int{84,2135},[]int{46,2136},[]int{1954,2137},[]int{268,2138},[]int{274,2139},[]int{1123,2140},[]int{374,2141},[]int{269,2142},[]int{1897,2143},[]int{1636,2144},[]int{2122,2145},[]int{992,2146},[]int{2009,2147},[]int{1021,2148},[]int{432,2149},[]int{1919,2150},[]int{347,2151},[]int{12,2152},[]int{1861,2153},[]int{666,2154},[]int{1049,2155},[]int{1188,2156},[]int{840,2157},[]int{369,2158},[]int{1669,2159},[]int{653,2160},[]int{201,2161},[]int{1080,2162},[]int{1360,2163},[]int{218,2164},[]int{1146,2165},[]int{1044,2166},[]int{939,2167},[]int{1775,2168},[]int{2023,2169},[]int{472,2170},[]int{2166,2171},[]int{243,2172},[]int{259,2173},[]int{1040,2174},[]int{949,2175},[]int{902,2176},[]int{872,2177},[]int{422,2178},[]int{308,2179},[]int{1241,2180},[]int{1202,2181},[]int{1673,2182},[]int{1710,2183},[]int{1855,2184},[]int{998,2185},[]int{1506,2186},[]int{1464,2187},[]int{194,2188},[]int{689,2189},[]int{2108,2190},[]int{1487,2191},[]int{2191,2192},[]int{111,2193},[]int{130,2194},[]int{502,2195},[]int{1235,2196},[]int{1494,2197},[]int{1693,2198},[]int{925,2199},[]int{993,2200},[]int{600,2201},[]int{403,2202},[]int{729,2203},[]int{1225,2204},[]int{1022,2205},[]int{497,2206},[]int{202,2207},[]int{390,2208},[]int{1811,2209},[]int{849,2210},[]int{996,2211},[]int{1771,2212},[]int{1652,2213},[]int{847,2214},[]int{2104,2215},[]int{1971,2216},[]int{808,2217},[]int{384,2218},[]int{474,2219},[]int{1557,2220},[]int{2161,2221},[]int{180,2222},[]int{1157,2223},[]int{280,2224},[]int{1316,2225},[]int{463,2226},[]int{1930,2227},[]int{189,2228},[]int{1466,2229},[]int{1381,2230},[]int{457,2231},[]int{1046,2232},[]int{2046,2233},[]int{716,2234},[]int{846,2235},[]int{1361,2236},[]int{219,2237},[]int{1009,2238},[]int{1145,2239},[]int{534,2240},[]int{1181,2241},[]int{907,2242},[]int{661,2243},[]int{1717,2244},[]int{54,2245},[]int{2042,2246},[]int{2067,2247},[]int{1630,2248},[]int{1306,2249},[]int{1548,2250},[]int{2045,2251},[]int{148,2252},[]int{1270,2253},[]int{1674,2254},[]int{1260,2255},[]int{604,2256},[]int{1815,2257},[]int{1480,2258},[]int{1414,2259},[]int{1732,2260},[]int{2161,2261},[]int{1140,2262},[]int{1287,2263},[]int{2242,2264},[]int{1339,2265},[]int{904,2266},[]int{989,2267},[]int{351,2268},[]int{1960,2269},[]int{773,2270},[]int{979,2271},[]int{1834,2272},[]int{746,2273},[]int{227,2274},[]int{1441,2275},[]int{730,2276},[]int{991,2277},[]int{1463,2278},[]int{617,2279},[]int{1386,2280},[]int{1481,2281},[]int{1372,2282},[]int{1993,2283},[]int{2166,2284},[]int{674,2285},[]int{2205,2286},[]int{1593,2287},[]int{783,2288},[]int{2208,2289},[]int{603,2290},[]int{1095,2291},[]int{1920,2292},[]int{1099,2293},[]int{735,2294},[]int{549,2295},[]int{1482,2296},[]int{1935,2297},[]int{1781,2298},[]int{1276,2299},[]int{832,2300},[]int{927,2301},[]int{1321,2302},[]int{1553,2303},[]int{56,2304},[]int{1704,2305},[]int{1983,2306},[]int{1354,2307},[]int{26,2308},[]int{2188,2309},[]int{1594,2310},[]int{2212,2311},[]int{35,2312},[]int{922,2313},[]int{776,2314},[]int{1620,2315},[]int{2185,2316},[]int{1915,2317},[]int{1274,2318},[]int{1255,2319},[]int{1060,2320},[]int{1247,2321},[]int{643,2322},[]int{2031,2323},[]int{1077,2324},[]int{1600,2325},[]int{433,2326},[]int{1582,2327},[]int{1482,2328},[]int{1820,2329},[]int{849,2330},[]int{1582,2331},[]int{1870,2332},[]int{1197,2333},[]int{1882,2334},[]int{167,2335},[]int{946,2336},[]int{1137,2337},[]int{1203,2338},[]int{2303,2339},[]int{746,2340},[]int{446,2341},[]int{1761,2342},[]int{1232,2343},[]int{983,2344},[]int{1946,2345},[]int{250,2346},[]int{843,2347},[]int{349,2348},[]int{922,2349},[]int{895,2350},[]int{619,2351},[]int{656,2352},[]int{1862,2353},[]int{1423,2354},[]int{1232,2355},[]int{919,2356},[]int{1053,2357},[]int{1271,2358},[]int{786,2359},[]int{1934,2360},[]int{713,2361},[]int{325,2362},[]int{1500,2363},[]int{2223,2364},[]int{973,2365},[]int{1351,2366},[]int{1817,2367},[]int{460,2368},[]int{381,2369},[]int{217,2370},[]int{2236,2371},[]int{1824,2372},[]int{2116,2373},[]int{463,2374},[]int{384,2375},[]int{1952,2376},[]int{1626,2377},[]int{1560,2378},[]int{36,2379},[]int{1684,2380},[]int{1390,2381},[]int{661,2382},[]int{2088,2383},[]int{374,2384},[]int{77,2385},[]int{2082,2386},[]int{1075,2387},[]int{591,2388},[]int{2254,2389},[]int{1562,2390},[]int{693,2391},[]int{1929,2392},[]int{2283,2393},[]int{298,2394},[]int{31,2395},[]int{538,2396},[]int{1649,2397},[]int{766,2398},[]int{1887,2399},[]int{1020,2400},[]int{658,2401},[]int{2017,2402},[]int{575,2403},[]int{2393,2404},[]int{1058,2405},[]int{2246,2406},[]int{74,2407},[]int{1738,2408},[]int{891,2409},[]int{1247,2410},[]int{1060,2411},[]int{7,2412},[]int{1507,2413},[]int{483,2414},[]int{860,2415},[]int{1179,2416},[]int{1059,2417},[]int{247,2418},[]int{2090,2419},[]int{1503,2420},[]int{85,2421},[]int{1065,2422},[]int{836,2423},[]int{1968,2424},[]int{1317,2425},[]int{620,2426},[]int{205,2427},[]int{899,2428},[]int{1858,2429},[]int{40,2430},[]int{1165,2431},[]int{692,2432},[]int{147,2433},[]int{1466,2434},[]int{24,2435},[]int{162,2436},[]int{1077,2437},[]int{573,2438},[]int{1817,2439},[]int{914,2440},[]int{1888,2441},[]int{2425,2442},[]int{216,2443},[]int{71,2444},[]int{665,2445},[]int{1728,2446},[]int{723,2447},[]int{1923,2448},[]int{2333,2449},[]int{1576,2450},[]int{757,2451},[]int{2393,2452},[]int{1762,2453},[]int{1873,2454},[]int{1487,2455},[]int{2087,2456},[]int{171,2457},[]int{2348,2458},[]int{2160,2459},[]int{114,2460},[]int{44,2461},[]int{2361,2462},[]int{1044,2463},[]int{1128,2464},[]int{2313,2465},[]int{2222,2466},[]int{45,2467},[]int{2310,2468},[]int{702,2469},[]int{1109,2470},[]int{1542,2471},[]int{2172,2472},[]int{2005,2473},[]int{2014,2474},[]int{1443,2475},[]int{1043,2476},[]int{404,2477},[]int{457,2478},[]int{244,2479},[]int{1042,2480},[]int{2012,2481},[]int{1288,2482},[]int{1393,2483},[]int{804,2484},[]int{1504,2485},[]int{1432,2486},[]int{1928,2487},[]int{1385,2488},[]int{1417,2489},[]int{1604,2490},[]int{2370,2491},[]int{2411,2492},[]int{1806,2493},[]int{1868,2494},[]int{1723,2495},[]int{718,2496},[]int{613,2497},[]int{2233,2498},[]int{1502,2499},[]int{257,2500},[]int{505,2501},[]int{1884,2502},[]int{1020,2503},[]int{1436,2504},[]int{597,2505},[]int{1168,2506},[]int{1567,2507},[]int{1811,2508},[]int{2350,2509},[]int{1653,2510},[]int{1667,2511},[]int{795,2512},[]int{686,2513},[]int{1691,2514},[]int{1553,2515},[]int{76,2516},[]int{251,2517},[]int{1291,2518},[]int{424,2519},[]int{123,2520},[]int{1476,2521},[]int{1315,2522},[]int{1765,2523},[]int{2423,2524},[]int{494,2525},[]int{1567,2526},[]int{1299,2527},[]int{952,2528},[]int{1523,2529},[]int{1379,2530},[]int{1316,2531},[]int{543,2532},[]int{370,2533},[]int{1817,2534},[]int{309,2535},[]int{133,2536},[]int{50,2537},[]int{1825,2538},[]int{1553,2539},[]int{2211,2540},[]int{20,2541},[]int{53,2542},[]int{2238,2543},[]int{2131,2544},[]int{427,2545},[]int{1958,2546},[]int{2292,2547},[]int{1665,2548},[]int{1567,2549},[]int{1033,2550},[]int{668,2551},[]int{1401,2552},[]int{1667,2553},[]int{245,2554},[]int{2214,2555},[]int{901,2556},[]int{600,2557},[]int{388,2558},[]int{1707,2559},[]int{762,2560},[]int{2194,2561},[]int{1210,2562},[]int{542,2563},[]int{637,2564},[]int{1391,2565},[]int{420,2566},[]int{929,2567},[]int{1996,2568},[]int{296,2569},[]int{932,2570},[]int{500,2571},[]int{2051,2572},[]int{68,2573},[]int{349,2574},[]int{2205,2575},[]int{365,2576},[]int{444,2577},[]int{227,2578},[]int{430,2579},[]int{960,2580},[]int{709,2581},[]int{1648,2582},[]int{2011,2583},[]int{78,2584},[]int{1933,2585},[]int{417,2586},[]int{316,2587},[]int{1992,2588},[]int{241,2589},[]int{188,2590},[]int{2538,2591},[]int{137,2592},[]int{139,2593},[]int{1353,2594},[]int{2003,2595},[]int{2409,2596},[]int{2554,2597},[]int{95,2598},[]int{466,2599},[]int{53,2600},[]int{2593,2601},[]int{9,2602},[]int{1644,2603},[]int{1603,2604},[]int{516,2605},[]int{1038,2606},[]int{1170,2607},[]int{1870,2608},[]int{2216,2609},[]int{2191,2610},[]int{1625,2611},[]int{2219,2612},[]int{2608,2613},[]int{1205,2614},[]int{1557,2615},[]int{2247,2616},[]int{392,2617},[]int{1130,2618},[]int{2471,2619},[]int{1942,2620},[]int{993,2621},[]int{1971,2622},[]int{1450,2623},[]int{729,2624},[]int{1329,2625},[]int{1750,2626},[]int{750,2627},[]int{2121,2628},[]int{1636,2629},[]int{1980,2630},[]int{1679,2631},[]int{1451,2632},[]int{2352,2633},[]int{1674,2634},[]int{2201,2635},[]int{1356,2636},[]int{1018,2637},[]int{2107,2638},[]int{2035,2639},[]int{10,2640},[]int{2561,2641},[]int{1529,2642},[]int{1239,2643},[]int{2012,2644},[]int{2138,2645},[]int{1590,2646},[]int{1836,2647},[]int{2175,2648},[]int{2398,2649},[]int{1852,2650},[]int{1999,2651},[]int{2243,2652},[]int{580,2653},[]int{1952,2654},[]int{1536,2655},[]int{2270,2656},[]int{643,2657},[]int{1372,2658},[]int{332,2659},[]int{528,2660},[]int{583,2661},[]int{1107,2662},[]int{1358,2663},[]int{483,2664},[]int{774,2665},[]int{2015,2666},[]int{449,2667},[]int{101,2668},[]int{1453,2669},[]int{2048,2670},[]int{1768,2671},[]int{1604,2672},[]int{473,2673},[]int{1515,2674},[]int{1023,2675},[]int{550,2676},[]int{601,2677},[]int{2411,2678},[]int{1659,2679},[]int{1939,2680},[]int{1799,2681},[]int{1453,2682},[]int{1843,2683},[]int{2093,2684},[]int{361,2685},[]int{669,2686},[]int{638,2687},[]int{267,2688},[]int{790,2689},[]int{728,2690},[]int{1973,2691},[]int{993,2692},[]int{856,2693},[]int{87,2694},[]int{1324,2695},[]int{1392,2696},[]int{1676,2697},[]int{490,2698},[]int{817,2699},[]int{1258,2700},[]int{444,2701},[]int{452,2702},[]int{2572,2703},[]int{769,2704},[]int{448,2705},[]int{673,2706},[]int{2525,2707},[]int{969,2708},[]int{2449,2709},[]int{1974,2710},[]int{1923,2711},[]int{623,2712},[]int{1828,2713},[]int{2172,2714},[]int{2174,2715},[]int{1085,2716},[]int{1514,2717},[]int{2082,2718},[]int{1138,2719},[]int{2389,2720},[]int{1640,2721},[]int{847,2722},[]int{214,2723},[]int{2411,2724},[]int{2000,2725},[]int{2098,2726},[]int{1749,2727},[]int{2671,2728},[]int{826,2729},[]int{378,2730},[]int{1002,2731},[]int{1383,2732},[]int{834,2733},[]int{1468,2734},[]int{1297,2735},[]int{741,2736},[]int{2313,2737},[]int{2601,2738},[]int{833,2739},[]int{589,2740},[]int{2566,2741},[]int{1755,2742},[]int{124,2743},[]int{447,2744},[]int{1539,2745},[]int{1251,2746},[]int{500,2747},[]int{2316,2748},[]int{146,2749},[]int{804,2750},[]int{331,2751},[]int{1520,2752},[]int{365,2753},[]int{946,2754},[]int{1575,2755},[]int{2207,2756},[]int{1519,2757},[]int{2221,2758},[]int{2151,2759},[]int{2020,2760},[]int{2544,2761},[]int{2453,2762},[]int{1734,2763},[]int{972,2764},[]int{2503,2765},[]int{423,2766},[]int{2459,2767},[]int{2163,2768},[]int{1019,2769},[]int{1267,2770},[]int{1878,2771},[]int{2730,2772},[]int{1448,2773},[]int{1251,2774},[]int{2394,2775},[]int{510,2776},[]int{603,2777},[]int{2388,2778},[]int{513,2779},[]int{789,2780},[]int{641,2781},[]int{1979,2782},[]int{1885,2783},[]int{2447,2784},[]int{681,2785},[]int{1495,2786},[]int{2734,2787},[]int{354,2788},[]int{1130,2789},[]int{2141,2790},[]int{1925,2791},[]int{371,2792},[]int{2103,2793},[]int{2374,2794},[]int{445,2795},[]int{1009,2796},[]int{1334,2797},[]int{2170,2798},[]int{354,2799},[]int{1760,2800},[]int{558,2801},[]int{1768,2802},[]int{1477,2803},[]int{1921,2804},[]int{1172,2805},[]int{586,2806},[]int{573,2807},[]int{1217,2808},[]int{287,2809},[]int{1427,2810},[]int{419,2811},[]int{880,2812},[]int{2723,2813},[]int{810,2814},[]int{859,2815},[]int{999,2816},[]int{966,2817},[]int{1507,2818},[]int{189,2819},[]int{489,2820},[]int{198,2821},[]int{2487,2822},[]int{2674,2823},[]int{703,2824},[]int{1215,2825},[]int{2124,2826},[]int{2541,2827},[]int{351,2828},[]int{123,2829},[]int{2644,2830},[]int{2612,2831},[]int{1728,2832},[]int{767,2833},[]int{2362,2834},[]int{2003,2835},[]int{1149,2836},[]int{656,2837},[]int{1549,2838},[]int{1451,2839},[]int{1467,2840},[]int{1619,2841},[]int{578,2842},[]int{2755,2843},[]int{1365,2844},[]int{728,2845},[]int{2707,2846},[]int{806,2847},[]int{811,2848},[]int{864,2849},[]int{660,2850},[]int{2083,2851},[]int{639,2852},[]int{113,2853},[]int{918,2854},[]int{1086,2855},[]int{1540,2856},[]int{1365,2857},[]int{718,2858},[]int{538,2859},[]int{2016,2860},[]int{2712,2861},[]int{1804,2862},[]int{424,2863},[]int{1622,2864},[]int{224,2865},[]int{2735,2866},[]int{2119,2867},[]int{2257,2868},[]int{2240,2869},[]int{2249,2870},[]int{2339,2871},[]int{1585,2872},[]int{2806,2873},[]int{287,2874},[]int{1543,2875},[]int{1308,2876},[]int{734,2877},[]int{1485,2878},[]int{643,2879},[]int{1552,2880},[]int{2001,2881},[]int{974,2882},[]int{2489,2883},[]int{2280,2884},[]int{1344,2885},[]int{302,2886},[]int{1316,2887},[]int{2728,2888},[]int{1447,2889},[]int{1030,2890},[]int{2795,2891},[]int{2854,2892},[]int{302,2893},[]int{260,2894},[]int{63,2895},[]int{1943,2896},[]int{2723,2897},[]int{1285,2898},[]int{1435,2899},[]int{2675,2900},[]int{479,2901},[]int{2597,2902},[]int{779,2903},[]int{15,2904},[]int{2199,2905},[]int{1352,2906},[]int{1335,2907},[]int{2309,2908},[]int{412,2909},[]int{1357,2910},[]int{860,2911},[]int{1674,2912},[]int{570,2913},[]int{1332,2914},[]int{351,2915},[]int{2892,2916},[]int{2678,2917},[]int{2220,2918},[]int{1840,2919},[]int{1869,2920},[]int{2822,2921},[]int{1223,2922},[]int{1451,2923},[]int{2244,2924},[]int{913,2925},[]int{2221,2926},[]int{2206,2927},[]int{567,2928},[]int{1902,2929},[]int{1781,2930},[]int{2333,2931},[]int{2507,2932},[]int{2323,2933},[]int{236,2934},[]int{2697,2935},[]int{2688,2936},[]int{1324,2937},[]int{342,2938},[]int{1168,2939},[]int{1017,2940},[]int{436,2941},[]int{2789,2942},[]int{1200,2943},[]int{908,2944},[]int{5,2945},[]int{1202,2946},[]int{2853,2947},[]int{1355,2948},[]int{1809,2949},[]int{2325,2950},[]int{460,2951},[]int{40,2952},[]int{2056,2953},[]int{1285,2954},[]int{1774,2955},[]int{2918,2956},[]int{2908,2957},[]int{2346,2958},[]int{699,2959},[]int{1033,2960},[]int{294,2961},[]int{1143,2962},[]int{1106,2963},[]int{1703,2964},[]int{1012,2965},[]int{254,2966},[]int{2820,2967},[]int{1338,2968},[]int{386,2969},[]int{2109,2970},[]int{2753,2971},[]int{1419,2972},[]int{1449,2973},[]int{1606,2974},[]int{690,2975},[]int{940,2976},[]int{343,2977},[]int{1541,2978},[]int{211,2979},[]int{33,2980},[]int{1070,2981},[]int{2770,2982},[]int{1758,2983},[]int{2708,2984},[]int{1973,2985},[]int{2855,2986},[]int{178,2987},[]int{2860,2988},[]int{290,2989},[]int{212,2990},[]int{1890,2991},[]int{1138,2992},[]int{314,2993},[]int{92,2994},[]int{624,2995},[]int{2628,2996},[]int{1974,2997},[]int{1270,2998},[]int{1129,2999},[]int{1270,3000},[]int{1975,3001},[]int{2029,3002},[]int{2611,3003},[]int{2934,3004},[]int{2804,3005},[]int{149,3006},[]int{738,3007},[]int{699,3008},[]int{2159,3009},[]int{2936,3010},[]int{1337,3011},[]int{511,3012},[]int{979,3013},[]int{2858,3014},[]int{1088,3015},[]int{838,3016},[]int{1751,3017},[]int{40,3018},[]int{37,3019},[]int{471,3020},[]int{2081,3021},[]int{760,3022},[]int{709,3023},[]int{2150,3024},[]int{2187,3025},[]int{2891,3026},[]int{2585,3027},[]int{2319,3028},[]int{113,3029},[]int{2715,3030},[]int{369,3031},[]int{1267,3032},[]int{1829,3033},[]int{1215,3034},[]int{2942,3035},[]int{812,3036},[]int{353,3037},[]int{79,3038},[]int{962,3039},[]int{2672,3040},[]int{1990,3041},[]int{2991,3042},[]int{1403,3043},[]int{1355,3044},[]int{2989,3045},[]int{1403,3046},[]int{105,3047},[]int{1106,3048},[]int{1406,3049},[]int{1978,3050},[]int{660,3051},[]int{2973,3052},[]int{1310,3053},[]int{984,3054},[]int{2982,3055},[]int{360,3056},[]int{1203,3057},[]int{59,3058},[]int{1581,3059},[]int{411,3060},[]int{700,3061},[]int{500,3062},[]int{983,3063},[]int{3,3064},[]int{1400,3065},[]int{537,3066},[]int{841,3067},[]int{77,3068},[]int{2304,3069},[]int{1629,3070},[]int{166,3071},[]int{509,3072},[]int{2127,3073},[]int{324,3074},[]int{1586,3075},[]int{2479,3076},[]int{2902,3077},[]int{1742,3078},[]int{3047,3079},[]int{323,3080},[]int{1112,3081},[]int{1406,3082},[]int{1614,3083},[]int{2700,3084},[]int{717,3085},[]int{2423,3086},[]int{1887,3087},[]int{669,3088},[]int{2640,3089},[]int{3057,3090},[]int{1908,3091},[]int{3016,3092},[]int{902,3093},[]int{2538,3094},[]int{1993,3095},[]int{1386,3096},[]int{1458,3097},[]int{2614,3098},[]int{1397,3099},[]int{511,3100},[]int{1387,3101},[]int{1942,3102},[]int{1060,3103},[]int{1879,3104},[]int{1005,3105},[]int{42,3106},[]int{1989,3107},[]int{426,3108},[]int{2080,3109},[]int{516,3110},[]int{2172,3111},[]int{2782,3112},[]int{1582,3113},[]int{2961,3114},[]int{2687,3115},[]int{167,3116},[]int{761,3117},[]int{974,3118},[]int{602,3119},[]int{1369,3120},[]int{2371,3121},[]int{1619,3122},[]int{1905,3123},[]int{2270,3124},[]int{835,3125},[]int{1835,3126},[]int{2786,3127},[]int{2254,3128},[]int{2886,3129},[]int{2468,3130},[]int{1954,3131},[]int{855,3132},[]int{1169,3133},[]int{673,3134},[]int{2250,3135},[]int{1457,3136},[]int{622,3137},[]int{2291,3138},[]int{1969,3139},[]int{2360,3140},[]int{1511,3141},[]int{590,3142},[]int{2182,3143},[]int{2807,3144},[]int{2566,3145},[]int{1843,3146},[]int{652,3147},[]int{2538,3148},[]int{1041,3149},[]int{872,3150},[]int{1453,3151},[]int{2959,3152},[]int{1011,3153},[]int{820,3154},[]int{146,3155},[]int{589,3156},[]int{657,3157},[]int{188,3158},[]int{1076,3159},[]int{769,3160},[]int{3108,3161},[]int{3091,3162},[]int{1468,3163},[]int{438,3164},[]int{3106,3165},[]int{3150,3166},[]int{1546,3167},[]int{448,3168},[]int{160,3169},[]int{1769,3170},[]int{3165,3171},[]int{1246,3172},[]int{1869,3173},[]int{1803,3174},[]int{1754,3175},[]int{394,3176},[]int{1871,3177},[]int{1540,3178},[]int{2975,3179},[]int{353,3180},[]int{1245,3181},[]int{2222,3182},[]int{1699,3183},[]int{1060,3184},[]int{2340,3185},[]int{1158,3186},[]int{3179,3187},[]int{1869,3188},[]int{783,3189},[]int{2642,3190},[]int{523,3191},[]int{1376,3192},[]int{2483,3193},[]int{1451,3194},[]int{2248,3195},[]int{2935,3196},[]int{3074,3197},[]int{2210,3198},[]int{948,3199},[]int{3128,3200},[]int{2566,3201},[]int{362,3202},[]int{387,3203},[]int{2366,3204},[]int{1190,3205},[]int{2815,3206},[]int{1914,3207},[]int{1442,3208},[]int{2129,3209},[]int{2221,3210},[]int{1393,3211},[]int{2185,3212},[]int{1112,3213},[]int{1016,3214},[]int{791,3215},[]int{1243,3216},[]int{1075,3217},[]int{2277,3218},[]int{1996,3219},[]int{2835,3220},[]int{159,3221},[]int{2392,3222},[]int{601,3223},[]int{1478,3224},[]int{3043,3225},[]int{1389,3226},[]int{2773,3227},[]int{2346,3228},[]int{3149,3229},[]int{1266,3230},[]int{1955,3231},[]int{3084,3232},[]int{3101,3233},[]int{1770,3234},[]int{707,3235},[]int{2874,3236},[]int{3018,3237},[]int{3017,3238},[]int{2798,3239},[]int{2027,3240},[]int{1059,3241},[]int{2199,3242},[]int{744,3243},[]int{2920,3244},[]int{1499,3245},[]int{2671,3246},[]int{3017,3247},[]int{121,3248},[]int{675,3249},[]int{3082,3250},[]int{2419,3251},[]int{1521,3252},[]int{1521,3253},[]int{2715,3254},[]int{506,3255},[]int{1536,3256},[]int{730,3257},[]int{577,3258},[]int{857,3259},[]int{167,3260},[]int{2868,3261},[]int{1018,3262},[]int{1762,3263},[]int{2097,3264},[]int{1005,3265},[]int{2375,3266},[]int{666,3267},[]int{1876,3268},[]int{162,3269},[]int{1126,3270},[]int{986,3271},[]int{1995,3272},[]int{1656,3273},[]int{244,3274},[]int{1477,3275},[]int{1100,3276},[]int{487,3277},[]int{778,3278},[]int{2929,3279},[]int{834,3280},[]int{45,3281},[]int{2421,3282},[]int{771,3283},[]int{805,3284},[]int{704,3285},[]int{408,3286},[]int{2661,3287},[]int{2594,3288},[]int{1662,3289},[]int{450,3290},[]int{832,3291},[]int{530,3292},[]int{199,3293},[]int{3087,3294},[]int{2435,3295},[]int{507,3296},[]int{2126,3297},[]int{566,3298},[]int{181,3299},[]int{1926,3300},[]int{1232,3301},[]int{383,3302},[]int{1187,3303},[]int{3235,3304},[]int{2157,3305},[]int{1149,3306},[]int{2833,3307},[]int{1148,3308},[]int{2458,3309},[]int{2890,3310},[]int{2163,3311},[]int{2122,3312},[]int{2617,3313},[]int{33,3314},[]int{1216,3315},[]int{1362,3316},[]int{2119,3317},[]int{765,3318},[]int{1809,3319},[]int{1679,3320},[]int{1803,3321},[]int{284,3322},[]int{1537,3323},[]int{2112,3324},[]int{531,3325},[]int{651,3326},[]int{158,3327},[]int{573,3328},[]int{226,3329},[]int{181,3330},[]int{2552,3331},[]int{36,3332},[]int{436,3333},[]int{777,3334},[]int{3,3335},[]int{1330,3336},[]int{3030,3337},[]int{32,3338},[]int{1656,3339},[]int{1344,3340},[]int{982,3341},[]int{100,3342},[]int{2206,3343},[]int{2948,3344},[]int{449,3345},[]int{2589,3346},[]int{599,3347},[]int{800,3348},[]int{1032,3349},[]int{573,3350},[]int{2578,3351},[]int{604,3352},[]int{881,3353},[]int{1839,3354},[]int{862,3355},[]int{1235,3356},[]int{2515,3357},[]int{2728,3358},[]int{2841,3359},[]int{300,3360},[]int{547,3361},[]int{1254,3362},[]int{939,3363},[]int{448,3364},[]int{3013,3365},[]int{1065,3366},[]int{3277,3367},[]int{410,3368},[]int{1572,3369},[]int{52,3370},[]int{2519,3371},[]int{1948,3372},[]int{957,3373},[]int{758,3374},[]int{1043,3375},[]int{693,3376},[]int{172,3377},[]int{839,3378},[]int{2077,3379},[]int{1640,3380},[]int{2857,3381},[]int{755,3382},[]int{2264,3383},[]int{2932,3384},[]int{2739,3385},[]int{1556,3386},[]int{3331,3387},[]int{753,3388},[]int{2445,3389},[]int{3090,3390},[]int{1239,3391},[]int{700,3392},[]int{2749,3393},[]int{2401,3394},[]int{552,3395},[]int{183,3396},[]int{75,3397},[]int{2678,3398},[]int{2144,3399},[]int{2992,3400},[]int{984,3401},[]int{1157,3402},[]int{1197,3403},[]int{1232,3404},[]int{375,3405},[]int{111,3406},[]int{572,3407},[]int{2000,3408},[]int{101,3409},[]int{83,3410},[]int{842,3411},[]int{1764,3412},[]int{1648,3413},[]int{1424,3414},[]int{3259,3415},[]int{3221,3416},[]int{1504,3417},[]int{3031,3418},[]int{1424,3419},[]int{1761,3420},[]int{576,3421},[]int{873,3422},[]int{77,3423},[]int{1856,3424},[]int{355,3425},[]int{1950,3426},[]int{969,3427},[]int{3154,3428},[]int{1033,3429},[]int{2160,3430},[]int{2295,3431},[]int{920,3432},[]int{3354,3433},[]int{2340,3434},[]int{415,3435},[]int{2189,3436},[]int{1284,3437},[]int{2714,3438},[]int{1685,3439},[]int{1162,3440},[]int{696,3441},[]int{2176,3442},[]int{420,3443},[]int{3226,3444},[]int{3232,3445},[]int{1465,3446},[]int{3243,3447},[]int{577,3448},[]int{11,3449},[]int{2841,3450},[]int{529,3451},[]int{2807,3452},[]int{2852,3453},[]int{2626,3454},[]int{565,3455},[]int{13,3456},[]int{2571,3457},[]int{804,3458},[]int{503,3459},[]int{159,3460},[]int{1258,3461},[]int{2974,3462},[]int{3282,3463},[]int{3277,3464},[]int{272,3465},[]int{766,3466},[]int{2390,3467},[]int{2121,3468},[]int{2822,3469},[]int{498,3470},[]int{2881,3471},[]int{2599,3472},[]int{1862,3473},[]int{2214,3474},[]int{1665,3475},[]int{949,3476},[]int{2930,3477},[]int{1850,3478},[]int{5,3479},[]int{1500,3480},[]int{821,3481},[]int{2604,3482},[]int{2628,3483},[]int{1523,3484},[]int{992,3485},[]int{61,3486},[]int{602,3487},[]int{2839,3488},[]int{1463,3489},[]int{2131,3490},[]int{3027,3491},[]int{236,3492},[]int{162,3493},[]int{529,3494},[]int{260,3495},[]int{1524,3496},[]int{1224,3497},[]int{945,3498},[]int{1551,3499},[]int{710,3500},[]int{681,3501},[]int{1382,3502},[]int{3385,3503},[]int{2171,3504},[]int{2367,3505},[]int{2707,3506},[]int{56,3507},[]int{33,3508},[]int{849,3509},[]int{2596,3510},[]int{539,3511},[]int{1011,3512},[]int{3136,3513},[]int{2320,3514},[]int{2105,3515},[]int{213,3516},[]int{1679,3517},[]int{1189,3518},[]int{686,3519},[]int{2385,3520},[]int{888,3521},[]int{141,3522},[]int{540,3523},[]int{1028,3524},[]int{1625,3525},[]int{1263,3526},[]int{140,3527},[]int{1921,3528},[]int{1469,3529},[]int{2509,3530},[]int{1501,3531},[]int{2303,3532},[]int{1737,3533},[]int{3311,3534},[]int{1026,3535},[]int{217,3536},[]int{1373,3537},[]int{2301,3538},[]int{1132,3539},[]int{2062,3540},[]int{1193,3541},[]int{1784,3542},[]int{1152,3543},[]int{3082,3544},[]int{1559,3545},[]int{2275,3546},[]int{2301,3547},[]int{46,3548},[]int{2343,3549},[]int{3323,3550},[]int{3409,3551},[]int{1104,3552},[]int{1759,3553},[]int{3044,3554},[]int{1487,3555},[]int{651,3556},[]int{656,3557},[]int{1537,3558},[]int{227,3559},[]int{3343,3560},[]int{3204,3561},[]int{3555,3562},[]int{1597,3563},[]int{2872,3564},[]int{1052,3565},[]int{1092,3566},[]int{2602,3567},[]int{38,3568},[]int{429,3569},[]int{180,3570},[]int{1356,3571},[]int{796,3572},[]int{493,3573},[]int{2339,3574},[]int{1947,3575},[]int{2757,3576},[]int{1373,3577},[]int{162,3578},[]int{3120,3579},[]int{641,3580},[]int{1795,3581},[]int{2882,3582},[]int{2547,3583},[]int{3496,3584},[]int{1645,3585},[]int{1520,3586},[]int{2367,3587},[]int{230,3588},[]int{2454,3589},[]int{436,3590},[]int{3149,3591},[]int{2307,3592},[]int{2855,3593},[]int{431,3594},[]int{1887,3595},[]int{1577,3596},[]int{503,3597},[]int{1431,3598},[]int{52,3599},[]int{1013,3600},[]int{1432,3601},[]int{3550,3602},[]int{192,3603},[]int{3499,3604},[]int{1486,3605},[]int{3512,3606},[]int{1564,3607},[]int{1055,3608},[]int{2093,3609},[]int{2327,3610},[]int{2643,3611},[]int{3009,3612},[]int{2758,3613},[]int{1731,3614},[]int{361,3615},[]int{3116,3616},[]int{3405,3617},[]int{2461,3618},[]int{1109,3619},[]int{1819,3620},[]int{2334,3621},[]int{2437,3622},[]int{3282,3623},[]int{328,3624},[]int{1126,3625},[]int{1150,3626},[]int{1230,3627},[]int{3195,3628},[]int{2417,3629},[]int{3163,3630},[]int{1225,3631},[]int{3419,3632},[]int{1425,3633},[]int{2477,3634},[]int{2403,3635},[]int{3272,3636},[]int{2967,3637},[]int{882,3638},[]int{1157,3639},[]int{2501,3640},[]int{2906,3641},[]int{3103,3642},[]int{3034,3643},[]int{340,3644},[]int{338,3645},[]int{1294,3646},[]int{2023,3647},[]int{2481,3648},[]int{3308,3649},[]int{734,3650},[]int{2627,3651},[]int{2500,3652},[]int{3107,3653},[]int{675,3654},[]int{84,3655},[]int{3396,3656},[]int{3615,3657},[]int{3654,3658},[]int{1965,3659},[]int{1824,3660},[]int{1073,3661},[]int{605,3662},[]int{1514,3663},[]int{1132,3664},[]int{374,3665},[]int{2246,3666},[]int{2508,3667},[]int{1918,3668},[]int{160,3669},[]int{2137,3670},[]int{3261,3671},[]int{699,3672},[]int{424,3673},[]int{1705,3674},[]int{2268,3675},[]int{3574,3676},[]int{2590,3677},[]int{2576,3678},[]int{2925,3679},[]int{1098,3680},[]int{3284,3681},[]int{2605,3682},[]int{3102,3683},[]int{2664,3684},[]int{913,3685},[]int{1797,3686},[]int{3310,3687},[]int{3336,3688},[]int{1835,3689},[]int{3483,3690},[]int{2275,3691},[]int{310,3692},[]int{3491,3693},[]int{2303,3694},[]int{1361,3695},[]int{1323,3696},[]int{2624,3697},[]int{1373,3698},[]int{1286,3699},[]int{2193,3700},[]int{2627,3701},[]int{3192,3702},[]int{1215,3703},[]int{2172,3704},[]int{690,3705},[]int{2872,3706},[]int{617,3707},[]int{3617,3708},[]int{478,3709},[]int{922,3710},[]int{1102,3711},[]int{3341,3712},[]int{1080,3713},[]int{3434,3714},[]int{3436,3715},[]int{963,3716},[]int{561,3717},[]int{1962,3718},[]int{955,3719},[]int{19,3720},[]int{945,3721},[]int{1607,3722},[]int{3169,3723},[]int{3144,3724},[]int{2528,3725},[]int{566,3726},[]int{666,3727},[]int{2589,3728},[]int{1756,3729},[]int{1498,3730},[]int{904,3731},[]int{341,3732},[]int{3173,3733},[]int{2718,3734},[]int{2588,3735},[]int{1837,3736},[]int{3363,3737},[]int{1204,3738},[]int{244,3739},[]int{1314,3740},[]int{3490,3741},[]int{3715,3742},[]int{2516,3743},[]int{1100,3744},[]int{263,3745},[]int{3647,3746},[]int{803,3747},[]int{1993,3748},[]int{3404,3749},[]int{2208,3750},[]int{2844,3751},[]int{1671,3752},[]int{3389,3753},[]int{3039,3754},[]int{614,3755},[]int{1902,3756},[]int{901,3757},[]int{3351,3758},[]int{993,3759},[]int{2134,3760},[]int{751,3761},[]int{3030,3762},[]int{2611,3763},[]int{902,3764},[]int{2295,3765},[]int{1279,3766},[]int{2500,3767},[]int{3025,3768},[]int{2742,3769},[]int{664,3770},[]int{2622,3771},[]int{1358,3772},[]int{1763,3773},[]int{1388,3774},[]int{1670,3775},[]int{2203,3776},[]int{1792,3777},[]int{874,3778},[]int{1694,3779},[]int{1754,3780},[]int{1217,3781},[]int{420,3782},[]int{1702,3783},[]int{2953,3784},[]int{879,3785},[]int{796,3786},[]int{1678,3787},[]int{2480,3788},[]int{2741,3789},[]int{2653,3790},[]int{1717,3791},[]int{1913,3792},[]int{2681,3793},[]int{2911,3794},[]int{2445,3795},[]int{2496,3796},[]int{2805,3797},[]int{1032,3798},[]int{2357,3799},[]int{1789,3800},[]int{42,3801},[]int{938,3802},[]int{2698,3803},[]int{1384,3804},[]int{589,3805},[]int{1877,3806},[]int{402,3807},[]int{3375,3808},[]int{220,3809},[]int{2672,3810},[]int{272,3811},[]int{2927,3812},[]int{1138,3813},[]int{2005,3814},[]int{388,3815},[]int{1780,3816},[]int{41,3817},[]int{2282,3818},[]int{2595,3819},[]int{2551,3820},[]int{2996,3821},[]int{2675,3822},[]int{2025,3823},[]int{2859,3824},[]int{3364,3825},[]int{590,3826},[]int{3408,3827},[]int{2136,3828},[]int{2469,3829},[]int{3255,3830},[]int{1876,3831},[]int{2421,3832},[]int{2976,3833},[]int{418,3834},[]int{1873,3835},[]int{1892,3836},[]int{888,3837},[]int{3067,3838},[]int{2127,3839},[]int{2620,3840},[]int{1136,3841},[]int{555,3842},[]int{1638,3843},[]int{114,3844},[]int{3471,3845},[]int{3268,3846},[]int{3421,3847},[]int{1390,3848},[]int{2945,3849},[]int{1433,3850},[]int{264,3851},[]int{617,3852},[]int{1940,3853},[]int{2266,3854},[]int{2025,3855},[]int{3712,3856},[]int{2054,3857},[]int{1625,3858},[]int{1061,3859},[]int{2388,3860},[]int{2789,3861},[]int{3598,3862},[]int{1148,3863},[]int{900,3864},[]int{3165,3865},[]int{546,3866},[]int{3802,3867},[]int{974,3868},[]int{2417,3869},[]int{2074,3870},[]int{1312,3871},[]int{1014,3872},[]int{1289,3873},[]int{3131,3874},[]int{2306,3875},[]int{3693,3876},[]int{2155,3877},[]int{1224,3878},[]int{812,3879},[]int{232,3880},[]int{1627,3881},[]int{2475,3882},[]int{2980,3883},[]int{616,3884},[]int{165,3885},[]int{3857,3886},[]int{1133,3887},[]int{747,3888},[]int{3061,3889},[]int{3340,3890},[]int{1609,3891},[]int{3246,3892},[]int{2915,3893},[]int{2932,3894},[]int{1271,3895},[]int{408,3896},[]int{2373,3897},[]int{936,3898},[]int{385,3899},[]int{3166,3900},[]int{807,3901},[]int{674,3902},[]int{2899,3903},[]int{3024,3904},[]int{2490,3905},[]int{900,3906},[]int{1280,3907},[]int{3847,3908},[]int{647,3909},[]int{2425,3910},[]int{3543,3911},[]int{3721,3912},[]int{2692,3913},[]int{3862,3914},[]int{1522,3915},[]int{3591,3916},[]int{595,3917},[]int{2656,3918},[]int{3239,3919},[]int{2881,3920},[]int{1718,3921},[]int{2239,3922},[]int{1812,3923},[]int{1897,3924},[]int{3744,3925},[]int{376,3926},[]int{3496,3927},[]int{2082,3928},[]int{3385,3929},[]int{1641,3930},[]int{400,3931},[]int{1372,3932},[]int{1416,3933},[]int{1123,3934},[]int{3774,3935},[]int{1023,3936},[]int{124,3937},[]int{1204,3938},[]int{3435,3939},[]int{2360,3940},[]int{1628,3941},[]int{86,3942},[]int{363,3943},[]int{3859,3944},[]int{2448,3945},[]int{3561,3946},[]int{287,3947},[]int{82,3948},[]int{48,3949},[]int{1868,3950},[]int{3131,3951},[]int{3606,3952},[]int{2694,3953},[]int{3763,3954},[]int{325,3955},[]int{1101,3956},[]int{3470,3957},[]int{784,3958},[]int{292,3959},[]int{689,3960},[]int{2683,3961},[]int{3217,3962},[]int{1881,3963},[]int{3745,3964},[]int{1013,3965},[]int{1233,3966},[]int{155,3967},[]int{1078,3968},[]int{171,3969},[]int{790,3970},[]int{2929,3971},[]int{2500,3972},[]int{10,3973},[]int{2646,3974},[]int{0,3975},[]int{2291,3976},[]int{197,3977},[]int{580,3978},[]int{723,3979},[]int{321,3980},[]int{3628,3981},[]int{2172,3982},[]int{1225,3983},[]int{1373,3984},[]int{3254,3985},[]int{2562,3986},[]int{2442,3987},[]int{907,3988},[]int{2539,3989},[]int{3152,3990},[]int{3181,3991},[]int{2175,3992},[]int{2433,3993},[]int{2908,3994},[]int{1820,3995},[]int{2316,3996},[]int{601,3997},[]int{2687,3998},[]int{681,3999},[]int{1098,4000},[]int{750,4001},[]int{3492,4002},[]int{235,4003},[]int{2195,4004},[]int{2896,4005},[]int{3494,4006},[]int{2613,4007},[]int{2420,4008},[]int{1399,4009},[]int{1739,4010},[]int{3234,4011},[]int{1112,4012},[]int{1179,4013},[]int{1585,4014},[]int{3133,4015},[]int{2443,4016},[]int{186,4017},[]int{121,4018},[]int{1760,4019},[]int{3813,4020},[]int{3281,4021},[]int{778,4022},[]int{1664,4023},[]int{3281,4024},[]int{1591,4025},[]int{1770,4026},[]int{1098,4027},[]int{3668,4028},[]int{2866,4029},[]int{1277,4030},[]int{3659,4031},[]int{3471,4032},[]int{2004,4033},[]int{162,4034},[]int{1573,4035},[]int{2466,4036},[]int{3958,4037},[]int{1629,4038},[]int{1938,4039},[]int{3115,4040},[]int{3781,4041},[]int{1862,4042},[]int{564,4043},[]int{1683,4044},[]int{3842,4045},[]int{1930,4046},[]int{3039,4047},[]int{4004,4048},[]int{882,4049},[]int{1564,4050},[]int{1482,4051},[]int{353,4052},[]int{1439,4053},[]int{1679,4054},[]int{3571,4055},[]int{706,4056},[]int{3567,4057},[]int{1031,4058},[]int{254,4059},[]int{2451,4060},[]int{567,4061},[]int{1294,4062},[]int{150,4063},[]int{2232,4064},[]int{2981,4065},[]int{4018,4066},[]int{675,4067},[]int{2136,4068},[]int{3580,4069},[]int{805,4070},[]int{2792,4071},[]int{1388,4072},[]int{786,4073},[]int{3819,4074},[]int{2463,4075},[]int{551,4076},[]int{3795,4077},[]int{1263,4078},[]int{403,4079},[]int{523,4080},[]int{347,4081},[]int{3731,4082},[]int{480,4083},[]int{3329,4084},[]int{216,4085},[]int{886,4086},[]int{513,4087},[]int{3871,4088},[]int{117,4089},[]int{2026,4090},[]int{2097,4091},[]int{957,4092},[]int{2673,4093},[]int{3785,4094},[]int{596,4095},[]int{659,4096},[]int{790,4097},[]int{3192,4098},[]int{1442,4099},[]int{3984,4100},[]int{1368,4101},[]int{3993,4102},[]int{1126,4103},[]int{754,4104},[]int{1842,4105},[]int{85,4106},[]int{3002,4107},[]int{163,4108},[]int{460,4109},[]int{2791,4110},[]int{1559,4111},[]int{245,4112},[]int{1425,4113},[]int{3161,4114},[]int{2104,4115},[]int{2647,4116},[]int{1770,4117},[]int{1495,4118},[]int{489,4119},[]int{1148,4120},[]int{484,4121},[]int{1863,4122},[]int{2289,4123},[]int{2032,4124},[]int{1561,4125},[]int{3282,4126},[]int{2264,4127},[]int{745,4128},[]int{4041,4129},[]int{469,4130},[]int{3839,4131},[]int{3576,4132},[]int{2190,4133},[]int{1240,4134},[]int{2594,4135},[]int{1938,4136},[]int{1782,4137},[]int{1960,4138},[]int{3113,4139},[]int{3167,4140},[]int{1781,4141},[]int{2557,4142},[]int{1468,4143},[]int{3270,4144},[]int{894,4145},[]int{654,4146},[]int{808,4147},[]int{3778,4148},[]int{1280,4149},[]int{2814,4150},[]int{132,4151},[]int{3972,4152},[]int{32,4153},[]int{1120,4154},[]int{1696,4155},[]int{601,4156},[]int{2622,4157},[]int{1896,4158},[]int{45,4159},[]int{1753,4160},[]int{2150,4161},[]int{2873,4162},[]int{3315,4163},[]int{316,4164},[]int{690,4165},[]int{509,4166},[]int{171,4167},[]int{4104,4168},[]int{640,4169},[]int{98,4170},[]int{1363,4171},[]int{2375,4172},[]int{22,4173},[]int{2512,4174},[]int{3365,4175},[]int{2529,4176},[]int{3587,4177},[]int{3698,4178},[]int{1892,4179},[]int{3887,4180},[]int{196,4181},[]int{1006,4182},[]int{2372,4183},[]int{380,4184},[]int{878,4185},[]int{1285,4186},[]int{3160,4187},[]int{1729,4188},[]int{2883,4189},[]int{3282,4190},[]int{566,4191},[]int{3965,4192},[]int{2527,4193},[]int{2658,4194},[]int{744,4195},[]int{870,4196},[]int{4048,4197},[]int{2905,4198},[]int{415,4199},[]int{631,4200},[]int{2106,4201},[]int{2875,4202},[]int{3984,4203},[]int{2983,4204},[]int{2698,4205},[]int{1037,4206},[]int{4190,4207},[]int{2619,4208},[]int{3069,4209},[]int{4153,4210},[]int{2272,4211},[]int{696,4212},[]int{2436,4213},[]int{3655,4214},[]int{1915,4215},[]int{3832,4216},[]int{764,4217},[]int{3646,4218},[]int{3468,4219},[]int{2567,4220},[]int{2292,4221},[]int{1485,4222},[]int{1864,4223},[]int{777,4224},[]int{3557,4225},[]int{2092,4226},[]int{1822,4227},[]int{1271,4228},[]int{782,4229},[]int{4006,4230},[]int{1956,4231},[]int{1340,4232},[]int{557,4233},[]int{2847,4234},[]int{2831,4235},[]int{2747,4236},[]int{1598,4237},[]int{232,4238},[]int{2483,4239},[]int{919,4240},[]int{4077,4241},[]int{3965,4242},[]int{3365,4243},[]int{1838,4244},[]int{678,4245},[]int{309,4246},[]int{3234,4247},[]int{539,4248},[]int{1916,4249},[]int{443,4250},[]int{627,4251},[]int{1755,4252},[]int{2454,4253},[]int{4042,4254},[]int{3686,4255},[]int{2611,4256},[]int{3442,4257},[]int{1067,4258},[]int{825,4259},[]int{2264,4260},[]int{715,4261},[]int{3863,4262},[]int{3431,4263},[]int{1603,4264},[]int{4243,4265},[]int{895,4266},[]int{2195,4267},[]int{1156,4268},[]int{3532,4269},[]int{42,4270},[]int{1838,4271},[]int{4235,4272},[]int{2154,4273},[]int{672,4274},[]int{1999,4275},[]int{2490,4276},[]int{3137,4277},[]int{2681,4278},[]int{4246,4279},[]int{322,4280},[]int{2788,4281},[]int{2646,4282},[]int{1480,4283},[]int{1341,4284},[]int{592,4285},[]int{2150,4286},[]int{1051,4287},[]int{1645,4288},[]int{2353,4289},[]int{3631,4290},[]int{3256,4291},[]int{912,4292},[]int{474,4293},[]int{895,4294},[]int{253,4295},[]int{271,4296},[]int{2625,4297},[]int{1461,4298},[]int{473,4299},[]int{2992,4300},[]int{2703,4301},[]int{3774,4302},[]int{3253,4303},[]int{1672,4304},[]int{3792,4305},[]int{2080,4306},[]int{1776,4307},[]int{3083,4308},[]int{2794,4309},[]int{1863,4310},[]int{1806,4311},[]int{4225,4312},[]int{1481,4313},[]int{282,4314},[]int{4232,4315},[]int{1593,4316},[]int{3218,4317},[]int{1060,4318},[]int{346,4319},[]int{1164,4320},[]int{3073,4321},[]int{2533,4322},[]int{1672,4323},[]int{735,4324},[]int{2664,4325},[]int{845,4326},[]int{3312,4327},[]int{141,4328},[]int{604,4329},[]int{2455,4330},[]int{1194,4331},[]int{3129,4332},[]int{2093,4333},[]int{3427,4334},[]int{1209,4335},[]int{3861,4336},[]int{708,4337},[]int{3426,4338},[]int{4089,4339},[]int{3769,4340},[]int{2239,4341},[]int{1150,4342},[]int{3218,4343},[]int{4195,4344},[]int{831,4345},[]int{3957,4346},[]int{2928,4347},[]int{508,4348},[]int{4138,4349},[]int{168,4350},[]int{1217,4351},[]int{227,4352},[]int{2976,4353},[]int{931,4354},[]int{2001,4355},[]int{3949,4356},[]int{1705,4357},[]int{2560,4358},[]int{1625,4359},[]int{753,4360},[]int{2433,4361},[]int{2005,4362},[]int{1882,4363},[]int{214,4364},[]int{2177,4365},[]int{4232,4366},[]int{3465,4367},[]int{2084,4368},[]int{3488,4369},[]int{814,4370},[]int{3681,4371},[]int{3432,4372},[]int{3158,4373},[]int{1846,4374},[]int{3269,4375},[]int{373,4376},[]int{927,4377},[]int{1459,4378},[]int{1984,4379},[]int{1620,4380},[]int{1659,4381},[]int{3219,4382},[]int{973,4383},[]int{3239,4384},[]int{1542,4385},[]int{1371,4386},[]int{734,4387},[]int{3382,4388},[]int{1089,4389},[]int{3746,4390},[]int{2685,4391},[]int{3438,4392},[]int{934,4393},[]int{1061,4394},[]int{2158,4395},[]int{2239,4396},[]int{3801,4397},[]int{151,4398},[]int{3631,4399},[]int{2090,4400},[]int{1296,4401},[]int{1594,4402},[]int{812,4403},[]int{541,4404},[]int{2966,4405},[]int{1418,4406},[]int{3361,4407},[]int{27,4408},[]int{1109,4409},[]int{2253,4410},[]int{266,4411},[]int{191,4412},[]int{476,4413},[]int{3274,4414},[]int{3092,4415},[]int{3148,4416},[]int{827,4417},[]int{717,4418},[]int{2708,4419},[]int{642,4420},[]int{4242,4421},[]int{3424,4422},[]int{4370,4423},[]int{121,4424},[]int{1481,4425},[]int{1791,4426},[]int{1309,4427},[]int{4233,4428},[]int{767,4429},[]int{4063,4430},[]int{3574,4431},[]int{1978,4432},[]int{2633,4433},[]int{1402,4434},[]int{243,4435},[]int{594,4436},[]int{4220,4437},[]int{3281,4438},[]int{436,4439},[]int{520,4440},[]int{1205,4441},[]int{417,4442},[]int{845,4443},[]int{3724,4444},[]int{1179,4445},[]int{2336,4446},[]int{4411,4447},[]int{1989,4448},[]int{225,4449},[]int{2359,4450},[]int{127,4451},[]int{4222,4452},[]int{3877,4453},[]int{3642,4454},[]int{2423,4455},[]int{2830,4456},[]int{1840,4457},[]int{1248,4458},[]int{4260,4459},[]int{3294,4460},[]int{1561,4461},[]int{1319,4462},[]int{347,4463},[]int{2266,4464},[]int{823,4465},[]int{1194,4466},[]int{3860,4467},[]int{3517,4468},[]int{3444,4469},[]int{2739,4470},[]int{138,4471},[]int{2265,4472},[]int{815,4473},[]int{27,4474},[]int{2687,4475},[]int{2231,4476},[]int{4236,4477},[]int{3030,4478},[]int{85,4479},[]int{4103,4480},[]int{4462,4481},[]int{2794,4482},[]int{1182,4483},[]int{2729,4484},[]int{1905,4485},[]int{2214,4486},[]int{590,4487},[]int{1848,4488},[]int{529,4489},[]int{1746,4490},[]int{1772,4491},[]int{3044,4492},[]int{2104,4493},[]int{4048,4494},[]int{1513,4495},[]int{4283,4496},[]int{728,4497},[]int{3245,4498},[]int{1158,4499},[]int{3592,4500},[]int{3166,4501},[]int{2285,4502},[]int{793,4503},[]int{1058,4504},[]int{1997,4505},[]int{2037,4506},[]int{857,4507},[]int{236,4508},[]int{2837,4509},[]int{3428,4510},[]int{3738,4511},[]int{4102,4512},[]int{754,4513},[]int{1726,4514},[]int{4158,4515},[]int{1731,4516},[]int{489,4517},[]int{1524,4518},[]int{3075,4519},[]int{1300,4520},[]int{2647,4521},[]int{1281,4522},[]int{678,4523},[]int{66,4524},[]int{429,4525},[]int{4321,4526},[]int{1580,4527},[]int{3204,4528},[]int{2593,4529},[]int{2677,4530},[]int{3818,4531},[]int{3133,4532},[]int{4373,4533},[]int{3553,4534},[]int{4017,4535},[]int{4086,4536},[]int{2884,4537},[]int{1647,4538},[]int{1836,4539},[]int{3487,4540},[]int{239,4541},[]int{2559,4542},[]int{136,4543},[]int{2997,4544},[]int{3328,4545},[]int{995,4546},[]int{395,4547},[]int{2784,4548},[]int{2542,4549},[]int{4312,4550},[]int{4099,4551},[]int{3742,4552},[]int{3078,4553},[]int{4210,4554},[]int{4200,4555},[]int{1524,4556},[]int{3254,4557},[]int{1641,4558},[]int{4471,4559},[]int{2791,4560},[]int{2211,4561},[]int{1480,4562},[]int{1904,4563},[]int{1883,4564},[]int{3469,4565},[]int{969,4566},[]int{1292,4567},[]int{3650,4568},[]int{3343,4569},[]int{3601,4570},[]int{4262,4571},[]int{1969,4572},[]int{1331,4573},[]int{3288,4574},[]int{3128,4575},[]int{1065,4576},[]int{1833,4577},[]int{3901,4578},[]int{1542,4579},[]int{376,4580},[]int{375,4581},[]int{3817,4582},[]int{1148,4583},[]int{65,4584},[]int{1052,4585},[]int{618,4586},[]int{908,4587},[]int{1162,4588},[]int{3072,4589},[]int{1813,4590},[]int{2496,4591},[]int{905,4592},[]int{3834,4593},[]int{2760,4594},[]int{2759,4595},[]int{2219,4596},[]int{1924,4597},[]int{3809,4598},[]int{2814,4599},[]int{297,4600},[]int{976,4601},[]int{463,4602},[]int{2229,4603},[]int{3313,4604},[]int{3589,4605},[]int{3297,4606},[]int{181,4607},[]int{1269,4608},[]int{4153,4609},[]int{2750,4610},[]int{101,4611},[]int{19,4612},[]int{1272,4613},[]int{2061,4614},[]int{4278,4615},[]int{2170,4616},[]int{3629,4617},[]int{2925,4618},[]int{398,4619},[]int{4136,4620},[]int{326,4621},[]int{1827,4622},[]int{3486,4623},[]int{1005,4624},[]int{4356,4625},[]int{1911,4626},[]int{935,4627},[]int{923,4628},[]int{1079,4629},[]int{4381,4630},[]int{2903,4631},[]int{3001,4632},[]int{3619,4633},[]int{4466,4634},[]int{4480,4635},[]int{4326,4636},[]int{4576,4637},[]int{3977,4638},[]int{786,4639},[]int{207,4640},[]int{4487,4641},[]int{4270,4642},[]int{2353,4643},[]int{1174,4644},[]int{2487,4645},[]int{3569,4646},[]int{339,4647},[]int{1228,4648},[]int{3271,4649},[]int{1462,4650},[]int{2516,4651},[]int{4102,4652},[]int{928,4653},[]int{3072,4654},[]int{4441,4655},[]int{904,4656},[]int{1134,4657},[]int{4054,4658},[]int{4241,4659},[]int{1313,4660},[]int{2195,4661},[]int{738,4662},[]int{519,4663},[]int{3123,4664},[]int{3382,4665},[]int{3132,4666},[]int{199,4667},[]int{322,4668},[]int{4171,4669},[]int{2008,4670},[]int{771,4671},[]int{3305,4672},[]int{1391,4673},[]int{2242,4674},[]int{1942,4675},[]int{503,4676},[]int{4439,4677},[]int{2026,4678},[]int{3067,4679},[]int{3924,4680},[]int{95,4681},[]int{2983,4682},[]int{1965,4683},[]int{2857,4684},[]int{4230,4685},[]int{2309,4686},[]int{137,4687},[]int{222,4688},[]int{797,4689},[]int{2079,4690},[]int{1406,4691},[]int{2287,4692},[]int{1756,4693},[]int{3898,4694},[]int{1456,4695},[]int{4254,4696},[]int{1313,4697},[]int{3909,4698},[]int{3137,4699},[]int{2213,4700},[]int{2135,4701},[]int{3095,4702},[]int{93,4703},[]int{2007,4704},[]int{52,4705},[]int{2642,4706},[]int{1851,4707},[]int{3540,4708},[]int{1591,4709},[]int{4269,4710},[]int{655,4711},[]int{2918,4712},[]int{1131,4713},[]int{4052,4714},[]int{786,4715},[]int{3880,4716},[]int{3590,4717},[]int{680,4718},[]int{1247,4719},[]int{3938,4720},[]int{1830,4721},[]int{2784,4722},[]int{66,4723},[]int{1003,4724},[]int{197,4725},[]int{2076,4726},[]int{4248,4727},[]int{2196,4728},[]int{2759,4729},[]int{3979,4730},[]int{2169,4731},[]int{2533,4732},[]int{4377,4733},[]int{2672,4734},[]int{4629,4735},[]int{686,4736},[]int{891,4737},[]int{3252,4738},[]int{4268,4739},[]int{1260,4740},[]int{1829,4741},[]int{483,4742},[]int{4476,4743},[]int{2814,4744},[]int{2023,4745},[]int{527,4746},[]int{2118,4747},[]int{327,4748},[]int{3267,4749},[]int{3914,4750},[]int{3237,4751},[]int{1545,4752},[]int{4123,4753},[]int{1013,4754},[]int{2292,4755},[]int{1400,4756},[]int{926,4757},[]int{3497,4758},[]int{4036,4759},[]int{2018,4760},[]int{1680,4761},[]int{2916,4762},[]int{383,4763},[]int{2379,4764},[]int{2666,4765},[]int{2700,4766},[]int{3090,4767},[]int{3714,4768},[]int{3702,4769},[]int{1456,4770},[]int{497,4771},[]int{979,4772},[]int{3699,4773},[]int{4408,4774},[]int{1393,4775},[]int{151,4776},[]int{8,4777},[]int{4253,4778},[]int{4182,4779},[]int{4374,4780},[]int{3452,4781},[]int{1648,4782},[]int{4027,4783},[]int{1175,4784},[]int{3168,4785},[]int{2654,4786},[]int{2075,4787},[]int{3631,4788},[]int{1827,4789},[]int{4006,4790},[]int{2527,4791},[]int{2211,4792},[]int{4481,4793},[]int{2881,4794},[]int{1689,4795},[]int{1816,4796},[]int{3430,4797},[]int{1582,4798},[]int{1151,4799},[]int{4263,4800},[]int{1481,4801},[]int{3398,4802},[]int{2721,4803},[]int{4657,4804},[]int{4485,4805},[]int{2367,4806},[]int{2839,4807},[]int{4094,4808},[]int{2932,4809},[]int{124,4810},[]int{3541,4811},[]int{1625,4812},[]int{399,4813},[]int{4003,4814},[]int{4247,4815},[]int{1135,4816},[]int{2077,4817},[]int{1612,4818},[]int{1158,4819},[]int{3854,4820},[]int{1792,4821},[]int{4396,4822},[]int{762,4823},[]int{45,4824},[]int{4257,4825},[]int{3432,4826},[]int{3419,4827},[]int{899,4828},[]int{4249,4829},[]int{1322,4830},[]int{2495,4831},[]int{2864,4832},[]int{518,4833},[]int{3599,4834},[]int{3382,4835},[]int{1087,4836},[]int{2878,4837},[]int{2217,4838},[]int{3496,4839},[]int{2494,4840},[]int{1638,4841},[]int{1506,4842},[]int{2394,4843},[]int{4176,4844},[]int{2257,4845},[]int{4814,4846},[]int{4291,4847},[]int{1542,4848},[]int{1061,4849},[]int{843,4850},[]int{736,4851},[]int{3338,4852},[]int{4117,4853},[]int{3647,4854},[]int{4570,4855},[]int{4577,4856},[]int{908,4857},[]int{4555,4858},[]int{964,4859},[]int{4004,4860},[]int{3378,4861},[]int{251,4862},[]int{3087,4863},[]int{3122,4864},[]int{1691,4865},[]int{1665,4866},[]int{4630,4867},[]int{2663,4868},[]int{4143,4869},[]int{2664,4870},[]int{4212,4871},[]int{2748,4872},[]int{3595,4873},[]int{1,4874},[]int{1030,4875},[]int{3476,4876},[]int{798,4877},[]int{3996,4878},[]int{3488,4879},[]int{3200,4880},[]int{606,4881},[]int{1495,4882},[]int{801,4883},[]int{2068,4884},[]int{4238,4885},[]int{4750,4886},[]int{4524,4887},[]int{2694,4888},[]int{4673,4889},[]int{1204,4890},[]int{3471,4891},[]int{723,4892},[]int{1561,4893},[]int{3752,4894},[]int{598,4895},[]int{4288,4896},[]int{240,4897},[]int{414,4898},[]int{404,4899},[]int{43,4900},[]int{2438,4901},[]int{135,4902},[]int{1899,4903},[]int{3644,4904},[]int{1407,4905},[]int{4215,4906},[]int{3099,4907},[]int{2267,4908},[]int{360,4909},[]int{4564,4910},[]int{4665,4911},[]int{2384,4912},[]int{4441,4913},[]int{3258,4914},[]int{1445,4915},[]int{3387,4916},[]int{671,4917},[]int{1834,4918},[]int{2223,4919},[]int{702,4920},[]int{4504,4921},[]int{1589,4922},[]int{4050,4923},[]int{1076,4924},[]int{670,4925},[]int{2622,4926},[]int{2189,4927},[]int{495,4928},[]int{4694,4929},[]int{180,4930},[]int{1848,4931},[]int{3398,4932},[]int{4539,4933},[]int{828,4934},[]int{1440,4935},[]int{1674,4936},[]int{2190,4937},[]int{1573,4938},[]int{820,4939},[]int{2327,4940},[]int{4334,4941},[]int{2234,4942},[]int{269,4943},[]int{875,4944},[]int{1530,4945},[]int{3728,4946},[]int{1526,4947},[]int{1171,4948},[]int{2899,4949},[]int{1763,4950},[]int{1030,4951},[]int{3478,4952},[]int{1340,4953},[]int{1105,4954},[]int{2017,4955},[]int{647,4956},[]int{3240,4957},[]int{3170,4958},[]int{468,4959},[]int{1939,4960},[]int{1873,4961},[]int{2435,4962},[]int{1836,4963},[]int{2400,4964},[]int{61,4965},[]int{3100,4966},[]int{1586,4967},[]int{1985,4968},[]int{3348,4969},[]int{3241,4970},[]int{1430,4971},[]int{2415,4972},[]int{2577,4973},[]int{3657,4974},[]int{720,4975},[]int{3205,4976},[]int{2835,4977},[]int{829,4978},[]int{3972,4979},[]int{4576,4980},[]int{3264,4981},[]int{1720,4982},[]int{846,4983},[]int{2153,4984},[]int{3439,4985},[]int{2192,4986},[]int{3015,4987},[]int{765,4988},[]int{2508,4989},[]int{4442,4990},[]int{4397,4991},[]int{768,4992},[]int{1841,4993},[]int{2990,4994},[]int{1414,4995},[]int{1145,4996},[]int{633,4997},[]int{2491,4998},[]int{3642,4999},[]int{126,5000},[]int{2163,5001},[]int{1637,5002},[]int{1698,5003},[]int{2131,5004},[]int{3227,5005},[]int{2658,5006},[]int{3621,5007},[]int{1457,5008},[]int{357,5009},[]int{870,5010},[]int{570,5011},[]int{2566,5012},[]int{3103,5013},[]int{161,5014},[]int{4629,5015},[]int{2988,5016},[]int{1654,5017},[]int{3804,5018},[]int{4315,5019},[]int{3681,5020},[]int{811,5021},[]int{929,5022},[]int{3731,5023},[]int{553,5024},[]int{12,5025},[]int{4965,5026},[]int{4097,5027},[]int{3898,5028},[]int{2319,5029},[]int{1279,5030},[]int{819,5031},[]int{3764,5032},[]int{2359,5033},[]int{71,5034},[]int{4912,5035},[]int{4727,5036},[]int{1777,5037},[]int{4680,5038},[]int{4286,5039},[]int{4196,5040},[]int{1512,5041},[]int{2531,5042},[]int{3841,5043},[]int{482,5044},[]int{2251,5045},[]int{3741,5046},[]int{677,5047},[]int{843,5048},[]int{4182,5049},[]int{5023,5050},[]int{1389,5051},[]int{4910,5052},[]int{212,5053},[]int{3262,5054},[]int{1143,5055},[]int{1603,5056},[]int{2802,5057},[]int{3438,5058},[]int{3994,5059},[]int{4913,5060},[]int{3351,5061},[]int{965,5062},[]int{3573,5063},[]int{1680,5064},[]int{3469,5065},[]int{341,5066},[]int{659,5067},[]int{3076,5068},[]int{485,5069},[]int{1462,5070},[]int{4626,5071},[]int{4850,5072},[]int{635,5073},[]int{880,5074},[]int{1096,5075},[]int{2802,5076},[]int{4307,5077},[]int{2570,5078},[]int{2722,5079},[]int{2465,5080},[]int{3755,5081},[]int{1907,5082},[]int{4784,5083},[]int{4718,5084},[]int{3144,5085},[]int{4552,5086},[]int{4181,5087},[]int{3105,5088},[]int{4122,5089},[]int{4609,5090},[]int{547,5091},[]int{4200,5092},[]int{2901,5093},[]int{4417,5094},[]int{2653,5095},[]int{4486,5096},[]int{3747,5097},[]int{4745,5098},[]int{687,5099},[]int{4756,5100},[]int{2930,5101},[]int{4854,5102},[]int{851,5103},[]int{2974,5104},[]int{2995,5105},[]int{831,5106},[]int{5102,5107},[]int{1732,5108},[]int{1704,5109},[]int{709,5110},[]int{3525,5111},[]int{3811,5112},[]int{3182,5113},[]int{533,5114},[]int{557,5115},[]int{4229,5116},[]int{2515,5117},[]int{2246,5118},[]int{1061,5119},[]int{152,5120},[]int{4373,5121},[]int{478,5122},[]int{3656,5123},[]int{2858,5124},[]int{3571,5125},[]int{4570,5126},[]int{3133,5127},[]int{1641,5128},[]int{76,5129},[]int{4189,5130},[]int{3432,5131},[]int{4229,5132},[]int{2129,5133},[]int{877,5134},[]int{1378,5135},[]int{1821,5136},[]int{1838,5137},[]int{3528,5138},[]int{455,5139},[]int{2807,5140},[]int{2060,5141},[]int{2803,5142},[]int{4263,5143},[]int{4869,5144},[]int{1424,5145},[]int{1921,5146},[]int{121,5147},[]int{349,5148},[]int{3944,5149},[]int{5149,5150},[]int{1383,5151},[]int{4828,5152},[]int{4289,5153},[]int{3222,5154},[]int{2090,5155},[]int{3431,5156},[]int{5072,5157},[]int{360,5158},[]int{99,5159},[]int{2838,5160},[]int{2671,5161},[]int{986,5162},[]int{2738,5163},[]int{1362,5164},[]int{5150,5165},[]int{1286,5166},[]int{4942,5167},[]int{1443,5168},[]int{3700,5169},[]int{2976,5170},[]int{2099,5171},[]int{1099,5172},[]int{3740,5173},[]int{448,5174},[]int{3422,5175},[]int{2571,5176},[]int{2339,5177},[]int{2125,5178},[]int{4879,5179},[]int{4119,5180},[]int{3840,5181},[]int{3584,5182},[]int{1256,5183},[]int{1312,5184},[]int{3062,5185},[]int{3937,5186},[]int{4629,5187},[]int{2063,5188},[]int{3410,5189},[]int{4107,5190},[]int{3054,5191},[]int{4033,5192},[]int{5116,5193},[]int{4620,5194},[]int{2298,5195},[]int{2831,5196},[]int{3508,5197},[]int{4964,5198},[]int{1427,5199},[]int{3075,5200},[]int{4610,5201},[]int{3803,5202},[]int{833,5203},[]int{3852,5204},[]int{872,5205},[]int{3613,5206},[]int{2632,5207},[]int{1360,5208},[]int{4520,5209},[]int{2323,5210},[]int{1216,5211},[]int{4420,5212},[]int{5029,5213},[]int{663,5214},[]int{4407,5215},[]int{473,5216},[]int{4449,5217},[]int{5120,5218},[]int{600,5219},[]int{2418,5220},[]int{3759,5221},[]int{4638,5222},[]int{1127,5223},[]int{221,5224},[]int{551,5225},[]int{1779,5226},[]int{1789,5227},[]int{1688,5228},[]int{679,5229},[]int{2200,5230},[]int{4526,5231},[]int{4402,5232},[]int{1635,5233},[]int{3159,5234},[]int{2101,5235},[]int{3891,5236},[]int{814,5237},[]int{273,5238},[]int{1311,5239},[]int{3232,5240},[]int{525,5241},[]int{1307,5242},[]int{1484,5243},[]int{4535,5244},[]int{3989,5245},[]int{2149,5246},[]int{2563,5247},[]int{3835,5248},[]int{1317,5249},[]int{5064,5250},[]int{247,5251},[]int{1729,5252},[]int{744,5253},[]int{3993,5254},[]int{1751,5255},[]int{159,5256},[]int{4997,5257},[]int{2554,5258},[]int{2430,5259},[]int{3030,5260},[]int{3364,5261},[]int{2398,5262},[]int{3090,5263},[]int{3859,5264},[]int{272,5265},[]int{4214,5266},[]int{4137,5267},[]int{3318,5268},[]int{208,5269},[]int{1879,5270},[]int{2015,5271},[]int{4497,5272},[]int{3357,5273},[]int{3715,5274},[]int{754,5275},[]int{2120,5276},[]int{1348,5277},[]int{2363,5278},[]int{1568,5279},[]int{4185,5280},[]int{4282,5281},[]int{2082,5282},[]int{4341,5283},[]int{2942,5284},[]int{4726,5285},[]int{1211,5286},[]int{4046,5287},[]int{4347,5288},[]int{4767,5289},[]int{1781,5290},[]int{2606,5291},[]int{3963,5292},[]int{2661,5293},[]int{625,5294},[]int{3191,5295},[]int{2300,5296},[]int{916,5297},[]int{3360,5298},[]int{542,5299},[]int{159,5300},[]int{4247,5301},[]int{3642,5302},[]int{4458,5303},[]int{4557,5304},[]int{3843,5305},[]int{1249,5306},[]int{146,5307},[]int{4115,5308},[]int{246,5309},[]int{2289,5310},[]int{54,5311},[]int{2953,5312},[]int{5027,5313},[]int{3471,5314},[]int{2216,5315},[]int{3699,5316},[]int{1992,5317},[]int{4584,5318},[]int{1190,5319},[]int{5268,5320},[]int{2344,5321},[]int{5219,5322},[]int{3486,5323},[]int{4577,5324},[]int{3797,5325},[]int{4980,5326},[]int{914,5327},[]int{2175,5328},[]int{794,5329},[]int{1166,5330},[]int{5043,5331},[]int{4265,5332},[]int{5204,5333},[]int{3300,5334},[]int{309,5335},[]int{4368,5336},[]int{3607,5337},[]int{3032,5338},[]int{4774,5339},[]int{1080,5340},[]int{2685,5341},[]int{4344,5342},[]int{3062,5343},[]int{4188,5344},[]int{714,5345},[]int{915,5346},[]int{1664,5347},[]int{1583,5348},[]int{756,5349},[]int{5155,5350},[]int{4180,5351},[]int{719,5352},[]int{5294,5353},[]int{2102,5354},[]int{242,5355},[]int{283,5356},[]int{2608,5357},[]int{4430,5358},[]int{1836,5359},[]int{624,5360},[]int{1233,5361},[]int{4686,5362},[]int{4394,5363},[]int{4016,5364},[]int{4698,5365},[]int{1802,5366},[]int{3263,5367},[]int{1960,5368},[]int{4478,5369},[]int{444,5370},[]int{2867,5371},[]int{4848,5372},[]int{3406,5373},[]int{3186,5374},[]int{3358,5375},[]int{1065,5376},[]int{5066,5377},[]int{735,5378},[]int{4274,5379},[]int{4490,5380},[]int{953,5381},[]int{341,5382},[]int{2788,5383},[]int{616,5384},[]int{2868,5385},[]int{1720,5386},[]int{1090,5387},[]int{2745,5388},[]int{1287,5389},[]int{4300,5390},[]int{5109,5391},[]int{2996,5392},[]int{4021,5393},[]int{3245,5394},[]int{2370,5395},[]int{4732,5396},[]int{1829,5397},[]int{1215,5398},[]int{5315,5399},[]int{2551,5400},[]int{911,5401},[]int{1633,5402},[]int{359,5403},[]int{4193,5404},[]int{2737,5405},[]int{3809,5406},[]int{3267,5407},[]int{1570,5408},[]int{137,5409},[]int{2913,5410},[]int{4892,5411},[]int{4628,5412},[]int{2442,5413},[]int{1166,5414},[]int{52,5415},[]int{3154,5416},[]int{62,5417},[]int{967,5418},[]int{1838,5419},[]int{4139,5420},[]int{1527,5421},[]int{3804,5422},[]int{3485,5423},[]int{4095,5424},[]int{4778,5425},[]int{746,5426},[]int{5329,5427},[]int{2977,5428},[]int{2066,5429},[]int{1422,5430},[]int{4188,5431},[]int{4465,5432},[]int{4765,5433},[]int{1470,5434},[]int{1626,5435},[]int{4481,5436},[]int{2605,5437},[]int{5112,5438},[]int{2676,5439},[]int{5051,5440},[]int{2720,5441},[]int{3465,5442},[]int{50,5443},[]int{878,5444},[]int{2632,5445},[]int{1197,5446},[]int{1897,5447},[]int{394,5448},[]int{1290,5449},[]int{1040,5450},[]int{1327,5451},[]int{3917,5452},[]int{3706,5453},[]int{2521,5454},[]int{943,5455},[]int{5189,5456},[]int{3790,5457},[]int{3504,5458},[]int{1212,5459},[]int{1636,5460},[]int{701,5461},[]int{1410,5462},[]int{1047,5463},[]int{3235,5464},[]int{4930,5465},[]int{2801,5466},[]int{1877,5467},[]int{5271,5468},[]int{2059,5469},[]int{4258,5470},[]int{5282,5471},[]int{3562,5472},[]int{1714,5473},[]int{678,5474},[]int{2882,5475},[]int{5354,5476},[]int{5456,5477},[]int{2799,5478},[]int{1821,5479},[]int{2004,5480},[]int{2798,5481},[]int{859,5482},[]int{4728,5483},[]int{4872,5484},[]int{5077,5485},[]int{3135,5486},[]int{2281,5487},[]int{5401,5488},[]int{831,5489},[]int{4326,5490},[]int{1089,5491},[]int{1487,5492},[]int{2559,5493},[]int{3910,5494},[]int{4882,5495},[]int{1897,5496},[]int{4857,5497},[]int{4740,5498},[]int{2284,5499},[]int{4855,5500},[]int{4261,5501},[]int{673,5502},[]int{1609,5503},[]int{2464,5504},[]int{5325,5505},[]int{1146,5506},[]int{581,5507},[]int{3434,5508},[]int{4928,5509},[]int{645,5510},[]int{4124,5511},[]int{4779,5512},[]int{4017,5513},[]int{3517,5514},[]int{3111,5515},[]int{5358,5516},[]int{2052,5517},[]int{3214,5518},[]int{940,5519},[]int{4303,5520},[]int{3713,5521},[]int{3778,5522},[]int{1389,5523},[]int{4648,5524},[]int{4692,5525},[]int{3613,5526},[]int{9,5527},[]int{1607,5528},[]int{1001,5529},[]int{1927,5530},[]int{2517,5531},[]int{4833,5532},[]int{1221,5533},[]int{5406,5534},[]int{3170,5535},[]int{2964,5536},[]int{3947,5537},[]int{1922,5538},[]int{2179,5539},[]int{4169,5540},[]int{3437,5541},[]int{1202,5542},[]int{3831,5543},[]int{20,5544},[]int{202,5545},[]int{3988,5546},[]int{3686,5547},[]int{2261,5548},[]int{3504,5549},[]int{3388,5550},[]int{4433,5551},[]int{4461,5552},[]int{1377,5553},[]int{3641,5554},[]int{2538,5555},[]int{2930,5556},[]int{3012,5557},[]int{1431,5558},[]int{5209,5559},[]int{56,5560},[]int{5280,5561},[]int{4804,5562},[]int{3594,5563},[]int{4673,5564},[]int{3555,5565},[]int{3844,5566},[]int{3274,5567},[]int{4216,5568},[]int{5271,5569},[]int{5266,5570},[]int{609,5571},[]int{1783,5572},[]int{252,5573},[]int{3829,5574},[]int{810,5575},[]int{178,5576},[]int{2555,5577},[]int{4582,5578},[]int{2397,5579},[]int{3500,5580},[]int{974,5581},[]int{5267,5582},[]int{4742,5583},[]int{4389,5584},[]int{765,5585},[]int{2017,5586},[]int{170,5587},[]int{1605,5588},[]int{872,5589},[]int{1297,5590},[]int{2312,5591},[]int{1569,5592},[]int{505,5593},[]int{4821,5594},[]int{5002,5595},[]int{3980,5596},[]int{4268,5597},[]int{1968,5598},[]int{2261,5599},[]int{4289,5600},[]int{2835,5601},[]int{1632,5602},[]int{5437,5603},[]int{5348,5604},[]int{380,5605},[]int{1237,5606},[]int{3161,5607},[]int{5171,5608},[]int{361,5609},[]int{514,5610},[]int{4675,5611},[]int{4695,5612},[]int{1854,5613},[]int{138,5614},[]int{3495,5615},[]int{5148,5616},[]int{4227,5617},[]int{4217,5618},[]int{1137,5619},[]int{2929,5620},[]int{5028,5621},[]int{2388,5622},[]int{2043,5623},[]int{5078,5624},[]int{856,5625},[]int{1892,5626},[]int{2960,5627},[]int{3137,5628},[]int{4883,5629},[]int{2417,5630},[]int{172,5631},[]int{3299,5632},[]int{3329,5633},[]int{114,5634},[]int{5100,5635},[]int{748,5636},[]int{5590,5637},[]int{2616,5638},[]int{4875,5639},[]int{2721,5640},[]int{4931,5641},[]int{4316,5642},[]int{282,5643},[]int{3230,5644},[]int{4614,5645},[]int{3081,5646},[]int{481,5647},[]int{2517,5648},[]int{4043,5649},[]int{291,5650},[]int{67,5651},[]int{555,5652},[]int{3092,5653},[]int{5536,5654},[]int{5084,5655},[]int{3450,5656},[]int{1874,5657},[]int{4288,5658},[]int{2185,5659},[]int{1027,5660},[]int{4882,5661},[]int{334,5662},[]int{1724,5663},[]int{4561,5664},[]int{3292,5665},[]int{1691,5666},[]int{5484,5667},[]int{1376,5668},[]int{4309,5669},[]int{4239,5670},[]int{3091,5671},[]int{3184,5672},[]int{1988,5673},[]int{3698,5674},[]int{2105,5675},[]int{2054,5676},[]int{5304,5677},[]int{3201,5678},[]int{4865,5679},[]int{4117,5680},[]int{2987,5681},[]int{2288,5682},[]int{3876,5683},[]int{93,5684},[]int{2984,5685},[]int{3386,5686},[]int{5378,5687},[]int{346,5688},[]int{2519,5689},[]int{4605,5690},[]int{1136,5691},[]int{3420,5692},[]int{3146,5693},[]int{429,5694},[]int{5636,5695},[]int{0,5696},[]int{833,5697},[]int{2165,5698},[]int{4353,5699},[]int{4298,5700},[]int{3811,5701},[]int{907,5702},[]int{192,5703},[]int{3821,5704},[]int{3559,5705},[]int{4878,5706},[]int{4195,5707},[]int{4857,5708},[]int{2692,5709},[]int{4575,5710},[]int{4651,5711},[]int{416,5712},[]int{2981,5713},[]int{1183,5714},[]int{1149,5715},[]int{2645,5716},[]int{5578,5717},[]int{4769,5718},[]int{1144,5719},[]int{209,5720},[]int{472,5721},[]int{5389,5722},[]int{1166,5723},[]int{4415,5724},[]int{2861,5725},[]int{3887,5726},[]int{4370,5727},[]int{2180,5728},[]int{3351,5729},[]int{5047,5730},[]int{936,5731},[]int{276,5732},[]int{4603,5733},[]int{1106,5734},[]int{647,5735},[]int{4404,5736},[]int{649,5737},[]int{3274,5738},[]int{2469,5739},[]int{1873,5740},[]int{5006,5741},[]int{5555,5742},[]int{658,5743},[]int{5689,5744},[]int{3916,5745},[]int{2886,5746},[]int{2082,5747},[]int{5286,5748},[]int{3471,5749},[]int{4092,5750},[]int{1322,5751},[]int{68,5752},[]int{2675,5753},[]int{4254,5754},[]int{87,5755},[]int{1005,5756},[]int{4914,5757},[]int{3913,5758},[]int{3212,5759},[]int{4080,5760},[]int{4971,5761},[]int{3689,5762},[]int{905,5763},[]int{4421,5764},[]int{3435,5765},[]int{3347,5766},[]int{2320,5767},[]int{4897,5768},[]int{3853,5769},[]int{142,5770},[]int{4526,5771},[]int{701,5772},[]int{5632,5773},[]int{3870,5774},[]int{3461,5775},[]int{726,5776},[]int{284,5777},[]int{489,5778},[]int{3539,5779},[]int{1620,5780},[]int{5247,5781},[]int{3184,5782},[]int{2892,5783},[]int{2655,5784},[]int{1304,5785},[]int{5472,5786},[]int{834,5787},[]int{4544,5788},[]int{3726,5789},[]int{1816,5790},[]int{1221,5791},[]int{25,5792},[]int{4780,5793},[]int{3081,5794},[]int{1590,5795},[]int{3261,5796},[]int{5621,5797},[]int{4124,5798},[]int{1798,5799},[]int{3191,5800},[]int{4878,5801},[]int{4202,5802},[]int{3289,5803},[]int{2041,5804},[]int{4585,5805},[]int{3442,5806},[]int{1301,5807},[]int{5336,5808},[]int{5504,5809},[]int{1626,5810},[]int{3107,5811},[]int{5767,5812},[]int{149,5813},[]int{3652,5814},[]int{5052,5815},[]int{2814,5816},[]int{2957,5817},[]int{666,5818},[]int{606,5819},[]int{4086,5820},[]int{3651,5821},[]int{1411,5822},[]int{564,5823},[]int{2066,5824},[]int{5151,5825},[]int{5736,5826},[]int{3682,5827},[]int{5101,5828},[]int{1871,5829},[]int{5777,5830},[]int{1353,5831},[]int{683,5832},[]int{2941,5833},[]int{135,5834},[]int{5138,5835},[]int{2617,5836},[]int{4400,5837},[]int{2637,5838},[]int{1384,5839},[]int{3734,5840},[]int{1496,5841},[]int{4649,5842},[]int{3768,5843},[]int{1984,5844},[]int{3925,5845},[]int{4305,5846},[]int{4250,5847},[]int{4060,5848},[]int{3064,5849},[]int{3670,5850},[]int{168,5851},[]int{122,5852},[]int{855,5853},[]int{461,5854},[]int{416,5855},[]int{3472,5856},[]int{5812,5857},[]int{5732,5858},[]int{903,5859},[]int{1063,5860},[]int{3655,5861},[]int{885,5862},[]int{1284,5863},[]int{3344,5864},[]int{3872,5865},[]int{3189,5866},[]int{1188,5867},[]int{314,5868},[]int{4431,5869},[]int{2399,5870},[]int{3097,5871},[]int{5794,5872},[]int{475,5873},[]int{1783,5874},[]int{793,5875},[]int{2117,5876},[]int{3844,5877},[]int{2155,5878},[]int{2191,5879},[]int{4518,5880},[]int{311,5881},[]int{2,5882},[]int{2513,5883},[]int{5208,5884},[]int{1721,5885},[]int{584,5886},[]int{4271,5887},[]int{3015,5888},[]int{4752,5889},[]int{2801,5890},[]int{3607,5891},[]int{225,5892},[]int{1374,5893},[]int{863,5894},[]int{1540,5895},[]int{379,5896},[]int{2889,5897},[]int{556,5898},[]int{4331,5899},[]int{4986,5900},[]int{970,5901},[]int{4208,5902},[]int{708,5903},[]int{1856,5904},[]int{88,5905},[]int{3914,5906},[]int{1269,5907},[]int{1140,5908},[]int{571,5909},[]int{5351,5910},[]int{5482,5911},[]int{1839,5912},[]int{3294,5913},[]int{5296,5914},[]int{2535,5915},[]int{3984,5916},[]int{3964,5917},[]int{2471,5918},[]int{1760,5919},[]int{5867,5920},[]int{300,5921},[]int{4205,5922},[]int{3274,5923},[]int{1981,5924},[]int{3228,5925},[]int{5687,5926},[]int{3008,5927},[]int{2896,5928},[]int{3160,5929},[]int{1121,5930},[]int{2824,5931},[]int{2459,5932},[]int{5347,5933},[]int{2019,5934},[]int{5083,5935},[]int{2870,5936},[]int{4938,5937},[]int{4246,5938},[]int{2336,5939},[]int{76,5940},[]int{3676,5941},[]int{5724,5942},[]int{2688,5943},[]int{4572,5944},[]int{1139,5945},[]int{154,5946},[]int{4019,5947},[]int{678,5948},[]int{1525,5949},[]int{1453,5950},[]int{4810,5951},[]int{4463,5952},[]int{5064,5953},[]int{3672,5954},[]int{3958,5955},[]int{741,5956},[]int{64,5957},[]int{1415,5958},[]int{966,5959},[]int{5442,5960},[]int{1434,5961},[]int{4539,5962},[]int{1754,5963},[]int{500,5964},[]int{5764,5965},[]int{4310,5966},[]int{601,5967},[]int{3190,5968},[]int{3413,5969},[]int{5499,5970},[]int{4229,5971},[]int{3417,5972},[]int{1224,5973},[]int{1781,5974},[]int{1082,5975},[]int{2601,5976},[]int{1399,5977},[]int{3887,5978},[]int{5954,5979},[]int{4022,5980},[]int{3232,5981},[]int{3764,5982},[]int{5014,5983},[]int{4968,5984},[]int{4958,5985},[]int{4528,5986},[]int{3951,5987},[]int{432,5988},[]int{4993,5989},[]int{331,5990},[]int{2890,5991},[]int{1415,5992},[]int{267,5993},[]int{4272,5994},[]int{421,5995},[]int{1412,5996},[]int{4041,5997},[]int{2750,5998},[]int{425,5999},[]int{564,6000},[]int{3269,6001},[]int{3582,6002},[]int{1577,6003},[]int{367,6004},[]int{1118,6005},[]int{5737,6006},[]int{2360,6007},[]int{5674,6008},[]int{4063,6009},[]int{629,6010},[]int{1411,6011},[]int{1329,6012},[]int{5337,6013},[]int{1864,6014},[]int{3579,6015},[]int{1385,6016},[]int{4638,6017},[]int{4533,6018},[]int{4806,6019},[]int{4422,6020},[]int{4978,6021},[]int{2856,6022},[]int{5312,6023},[]int{3528,6024},[]int{5476,6025},[]int{4383,6026},[]int{811,6027},[]int{3558,6028},[]int{564,6029},[]int{716,6030},[]int{5538,6031},[]int{2438,6032},[]int{3111,6033},[]int{4041,6034},[]int{1055,6035},[]int{3814,6036},[]int{5526,6037},[]int{4666,6038},[]int{5507,6039},[]int{4834,6040},[]int{1343,6041},[]int{3364,6042},[]int{503,6043},[]int{1929,6044},[]int{1178,6045},[]int{560,6046},[]int{1977,6047},[]int{3239,6048},[]int{3118,6049},[]int{3842,6050},[]int{166,6051},[]int{756,6052},[]int{1803,6053},[]int{2809,6054},[]int{2459,6055},[]int{3068,6056},[]int{263,6057},[]int{3110,6058},[]int{5208,6059},[]int{5739,6060},[]int{465,6061},[]int{1161,6062},[]int{1743,6063},[]int{3853,6064},[]int{649,6065},[]int{1973,6066},[]int{1044,6067},[]int{1374,6068},[]int{1772,6069},[]int{987,6070},[]int{3639,6071},[]int{3389,6072},[]int{5038,6073},[]int{5852,6074},[]int{5610,6075},[]int{3520,6076},[]int{3301,6077},[]int{384,6078},[]int{1043,6079},[]int{918,6080},[]int{5831,6081},[]int{2999,6082},[]int{2446,6083},[]int{5576,6084},[]int{1276,6085},[]int{3138,6086},[]int{4495,6087},[]int{1909,6088},[]int{1185,6089},[]int{1305,6090},[]int{5692,6091},[]int{5164,6092},[]int{1811,6093},[]int{516,6094},[]int{4063,6095},[]int{2672,6096},[]int{3189,6097},[]int{4171,6098},[]int{4009,6099},[]int{3824,6100},[]int{2144,6101},[]int{789,6102},[]int{5583,6103},[]int{1937,6104},[]int{3178,6105},[]int{5371,6106},[]int{290,6107},[]int{361,6108},[]int{4330,6109},[]int{2539,6110},[]int{5647,6111},[]int{906,6112},[]int{4097,6113},[]int{4686,6114},[]int{2405,6115},[]int{916,6116},[]int{2425,6117},[]int{4485,6118},[]int{631,6119},[]int{2928,6120},[]int{2175,6121},[]int{3397,6122},[]int{3459,6123},[]int{4374,6124},[]int{1937,6125},[]int{793,6126},[]int{3428,6127},[]int{385,6128},[]int{2632,6129},[]int{5796,6130},[]int{5466,6131},[]int{3659,6132},[]int{2045,6133},[]int{3961,6134},[]int{1303,6135},[]int{1448,6136},[]int{2492,6137},[]int{5424,6138},[]int{2604,6139},[]int{941,6140},[]int{4601,6141},[]int{3798,6142},[]int{4761,6143},[]int{4566,6144},[]int{2272,6145},[]int{2562,6146},[]int{1696,6147},[]int{2707,6148},[]int{6119,6149},[]int{2450,6150},[]int{4680,6151},[]int{3096,6152},[]int{3951,6153},[]int{3494,6154},[]int{5720,6155},[]int{4136,6156},[]int{3385,6157},[]int{5871,6158},[]int{310,6159},[]int{2917,6160},[]int{5900,6161},[]int{2489,6162},[]int{5638,6163},[]int{4199,6164},[]int{4126,6165},[]int{5134,6166},[]int{1802,6167},[]int{5215,6168},[]int{2340,6169},[]int{5265,6170},[]int{5555,6171},[]int{5518,6172},[]int{2353,6173},[]int{1833,6174},[]int{325,6175},[]int{5742,6176},[]int{1126,6177},[]int{2202,6178},[]int{2490,6179},[]int{449,6180},[]int{1701,6181},[]int{4824,6182},[]int{1826,6183},[]int{3386,6184},[]int{1979,6185},[]int{4231,6186},[]int{771,6187},[]int{5110,6188},[]int{5449,6189},[]int{3833,6190},[]int{5881,6191},[]int{4592,6192},[]int{2672,6193},[]int{726,6194},[]int{4936,6195},[]int{3484,6196},[]int{3763,6197},[]int{4318,6198},[]int{1486,6199},[]int{489,6200},[]int{3890,6201},[]int{4124,6202},[]int{4551,6203},[]int{6157,6204},[]int{3227,6205},[]int{2379,6206},[]int{4969,6207},[]int{4424,6208},[]int{4264,6209},[]int{5644,6210},[]int{1120,6211},[]int{5574,6212},[]int{2477,6213},[]int{2734,6214},[]int{4909,6215},[]int{4602,6216},[]int{3979,6217},[]int{4429,6218},[]int{2997,6219},[]int{5196,6220},[]int{1989,6221},[]int{1518,6222},[]int{1081,6223},[]int{2949,6224},[]int{1023,6225},[]int{5022,6226},[]int{4162,6227},[]int{4234,6228},[]int{4743,6229},[]int{4686,6230},[]int{2696,6231},[]int{939,6232},[]int{1674,6233},[]int{999,6234},[]int{3260,6235},[]int{1927,6236},[]int{3695,6237},[]int{311,6238},[]int{1290,6239},[]int{2710,6240},[]int{794,6241},[]int{6125,6242},[]int{2995,6243},[]int{3850,6244},[]int{5337,6245},[]int{1924,6246},[]int{930,6247},[]int{2195,6248},[]int{3341,6249},[]int{3273,6250},[]int{1325,6251},[]int{346,6252},[]int{3976,6253},[]int{3651,6254},[]int{5813,6255},[]int{921,6256},[]int{1511,6257},[]int{5893,6258},[]int{297,6259},[]int{533,6260},[]int{5204,6261},[]int{3731,6262},[]int{2611,6263},[]int{801,6264},[]int{2762,6265},[]int{4830,6266},[]int{4308,6267},[]int{2959,6268},[]int{528,6269},[]int{5414,6270},[]int{5641,6271},[]int{5773,6272},[]int{2622,6273},[]int{395,6274},[]int{4044,6275},[]int{962,6276},[]int{489,6277},[]int{3420,6278},[]int{1980,6279},[]int{1986,6280},[]int{5910,6281},[]int{1264,6282},[]int{2609,6283},[]int{5624,6284},[]int{2180,6285},[]int{3968,6286},[]int{2337,6287},[]int{5024,6288},[]int{4794,6289},[]int{5759,6290},[]int{2203,6291},[]int{4286,6292},[]int{3168,6293},[]int{4216,6294},[]int{3219,6295},[]int{1566,6296},[]int{2661,6297},[]int{1059,6298},[]int{5808,6299},[]int{3329,6300},[]int{1538,6301},[]int{3997,6302},[]int{4300,6303},[]int{0,6304},[]int{3262,6305},[]int{4683,6306},[]int{4512,6307},[]int{2144,6308},[]int{5411,6309},[]int{1545,6310},[]int{1915,6311},[]int{5331,6312},[]int{1963,6313},[]int{3130,6314},[]int{8,6315},[]int{5623,6316},[]int{3896,6317},[]int{6208,6318},[]int{448,6319},[]int{1677,6320},[]int{3351,6321},[]int{2011,6322},[]int{1596,6323},[]int{440,6324},[]int{972,6325},[]int{38,6326},[]int{2529,6327},[]int{6071,6328},[]int{679,6329},[]int{1465,6330},[]int{3283,6331},[]int{5969,6332},[]int{1353,6333},[]int{3407,6334},[]int{310,6335},[]int{324,6336},[]int{2456,6337},[]int{71,6338},[]int{5342,6339},[]int{4690,6340},[]int{3700,6341},[]int{5619,6342},[]int{868,6343},[]int{4945,6344},[]int{3956,6345},[]int{5348,6346},[]int{3716,6347},[]int{4593,6348},[]int{2317,6349},[]int{2872,6350},[]int{2169,6351},[]int{3381,6352},[]int{6132,6353},[]int{5529,6354},[]int{3955,6355},[]int{4042,6356},[]int{4846,6357},[]int{1119,6358},[]int{4600,6359},[]int{4600,6360},[]int{4903,6361},[]int{2654,6362},[]int{5334,6363},[]int{2651,6364},[]int{3812,6365},[]int{3319,6366},[]int{225,6367},[]int{5933,6368},[]int{2625,6369},[]int{2906,6370},[]int{69,6371},[]int{5651,6372},[]int{140,6373},[]int{4097,6374},[]int{1144,6375},[]int{6209,6376},[]int{3432,6377},[]int{1144,6378},[]int{1629,6379},[]int{1232,6380},[]int{370,6381},[]int{5187,6382},[]int{4067,6383},[]int{2363,6384},[]int{4143,6385},[]int{5250,6386},[]int{1300,6387},[]int{1054,6388},[]int{4528,6389},[]int{3694,6390},[]int{1893,6391},[]int{2068,6392},[]int{1215,6393},[]int{1534,6394},[]int{5640,6395},[]int{3076,6396},[]int{142,6397},[]int{4099,6398},[]int{3151,6399},[]int{270,6400},[]int{680,6401},[]int{5533,6402},[]int{2653,6403},[]int{5679,6404},[]int{4408,6405},[]int{4806,6406},[]int{62,6407},[]int{6039,6408},[]int{5349,6409},[]int{5912,6410},[]int{6232,6411},[]int{3327,6412},[]int{4672,6413},[]int{2700,6414},[]int{480,6415},[]int{4388,6416},[]int{5214,6417},[]int{4509,6418},[]int{1304,6419},[]int{24,6420},[]int{4539,6421},[]int{59,6422},[]int{5386,6423},[]int{816,6424},[]int{1267,6425},[]int{699,6426},[]int{1524,6427},[]int{1186,6428},[]int{866,6429},[]int{4936,6430},[]int{1400,6431},[]int{5244,6432},[]int{3857,6433},[]int{2088,6434},[]int{5268,6435},[]int{1698,6436},[]int{6123,6437},[]int{3494,6438},[]int{2526,6439},[]int{54,6440},[]int{1423,6441},[]int{4820,6442},[]int{1560,6443},[]int{5038,6444},[]int{995,6445},[]int{2185,6446},[]int{6235,6447},[]int{2052,6448},[]int{6069,6449},[]int{6022,6450},[]int{2038,6451},[]int{2658,6452},[]int{1278,6453},[]int{5630,6454},[]int{262,6455},[]int{6215,6456},[]int{968,6457},[]int{5799,6458},[]int{5110,6459},[]int{3703,6460},[]int{2700,6461},[]int{501,6462},[]int{3087,6463},[]int{4491,6464},[]int{2959,6465},[]int{4163,6466},[]int{824,6467},[]int{6121,6468},[]int{5059,6469},[]int{2322,6470},[]int{2673,6471},[]int{755,6472},[]int{3021,6473},[]int{4115,6474},[]int{133,6475},[]int{6174,6476},[]int{890,6477},[]int{5367,6478},[]int{4355,6479},[]int{5695,6480},[]int{3804,6481},[]int{3971,6482},[]int{18,6483},[]int{309,6484},[]int{5822,6485},[]int{1631,6486},[]int{5480,6487},[]int{1943,6488},[]int{4818,6489},[]int{2401,6490},[]int{6137,6491},[]int{3990,6492},[]int{2609,6493},[]int{5545,6494},[]int{65,6495},[]int{4942,6496},[]int{2213,6497},[]int{5795,6498},[]int{729,6499},[]int{4626,6500},[]int{3636,6501},[]int{3733,6502},[]int{2504,6503},[]int{826,6504},[]int{2155,6505},[]int{45,6506},[]int{373,6507},[]int{1069,6508},[]int{2501,6509},[]int{218,6510},[]int{2282,6511},[]int{2200,6512},[]int{2386,6513},[]int{1257,6514},[]int{4902,6515},[]int{3402,6516},[]int{5004,6517},[]int{6094,6518},[]int{416,6519},[]int{3954,6520},[]int{6187,6521},[]int{4833,6522},[]int{2849,6523},[]int{4755,6524},[]int{3575,6525},[]int{719,6526},[]int{4182,6527},[]int{3674,6528},[]int{4526,6529},[]int{899,6530},[]int{6354,6531},[]int{2935,6532},[]int{5793,6533},[]int{686,6534},[]int{3436,6535},[]int{5486,6536},[]int{1103,6537},[]int{3917,6538},[]int{5672,6539},[]int{577,6540},[]int{2047,6541},[]int{4492,6542},[]int{4873,6543},[]int{852,6544},[]int{2511,6545},[]int{1780,6546},[]int{2516,6547},[]int{1724,6548},[]int{416,6549},[]int{3070,6550},[]int{5042,6551},[]int{3036,6552},[]int{629,6553},[]int{6009,6554},[]int{274,6555},[]int{2442,6556},[]int{1005,6557},[]int{1201,6558},[]int{4889,6559},[]int{1283,6560},[]int{2359,6561},[]int{161,6562},[]int{4536,6563},[]int{4495,6564},[]int{5997,6565},[]int{1366,6566},[]int{1056,6567},[]int{828,6568},[]int{615,6569},[]int{5820,6570},[]int{5776,6571},[]int{6473,6572},[]int{5909,6573},[]int{6119,6574},[]int{4516,6575},[]int{5670,6576},[]int{5155,6577},[]int{2124,6578},[]int{6100,6579},[]int{895,6580},[]int{2534,6581},[]int{2843,6582},[]int{2394,6583},[]int{3115,6584},[]int{512,6585},[]int{3435,6586},[]int{768,6587},[]int{3999,6588},[]int{2959,6589},[]int{5702,6590},[]int{783,6591},[]int{796,6592},[]int{212,6593},[]int{1728,6594},[]int{2513,6595},[]int{5942,6596},[]int{2991,6597},[]int{3182,6598},[]int{3883,6599},[]int{4239,6600},[]int{1225,6601},[]int{5489,6602},[]int{4983,6603},[]int{2177,6604},[]int{2539,6605},[]int{3317,6606},[]int{2631,6607},[]int{4003,6608},[]int{1640,6609},[]int{6259,6610},[]int{4032,6611},[]int{5719,6612},[]int{4453,6613},[]int{2574,6614},[]int{6481,6615},[]int{1464,6616},[]int{701,6617},[]int{207,6618},[]int{5278,6619},[]int{3963,6620},[]int{3800,6621},[]int{1887,6622},[]int{4541,6623},[]int{6490,6624},[]int{6582,6625},[]int{5888,6626},[]int{204,6627},[]int{1320,6628},[]int{3227,6629},[]int{2912,6630},[]int{6193,6631},[]int{5437,6632},[]int{6418,6633},[]int{1251,6634},[]int{5152,6635},[]int{4961,6636},[]int{525,6637},[]int{321,6638},[]int{3759,6639},[]int{2639,6640},[]int{3919,6641},[]int{1345,6642},[]int{3293,6643},[]int{6640,6644},[]int{5765,6645},[]int{3054,6646},[]int{2723,6647},[]int{3378,6648},[]int{5383,6649},[]int{5001,6650},[]int{918,6651},[]int{5721,6652},[]int{5124,6653},[]int{6367,6654},[]int{2697,6655},[]int{3953,6656},[]int{6073,6657},[]int{5134,6658},[]int{2419,6659},[]int{4945,6660},[]int{5851,6661},[]int{1913,6662},[]int{6596,6663},[]int{4767,6664},[]int{893,6665},[]int{5786,6666},[]int{6208,6667},[]int{5497,6668},[]int{1935,6669},[]int{5027,6670},[]int{3705,6671},[]int{6477,6672},[]int{6538,6673},[]int{752,6674},[]int{4980,6675},[]int{655,6676},[]int{4045,6677},[]int{6351,6678},[]int{4794,6679},[]int{683,6680},[]int{4350,6681},[]int{3930,6682},[]int{2601,6683},[]int{2312,6684},[]int{2504,6685},[]int{101,6686},[]int{1951,6687},[]int{5748,6688},[]int{1644,6689},[]int{5738,6690},[]int{1161,6691},[]int{1086,6692},[]int{2440,6693},[]int{560,6694},[]int{177,6695},[]int{812,6696},[]int{6441,6697},[]int{1385,6698},[]int{1901,6699},[]int{577,6700},[]int{4438,6701},[]int{490,6702},[]int{3243,6703},[]int{3106,6704},[]int{4138,6705},[]int{338,6706},[]int{3078,6707},[]int{3638,6708},[]int{866,6709},[]int{1962,6710},[]int{3713,6711},[]int{688,6712},[]int{185,6713},[]int{3174,6714},[]int{4201,6715},[]int{854,6716},[]int{5556,6717},[]int{3921,6718},[]int{5618,6719},[]int{5048,6720},[]int{2439,6721},[]int{4317,6722},[]int{4818,6723},[]int{1350,6724},[]int{845,6725},[]int{4620,6726},[]int{2768,6727},[]int{1886,6728},[]int{5278,6729},[]int{3586,6730},[]int{1724,6731},[]int{1642,6732},[]int{5932,6733},[]int{4811,6734},[]int{5326,6735},[]int{1714,6736},[]int{6343,6737},[]int{5764,6738},[]int{6478,6739},[]int{807,6740},[]int{4735,6741},[]int{6717,6742},[]int{4733,6743},[]int{6733,6744},[]int{5184,6745},[]int{3569,6746},[]int{6398,6747},[]int{6090,6748},[]int{886,6749},[]int{2566,6750},[]int{4162,6751},[]int{2736,6752},[]int{3568,6753},[]int{3702,6754},[]int{2924,6755},[]int{3084,6756},[]int{5545,6757},[]int{2026,6758},[]int{2390,6759},[]int{3466,6760},[]int{4836,6761},[]int{2737,6762},[]int{1625,6763},[]int{5635,6764},[]int{3658,6765},[]int{420,6766},[]int{4841,6767},[]int{833,6768},[]int{2138,6769},[]int{4804,6770},[]int{5283,6771},[]int{5825,6772},[]int{4582,6773},[]int{1124,6774},[]int{1418,6775},[]int{4109,6776},[]int{2358,6777},[]int{3801,6778},[]int{4236,6779},[]int{1397,6780},[]int{1272,6781},[]int{2769,6782},[]int{2519,6783},[]int{1617,6784},[]int{972,6785},[]int{1195,6786},[]int{2533,6787},[]int{162,6788},[]int{5917,6789},[]int{344,6790},[]int{4655,6791},[]int{4555,6792},[]int{4331,6793},[]int{1379,6794},[]int{4156,6795},[]int{3235,6796},[]int{5594,6797},[]int{2884,6798},[]int{4287,6799},[]int{6450,6800},[]int{4026,6801},[]int{3988,6802},[]int{3812,6803},[]int{3884,6804},[]int{2470,6805},[]int{5668,6806},[]int{2831,6807},[]int{4173,6808},[]int{1094,6809},[]int{192,6810},[]int{1771,6811},[]int{1157,6812},[]int{3359,6813},[]int{5355,6814},[]int{161,6815},[]int{1999,6816},[]int{4808,6817},[]int{6506,6818},[]int{977,6819},[]int{5380,6820},[]int{1798,6821},[]int{5983,6822},[]int{6462,6823},[]int{5055,6824},[]int{4857,6825},[]int{2436,6826},[]int{1950,6827},[]int{233,6828},[]int{1468,6829},[]int{6153,6830},[]int{4223,6831},[]int{649,6832},[]int{6245,6833},[]int{3663,6834},[]int{4164,6835},[]int{2572,6836},[]int{2546,6837},[]int{6726,6838},[]int{4670,6839},[]int{6680,6840},[]int{725,6841},[]int{3691,6842},[]int{6193,6843},[]int{5596,6844},[]int{4126,6845},[]int{3583,6846},[]int{4014,6847},[]int{1822,6848},[]int{5470,6849},[]int{6636,6850},[]int{4217,6851},[]int{1172,6852},[]int{4576,6853},[]int{942,6854},[]int{1626,6855},[]int{2423,6856},[]int{302,6857},[]int{1243,6858},[]int{4269,6859},[]int{5282,6860},[]int{4973,6861},[]int{6377,6862},[]int{314,6863},[]int{2380,6864},[]int{2384,6865},[]int{6297,6866},[]int{2104,6867},[]int{5677,6868},[]int{6740,6869},[]int{2076,6870},[]int{673,6871},[]int{1651,6872},[]int{4017,6873},[]int{5808,6874},[]int{5562,6875},[]int{3553,6876},[]int{2720,6877},[]int{3817,6878},[]int{789,6879},[]int{3281,6880},[]int{5989,6881},[]int{707,6882},[]int{4869,6883},[]int{1355,6884},[]int{337,6885},[]int{1266,6886},[]int{2645,6887},[]int{1202,6888},[]int{6314,6889},[]int{4391,6890},[]int{542,6891},[]int{1331,6892},[]int{5384,6893},[]int{3556,6894},[]int{3965,6895},[]int{365,6896},[]int{980,6897},[]int{435,6898},[]int{3139,6899},[]int{2304,6900},[]int{3477,6901},[]int{2922,6902},[]int{286,6903},[]int{410,6904},[]int{767,6905},[]int{185,6906},[]int{4970,6907},[]int{6092,6908},[]int{6146,6909},[]int{3148,6910},[]int{5444,6911},[]int{5629,6912},[]int{1063,6913},[]int{1029,6914},[]int{6359,6915},[]int{4102,6916},[]int{3484,6917},[]int{6912,6918},[]int{2516,6919},[]int{714,6920},[]int{6375,6921},[]int{2154,6922},[]int{548,6923},[]int{4277,6924},[]int{2294,6925},[]int{1862,6926},[]int{3403,6927},[]int{880,6928},[]int{3893,6929},[]int{5447,6930},[]int{6912,6931},[]int{4812,6932},[]int{3755,6933},[]int{6104,6934},[]int{2096,6935},[]int{2825,6936},[]int{3385,6937},[]int{5936,6938},[]int{626,6939},[]int{2933,6940},[]int{1435,6941},[]int{6003,6942},[]int{4164,6943},[]int{373,6944},[]int{2053,6945},[]int{194,6946},[]int{611,6947},[]int{1104,6948},[]int{2976,6949},[]int{1495,6950},[]int{4622,6951},[]int{4876,6952},[]int{2526,6953},[]int{6116,6954},[]int{3456,6955},[]int{4106,6956},[]int{660,6957},[]int{3708,6958},[]int{4166,6959},[]int{6075,6960},[]int{3806,6961},[]int{1733,6962},[]int{1287,6963},[]int{2080,6964},[]int{4892,6965},[]int{5008,6966},[]int{1596,6967},[]int{4347,6968},[]int{5923,6969},[]int{2261,6970},[]int{4414,6971},[]int{5892,6972},[]int{6652,6973},[]int{1687,6974},[]int{3840,6975},[]int{3791,6976},[]int{1684,6977},[]int{3518,6978},[]int{1522,6979},[]int{568,6980},[]int{1040,6981},[]int{4225,6982},[]int{793,6983},[]int{5443,6984},[]int{2229,6985},[]int{24,6986},[]int{6005,6987},[]int{952,6988},[]int{5904,6989},[]int{3272,6990},[]int{6906,6991},[]int{3504,6992},[]int{764,6993},[]int{4639,6994},[]int{5457,6995},[]int{2150,6996},[]int{6979,6997},[]int{4398,6998},[]int{2340,6999},[]int{4884,7000},[]int{637,7001},[]int{1085,7002},[]int{3968,7003},[]int{6697,7004},[]int{1254,7005},[]int{4731,7006},[]int{4527,7007},[]int{4060,7008},[]int{5034,7009},[]int{605,7010},[]int{498,7011},[]int{1736,7012},[]int{3150,7013},[]int{6289,7014},[]int{6122,7015},[]int{780,7016},[]int{65,7017},[]int{3874,7018},[]int{35,7019},[]int{1934,7020},[]int{4063,7021},[]int{2011,7022},[]int{2365,7023},[]int{1843,7024},[]int{2519,7025},[]int{2950,7026},[]int{868,7027},[]int{561,7028},[]int{4462,7029},[]int{4735,7030},[]int{3827,7031},[]int{810,7032},[]int{4455,7033},[]int{80,7034},[]int{6257,7035},[]int{1345,7036},[]int{1441,7037},[]int{2991,7038},[]int{736,7039},[]int{3571,7040},[]int{902,7041},[]int{569,7042},[]int{5593,7043},[]int{5692,7044},[]int{5723,7045},[]int{4806,7046},[]int{4349,7047},[]int{6283,7048},[]int{35,7049},[]int{5824,7050},[]int{4235,7051},[]int{2092,7052},[]int{794,7053},[]int{6044,7054},[]int{5820,7055},[]int{410,7056},[]int{1257,7057},[]int{6256,7058},[]int{6477,7059},[]int{2550,7060},[]int{2561,7061},[]int{1795,7062},[]int{773,7063},[]int{3487,7064},[]int{2485,7065},[]int{3010,7066},[]int{1913,7067},[]int{3898,7068},[]int{6155,7069},[]int{4740,7070},[]int{1182,7071},[]int{5446,7072},[]int{6877,7073},[]int{1741,7074},[]int{6489,7075},[]int{4122,7076},[]int{6462,7077},[]int{635,7078},[]int{973,7079},[]int{6676,7080},[]int{2757,7081},[]int{3984,7082},[]int{6039,7083},[]int{3686,7084},[]int{3549,7085},[]int{6098,7086},[]int{3087,7087},[]int{4103,7088},[]int{3390,7089},[]int{1666,7090},[]int{3213,7091},[]int{5123,7092},[]int{977,7093},[]int{5743,7094},[]int{2859,7095},[]int{2912,7096},[]int{399,7097},[]int{4747,7098},[]int{488,7099},[]int{3834,7100},[]int{2482,7101},[]int{1256,7102},[]int{3180,7103},[]int{5450,7104},[]int{2576,7105},[]int{2575,7106},[]int{6949,7107},[]int{4212,7108},[]int{3508,7109},[]int{5001,7110},[]int{625,7111},[]int{954,7112},[]int{2695,7113},[]int{3438,7114},[]int{3854,7115},[]int{465,7116},[]int{5157,7117},[]int{2100,7118},[]int{342,7119},[]int{6542,7120},[]int{1377,7121},[]int{2722,7122},[]int{2801,7123},[]int{518,7124},[]int{4916,7125},[]int{764,7126},[]int{3520,7127},[]int{3856,7128},[]int{4961,7129},[]int{2431,7130},[]int{601,7131},[]int{852,7132},[]int{695,7133},[]int{2741,7134},[]int{4801,7135},[]int{1170,7136},[]int{5794,7137},[]int{1565,7138},[]int{6768,7139},[]int{5028,7140},[]int{5985,7141},[]int{4996,7142},[]int{3813,7143},[]int{6489,7144},[]int{1227,7145},[]int{1960,7146},[]int{670,7147},[]int{5155,7148},[]int{4493,7149},[]int{7026,7150},[]int{3846,7151},[]int{1508,7152},[]int{2514,7153},[]int{76,7154},[]int{806,7155},[]int{1986,7156},[]int{4359,7157},[]int{3419,7158},[]int{5776,7159},[]int{3292,7160},[]int{4818,7161},[]int{4489,7162},[]int{480,7163},[]int{5065,7164},[]int{2191,7165},[]int{4539,7166},[]int{7027,7167},[]int{5555,7168},[]int{1087,7169},[]int{4904,7170},[]int{2835,7171},[]int{356,7172},[]int{3984,7173},[]int{29,7174},[]int{1143,7175},[]int{5719,7176},[]int{3861,7177},[]int{2343,7178},[]int{1620,7179},[]int{6110,7180},[]int{4445,7181},[]int{469,7182},[]int{6543,7183},[]int{6877,7184},[]int{5920,7185},[]int{145,7186},[]int{6343,7187},[]int{2534,7188},[]int{1851,7189},[]int{133,7190},[]int{3208,7191},[]int{2896,7192},[]int{2315,7193},[]int{175,7194},[]int{3482,7195},[]int{4883,7196},[]int{5491,7197},[]int{466,7198},[]int{6030,7199},[]int{6369,7200},[]int{1448,7201},[]int{5615,7202},[]int{5668,7203},[]int{871,7204},[]int{258,7205},[]int{7205,7206},[]int{5006,7207},[]int{2062,7208},[]int{636,7209},[]int{3109,7210},[]int{5314,7211},[]int{3249,7212},[]int{5440,7213},[]int{4632,7214},[]int{2665,7215},[]int{173,7216},[]int{3764,7217},[]int{3867,7218},[]int{1376,7219},[]int{3105,7220},[]int{3495,7221},[]int{1549,7222},[]int{5793,7223},[]int{3623,7224},[]int{5480,7225},[]int{2495,7226},[]int{3730,7227},[]int{1371,7228},[]int{2929,7229},[]int{4903,7230},[]int{3423,7231},[]int{3664,7232},[]int{1140,7233},[]int{1574,7234},[]int{4204,7235},[]int{5105,7236},[]int{980,7237},[]int{6037,7238},[]int{1551,7239},[]int{4683,7240},[]int{4579,7241},[]int{6104,7242},[]int{1185,7243},[]int{3484,7244},[]int{818,7245},[]int{1246,7246},[]int{748,7247},[]int{167,7248},[]int{393,7249},[]int{1452,7250},[]int{6845,7251},[]int{1000,7252},[]int{7156,7253},[]int{45,7254},[]int{1358,7255},[]int{1646,7256},[]int{114,7257},[]int{3087,7258},[]int{3058,7259},[]int{6794,7260},[]int{4231,7261},[]int{2974,7262},[]int{3903,7263},[]int{1139,7264},[]int{1064,7265},[]int{924,7266},[]int{623,7267},[]int{2627,7268},[]int{5841,7269},[]int{6090,7270},[]int{419,7271},[]int{1793,7272},[]int{6138,7273},[]int{5560,7274},[]int{1276,7275},[]int{171,7276},[]int{7000,7277},[]int{940,7278},[]int{5656,7279},[]int{2800,7280},[]int{3190,7281},[]int{6156,7282},[]int{5745,7283},[]int{392,7284},[]int{5194,7285},[]int{934,7286},[]int{581,7287},[]int{6737,7288},[]int{152,7289},[]int{5139,7290},[]int{6199,7291},[]int{255,7292},[]int{4115,7293},[]int{4878,7294},[]int{2659,7295},[]int{318,7296},[]int{7223,7297},[]int{7257,7298},[]int{6465,7299},[]int{4547,7300},[]int{2389,7301},[]int{6325,7302},[]int{1135,7303},[]int{3917,7304},[]int{5095,7305},[]int{4145,7306},[]int{6762,7307},[]int{2679,7308},[]int{1559,7309},[]int{1728,7310},[]int{487,7311},[]int{924,7312},[]int{5457,7313},[]int{6267,7314},[]int{611,7315},[]int{5718,7316},[]int{1272,7317},[]int{1239,7318},[]int{6825,7319},[]int{2451,7320},[]int{3234,7321},[]int{571,7322},[]int{5088,7323},[]int{5814,7324},[]int{1248,7325},[]int{6770,7326},[]int{4978,7327},[]int{3847,7328},[]int{6354,7329},[]int{89,7330},[]int{4440,7331},[]int{3555,7332},[]int{775,7333},[]int{3138,7334},[]int{811,7335},[]int{4899,7336},[]int{3511,7337},[]int{3888,7338},[]int{7289,7339},[]int{3782,7340},[]int{6063,7341},[]int{7323,7342},[]int{3034,7343},[]int{5662,7344},[]int{6478,7345},[]int{2039,7346},[]int{6949,7347},[]int{3256,7348},[]int{5652,7349},[]int{5710,7350},[]int{411,7351},[]int{4169,7352},[]int{5780,7353},[]int{6672,7354},[]int{7351,7355},[]int{3503,7356},[]int{6883,7357},[]int{7326,7358},[]int{1928,7359},[]int{800,7360},[]int{7307,7361},[]int{3291,7362},[]int{4165,7363},[]int{5089,7364},[]int{5669,7365},[]int{1716,7366},[]int{5488,7367},[]int{5470,7368},[]int{3780,7369},[]int{5725,7370},[]int{1045,7371},[]int{6174,7372},[]int{2942,7373},[]int{674,7374},[]int{5921,7375},[]int{6811,7376},[]int{462,7377},[]int{3642,7378},[]int{4537,7379},[]int{7340,7380},[]int{3660,7381},[]int{1727,7382},[]int{2992,7383},[]int{6847,7384},[]int{4017,7385},[]int{6926,7386},[]int{4644,7387},[]int{3374,7388},[]int{6837,7389},[]int{1603,7390},[]int{1634,7391},[]int{5149,7392},[]int{7072,7393},[]int{725,7394},[]int{4872,7395},[]int{119,7396},[]int{5193,7397},[]int{6266,7398},[]int{4066,7399},[]int{5891,7400},[]int{7055,7401},[]int{606,7402},[]int{3096,7403},[]int{6630,7404},[]int{4418,7405},[]int{7052,7406},[]int{2472,7407},[]int{7078,7408},[]int{1576,7409},[]int{4855,7410},[]int{1270,7411},[]int{1957,7412},[]int{5014,7413},[]int{3009,7414},[]int{532,7415},[]int{2032,7416},[]int{6797,7417},[]int{957,7418},[]int{5178,7419},[]int{299,7420},[]int{2328,7421},[]int{899,7422},[]int{1659,7423},[]int{4244,7424},[]int{4844,7425},[]int{6192,7426},[]int{3651,7427},[]int{3896,7428},[]int{400,7429},[]int{6928,7430},[]int{666,7431},[]int{4790,7432},[]int{516,7433},[]int{4753,7434},[]int{1330,7435},[]int{3290,7436},[]int{2519,7437},[]int{794,7438},[]int{5861,7439},[]int{4788,7440},[]int{3596,7441},[]int{4532,7442},[]int{6915,7443},[]int{1971,7444},[]int{5134,7445},[]int{970,7446},[]int{5530,7447},[]int{369,7448},[]int{2437,7449},[]int{6703,7450},[]int{2464,7451},[]int{3927,7452},[]int{2941,7453},[]int{2338,7454},[]int{3353,7455},[]int{1783,7456},[]int{126,7457},[]int{6693,7458},[]int{110,7459},[]int{3005,7460},[]int{7224,7461},[]int{1728,7462},[]int{4042,7463},[]int{6842,7464},[]int{4937,7465},[]int{1744,7466},[]int{3333,7467},[]int{5190,7468},[]int{5218,7469},[]int{7208,7470},[]int{711,7471},[]int{6169,7472},[]int{1039,7473},[]int{3473,7474},[]int{6572,7475},[]int{7307,7476},[]int{3689,7477},[]int{1191,7478},[]int{5450,7479},[]int{2814,7480},[]int{2057,7481},[]int{1306,7482},[]int{1539,7483},[]int{2917,7484},[]int{4182,7485},[]int{1343,7486},[]int{2598,7487},[]int{2490,7488},[]int{7097,7489},[]int{3069,7490},[]int{6338,7491},[]int{7488,7492},[]int{3560,7493},[]int{2333,7494},[]int{3998,7495},[]int{2820,7496},[]int{1723,7497},[]int{6499,7498},[]int{4828,7499},[]int{1178,7500},[]int{1333,7501},[]int{141,7502},[]int{472,7503},[]int{2329,7504},[]int{2181,7505},[]int{5930,7506},[]int{626,7507},[]int{1731,7508},[]int{1101,7509},[]int{3197,7510},[]int{4020,7511},[]int{2138,7512},[]int{1587,7513},[]int{2607,7514},[]int{6042,7515},[]int{1769,7516},[]int{591,7517},[]int{4797,7518},[]int{1696,7519},[]int{1011,7520},[]int{4331,7521},[]int{7355,7522},[]int{2197,7523},[]int{3323,7524},[]int{5769,7525},[]int{6257,7526},[]int{3192,7527},[]int{3559,7528},[]int{2419,7529},[]int{4645,7530},[]int{1758,7531},[]int{1431,7532},[]int{3449,7533},[]int{5341,7534},[]int{5480,7535},[]int{6343,7536},[]int{3222,7537},[]int{6993,7538},[]int{5514,7539},[]int{3073,7540},[]int{7064,7541},[]int{6456,7542},[]int{2801,7543},[]int{898,7544},[]int{937,7545},[]int{5036,7546},[]int{6003,7547},[]int{5727,7548},[]int{4381,7549},[]int{800,7550},[]int{4722,7551},[]int{7092,7552},[]int{816,7553},[]int{1643,7554},[]int{6594,7555},[]int{6512,7556},[]int{5307,7557},[]int{6201,7558},[]int{2099,7559},[]int{5521,7560},[]int{129,7561},[]int{5334,7562},[]int{534,7563},[]int{4187,7564},[]int{6983,7565},[]int{5822,7566},[]int{4231,7567},[]int{5016,7568},[]int{4186,7569},[]int{6317,7570},[]int{1145,7571},[]int{1140,7572},[]int{5797,7573},[]int{1525,7574},[]int{2553,7575},[]int{5794,7576},[]int{2314,7577},[]int{2401,7578},[]int{2718,7579},[]int{659,7580},[]int{5512,7581},[]int{40,7582},[]int{1034,7583},[]int{2449,7584},[]int{2360,7585},[]int{4388,7586},[]int{6251,7587},[]int{29,7588},[]int{6550,7589},[]int{3936,7590},[]int{358,7591},[]int{7260,7592},[]int{465,7593},[]int{7346,7594},[]int{1728,7595},[]int{5608,7596},[]int{3642,7597},[]int{1568,7598},[]int{1916,7599},[]int{4431,7600},[]int{2967,7601},[]int{4886,7602},[]int{2164,7603},[]int{3784,7604},[]int{1989,7605},[]int{1493,7606},[]int{5430,7607},[]int{2549,7608},[]int{6356,7609},[]int{5876,7610},[]int{2326,7611},[]int{7325,7612},[]int{6906,7613},[]int{5023,7614},[]int{4287,7615},[]int{7392,7616},[]int{5279,7617},[]int{3092,7618},[]int{3648,7619},[]int{5677,7620},[]int{4278,7621},[]int{6518,7622},[]int{5604,7623},[]int{3428,7624},[]int{3567,7625},[]int{6719,7626},[]int{4323,7627},[]int{4117,7628},[]int{761,7629},[]int{3233,7630},[]int{6654,7631},[]int{1921,7632},[]int{2730,7633},[]int{1606,7634},[]int{2280,7635},[]int{6013,7636},[]int{3565,7637},[]int{433,7638},[]int{7219,7639},[]int{3664,7640},[]int{841,7641},[]int{2775,7642},[]int{5178,7643},[]int{7574,7644},[]int{6165,7645},[]int{4491,7646},[]int{5940,7647},[]int{4659,7648},[]int{98,7649},[]int{6061,7650},[]int{2900,7651},[]int{4760,7652},[]int{3946,7653},[]int{1146,7654},[]int{276,7655},[]int{6230,7656},[]int{383,7657},[]int{7309,7658},[]int{619,7659},[]int{7594,7660},[]int{3046,7661},[]int{5872,7662},[]int{5301,7663},[]int{3954,7664},[]int{6633,7665},[]int{5505,7666},[]int{133,7667},[]int{4299,7668},[]int{6795,7669},[]int{2782,7670},[]int{6972,7671},[]int{2414,7672},[]int{799,7673},[]int{4020,7674},[]int{7569,7675},[]int{412,7676},[]int{2462,7677},[]int{1016,7678},[]int{5495,7679},[]int{6302,7680},[]int{7077,7681},[]int{3103,7682},[]int{3411,7683},[]int{2099,7684},[]int{6592,7685},[]int{5420,7686},[]int{1156,7687},[]int{7670,7688},[]int{6728,7689},[]int{6017,7690},[]int{3664,7691},[]int{7095,7692},[]int{4883,7693},[]int{7633,7694},[]int{822,7695},[]int{6101,7696},[]int{2278,7697},[]int{7451,7698},[]int{7006,7699},[]int{142,7700},[]int{5704,7701},[]int{4513,7702},[]int{2485,7703},[]int{6005,7704},[]int{5496,7705},[]int{6322,7706},[]int{1446,7707},[]int{2561,7708},[]int{7375,7709},[]int{1397,7710},[]int{5656,7711},[]int{6038,7712},[]int{385,7713},[]int{5023,7714},[]int{6482,7715},[]int{1592,7716},[]int{6554,7717},[]int{1830,7718},[]int{3703,7719},[]int{1648,7720},[]int{7313,7721},[]int{1219,7722},[]int{7182,7723},[]int{5421,7724},[]int{5424,7725},[]int{1745,7726},[]int{3268,7727},[]int{2560,7728},[]int{2585,7729},[]int{959,7730},[]int{2873,7731},[]int{1651,7732},[]int{2937,7733},[]int{4677,7734},[]int{2620,7735},[]int{5918,7736},[]int{194,7737},[]int{2123,7738},[]int{5505,7739},[]int{1100,7740},[]int{295,7741},[]int{7670,7742},[]int{5043,7743},[]int{1103,7744},[]int{6884,7745},[]int{2451,7746},[]int{4013,7747},[]int{6289,7748},[]int{1830,7749},[]int{616,7750},[]int{3758,7751},[]int{4791,7752},[]int{432,7753},[]int{7491,7754},[]int{5462,7755},[]int{3870,7756},[]int{3540,7757},[]int{7565,7758},[]int{1164,7759},[]int{308,7760},[]int{875,7761},[]int{883,7762},[]int{5955,7763},[]int{5105,7764},[]int{1924,7765},[]int{6320,7766},[]int{6076,7767},[]int{96,7768},[]int{5295,7769},[]int{4993,7770},[]int{109,7771},[]int{3889,7772},[]int{3964,7773},[]int{5996,7774},[]int{2083,7775},[]int{5373,7776},[]int{214,7777},[]int{6179,7778},[]int{6082,7779},[]int{6225,7780},[]int{6267,7781},[]int{3148,7782},[]int{4285,7783},[]int{736,7784},[]int{461,7785},[]int{5195,7786},[]int{702,7787},[]int{4008,7788},[]int{5230,7789},[]int{6599,7790},[]int{966,7791},[]int{3800,7792},[]int{485,7793},[]int{6245,7794},[]int{4507,7795},[]int{4735,7796},[]int{2270,7797},[]int{4873,7798},[]int{7202,7799},[]int{5381,7800},[]int{3474,7801},[]int{6195,7802},[]int{77,7803},[]int{2897,7804},[]int{6048,7805},[]int{4705,7806},[]int{133,7807},[]int{5459,7808},[]int{1575,7809},[]int{3019,7810},[]int{5609,7811},[]int{6456,7812},[]int{7671,7813},[]int{1285,7814},[]int{304,7815},[]int{5134,7816},[]int{6711,7817},[]int{165,7818},[]int{5715,7819},[]int{4006,7820},[]int{785,7821},[]int{3980,7822},[]int{4222,7823},[]int{3918,7824},[]int{1480,7825},[]int{7267,7826},[]int{492,7827},[]int{4564,7828},[]int{2100,7829},[]int{71,7830},[]int{2896,7831},[]int{6250,7832},[]int{6369,7833},[]int{2788,7834},[]int{327,7835},[]int{5790,7836},[]int{6661,7837},[]int{6287,7838},[]int{4532,7839},[]int{4966,7840},[]int{2834,7841},[]int{2393,7842},[]int{4268,7843},[]int{5178,7844},[]int{1612,7845},[]int{5405,7846},[]int{2883,7847},[]int{6567,7848},[]int{3415,7849},[]int{480,7850},[]int{558,7851},[]int{3164,7852},[]int{6001,7853},[]int{5422,7854},[]int{2514,7855},[]int{3242,7856},[]int{1709,7857},[]int{5511,7858},[]int{1680,7859},[]int{3277,7860},[]int{7732,7861},[]int{796,7862},[]int{7320,7863},[]int{474,7864},[]int{2304,7865},[]int{7076,7866},[]int{6671,7867},[]int{2866,7868},[]int{6560,7869},[]int{1546,7870},[]int{239,7871},[]int{4490,7872},[]int{3616,7873},[]int{4800,7874},[]int{3830,7875},[]int{659,7876},[]int{6814,7877},[]int{303,7878},[]int{4880,7879},[]int{6196,7880},[]int{1180,7881},[]int{7800,7882},[]int{4809,7883},[]int{7238,7884},[]int{5552,7885},[]int{2283,7886},[]int{2375,7887},[]int{2802,7888},[]int{6735,7889},[]int{6094,7890},[]int{3886,7891},[]int{2887,7892},[]int{1409,7893},[]int{893,7894},[]int{4857,7895},[]int{763,7896},[]int{3343,7897},[]int{5304,7898},[]int{1602,7899},[]int{1188,7900},[]int{4376,7901},[]int{5260,7902},[]int{7452,7903},[]int{2802,7904},[]int{7692,7905},[]int{5157,7906},[]int{7751,7907},[]int{5099,7908},[]int{5806,7909},[]int{5652,7910},[]int{7265,7911},[]int{3012,7912},[]int{2036,7913},[]int{6638,7914},[]int{1237,7915},[]int{3809,7916},[]int{5991,7917},[]int{2491,7918},[]int{4730,7919},[]int{5944,7920},[]int{170,7921},[]int{3118,7922},[]int{4455,7923},[]int{2651,7924},[]int{862,7925},[]int{1264,7926},[]int{2888,7927},[]int{2534,7928},[]int{182,7929},[]int{4054,7930},[]int{7419,7931},[]int{7671,7932},[]int{4547,7933},[]int{7809,7934},[]int{6316,7935},[]int{1491,7936},[]int{1940,7937},[]int{2806,7938},[]int{385,7939},[]int{7819,7940},[]int{6248,7941},[]int{3277,7942},[]int{4421,7943},[]int{7633,7944},[]int{1660,7945},[]int{7695,7946},[]int{7431,7947},[]int{3663,7948},[]int{5744,7949},[]int{7056,7950},[]int{2419,7951},[]int{7760,7952},[]int{7195,7953},[]int{4981,7954},[]int{6333,7955},[]int{5423,7956},[]int{5437,7957},[]int{2590,7958},[]int{5168,7959},[]int{3786,7960},[]int{642,7961},[]int{1792,7962},[]int{6233,7963},[]int{6058,7964},[]int{389,7965},[]int{4940,7966},[]int{4938,7967},[]int{5696,7968},[]int{1156,7969},[]int{62,7970},[]int{1632,7971},[]int{4270,7972},[]int{2615,7973},[]int{5097,7974},[]int{4220,7975},[]int{2936,7976},[]int{190,7977},[]int{4782,7978},[]int{1073,7979},[]int{5870,7980},[]int{1361,7981},[]int{6655,7982},[]int{1942,7983},[]int{4544,7984},[]int{5268,7985},[]int{4089,7986},[]int{1586,7987},[]int{6841,7988},[]int{6671,7989},[]int{735,7990},[]int{6675,7991},[]int{7673,7992},[]int{2703,7993},[]int{339,7994},[]int{7929,7995},[]int{2942,7996},[]int{3971,7997},[]int{3636,7998},[]int{6523,7999},[]int{4494,8000},[]int{3031,8001},[]int{1956,8002},[]int{5937,8003},[]int{5008,8004},[]int{4457,8005},[]int{1380,8006},[]int{6854,8007},[]int{4532,8008},[]int{955,8009},[]int{6754,8010},[]int{5980,8011},[]int{5332,8012},[]int{7159,8013},[]int{1650,8014},[]int{1699,8015},[]int{2282,8016},[]int{3341,8017},[]int{834,8018},[]int{2944,8019},[]int{2428,8020},[]int{5703,8021},[]int{2891,8022},[]int{4779,8023},[]int{5296,8024},[]int{3353,8025},[]int{2837,8026},[]int{1520,8027},[]int{5224,8028},[]int{2267,8029},[]int{5039,8030},[]int{3053,8031},[]int{5041,8032},[]int{510,8033},[]int{2496,8034},[]int{1582,8035},[]int{7661,8036},[]int{4581,8037},[]int{5537,8038},[]int{6183,8039},[]int{5306,8040},[]int{2990,8041},[]int{2541,8042},[]int{3952,8043},[]int{7287,8044},[]int{5088,8045},[]int{5560,8046},[]int{3664,8047},[]int{802,8048},[]int{6093,8049},[]int{6330,8050},[]int{4298,8051},[]int{6992,8052},[]int{7298,8053},[]int{4057,8054},[]int{4921,8055},[]int{7426,8056},[]int{4101,8057},[]int{3739,8058},[]int{5699,8059},[]int{3669,8060},[]int{1087,8061},[]int{4241,8062},[]int{4399,8063},[]int{3996,8064},[]int{7634,8065},[]int{1361,8066},[]int{1750,8067},[]int{6041,8068},[]int{578,8069},[]int{5621,8070},[]int{3294,8071},[]int{1622,8072},[]int{679,8073},[]int{260,8074},[]int{6817,8075},[]int{5895,8076},[]int{3357,8077},[]int{5858,8078},[]int{537,8079},[]int{2990,8080},[]int{2075,8081},[]int{4724,8082},[]int{1359,8083},[]int{6661,8084},[]int{3883,8085},[]int{3815,8086},[]int{1024,8087},[]int{2316,8088},[]int{4961,8089},[]int{2458,8090},[]int{5912,8091},[]int{1595,8092},[]int{5943,8093},[]int{7853,8094},[]int{2733,8095},[]int{7781,8096},[]int{6199,8097},[]int{3500,8098},[]int{4829,8099},[]int{5776,8100},[]int{7357,8101},[]int{739,8102},[]int{1852,8103},[]int{4035,8104},[]int{1676,8105},[]int{7217,8106},[]int{3980,8107},[]int{5138,8108},[]int{498,8109},[]int{6859,8110},[]int{3390,8111},[]int{7776,8112},[]int{4110,8113},[]int{1794,8114},[]int{6736,8115},[]int{4476,8116},[]int{1835,8117},[]int{2596,8118},[]int{3751,8119},[]int{5050,8120},[]int{5660,8121},[]int{5850,8122},[]int{6304,8123},[]int{7604,8124},[]int{4636,8125},[]int{1821,8126},[]int{4718,8127},[]int{5213,8128},[]int{2421,8129},[]int{1041,8130},[]int{176,8131},[]int{4903,8132},[]int{8063,8133},[]int{34,8134},[]int{6741,8135},[]int{7759,8136},[]int{7742,8137},[]int{4363,8138},[]int{4483,8139},[]int{1485,8140},[]int{4625,8141},[]int{2188,8142},[]int{2829,8143},[]int{7228,8144},[]int{4449,8145},[]int{7490,8146},[]int{2155,8147},[]int{6376,8148},[]int{4459,8149},[]int{6734,8150},[]int{7406,8151},[]int{5703,8152},[]int{6729,8153},[]int{593,8154},[]int{5499,8155},[]int{5515,8156},[]int{3530,8157},[]int{6182,8158},[]int{5659,8159},[]int{4059,8160},[]int{3616,8161},[]int{2414,8162},[]int{3384,8163},[]int{1180,8164},[]int{2454,8165},[]int{4534,8166},[]int{5670,8167},[]int{35,8168},[]int{970,8169},[]int{6024,8170},[]int{5923,8171},[]int{4849,8172},[]int{6104,8173},[]int{6399,8174},[]int{1484,8175},[]int{1176,8176},[]int{5786,8177},[]int{3844,8178},[]int{4065,8179},[]int{7048,8180},[]int{1732,8181},[]int{7459,8182},[]int{853,8183},[]int{2001,8184},[]int{7582,8185},[]int{7982,8186},[]int{5794,8187},[]int{2968,8188},[]int{3246,8189},[]int{6333,8190},[]int{3001,8191},[]int{930,8192},[]int{1568,8193},[]int{2799,8194},[]int{3514,8195},[]int{353,8196},[]int{1790,8197},[]int{4364,8198},[]int{4757,8199},[]int{5854,8200},[]int{366,8201},[]int{7681,8202},[]int{5488,8203},[]int{8121,8204},[]int{1501,8205},[]int{6755,8206},[]int{76,8207},[]int{3061,8208},[]int{2768,8209},[]int{2876,8210},[]int{7108,8211},[]int{5966,8212},[]int{5241,8213},[]int{2406,8214},[]int{7974,8215},[]int{4625,8216},[]int{7659,8217},[]int{4813,8218},[]int{5785,8219},[]int{3876,8220},[]int{5893,8221},[]int{1678,8222},[]int{4067,8223},[]int{4692,8224},[]int{2754,8225},[]int{2206,8226},[]int{3541,8227},[]int{669,8228},[]int{3822,8229},[]int{4831,8230},[]int{7057,8231},[]int{6994,8232},[]int{5303,8233},[]int{2205,8234},[]int{1697,8235},[]int{6497,8236},[]int{5540,8237},[]int{7563,8238},[]int{3496,8239},[]int{2666,8240},[]int{7634,8241},[]int{5643,8242},[]int{5353,8243},[]int{7093,8244},[]int{4004,8245},[]int{4211,8246},[]int{3788,8247},[]int{5198,8248},[]int{7358,8249},[]int{4886,8250},[]int{7702,8251},[]int{4417,8252},[]int{990,8253},[]int{7262,8254},[]int{3865,8255},[]int{3511,8256},[]int{3520,8257},[]int{6566,8258},[]int{8067,8259},[]int{7576,8260},[]int{7917,8261},[]int{6018,8262},[]int{1931,8263},[]int{7171,8264},[]int{1696,8265},[]int{3264,8266},[]int{3822,8267},[]int{885,8268},[]int{4416,8269},[]int{5026,8270},[]int{2667,8271},[]int{5769,8272},[]int{2464,8273},[]int{255,8274},[]int{3158,8275},[]int{5733,8276},[]int{6422,8277},[]int{4559,8278},[]int{4609,8279},[]int{1946,8280},[]int{1759,8281},[]int{4361,8282},[]int{7194,8283},[]int{1589,8284},[]int{5792,8285},[]int{241,8286},[]int{4698,8287},[]int{879,8288},[]int{5507,8289},[]int{2201,8290},[]int{5931,8291},[]int{7671,8292},[]int{8076,8293},[]int{62,8294},[]int{8256,8295},[]int{2335,8296},[]int{4118,8297},[]int{2034,8298},[]int{5475,8299},[]int{645,8300},[]int{3164,8301},[]int{1875,8302},[]int{7826,8303},[]int{2455,8304},[]int{2889,8305},[]int{462,8306},[]int{7212,8307},[]int{1607,8308},[]int{5012,8309},[]int{680,8310},[]int{3646,8311},[]int{7585,8312},[]int{732,8313},[]int{6370,8314},[]int{12,8315},[]int{4375,8316},[]int{7961,8317},[]int{5971,8318},[]int{2777,8319},[]int{8080,8320},[]int{3647,8321},[]int{973,8322},[]int{5401,8323},[]int{7084,8324},[]int{4089,8325},[]int{2231,8326},[]int{1281,8327},[]int{1704,8328},[]int{7788,8329},[]int{8105,8330},[]int{7030,8331},[]int{6753,8332},[]int{7444,8333},[]int{272,8334},[]int{3001,8335},[]int{3976,8336},[]int{3618,8337},[]int{7096,8338},[]int{6222,8339},[]int{4149,8340},[]int{7333,8341},[]int{7879,8342},[]int{18,8343},[]int{2209,8344},[]int{6170,8345},[]int{57,8346},[]int{5452,8347},[]int{7719,8348},[]int{608,8349},[]int{3292,8350},[]int{6714,8351},[]int{5965,8352},[]int{5909,8353},[]int{3710,8354},[]int{5024,8355},[]int{6197,8356},[]int{5921,8357},[]int{1720,8358},[]int{5993,8359},[]int{4858,8360},[]int{765,8361},[]int{5127,8362},[]int{4278,8363},[]int{5166,8364},[]int{8034,8365},[]int{324,8366},[]int{6927,8367},[]int{991,8368},[]int{6350,8369},[]int{7877,8370},[]int{1658,8371},[]int{5893,8372},[]int{2475,8373},[]int{6133,8374},[]int{2472,8375},[]int{1140,8376},[]int{1105,8377},[]int{8245,8378},[]int{3908,8379},[]int{5225,8380},[]int{6088,8381},[]int{6344,8382},[]int{3041,8383},[]int{6555,8384},[]int{2803,8385},[]int{1825,8386},[]int{746,8387},[]int{2493,8388},[]int{1773,8389},[]int{2288,8390},[]int{2723,8391},[]int{5099,8392},[]int{7827,8393},[]int{8331,8394},[]int{7675,8395},[]int{1022,8396},[]int{5582,8397},[]int{526,8398},[]int{1754,8399},[]int{7361,8400},[]int{1122,8401},[]int{2548,8402},[]int{5763,8403},[]int{5198,8404},[]int{4286,8405},[]int{1214,8406},[]int{2840,8407},[]int{510,8408},[]int{4947,8409},[]int{5936,8410},[]int{4063,8411},[]int{6069,8412},[]int{7896,8413},[]int{2340,8414},[]int{5042,8415},[]int{2446,8416},[]int{5257,8417},[]int{6892,8418},[]int{2499,8419},[]int{6752,8420},[]int{4445,8421},[]int{984,8422},[]int{2847,8423},[]int{2389,8424},[]int{6250,8425},[]int{7217,8426},[]int{8366,8427},[]int{2471,8428},[]int{7249,8429},[]int{4265,8430},[]int{1757,8431},[]int{3377,8432},[]int{6742,8433},[]int{6041,8434},[]int{477,8435},[]int{4,8436},[]int{1780,8437},[]int{209,8438},[]int{5627,8439},[]int{4861,8440},[]int{8188,8441},[]int{3070,8442},[]int{6186,8443},[]int{723,8444},[]int{7888,8445},[]int{5774,8446},[]int{172,8447},[]int{6073,8448},[]int{8318,8449},[]int{3306,8450},[]int{4837,8451},[]int{1002,8452},[]int{7624,8453},[]int{3737,8454},[]int{1665,8455},[]int{6468,8456},[]int{3396,8457},[]int{5611,8458},[]int{8363,8459},[]int{1312,8460},[]int{1361,8461},[]int{1420,8462},[]int{7533,8463},[]int{4725,8464},[]int{254,8465},[]int{5707,8466},[]int{2503,8467},[]int{1447,8468},[]int{8311,8469},[]int{7789,8470},[]int{7712,8471},[]int{1563,8472},[]int{408,8473},[]int{1735,8474},[]int{3981,8475},[]int{2776,8476},[]int{2803,8477},[]int{2845,8478},[]int{1985,8479},[]int{7121,8480},[]int{27,8481},[]int{1156,8482},[]int{7647,8483},[]int{4067,8484},[]int{960,8485},[]int{6640,8486},[]int{7135,8487},[]int{1110,8488},[]int{194,8489},[]int{2721,8490},[]int{8164,8491},[]int{3233,8492},[]int{760,8493},[]int{7807,8494},[]int{7665,8495},[]int{2126,8496},[]int{5766,8497},[]int{201,8498},[]int{1832,8499},[]int{1139,8500},[]int{4163,8501},[]int{4583,8502},[]int{106,8503},[]int{6932,8504},[]int{4524,8505},[]int{6483,8506},[]int{6257,8507},[]int{7167,8508},[]int{5759,8509},[]int{656,8510},[]int{1001,8511},[]int{3594,8512},[]int{2976,8513},[]int{652,8514},[]int{471,8515},[]int{4823,8516},[]int{6540,8517},[]int{3846,8518},[]int{2534,8519},[]int{405,8520},[]int{7305,8521},[]int{4160,8522},[]int{7381,8523},[]int{6831,8524},[]int{3325,8525},[]int{5433,8526},[]int{4312,8527},[]int{7859,8528},[]int{3854,8529},[]int{3954,8530},[]int{8313,8531},[]int{4597,8532},[]int{4475,8533},[]int{3734,8534},[]int{3742,8535},[]int{7589,8536},[]int{2344,8537},[]int{6689,8538},[]int{2393,8539},[]int{3024,8540},[]int{1568,8541},[]int{2718,8542},[]int{6298,8543},[]int{2295,8544},[]int{886,8545},[]int{1926,8546},[]int{4289,8547},[]int{3115,8548},[]int{6989,8549},[]int{2695,8550},[]int{8218,8551},[]int{3629,8552},[]int{2075,8553},[]int{8190,8554},[]int{2433,8555},[]int{7340,8556},[]int{3117,8557},[]int{6344,8558},[]int{4610,8559},[]int{6806,8560},[]int{3640,8561},[]int{5839,8562},[]int{631,8563},[]int{7160,8564},[]int{2180,8565},[]int{6022,8566},[]int{3350,8567},[]int{4106,8568},[]int{7977,8569},[]int{5863,8570},[]int{8126,8571},[]int{4171,8572},[]int{892,8573},[]int{3860,8574},[]int{7634,8575},[]int{2477,8576},[]int{6501,8577},[]int{1447,8578},[]int{4715,8579},[]int{5386,8580},[]int{6311,8581},[]int{850,8582},[]int{7226,8583},[]int{5699,8584},[]int{1431,8585},[]int{5135,8586},[]int{7455,8587},[]int{882,8588},[]int{7257,8589},[]int{2778,8590},[]int{1427,8591},[]int{5036,8592},[]int{1452,8593},[]int{3510,8594},[]int{8034,8595},[]int{3047,8596},[]int{3530,8597},[]int{6446,8598},[]int{1158,8599},[]int{255,8600},[]int{3519,8601},[]int{5995,8602},[]int{291,8603},[]int{3896,8604},[]int{5796,8605},[]int{7372,8606},[]int{5730,8607},[]int{7616,8608},[]int{5477,8609},[]int{919,8610},[]int{2684,8611},[]int{7051,8612},[]int{5835,8613},[]int{188,8614},[]int{2466,8615},[]int{5571,8616},[]int{1191,8617},[]int{215,8618},[]int{160,8619},[]int{980,8620},[]int{5368,8621},[]int{4415,8622},[]int{3454,8623},[]int{6216,8624},[]int{5492,8625},[]int{3644,8626},[]int{6811,8627},[]int{196,8628},[]int{6969,8629},[]int{7604,8630},[]int{4771,8631},[]int{6695,8632},[]int{4840,8633},[]int{1327,8634},[]int{7963,8635},[]int{1567,8636},[]int{1224,8637},[]int{8173,8638},[]int{7896,8639},[]int{8515,8640},[]int{649,8641},[]int{7674,8642},[]int{8242,8643},[]int{5944,8644},[]int{757,8645},[]int{4815,8646},[]int{4019,8647},[]int{2305,8648},[]int{4266,8649},[]int{286,8650},[]int{2116,8651},[]int{6714,8652},[]int{4049,8653},[]int{919,8654},[]int{7183,8655},[]int{335,8656},[]int{5754,8657},[]int{3547,8658},[]int{661,8659},[]int{3322,8660},[]int{6720,8661},[]int{5828,8662},[]int{4113,8663},[]int{695,8664},[]int{3259,8665},[]int{6723,8666},[]int{3402,8667},[]int{7081,8668},[]int{6532,8669},[]int{1824,8670},[]int{4950,8671},[]int{3307,8672},[]int{4753,8673},[]int{4508,8674},[]int{3871,8675},[]int{8625,8676},[]int{8118,8677},[]int{6430,8678},[]int{8525,8679},[]int{4544,8680},[]int{832,8681},[]int{297,8682},[]int{3699,8683},[]int{6500,8684},[]int{5573,8685},[]int{5537,8686},[]int{1623,8687},[]int{4197,8688},[]int{3580,8689},[]int{6788,8690},[]int{5513,8691},[]int{4598,8692},[]int{7072,8693},[]int{2057,8694},[]int{537,8695},[]int{7995,8696},[]int{5943,8697},[]int{6854,8698},[]int{1597,8699},[]int{1192,8700},[]int{7989,8701},[]int{4380,8702},[]int{2759,8703},[]int{2668,8704},[]int{7792,8705},[]int{3353,8706},[]int{6886,8707},[]int{1712,8708},[]int{4477,8709},[]int{7734,8710},[]int{8213,8711},[]int{1477,8712},[]int{6210,8713},[]int{1191,8714},[]int{1878,8715},[]int{1546,8716},[]int{4787,8717},[]int{6837,8718},[]int{2708,8719},[]int{1662,8720},[]int{2404,8721},[]int{6815,8722},[]int{6093,8723},[]int{5578,8724},[]int{7279,8725},[]int{2576,8726},[]int{6849,8727},[]int{3654,8728},[]int{1926,8729},[]int{272,8730},[]int{3570,8731},[]int{114,8732},[]int{4654,8733},[]int{6488,8734},[]int{2360,8735},[]int{4505,8736},[]int{5468,8737},[]int{5478,8738},[]int{55,8739},[]int{3122,8740},[]int{146,8741},[]int{7954,8742},[]int{5096,8743},[]int{3484,8744},[]int{1320,8745},[]int{2688,8746},[]int{3323,8747},[]int{7404,8748},[]int{602,8749},[]int{5482,8750},[]int{4084,8751},[]int{6509,8752},[]int{4498,8753},[]int{3471,8754},[]int{2791,8755},[]int{8436,8756},[]int{6758,8757},[]int{3203,8758},[]int{7137,8759},[]int{1685,8760},[]int{4639,8761},[]int{3712,8762},[]int{4357,8763},[]int{2810,8764},[]int{5184,8765},[]int{8222,8766},[]int{6287,8767},[]int{1159,8768},[]int{8615,8769},[]int{8595,8770},[]int{7742,8771},[]int{5748,8772},[]int{5449,8773},[]int{7031,8774},[]int{5663,8775},[]int{3496,8776},[]int{4714,8777},[]int{5021,8778},[]int{1196,8779},[]int{6719,8780},[]int{2438,8781},[]int{1269,8782},[]int{2653,8783},[]int{3606,8784},[]int{5802,8785},[]int{629,8786},[]int{201,8787},[]int{1962,8788},[]int{6449,8789},[]int{3529,8790},[]int{6897,8791},[]int{5627,8792},[]int{90,8793},[]int{1181,8794},[]int{6801,8795},[]int{4784,8796},[]int{4741,8797},[]int{3989,8798},[]int{4090,8799},[]int{4073,8800},[]int{4139,8801},[]int{5433,8802},[]int{8121,8803},[]int{7169,8804},[]int{153,8805},[]int{6684,8806},[]int{7108,8807},[]int{2622,8808},[]int{7192,8809},[]int{1573,8810},[]int{4417,8811},[]int{7290,8812},[]int{1028,8813},[]int{2388,8814},[]int{1028,8815},[]int{8239,8816},[]int{5391,8817},[]int{8473,8818},[]int{2351,8819},[]int{2058,8820},[]int{45,8821},[]int{1501,8822},[]int{4740,8823},[]int{3373,8824},[]int{5087,8825},[]int{2556,8826},[]int{2365,8827},[]int{2225,8828},[]int{4319,8829},[]int{4078,8830},[]int{1150,8831},[]int{2933,8832},[]int{3657,8833},[]int{2105,8834},[]int{7526,8835},[]int{1657,8836},[]int{2426,8837},[]int{1286,8838},[]int{3179,8839},[]int{545,8840},[]int{1523,8841},[]int{3338,8842},[]int{7303,8843},[]int{3800,8844},[]int{5994,8845},[]int{6172,8846},[]int{4594,8847},[]int{7738,8848},[]int{3195,8849},[]int{523,8850},[]int{1476,8851},[]int{2515,8852},[]int{7447,8853},[]int{5516,8854},[]int{3162,8855},[]int{7751,8856},[]int{1124,8857},[]int{4566,8858},[]int{5931,8859},[]int{3367,8860},[]int{8286,8861},[]int{6228,8862},[]int{4907,8863},[]int{2493,8864},[]int{5440,8865},[]int{7326,8866},[]int{894,8867},[]int{2212,8868},[]int{7159,8869},[]int{8573,8870},[]int{3827,8871},[]int{4878,8872},[]int{5661,8873},[]int{4321,8874},[]int{6940,8875},[]int{5331,8876},[]int{5759,8877},[]int{2437,8878},[]int{7941,8879},[]int{7484,8880},[]int{6553,8881},[]int{7881,8882},[]int{7752,8883},[]int{8073,8884},[]int{8384,8885},[]int{3999,8886},[]int{8302,8887},[]int{2885,8888},[]int{3849,8889},[]int{4373,8890},[]int{2126,8891},[]int{4536,8892},[]int{5128,8893},[]int{2746,8894},[]int{2227,8895},[]int{5269,8896},[]int{8191,8897},[]int{1509,8898},[]int{4702,8899},[]int{3302,8900},[]int{3430,8901},[]int{3098,8902},[]int{4124,8903},[]int{3009,8904},[]int{1394,8905},[]int{7703,8906},[]int{7931,8907},[]int{6543,8908},[]int{6594,8909},[]int{3409,8910},[]int{8337,8911},[]int{3224,8912},[]int{681,8913},[]int{7257,8914},[]int{4609,8915},[]int{4125,8916},[]int{5206,8917},[]int{7563,8918},[]int{4174,8919},[]int{2978,8920},[]int{619,8921},[]int{8202,8922},[]int{6391,8923},[]int{6467,8924},[]int{6004,8925},[]int{5704,8926},[]int{3540,8927},[]int{434,8928},[]int{1608,8929},[]int{6440,8930},[]int{8595,8931},[]int{472,8932},[]int{2386,8933},[]int{2100,8934},[]int{4881,8935},[]int{7270,8936},[]int{7242,8937},[]int{154,8938},[]int{7585,8939},[]int{4942,8940},[]int{3688,8941},[]int{2723,8942},[]int{7782,8943},[]int{1491,8944},[]int{1193,8945},[]int{1794,8946},[]int{789,8947},[]int{661,8948},[]int{1718,8949},[]int{5118,8950},[]int{94,8951},[]int{4363,8952},[]int{2934,8953},[]int{3393,8954},[]int{2657,8955},[]int{7175,8956},[]int{3564,8957},[]int{1469,8958},[]int{5903,8959},[]int{1864,8960},[]int{596,8961},[]int{8830,8962},[]int{8663,8963},[]int{7732,8964},[]int{6068,8965},[]int{6562,8966},[]int{3919,8967},[]int{4040,8968},[]int{294,8969},[]int{7776,8970},[]int{4113,8971},[]int{4145,8972},[]int{2749,8973},[]int{480,8974},[]int{1231,8975},[]int{3313,8976},[]int{8722,8977},[]int{312,8978},[]int{8768,8979},[]int{2395,8980},[]int{3024,8981},[]int{4587,8982},[]int{1155,8983},[]int{5587,8984},[]int{3415,8985},[]int{748,8986},[]int{498,8987},[]int{5247,8988},[]int{4241,8989},[]int{7746,8990},[]int{6962,8991},[]int{5803,8992},[]int{6970,8993},[]int{6691,8994},[]int{1805,8995},[]int{7252,8996},[]int{5199,8997},[]int{2551,8998},[]int{6535,8999},[]int{4972,9000},[]int{3913,9001},[]int{3871,9002},[]int{8192,9003},[]int{4053,9004},[]int{5858,9005},[]int{7058,9006},[]int{8250,9007},[]int{4549,9008},[]int{4983,9009},[]int{1771,9010},[]int{8732,9011},[]int{1438,9012},[]int{1070,9013},[]int{5853,9014},[]int{8016,9015},[]int{2423,9016},[]int{6995,9017},[]int{5478,9018},[]int{4754,9019},[]int{8384,9020},[]int{235,9021},[]int{1668,9022},[]int{5123,9023},[]int{2606,9024},[]int{2623,9025},[]int{977,9026},[]int{4518,9027},[]int{4195,9028},[]int{4041,9029},[]int{3949,9030},[]int{2326,9031},[]int{7637,9032},[]int{5504,9033},[]int{3341,9034},[]int{8790,9035},[]int{8341,9036},[]int{8116,9037},[]int{958,9038},[]int{3194,9039},[]int{2004,9040},[]int{4612,9041},[]int{1675,9042},[]int{6827,9043},[]int{666,9044},[]int{6398,9045},[]int{8053,9046},[]int{5321,9047},[]int{6827,9048},[]int{2204,9049},[]int{3577,9050},[]int{1537,9051},[]int{1307,9052},[]int{7806,9053},[]int{3714,9054},[]int{2476,9055},[]int{6374,9056},[]int{8579,9057},[]int{5911,9058},[]int{235,9059},[]int{8913,9060},[]int{5868,9061},[]int{4075,9062},[]int{574,9063},[]int{5616,9064},[]int{5978,9065},[]int{539,9066},[]int{1623,9067},[]int{3725,9068},[]int{4299,9069},[]int{6313,9070},[]int{4415,9071},[]int{1330,9072},[]int{3035,9073},[]int{3539,9074},[]int{4156,9075},[]int{4627,9076},[]int{1725,9077},[]int{4486,9078},[]int{1168,9079},[]int{6771,9080},[]int{6731,9081},[]int{4036,9082},[]int{6100,9083},[]int{3961,9084},[]int{6008,9085},[]int{5632,9086},[]int{3985,9087},[]int{1254,9088},[]int{705,9089},[]int{2173,9090},[]int{7528,9091},[]int{3522,9092},[]int{3327,9093},[]int{606,9094},[]int{2519,9095},[]int{6249,9096},[]int{3702,9097},[]int{4675,9098},[]int{6831,9099},[]int{513,9100},[]int{9091,9101},[]int{1548,9102},[]int{178,9103},[]int{3010,9104},[]int{3912,9105},[]int{2621,9106},[]int{5371,9107},[]int{3849,9108},[]int{4529,9109},[]int{8894,9110},[]int{7786,9111},[]int{1466,9112},[]int{1217,9113},[]int{3998,9114},[]int{7298,9115},[]int{4388,9116},[]int{7751,9117},[]int{2349,9118},[]int{347,9119},[]int{2915,9120},[]int{2781,9121},[]int{678,9122},[]int{4074,9123},[]int{7179,9124},[]int{877,9125},[]int{2124,9126},[]int{614,9127},[]int{6107,9128},[]int{7483,9129},[]int{4039,9130},[]int{7609,9131},[]int{6441,9132},[]int{1564,9133},[]int{8480,9134},[]int{5356,9135},[]int{2265,9136},[]int{1703,9137},[]int{6656,9138},[]int{8967,9139},[]int{5025,9140},[]int{6441,9141},[]int{6648,9142},[]int{6570,9143},[]int{2036,9144},[]int{5883,9145},[]int{5462,9146},[]int{7245,9147},[]int{1594,9148},[]int{8933,9149},[]int{927,9150},[]int{420,9151},[]int{5969,9152},[]int{1150,9153},[]int{8583,9154},[]int{7888,9155},[]int{5510,9156},[]int{1356,9157},[]int{6335,9158},[]int{4457,9159},[]int{8075,9160},[]int{3623,9161},[]int{3071,9162},[]int{95,9163},[]int{4218,9164},[]int{6190,9165},[]int{7372,9166},[]int{4602,9167},[]int{9034,9168},[]int{49,9169},[]int{4887,9170},[]int{8383,9171},[]int{7481,9172},[]int{1139,9173},[]int{5691,9174},[]int{2457,9175},[]int{5735,9176},[]int{6923,9177},[]int{155,9178},[]int{3364,9179},[]int{4362,9180},[]int{2143,9181},[]int{7228,9182},[]int{3441,9183},[]int{2179,9184},[]int{4357,9185},[]int{1066,9186},[]int{8971,9187},[]int{5769,9188},[]int{1247,9189},[]int{2194,9190},[]int{7129,9191},[]int{3733,9192},[]int{5857,9193},[]int{7975,9194},[]int{6781,9195},[]int{8190,9196},[]int{6359,9197},[]int{2558,9198},[]int{1785,9199},[]int{2555,9200},[]int{3236,9201},[]int{1865,9202},[]int{1458,9203},[]int{7891,9204},[]int{7936,9205},[]int{8116,9206},[]int{5149,9207},[]int{3269,9208},[]int{7060,9209},[]int{7559,9210},[]int{6475,9211},[]int{1408,9212},[]int{4737,9213},[]int{7472,9214},[]int{1081,9215},[]int{4431,9216},[]int{2741,9217},[]int{7387,9218},[]int{4048,9219},[]int{2171,9220},[]int{1418,9221},[]int{6305,9222},[]int{1930,9223},[]int{3477,9224},[]int{2618,9225},[]int{7466,9226},[]int{9097,9227},[]int{299,9228},[]int{7576,9229},[]int{8365,9230},[]int{7234,9231},[]int{5758,9232},[]int{8795,9233},[]int{4709,9234},[]int{8897,9235},[]int{7870,9236},[]int{8523,9237},[]int{2404,9238},[]int{4394,9239},[]int{603,9240},[]int{2107,9241},[]int{9007,9242},[]int{6821,9243},[]int{2965,9244},[]int{6630,9245},[]int{4851,9246},[]int{6298,9247},[]int{5478,9248},[]int{6147,9249},[]int{215,9250},[]int{1813,9251},[]int{7460,9252},[]int{8762,9253},[]int{7893,9254},[]int{7722,9255},[]int{2158,9256},[]int{2767,9257},[]int{4076,9258},[]int{6354,9259},[]int{5228,9260},[]int{7141,9261},[]int{5126,9262},[]int{8763,9263},[]int{6103,9264},[]int{1129,9265},[]int{6973,9266},[]int{4113,9267},[]int{4078,9268},[]int{954,9269},[]int{849,9270},[]int{361,9271},[]int{8476,9272},[]int{1682,9273},[]int{5439,9274},[]int{7012,9275},[]int{6911,9276},[]int{9272,9277},[]int{6070,9278},[]int{2976,9279},[]int{1343,9280},[]int{3536,9281},[]int{8942,9282},[]int{9174,9283},[]int{820,9284},[]int{8536,9285},[]int{4615,9286},[]int{9017,9287},[]int{6340,9288},[]int{2587,9289},[]int{7563,9290},[]int{7604,9291},[]int{2377,9292},[]int{607,9293},[]int{4992,9294},[]int{2736,9295},[]int{1771,9296},[]int{3129,9297},[]int{2278,9298},[]int{3274,9299},[]int{23,9300},[]int{2221,9301},[]int{778,9302},[]int{7383,9303},[]int{2181,9304},[]int{8078,9305},[]int{8015,9306},[]int{4252,9307},[]int{1296,9308},[]int{5190,9309},[]int{2773,9310},[]int{5117,9311},[]int{780,9312},[]int{722,9313},[]int{2552,9314},[]int{2191,9315},[]int{4611,9316},[]int{2708,9317},[]int{8878,9318},[]int{5231,9319},[]int{1949,9320},[]int{7734,9321},[]int{6561,9322},[]int{4889,9323},[]int{8794,9324},[]int{1156,9325},[]int{3752,9326},[]int{936,9327},[]int{7502,9328},[]int{2561,9329},[]int{5122,9330},[]int{8181,9331},[]int{5618,9332},[]int{321,9333},[]int{5326,9334},[]int{1098,9335},[]int{1770,9336},[]int{1013,9337},[]int{7405,9338},[]int{3459,9339},[]int{807,9340},[]int{93,9341},[]int{3065,9342},[]int{8897,9343},[]int{6017,9344},[]int{3136,9345},[]int{4333,9346},[]int{1321,9347},[]int{853,9348},[]int{7309,9349},[]int{9164,9350},[]int{7814,9351},[]int{1827,9352},[]int{6070,9353},[]int{2230,9354},[]int{6948,9355},[]int{2028,9356},[]int{7642,9357},[]int{382,9358},[]int{7326,9359},[]int{980,9360},[]int{8663,9361},[]int{4541,9362},[]int{1658,9363},[]int{7633,9364},[]int{8954,9365},[]int{3592,9366},[]int{7775,9367},[]int{9366,9368},[]int{5068,9369},[]int{2287,9370},[]int{2664,9371},[]int{3392,9372},[]int{884,9373},[]int{5435,9374},[]int{5099,9375},[]int{8532,9376},[]int{8427,9377},[]int{6527,9378},[]int{7862,9379},[]int{5655,9380},[]int{929,9381},[]int{3258,9382},[]int{2008,9383},[]int{2122,9384},[]int{7119,9385},[]int{4307,9386},[]int{8455,9387},[]int{8425,9388},[]int{5762,9389},[]int{5093,9390},[]int{3266,9391},[]int{1248,9392},[]int{804,9393},[]int{1810,9394},[]int{8423,9395},[]int{2102,9396},[]int{6057,9397},[]int{8079,9398},[]int{3946,9399},[]int{5782,9400},[]int{6520,9401},[]int{1180,9402},[]int{3873,9403},[]int{9019,9404},[]int{6136,9405},[]int{1685,9406},[]int{7216,9407},[]int{439,9408},[]int{8204,9409},[]int{6458,9410},[]int{5889,9411},[]int{3132,9412},[]int{7748,9413},[]int{5453,9414},[]int{3526,9415},[]int{1472,9416},[]int{3481,9417},[]int{9204,9418},[]int{2974,9419},[]int{2699,9420},[]int{56,9421},[]int{7966,9422},[]int{5350,9423},[]int{1639,9424},[]int{2167,9425},[]int{3291,9426},[]int{8593,9427},[]int{1352,9428},[]int{2462,9429},[]int{5701,9430},[]int{574,9431},[]int{6046,9432},[]int{8249,9433},[]int{5560,9434},[]int{6295,9435},[]int{4876,9436},[]int{8626,9437},[]int{7070,9438},[]int{3932,9439},[]int{8223,9440},[]int{2388,9441},[]int{5487,9442},[]int{5595,9443},[]int{2372,9444},[]int{5495,9445},[]int{9410,9446},[]int{3943,9447},[]int{7295,9448},[]int{5927,9449},[]int{3505,9450},[]int{6785,9451},[]int{7081,9452},[]int{8470,9453},[]int{3466,9454},[]int{4275,9455},[]int{1836,9456},[]int{1280,9457},[]int{7173,9458},[]int{2421,9459},[]int{8663,9460},[]int{4143,9461},[]int{6357,9462},[]int{1610,9463},[]int{7177,9464},[]int{7193,9465},[]int{3219,9466},[]int{5996,9467},[]int{9211,9468},[]int{6201,9469},[]int{6870,9470},[]int{8878,9471},[]int{5503,9472},[]int{8741,9473},[]int{3414,9474},[]int{840,9475},[]int{2743,9476},[]int{7725,9477},[]int{4160,9478},[]int{1810,9479},[]int{8563,9480},[]int{7386,9481},[]int{5586,9482},[]int{2565,9483},[]int{6667,9484},[]int{930,9485},[]int{1578,9486},[]int{8184,9487},[]int{869,9488},[]int{4101,9489},[]int{6437,9490},[]int{4195,9491},[]int{4279,9492},[]int{9359,9493},[]int{8303,9494},[]int{3351,9495},[]int{3908,9496},[]int{4247,9497},[]int{2213,9498},[]int{9397,9499},[]int{6593,9500},[]int{2440,9501},[]int{3210,9502},[]int{2139,9503},[]int{2380,9504},[]int{4277,9505},[]int{7863,9506},[]int{5601,9507},[]int{5333,9508},[]int{3945,9509},[]int{3877,9510},[]int{5718,9511},[]int{1954,9512},[]int{8655,9513},[]int{2037,9514},[]int{4051,9515},[]int{973,9516},[]int{2034,9517},[]int{3095,9518},[]int{2532,9519},[]int{2579,9520},[]int{8219,9521},[]int{4633,9522},[]int{321,9523},[]int{8364,9524},[]int{2764,9525},[]int{2201,9526},[]int{9370,9527},[]int{8491,9528},[]int{2376,9529},[]int{8006,9530},[]int{7636,9531},[]int{5969,9532},[]int{7332,9533},[]int{6748,9534},[]int{7429,9535},[]int{4986,9536},[]int{7956,9537},[]int{3906,9538},[]int{9266,9539},[]int{1831,9540},[]int{4151,9541},[]int{740,9542},[]int{1070,9543},[]int{6885,9544},[]int{7679,9545},[]int{236,9546},[]int{7090,9547},[]int{7967,9548},[]int{6060,9549},[]int{8161,9550},[]int{8052,9551},[]int{5453,9552},[]int{5832,9553},[]int{2727,9554},[]int{9111,9555},[]int{2263,9556},[]int{9222,9557},[]int{6435,9558},[]int{762,9559},[]int{8825,9560},[]int{484,9561},[]int{8049,9562},[]int{8613,9563},[]int{3783,9564},[]int{9494,9565},[]int{5316,9566},[]int{3465,9567},[]int{764,9568},[]int{511,9569},[]int{3019,9570},[]int{6002,9571},[]int{6419,9572},[]int{5274,9573},[]int{3595,9574},[]int{4883,9575},[]int{9195,9576},[]int{1774,9577},[]int{6034,9578},[]int{6860,9579},[]int{3890,9580},[]int{6265,9581},[]int{687,9582},[]int{6013,9583},[]int{8389,9584},[]int{9477,9585},[]int{6276,9586},[]int{5914,9587},[]int{1458,9588},[]int{2440,9589},[]int{1833,9590},[]int{8635,9591},[]int{2635,9592},[]int{1457,9593},[]int{8652,9594},[]int{4784,9595},[]int{1319,9596},[]int{7002,9597},[]int{5811,9598},[]int{6500,9599},[]int{3655,9600},[]int{7488,9601},[]int{2373,9602},[]int{4659,9603},[]int{5767,9604},[]int{9442,9605},[]int{544,9606},[]int{2815,9607},[]int{5694,9608},[]int{7595,9609},[]int{6619,9610},[]int{3907,9611},[]int{208,9612},[]int{8181,9613},[]int{8458,9614},[]int{6067,9615},[]int{2976,9616},[]int{4939,9617},[]int{8478,9618},[]int{6161,9619},[]int{7343,9620},[]int{7600,9621},[]int{896,9622},[]int{6570,9623},[]int{6996,9624},[]int{3819,9625},[]int{2677,9626},[]int{155,9627},[]int{6265,9628},[]int{5619,9629},[]int{8131,9630},[]int{5620,9631},[]int{8911,9632},[]int{2104,9633},[]int{4598,9634},[]int{2788,9635},[]int{4938,9636},[]int{7775,9637},[]int{5829,9638},[]int{9566,9639},[]int{2691,9640},[]int{4809,9641},[]int{2413,9642},[]int{5423,9643},[]int{7111,9644},[]int{3858,9645},[]int{3296,9646},[]int{5960,9647},[]int{4737,9648},[]int{4633,9649},[]int{3681,9650},[]int{6552,9651},[]int{3809,9652},[]int{6654,9653},[]int{7006,9654},[]int{7118,9655},[]int{3946,9656},[]int{4034,9657},[]int{8194,9658},[]int{4685,9659},[]int{8417,9660},[]int{3173,9661},[]int{6442,9662},[]int{9350,9663},[]int{1159,9664},[]int{5711,9665},[]int{2844,9666},[]int{6911,9667},[]int{2452,9668},[]int{8816,9669},[]int{9358,9670},[]int{4548,9671},[]int{6966,9672},[]int{9095,9673},[]int{5318,9674},[]int{316,9675},[]int{6498,9676},[]int{1246,9677},[]int{2329,9678},[]int{4930,9679},[]int{1693,9680},[]int{2377,9681},[]int{9271,9682},[]int{2256,9683},[]int{6244,9684},[]int{7340,9685},[]int{4130,9686},[]int{4351,9687},[]int{5846,9688},[]int{7504,9689},[]int{6271,9690},[]int{2990,9691},[]int{8912,9692},[]int{6719,9693},[]int{2845,9694},[]int{2350,9695},[]int{2532,9696},[]int{4140,9697},[]int{4405,9698},[]int{9551,9699},[]int{5001,9700},[]int{3056,9701},[]int{8102,9702},[]int{9007,9703},[]int{8450,9704},[]int{9073,9705},[]int{9430,9706},[]int{8916,9707},[]int{8697,9708},[]int{5424,9709},[]int{6252,9710},[]int{98,9711},[]int{2008,9712},[]int{4452,9713},[]int{3658,9714},[]int{3085,9715},[]int{920,9716},[]int{8468,9717},[]int{5905,9718},[]int{7199,9719},[]int{6983,9720},[]int{6551,9721},[]int{7479,9722},[]int{5617,9723},[]int{2796,9724},[]int{6165,9725},[]int{5395,9726},[]int{3526,9727},[]int{2777,9728},[]int{537,9729},[]int{4319,9730},[]int{4146,9731},[]int{145,9732},[]int{8544,9733},[]int{383,9734},[]int{3247,9735},[]int{3980,9736},[]int{9525,9737},[]int{560,9738},[]int{1755,9739},[]int{9112,9740},[]int{6752,9741},[]int{4353,9742},[]int{7136,9743},[]int{6150,9744},[]int{3368,9745},[]int{278,9746},[]int{7128,9747},[]int{1410,9748},[]int{760,9749},[]int{1227,9750},[]int{3328,9751},[]int{3087,9752},[]int{6970,9753},[]int{3110,9754},[]int{4582,9755},[]int{9599,9756},[]int{9453,9757},[]int{3420,9758},[]int{439,9759},[]int{284,9760},[]int{4463,9761},[]int{5108,9762},[]int{1127,9763},[]int{3489,9764},[]int{9403,9765},[]int{4488,9766},[]int{3196,9767},[]int{1903,9768},[]int{3442,9769},[]int{1084,9770},[]int{926,9771},[]int{1592,9772},[]int{2913,9773},[]int{7445,9774},[]int{1753,9775},[]int{2298,9776},[]int{3515,9777},[]int{2037,9778},[]int{3588,9779},[]int{6512,9780},[]int{3086,9781},[]int{2083,9782},[]int{8226,9783},[]int{2107,9784},[]int{642,9785},[]int{9703,9786},[]int{5952,9787},[]int{5484,9788},[]int{8084,9789},[]int{9672,9790},[]int{3092,9791},[]int{4959,9792},[]int{7600,9793},[]int{193,9794},[]int{2084,9795},[]int{231,9796},[]int{7437,9797},[]int{362,9798},[]int{5952,9799},[]int{849,9800},[]int{1405,9801},[]int{3368,9802},[]int{2219,9803},[]int{9359,9804},[]int{8113,9805},[]int{7751,9806},[]int{99,9807},[]int{3224,9808},[]int{1868,9809},[]int{1332,9810},[]int{9682,9811},[]int{1548,9812},[]int{1056,9813},[]int{305,9814},[]int{2740,9815},[]int{8831,9816},[]int{2706,9817},[]int{463,9818},[]int{940,9819},[]int{6515,9820},[]int{9726,9821},[]int{9273,9822},[]int{316,9823},[]int{5622,9824},[]int{9125,9825},[]int{9054,9826},[]int{1055,9827},[]int{2921,9828},[]int{658,9829},[]int{9682,9830},[]int{8552,9831},[]int{1092,9832},[]int{736,9833},[]int{4392,9834},[]int{4056,9835},[]int{6043,9836},[]int{7889,9837},[]int{3503,9838},[]int{8207,9839},[]int{1670,9840},[]int{7698,9841},[]int{2347,9842},[]int{7674,9843},[]int{2833,9844},[]int{2457,9845},[]int{6817,9846},[]int{3351,9847},[]int{5270,9848},[]int{8394,9849},[]int{8163,9850},[]int{2613,9851},[]int{8249,9852},[]int{4155,9853},[]int{1748,9854},[]int{7571,9855},[]int{566,9856},[]int{4790,9857},[]int{1337,9858},[]int{5080,9859},[]int{7214,9860},[]int{3627,9861},[]int{7400,9862},[]int{6361,9863},[]int{2268,9864},[]int{1686,9865},[]int{4904,9866},[]int{7784,9867},[]int{9559,9868},[]int{8843,9869},[]int{8578,9870},[]int{8398,9871},[]int{7990,9872},[]int{408,9873},[]int{82,9874},[]int{6881,9875},[]int{3399,9876},[]int{5627,9877},[]int{365,9878},[]int{7121,9879},[]int{9405,9880},[]int{138,9881},[]int{3481,9882},[]int{5573,9883},[]int{380,9884},[]int{9497,9885},[]int{1762,9886},[]int{7853,9887},[]int{4755,9888},[]int{5273,9889},[]int{9028,9890},[]int{2489,9891},[]int{1578,9892},[]int{5266,9893},[]int{2899,9894},[]int{6711,9895},[]int{2206,9896},[]int{6538,9897},[]int{2765,9898},[]int{2652,9899},[]int{119,9900},[]int{8440,9901},[]int{3098,9902},[]int{6797,9903},[]int{8141,9904},[]int{9738,9905},[]int{6902,9906},[]int{4347,9907},[]int{2270,9908},[]int{1118,9909},[]int{4863,9910},[]int{1050,9911},[]int{1711,9912},[]int{1013,9913},[]int{7108,9914},[]int{3125,9915},[]int{2094,9916},[]int{148,9917},[]int{3807,9918},[]int{864,9919},[]int{5505,9920},[]int{6938,9921},[]int{1445,9922},[]int{6597,9923},[]int{4733,9924},[]int{4185,9925},[]int{3565,9926},[]int{8776,9927},[]int{3350,9928},[]int{2529,9929},[]int{1005,9930},[]int{3181,9931},[]int{9739,9932},[]int{7805,9933},[]int{2779,9934},[]int{1986,9935},[]int{78,9936},[]int{4363,9937},[]int{4069,9938},[]int{6404,9939},[]int{4575,9940},[]int{896,9941},[]int{2606,9942},[]int{4689,9943},[]int{2377,9944},[]int{4747,9945},[]int{9816,9946},[]int{5545,9947},[]int{326,9948},[]int{9216,9949},[]int{6741,9950},[]int{6543,9951},[]int{4723,9952},[]int{786,9953},[]int{9941,9954},[]int{2490,9955},[]int{8552,9956},[]int{7512,9957},[]int{488,9958},[]int{8569,9959},[]int{4168,9960},[]int{3108,9961},[]int{8956,9962},[]int{3524,9963},[]int{2079,9964},[]int{1733,9965},[]int{7840,9966},[]int{9615,9967},[]int{4782,9968},[]int{3712,9969},[]int{1770,9970},[]int{7206,9971},[]int{6404,9972},[]int{4961,9973},[]int{6088,9974},[]int{4645,9975},[]int{1031,9976},[]int{9918,9977},[]int{3154,9978},[]int{438,9979},[]int{2539,9980},[]int{933,9981},[]int{5745,9982},[]int{5771,9983},[]int{1886,9984},[]int{1770,9985},[]int{5986,9986},[]int{2614,9987},[]int{2141,9988},[]int{5517,9989},[]int{9478,9990},[]int{7643,9991},[]int{3919,9992},[]int{473,9993},[]int{1166,9994},[]int{1235,9995},[]int{9444,9996},[]int{2634,9997},[]int{388,9998},[]int{13,9999},[]int{1089,10000},[]int{5564,10001}}, + []int{1,2}, + }, + + { + 5000, + [][]int{[]int{0, 1}, []int{1, 2}, []int{2, 3}, []int{3, 4}, []int{4, 5}, []int{5, 6}, []int{6, 7}, []int{7, 8}, []int{8, 9}, []int{9, 10}, []int{10, 11}, []int{11, 12}, []int{12, 13}, []int{13, 14}, []int{14, 15}, []int{15, 16}, []int{16, 17}, []int{17, 18}, []int{18, 19}, []int{19, 20}, []int{20, 21}, []int{21, 22}, []int{22, 23}, []int{23, 24}, []int{24, 25}, []int{25, 26}, []int{26, 27}, []int{27, 28}, []int{28, 29}, []int{29, 30}, []int{30, 31}, []int{31, 32}, []int{32, 33}, []int{33, 34}, []int{34, 35}, []int{35, 36}, []int{36, 37}, []int{37, 38}, []int{38, 39}, []int{39, 40}, []int{40, 41}, []int{41, 42}, []int{42, 43}, []int{43, 44}, []int{44, 45}, []int{45, 46}, []int{46, 47}, []int{47, 48}, []int{48, 49}, []int{49, 50}, []int{50, 51}, []int{51, 52}, []int{52, 53}, []int{53, 54}, []int{54, 55}, []int{55, 56}, []int{56, 57}, []int{57, 58}, []int{58, 59}, []int{59, 60}, []int{60, 61}, []int{61, 62}, []int{62, 63}, []int{63, 64}, []int{64, 65}, []int{65, 66}, []int{66, 67}, []int{67, 68}, []int{68, 69}, []int{69, 70}, []int{70, 71}, []int{71, 72}, []int{72, 73}, []int{73, 74}, []int{74, 75}, []int{75, 76}, []int{76, 77}, []int{77, 78}, []int{78, 79}, []int{79, 80}, []int{80, 81}, []int{81, 82}, []int{82, 83}, []int{83, 84}, []int{84, 85}, []int{85, 86}, []int{86, 87}, []int{87, 88}, []int{88, 89}, []int{89, 90}, []int{90, 91}, []int{91, 92}, []int{92, 93}, []int{93, 94}, []int{94, 95}, []int{95, 96}, []int{96, 97}, []int{97, 98}, []int{98, 99}, []int{99, 100}, []int{100, 101}, []int{101, 102}, []int{102, 103}, []int{103, 104}, []int{104, 105}, []int{105, 106}, []int{106, 107}, []int{107, 108}, []int{108, 109}, []int{109, 110}, []int{110, 111}, []int{111, 112}, []int{112, 113}, []int{113, 114}, []int{114, 115}, []int{115, 116}, []int{116, 117}, []int{117, 118}, []int{118, 119}, []int{119, 120}, []int{120, 121}, []int{121, 122}, []int{122, 123}, []int{123, 124}, []int{124, 125}, []int{125, 126}, []int{126, 127}, []int{127, 128}, []int{128, 129}, []int{129, 130}, []int{130, 131}, []int{131, 132}, []int{132, 133}, []int{133, 134}, []int{134, 135}, []int{135, 136}, []int{136, 137}, []int{137, 138}, []int{138, 139}, []int{139, 140}, []int{140, 141}, []int{141, 142}, []int{142, 143}, []int{143, 144}, []int{144, 145}, []int{145, 146}, []int{146, 147}, []int{147, 148}, []int{148, 149}, []int{149, 150}, []int{150, 151}, []int{151, 152}, []int{152, 153}, []int{153, 154}, []int{154, 155}, []int{155, 156}, []int{156, 157}, []int{157, 158}, []int{158, 159}, []int{159, 160}, []int{160, 161}, []int{161, 162}, []int{162, 163}, []int{163, 164}, []int{164, 165}, []int{165, 166}, []int{166, 167}, []int{167, 168}, []int{168, 169}, []int{169, 170}, []int{170, 171}, []int{171, 172}, []int{172, 173}, []int{173, 174}, []int{174, 175}, []int{175, 176}, []int{176, 177}, []int{177, 178}, []int{178, 179}, []int{179, 180}, []int{180, 181}, []int{181, 182}, []int{182, 183}, []int{183, 184}, []int{184, 185}, []int{185, 186}, []int{186, 187}, []int{187, 188}, []int{188, 189}, []int{189, 190}, []int{190, 191}, []int{191, 192}, []int{192, 193}, []int{193, 194}, []int{194, 195}, []int{195, 196}, []int{196, 197}, []int{197, 198}, []int{198, 199}, []int{199, 200}, []int{200, 201}, []int{201, 202}, []int{202, 203}, []int{203, 204}, []int{204, 205}, []int{205, 206}, []int{206, 207}, []int{207, 208}, []int{208, 209}, []int{209, 210}, []int{210, 211}, []int{211, 212}, []int{212, 213}, []int{213, 214}, []int{214, 215}, []int{215, 216}, []int{216, 217}, []int{217, 218}, []int{218, 219}, []int{219, 220}, []int{220, 221}, []int{221, 222}, []int{222, 223}, []int{223, 224}, []int{224, 225}, []int{225, 226}, []int{226, 227}, []int{227, 228}, []int{228, 229}, []int{229, 230}, []int{230, 231}, []int{231, 232}, []int{232, 233}, []int{233, 234}, []int{234, 235}, []int{235, 236}, []int{236, 237}, []int{237, 238}, []int{238, 239}, []int{239, 240}, []int{240, 241}, []int{241, 242}, []int{242, 243}, []int{243, 244}, []int{244, 245}, []int{245, 246}, []int{246, 247}, []int{247, 248}, []int{248, 249}, []int{249, 250}, []int{250, 251}, []int{251, 252}, []int{252, 253}, []int{253, 254}, []int{254, 255}, []int{255, 256}, []int{256, 257}, []int{257, 258}, []int{258, 259}, []int{259, 260}, []int{260, 261}, []int{261, 262}, []int{262, 263}, []int{263, 264}, []int{264, 265}, []int{265, 266}, []int{266, 267}, []int{267, 268}, []int{268, 269}, []int{269, 270}, []int{270, 271}, []int{271, 272}, []int{272, 273}, []int{273, 274}, []int{274, 275}, []int{275, 276}, []int{276, 277}, []int{277, 278}, []int{278, 279}, []int{279, 280}, []int{280, 281}, []int{281, 282}, []int{282, 283}, []int{283, 284}, []int{284, 285}, []int{285, 286}, []int{286, 287}, []int{287, 288}, []int{288, 289}, []int{289, 290}, []int{290, 291}, []int{291, 292}, []int{292, 293}, []int{293, 294}, []int{294, 295}, []int{295, 296}, []int{296, 297}, []int{297, 298}, []int{298, 299}, []int{299, 300}, []int{300, 301}, []int{301, 302}, []int{302, 303}, []int{303, 304}, []int{304, 305}, []int{305, 306}, []int{306, 307}, []int{307, 308}, []int{308, 309}, []int{309, 310}, []int{310, 311}, []int{311, 312}, []int{312, 313}, []int{313, 314}, []int{314, 315}, []int{315, 316}, []int{316, 317}, []int{317, 318}, []int{318, 319}, []int{319, 320}, []int{320, 321}, []int{321, 322}, []int{322, 323}, []int{323, 324}, []int{324, 325}, []int{325, 326}, []int{326, 327}, []int{327, 328}, []int{328, 329}, []int{329, 330}, []int{330, 331}, []int{331, 332}, []int{332, 333}, []int{333, 334}, []int{334, 335}, []int{335, 336}, []int{336, 337}, []int{337, 338}, []int{338, 339}, []int{339, 340}, []int{340, 341}, []int{341, 342}, []int{342, 343}, []int{343, 344}, []int{344, 345}, []int{345, 346}, []int{346, 347}, []int{347, 348}, []int{348, 349}, []int{349, 350}, []int{350, 351}, []int{351, 352}, []int{352, 353}, []int{353, 354}, []int{354, 355}, []int{355, 356}, []int{356, 357}, []int{357, 358}, []int{358, 359}, []int{359, 360}, []int{360, 361}, []int{361, 362}, []int{362, 363}, []int{363, 364}, []int{364, 365}, []int{365, 366}, []int{366, 367}, []int{367, 368}, []int{368, 369}, []int{369, 370}, []int{370, 371}, []int{371, 372}, []int{372, 373}, []int{373, 374}, []int{374, 375}, []int{375, 376}, []int{376, 377}, []int{377, 378}, []int{378, 379}, []int{379, 380}, []int{380, 381}, []int{381, 382}, []int{382, 383}, []int{383, 384}, []int{384, 385}, []int{385, 386}, []int{386, 387}, []int{387, 388}, []int{388, 389}, []int{389, 390}, []int{390, 391}, []int{391, 392}, []int{392, 393}, []int{393, 394}, []int{394, 395}, []int{395, 396}, []int{396, 397}, []int{397, 398}, []int{398, 399}, []int{399, 400}, []int{400, 401}, []int{401, 402}, []int{402, 403}, []int{403, 404}, []int{404, 405}, []int{405, 406}, []int{406, 407}, []int{407, 408}, []int{408, 409}, []int{409, 410}, []int{410, 411}, []int{411, 412}, []int{412, 413}, []int{413, 414}, []int{414, 415}, []int{415, 416}, []int{416, 417}, []int{417, 418}, []int{418, 419}, []int{419, 420}, []int{420, 421}, []int{421, 422}, []int{422, 423}, []int{423, 424}, []int{424, 425}, []int{425, 426}, []int{426, 427}, []int{427, 428}, []int{428, 429}, []int{429, 430}, []int{430, 431}, []int{431, 432}, []int{432, 433}, []int{433, 434}, []int{434, 435}, []int{435, 436}, []int{436, 437}, []int{437, 438}, []int{438, 439}, []int{439, 440}, []int{440, 441}, []int{441, 442}, []int{442, 443}, []int{443, 444}, []int{444, 445}, []int{445, 446}, []int{446, 447}, []int{447, 448}, []int{448, 449}, []int{449, 450}, []int{450, 451}, []int{451, 452}, []int{452, 453}, []int{453, 454}, []int{454, 455}, []int{455, 456}, []int{456, 457}, []int{457, 458}, []int{458, 459}, []int{459, 460}, []int{460, 461}, []int{461, 462}, []int{462, 463}, []int{463, 464}, []int{464, 465}, []int{465, 466}, []int{466, 467}, []int{467, 468}, []int{468, 469}, []int{469, 470}, []int{470, 471}, []int{471, 472}, []int{472, 473}, []int{473, 474}, []int{474, 475}, []int{475, 476}, []int{476, 477}, []int{477, 478}, []int{478, 479}, []int{479, 480}, []int{480, 481}, []int{481, 482}, []int{482, 483}, []int{483, 484}, []int{484, 485}, []int{485, 486}, []int{486, 487}, []int{487, 488}, []int{488, 489}, []int{489, 490}, []int{490, 491}, []int{491, 492}, []int{492, 493}, []int{493, 494}, []int{494, 495}, []int{495, 496}, []int{496, 497}, []int{497, 498}, []int{498, 499}, []int{499, 500}, []int{500, 501}, []int{501, 502}, []int{502, 503}, []int{503, 504}, []int{504, 505}, []int{505, 506}, []int{506, 507}, []int{507, 508}, []int{508, 509}, []int{509, 510}, []int{510, 511}, []int{511, 512}, []int{512, 513}, []int{513, 514}, []int{514, 515}, []int{515, 516}, []int{516, 517}, []int{517, 518}, []int{518, 519}, []int{519, 520}, []int{520, 521}, []int{521, 522}, []int{522, 523}, []int{523, 524}, []int{524, 525}, []int{525, 526}, []int{526, 527}, []int{527, 528}, []int{528, 529}, []int{529, 530}, []int{530, 531}, []int{531, 532}, []int{532, 533}, []int{533, 534}, []int{534, 535}, []int{535, 536}, []int{536, 537}, []int{537, 538}, []int{538, 539}, []int{539, 540}, []int{540, 541}, []int{541, 542}, []int{542, 543}, []int{543, 544}, []int{544, 545}, []int{545, 546}, []int{546, 547}, []int{547, 548}, []int{548, 549}, []int{549, 550}, []int{550, 551}, []int{551, 552}, []int{552, 553}, []int{553, 554}, []int{554, 555}, []int{555, 556}, []int{556, 557}, []int{557, 558}, []int{558, 559}, []int{559, 560}, []int{560, 561}, []int{561, 562}, []int{562, 563}, []int{563, 564}, []int{564, 565}, []int{565, 566}, []int{566, 567}, []int{567, 568}, []int{568, 569}, []int{569, 570}, []int{570, 571}, []int{571, 572}, []int{572, 573}, []int{573, 574}, []int{574, 575}, []int{575, 576}, []int{576, 577}, []int{577, 578}, []int{578, 579}, []int{579, 580}, []int{580, 581}, []int{581, 582}, []int{582, 583}, []int{583, 584}, []int{584, 585}, []int{585, 586}, []int{586, 587}, []int{587, 588}, []int{588, 589}, []int{589, 590}, []int{590, 591}, []int{591, 592}, []int{592, 593}, []int{593, 594}, []int{594, 595}, []int{595, 596}, []int{596, 597}, []int{597, 598}, []int{598, 599}, []int{599, 600}, []int{600, 601}, []int{601, 602}, []int{602, 603}, []int{603, 604}, []int{604, 605}, []int{605, 606}, []int{606, 607}, []int{607, 608}, []int{608, 609}, []int{609, 610}, []int{610, 611}, []int{611, 612}, []int{612, 613}, []int{613, 614}, []int{614, 615}, []int{615, 616}, []int{616, 617}, []int{617, 618}, []int{618, 619}, []int{619, 620}, []int{620, 621}, []int{621, 622}, []int{622, 623}, []int{623, 624}, []int{624, 625}, []int{625, 626}, []int{626, 627}, []int{627, 628}, []int{628, 629}, []int{629, 630}, []int{630, 631}, []int{631, 632}, []int{632, 633}, []int{633, 634}, []int{634, 635}, []int{635, 636}, []int{636, 637}, []int{637, 638}, []int{638, 639}, []int{639, 640}, []int{640, 641}, []int{641, 642}, []int{642, 643}, []int{643, 644}, []int{644, 645}, []int{645, 646}, []int{646, 647}, []int{647, 648}, []int{648, 649}, []int{649, 650}, []int{650, 651}, []int{651, 652}, []int{652, 653}, []int{653, 654}, []int{654, 655}, []int{655, 656}, []int{656, 657}, []int{657, 658}, []int{658, 659}, []int{659, 660}, []int{660, 661}, []int{661, 662}, []int{662, 663}, []int{663, 664}, []int{664, 665}, []int{665, 666}, []int{666, 667}, []int{667, 668}, []int{668, 669}, []int{669, 670}, []int{670, 671}, []int{671, 672}, []int{672, 673}, []int{673, 674}, []int{674, 675}, []int{675, 676}, []int{676, 677}, []int{677, 678}, []int{678, 679}, []int{679, 680}, []int{680, 681}, []int{681, 682}, []int{682, 683}, []int{683, 684}, []int{684, 685}, []int{685, 686}, []int{686, 687}, []int{687, 688}, []int{688, 689}, []int{689, 690}, []int{690, 691}, []int{691, 692}, []int{692, 693}, []int{693, 694}, []int{694, 695}, []int{695, 696}, []int{696, 697}, []int{697, 698}, []int{698, 699}, []int{699, 700}, []int{700, 701}, []int{701, 702}, []int{702, 703}, []int{703, 704}, []int{704, 705}, []int{705, 706}, []int{706, 707}, []int{707, 708}, []int{708, 709}, []int{709, 710}, []int{710, 711}, []int{711, 712}, []int{712, 713}, []int{713, 714}, []int{714, 715}, []int{715, 716}, []int{716, 717}, []int{717, 718}, []int{718, 719}, []int{719, 720}, []int{720, 721}, []int{721, 722}, []int{722, 723}, []int{723, 724}, []int{724, 725}, []int{725, 726}, []int{726, 727}, []int{727, 728}, []int{728, 729}, []int{729, 730}, []int{730, 731}, []int{731, 732}, []int{732, 733}, []int{733, 734}, []int{734, 735}, []int{735, 736}, []int{736, 737}, []int{737, 738}, []int{738, 739}, []int{739, 740}, []int{740, 741}, []int{741, 742}, []int{742, 743}, []int{743, 744}, []int{744, 745}, []int{745, 746}, []int{746, 747}, []int{747, 748}, []int{748, 749}, []int{749, 750}, []int{750, 751}, []int{751, 752}, []int{752, 753}, []int{753, 754}, []int{754, 755}, []int{755, 756}, []int{756, 757}, []int{757, 758}, []int{758, 759}, []int{759, 760}, []int{760, 761}, []int{761, 762}, []int{762, 763}, []int{763, 764}, []int{764, 765}, []int{765, 766}, []int{766, 767}, []int{767, 768}, []int{768, 769}, []int{769, 770}, []int{770, 771}, []int{771, 772}, []int{772, 773}, []int{773, 774}, []int{774, 775}, []int{775, 776}, []int{776, 777}, []int{777, 778}, []int{778, 779}, []int{779, 780}, []int{780, 781}, []int{781, 782}, []int{782, 783}, []int{783, 784}, []int{784, 785}, []int{785, 786}, []int{786, 787}, []int{787, 788}, []int{788, 789}, []int{789, 790}, []int{790, 791}, []int{791, 792}, []int{792, 793}, []int{793, 794}, []int{794, 795}, []int{795, 796}, []int{796, 797}, []int{797, 798}, []int{798, 799}, []int{799, 800}, []int{800, 801}, []int{801, 802}, []int{802, 803}, []int{803, 804}, []int{804, 805}, []int{805, 806}, []int{806, 807}, []int{807, 808}, []int{808, 809}, []int{809, 810}, []int{810, 811}, []int{811, 812}, []int{812, 813}, []int{813, 814}, []int{814, 815}, []int{815, 816}, []int{816, 817}, []int{817, 818}, []int{818, 819}, []int{819, 820}, []int{820, 821}, []int{821, 822}, []int{822, 823}, []int{823, 824}, []int{824, 825}, []int{825, 826}, []int{826, 827}, []int{827, 828}, []int{828, 829}, []int{829, 830}, []int{830, 831}, []int{831, 832}, []int{832, 833}, []int{833, 834}, []int{834, 835}, []int{835, 836}, []int{836, 837}, []int{837, 838}, []int{838, 839}, []int{839, 840}, []int{840, 841}, []int{841, 842}, []int{842, 843}, []int{843, 844}, []int{844, 845}, []int{845, 846}, []int{846, 847}, []int{847, 848}, []int{848, 849}, []int{849, 850}, []int{850, 851}, []int{851, 852}, []int{852, 853}, []int{853, 854}, []int{854, 855}, []int{855, 856}, []int{856, 857}, []int{857, 858}, []int{858, 859}, []int{859, 860}, []int{860, 861}, []int{861, 862}, []int{862, 863}, []int{863, 864}, []int{864, 865}, []int{865, 866}, []int{866, 867}, []int{867, 868}, []int{868, 869}, []int{869, 870}, []int{870, 871}, []int{871, 872}, []int{872, 873}, []int{873, 874}, []int{874, 875}, []int{875, 876}, []int{876, 877}, []int{877, 878}, []int{878, 879}, []int{879, 880}, []int{880, 881}, []int{881, 882}, []int{882, 883}, []int{883, 884}, []int{884, 885}, []int{885, 886}, []int{886, 887}, []int{887, 888}, []int{888, 889}, []int{889, 890}, []int{890, 891}, []int{891, 892}, []int{892, 893}, []int{893, 894}, []int{894, 895}, []int{895, 896}, []int{896, 897}, []int{897, 898}, []int{898, 899}, []int{899, 900}, []int{900, 901}, []int{901, 902}, []int{902, 903}, []int{903, 904}, []int{904, 905}, []int{905, 906}, []int{906, 907}, []int{907, 908}, []int{908, 909}, []int{909, 910}, []int{910, 911}, []int{911, 912}, []int{912, 913}, []int{913, 914}, []int{914, 915}, []int{915, 916}, []int{916, 917}, []int{917, 918}, []int{918, 919}, []int{919, 920}, []int{920, 921}, []int{921, 922}, []int{922, 923}, []int{923, 924}, []int{924, 925}, []int{925, 926}, []int{926, 927}, []int{927, 928}, []int{928, 929}, []int{929, 930}, []int{930, 931}, []int{931, 932}, []int{932, 933}, []int{933, 934}, []int{934, 935}, []int{935, 936}, []int{936, 937}, []int{937, 938}, []int{938, 939}, []int{939, 940}, []int{940, 941}, []int{941, 942}, []int{942, 943}, []int{943, 944}, []int{944, 945}, []int{945, 946}, []int{946, 947}, []int{947, 948}, []int{948, 949}, []int{949, 950}, []int{950, 951}, []int{951, 952}, []int{952, 953}, []int{953, 954}, []int{954, 955}, []int{955, 956}, []int{956, 957}, []int{957, 958}, []int{958, 959}, []int{959, 960}, []int{960, 961}, []int{961, 962}, []int{962, 963}, []int{963, 964}, []int{964, 965}, []int{965, 966}, []int{966, 967}, []int{967, 968}, []int{968, 969}, []int{969, 970}, []int{970, 971}, []int{971, 972}, []int{972, 973}, []int{973, 974}, []int{974, 975}, []int{975, 976}, []int{976, 977}, []int{977, 978}, []int{978, 979}, []int{979, 980}, []int{980, 981}, []int{981, 982}, []int{982, 983}, []int{983, 984}, []int{984, 985}, []int{985, 986}, []int{986, 987}, []int{987, 988}, []int{988, 989}, []int{989, 990}, []int{990, 991}, []int{991, 992}, []int{992, 993}, []int{993, 994}, []int{994, 995}, []int{995, 996}, []int{996, 997}, []int{997, 998}, []int{998, 999}, []int{999, 1000}, []int{1000, 1001}, []int{1001, 1002}, []int{1002, 1003}, []int{1003, 1004}, []int{1004, 1005}, []int{1005, 1006}, []int{1006, 1007}, []int{1007, 1008}, []int{1008, 1009}, []int{1009, 1010}, []int{1010, 1011}, []int{1011, 1012}, []int{1012, 1013}, []int{1013, 1014}, []int{1014, 1015}, []int{1015, 1016}, []int{1016, 1017}, []int{1017, 1018}, []int{1018, 1019}, []int{1019, 1020}, []int{1020, 1021}, []int{1021, 1022}, []int{1022, 1023}, []int{1023, 1024}, []int{1024, 1025}, []int{1025, 1026}, []int{1026, 1027}, []int{1027, 1028}, []int{1028, 1029}, []int{1029, 1030}, []int{1030, 1031}, []int{1031, 1032}, []int{1032, 1033}, []int{1033, 1034}, []int{1034, 1035}, []int{1035, 1036}, []int{1036, 1037}, []int{1037, 1038}, []int{1038, 1039}, []int{1039, 1040}, []int{1040, 1041}, []int{1041, 1042}, []int{1042, 1043}, []int{1043, 1044}, []int{1044, 1045}, []int{1045, 1046}, []int{1046, 1047}, []int{1047, 1048}, []int{1048, 1049}, []int{1049, 1050}, []int{1050, 1051}, []int{1051, 1052}, []int{1052, 1053}, []int{1053, 1054}, []int{1054, 1055}, []int{1055, 1056}, []int{1056, 1057}, []int{1057, 1058}, []int{1058, 1059}, []int{1059, 1060}, []int{1060, 1061}, []int{1061, 1062}, []int{1062, 1063}, []int{1063, 1064}, []int{1064, 1065}, []int{1065, 1066}, []int{1066, 1067}, []int{1067, 1068}, []int{1068, 1069}, []int{1069, 1070}, []int{1070, 1071}, []int{1071, 1072}, []int{1072, 1073}, []int{1073, 1074}, []int{1074, 1075}, []int{1075, 1076}, []int{1076, 1077}, []int{1077, 1078}, []int{1078, 1079}, []int{1079, 1080}, []int{1080, 1081}, []int{1081, 1082}, []int{1082, 1083}, []int{1083, 1084}, []int{1084, 1085}, []int{1085, 1086}, []int{1086, 1087}, []int{1087, 1088}, []int{1088, 1089}, []int{1089, 1090}, []int{1090, 1091}, []int{1091, 1092}, []int{1092, 1093}, []int{1093, 1094}, []int{1094, 1095}, []int{1095, 1096}, []int{1096, 1097}, []int{1097, 1098}, []int{1098, 1099}, []int{1099, 1100}, []int{1100, 1101}, []int{1101, 1102}, []int{1102, 1103}, []int{1103, 1104}, []int{1104, 1105}, []int{1105, 1106}, []int{1106, 1107}, []int{1107, 1108}, []int{1108, 1109}, []int{1109, 1110}, []int{1110, 1111}, []int{1111, 1112}, []int{1112, 1113}, []int{1113, 1114}, []int{1114, 1115}, []int{1115, 1116}, []int{1116, 1117}, []int{1117, 1118}, []int{1118, 1119}, []int{1119, 1120}, []int{1120, 1121}, []int{1121, 1122}, []int{1122, 1123}, []int{1123, 1124}, []int{1124, 1125}, []int{1125, 1126}, []int{1126, 1127}, []int{1127, 1128}, []int{1128, 1129}, []int{1129, 1130}, []int{1130, 1131}, []int{1131, 1132}, []int{1132, 1133}, []int{1133, 1134}, []int{1134, 1135}, []int{1135, 1136}, []int{1136, 1137}, []int{1137, 1138}, []int{1138, 1139}, []int{1139, 1140}, []int{1140, 1141}, []int{1141, 1142}, []int{1142, 1143}, []int{1143, 1144}, []int{1144, 1145}, []int{1145, 1146}, []int{1146, 1147}, []int{1147, 1148}, []int{1148, 1149}, []int{1149, 1150}, []int{1150, 1151}, []int{1151, 1152}, []int{1152, 1153}, []int{1153, 1154}, []int{1154, 1155}, []int{1155, 1156}, []int{1156, 1157}, []int{1157, 1158}, []int{1158, 1159}, []int{1159, 1160}, []int{1160, 1161}, []int{1161, 1162}, []int{1162, 1163}, []int{1163, 1164}, []int{1164, 1165}, []int{1165, 1166}, []int{1166, 1167}, []int{1167, 1168}, []int{1168, 1169}, []int{1169, 1170}, []int{1170, 1171}, []int{1171, 1172}, []int{1172, 1173}, []int{1173, 1174}, []int{1174, 1175}, []int{1175, 1176}, []int{1176, 1177}, []int{1177, 1178}, []int{1178, 1179}, []int{1179, 1180}, []int{1180, 1181}, []int{1181, 1182}, []int{1182, 1183}, []int{1183, 1184}, []int{1184, 1185}, []int{1185, 1186}, []int{1186, 1187}, []int{1187, 1188}, []int{1188, 1189}, []int{1189, 1190}, []int{1190, 1191}, []int{1191, 1192}, []int{1192, 1193}, []int{1193, 1194}, []int{1194, 1195}, []int{1195, 1196}, []int{1196, 1197}, []int{1197, 1198}, []int{1198, 1199}, []int{1199, 1200}, []int{1200, 1201}, []int{1201, 1202}, []int{1202, 1203}, []int{1203, 1204}, []int{1204, 1205}, []int{1205, 1206}, []int{1206, 1207}, []int{1207, 1208}, []int{1208, 1209}, []int{1209, 1210}, []int{1210, 1211}, []int{1211, 1212}, []int{1212, 1213}, []int{1213, 1214}, []int{1214, 1215}, []int{1215, 1216}, []int{1216, 1217}, []int{1217, 1218}, []int{1218, 1219}, []int{1219, 1220}, []int{1220, 1221}, []int{1221, 1222}, []int{1222, 1223}, []int{1223, 1224}, []int{1224, 1225}, []int{1225, 1226}, []int{1226, 1227}, []int{1227, 1228}, []int{1228, 1229}, []int{1229, 1230}, []int{1230, 1231}, []int{1231, 1232}, []int{1232, 1233}, []int{1233, 1234}, []int{1234, 1235}, []int{1235, 1236}, []int{1236, 1237}, []int{1237, 1238}, []int{1238, 1239}, []int{1239, 1240}, []int{1240, 1241}, []int{1241, 1242}, []int{1242, 1243}, []int{1243, 1244}, []int{1244, 1245}, []int{1245, 1246}, []int{1246, 1247}, []int{1247, 1248}, []int{1248, 1249}, []int{1249, 1250}, []int{1250, 1251}, []int{1251, 1252}, []int{1252, 1253}, []int{1253, 1254}, []int{1254, 1255}, []int{1255, 1256}, []int{1256, 1257}, []int{1257, 1258}, []int{1258, 1259}, []int{1259, 1260}, []int{1260, 1261}, []int{1261, 1262}, []int{1262, 1263}, []int{1263, 1264}, []int{1264, 1265}, []int{1265, 1266}, []int{1266, 1267}, []int{1267, 1268}, []int{1268, 1269}, []int{1269, 1270}, []int{1270, 1271}, []int{1271, 1272}, []int{1272, 1273}, []int{1273, 1274}, []int{1274, 1275}, []int{1275, 1276}, []int{1276, 1277}, []int{1277, 1278}, []int{1278, 1279}, []int{1279, 1280}, []int{1280, 1281}, []int{1281, 1282}, []int{1282, 1283}, []int{1283, 1284}, []int{1284, 1285}, []int{1285, 1286}, []int{1286, 1287}, []int{1287, 1288}, []int{1288, 1289}, []int{1289, 1290}, []int{1290, 1291}, []int{1291, 1292}, []int{1292, 1293}, []int{1293, 1294}, []int{1294, 1295}, []int{1295, 1296}, []int{1296, 1297}, []int{1297, 1298}, []int{1298, 1299}, []int{1299, 1300}, []int{1300, 1301}, []int{1301, 1302}, []int{1302, 1303}, []int{1303, 1304}, []int{1304, 1305}, []int{1305, 1306}, []int{1306, 1307}, []int{1307, 1308}, []int{1308, 1309}, []int{1309, 1310}, []int{1310, 1311}, []int{1311, 1312}, []int{1312, 1313}, []int{1313, 1314}, []int{1314, 1315}, []int{1315, 1316}, []int{1316, 1317}, []int{1317, 1318}, []int{1318, 1319}, []int{1319, 1320}, []int{1320, 1321}, []int{1321, 1322}, []int{1322, 1323}, []int{1323, 1324}, []int{1324, 1325}, []int{1325, 1326}, []int{1326, 1327}, []int{1327, 1328}, []int{1328, 1329}, []int{1329, 1330}, []int{1330, 1331}, []int{1331, 1332}, []int{1332, 1333}, []int{1333, 1334}, []int{1334, 1335}, []int{1335, 1336}, []int{1336, 1337}, []int{1337, 1338}, []int{1338, 1339}, []int{1339, 1340}, []int{1340, 1341}, []int{1341, 1342}, []int{1342, 1343}, []int{1343, 1344}, []int{1344, 1345}, []int{1345, 1346}, []int{1346, 1347}, []int{1347, 1348}, []int{1348, 1349}, []int{1349, 1350}, []int{1350, 1351}, []int{1351, 1352}, []int{1352, 1353}, []int{1353, 1354}, []int{1354, 1355}, []int{1355, 1356}, []int{1356, 1357}, []int{1357, 1358}, []int{1358, 1359}, []int{1359, 1360}, []int{1360, 1361}, []int{1361, 1362}, []int{1362, 1363}, []int{1363, 1364}, []int{1364, 1365}, []int{1365, 1366}, []int{1366, 1367}, []int{1367, 1368}, []int{1368, 1369}, []int{1369, 1370}, []int{1370, 1371}, []int{1371, 1372}, []int{1372, 1373}, []int{1373, 1374}, []int{1374, 1375}, []int{1375, 1376}, []int{1376, 1377}, []int{1377, 1378}, []int{1378, 1379}, []int{1379, 1380}, []int{1380, 1381}, []int{1381, 1382}, []int{1382, 1383}, []int{1383, 1384}, []int{1384, 1385}, []int{1385, 1386}, []int{1386, 1387}, []int{1387, 1388}, []int{1388, 1389}, []int{1389, 1390}, []int{1390, 1391}, []int{1391, 1392}, []int{1392, 1393}, []int{1393, 1394}, []int{1394, 1395}, []int{1395, 1396}, []int{1396, 1397}, []int{1397, 1398}, []int{1398, 1399}, []int{1399, 1400}, []int{1400, 1401}, []int{1401, 1402}, []int{1402, 1403}, []int{1403, 1404}, []int{1404, 1405}, []int{1405, 1406}, []int{1406, 1407}, []int{1407, 1408}, []int{1408, 1409}, []int{1409, 1410}, []int{1410, 1411}, []int{1411, 1412}, []int{1412, 1413}, []int{1413, 1414}, []int{1414, 1415}, []int{1415, 1416}, []int{1416, 1417}, []int{1417, 1418}, []int{1418, 1419}, []int{1419, 1420}, []int{1420, 1421}, []int{1421, 1422}, []int{1422, 1423}, []int{1423, 1424}, []int{1424, 1425}, []int{1425, 1426}, []int{1426, 1427}, []int{1427, 1428}, []int{1428, 1429}, []int{1429, 1430}, []int{1430, 1431}, []int{1431, 1432}, []int{1432, 1433}, []int{1433, 1434}, []int{1434, 1435}, []int{1435, 1436}, []int{1436, 1437}, []int{1437, 1438}, []int{1438, 1439}, []int{1439, 1440}, []int{1440, 1441}, []int{1441, 1442}, []int{1442, 1443}, []int{1443, 1444}, []int{1444, 1445}, []int{1445, 1446}, []int{1446, 1447}, []int{1447, 1448}, []int{1448, 1449}, []int{1449, 1450}, []int{1450, 1451}, []int{1451, 1452}, []int{1452, 1453}, []int{1453, 1454}, []int{1454, 1455}, []int{1455, 1456}, []int{1456, 1457}, []int{1457, 1458}, []int{1458, 1459}, []int{1459, 1460}, []int{1460, 1461}, []int{1461, 1462}, []int{1462, 1463}, []int{1463, 1464}, []int{1464, 1465}, []int{1465, 1466}, []int{1466, 1467}, []int{1467, 1468}, []int{1468, 1469}, []int{1469, 1470}, []int{1470, 1471}, []int{1471, 1472}, []int{1472, 1473}, []int{1473, 1474}, []int{1474, 1475}, []int{1475, 1476}, []int{1476, 1477}, []int{1477, 1478}, []int{1478, 1479}, []int{1479, 1480}, []int{1480, 1481}, []int{1481, 1482}, []int{1482, 1483}, []int{1483, 1484}, []int{1484, 1485}, []int{1485, 1486}, []int{1486, 1487}, []int{1487, 1488}, []int{1488, 1489}, []int{1489, 1490}, []int{1490, 1491}, []int{1491, 1492}, []int{1492, 1493}, []int{1493, 1494}, []int{1494, 1495}, []int{1495, 1496}, []int{1496, 1497}, []int{1497, 1498}, []int{1498, 1499}, []int{1499, 1500}, []int{1500, 1501}, []int{1501, 1502}, []int{1502, 1503}, []int{1503, 1504}, []int{1504, 1505}, []int{1505, 1506}, []int{1506, 1507}, []int{1507, 1508}, []int{1508, 1509}, []int{1509, 1510}, []int{1510, 1511}, []int{1511, 1512}, []int{1512, 1513}, []int{1513, 1514}, []int{1514, 1515}, []int{1515, 1516}, []int{1516, 1517}, []int{1517, 1518}, []int{1518, 1519}, []int{1519, 1520}, []int{1520, 1521}, []int{1521, 1522}, []int{1522, 1523}, []int{1523, 1524}, []int{1524, 1525}, []int{1525, 1526}, []int{1526, 1527}, []int{1527, 1528}, []int{1528, 1529}, []int{1529, 1530}, []int{1530, 1531}, []int{1531, 1532}, []int{1532, 1533}, []int{1533, 1534}, []int{1534, 1535}, []int{1535, 1536}, []int{1536, 1537}, []int{1537, 1538}, []int{1538, 1539}, []int{1539, 1540}, []int{1540, 1541}, []int{1541, 1542}, []int{1542, 1543}, []int{1543, 1544}, []int{1544, 1545}, []int{1545, 1546}, []int{1546, 1547}, []int{1547, 1548}, []int{1548, 1549}, []int{1549, 1550}, []int{1550, 1551}, []int{1551, 1552}, []int{1552, 1553}, []int{1553, 1554}, []int{1554, 1555}, []int{1555, 1556}, []int{1556, 1557}, []int{1557, 1558}, []int{1558, 1559}, []int{1559, 1560}, []int{1560, 1561}, []int{1561, 1562}, []int{1562, 1563}, []int{1563, 1564}, []int{1564, 1565}, []int{1565, 1566}, []int{1566, 1567}, []int{1567, 1568}, []int{1568, 1569}, []int{1569, 1570}, []int{1570, 1571}, []int{1571, 1572}, []int{1572, 1573}, []int{1573, 1574}, []int{1574, 1575}, []int{1575, 1576}, []int{1576, 1577}, []int{1577, 1578}, []int{1578, 1579}, []int{1579, 1580}, []int{1580, 1581}, []int{1581, 1582}, []int{1582, 1583}, []int{1583, 1584}, []int{1584, 1585}, []int{1585, 1586}, []int{1586, 1587}, []int{1587, 1588}, []int{1588, 1589}, []int{1589, 1590}, []int{1590, 1591}, []int{1591, 1592}, []int{1592, 1593}, []int{1593, 1594}, []int{1594, 1595}, []int{1595, 1596}, []int{1596, 1597}, []int{1597, 1598}, []int{1598, 1599}, []int{1599, 1600}, []int{1600, 1601}, []int{1601, 1602}, []int{1602, 1603}, []int{1603, 1604}, []int{1604, 1605}, []int{1605, 1606}, []int{1606, 1607}, []int{1607, 1608}, []int{1608, 1609}, []int{1609, 1610}, []int{1610, 1611}, []int{1611, 1612}, []int{1612, 1613}, []int{1613, 1614}, []int{1614, 1615}, []int{1615, 1616}, []int{1616, 1617}, []int{1617, 1618}, []int{1618, 1619}, []int{1619, 1620}, []int{1620, 1621}, []int{1621, 1622}, []int{1622, 1623}, []int{1623, 1624}, []int{1624, 1625}, []int{1625, 1626}, []int{1626, 1627}, []int{1627, 1628}, []int{1628, 1629}, []int{1629, 1630}, []int{1630, 1631}, []int{1631, 1632}, []int{1632, 1633}, []int{1633, 1634}, []int{1634, 1635}, []int{1635, 1636}, []int{1636, 1637}, []int{1637, 1638}, []int{1638, 1639}, []int{1639, 1640}, []int{1640, 1641}, []int{1641, 1642}, []int{1642, 1643}, []int{1643, 1644}, []int{1644, 1645}, []int{1645, 1646}, []int{1646, 1647}, []int{1647, 1648}, []int{1648, 1649}, []int{1649, 1650}, []int{1650, 1651}, []int{1651, 1652}, []int{1652, 1653}, []int{1653, 1654}, []int{1654, 1655}, []int{1655, 1656}, []int{1656, 1657}, []int{1657, 1658}, []int{1658, 1659}, []int{1659, 1660}, []int{1660, 1661}, []int{1661, 1662}, []int{1662, 1663}, []int{1663, 1664}, []int{1664, 1665}, []int{1665, 1666}, []int{1666, 1667}, []int{1667, 1668}, []int{1668, 1669}, []int{1669, 1670}, []int{1670, 1671}, []int{1671, 1672}, []int{1672, 1673}, []int{1673, 1674}, []int{1674, 1675}, []int{1675, 1676}, []int{1676, 1677}, []int{1677, 1678}, []int{1678, 1679}, []int{1679, 1680}, []int{1680, 1681}, []int{1681, 1682}, []int{1682, 1683}, []int{1683, 1684}, []int{1684, 1685}, []int{1685, 1686}, []int{1686, 1687}, []int{1687, 1688}, []int{1688, 1689}, []int{1689, 1690}, []int{1690, 1691}, []int{1691, 1692}, []int{1692, 1693}, []int{1693, 1694}, []int{1694, 1695}, []int{1695, 1696}, []int{1696, 1697}, []int{1697, 1698}, []int{1698, 1699}, []int{1699, 1700}, []int{1700, 1701}, []int{1701, 1702}, []int{1702, 1703}, []int{1703, 1704}, []int{1704, 1705}, []int{1705, 1706}, []int{1706, 1707}, []int{1707, 1708}, []int{1708, 1709}, []int{1709, 1710}, []int{1710, 1711}, []int{1711, 1712}, []int{1712, 1713}, []int{1713, 1714}, []int{1714, 1715}, []int{1715, 1716}, []int{1716, 1717}, []int{1717, 1718}, []int{1718, 1719}, []int{1719, 1720}, []int{1720, 1721}, []int{1721, 1722}, []int{1722, 1723}, []int{1723, 1724}, []int{1724, 1725}, []int{1725, 1726}, []int{1726, 1727}, []int{1727, 1728}, []int{1728, 1729}, []int{1729, 1730}, []int{1730, 1731}, []int{1731, 1732}, []int{1732, 1733}, []int{1733, 1734}, []int{1734, 1735}, []int{1735, 1736}, []int{1736, 1737}, []int{1737, 1738}, []int{1738, 1739}, []int{1739, 1740}, []int{1740, 1741}, []int{1741, 1742}, []int{1742, 1743}, []int{1743, 1744}, []int{1744, 1745}, []int{1745, 1746}, []int{1746, 1747}, []int{1747, 1748}, []int{1748, 1749}, []int{1749, 1750}, []int{1750, 1751}, []int{1751, 1752}, []int{1752, 1753}, []int{1753, 1754}, []int{1754, 1755}, []int{1755, 1756}, []int{1756, 1757}, []int{1757, 1758}, []int{1758, 1759}, []int{1759, 1760}, []int{1760, 1761}, []int{1761, 1762}, []int{1762, 1763}, []int{1763, 1764}, []int{1764, 1765}, []int{1765, 1766}, []int{1766, 1767}, []int{1767, 1768}, []int{1768, 1769}, []int{1769, 1770}, []int{1770, 1771}, []int{1771, 1772}, []int{1772, 1773}, []int{1773, 1774}, []int{1774, 1775}, []int{1775, 1776}, []int{1776, 1777}, []int{1777, 1778}, []int{1778, 1779}, []int{1779, 1780}, []int{1780, 1781}, []int{1781, 1782}, []int{1782, 1783}, []int{1783, 1784}, []int{1784, 1785}, []int{1785, 1786}, []int{1786, 1787}, []int{1787, 1788}, []int{1788, 1789}, []int{1789, 1790}, []int{1790, 1791}, []int{1791, 1792}, []int{1792, 1793}, []int{1793, 1794}, []int{1794, 1795}, []int{1795, 1796}, []int{1796, 1797}, []int{1797, 1798}, []int{1798, 1799}, []int{1799, 1800}, []int{1800, 1801}, []int{1801, 1802}, []int{1802, 1803}, []int{1803, 1804}, []int{1804, 1805}, []int{1805, 1806}, []int{1806, 1807}, []int{1807, 1808}, []int{1808, 1809}, []int{1809, 1810}, []int{1810, 1811}, []int{1811, 1812}, []int{1812, 1813}, []int{1813, 1814}, []int{1814, 1815}, []int{1815, 1816}, []int{1816, 1817}, []int{1817, 1818}, []int{1818, 1819}, []int{1819, 1820}, []int{1820, 1821}, []int{1821, 1822}, []int{1822, 1823}, []int{1823, 1824}, []int{1824, 1825}, []int{1825, 1826}, []int{1826, 1827}, []int{1827, 1828}, []int{1828, 1829}, []int{1829, 1830}, []int{1830, 1831}, []int{1831, 1832}, []int{1832, 1833}, []int{1833, 1834}, []int{1834, 1835}, []int{1835, 1836}, []int{1836, 1837}, []int{1837, 1838}, []int{1838, 1839}, []int{1839, 1840}, []int{1840, 1841}, []int{1841, 1842}, []int{1842, 1843}, []int{1843, 1844}, []int{1844, 1845}, []int{1845, 1846}, []int{1846, 1847}, []int{1847, 1848}, []int{1848, 1849}, []int{1849, 1850}, []int{1850, 1851}, []int{1851, 1852}, []int{1852, 1853}, []int{1853, 1854}, []int{1854, 1855}, []int{1855, 1856}, []int{1856, 1857}, []int{1857, 1858}, []int{1858, 1859}, []int{1859, 1860}, []int{1860, 1861}, []int{1861, 1862}, []int{1862, 1863}, []int{1863, 1864}, []int{1864, 1865}, []int{1865, 1866}, []int{1866, 1867}, []int{1867, 1868}, []int{1868, 1869}, []int{1869, 1870}, []int{1870, 1871}, []int{1871, 1872}, []int{1872, 1873}, []int{1873, 1874}, []int{1874, 1875}, []int{1875, 1876}, []int{1876, 1877}, []int{1877, 1878}, []int{1878, 1879}, []int{1879, 1880}, []int{1880, 1881}, []int{1881, 1882}, []int{1882, 1883}, []int{1883, 1884}, []int{1884, 1885}, []int{1885, 1886}, []int{1886, 1887}, []int{1887, 1888}, []int{1888, 1889}, []int{1889, 1890}, []int{1890, 1891}, []int{1891, 1892}, []int{1892, 1893}, []int{1893, 1894}, []int{1894, 1895}, []int{1895, 1896}, []int{1896, 1897}, []int{1897, 1898}, []int{1898, 1899}, []int{1899, 1900}, []int{1900, 1901}, []int{1901, 1902}, []int{1902, 1903}, []int{1903, 1904}, []int{1904, 1905}, []int{1905, 1906}, []int{1906, 1907}, []int{1907, 1908}, []int{1908, 1909}, []int{1909, 1910}, []int{1910, 1911}, []int{1911, 1912}, []int{1912, 1913}, []int{1913, 1914}, []int{1914, 1915}, []int{1915, 1916}, []int{1916, 1917}, []int{1917, 1918}, []int{1918, 1919}, []int{1919, 1920}, []int{1920, 1921}, []int{1921, 1922}, []int{1922, 1923}, []int{1923, 1924}, []int{1924, 1925}, []int{1925, 1926}, []int{1926, 1927}, []int{1927, 1928}, []int{1928, 1929}, []int{1929, 1930}, []int{1930, 1931}, []int{1931, 1932}, []int{1932, 1933}, []int{1933, 1934}, []int{1934, 1935}, []int{1935, 1936}, []int{1936, 1937}, []int{1937, 1938}, []int{1938, 1939}, []int{1939, 1940}, []int{1940, 1941}, []int{1941, 1942}, []int{1942, 1943}, []int{1943, 1944}, []int{1944, 1945}, []int{1945, 1946}, []int{1946, 1947}, []int{1947, 1948}, []int{1948, 1949}, []int{1949, 1950}, []int{1950, 1951}, []int{1951, 1952}, []int{1952, 1953}, []int{1953, 1954}, []int{1954, 1955}, []int{1955, 1956}, []int{1956, 1957}, []int{1957, 1958}, []int{1958, 1959}, []int{1959, 1960}, []int{1960, 1961}, []int{1961, 1962}, []int{1962, 1963}, []int{1963, 1964}, []int{1964, 1965}, []int{1965, 1966}, []int{1966, 1967}, []int{1967, 1968}, []int{1968, 1969}, []int{1969, 1970}, []int{1970, 1971}, []int{1971, 1972}, []int{1972, 1973}, []int{1973, 1974}, []int{1974, 1975}, []int{1975, 1976}, []int{1976, 1977}, []int{1977, 1978}, []int{1978, 1979}, []int{1979, 1980}, []int{1980, 1981}, []int{1981, 1982}, []int{1982, 1983}, []int{1983, 1984}, []int{1984, 1985}, []int{1985, 1986}, []int{1986, 1987}, []int{1987, 1988}, []int{1988, 1989}, []int{1989, 1990}, []int{1990, 1991}, []int{1991, 1992}, []int{1992, 1993}, []int{1993, 1994}, []int{1994, 1995}, []int{1995, 1996}, []int{1996, 1997}, []int{1997, 1998}, []int{1998, 1999}, []int{1999, 2000}, []int{2000, 2001}, []int{2001, 2002}, []int{2002, 2003}, []int{2003, 2004}, []int{2004, 2005}, []int{2005, 2006}, []int{2006, 2007}, []int{2007, 2008}, []int{2008, 2009}, []int{2009, 2010}, []int{2010, 2011}, []int{2011, 2012}, []int{2012, 2013}, []int{2013, 2014}, []int{2014, 2015}, []int{2015, 2016}, []int{2016, 2017}, []int{2017, 2018}, []int{2018, 2019}, []int{2019, 2020}, []int{2020, 2021}, []int{2021, 2022}, []int{2022, 2023}, []int{2023, 2024}, []int{2024, 2025}, []int{2025, 2026}, []int{2026, 2027}, []int{2027, 2028}, []int{2028, 2029}, []int{2029, 2030}, []int{2030, 2031}, []int{2031, 2032}, []int{2032, 2033}, []int{2033, 2034}, []int{2034, 2035}, []int{2035, 2036}, []int{2036, 2037}, []int{2037, 2038}, []int{2038, 2039}, []int{2039, 2040}, []int{2040, 2041}, []int{2041, 2042}, []int{2042, 2043}, []int{2043, 2044}, []int{2044, 2045}, []int{2045, 2046}, []int{2046, 2047}, []int{2047, 2048}, []int{2048, 2049}, []int{2049, 2050}, []int{2050, 2051}, []int{2051, 2052}, []int{2052, 2053}, []int{2053, 2054}, []int{2054, 2055}, []int{2055, 2056}, []int{2056, 2057}, []int{2057, 2058}, []int{2058, 2059}, []int{2059, 2060}, []int{2060, 2061}, []int{2061, 2062}, []int{2062, 2063}, []int{2063, 2064}, []int{2064, 2065}, []int{2065, 2066}, []int{2066, 2067}, []int{2067, 2068}, []int{2068, 2069}, []int{2069, 2070}, []int{2070, 2071}, []int{2071, 2072}, []int{2072, 2073}, []int{2073, 2074}, []int{2074, 2075}, []int{2075, 2076}, []int{2076, 2077}, []int{2077, 2078}, []int{2078, 2079}, []int{2079, 2080}, []int{2080, 2081}, []int{2081, 2082}, []int{2082, 2083}, []int{2083, 2084}, []int{2084, 2085}, []int{2085, 2086}, []int{2086, 2087}, []int{2087, 2088}, []int{2088, 2089}, []int{2089, 2090}, []int{2090, 2091}, []int{2091, 2092}, []int{2092, 2093}, []int{2093, 2094}, []int{2094, 2095}, []int{2095, 2096}, []int{2096, 2097}, []int{2097, 2098}, []int{2098, 2099}, []int{2099, 2100}, []int{2100, 2101}, []int{2101, 2102}, []int{2102, 2103}, []int{2103, 2104}, []int{2104, 2105}, []int{2105, 2106}, []int{2106, 2107}, []int{2107, 2108}, []int{2108, 2109}, []int{2109, 2110}, []int{2110, 2111}, []int{2111, 2112}, []int{2112, 2113}, []int{2113, 2114}, []int{2114, 2115}, []int{2115, 2116}, []int{2116, 2117}, []int{2117, 2118}, []int{2118, 2119}, []int{2119, 2120}, []int{2120, 2121}, []int{2121, 2122}, []int{2122, 2123}, []int{2123, 2124}, []int{2124, 2125}, []int{2125, 2126}, []int{2126, 2127}, []int{2127, 2128}, []int{2128, 2129}, []int{2129, 2130}, []int{2130, 2131}, []int{2131, 2132}, []int{2132, 2133}, []int{2133, 2134}, []int{2134, 2135}, []int{2135, 2136}, []int{2136, 2137}, []int{2137, 2138}, []int{2138, 2139}, []int{2139, 2140}, []int{2140, 2141}, []int{2141, 2142}, []int{2142, 2143}, []int{2143, 2144}, []int{2144, 2145}, []int{2145, 2146}, []int{2146, 2147}, []int{2147, 2148}, []int{2148, 2149}, []int{2149, 2150}, []int{2150, 2151}, []int{2151, 2152}, []int{2152, 2153}, []int{2153, 2154}, []int{2154, 2155}, []int{2155, 2156}, []int{2156, 2157}, []int{2157, 2158}, []int{2158, 2159}, []int{2159, 2160}, []int{2160, 2161}, []int{2161, 2162}, []int{2162, 2163}, []int{2163, 2164}, []int{2164, 2165}, []int{2165, 2166}, []int{2166, 2167}, []int{2167, 2168}, []int{2168, 2169}, []int{2169, 2170}, []int{2170, 2171}, []int{2171, 2172}, []int{2172, 2173}, []int{2173, 2174}, []int{2174, 2175}, []int{2175, 2176}, []int{2176, 2177}, []int{2177, 2178}, []int{2178, 2179}, []int{2179, 2180}, []int{2180, 2181}, []int{2181, 2182}, []int{2182, 2183}, []int{2183, 2184}, []int{2184, 2185}, []int{2185, 2186}, []int{2186, 2187}, []int{2187, 2188}, []int{2188, 2189}, []int{2189, 2190}, []int{2190, 2191}, []int{2191, 2192}, []int{2192, 2193}, []int{2193, 2194}, []int{2194, 2195}, []int{2195, 2196}, []int{2196, 2197}, []int{2197, 2198}, []int{2198, 2199}, []int{2199, 2200}, []int{2200, 2201}, []int{2201, 2202}, []int{2202, 2203}, []int{2203, 2204}, []int{2204, 2205}, []int{2205, 2206}, []int{2206, 2207}, []int{2207, 2208}, []int{2208, 2209}, []int{2209, 2210}, []int{2210, 2211}, []int{2211, 2212}, []int{2212, 2213}, []int{2213, 2214}, []int{2214, 2215}, []int{2215, 2216}, []int{2216, 2217}, []int{2217, 2218}, []int{2218, 2219}, []int{2219, 2220}, []int{2220, 2221}, []int{2221, 2222}, []int{2222, 2223}, []int{2223, 2224}, []int{2224, 2225}, []int{2225, 2226}, []int{2226, 2227}, []int{2227, 2228}, []int{2228, 2229}, []int{2229, 2230}, []int{2230, 2231}, []int{2231, 2232}, []int{2232, 2233}, []int{2233, 2234}, []int{2234, 2235}, []int{2235, 2236}, []int{2236, 2237}, []int{2237, 2238}, []int{2238, 2239}, []int{2239, 2240}, []int{2240, 2241}, []int{2241, 2242}, []int{2242, 2243}, []int{2243, 2244}, []int{2244, 2245}, []int{2245, 2246}, []int{2246, 2247}, []int{2247, 2248}, []int{2248, 2249}, []int{2249, 2250}, []int{2250, 2251}, []int{2251, 2252}, []int{2252, 2253}, []int{2253, 2254}, []int{2254, 2255}, []int{2255, 2256}, []int{2256, 2257}, []int{2257, 2258}, []int{2258, 2259}, []int{2259, 2260}, []int{2260, 2261}, []int{2261, 2262}, []int{2262, 2263}, []int{2263, 2264}, []int{2264, 2265}, []int{2265, 2266}, []int{2266, 2267}, []int{2267, 2268}, []int{2268, 2269}, []int{2269, 2270}, []int{2270, 2271}, []int{2271, 2272}, []int{2272, 2273}, []int{2273, 2274}, []int{2274, 2275}, []int{2275, 2276}, []int{2276, 2277}, []int{2277, 2278}, []int{2278, 2279}, []int{2279, 2280}, []int{2280, 2281}, []int{2281, 2282}, []int{2282, 2283}, []int{2283, 2284}, []int{2284, 2285}, []int{2285, 2286}, []int{2286, 2287}, []int{2287, 2288}, []int{2288, 2289}, []int{2289, 2290}, []int{2290, 2291}, []int{2291, 2292}, []int{2292, 2293}, []int{2293, 2294}, []int{2294, 2295}, []int{2295, 2296}, []int{2296, 2297}, []int{2297, 2298}, []int{2298, 2299}, []int{2299, 2300}, []int{2300, 2301}, []int{2301, 2302}, []int{2302, 2303}, []int{2303, 2304}, []int{2304, 2305}, []int{2305, 2306}, []int{2306, 2307}, []int{2307, 2308}, []int{2308, 2309}, []int{2309, 2310}, []int{2310, 2311}, []int{2311, 2312}, []int{2312, 2313}, []int{2313, 2314}, []int{2314, 2315}, []int{2315, 2316}, []int{2316, 2317}, []int{2317, 2318}, []int{2318, 2319}, []int{2319, 2320}, []int{2320, 2321}, []int{2321, 2322}, []int{2322, 2323}, []int{2323, 2324}, []int{2324, 2325}, []int{2325, 2326}, []int{2326, 2327}, []int{2327, 2328}, []int{2328, 2329}, []int{2329, 2330}, []int{2330, 2331}, []int{2331, 2332}, []int{2332, 2333}, []int{2333, 2334}, []int{2334, 2335}, []int{2335, 2336}, []int{2336, 2337}, []int{2337, 2338}, []int{2338, 2339}, []int{2339, 2340}, []int{2340, 2341}, []int{2341, 2342}, []int{2342, 2343}, []int{2343, 2344}, []int{2344, 2345}, []int{2345, 2346}, []int{2346, 2347}, []int{2347, 2348}, []int{2348, 2349}, []int{2349, 2350}, []int{2350, 2351}, []int{2351, 2352}, []int{2352, 2353}, []int{2353, 2354}, []int{2354, 2355}, []int{2355, 2356}, []int{2356, 2357}, []int{2357, 2358}, []int{2358, 2359}, []int{2359, 2360}, []int{2360, 2361}, []int{2361, 2362}, []int{2362, 2363}, []int{2363, 2364}, []int{2364, 2365}, []int{2365, 2366}, []int{2366, 2367}, []int{2367, 2368}, []int{2368, 2369}, []int{2369, 2370}, []int{2370, 2371}, []int{2371, 2372}, []int{2372, 2373}, []int{2373, 2374}, []int{2374, 2375}, []int{2375, 2376}, []int{2376, 2377}, []int{2377, 2378}, []int{2378, 2379}, []int{2379, 2380}, []int{2380, 2381}, []int{2381, 2382}, []int{2382, 2383}, []int{2383, 2384}, []int{2384, 2385}, []int{2385, 2386}, []int{2386, 2387}, []int{2387, 2388}, []int{2388, 2389}, []int{2389, 2390}, []int{2390, 2391}, []int{2391, 2392}, []int{2392, 2393}, []int{2393, 2394}, []int{2394, 2395}, []int{2395, 2396}, []int{2396, 2397}, []int{2397, 2398}, []int{2398, 2399}, []int{2399, 2400}, []int{2400, 2401}, []int{2401, 2402}, []int{2402, 2403}, []int{2403, 2404}, []int{2404, 2405}, []int{2405, 2406}, []int{2406, 2407}, []int{2407, 2408}, []int{2408, 2409}, []int{2409, 2410}, []int{2410, 2411}, []int{2411, 2412}, []int{2412, 2413}, []int{2413, 2414}, []int{2414, 2415}, []int{2415, 2416}, []int{2416, 2417}, []int{2417, 2418}, []int{2418, 2419}, []int{2419, 2420}, []int{2420, 2421}, []int{2421, 2422}, []int{2422, 2423}, []int{2423, 2424}, []int{2424, 2425}, []int{2425, 2426}, []int{2426, 2427}, []int{2427, 2428}, []int{2428, 2429}, []int{2429, 2430}, []int{2430, 2431}, []int{2431, 2432}, []int{2432, 2433}, []int{2433, 2434}, []int{2434, 2435}, []int{2435, 2436}, []int{2436, 2437}, []int{2437, 2438}, []int{2438, 2439}, []int{2439, 2440}, []int{2440, 2441}, []int{2441, 2442}, []int{2442, 2443}, []int{2443, 2444}, []int{2444, 2445}, []int{2445, 2446}, []int{2446, 2447}, []int{2447, 2448}, []int{2448, 2449}, []int{2449, 2450}, []int{2450, 2451}, []int{2451, 2452}, []int{2452, 2453}, []int{2453, 2454}, []int{2454, 2455}, []int{2455, 2456}, []int{2456, 2457}, []int{2457, 2458}, []int{2458, 2459}, []int{2459, 2460}, []int{2460, 2461}, []int{2461, 2462}, []int{2462, 2463}, []int{2463, 2464}, []int{2464, 2465}, []int{2465, 2466}, []int{2466, 2467}, []int{2467, 2468}, []int{2468, 2469}, []int{2469, 2470}, []int{2470, 2471}, []int{2471, 2472}, []int{2472, 2473}, []int{2473, 2474}, []int{2474, 2475}, []int{2475, 2476}, []int{2476, 2477}, []int{2477, 2478}, []int{2478, 2479}, []int{2479, 2480}, []int{2480, 2481}, []int{2481, 2482}, []int{2482, 2483}, []int{2483, 2484}, []int{2484, 2485}, []int{2485, 2486}, []int{2486, 2487}, []int{2487, 2488}, []int{2488, 2489}, []int{2489, 2490}, []int{2490, 2491}, []int{2491, 2492}, []int{2492, 2493}, []int{2493, 2494}, []int{2494, 2495}, []int{2495, 2496}, []int{2496, 2497}, []int{2497, 2498}, []int{2498, 2499}, []int{2499, 2500}, []int{2500, 2501}, []int{2501, 2502}, []int{2502, 2503}, []int{2503, 2504}, []int{2504, 2505}, []int{2505, 2506}, []int{2506, 2507}, []int{2507, 2508}, []int{2508, 2509}, []int{2509, 2510}, []int{2510, 2511}, []int{2511, 2512}, []int{2512, 2513}, []int{2513, 2514}, []int{2514, 2515}, []int{2515, 2516}, []int{2516, 2517}, []int{2517, 2518}, []int{2518, 2519}, []int{2519, 2520}, []int{2520, 2521}, []int{2521, 2522}, []int{2522, 2523}, []int{2523, 2524}, []int{2524, 2525}, []int{2525, 2526}, []int{2526, 2527}, []int{2527, 2528}, []int{2528, 2529}, []int{2529, 2530}, []int{2530, 2531}, []int{2531, 2532}, []int{2532, 2533}, []int{2533, 2534}, []int{2534, 2535}, []int{2535, 2536}, []int{2536, 2537}, []int{2537, 2538}, []int{2538, 2539}, []int{2539, 2540}, []int{2540, 2541}, []int{2541, 2542}, []int{2542, 2543}, []int{2543, 2544}, []int{2544, 2545}, []int{2545, 2546}, []int{2546, 2547}, []int{2547, 2548}, []int{2548, 2549}, []int{2549, 2550}, []int{2550, 2551}, []int{2551, 2552}, []int{2552, 2553}, []int{2553, 2554}, []int{2554, 2555}, []int{2555, 2556}, []int{2556, 2557}, []int{2557, 2558}, []int{2558, 2559}, []int{2559, 2560}, []int{2560, 2561}, []int{2561, 2562}, []int{2562, 2563}, []int{2563, 2564}, []int{2564, 2565}, []int{2565, 2566}, []int{2566, 2567}, []int{2567, 2568}, []int{2568, 2569}, []int{2569, 2570}, []int{2570, 2571}, []int{2571, 2572}, []int{2572, 2573}, []int{2573, 2574}, []int{2574, 2575}, []int{2575, 2576}, []int{2576, 2577}, []int{2577, 2578}, []int{2578, 2579}, []int{2579, 2580}, []int{2580, 2581}, []int{2581, 2582}, []int{2582, 2583}, []int{2583, 2584}, []int{2584, 2585}, []int{2585, 2586}, []int{2586, 2587}, []int{2587, 2588}, []int{2588, 2589}, []int{2589, 2590}, []int{2590, 2591}, []int{2591, 2592}, []int{2592, 2593}, []int{2593, 2594}, []int{2594, 2595}, []int{2595, 2596}, []int{2596, 2597}, []int{2597, 2598}, []int{2598, 2599}, []int{2599, 2600}, []int{2600, 2601}, []int{2601, 2602}, []int{2602, 2603}, []int{2603, 2604}, []int{2604, 2605}, []int{2605, 2606}, []int{2606, 2607}, []int{2607, 2608}, []int{2608, 2609}, []int{2609, 2610}, []int{2610, 2611}, []int{2611, 2612}, []int{2612, 2613}, []int{2613, 2614}, []int{2614, 2615}, []int{2615, 2616}, []int{2616, 2617}, []int{2617, 2618}, []int{2618, 2619}, []int{2619, 2620}, []int{2620, 2621}, []int{2621, 2622}, []int{2622, 2623}, []int{2623, 2624}, []int{2624, 2625}, []int{2625, 2626}, []int{2626, 2627}, []int{2627, 2628}, []int{2628, 2629}, []int{2629, 2630}, []int{2630, 2631}, []int{2631, 2632}, []int{2632, 2633}, []int{2633, 2634}, []int{2634, 2635}, []int{2635, 2636}, []int{2636, 2637}, []int{2637, 2638}, []int{2638, 2639}, []int{2639, 2640}, []int{2640, 2641}, []int{2641, 2642}, []int{2642, 2643}, []int{2643, 2644}, []int{2644, 2645}, []int{2645, 2646}, []int{2646, 2647}, []int{2647, 2648}, []int{2648, 2649}, []int{2649, 2650}, []int{2650, 2651}, []int{2651, 2652}, []int{2652, 2653}, []int{2653, 2654}, []int{2654, 2655}, []int{2655, 2656}, []int{2656, 2657}, []int{2657, 2658}, []int{2658, 2659}, []int{2659, 2660}, []int{2660, 2661}, []int{2661, 2662}, []int{2662, 2663}, []int{2663, 2664}, []int{2664, 2665}, []int{2665, 2666}, []int{2666, 2667}, []int{2667, 2668}, []int{2668, 2669}, []int{2669, 2670}, []int{2670, 2671}, []int{2671, 2672}, []int{2672, 2673}, []int{2673, 2674}, []int{2674, 2675}, []int{2675, 2676}, []int{2676, 2677}, []int{2677, 2678}, []int{2678, 2679}, []int{2679, 2680}, []int{2680, 2681}, []int{2681, 2682}, []int{2682, 2683}, []int{2683, 2684}, []int{2684, 2685}, []int{2685, 2686}, []int{2686, 2687}, []int{2687, 2688}, []int{2688, 2689}, []int{2689, 2690}, []int{2690, 2691}, []int{2691, 2692}, []int{2692, 2693}, []int{2693, 2694}, []int{2694, 2695}, []int{2695, 2696}, []int{2696, 2697}, []int{2697, 2698}, []int{2698, 2699}, []int{2699, 2700}, []int{2700, 2701}, []int{2701, 2702}, []int{2702, 2703}, []int{2703, 2704}, []int{2704, 2705}, []int{2705, 2706}, []int{2706, 2707}, []int{2707, 2708}, []int{2708, 2709}, []int{2709, 2710}, []int{2710, 2711}, []int{2711, 2712}, []int{2712, 2713}, []int{2713, 2714}, []int{2714, 2715}, []int{2715, 2716}, []int{2716, 2717}, []int{2717, 2718}, []int{2718, 2719}, []int{2719, 2720}, []int{2720, 2721}, []int{2721, 2722}, []int{2722, 2723}, []int{2723, 2724}, []int{2724, 2725}, []int{2725, 2726}, []int{2726, 2727}, []int{2727, 2728}, []int{2728, 2729}, []int{2729, 2730}, []int{2730, 2731}, []int{2731, 2732}, []int{2732, 2733}, []int{2733, 2734}, []int{2734, 2735}, []int{2735, 2736}, []int{2736, 2737}, []int{2737, 2738}, []int{2738, 2739}, []int{2739, 2740}, []int{2740, 2741}, []int{2741, 2742}, []int{2742, 2743}, []int{2743, 2744}, []int{2744, 2745}, []int{2745, 2746}, []int{2746, 2747}, []int{2747, 2748}, []int{2748, 2749}, []int{2749, 2750}, []int{2750, 2751}, []int{2751, 2752}, []int{2752, 2753}, []int{2753, 2754}, []int{2754, 2755}, []int{2755, 2756}, []int{2756, 2757}, []int{2757, 2758}, []int{2758, 2759}, []int{2759, 2760}, []int{2760, 2761}, []int{2761, 2762}, []int{2762, 2763}, []int{2763, 2764}, []int{2764, 2765}, []int{2765, 2766}, []int{2766, 2767}, []int{2767, 2768}, []int{2768, 2769}, []int{2769, 2770}, []int{2770, 2771}, []int{2771, 2772}, []int{2772, 2773}, []int{2773, 2774}, []int{2774, 2775}, []int{2775, 2776}, []int{2776, 2777}, []int{2777, 2778}, []int{2778, 2779}, []int{2779, 2780}, []int{2780, 2781}, []int{2781, 2782}, []int{2782, 2783}, []int{2783, 2784}, []int{2784, 2785}, []int{2785, 2786}, []int{2786, 2787}, []int{2787, 2788}, []int{2788, 2789}, []int{2789, 2790}, []int{2790, 2791}, []int{2791, 2792}, []int{2792, 2793}, []int{2793, 2794}, []int{2794, 2795}, []int{2795, 2796}, []int{2796, 2797}, []int{2797, 2798}, []int{2798, 2799}, []int{2799, 2800}, []int{2800, 2801}, []int{2801, 2802}, []int{2802, 2803}, []int{2803, 2804}, []int{2804, 2805}, []int{2805, 2806}, []int{2806, 2807}, []int{2807, 2808}, []int{2808, 2809}, []int{2809, 2810}, []int{2810, 2811}, []int{2811, 2812}, []int{2812, 2813}, []int{2813, 2814}, []int{2814, 2815}, []int{2815, 2816}, []int{2816, 2817}, []int{2817, 2818}, []int{2818, 2819}, []int{2819, 2820}, []int{2820, 2821}, []int{2821, 2822}, []int{2822, 2823}, []int{2823, 2824}, []int{2824, 2825}, []int{2825, 2826}, []int{2826, 2827}, []int{2827, 2828}, []int{2828, 2829}, []int{2829, 2830}, []int{2830, 2831}, []int{2831, 2832}, []int{2832, 2833}, []int{2833, 2834}, []int{2834, 2835}, []int{2835, 2836}, []int{2836, 2837}, []int{2837, 2838}, []int{2838, 2839}, []int{2839, 2840}, []int{2840, 2841}, []int{2841, 2842}, []int{2842, 2843}, []int{2843, 2844}, []int{2844, 2845}, []int{2845, 2846}, []int{2846, 2847}, []int{2847, 2848}, []int{2848, 2849}, []int{2849, 2850}, []int{2850, 2851}, []int{2851, 2852}, []int{2852, 2853}, []int{2853, 2854}, []int{2854, 2855}, []int{2855, 2856}, []int{2856, 2857}, []int{2857, 2858}, []int{2858, 2859}, []int{2859, 2860}, []int{2860, 2861}, []int{2861, 2862}, []int{2862, 2863}, []int{2863, 2864}, []int{2864, 2865}, []int{2865, 2866}, []int{2866, 2867}, []int{2867, 2868}, []int{2868, 2869}, []int{2869, 2870}, []int{2870, 2871}, []int{2871, 2872}, []int{2872, 2873}, []int{2873, 2874}, []int{2874, 2875}, []int{2875, 2876}, []int{2876, 2877}, []int{2877, 2878}, []int{2878, 2879}, []int{2879, 2880}, []int{2880, 2881}, []int{2881, 2882}, []int{2882, 2883}, []int{2883, 2884}, []int{2884, 2885}, []int{2885, 2886}, []int{2886, 2887}, []int{2887, 2888}, []int{2888, 2889}, []int{2889, 2890}, []int{2890, 2891}, []int{2891, 2892}, []int{2892, 2893}, []int{2893, 2894}, []int{2894, 2895}, []int{2895, 2896}, []int{2896, 2897}, []int{2897, 2898}, []int{2898, 2899}, []int{2899, 2900}, []int{2900, 2901}, []int{2901, 2902}, []int{2902, 2903}, []int{2903, 2904}, []int{2904, 2905}, []int{2905, 2906}, []int{2906, 2907}, []int{2907, 2908}, []int{2908, 2909}, []int{2909, 2910}, []int{2910, 2911}, []int{2911, 2912}, []int{2912, 2913}, []int{2913, 2914}, []int{2914, 2915}, []int{2915, 2916}, []int{2916, 2917}, []int{2917, 2918}, []int{2918, 2919}, []int{2919, 2920}, []int{2920, 2921}, []int{2921, 2922}, []int{2922, 2923}, []int{2923, 2924}, []int{2924, 2925}, []int{2925, 2926}, []int{2926, 2927}, []int{2927, 2928}, []int{2928, 2929}, []int{2929, 2930}, []int{2930, 2931}, []int{2931, 2932}, []int{2932, 2933}, []int{2933, 2934}, []int{2934, 2935}, []int{2935, 2936}, []int{2936, 2937}, []int{2937, 2938}, []int{2938, 2939}, []int{2939, 2940}, []int{2940, 2941}, []int{2941, 2942}, []int{2942, 2943}, []int{2943, 2944}, []int{2944, 2945}, []int{2945, 2946}, []int{2946, 2947}, []int{2947, 2948}, []int{2948, 2949}, []int{2949, 2950}, []int{2950, 2951}, []int{2951, 2952}, []int{2952, 2953}, []int{2953, 2954}, []int{2954, 2955}, []int{2955, 2956}, []int{2956, 2957}, []int{2957, 2958}, []int{2958, 2959}, []int{2959, 2960}, []int{2960, 2961}, []int{2961, 2962}, []int{2962, 2963}, []int{2963, 2964}, []int{2964, 2965}, []int{2965, 2966}, []int{2966, 2967}, []int{2967, 2968}, []int{2968, 2969}, []int{2969, 2970}, []int{2970, 2971}, []int{2971, 2972}, []int{2972, 2973}, []int{2973, 2974}, []int{2974, 2975}, []int{2975, 2976}, []int{2976, 2977}, []int{2977, 2978}, []int{2978, 2979}, []int{2979, 2980}, []int{2980, 2981}, []int{2981, 2982}, []int{2982, 2983}, []int{2983, 2984}, []int{2984, 2985}, []int{2985, 2986}, []int{2986, 2987}, []int{2987, 2988}, []int{2988, 2989}, []int{2989, 2990}, []int{2990, 2991}, []int{2991, 2992}, []int{2992, 2993}, []int{2993, 2994}, []int{2994, 2995}, []int{2995, 2996}, []int{2996, 2997}, []int{2997, 2998}, []int{2998, 2999}, []int{2999, 3000}, []int{3000, 3001}, []int{3001, 3002}, []int{3002, 3003}, []int{3003, 3004}, []int{3004, 3005}, []int{3005, 3006}, []int{3006, 3007}, []int{3007, 3008}, []int{3008, 3009}, []int{3009, 3010}, []int{3010, 3011}, []int{3011, 3012}, []int{3012, 3013}, []int{3013, 3014}, []int{3014, 3015}, []int{3015, 3016}, []int{3016, 3017}, []int{3017, 3018}, []int{3018, 3019}, []int{3019, 3020}, []int{3020, 3021}, []int{3021, 3022}, []int{3022, 3023}, []int{3023, 3024}, []int{3024, 3025}, []int{3025, 3026}, []int{3026, 3027}, []int{3027, 3028}, []int{3028, 3029}, []int{3029, 3030}, []int{3030, 3031}, []int{3031, 3032}, []int{3032, 3033}, []int{3033, 3034}, []int{3034, 3035}, []int{3035, 3036}, []int{3036, 3037}, []int{3037, 3038}, []int{3038, 3039}, []int{3039, 3040}, []int{3040, 3041}, []int{3041, 3042}, []int{3042, 3043}, []int{3043, 3044}, []int{3044, 3045}, []int{3045, 3046}, []int{3046, 3047}, []int{3047, 3048}, []int{3048, 3049}, []int{3049, 3050}, []int{3050, 3051}, []int{3051, 3052}, []int{3052, 3053}, []int{3053, 3054}, []int{3054, 3055}, []int{3055, 3056}, []int{3056, 3057}, []int{3057, 3058}, []int{3058, 3059}, []int{3059, 3060}, []int{3060, 3061}, []int{3061, 3062}, []int{3062, 3063}, []int{3063, 3064}, []int{3064, 3065}, []int{3065, 3066}, []int{3066, 3067}, []int{3067, 3068}, []int{3068, 3069}, []int{3069, 3070}, []int{3070, 3071}, []int{3071, 3072}, []int{3072, 3073}, []int{3073, 3074}, []int{3074, 3075}, []int{3075, 3076}, []int{3076, 3077}, []int{3077, 3078}, []int{3078, 3079}, []int{3079, 3080}, []int{3080, 3081}, []int{3081, 3082}, []int{3082, 3083}, []int{3083, 3084}, []int{3084, 3085}, []int{3085, 3086}, []int{3086, 3087}, []int{3087, 3088}, []int{3088, 3089}, []int{3089, 3090}, []int{3090, 3091}, []int{3091, 3092}, []int{3092, 3093}, []int{3093, 3094}, []int{3094, 3095}, []int{3095, 3096}, []int{3096, 3097}, []int{3097, 3098}, []int{3098, 3099}, []int{3099, 3100}, []int{3100, 3101}, []int{3101, 3102}, []int{3102, 3103}, []int{3103, 3104}, []int{3104, 3105}, []int{3105, 3106}, []int{3106, 3107}, []int{3107, 3108}, []int{3108, 3109}, []int{3109, 3110}, []int{3110, 3111}, []int{3111, 3112}, []int{3112, 3113}, []int{3113, 3114}, []int{3114, 3115}, []int{3115, 3116}, []int{3116, 3117}, []int{3117, 3118}, []int{3118, 3119}, []int{3119, 3120}, []int{3120, 3121}, []int{3121, 3122}, []int{3122, 3123}, []int{3123, 3124}, []int{3124, 3125}, []int{3125, 3126}, []int{3126, 3127}, []int{3127, 3128}, []int{3128, 3129}, []int{3129, 3130}, []int{3130, 3131}, []int{3131, 3132}, []int{3132, 3133}, []int{3133, 3134}, []int{3134, 3135}, []int{3135, 3136}, []int{3136, 3137}, []int{3137, 3138}, []int{3138, 3139}, []int{3139, 3140}, []int{3140, 3141}, []int{3141, 3142}, []int{3142, 3143}, []int{3143, 3144}, []int{3144, 3145}, []int{3145, 3146}, []int{3146, 3147}, []int{3147, 3148}, []int{3148, 3149}, []int{3149, 3150}, []int{3150, 3151}, []int{3151, 3152}, []int{3152, 3153}, []int{3153, 3154}, []int{3154, 3155}, []int{3155, 3156}, []int{3156, 3157}, []int{3157, 3158}, []int{3158, 3159}, []int{3159, 3160}, []int{3160, 3161}, []int{3161, 3162}, []int{3162, 3163}, []int{3163, 3164}, []int{3164, 3165}, []int{3165, 3166}, []int{3166, 3167}, []int{3167, 3168}, []int{3168, 3169}, []int{3169, 3170}, []int{3170, 3171}, []int{3171, 3172}, []int{3172, 3173}, []int{3173, 3174}, []int{3174, 3175}, []int{3175, 3176}, []int{3176, 3177}, []int{3177, 3178}, []int{3178, 3179}, []int{3179, 3180}, []int{3180, 3181}, []int{3181, 3182}, []int{3182, 3183}, []int{3183, 3184}, []int{3184, 3185}, []int{3185, 3186}, []int{3186, 3187}, []int{3187, 3188}, []int{3188, 3189}, []int{3189, 3190}, []int{3190, 3191}, []int{3191, 3192}, []int{3192, 3193}, []int{3193, 3194}, []int{3194, 3195}, []int{3195, 3196}, []int{3196, 3197}, []int{3197, 3198}, []int{3198, 3199}, []int{3199, 3200}, []int{3200, 3201}, []int{3201, 3202}, []int{3202, 3203}, []int{3203, 3204}, []int{3204, 3205}, []int{3205, 3206}, []int{3206, 3207}, []int{3207, 3208}, []int{3208, 3209}, []int{3209, 3210}, []int{3210, 3211}, []int{3211, 3212}, []int{3212, 3213}, []int{3213, 3214}, []int{3214, 3215}, []int{3215, 3216}, []int{3216, 3217}, []int{3217, 3218}, []int{3218, 3219}, []int{3219, 3220}, []int{3220, 3221}, []int{3221, 3222}, []int{3222, 3223}, []int{3223, 3224}, []int{3224, 3225}, []int{3225, 3226}, []int{3226, 3227}, []int{3227, 3228}, []int{3228, 3229}, []int{3229, 3230}, []int{3230, 3231}, []int{3231, 3232}, []int{3232, 3233}, []int{3233, 3234}, []int{3234, 3235}, []int{3235, 3236}, []int{3236, 3237}, []int{3237, 3238}, []int{3238, 3239}, []int{3239, 3240}, []int{3240, 3241}, []int{3241, 3242}, []int{3242, 3243}, []int{3243, 3244}, []int{3244, 3245}, []int{3245, 3246}, []int{3246, 3247}, []int{3247, 3248}, []int{3248, 3249}, []int{3249, 3250}, []int{3250, 3251}, []int{3251, 3252}, []int{3252, 3253}, []int{3253, 3254}, []int{3254, 3255}, []int{3255, 3256}, []int{3256, 3257}, []int{3257, 3258}, []int{3258, 3259}, []int{3259, 3260}, []int{3260, 3261}, []int{3261, 3262}, []int{3262, 3263}, []int{3263, 3264}, []int{3264, 3265}, []int{3265, 3266}, []int{3266, 3267}, []int{3267, 3268}, []int{3268, 3269}, []int{3269, 3270}, []int{3270, 3271}, []int{3271, 3272}, []int{3272, 3273}, []int{3273, 3274}, []int{3274, 3275}, []int{3275, 3276}, []int{3276, 3277}, []int{3277, 3278}, []int{3278, 3279}, []int{3279, 3280}, []int{3280, 3281}, []int{3281, 3282}, []int{3282, 3283}, []int{3283, 3284}, []int{3284, 3285}, []int{3285, 3286}, []int{3286, 3287}, []int{3287, 3288}, []int{3288, 3289}, []int{3289, 3290}, []int{3290, 3291}, []int{3291, 3292}, []int{3292, 3293}, []int{3293, 3294}, []int{3294, 3295}, []int{3295, 3296}, []int{3296, 3297}, []int{3297, 3298}, []int{3298, 3299}, []int{3299, 3300}, []int{3300, 3301}, []int{3301, 3302}, []int{3302, 3303}, []int{3303, 3304}, []int{3304, 3305}, []int{3305, 3306}, []int{3306, 3307}, []int{3307, 3308}, []int{3308, 3309}, []int{3309, 3310}, []int{3310, 3311}, []int{3311, 3312}, []int{3312, 3313}, []int{3313, 3314}, []int{3314, 3315}, []int{3315, 3316}, []int{3316, 3317}, []int{3317, 3318}, []int{3318, 3319}, []int{3319, 3320}, []int{3320, 3321}, []int{3321, 3322}, []int{3322, 3323}, []int{3323, 3324}, []int{3324, 3325}, []int{3325, 3326}, []int{3326, 3327}, []int{3327, 3328}, []int{3328, 3329}, []int{3329, 3330}, []int{3330, 3331}, []int{3331, 3332}, []int{3332, 3333}, []int{3333, 3334}, []int{3334, 3335}, []int{3335, 3336}, []int{3336, 3337}, []int{3337, 3338}, []int{3338, 3339}, []int{3339, 3340}, []int{3340, 3341}, []int{3341, 3342}, []int{3342, 3343}, []int{3343, 3344}, []int{3344, 3345}, []int{3345, 3346}, []int{3346, 3347}, []int{3347, 3348}, []int{3348, 3349}, []int{3349, 3350}, []int{3350, 3351}, []int{3351, 3352}, []int{3352, 3353}, []int{3353, 3354}, []int{3354, 3355}, []int{3355, 3356}, []int{3356, 3357}, []int{3357, 3358}, []int{3358, 3359}, []int{3359, 3360}, []int{3360, 3361}, []int{3361, 3362}, []int{3362, 3363}, []int{3363, 3364}, []int{3364, 3365}, []int{3365, 3366}, []int{3366, 3367}, []int{3367, 3368}, []int{3368, 3369}, []int{3369, 3370}, []int{3370, 3371}, []int{3371, 3372}, []int{3372, 3373}, []int{3373, 3374}, []int{3374, 3375}, []int{3375, 3376}, []int{3376, 3377}, []int{3377, 3378}, []int{3378, 3379}, []int{3379, 3380}, []int{3380, 3381}, []int{3381, 3382}, []int{3382, 3383}, []int{3383, 3384}, []int{3384, 3385}, []int{3385, 3386}, []int{3386, 3387}, []int{3387, 3388}, []int{3388, 3389}, []int{3389, 3390}, []int{3390, 3391}, []int{3391, 3392}, []int{3392, 3393}, []int{3393, 3394}, []int{3394, 3395}, []int{3395, 3396}, []int{3396, 3397}, []int{3397, 3398}, []int{3398, 3399}, []int{3399, 3400}, []int{3400, 3401}, []int{3401, 3402}, []int{3402, 3403}, []int{3403, 3404}, []int{3404, 3405}, []int{3405, 3406}, []int{3406, 3407}, []int{3407, 3408}, []int{3408, 3409}, []int{3409, 3410}, []int{3410, 3411}, []int{3411, 3412}, []int{3412, 3413}, []int{3413, 3414}, []int{3414, 3415}, []int{3415, 3416}, []int{3416, 3417}, []int{3417, 3418}, []int{3418, 3419}, []int{3419, 3420}, []int{3420, 3421}, []int{3421, 3422}, []int{3422, 3423}, []int{3423, 3424}, []int{3424, 3425}, []int{3425, 3426}, []int{3426, 3427}, []int{3427, 3428}, []int{3428, 3429}, []int{3429, 3430}, []int{3430, 3431}, []int{3431, 3432}, []int{3432, 3433}, []int{3433, 3434}, []int{3434, 3435}, []int{3435, 3436}, []int{3436, 3437}, []int{3437, 3438}, []int{3438, 3439}, []int{3439, 3440}, []int{3440, 3441}, []int{3441, 3442}, []int{3442, 3443}, []int{3443, 3444}, []int{3444, 3445}, []int{3445, 3446}, []int{3446, 3447}, []int{3447, 3448}, []int{3448, 3449}, []int{3449, 3450}, []int{3450, 3451}, []int{3451, 3452}, []int{3452, 3453}, []int{3453, 3454}, []int{3454, 3455}, []int{3455, 3456}, []int{3456, 3457}, []int{3457, 3458}, []int{3458, 3459}, []int{3459, 3460}, []int{3460, 3461}, []int{3461, 3462}, []int{3462, 3463}, []int{3463, 3464}, []int{3464, 3465}, []int{3465, 3466}, []int{3466, 3467}, []int{3467, 3468}, []int{3468, 3469}, []int{3469, 3470}, []int{3470, 3471}, []int{3471, 3472}, []int{3472, 3473}, []int{3473, 3474}, []int{3474, 3475}, []int{3475, 3476}, []int{3476, 3477}, []int{3477, 3478}, []int{3478, 3479}, []int{3479, 3480}, []int{3480, 3481}, []int{3481, 3482}, []int{3482, 3483}, []int{3483, 3484}, []int{3484, 3485}, []int{3485, 3486}, []int{3486, 3487}, []int{3487, 3488}, []int{3488, 3489}, []int{3489, 3490}, []int{3490, 3491}, []int{3491, 3492}, []int{3492, 3493}, []int{3493, 3494}, []int{3494, 3495}, []int{3495, 3496}, []int{3496, 3497}, []int{3497, 3498}, []int{3498, 3499}, []int{3499, 3500}, []int{3500, 3501}, []int{3501, 3502}, []int{3502, 3503}, []int{3503, 3504}, []int{3504, 3505}, []int{3505, 3506}, []int{3506, 3507}, []int{3507, 3508}, []int{3508, 3509}, []int{3509, 3510}, []int{3510, 3511}, []int{3511, 3512}, []int{3512, 3513}, []int{3513, 3514}, []int{3514, 3515}, []int{3515, 3516}, []int{3516, 3517}, []int{3517, 3518}, []int{3518, 3519}, []int{3519, 3520}, []int{3520, 3521}, []int{3521, 3522}, []int{3522, 3523}, []int{3523, 3524}, []int{3524, 3525}, []int{3525, 3526}, []int{3526, 3527}, []int{3527, 3528}, []int{3528, 3529}, []int{3529, 3530}, []int{3530, 3531}, []int{3531, 3532}, []int{3532, 3533}, []int{3533, 3534}, []int{3534, 3535}, []int{3535, 3536}, []int{3536, 3537}, []int{3537, 3538}, []int{3538, 3539}, []int{3539, 3540}, []int{3540, 3541}, []int{3541, 3542}, []int{3542, 3543}, []int{3543, 3544}, []int{3544, 3545}, []int{3545, 3546}, []int{3546, 3547}, []int{3547, 3548}, []int{3548, 3549}, []int{3549, 3550}, []int{3550, 3551}, []int{3551, 3552}, []int{3552, 3553}, []int{3553, 3554}, []int{3554, 3555}, []int{3555, 3556}, []int{3556, 3557}, []int{3557, 3558}, []int{3558, 3559}, []int{3559, 3560}, []int{3560, 3561}, []int{3561, 3562}, []int{3562, 3563}, []int{3563, 3564}, []int{3564, 3565}, []int{3565, 3566}, []int{3566, 3567}, []int{3567, 3568}, []int{3568, 3569}, []int{3569, 3570}, []int{3570, 3571}, []int{3571, 3572}, []int{3572, 3573}, []int{3573, 3574}, []int{3574, 3575}, []int{3575, 3576}, []int{3576, 3577}, []int{3577, 3578}, []int{3578, 3579}, []int{3579, 3580}, []int{3580, 3581}, []int{3581, 3582}, []int{3582, 3583}, []int{3583, 3584}, []int{3584, 3585}, []int{3585, 3586}, []int{3586, 3587}, []int{3587, 3588}, []int{3588, 3589}, []int{3589, 3590}, []int{3590, 3591}, []int{3591, 3592}, []int{3592, 3593}, []int{3593, 3594}, []int{3594, 3595}, []int{3595, 3596}, []int{3596, 3597}, []int{3597, 3598}, []int{3598, 3599}, []int{3599, 3600}, []int{3600, 3601}, []int{3601, 3602}, []int{3602, 3603}, []int{3603, 3604}, []int{3604, 3605}, []int{3605, 3606}, []int{3606, 3607}, []int{3607, 3608}, []int{3608, 3609}, []int{3609, 3610}, []int{3610, 3611}, []int{3611, 3612}, []int{3612, 3613}, []int{3613, 3614}, []int{3614, 3615}, []int{3615, 3616}, []int{3616, 3617}, []int{3617, 3618}, []int{3618, 3619}, []int{3619, 3620}, []int{3620, 3621}, []int{3621, 3622}, []int{3622, 3623}, []int{3623, 3624}, []int{3624, 3625}, []int{3625, 3626}, []int{3626, 3627}, []int{3627, 3628}, []int{3628, 3629}, []int{3629, 3630}, []int{3630, 3631}, []int{3631, 3632}, []int{3632, 3633}, []int{3633, 3634}, []int{3634, 3635}, []int{3635, 3636}, []int{3636, 3637}, []int{3637, 3638}, []int{3638, 3639}, []int{3639, 3640}, []int{3640, 3641}, []int{3641, 3642}, []int{3642, 3643}, []int{3643, 3644}, []int{3644, 3645}, []int{3645, 3646}, []int{3646, 3647}, []int{3647, 3648}, []int{3648, 3649}, []int{3649, 3650}, []int{3650, 3651}, []int{3651, 3652}, []int{3652, 3653}, []int{3653, 3654}, []int{3654, 3655}, []int{3655, 3656}, []int{3656, 3657}, []int{3657, 3658}, []int{3658, 3659}, []int{3659, 3660}, []int{3660, 3661}, []int{3661, 3662}, []int{3662, 3663}, []int{3663, 3664}, []int{3664, 3665}, []int{3665, 3666}, []int{3666, 3667}, []int{3667, 3668}, []int{3668, 3669}, []int{3669, 3670}, []int{3670, 3671}, []int{3671, 3672}, []int{3672, 3673}, []int{3673, 3674}, []int{3674, 3675}, []int{3675, 3676}, []int{3676, 3677}, []int{3677, 3678}, []int{3678, 3679}, []int{3679, 3680}, []int{3680, 3681}, []int{3681, 3682}, []int{3682, 3683}, []int{3683, 3684}, []int{3684, 3685}, []int{3685, 3686}, []int{3686, 3687}, []int{3687, 3688}, []int{3688, 3689}, []int{3689, 3690}, []int{3690, 3691}, []int{3691, 3692}, []int{3692, 3693}, []int{3693, 3694}, []int{3694, 3695}, []int{3695, 3696}, []int{3696, 3697}, []int{3697, 3698}, []int{3698, 3699}, []int{3699, 3700}, []int{3700, 3701}, []int{3701, 3702}, []int{3702, 3703}, []int{3703, 3704}, []int{3704, 3705}, []int{3705, 3706}, []int{3706, 3707}, []int{3707, 3708}, []int{3708, 3709}, []int{3709, 3710}, []int{3710, 3711}, []int{3711, 3712}, []int{3712, 3713}, []int{3713, 3714}, []int{3714, 3715}, []int{3715, 3716}, []int{3716, 3717}, []int{3717, 3718}, []int{3718, 3719}, []int{3719, 3720}, []int{3720, 3721}, []int{3721, 3722}, []int{3722, 3723}, []int{3723, 3724}, []int{3724, 3725}, []int{3725, 3726}, []int{3726, 3727}, []int{3727, 3728}, []int{3728, 3729}, []int{3729, 3730}, []int{3730, 3731}, []int{3731, 3732}, []int{3732, 3733}, []int{3733, 3734}, []int{3734, 3735}, []int{3735, 3736}, []int{3736, 3737}, []int{3737, 3738}, []int{3738, 3739}, []int{3739, 3740}, []int{3740, 3741}, []int{3741, 3742}, []int{3742, 3743}, []int{3743, 3744}, []int{3744, 3745}, []int{3745, 3746}, []int{3746, 3747}, []int{3747, 3748}, []int{3748, 3749}, []int{3749, 3750}, []int{3750, 3751}, []int{3751, 3752}, []int{3752, 3753}, []int{3753, 3754}, []int{3754, 3755}, []int{3755, 3756}, []int{3756, 3757}, []int{3757, 3758}, []int{3758, 3759}, []int{3759, 3760}, []int{3760, 3761}, []int{3761, 3762}, []int{3762, 3763}, []int{3763, 3764}, []int{3764, 3765}, []int{3765, 3766}, []int{3766, 3767}, []int{3767, 3768}, []int{3768, 3769}, []int{3769, 3770}, []int{3770, 3771}, []int{3771, 3772}, []int{3772, 3773}, []int{3773, 3774}, []int{3774, 3775}, []int{3775, 3776}, []int{3776, 3777}, []int{3777, 3778}, []int{3778, 3779}, []int{3779, 3780}, []int{3780, 3781}, []int{3781, 3782}, []int{3782, 3783}, []int{3783, 3784}, []int{3784, 3785}, []int{3785, 3786}, []int{3786, 3787}, []int{3787, 3788}, []int{3788, 3789}, []int{3789, 3790}, []int{3790, 3791}, []int{3791, 3792}, []int{3792, 3793}, []int{3793, 3794}, []int{3794, 3795}, []int{3795, 3796}, []int{3796, 3797}, []int{3797, 3798}, []int{3798, 3799}, []int{3799, 3800}, []int{3800, 3801}, []int{3801, 3802}, []int{3802, 3803}, []int{3803, 3804}, []int{3804, 3805}, []int{3805, 3806}, []int{3806, 3807}, []int{3807, 3808}, []int{3808, 3809}, []int{3809, 3810}, []int{3810, 3811}, []int{3811, 3812}, []int{3812, 3813}, []int{3813, 3814}, []int{3814, 3815}, []int{3815, 3816}, []int{3816, 3817}, []int{3817, 3818}, []int{3818, 3819}, []int{3819, 3820}, []int{3820, 3821}, []int{3821, 3822}, []int{3822, 3823}, []int{3823, 3824}, []int{3824, 3825}, []int{3825, 3826}, []int{3826, 3827}, []int{3827, 3828}, []int{3828, 3829}, []int{3829, 3830}, []int{3830, 3831}, []int{3831, 3832}, []int{3832, 3833}, []int{3833, 3834}, []int{3834, 3835}, []int{3835, 3836}, []int{3836, 3837}, []int{3837, 3838}, []int{3838, 3839}, []int{3839, 3840}, []int{3840, 3841}, []int{3841, 3842}, []int{3842, 3843}, []int{3843, 3844}, []int{3844, 3845}, []int{3845, 3846}, []int{3846, 3847}, []int{3847, 3848}, []int{3848, 3849}, []int{3849, 3850}, []int{3850, 3851}, []int{3851, 3852}, []int{3852, 3853}, []int{3853, 3854}, []int{3854, 3855}, []int{3855, 3856}, []int{3856, 3857}, []int{3857, 3858}, []int{3858, 3859}, []int{3859, 3860}, []int{3860, 3861}, []int{3861, 3862}, []int{3862, 3863}, []int{3863, 3864}, []int{3864, 3865}, []int{3865, 3866}, []int{3866, 3867}, []int{3867, 3868}, []int{3868, 3869}, []int{3869, 3870}, []int{3870, 3871}, []int{3871, 3872}, []int{3872, 3873}, []int{3873, 3874}, []int{3874, 3875}, []int{3875, 3876}, []int{3876, 3877}, []int{3877, 3878}, []int{3878, 3879}, []int{3879, 3880}, []int{3880, 3881}, []int{3881, 3882}, []int{3882, 3883}, []int{3883, 3884}, []int{3884, 3885}, []int{3885, 3886}, []int{3886, 3887}, []int{3887, 3888}, []int{3888, 3889}, []int{3889, 3890}, []int{3890, 3891}, []int{3891, 3892}, []int{3892, 3893}, []int{3893, 3894}, []int{3894, 3895}, []int{3895, 3896}, []int{3896, 3897}, []int{3897, 3898}, []int{3898, 3899}, []int{3899, 3900}, []int{3900, 3901}, []int{3901, 3902}, []int{3902, 3903}, []int{3903, 3904}, []int{3904, 3905}, []int{3905, 3906}, []int{3906, 3907}, []int{3907, 3908}, []int{3908, 3909}, []int{3909, 3910}, []int{3910, 3911}, []int{3911, 3912}, []int{3912, 3913}, []int{3913, 3914}, []int{3914, 3915}, []int{3915, 3916}, []int{3916, 3917}, []int{3917, 3918}, []int{3918, 3919}, []int{3919, 3920}, []int{3920, 3921}, []int{3921, 3922}, []int{3922, 3923}, []int{3923, 3924}, []int{3924, 3925}, []int{3925, 3926}, []int{3926, 3927}, []int{3927, 3928}, []int{3928, 3929}, []int{3929, 3930}, []int{3930, 3931}, []int{3931, 3932}, []int{3932, 3933}, []int{3933, 3934}, []int{3934, 3935}, []int{3935, 3936}, []int{3936, 3937}, []int{3937, 3938}, []int{3938, 3939}, []int{3939, 3940}, []int{3940, 3941}, []int{3941, 3942}, []int{3942, 3943}, []int{3943, 3944}, []int{3944, 3945}, []int{3945, 3946}, []int{3946, 3947}, []int{3947, 3948}, []int{3948, 3949}, []int{3949, 3950}, []int{3950, 3951}, []int{3951, 3952}, []int{3952, 3953}, []int{3953, 3954}, []int{3954, 3955}, []int{3955, 3956}, []int{3956, 3957}, []int{3957, 3958}, []int{3958, 3959}, []int{3959, 3960}, []int{3960, 3961}, []int{3961, 3962}, []int{3962, 3963}, []int{3963, 3964}, []int{3964, 3965}, []int{3965, 3966}, []int{3966, 3967}, []int{3967, 3968}, []int{3968, 3969}, []int{3969, 3970}, []int{3970, 3971}, []int{3971, 3972}, []int{3972, 3973}, []int{3973, 3974}, []int{3974, 3975}, []int{3975, 3976}, []int{3976, 3977}, []int{3977, 3978}, []int{3978, 3979}, []int{3979, 3980}, []int{3980, 3981}, []int{3981, 3982}, []int{3982, 3983}, []int{3983, 3984}, []int{3984, 3985}, []int{3985, 3986}, []int{3986, 3987}, []int{3987, 3988}, []int{3988, 3989}, []int{3989, 3990}, []int{3990, 3991}, []int{3991, 3992}, []int{3992, 3993}, []int{3993, 3994}, []int{3994, 3995}, []int{3995, 3996}, []int{3996, 3997}, []int{3997, 3998}, []int{3998, 3999}, []int{3999, 4000}, []int{4000, 4001}, []int{4001, 4002}, []int{4002, 4003}, []int{4003, 4004}, []int{4004, 4005}, []int{4005, 4006}, []int{4006, 4007}, []int{4007, 4008}, []int{4008, 4009}, []int{4009, 4010}, []int{4010, 4011}, []int{4011, 4012}, []int{4012, 4013}, []int{4013, 4014}, []int{4014, 4015}, []int{4015, 4016}, []int{4016, 4017}, []int{4017, 4018}, []int{4018, 4019}, []int{4019, 4020}, []int{4020, 4021}, []int{4021, 4022}, []int{4022, 4023}, []int{4023, 4024}, []int{4024, 4025}, []int{4025, 4026}, []int{4026, 4027}, []int{4027, 4028}, []int{4028, 4029}, []int{4029, 4030}, []int{4030, 4031}, []int{4031, 4032}, []int{4032, 4033}, []int{4033, 4034}, []int{4034, 4035}, []int{4035, 4036}, []int{4036, 4037}, []int{4037, 4038}, []int{4038, 4039}, []int{4039, 4040}, []int{4040, 4041}, []int{4041, 4042}, []int{4042, 4043}, []int{4043, 4044}, []int{4044, 4045}, []int{4045, 4046}, []int{4046, 4047}, []int{4047, 4048}, []int{4048, 4049}, []int{4049, 4050}, []int{4050, 4051}, []int{4051, 4052}, []int{4052, 4053}, []int{4053, 4054}, []int{4054, 4055}, []int{4055, 4056}, []int{4056, 4057}, []int{4057, 4058}, []int{4058, 4059}, []int{4059, 4060}, []int{4060, 4061}, []int{4061, 4062}, []int{4062, 4063}, []int{4063, 4064}, []int{4064, 4065}, []int{4065, 4066}, []int{4066, 4067}, []int{4067, 4068}, []int{4068, 4069}, []int{4069, 4070}, []int{4070, 4071}, []int{4071, 4072}, []int{4072, 4073}, []int{4073, 4074}, []int{4074, 4075}, []int{4075, 4076}, []int{4076, 4077}, []int{4077, 4078}, []int{4078, 4079}, []int{4079, 4080}, []int{4080, 4081}, []int{4081, 4082}, []int{4082, 4083}, []int{4083, 4084}, []int{4084, 4085}, []int{4085, 4086}, []int{4086, 4087}, []int{4087, 4088}, []int{4088, 4089}, []int{4089, 4090}, []int{4090, 4091}, []int{4091, 4092}, []int{4092, 4093}, []int{4093, 4094}, []int{4094, 4095}, []int{4095, 4096}, []int{4096, 4097}, []int{4097, 4098}, []int{4098, 4099}, []int{4099, 4100}, []int{4100, 4101}, []int{4101, 4102}, []int{4102, 4103}, []int{4103, 4104}, []int{4104, 4105}, []int{4105, 4106}, []int{4106, 4107}, []int{4107, 4108}, []int{4108, 4109}, []int{4109, 4110}, []int{4110, 4111}, []int{4111, 4112}, []int{4112, 4113}, []int{4113, 4114}, []int{4114, 4115}, []int{4115, 4116}, []int{4116, 4117}, []int{4117, 4118}, []int{4118, 4119}, []int{4119, 4120}, []int{4120, 4121}, []int{4121, 4122}, []int{4122, 4123}, []int{4123, 4124}, []int{4124, 4125}, []int{4125, 4126}, []int{4126, 4127}, []int{4127, 4128}, []int{4128, 4129}, []int{4129, 4130}, []int{4130, 4131}, []int{4131, 4132}, []int{4132, 4133}, []int{4133, 4134}, []int{4134, 4135}, []int{4135, 4136}, []int{4136, 4137}, []int{4137, 4138}, []int{4138, 4139}, []int{4139, 4140}, []int{4140, 4141}, []int{4141, 4142}, []int{4142, 4143}, []int{4143, 4144}, []int{4144, 4145}, []int{4145, 4146}, []int{4146, 4147}, []int{4147, 4148}, []int{4148, 4149}, []int{4149, 4150}, []int{4150, 4151}, []int{4151, 4152}, []int{4152, 4153}, []int{4153, 4154}, []int{4154, 4155}, []int{4155, 4156}, []int{4156, 4157}, []int{4157, 4158}, []int{4158, 4159}, []int{4159, 4160}, []int{4160, 4161}, []int{4161, 4162}, []int{4162, 4163}, []int{4163, 4164}, []int{4164, 4165}, []int{4165, 4166}, []int{4166, 4167}, []int{4167, 4168}, []int{4168, 4169}, []int{4169, 4170}, []int{4170, 4171}, []int{4171, 4172}, []int{4172, 4173}, []int{4173, 4174}, []int{4174, 4175}, []int{4175, 4176}, []int{4176, 4177}, []int{4177, 4178}, []int{4178, 4179}, []int{4179, 4180}, []int{4180, 4181}, []int{4181, 4182}, []int{4182, 4183}, []int{4183, 4184}, []int{4184, 4185}, []int{4185, 4186}, []int{4186, 4187}, []int{4187, 4188}, []int{4188, 4189}, []int{4189, 4190}, []int{4190, 4191}, []int{4191, 4192}, []int{4192, 4193}, []int{4193, 4194}, []int{4194, 4195}, []int{4195, 4196}, []int{4196, 4197}, []int{4197, 4198}, []int{4198, 4199}, []int{4199, 4200}, []int{4200, 4201}, []int{4201, 4202}, []int{4202, 4203}, []int{4203, 4204}, []int{4204, 4205}, []int{4205, 4206}, []int{4206, 4207}, []int{4207, 4208}, []int{4208, 4209}, []int{4209, 4210}, []int{4210, 4211}, []int{4211, 4212}, []int{4212, 4213}, []int{4213, 4214}, []int{4214, 4215}, []int{4215, 4216}, []int{4216, 4217}, []int{4217, 4218}, []int{4218, 4219}, []int{4219, 4220}, []int{4220, 4221}, []int{4221, 4222}, []int{4222, 4223}, []int{4223, 4224}, []int{4224, 4225}, []int{4225, 4226}, []int{4226, 4227}, []int{4227, 4228}, []int{4228, 4229}, []int{4229, 4230}, []int{4230, 4231}, []int{4231, 4232}, []int{4232, 4233}, []int{4233, 4234}, []int{4234, 4235}, []int{4235, 4236}, []int{4236, 4237}, []int{4237, 4238}, []int{4238, 4239}, []int{4239, 4240}, []int{4240, 4241}, []int{4241, 4242}, []int{4242, 4243}, []int{4243, 4244}, []int{4244, 4245}, []int{4245, 4246}, []int{4246, 4247}, []int{4247, 4248}, []int{4248, 4249}, []int{4249, 4250}, []int{4250, 4251}, []int{4251, 4252}, []int{4252, 4253}, []int{4253, 4254}, []int{4254, 4255}, []int{4255, 4256}, []int{4256, 4257}, []int{4257, 4258}, []int{4258, 4259}, []int{4259, 4260}, []int{4260, 4261}, []int{4261, 4262}, []int{4262, 4263}, []int{4263, 4264}, []int{4264, 4265}, []int{4265, 4266}, []int{4266, 4267}, []int{4267, 4268}, []int{4268, 4269}, []int{4269, 4270}, []int{4270, 4271}, []int{4271, 4272}, []int{4272, 4273}, []int{4273, 4274}, []int{4274, 4275}, []int{4275, 4276}, []int{4276, 4277}, []int{4277, 4278}, []int{4278, 4279}, []int{4279, 4280}, []int{4280, 4281}, []int{4281, 4282}, []int{4282, 4283}, []int{4283, 4284}, []int{4284, 4285}, []int{4285, 4286}, []int{4286, 4287}, []int{4287, 4288}, []int{4288, 4289}, []int{4289, 4290}, []int{4290, 4291}, []int{4291, 4292}, []int{4292, 4293}, []int{4293, 4294}, []int{4294, 4295}, []int{4295, 4296}, []int{4296, 4297}, []int{4297, 4298}, []int{4298, 4299}, []int{4299, 4300}, []int{4300, 4301}, []int{4301, 4302}, []int{4302, 4303}, []int{4303, 4304}, []int{4304, 4305}, []int{4305, 4306}, []int{4306, 4307}, []int{4307, 4308}, []int{4308, 4309}, []int{4309, 4310}, []int{4310, 4311}, []int{4311, 4312}, []int{4312, 4313}, []int{4313, 4314}, []int{4314, 4315}, []int{4315, 4316}, []int{4316, 4317}, []int{4317, 4318}, []int{4318, 4319}, []int{4319, 4320}, []int{4320, 4321}, []int{4321, 4322}, []int{4322, 4323}, []int{4323, 4324}, []int{4324, 4325}, []int{4325, 4326}, []int{4326, 4327}, []int{4327, 4328}, []int{4328, 4329}, []int{4329, 4330}, []int{4330, 4331}, []int{4331, 4332}, []int{4332, 4333}, []int{4333, 4334}, []int{4334, 4335}, []int{4335, 4336}, []int{4336, 4337}, []int{4337, 4338}, []int{4338, 4339}, []int{4339, 4340}, []int{4340, 4341}, []int{4341, 4342}, []int{4342, 4343}, []int{4343, 4344}, []int{4344, 4345}, []int{4345, 4346}, []int{4346, 4347}, []int{4347, 4348}, []int{4348, 4349}, []int{4349, 4350}, []int{4350, 4351}, []int{4351, 4352}, []int{4352, 4353}, []int{4353, 4354}, []int{4354, 4355}, []int{4355, 4356}, []int{4356, 4357}, []int{4357, 4358}, []int{4358, 4359}, []int{4359, 4360}, []int{4360, 4361}, []int{4361, 4362}, []int{4362, 4363}, []int{4363, 4364}, []int{4364, 4365}, []int{4365, 4366}, []int{4366, 4367}, []int{4367, 4368}, []int{4368, 4369}, []int{4369, 4370}, []int{4370, 4371}, []int{4371, 4372}, []int{4372, 4373}, []int{4373, 4374}, []int{4374, 4375}, []int{4375, 4376}, []int{4376, 4377}, []int{4377, 4378}, []int{4378, 4379}, []int{4379, 4380}, []int{4380, 4381}, []int{4381, 4382}, []int{4382, 4383}, []int{4383, 4384}, []int{4384, 4385}, []int{4385, 4386}, []int{4386, 4387}, []int{4387, 4388}, []int{4388, 4389}, []int{4389, 4390}, []int{4390, 4391}, []int{4391, 4392}, []int{4392, 4393}, []int{4393, 4394}, []int{4394, 4395}, []int{4395, 4396}, []int{4396, 4397}, []int{4397, 4398}, []int{4398, 4399}, []int{4399, 4400}, []int{4400, 4401}, []int{4401, 4402}, []int{4402, 4403}, []int{4403, 4404}, []int{4404, 4405}, []int{4405, 4406}, []int{4406, 4407}, []int{4407, 4408}, []int{4408, 4409}, []int{4409, 4410}, []int{4410, 4411}, []int{4411, 4412}, []int{4412, 4413}, []int{4413, 4414}, []int{4414, 4415}, []int{4415, 4416}, []int{4416, 4417}, []int{4417, 4418}, []int{4418, 4419}, []int{4419, 4420}, []int{4420, 4421}, []int{4421, 4422}, []int{4422, 4423}, []int{4423, 4424}, []int{4424, 4425}, []int{4425, 4426}, []int{4426, 4427}, []int{4427, 4428}, []int{4428, 4429}, []int{4429, 4430}, []int{4430, 4431}, []int{4431, 4432}, []int{4432, 4433}, []int{4433, 4434}, []int{4434, 4435}, []int{4435, 4436}, []int{4436, 4437}, []int{4437, 4438}, []int{4438, 4439}, []int{4439, 4440}, []int{4440, 4441}, []int{4441, 4442}, []int{4442, 4443}, []int{4443, 4444}, []int{4444, 4445}, []int{4445, 4446}, []int{4446, 4447}, []int{4447, 4448}, []int{4448, 4449}, []int{4449, 4450}, []int{4450, 4451}, []int{4451, 4452}, []int{4452, 4453}, []int{4453, 4454}, []int{4454, 4455}, []int{4455, 4456}, []int{4456, 4457}, []int{4457, 4458}, []int{4458, 4459}, []int{4459, 4460}, []int{4460, 4461}, []int{4461, 4462}, []int{4462, 4463}, []int{4463, 4464}, []int{4464, 4465}, []int{4465, 4466}, []int{4466, 4467}, []int{4467, 4468}, []int{4468, 4469}, []int{4469, 4470}, []int{4470, 4471}, []int{4471, 4472}, []int{4472, 4473}, []int{4473, 4474}, []int{4474, 4475}, []int{4475, 4476}, []int{4476, 4477}, []int{4477, 4478}, []int{4478, 4479}, []int{4479, 4480}, []int{4480, 4481}, []int{4481, 4482}, []int{4482, 4483}, []int{4483, 4484}, []int{4484, 4485}, []int{4485, 4486}, []int{4486, 4487}, []int{4487, 4488}, []int{4488, 4489}, []int{4489, 4490}, []int{4490, 4491}, []int{4491, 4492}, []int{4492, 4493}, []int{4493, 4494}, []int{4494, 4495}, []int{4495, 4496}, []int{4496, 4497}, []int{4497, 4498}, []int{4498, 4499}, []int{4499, 4500}, []int{4500, 4501}, []int{4501, 4502}, []int{4502, 4503}, []int{4503, 4504}, []int{4504, 4505}, []int{4505, 4506}, []int{4506, 4507}, []int{4507, 4508}, []int{4508, 4509}, []int{4509, 4510}, []int{4510, 4511}, []int{4511, 4512}, []int{4512, 4513}, []int{4513, 4514}, []int{4514, 4515}, []int{4515, 4516}, []int{4516, 4517}, []int{4517, 4518}, []int{4518, 4519}, []int{4519, 4520}, []int{4520, 4521}, []int{4521, 4522}, []int{4522, 4523}, []int{4523, 4524}, []int{4524, 4525}, []int{4525, 4526}, []int{4526, 4527}, []int{4527, 4528}, []int{4528, 4529}, []int{4529, 4530}, []int{4530, 4531}, []int{4531, 4532}, []int{4532, 4533}, []int{4533, 4534}, []int{4534, 4535}, []int{4535, 4536}, []int{4536, 4537}, []int{4537, 4538}, []int{4538, 4539}, []int{4539, 4540}, []int{4540, 4541}, []int{4541, 4542}, []int{4542, 4543}, []int{4543, 4544}, []int{4544, 4545}, []int{4545, 4546}, []int{4546, 4547}, []int{4547, 4548}, []int{4548, 4549}, []int{4549, 4550}, []int{4550, 4551}, []int{4551, 4552}, []int{4552, 4553}, []int{4553, 4554}, []int{4554, 4555}, []int{4555, 4556}, []int{4556, 4557}, []int{4557, 4558}, []int{4558, 4559}, []int{4559, 4560}, []int{4560, 4561}, []int{4561, 4562}, []int{4562, 4563}, []int{4563, 4564}, []int{4564, 4565}, []int{4565, 4566}, []int{4566, 4567}, []int{4567, 4568}, []int{4568, 4569}, []int{4569, 4570}, []int{4570, 4571}, []int{4571, 4572}, []int{4572, 4573}, []int{4573, 4574}, []int{4574, 4575}, []int{4575, 4576}, []int{4576, 4577}, []int{4577, 4578}, []int{4578, 4579}, []int{4579, 4580}, []int{4580, 4581}, []int{4581, 4582}, []int{4582, 4583}, []int{4583, 4584}, []int{4584, 4585}, []int{4585, 4586}, []int{4586, 4587}, []int{4587, 4588}, []int{4588, 4589}, []int{4589, 4590}, []int{4590, 4591}, []int{4591, 4592}, []int{4592, 4593}, []int{4593, 4594}, []int{4594, 4595}, []int{4595, 4596}, []int{4596, 4597}, []int{4597, 4598}, []int{4598, 4599}, []int{4599, 4600}, []int{4600, 4601}, []int{4601, 4602}, []int{4602, 4603}, []int{4603, 4604}, []int{4604, 4605}, []int{4605, 4606}, []int{4606, 4607}, []int{4607, 4608}, []int{4608, 4609}, []int{4609, 4610}, []int{4610, 4611}, []int{4611, 4612}, []int{4612, 4613}, []int{4613, 4614}, []int{4614, 4615}, []int{4615, 4616}, []int{4616, 4617}, []int{4617, 4618}, []int{4618, 4619}, []int{4619, 4620}, []int{4620, 4621}, []int{4621, 4622}, []int{4622, 4623}, []int{4623, 4624}, []int{4624, 4625}, []int{4625, 4626}, []int{4626, 4627}, []int{4627, 4628}, []int{4628, 4629}, []int{4629, 4630}, []int{4630, 4631}, []int{4631, 4632}, []int{4632, 4633}, []int{4633, 4634}, []int{4634, 4635}, []int{4635, 4636}, []int{4636, 4637}, []int{4637, 4638}, []int{4638, 4639}, []int{4639, 4640}, []int{4640, 4641}, []int{4641, 4642}, []int{4642, 4643}, []int{4643, 4644}, []int{4644, 4645}, []int{4645, 4646}, []int{4646, 4647}, []int{4647, 4648}, []int{4648, 4649}, []int{4649, 4650}, []int{4650, 4651}, []int{4651, 4652}, []int{4652, 4653}, []int{4653, 4654}, []int{4654, 4655}, []int{4655, 4656}, []int{4656, 4657}, []int{4657, 4658}, []int{4658, 4659}, []int{4659, 4660}, []int{4660, 4661}, []int{4661, 4662}, []int{4662, 4663}, []int{4663, 4664}, []int{4664, 4665}, []int{4665, 4666}, []int{4666, 4667}, []int{4667, 4668}, []int{4668, 4669}, []int{4669, 4670}, []int{4670, 4671}, []int{4671, 4672}, []int{4672, 4673}, []int{4673, 4674}, []int{4674, 4675}, []int{4675, 4676}, []int{4676, 4677}, []int{4677, 4678}, []int{4678, 4679}, []int{4679, 4680}, []int{4680, 4681}, []int{4681, 4682}, []int{4682, 4683}, []int{4683, 4684}, []int{4684, 4685}, []int{4685, 4686}, []int{4686, 4687}, []int{4687, 4688}, []int{4688, 4689}, []int{4689, 4690}, []int{4690, 4691}, []int{4691, 4692}, []int{4692, 4693}, []int{4693, 4694}, []int{4694, 4695}, []int{4695, 4696}, []int{4696, 4697}, []int{4697, 4698}, []int{4698, 4699}, []int{4699, 4700}, []int{4700, 4701}, []int{4701, 4702}, []int{4702, 4703}, []int{4703, 4704}, []int{4704, 4705}, []int{4705, 4706}, []int{4706, 4707}, []int{4707, 4708}, []int{4708, 4709}, []int{4709, 4710}, []int{4710, 4711}, []int{4711, 4712}, []int{4712, 4713}, []int{4713, 4714}, []int{4714, 4715}, []int{4715, 4716}, []int{4716, 4717}, []int{4717, 4718}, []int{4718, 4719}, []int{4719, 4720}, []int{4720, 4721}, []int{4721, 4722}, []int{4722, 4723}, []int{4723, 4724}, []int{4724, 4725}, []int{4725, 4726}, []int{4726, 4727}, []int{4727, 4728}, []int{4728, 4729}, []int{4729, 4730}, []int{4730, 4731}, []int{4731, 4732}, []int{4732, 4733}, []int{4733, 4734}, []int{4734, 4735}, []int{4735, 4736}, []int{4736, 4737}, []int{4737, 4738}, []int{4738, 4739}, []int{4739, 4740}, []int{4740, 4741}, []int{4741, 4742}, []int{4742, 4743}, []int{4743, 4744}, []int{4744, 4745}, []int{4745, 4746}, []int{4746, 4747}, []int{4747, 4748}, []int{4748, 4749}, []int{4749, 4750}, []int{4750, 4751}, []int{4751, 4752}, []int{4752, 4753}, []int{4753, 4754}, []int{4754, 4755}, []int{4755, 4756}, []int{4756, 4757}, []int{4757, 4758}, []int{4758, 4759}, []int{4759, 4760}, []int{4760, 4761}, []int{4761, 4762}, []int{4762, 4763}, []int{4763, 4764}, []int{4764, 4765}, []int{4765, 4766}, []int{4766, 4767}, []int{4767, 4768}, []int{4768, 4769}, []int{4769, 4770}, []int{4770, 4771}, []int{4771, 4772}, []int{4772, 4773}, []int{4773, 4774}, []int{4774, 4775}, []int{4775, 4776}, []int{4776, 4777}, []int{4777, 4778}, []int{4778, 4779}, []int{4779, 4780}, []int{4780, 4781}, []int{4781, 4782}, []int{4782, 4783}, []int{4783, 4784}, []int{4784, 4785}, []int{4785, 4786}, []int{4786, 4787}, []int{4787, 4788}, []int{4788, 4789}, []int{4789, 4790}, []int{4790, 4791}, []int{4791, 4792}, []int{4792, 4793}, []int{4793, 4794}, []int{4794, 4795}, []int{4795, 4796}, []int{4796, 4797}, []int{4797, 4798}, []int{4798, 4799}, []int{4799, 4800}, []int{4800, 4801}, []int{4801, 4802}, []int{4802, 4803}, []int{4803, 4804}, []int{4804, 4805}, []int{4805, 4806}, []int{4806, 4807}, []int{4807, 4808}, []int{4808, 4809}, []int{4809, 4810}, []int{4810, 4811}, []int{4811, 4812}, []int{4812, 4813}, []int{4813, 4814}, []int{4814, 4815}, []int{4815, 4816}, []int{4816, 4817}, []int{4817, 4818}, []int{4818, 4819}, []int{4819, 4820}, []int{4820, 4821}, []int{4821, 4822}, []int{4822, 4823}, []int{4823, 4824}, []int{4824, 4825}, []int{4825, 4826}, []int{4826, 4827}, []int{4827, 4828}, []int{4828, 4829}, []int{4829, 4830}, []int{4830, 4831}, []int{4831, 4832}, []int{4832, 4833}, []int{4833, 4834}, []int{4834, 4835}, []int{4835, 4836}, []int{4836, 4837}, []int{4837, 4838}, []int{4838, 4839}, []int{4839, 4840}, []int{4840, 4841}, []int{4841, 4842}, []int{4842, 4843}, []int{4843, 4844}, []int{4844, 4845}, []int{4845, 4846}, []int{4846, 4847}, []int{4847, 4848}, []int{4848, 4849}, []int{4849, 4850}, []int{4850, 4851}, []int{4851, 4852}, []int{4852, 4853}, []int{4853, 4854}, []int{4854, 4855}, []int{4855, 4856}, []int{4856, 4857}, []int{4857, 4858}, []int{4858, 4859}, []int{4859, 4860}, []int{4860, 4861}, []int{4861, 4862}, []int{4862, 4863}, []int{4863, 4864}, []int{4864, 4865}, []int{4865, 4866}, []int{4866, 4867}, []int{4867, 4868}, []int{4868, 4869}, []int{4869, 4870}, []int{4870, 4871}, []int{4871, 4872}, []int{4872, 4873}, []int{4873, 4874}, []int{4874, 4875}, []int{4875, 4876}, []int{4876, 4877}, []int{4877, 4878}, []int{4878, 4879}, []int{4879, 4880}, []int{4880, 4881}, []int{4881, 4882}, []int{4882, 4883}, []int{4883, 4884}, []int{4884, 4885}, []int{4885, 4886}, []int{4886, 4887}, []int{4887, 4888}, []int{4888, 4889}, []int{4889, 4890}, []int{4890, 4891}, []int{4891, 4892}, []int{4892, 4893}, []int{4893, 4894}, []int{4894, 4895}, []int{4895, 4896}, []int{4896, 4897}, []int{4897, 4898}, []int{4898, 4899}, []int{4899, 4900}, []int{4900, 4901}, []int{4901, 4902}, []int{4902, 4903}, []int{4903, 4904}, []int{4904, 4905}, []int{4905, 4906}, []int{4906, 4907}, []int{4907, 4908}, []int{4908, 4909}, []int{4909, 4910}, []int{4910, 4911}, []int{4911, 4912}, []int{4912, 4913}, []int{4913, 4914}, []int{4914, 4915}, []int{4915, 4916}, []int{4916, 4917}, []int{4917, 4918}, []int{4918, 4919}, []int{4919, 4920}, []int{4920, 4921}, []int{4921, 4922}, []int{4922, 4923}, []int{4923, 4924}, []int{4924, 4925}, []int{4925, 4926}, []int{4926, 4927}, []int{4927, 4928}, []int{4928, 4929}, []int{4929, 4930}, []int{4930, 4931}, []int{4931, 4932}, []int{4932, 4933}, []int{4933, 4934}, []int{4934, 4935}, []int{4935, 4936}, []int{4936, 4937}, []int{4937, 4938}, []int{4938, 4939}, []int{4939, 4940}, []int{4940, 4941}, []int{4941, 4942}, []int{4942, 4943}, []int{4943, 4944}, []int{4944, 4945}, []int{4945, 4946}, []int{4946, 4947}, []int{4947, 4948}, []int{4948, 4949}, []int{4949, 4950}, []int{4950, 4951}, []int{4951, 4952}, []int{4952, 4953}, []int{4953, 4954}, []int{4954, 4955}, []int{4955, 4956}, []int{4956, 4957}, []int{4957, 4958}, []int{4958, 4959}, []int{4959, 4960}, []int{4960, 4961}, []int{4961, 4962}, []int{4962, 4963}, []int{4963, 4964}, []int{4964, 4965}, []int{4965, 4966}, []int{4966, 4967}, []int{4967, 4968}, []int{4968, 4969}, []int{4969, 4970}, []int{4970, 4971}, []int{4971, 4972}, []int{4972, 4973}, []int{4973, 4974}, []int{4974, 4975}, []int{4975, 4976}, []int{4976, 4977}, []int{4977, 4978}, []int{4978, 4979}, []int{4979, 4980}, []int{4980, 4981}, []int{4981, 4982}, []int{4982, 4983}, []int{4983, 4984}, []int{4984, 4985}, []int{4985, 4986}, []int{4986, 4987}, []int{4987, 4988}, []int{4988, 4989}, []int{4989, 4990}, []int{4990, 4991}, []int{4991, 4992}, []int{4992, 4993}, []int{4993, 4994}, []int{4994, 4995}, []int{4995, 4996}, []int{4996, 4997}, []int{4997, 4998}, []int{4998, 4999}}, + []int{2499, 2500}, + }, + + // 可以有多个 testcase +} + +func Test_findMinHeightTrees(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + // fmt.Printf("~~%v~~\n", tc) + sort.Ints(tc.ans) + ans := findMinHeightTrees(tc.n, tc.edges) + sort.Ints(ans) + ast.Equal(tc.ans, ans, "输入:%v", tc) + } +} + +func Benchmark_findMinHeightTrees(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findMinHeightTrees(tc.n, tc.edges) + } + } +} diff --git a/Algorithms/0312.burst-balloons/README.md b/Algorithms/0312.burst-balloons/README.md new file mode 100755 index 000000000..6877993a4 --- /dev/null +++ b/Algorithms/0312.burst-balloons/README.md @@ -0,0 +1,29 @@ +# [312. Burst Balloons](https://leetcode.com/problems/burst-balloons/) + +## 题目 + +Given n balloons, indexed from 0 to n-1. Each balloon is painted with a number on it represented by array nums. You are asked to burst all the balloons. If the you burst balloon i you will get `nums[left] * nums[i] * nums[right]` coins. Here left and right are adjacent indices of i. After the burst, the left and right then becomes adjacent. + +Find the maximum coins you can collect by bursting the balloons wisely. + +Note: + +1. You may imagine nums[-1] = nums[n] = 1. They are not real therefore you can not burst them. +1. 0 ≤ n ≤ 500, 0 ≤ nums[i] ≤ 100 + +Example: + +```text +Given [3, 1, 5, 8] + +Return 167 + +nums = [3,1,5,8] --> [3,5,8] --> [3,8] --> [8] --> [] +coins = 3*1*5 + 3*5*8 + 1*3*8 + 1*8*1 = 167 +``` + +Credits:Special thanks to @dietpepsi for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0312.burst-balloons/burst-balloons.go b/Algorithms/0312.burst-balloons/burst-balloons.go new file mode 100755 index 000000000..4f62826fa --- /dev/null +++ b/Algorithms/0312.burst-balloons/burst-balloons.go @@ -0,0 +1,38 @@ +package Problem0312 + +func maxCoins(nums []int) int { + n := len(nums) + + newNums := make([]int, n+2) + newNums[0] = 1 + newNums[n+1] = 1 + copy(newNums[1:n+1], nums) + nums = newNums + + // dp[i][j] 是 nums[i:j+1] 的最大值 + // ans = dp[1][n] + dp := make([][]int, n+2) + for i := range dp { + dp[i] = make([]int, n+2) + if 0 < i && i < n+1 { + dp[i][i] = nums[i-1] * nums[i] * nums[i+1] + } + } + + var i, j, k, max int + for i = n; 1 <= i; i-- { + for j = i; j <= n; j++ { + max = nums[i-1]*nums[i]*nums[j+1] + dp[i+1][j] // k == i 时 + for k = i + 1; k <= j; k++ { + // dp[i][j] = max(dp[i][k-1]+k点的值 + dp[k+1][j]) , i<=k<=j + temp := dp[i][k-1] + nums[i-1]*nums[k]*nums[j+1] + dp[k+1][j] + if max < temp { + max = temp + } + } + dp[i][j] = max + } + } + + return dp[1][n] +} diff --git a/Algorithms/0312.burst-balloons/burst-balloons_test.go b/Algorithms/0312.burst-balloons/burst-balloons_test.go new file mode 100755 index 000000000..860c7c801 --- /dev/null +++ b/Algorithms/0312.burst-balloons/burst-balloons_test.go @@ -0,0 +1,37 @@ +package Problem0312 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans int +}{ + {[]int{}, 0}, + {[]int{3, 1, 5, 8}, 167}, + {[]int{3}, 3}, + + // 可以有多个 testcase +} + +func Test_maxCoins(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, maxCoins(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_maxCoins(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + maxCoins(tc.nums) + } + } +} diff --git a/Algorithms/0313.super-ugly-number/README.md b/Algorithms/0313.super-ugly-number/README.md new file mode 100755 index 000000000..522a05935 --- /dev/null +++ b/Algorithms/0313.super-ugly-number/README.md @@ -0,0 +1,18 @@ +# [313. Super Ugly Number](https://leetcode.com/problems/super-ugly-number/) + +## 题目 +Write a program to find the nth super ugly number. + +Super ugly numbers are positive numbers whose all prime factors are in the given prime list primes of size k. For example, [1, 2, 4, 7, 8, 13, 14, 16, 19, 26, 28, 32] is the sequence of the first 12 super ugly numbers given primes = [2, 7, 13, 19] of size 4. + +Note: +1. 1 is a super ugly number for any given primes. +1. The given numbers in primes are in ascending order. +1. 0 < k ≤ 100, 0 < n ≤ 106, 0 < primes[i] < 1000. +1. The nth super ugly number is guaranteed to fit in a 32-bit signed integer. + +Credits:Special thanks to @dietpepsi for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0313.super-ugly-number/super-ugly-number.go b/Algorithms/0313.super-ugly-number/super-ugly-number.go new file mode 100755 index 000000000..1cdf6ae04 --- /dev/null +++ b/Algorithms/0313.super-ugly-number/super-ugly-number.go @@ -0,0 +1,38 @@ +package Problem0313 + +// 解题思路可以参考 264 题 +func nthSuperUglyNumber(n int, primes []int) int { + if n == 1 { + return 1 + } + + pos := make([]int, len(primes)) + candidates := make([]int, len(primes)) + copy(candidates, primes) + + res := make([]int, n) + + res[0] = 1 + + for i := 1; i < n; i++ { + res[i] = min(candidates) + for j := 0; j < len(primes); j++ { + if res[i] == candidates[j] { + pos[j]++ + candidates[j] = res[pos[j]] * primes[j] + } + } + } + + return res[n-1] +} + +func min(candidates []int) int { + min := candidates[0] + for i := 1; i < len(candidates); i++ { + if min > candidates[i] { + min = candidates[i] + } + } + return min +} diff --git a/Algorithms/0313.super-ugly-number/super-ugly-number_test.go b/Algorithms/0313.super-ugly-number/super-ugly-number_test.go new file mode 100755 index 000000000..e80a09adf --- /dev/null +++ b/Algorithms/0313.super-ugly-number/super-ugly-number_test.go @@ -0,0 +1,47 @@ +package Problem0313 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + n int + primes []int + ans int +}{ + + { + 1, + []int{2, 7, 13, 19}, + 1, + }, + + { + 12, + []int{2, 7, 13, 19}, + 32, + }, + + // 可以有多个 testcase +} + +func Test_nthSuperUglyNumber(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, nthSuperUglyNumber(tc.n, tc.primes), "输入:%v", tc) + } +} + +func Benchmark_nthSuperUglyNumber(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + nthSuperUglyNumber(tc.n, tc.primes) + } + } +} diff --git a/Algorithms/0315.count-of-smaller-numbers-after-self/README.md b/Algorithms/0315.count-of-smaller-numbers-after-self/README.md new file mode 100755 index 000000000..015e8587d --- /dev/null +++ b/Algorithms/0315.count-of-smaller-numbers-after-self/README.md @@ -0,0 +1,23 @@ +# [315. Count of Smaller Numbers After Self](https://leetcode.com/problems/count-of-smaller-numbers-after-self/) + +## 题目 + +You are given an integer array nums and you have to return a new counts array. +The counts array has the property where counts[i] is the number of smaller elements to the right of nums[i]. + +Example: + +```text +Given nums = [5, 2, 6, 1] + +To the right of 5 there are 2 smaller elements (2 and 1). +To the right of 2 there is only 1 smaller element (1). +To the right of 6 there is 1 smaller element (1). +To the right of 1 there is 0 smaller element. +``` + +Return the array [2, 1, 1, 0]. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0315.count-of-smaller-numbers-after-self/count-of-smaller-numbers-after-self.go b/Algorithms/0315.count-of-smaller-numbers-after-self/count-of-smaller-numbers-after-self.go new file mode 100755 index 000000000..21fa2413d --- /dev/null +++ b/Algorithms/0315.count-of-smaller-numbers-after-self/count-of-smaller-numbers-after-self.go @@ -0,0 +1,13 @@ +package Problem0315 + +func countSmaller(nums []int) []int { + res := make([]int, len(nums)) + for i := 0; i < len(nums); i++ { + for j := i + 1; j < len(nums); j++ { + if nums[j] < nums[i] { + res[i]++ + } + } + } + return res +} diff --git a/Algorithms/0315.count-of-smaller-numbers-after-self/count-of-smaller-numbers-after-self_test.go b/Algorithms/0315.count-of-smaller-numbers-after-self/count-of-smaller-numbers-after-self_test.go new file mode 100755 index 000000000..2ba336eab --- /dev/null +++ b/Algorithms/0315.count-of-smaller-numbers-after-self/count-of-smaller-numbers-after-self_test.go @@ -0,0 +1,48 @@ +package Problem0315 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans []int +}{ + + { + []int{5, 2, 6, 1}, + []int{2, 1, 1, 0}, + }, + + { + []int{5, 2,5, 6, 1}, + []int{2, 1,1, 1, 0}, + }, + +{ + []int{5183,2271,3067,539,8939,2999,9264,737,3974,5846,-210,9278,5800,2675,6608,1133,-1,6018,9672,5179,9842,7424,-209,2988,2757,5984,1107,2644,-499,7234,7539,6525,347,5718,-742,1797,5292,976,8752,8297,1312,3385,5924,2882,6091,-282,2595,96,1906,8014,7667,5895,7283,7974,-167,7068,3946,6223,189,1589,2058,9277,-302,8157,8256,5261,8067,1071,9470,2682,8197,5632,753,3179,8187,9042,8167,4657,7080,7801,5627,7917,8085,928,-892,-427,3685,4676,2431,8064,8537,343,505,4352,2108,4399,66,2086,1922,9126,9460,393,443,5689,7595,850,8493,2866,732,3738,7933,3666,2370,5804,4045,7903,8009,5387,5542,7593,6862,1547,6934,-160,9693,4560,7429,9989,7232,-594,587,6476,9277,4471,5979,6268,2419,6706,-727,1927,7361,9684,5519,2703,1723,5181,3545,4290,9421,4288,1656,1541,9632,1448,-490,4747,5416,4139,-845,3834,3349,8594,7882,2279,7777,9369,9917,8167,6799,-612,5604,5787,2615,7033,5986,-322,8631,1793,-612,3528,206,419,1413,8585,5658,-981,1391,8088,7035,6259,-651,3118,9105,4531,2569,7576,7981,838,5715,1387,8506,331,7844,9187,6812,1221,6916,2361,5869,1002,5944,344,310,-981,3541,960,7667,8478,6610,9678,6511,3891,468,1347,115,3683,-982,5993,1875,69,4723,9949,3097,6822,1809,4672,3064,4587,2228,-580,6866,8977,9224,-261,4311,5304,1169,-511,7881,4252,3520,517,1714,6316,9399,8902,-376,4452,-414,1282,8399,1582,4933,7642,6671,1530,6175,2321,7191,9479,7211,6559,4040,6830,7416,602,6970,7978,4941,2225,7949,7398,6964,5912,1328,9818,8268,-999,4800,2510,6984,918,2181,9142,6036,5447,4337,9459,9070,-171,5017,7625,2807,6172,7139,-966,5374,4320,1266,6637,7043,-636,4346,7651,2102,3936,6906,4677,2505,1357,6219,2778,5193,5994,4155,1350,9806,2404,9970,8132,1054,5197,1421,4908,1185,6817,7034,239,8012,1740,7582,8098,8786,3703,2030,8422,3912,3300,8238,4293,898,7025,4871,1781,3688,9833,2108,6812,4171,-539,7759,3088,9106,2839,9216,3165,451,2475,8717,410,5226,6835,423,7611,426,6514,2729,-715,4223,9212,6197,1684,7505,5464,5505,2320,2156,5838,3702,1641,6709,-930,5108,2480,3753,2035,142,530,3975,4683,885,482,7599,2955,2265,-883,6708,8365,6133,1966,1460,7730,9852,3032,4275,1292,5735,1491,6617,6958,9245,2946,-624,1845,7854,-392,3744,-978,9238,-805,3657,1313,5916,2077,6207,530,5617,9580,3298,7353,4722,3747,8642,3237,5917,4639,5602,-728,6265,-826,7002,3510,4661,-310,2975,3352,-212,9713,9852,5880,1397,2439,-820,9292,-681,8605,1298,449,223,6176,6025,3350,4342,2084,4888,4758,9008,4887,4404,9062,162,2160,1016,6123,2511,4042,1376,82,3456,7935,457,1749,1961,8787,4533,1900,4539,5425,2164,1770,8246,7766,-658,3278,5294,8406,1422,5607,4261,1927,3493,2392,6676,3451,5064,2997,6097,7442,7862,2216,5976,3368,6933,2461,9414,7472,4053,6290,2009,1017,1099,2779,8272,62,5264,8398,1890,2985,5609,4586,2658,4991,6283,5220,1668,5944,678,9951,7074,4800,8967,2062,9661,8590,471,4244,295,1796,549,8674,5724,8285,4021,1368,-958,-402,9705,5967,1157,9951,244,5400,6930,3452,1989,330,1980,2975,1402,3279,3690,4176,6125,2907,7731,6372,8838,5425,7919,2871,9449,5142,8611,8283,7954,9166,8249,-578,1611,8126,2502,4890,-571,4994,-683,3989,3653,2815,8919,2543,5254,8529,340,-624,7370,1735,2641,7211,8111,8408,5042,4490,4669,6958,1127,-890,2074,9249,3182,5455,-859,7150,9680,6251,418,5649,4673,615,7114,6124,6321,7104,5576,1016,2925,8126,289,-934,2022,6877,7511,-267,1696,2912,776,1660,-501,9965,454,2819,7877,6270,6488,4653,9768,3312,6005,-493,7951,2899,6184,8353,8827,1606,2664,-960,8820,1960,9089,6693,-364,2342,1542,7639,627,2780,2517,7982,-853,7262,24,2550,-796,9125,3520,4421,2494,164,6166,4169,7589,8133,8186,3013,2380,3445,544,6316,5219,4218,-38,8178,8832,4529,8194,4040,428,5452,5493,7630,9085,8922,7477,2353,-585,7635,4205,2173,1944,4167,3494,6455,6188,4657,3586,-325,5553,9911,4256,1723,1802,1493,9194,5591,3196,-223,2691,-117,8906,8400,2789,2352,7183,2483,5578,4266,-306,2400,9131,7736,2118,8348,3815,740,6895,1493,9705,9754,5703,6496,5884,-476,4455,2538,4539,5749,1977,1016,5680,4140,3049,5450,4040,6545,374,-230,5685,-274,6769,6985,-798,-372,4431,936,7060,2754,2744,5273,4204,6323,3418,495,5399,593,6757,741,-51,4156,6194,7365,8369,3761,2272,9370,2314,6914,4052,2152,9922,1067,4512,4572,5720,9598,4106,8166,692,5223,5961,2677,364,4143,3406,3736,9542,3765,7079,6883,9523,9919,9318,319,9929,6134,1143,4698,9612,106,7341,4280,828,6894,2226,2430,5142,9087,6927,9619,8258,7550,-927,3211,6563,1105,4252,8177,3778,5259,3520,6266,7478,3980,1575,6036,9990,4429,9182,5333,5816,7391,133,9336,8056,7056,4639,692,7110,2537,6815,1097,8222,469,9261,2375,-586,4661,8480,5538,8136,6058,4696,3731,6606,-731,1014,-90,1654,6886,6107,2479,8635,9985,6760,-696,2310,5149,7655,1957,8508,8067,4267,6264,-921,-105,-709,9832,5404,4340,4874,1380,9725,4136,6233,6332,3566,2438,3484,5772,1978,8674,8419,4552,7302,5311,1427,5316,5714,9505,-344,-298,9046,8574,6079,7278,9278,9025,2342,3776,6316,7669,-144,-522,4363,-569,5063,3258,6046,4751,4686,7960,1783,6635,4880,8120,6343,2867,9717,8764,8045,9294,9375,1931,189,6325,-139,6281,-388,5924,4815,1116,927,710,5047,2539,8499,4743,206,5781,4462,3542,8633,9148,6598,-662,3800,1253,-13,3688,2241,1134,7568,9947,7351,508,63,1095,7667,2773,3747,5769,235,5077,7841,-197,5441,9539,5216,1953,346,4655,1223,2132,1612,6767,113,3593,246,3768,1328,9948,8542,3259,1908,2411,9961,3524,8384,3801,-671,1815,4455,5425,8520,9058,9325,6496,3711,2433,1208,5974,8710,2362,-824,1243,6881,4113,1648,9862,6678,8915,-457,8099,9243,-81,8162,5458,4257,8471,-832,2291,7328,1319,1587,3912,3299,1441,5968,3427,7633,9174,9637,5881,4418,6218,5905,6847,-522,9440,7428,5545,3152,9299,1731,5722,-4,2846,9369,2817,2517,9466,365,1006,2647,8186,2194,9343,3738,9113,6461,5186,7680,3790,5677,9850,3599,3606,8449,-49,5545,5368,3938,9055,3488,35,6692,5937,6324,6136,8021,6032,3526,9639,6555,-47,4333,9436,1621,3893,9982,2777,7300,2105,6549,4584,6186,3708,5739,257,1729,4840,6098,7953,6575,1176,3646,637,169,3151,9486,9133,3686,1780,2044,-725,7576,8602,318,5126,-503,3678,8473,366,-273,6206,3329,7449,8260,6356,2584,-507,9635,2191,2085,3296,9386,1934,4715,3596,8387,5777,7565,1498,2966,6248,5309,8700,6752,579,-517,5712,6112,3443,5189,9322,7061,6511,1100,8506,5422,5206,6468,6521,4366,475,511,3687,1438,7213,9831,1864,1997,-922,3933,6013,5663,360,1203,7981,-486,2277,4924,4344,1916,4247,6971,2184,6671,5118,8156,5660,9056,4206,1603,8901,-999,8940,6757,3564,3756,3216,4452,1999,6922,6630,-882,9982,2340,-698,904,8642,903,7716,3505,8439,5719,4893,-442,3284,567,8991,-2,5119,1017,8683,7914,-683,-938,3958,7051,-729,8211,-699,9536,1634,1405,4296,-770,8602,2730,164,9906,331,584,-955,6185,4632,4550,4369,5737,8825,7303,2248,9028,3021,8359,1754,3037,5342,4757,4787,7864,4949,7283,1571,5827,3851,3148,7441,4384,5452,5609,6773,-727,355,2989,8771,3370,244,8380,9480,4839,8414,9408,8085,6775,2640,8403,263,1935,-544,9270,6237,1017,27,1780,1114,9586,5859,1227,5593,3130,8592,1040,7364,3465,-4,94,301,2938,1555,7759,5278,4390,-167,4905,5228,2601,3484,2349,8010,3956,9257,1393,553,3389,4562,1260,1966,9315,4666,1569,191,3479,-717,-60,-477,5924,2027,5531,4063,5460,3232,720,8161,7049,7375,1440,8728,2705,2994,7680,7914,71,9188,1485,4452,1425,5519,4,7129,4943,960,7946,6709,7035,-591,9704,4897,-402,3870,4447,8932,9575,8197,8382,3640,7782,-352,2209,480,7902,4827,852,3,6087,5001,5581,-582,3275,108,750,3642,1096,7237,4662,6547,-271,8013,-33,1713,9345,7500,1560,295,5041,422,8657,9374,8883,4466,6731,1191,9552,1462,244,6637,-722,737,3542,3099,5856,-490,3675,9865,7561,2431,9036,5846,7077,8970,172,2696,1510,8717,2647,9465,5455,8510,4990,211,9327,-432,4994,3262,6228,818,3362,1782,2079,-551,1937,1974,1956,6903,7234,3085,4678,9674,3635,2843,-125,3930,2661,702,150,5492,2351,2161,3758,8235,2101,3287,4149,4510,5726,1075,-572,5022,3096,8546,-235,5658,7021,7516,-849,3923,6519,6023,-67,7530,9333,-749,1991,8833,2535,4104,2583,1631,7557,266,4937,6492,2077,6813,4315,9968,-723,5753,2833,-984,4953,8055,9845,3436,3593,4356,6059,8632,4472,513,1409,641,-49,1407,1049,1448,316,945,8206,4936,3395,7808,-134,28,9538,9082,-9,589,9798,6046,2165,6846,1924,6466,4648,6240,4513,5002,5493,2400,3220,5578,4002,6948,5161,-426,3673,9618,8592,4690,2011,2248,8558,7890,5397,2414,3568,8190,9334,7378,8542,4147,5964,6820,7219,6007,1407,5325,4191,259,7098,8980,742,3111,3783,1089,5273,6546,7302,8216,953,1804,-481,-79,7487,9827,2757,2132,-836,8545,2017,7649,2550,8651,-259,112,9355,5483,6124,4499,3851,3927,3561,5420,2964,3498,7861,-727,7656,4914,596,5593,2520,4104,3810,8500,7971,1303,7801,3652,7840,8550,617,1739,5990,1798,4251,2104,8698,197,4552,6506,8751,6143,4879,5305,4796,3192,2759,5221,2096,4803,8211,4675,5288,8721,435,6416,1868,-887,8444,5363,5804,-485,6296,7503,5177,1445,4364,8153,8206,-230,4387,559,4229,8308,323,3792,9869,4525,5948,8213,6352,1412,-390,9143,537,-582,6238,9643,1072,400,4239,9040,5220,4827,6921,9102,8268,2914,1248,5472,6122,2742,2638,7357,1202,5933,3230,5463,-784,1159,7994,8755,2976,7185,6975,-299,-256,1368,9408,8662,1245,4797,8642,9461,1115,-815,-872,8049,8542,7994,6512,8794,5838,170,3264,5602,5492,4453,6291,1590,3856,7289,9827,4455,7641,9615,6093,4468,1733,909,3910,865,8837,6111,8485,2202,8003,3576,8703,948,3971,3893,9810,3662,403,5996,1806,6435,6070,4199,8086,1765,1545,9266,8059,2547,6616,7594,4092,7027,2958,1901,4317,5928,7803,7822,6045,3648,1002,7468,3107,7911,9291,7053,-799,5713,6362,9234,7945,9627,449,7527,6293,4788,8137,9964,-194,6293,3880,5948,6131,1404,8863,3288,3936,7135,4852,5818,7153,1515,2695,7623,2483,-229,3272,4167,9091,8562,1823,6680,-393,9592,3987,3519,9027,431,6601,3349,4221,2650,9707,8329,947,2896,7380,271,4265,7562,9119,1644,276,6563,6196,1899,3443,4258,814,5490,-442,6866,2299,5408,8618,1679,5215,-112,3825,5229,1501,5265,8302,9624,3512,9561,4379,1683,9040,9995,4379,7870,7286,8820,5388,9639,8669,7312,4337,600,1832,-598,1490,7416,7613,3554,1448,1881,7148,4921,6560,1789,4394,5017,7106,8568,349,9005,7629,8863,9906,2578,6780,2999,796,5315,3078,6506,5431,3948,2838,3816,9748,1747,2969,1603,8499,9807,9594,8628,9711,9641,1328,561,4425,683,-858,5647,5565,2354,1704,7008,6352,1793,9380,1218,-636,7071,3875,7003,-106,20,-233,6777,6512,5610,1879,7585,-498,-216,9206,-282,4464,4777,723,3981,3419,4044,-926,8941,9878,3411,8201,7237,6021,1697,4294,1541,9335,459,-450,-195,4427,331,6519,4529,7777,3748,4326,8234,6921,1101,6842,-109,3938,985,4190,516,589,4272,1807,8101,597,4041,5117,9822,882,9580,9769,7662,3042,146,6872,5925,791,2336,5846,2183,-923,3747,6417,-107,6681,4133,9693,332,1465,9276,1447,678,7049,6248,8105,-348,9761,5127,757,8455,8143,3706,7640,5650,354,1019,4300,8655,9336,4627,306,6901,-56,4467,4367,6901,8791,2412,192,6439,4356,-847,5751,4701,7719,3345,6927,-361,5697,6065,3873,1565,9350,3172,6401,2312,2249,3740,1633,4289,1829,5730,8011,5999,8216,4922,-405,1165,9984,1589,8064,4536,4097,7626,5934,46,3502,2133,4861,6149,9568,4446,6372,9923,-602,3980,8588,3613,-908,3301,8202,5073,4156,2813,7170,1164,1578,8893,5499,7758,763,549,9917,3841,-761,8625,2424,-317,9725,-540,287,4221,4157,6819,7719,1309,6090,1731,6922,3700,5172,664,-436,496,7288,2719,4908,1976,1575,4507,3410,53,-659,965,1691,1707,5954,-175,2736,7619,-931,4906,-768,7343,59,8041,8075,1058,2702,6003,9820,6096,2527,5953,-717,883,-231,6228,1391,358,866,260,3101,8641,-372,5667,1210,657,9227,5544,4504,4647,2667,947,8308,6520,329,5929,9997,8624,4168,5434,-993,1131,2820,2748,3763,10,2094,2403,8224,6195,4941,9734,-85,-398,6054,496,5659,8596,-942,4663,1754,9837,-233,7771,4194,8622,1651,2475,5615,7846,3913,1623,1083,8004,5761,6974,305,7640,-837,3782,656,-717,9048,3480,5440,1502,1223,6831,7456,2639,1605,7579,1646,5079,8384,2315,1148,-872,2480,4633,902,4336,821,-266,734,1137,6649,8472,7373,6875,7803,1285,7911,4299,2857,2842,1448,340,4335,429,9776,1335,7687,683,4514,4751,1479,936,911,6723,-438,593,7598,8586,5595,-111,8732,9909,-260,8150,3642,3685,6775,9833,8285,2350,1558,6610,7478,5397,377,1331,7452,6149,4946,-16,1431,8751,4324,8417,-814,5213,881,6885,7087,6070,1096,1359,4582,3919,1093,2530,8169,-916,6475,668,2965,8395,748,8338,1720,1324,5422,9287,5921,7563,2004,5338,5460,7600,-20,1487,1021,2152,71,6892,6357,-104,9696,1950,-525,-324,9454,4285,4928,4694,3226,2359,8443,3353,1362,8109,568,9809,2374,8087,1530,486,4339,4550,9728,7511,3136,3666,3063,916,541,3674,421,3044,3382,8974,-269,8042,6509,5186,3427,3510,8015,6505,5923,7052,8995,3886,8802,2722,6875,5622,465,1562,4542,-824,5079,1040,1446,9077,8536,-215,8083,1398,2181,1753,5125,8284,2717,5165,3487,6588,903,5640,3969,2772,1301,8207,7933,1308,4202,1029,-397,9190,-829,478,6586,-563,7956,-903,1485,8742,7332,3453,5534,194,2538,8786,29,5057,9897,-641,1517,6947,7080,5235,-514,1985,4365,4503,6966,8363,4894,7093,595,7236,6176,880,6247,2312,540,3776,4902,5499,1746,5848,356,5310,5425,5038,6360,3638,6433,4940,-286,5083,4480,3923,1785,8882,334,4927,9559,8792,4666,3768,9420,4492,3344,9996,5597,6670,9026,3778,1827,8328,9543,8398,356,8833,7291,-831,8190,-201,2713,6153,7648,3413,2336,271,4000,7087,8194,2358,627,1600,1974,1332,9932,7769,-620,4275,9764,3689,1293,3888,7263,837,-26,1669,-357,9699,5446,8475,3114,3057,7832,626,6912,4788,4679,2674,5367,2838,1970,3505,4018,693,6753,5461,4766,2281,1306,6972,1764,9671,1153,7722,-148,9946,5831,854,4605,6310,6948,2018,5290,-541,5899,-555,5220,1609,3818,2086,2699,5137,6093,8520,9930,6770,7570,3113,3629,1886,9551,9362,5585,2498,9412,9107,8208,89,48,3235,5614,7411,4551,3203,9746,8057,1263,2113,6876,270,2090,-7,1649,6172,6607,220,1366,5694,2569,-519,7645,5665,2938,6192,1994,2985,6290,-458,-867,1643,1187,2065,2078,7302,2904,3684,2407,5816,6043,5516,6317,8489,-684,-609,2925,1399,4185,6900,5552,4558,7980,5530,-943,3672,5107,5763,414,4781,6718,5509,8952,7528,3756,9731,7352,4254,147,2684,3434,8231,9878,9611,1684,5510,7124,9059,4569,-139,2966,6949,8356,1406,906,6581,9660,1030,2649,4878,2568,334,9531,5667,9102,7191,155,3085,5959,5141,109,-312,8457,7882,1920,-665,2709,9119,728,3992,9354,3566,2174,8331,7861,971,3045,8428,5954,2486,2582,9346,3038,8231,1414,4279,6878,6350,-622,2991,4372,6911,4604,21,4828,4690,9142,6293,9799,1382,4552,3033,3577,816,6945,-495,5553,6557,760,5344,1122,8722,5872,3912,5560,6512,3608,1818,-649,9391,2875,1556,-69,849,788,2844,-540,9727,5641,5131,9668,3971,2971,4612,8215,6910,805,7064,8866,1457,6679,5047,4730,2273,7333,6570,8396,2280,996,3813,1634,-825,1535,4462,1072,8452,1727,9304,-672,6998,7530,866,1670,1989,5024,7449,7819,9974,1438,8971,2586,9806,4011,1032,5059,4537,4484,-112,3292,5738,6848,3824,27,7462,6771,9221,-406,5300,4572,6666,2385,4347,7939,7728,4780,3224,60,2409,2944,7777,2859,2057,9543,-401,7318,3605,480,8773,3419,8669,7405,-710,2190,7699,2235,73,3635,3558,6149,234,5206,7540,4983,4369,9483,8050,2420,9645,1315,7895,2844,9540,8159,8570,7474,6953,1040,3061,6179,9557,-284,1446,1289,4901,2021,7562,-732,1244,5005,2082,8427,-205,-253,3756,1403,6612,5085,9844,7956,8671,5829,4068,9505,7809,3178,-29,4789,9062,5391,1885,394,-146,6184,9288,916,7399,3402,3252,7584,233,-381,7594,-886,5536,3478,9891,8255,9435,1979,1459,3287,2771,8715,5793,6542,8549,7959,2729,4864,9049,8265,-904,4930,4980,84,4311,330,5980,9263,4042,9335,7134,-538,2340,-673,7051,8998,1808,2763,5070,3005,1167,4604,2564,5557,8652,8129,202,3396,6814,6708,3055,9245,-323,5964,4349,4550,9209,-200,7533,8839,6623,7406,9111,9592,1538,3843,1962,-941,1453,238,2624,7539,2111,3177,9574,3404,369,2437,3007,2834,5334,9612,-287,-742,-585,4028,9908,5594,1769,3467,7964,909,6543,5628,9248,8075,4748,6446,-537,6265,7987,490,9359,2894,6115,5055,-150,5522,8748,4998,2335,4229,6110,5335,2069,914,8491,8404,-36,8730,8229,5085,7524,6799,-530,3132,4600,6914,8407,6439,8630,3859,697,-240,4056,8935,298,1907,347,1149,3555,8726,4936,423,3145,8372,3849,2315,5842,3824,549,4898,7676,6746,1133,9779,7377,9611,64,9987,9405,-701,2016,6889,6815,6191,4672,-107,2521,-20,346,4686,9064,-185,8709,7213,1684,9009,-567,6676,213,7708,4586,3242,-658,8752,9326,6683,6736,3492,5809,3542,310,2098,1024,9670,3049,-149,5850,8121,2547,151,1844,186,1085,-200,3087,3051,7712,3368,1428,-845,686,1927,6312,7841,817,37,8283,3504,6467,9795,-394,2940,3452,4076,2918,1123,2981,1349,6682,4047,4404,9545,8878,3566,9100,897,461,-519,1000,2577,23,2979,2801,3804,3444,1375,8297,5401,1113,8479,7745,-315,7226,6173,5289,149,4569,-14,2413,4840,5928,-431,7021,2984,3493,4001,3911,-815,3501,4011,-466,9164,6402,9830,6303,-884,5336,1826,625,4335,2956,5501,7576,2293,6779,7043,8022,8815,9971,8377,5663,7871,1327,4521,1468,8710,5115,5101,1698,4931,2247,6158,-933,9012,3824,1698,62,3157,9741,2613,1688,269,5702,5935,8921,-50,6172,7181,6173,5737,8902,110,8319,2188,9720,-910,-783,-894,1169,344,-381,1031,4143,8407,1371,820,7092,7738,901,7988,9350,5655,188,8884,6695,597,4160,6252,3057,2499,1246,6258,1557,3484,-263,3367,6956,1552,9861,1870,1328,-487,8651,8045,4475,4153,888,4266,3090,3226,6372,2077,2542,9401,-846,8973,6449,8149,7662,8781,2881,2866,7805,511,6434,-88,-569,983,8913,8576,1100,3892,9272,6291,3979,1184,1142,-140,3747,9029,5235,3330,6124,4539,6871,7353,8384,8139,1783,6688,5392,7359,-881,6512,5048,3348,703,7283,-828,484,4245,7655,628,844,2853,4287,8989,1721,8261,9047,8691,9802,1022,746,1955,1379,9983,3465,6810,6503,8667,9067,4670,8532,6461,-542,6735,8007,6979,823,686,7618,4376,3532,8143,2348,57,7990,6996,1530,2846,8801,-634,2633,420,8171,9375,5993,5918,-409,-300,4405,1151,111,6599,-29,2646,1664,7720,9569,437,7964,1146,5299,7997,2041,7162,9109,7680,4940,4163,6989,1937,3220,-353,2643,-864,9167,1211,-671,6189,961,753,2407,5322,5093,5146,4215,8762,2163,8048,5623,5239,3023,-984,4775,8600,1075,907,8847,-998,1241,4057,3466,-11,4284,3750,2755,7501,6002,2615,8465,8455,6595,8491,1726,4575,3557,7816,1119,9954,7310,-938,-680,8347,7448,4705,4354,6115,7185,6905,4775,931,9458,-195,7426,134,982,8722,8698,8888,4549,6816,6509,2757,6875,8647,3833,7503,1436,6233,4728,9187,2520,9494,5585,3689,6427,9999,1353,1768,2965,3554,8629,843,-255,5551,737,7897,5039,6233,8282,5527,9305,1910,6272,3313,1329,606,585,5703,4571,7306,3677,5433,7016,-441,104,5925,8177,8282,518,6288,6746,7710,9942,-147,3694,1205,-802,5449,9765,-321,3115,7149,9418,6934,5718,9295,5493,1931,1092,8171,2770,3573,-133,6384,8499,7071,513,5687,9925,4356,4417,3357,2113,9150,9248,878,3289,7910,1300,1472,9702,1076,4844,8374,-956,-855,5183,8348,2598,9007,6800,3825,4709,4678,6883,8787,5185,1271,8774,3466,153,2436,7253,7522,2179,700,5966,3882,5316,6695,280,996,7831,4494,-594,1450,8196,2969,4678,3972,5363,9918,8438,6073,3920,5828,4561,6150,6280,8809,6542,6128,4791,1350,-589,6830,2692,2157,5506,4480,6019,5544,6751,7913,4909,5712,7593,447,7773,6073,3664,6156,398,4679,6734,9039,5826,104,3543,740,3359,6617,919,1511,-387,4985,9964,3583,120,3639,7110,3497,1623,6074,8766,7144,2716,464,5176,24,3180,2653,710,938,6663,2737,3919,5560,3191,9070,-12,7016,6784,-16,4844,5995,3293,-644,4175,5477,347,466,1721,8960,2424,9477,5932,2160,9940,9098,3411,7409,4809,5506,6784,7598,8500,5358,6928,2703,9115,5889,1595,5599,6316,-611,-572,6462,2943,7732,2448,5168,-452,69,2491,-341,9973,3656,9792,2915,6347,5450,2884,1273,5931,6361,2362,2680,1149,346,8518,81,7770,9916,3828,4938,8936,-35,5269,7662,8818,3797,4916,6567,3861,4820,1758,5910,4899,5046,631,1956,187,9079,3463,3873,6770,976,9415,2778,9935,6030,2278,7929,7813,5039,9346,1346,-836,5447,7919,6947,6608,7639,9953,165,-776,5969,2198,3260,5540,92,8400,5052,-907,7216,8854,1410,6368,6307,6411,5546,986,726,6800,9022,2211,4972,-217,8152,1914,5270,9754,5949,6864,726,4871,3831,3540,-645,-798,3752,2859,2383,8457,9116,1168,9817,290,4303,5551,237,8233,2384,-710,7912,9657,8341,8946,2651,9903,4308,5646,1396,2054,7935,3975,-983,3909,8766,9371,1278,-82,796,2209,2621,6283,9236,3358,9182,3481,8336,2099,6899,4510,5784,4174,2102,6583,1712,-983,5615,1784,-800,738,8470,3685,3070,8304,-131,7591,157,-909,4277,8073,3007,9684,7121,-551,124,3560,-706,5659,7542,5828,-194,6697,7534,2138,2000,908,6477,6952,3684,900,9580,7501,2291,56,5219,6511,2902,-709,2196,861,7394,3737,5238,5262,5997,4872,8996,7659,3325,4221,8563,3728,5191,1392,6445,9212,-223,9082,791,863,8972,-673,540,7716,6880,7429,-669,548,3405,7392,4962,4841,1357,5961,6008,9801,466,728,2745,9750,117,1889,944,-921,8483,4964,8539,8830,9403,3676,2883,535,2524,2992,8236,4812,5617,2779,5567,7816,9140,7324,5307,3336,9102,1560,356,9530,7293,1810,9141,6338,1589,4773,7826,3063,6381,6098,1790,9625,5595,1825,5925,3959,6992,4332,6019,-7,9074,1209,8322,1554,5827,785,6916,7568,5127,5883,5304,4602,3496,3228,9568,5287,8425,730,9021,6057,9450,5053,-549,4588,1451,3337,9475,1050,1681,7256,9419,3478,9569,148,-643,3903,9674,5404,2836,6783,-620,2610,7080,5057,9577,5108,4592,7221,435,9225,6914,6261,946,-13,5981,3017,4569,1626,1940,9176,5170,5763,5104,6629,7879,4751,9063,2349,8173,6337,3,3033,9631,4907,4653,8077,6579,9433,9700,9863,3082,4582,6033,-745,8549,576,7137,9155,-407,6198,570,7831,2656,8994,8800,2727,5829,6872,1869,1247,6746,6617,5404,8737,3568,6186,5350,4347,905,5032,8501,7058,8724,5425,2822,9372,333,4516,8713,6075,3536,6239,7811,6455,9917,9111,798,3249,-761,8918,62,3911,-45,7024,5920,4266,5390,2835,9087,1404,2581,3730,4396,9259,9484,9377,3897,2307,5673,4124,4050,92,7264,4052,4225,6460,4787,3625,6457,7829,8027,474,4449,6819,7910,7831,1599,6774,9749,6218,9215,6607,3967,501,-258,3484,1796,9745,7875,7622,4869,7634,9116,5130,7535,7154,7571,6190,2406,8232,8883,5822,7172,4149,7520,4658,6067,2653,2310,84,5280,7145,256,8705,703,9054,6812,4360,2821,1339,1168,4943,9323,-639,1335,8393,2908,9985,4847,3079,9097,2895,4759,8293,4916,-587,6565,-431,-750,4103,3136,4561,4751,9179,8330,-571,9926,-670,6096,5633,-286,3281,3739,-280,2667,3104,5136,9012,8767,6918,8491,8572,4128,862,7640,2360,-106,1030,6697,786,1948,8788,8659,9061,5596,8445,3305,5846,6511,4999,5282,5321,2797,1735,5392,5772,-23,4934,222,-955,5738,7119,5337,582,3203,4554,4391,-787,-667,3235,979,2056,6200,303,9188,2821,3700,9942,5834,7193,3379,2620,1318,7027,8549,7635,7231,1701,2895,5658,1647,-34,1697,1806,-588,4781,1408,127,5403,7320,9995,8595,8258,4048,-698,3736,7343,3267,-466,9779,8551,8014,2617,9496,6011,7347,6559,3488,2522,9264,2660,4729,63,-408,8100,7765,-126,5437,4202,4682,9065,1020,184,9450,5997,1759,4491,8932,-542,8064,2530,5500,-911,7157,7817,4255,6655,5277,9215,-300,9331,1023,9097,4802,1272,7031,9200,7906,7953,5007,1354,837,3016,9036,5377,8707,60,1745,1277,5390,7552,8232,3589,1080,1615,-221,9090,2625,6183,4632,5437,225,7686,9600,2262,9179,8517,4844,2635,4488,2928,7545,4530,7637,332,4370,4796,8779,2871,7834,4565,6267,1569,1241,6856,5165,5350,4637,3317,505,985,1922,7994,4171,2136,5138,353,1610,6611,6206,3177,63,7776,7472,-168,8225,8910,1315,4553,7458,6912,3164,5876,2112,6395,8937,2238,8023,6836,7014,6256,-253,8723,3980,4737,6783,1909,2268,8811,7558,4305,5117,-764,1447,806,6672,4467,3624,79,6709,55,1327,5461,5277,3032,5611,-147,5933,8557,3990,2775,1162,8831,-676,595,2646,6274,4454,1990,6947,941,1086,5290,4710,5441,6395,4669,4330,6649,-867,-979,654,6599,3640,3881,2629,-726,9893,-921,4094,-133,3993,1343,1748,5781,5265,3307,246,3766,1925,-39,3778,8622,1755,5092,5465,7080,4440,7556,8290,4722,2720,1452,8235,3161,6204,3471,5575,6561,9884,5349,8356,1173,8844,1406,5924,8716,-42,2456,384,1615,6979,1089,922,2384,5158,2279,1872,837,2086,8190,4128,1907,1249,757,2754,6781,3428,6485,7708,2196,2575,-59,6810,8732,5624,3299,-393,9155,-939,1079,1728,295,7104,226,6305,4489,8674,-132,9217,8226,-391,9832,6918,2464,5522,8691,8957,544,3175,1748,4981,9728,8572,5363,821,7583,4628,6837,3395,2012,7800,935,243,-474,7930,2851,3992,7960,1205,1232,1115,-411,7323,6201,1144,1801,1284,6310,2446,7227,6151,503,1367,5396,9645,-361,9317,2667,2735,1224,6687,8485,2565,1055,8723,4965,8675,2611,9534,3661,511,6929,4668,2734,6503,1325,7322,3390,9864,2976,2158,5116,5864,2719,3720,2555,8877,8625,2232,3942,1084,6029,3555,1374,616,533,7791,7466,1212,9619,9073,280,6521,713,494,5435,3423,6602,9608,-12,3012,6815,5095,2339,1629,-452,-296,7626,7548,1902,4234,2913,5500,1143,6403,1497,3835,2566,7443,307,6450,7850,8868,3108,4319,1984,-635,4665,538,2272,6845,3617,8742,9432,4058,4932,9791,8533,3156,3602,1474,2046,2658,933,6871,6526,3036,2083,8177,2480,4342,6520,5618,4681,-353,-299,250,6380,6004,-322,4727,3124,8033,7712,9454,2435,8778,8386,2100,8332,536,7170,331,3734,8262,7382,7712,3636,1060,4770,4147,1025,5148,3605,5098,6373,554,7897,3682,8309,6594,8575,660,6221,1356,921,2362,3148,8003,7977,3413,9331,5870,6885,5087,3410,6133,841,9934,9316,1043,5055,4670,9511,6793,3507,3704,5458,5339,8234,44,4826,7931,616,9200,4115,67,1366,816,5670,2180,4867,5822,1250,2043,9005,2272,1569,9302,521,1957,1001,8750,205,-145,7029,8227,8054,2936,2273,-513,9315,-131,8312,915,7917,7755,5103,3280,6700,-133,6596,7581,4074,3973,8589,4535,2644,2732,746,7097,8639,7887,8990,8606,6213,9174,8591,192,4051,2199,6020,1778,3931,3093,3907,7519,2074,-394,2739,281,3194,4692,5142,5730,-759,1884,3401,2021,7432,-981,3790,1797,8945,-248,8768,1190,-132,5078,2503,4080,9443,3150,9194,758,1477,2172,8608,1758,6204,5422,9419,6247,5378,4948,6218,4909,-299,1486,5239,5123,2470,-173,6588,9831,-581,6357,5046,1973,6224,1536,6424,6706,4126,936,9321,4425,5712,-127,276,52,3646,1216,1426,9720,6879,1722,4464,3425,-955,7568,7205,9326,2929,2536,3121,3272,1908,506,9725,7957,6154,1173,5803,-798,-977,2980,4869,314,5292,-216,3823,9664,8202,-462,6105,957,3934,194,5899,5852,831,-799,5891,4627,9478,4842,9106,8799,3900,7259,8797,2244,6539,6269,2130,-468,9109,464,5537,-686,2491,3077,7529,2502,373,-682,5650,8394,3820,6231,-391,6579,2828,1288,8065,7174,1546,238,8909,2685,-571,6370,3903,6762,144,5039,2046,3364,1712,5891,7048,2870,5597,9580,7372,2002,4702,4989,4684,1715,4484,6583,3927,1554,4197,5558,8588,2800,3499,1444,907,545,2175,6796,48,2778,6798,8490,9866,259,4396,8487,2244,7965,5069,2796,2294,5988,9492,3952,2883,9422,9946,6299,4511,4618,7431,2151,6899,6004,-229,2824,-426,7476,3190,9344,2458,6005,5827,2105,2582,412,9897,6649,6166,4863,8724,2077,6457,1623,9299,9878,9006,-212,1685,9297,8671,4721,3614,4210,2023,704,4146,5015,8289,3013,-457,7955,3342,6514,-950,7728,6703,6509,2197,5639,6375,8515,6276,2871,3724,338,3450,4048,-707,8831,400,8877,9803,9612,7361,7999,2085,1480,6460,9261,7444,357,3112,6072,6503,5260,7309,8935,5869,8519,6809,9783,9062,4832,1427,214,2966,5235,1320,-432,6445,9920,4410,5447,5527,8441,3231,9122,3249,3806,624,9171,-152,1426,657,8886,2039,7147,9008,5103,4331,3203,4919,-668,4928,-981,1950,8154,3275,7464,9797,938,1161,1342,8275,6522,3673,450,5846,8633,9722,5109,5374,1490,-965,1109,9131,3588,4838,8917,8146,8216,7968,7333,245,-861,1763,6059,8099,9451,1741,9029,8916,2061,3959,1613,-41,5068,8941,1295,9840,4254,6566,1823,9402,1534,-205,8597,3371,1065,4264,1117,4864,5847,9091,472,-529,9467,9389,4274,1005,449,2865,9541,9786,4103,2196,2479,-331,9948,547,8202,618,9875,7244,2043,9947,8998,7501,7002,-461,5337,865,-698,126,8237,3823,8832,7661,72,223,4523,2384,1131,-319,5384,6675,6280,1248,4429,7786,-37,7173,2435,-704,5289,6544,9505,8,623,4541,6642,2693,464,6652,3810,7080,2110,8271,3999,244,4346,7996,2228,8952,5381,2139,8632,8561,4747,4263,9657,6640,391,2132,4517,6833,3711,4470,9554,3652,3243,8485,667,4697,7899,3499,9251,5661,-148,365,3341,-334,5506,9416,326,3125,8000,8692,2278,2419,6572,9732,7205,-570,8282,7041,5291,9192,7600,8801,9616,1304,3040,345,1652,5736,-901,9252,1019,4695,4581,2284,9231,1401,505,2388,8236,4930,1236,2360,1826,-663,5360,1387,4665,-218,1938,4893,440,8815,189,1347,6904,5859,5557,5235,-519,946,7802,3990,3403,7323,6859,9923,8979,3904,3879,3369,6471,6430,1681,-38,498,1047,6758,3831,-830,3671,2901,7956,2470,6235,8856,1058,-636,6089,6333,621,5480,6461,-217,8573,3283,7374,8914,8250,8709,1466,-285,3759,8279,1211,2940,8233,-334,9013,4677,6821,8333,8439,2727,3338,7733,9295,941,5909,7098,2262,7158,-785,732,7157,60,1189,7136,9122,4348,9026,7906,6322,6245,7255,-335,9573,6818,-7,3527,7858,-211,2700,6095,-297,7349,2744,-90,-623,5371,5875,4612,1816,5475,5976,-254,5882,6994,1630,7897,1595,6900,6267,8857,7339,5310,7324,4696,-8,7384,710,6696,578,8881,1436,6935,4246,7231,-991,2560,8157,2267,6036,9486,1557,1305,9612,3119,8814,7461,5154,6960,3696,7071,4901,5845,6840,1968,7724,9836,4265,2003,2651,5782,9900,534,8648,2660,8759,4969,1577,4302,1304,1636,7804,4583,4930,2737,2252,2968,6843,7627,-249,-863,3117,2491,4794,7090,3956,-361,1105,277,3979,-811,7344,9425,9065,3798,2050,3923,8915,6868,2756,4234,9352,8930,4847,2958,7037,2239,2729,4382,2954,2767,-175,6318,2167,1573,3805,1021,7218,5935,7360,7200,9314,5443,7491,843,1821,7390,-388,9842,-813,6265,5646,3537,1936,3425,7249,9037,406,8650,2782,2610,6968,4068,8349,3153,5628,1694,4333,5730,2447,3388,3731,-179,-524,-867,6634,6928,5036,9175,7178,5985,9500,8982,3791,8220,7248,8101,-102,9158,4232,936,-149,3760,8957,-62,5193,8949,2254,3542,6445,4361,2939,6470,8529,1696,7003,1632,7384,2359,2904,3691,4666,3147,403,5992,6926,-955,6446,-124,2638,4207,2517,8094,-412,6297,5734,3262,1300,1489,2755,3285,4322,389,5738,8810,6065,2176,5387,6264,6616,332,7727,4304,4276,7090,4640,5770,3856,6320,9094,-199,6178,864,-177,4361,8137,6536,6414,5356,5045,6211,1653,5602,-278,2420,3357,2519,8417,2037,8418,-66,7120,6700,5178,-710,6596,6126,3024,6148,9619,6128,8922,-676,9909,1662,9526,1434,8366,-516,1351,8167,-525,-51,3978,9521,8915,6515,447,-993,236,3256,573,1179,8137,4173,691,7781,976,7214,2888,-524,3032,3422,35,371,8872,3423,8574,1836,4721,4582,2218,9157,9953,2274,329,7959,112,8569,9624,1113,7250,4104,6515,3637,1239,4341,8656,1799,7075,3833,2620,1887,297,2269,8688,-671,9769,4995,775,9766,4204,229,3072,-105,-433,8655,8992,7136,9445,4929,6656,7827,5044,7444,4016,1517,-817,2274,4636,3109,4528,9366,1935,4285,9549,6050,2720,7457,8146,7207,2431,2661,8346,1225,275,798,7959,7216,3034,6109,410,370,1469,-461,2651,3176,8730,3065,7219,1015,7886,-927,1008,8148,-961,2641,6864,3726,9478,5222,1631,8273,9559,5328,593,9383,5420,3569,6680,6083,7822,5271,1674,4830,-909,-944,8746,9277,7212,3556,6598,2647,3294,2002,3166,7482,7175,5717,7707,4586,9191,6909,7613,3134,6853,5947,9134,1556,455,-540,1346,7179,3977,7778,679,4818,1850,2116,1754,8901,8031,-860,4236,9395,132,3696,4527,3848,2965,4065,2226,-823,-443,7556,1436,4859,9405,4615,-680,641,-526,9711,-642,6996,4872,2683,7670,8481,2312,9094,3788,7686,1932,6855,6850,796,2494,1659,-836,6873,807,6286,5403,1968,9876,4789,-826,3352,5582,6964,4390,5623,2958,7502,8028,9472,268,1485,1895,8284,7057,8157,1637,5315,8596,6688,1665,2742,-126,3941,5956,6190,8034,-647,6645,5592,1383,5009,2834,201,9981,3653,2470,4137,3121,9451,4060,-114,-184,5475,505,687,5716,4601,4916,5745,16,7733,3489,592,7280,4417,3049,9286,8261,1804,4444,2089,7117,1427,7581,6438,6993,8092,2280,9448,2324,6269,8090,2796,2666,1339,-862,4487,-98,5448,7162,7373,9751,4188,7829,3499,3153,4639,2541,6372,351,4408,4446,3637,6293,9887,1261,9478,4666,535,1725,7783,6186,6000,8781,6668,3208,1980,3499,7715,656,3732,9672,3613,9235,2245,3344,2834,3511,-789,3595,2316,2649,2066,9220,8474,1353,9508,7618,4524,7849,8544,193,8636,8062,3289,2895,3124,3565,3665,167,4290,9442,3717,5917,923,4003,2141,2020,4348,7699,5383,5781,763,1019,8521,7540,-493,549,6419,9555,5619,1145,3843,4348,1404,8638,5807,-196,6921,7685,664,250,6998,59,5665,568,1391,4087,8627,3937,4180,9373,1993,7062,4091,1957,1851,9824,-242,1932,1318,6892,2982,-259,4928,7732,8319,9696,8931,6753,5216,6520,3756,34,3006,8213,9673,7111,815,4771,5786,1446,5555,5049,4319,8615,6246,9769,2822,2755,2579,7121,2554,2070,154,6803,2362,4541,6567,5926,1805,6843,4020,2962,9695,1533,-911,5386,7263,7444,-313,654,3466,6513,1705,3927,7605,846,8799,3990,1314,1648,-364,7351,6887,933,3124,9729,2730,4458,3730,3189,8412,8412,1922,3981,5484,862,8854,5323,8011,2083,3154,6380,2448,8571,2187,8837,430,8345,8470,4387,9168,7945,7808,178,7799,1459,5823,3081,2691,8828,7051,9641,940,8622,947,7368,6908,1134,-588,1605,6202,-60,295,4617,5442,5632,6219,4766,5462,5182,9702,35,9515,9532,5135,3945,1671,9773,-541,5578,1266,4237,6908,16,6965,1065,9102,1351,-973,-505,9654,4454,3824,8961,9096,1695,5012,3365,1583,-723,-734,9721,-279,9616,4144,3819,1101,6902,2964,4122,4523,3088,8469,8877,864,-763,-759,9108,4870,2717,3119,1114,2758,2327,-847,7550,-268,7614,3071,9393,9239,9411,5604,7106,7745,6064,6924,9418,-126,9267,1861,686,2595,-270,2907,-305,6239,6674,-834,8732,91,3697,-171,1584,505,9616,5023,6198,-476,-103,-13,7824,6286,6645,2415,1027,8351,4564,7865,816,-898,3162,1324,6263,4696,2907,8040,4499,939,1359,7362,7298,7680,623,8718,1601,-205,4564,9112,3844,8872,1446,4707,7060,1709,-631,250,5851,5854,390,691,1406,4194,4697,1633,5650,-685,6043,-929,3284,6182,9027,3401,8511,5870,3559,9998,9338,5891,87,6446,8243,6838,4067,6174,6010,8503,7574,9934,7638,417,9496,5602,7346,2635,179,5300,26,7949,5493,6129,9197,4230,2184,5879,8944,8458,8537,9683,1812,3757,517,4104,9362,2491,9343,7600,4728,1778,235,4007,2264,9482,31,1157,4746,9106,5196,6163,6729,5856,2549,3706,1875,2642,585,2089,8433,6612,8791,6395,2036,3705,-456,-653,5815,9450,3231,6869,9803,7686,7156,5337,673,857,3474,3515,4141,2286,-942,2595,9256,5787,9046,9979,8248,6536,5391,2632,8281,2560,5688,363,7619,3119,-496,21,1065,5096,5363,2483,7218,6573,3966,8334,6051,2225,6932,5485,4870,3880,9964,1214,7112,2829,3259,7390,8182,7956,9841,387,5592,124,1101,4893,3023,7359,6699,110,9493,1471,374,8134,5482,5463,7977,832,9324,587,3143,9143,6230,-129,1128,-713,8957,6401,6847,4060,5294,5684,9011,5469,1557,9551,325,5501,9002,8346,9458,177,4909,675,5447,9308,3969,4216,2517,9566,7514,7806,4888,6836,5832,5014,9226,7746,4081,4974,5176,478,17,6908,-980,3311,-750,137,953,2019,1059,8807,1024,1765,6002,1833,519,7837,8118,7649,5058,4411,-580,2606,3196,5706,246,4650,4827,2950,166,5650,579,7013,6004,1539,5212,2171,8785,1253,2591,5758,7995,7741,2826,631,-598,4088,-164,5079,2744,4512,6638,4226,1932,1411,3082,9298,6930,9409,5109,2666,9393,2968,2826,7220,6375,9258,-301,266,3462,7391,5214,2541,2808,5477,5497,7297,3732,9111,-634,8671,6927,7141,837,9843,7014,3744,58,4655,8523,-685,5974,-651,5832,5035,5467,9572,-554,8212,2711,7554,4440,3369,442,-981,5507,7771,6788,-38,-530,8845,4995,5596,7668,9769,-375,7236,7985,4268,9661,-160,4186,1996,312,-72,3253,4803,-853,9134,4893,-346,7670,-627,7839,7897,6891,8329,5197,9907,-801,7918,7016,6728,5143,5752,8688,7471,5561,1644,-874,1299,5363,1468,8777,468,3010,1488,3520,1444,5850,1799,2428,1315,-820,2445,5333,7445,3672,750,8583,9383,1885,4158,8884,2340,-940,4843,5155,9521,6688,2204,5631,5630,9041,9933,4192,3396,2183,-16,3429,1177,429,5187,1364,521,3870,3296,4115,4377,2697,2565,-198,7265,7689,5140,3743,5400,5950,1049,1768,-793,253,1888,3202,4703,6359,3491,8057,9265,1265,7534,4381,6295,1310,4572,2227,9633,2833,5822,1345,8138,3427,2488,8786,4363,5297,8382,1314,790,2950,965,2336,1178,2170,-963,9797,-657,9573,5687,3967,2830,-444,6613,-58,9416,3831,6422,3160,4172,4959,5388,4705,-603,2643,942,8266,219,1793,-544,179,3072,3912,9218,1831,1422,1830,7788,7611,7525,9542,5512,6037,382,2811,-202,1264,2737,2059,7717,8054,-580,2473,813,7264,1768,2012,5701,6032,6684,9104,1595,3915,892,6887,7119,6967,7532,3743,3420,9657,681,7563,3530,4369,1020,537,4094,7209,4375,8691,310,9109,5646,3672,7313,-449,6896,3758,7815,285,8055,3054,-621,5745,7197,4839,8954,8056,1022,3255,6391,1542,1419,5395,5579,4001,8186,3049,4079,8941,9440,4027,5,8205,583,8051,9692,9437,5668,7126,4340,7352,5839,5034,5962,660,3172,-770,8697,5349,2722,9076,716,6623,4293,6690,1077,-32,9052,9131,8288,3180,1887,2165,-84,269,3783,5825,846,-784,2471,4540,3850,-825,-280,702,6378,8175,3841,8395,8426,9055,9537,9857,1837,3366,7895,8688,3015,2550,2116,-882,7804,3962,2186,7114,52,6553,8349,2563,729,-675,-810,-836,7687,1928,629,5286,-682,1142,4995,8784,4188,9777,1371,6789,9101,3854,-691,-454,1675,4712,536,3688,8729,61,9938,5717,1472,2863,7011,-643,-843,5296,258,7637,874,3884,1949,1707,4424,7847,2973,6241,7210,5789,8560,5608,-682,5478,5759,5195,9764,8046,5322,-673,6943,7374,3418,9011,1989,4763,-452,215,8253,2046,5833,6159,3580,8487,3499,2946,5272,3953,4400,9163,4692,-627,-801,9062,8536,753,2595,8670,8598,2593,2640,8900,2126,8692,3803,8088,97,1948,4169,2863,-666,4019,5462,8695,2888,7019,817,4140,9942,9680,5941,1019,9653,1019,6470,3574,1234,1431,1789,-503,-270,3230,9001,5146,8242,1319,3768,982,4472,9543,-41,8762,-442,3166,5553,5246,5979,5790,6802,1219,4060,5140,3696,5569,-81,-710,509,5257,7780,-265,9669,2847,7080,487,4635,1879,1353,5731,1404,2310,5400,552,2268,2869,-747,6189,5466,7958,6455,3737,4618,-446,4180,4072,2680,8595,7630,9924,4022,2972,-852,9917,7209,6880,1351,5715,2227,7653,5356,8719,9732,6210,1105,6743,5850,4547,9439,3330,6522,9255,9868,559,322,583,-855,8940,8491,4883,9799,6252,5235,7115,7091,-883,6586,5691,9208,6538,6081,4260,7510,4297,9972,8742,-656,4134,1849,9216,2272,9068,7235,3245,6293,8988,357,4059,3938,2741,9734,-370,9745,9475,4719,-935,9769,5603,6476,8602,5342,-789,9122,-789,-186,847,2876,-491,1914,5749,5493,3625,-462,4649,6478,7957,1813,447,6066,6947,5066,6203,1844,5070,7604,8188,4286,9458,9397,3892,8864,5139,9981,3514,6283,1286,9618,-882,-808,50,7155,9217,5287,509,-265,694,3286,6301,4911,2582,-581,-393,7241,365,8165,8144,793,6632,3859,-701,8333,356,1194,184,4362,7001,7565,-785,6327,126,3638,3357,5640,4471,6872,3852,8423,-620,4881,7402,3807,6649,8921,6992,5152,7723,-661,2258,3675,3927,8647,6669,4507,3132,6424,33,9052,8769,3939,4248,370,1250,6131,6888,-464,2531,3811,5992,9664,8512,5227,7760,4913,6585,3557,3026,1678,2189,7797,8506,5125,-389,3550,8371,6552,3391,9022,7280,5508,8089,-828,3576,4693,9736,6805,-959,3718,5864,7526,6218,9135,7367,7602,2848,6170,-305,5379,4481,5790,-267,4518,3599,-650,-385,-734,8810,7966,7313,8863,9391,8355,8281,5620,7480,51,7232,6474,508,566,9775,9635,8102,4630,-429,1436,3888,548,-626,8574,4072,615,7997,8723,3419,5817,-755,4771,6581,8187,5668,7330,1829,-247,-585,5138,8483,1154,6754,3934,4144,1440,5491,1324,2452,5842,2465,9992,6852,5184,8909,6304,407,3912,2219,4970,4704,8048,8387,5704,3271,165,915,2183,9054,1266,7931,2514,1681,3000,1551,7457,6126,9528,1681,6850,4613,3246,3264,9753,-590,1944,3762,8693,8390,461,-159,1912,5763,5713,4993,3576,7122,2832,9964,5873,-55,1348,1199,8616,3332,3139,3286,3412,6291,8836,5827,3592,7185,4613,2843,5363,2200,639,9804,2124,6000,7552,4850,1607,323,1537,3692,-98,5837,236,3645,2750,4359,6109,5909,584,2816,4088,2014,9275,9581,5143,4199,9570,9426,2246,7849,4093,4309,9737,969,149,8668,1527,5708,962,7749,-633,9046,6286,3720,9093,462,-972,-316,3217,3507,1569,1019,1680,7727,7224,7984,7968,5445,1918,2943,8422,3183,1081,8823,9405,3544,2046,8394,708,1531,3018,532,8467,1054,316,3341,-589,6355,2902,4274,7100,-257,8266,7067,2340,2103,2786,6725,6084,557,9693,3328,1241,8365,3547,9374,1509,-583,8980,-823,8455,7372,5307,5157,534,6815,2359,6959,4228,970,8924,7568,3386,265,7934,1523,7971,3910,618,4983,1925,4783,8296,9118,7435,5665,8832,-748,4420,6516,-569,4672,-142,7186,8504,8126,9659,3934,6824,4926,1971,1031,6208,7701,5381,7804,-231,7041,1094,3202,9710,2632,9476,8220,6226,1634,2714,145,2863,8230,2145,3595,7692,9680,2938,6468,1652,-524,1222,1799,5592,2685,1643,2359,6764,5445,5256,2859,7924,1308,9307,8774,6009,8697,6608,9712,8984,8691,3412,3006,7239,-664,2474,9077,9076,6633,4393,2750,66,184,5553,5071,-595,2772,9639,2831,8670,1905,342,3129,132,1549,9237,3910,-778,7886,6069,488,4520,6114,6959,3218,6469,8345,1681,6037,8993,259,4388,7263,5202,3155,5216,6343,3538,7717,4804,812,4721,757,7851,3036,3550,2328,5821,6161,3312,6887,2356,9084,3443,5388,-380,1449,7876,7466,8058,9433,7254,3841,4087,-701,655,2433,7387,3445,7129,3907,8869,4385,89,8344,7948,1497,1879,8412,9529,3116,-659,8052,9510,677,8837,7593,1831,6404,517,1381,941,9068,921,1252,9154,8465,3404,5420,4033,5624,7905,80,6063,1103,9627,7399,-794,3650,9563,3897,1340,1881,8835,5299,-3,937,8325,1935,9072,4145,1754,6835,3770,5677,3559,8114,3429,1778,299,4766,5253,8601,8316,2821,7863,5670,-255,-127,4031,-461,1823,1041,8279,6117,-443,9657,5182,4684,5455,2924,-958,6051,2147,3704,558,1560,-644,-17,6529,3615,1127,4919,8604,5441,4628,2563,7762,5426,1066,9181,5058,4627,2983,8096,5851,3112,7570,-510,3841,2918,5808,1498,4715,-549,7127,9534,6400,7658,3032,5369,5593,8832,-502,-345,2147,2211,3706,5157,5391,1123,-549,4813,-973,3398,-462,7797,498,-637,4080,9431,2237,8843,-405,45,211,8753,6027,6630,6657,1714,5941,4240,8038,8389,6815,2458,9248,9527,-677,9786,-344,5124,5804,1134,3353,1915,3586,3628,3085,3510,2365,5474,7339,2462,316,3840,37,7376,8893,7003,2529,3930,5769,6369,8805,-292,3321,1048,552,517,489,6621,5108,8792,8998,2873,1219,6279,7365,4611,1613,7165,1263,7977,2627,6166,6208,4063,5352,7041,3536,4622,-340,-913,6208,6061,6657,3628,6678,5193,5299,7169,2048,2868,6457,6478,4129,5476,6335,4151,6328,1191,3464,1889,1355,6618,-610,693,2964,743,4460,7396,5873,4556,983,592,7456,9322,253,6972,9712,4433,-725,7487,880,7124,6114,8151,7519,329,4057,2900,2346,-88,1827,7557,8592,7653,4604,273,2851,2033,7113,9371,2845,545,1335,1846,-413,5021,8627,9505,5221,9624,9129,4010,8552,1752,5115,5487,7461,6971,7122,2371,9844,3522,-748,1580,7294,6620,-865,3460,1397,1699,-398,5103,1389,8467,9169,9183,9179,7975,9244,4010,8984,6520,2340,4094,5764,8397,1373,996,-447,1639,5986,3422,4922,5123,3441,8419,2147,7930,2382,2708,5478,8738,2939,4128,1828,8649,8487,6945,-218,6169,562,7356,863,2214,9710,1201,4843,3910,8893,-343,301,1216,3755,9994,-849,2245,4815,4940,8457,3132,7437,3040,4126,5692,4840,2486,8802,-648,6428,2890,7854,2504,4951,3004,7113,3424,3963,9373,5268,1639,3256,1342,8922,4269,-686,7055,8325,7091,8571,5514,639,2357,5650,2942,8299,9903,6113,6863,5918,5566,88,1656,577,353,6898,-140,355,9077,2086,3444,1394,8028,6087,6945,7727,6227,9045,6251,199,1786,1386,261,5729,3632,273,7530,4201,-113,2496,7881,6985,6048,6924,2946,7578,1087,8307,6343,6256,1779,3760,9936,5350,517,2606,4496,2921,7552,4857,8122,1643,3986,-172,2998,9418,-594,127,7878,301,7710,4464,991,6317,1414,7267,7262,4804,8454,3205,3355,7837,7086,8799,1270,6874,4818,2612,2496,2964,4818,1507,5243,633,8778,6006,-73,-349,3182,6163,7372,92,1501,632,329,6670,9437,5576,8403,944,8344,4781,9529,2131,4758,-72,7677,4184,733,9558,7712,9394,2817,8484,8738,8654,8242,-8,1387,2755,3608,2290,7364,-904,9968,7337,5531,6658,7459,9093,3295,3402,8836,1239,4350,1093,7237,2120,5465,5915,6977,9183,-235,7450,519,8258,8010,2367,8019,1789,1402,-499,4979,8244,6010,879,9227,7736,7560,2345,3252,2314,5489,-908,7099,2935,9446,8520,2808,6459,8658,4615,4210,9404,4943,2042,3881,3877,6555,2248,4999,260,855,3829,1200,1266,1530,9756,3237,7247,8111,6295,5536,8472,7920,1752,6595,4289,1458,3877,561,-946,4847,5725,916,2982,5744,-590,7145,1635,7289,6894,3804,1203,8386,9029,1208,-714,594,7731,9815,956,2391,1103,1355,7032,267,6894,9506,5510,3714,3947,1326,9271,8989,9347,6908,7235,6043,7636,8794,4192,50,6992,1348,6765,-625,9732,6450,8958,-567,2891,7934,8503,2536,2973,2851,5303,8173,4420,3347,2761,3808,6948,2426,2693,4110,7217,2470,8255,911,4373,7073,7260,5922,7738,6256,8749,3440,4391,4560,3030,4729,3258,-589,9982,9516,749,7244,5084,3732,8034,5820,4616,2282,8261,789,8230,-861,754,7145,-122,7120,1666,4448,7960,5862,1750,7572,145,8761,-94,8697,5100,8758,3518,3100,-925,2027,6543,9519,3481,4395,2920,1192,2969,1392,7386,9733,2808,-989,3794,827,6224,-300,2331,5641,2852,6974,2476,5067,9046,5669,7804,5607,8233,6019,1204,5677,-866,4032,6552,7029,-263,8987,3101,1669,6014,8354,2706,7182,8227,1152,2728,8208,9133,9557,1538,-499,8118,844,-470,7826,865,577,-36,3117,4805,1538,1833,8532,6209,6725,5594,4953,2092,3572,5195,8895,4905,1880,6854,-826,2764,2305,6087,-507,2786,3493,7611,6810,6190,830,1680,706,3474,8263,604,7901,3927,69,4629,563,2265,520,5585,5839,174,3712,7472,8243,4143,-925,6442,4299,5519,52,7871,1246,4341,8543,6485,4837,2547,5994,6857,1831,7053,3856,4751,8894,6520,8352,7307,9222,6390,487,9145,6670,3098,5704,8619,-257,5760,538,-28,2833,5823,2861,7956,83,1588,4190,8183,1263,3606,2089,3670,2089,3170,7104,-24,7941,1326,570,5712,7927,-351,1336,-244,2653,9361,284,1921,135,663,8021,4938,4896,5827,2724,3720,5219,2050,3281,7080,720,2801,5266,9503,4818,2671,283,3999,973,-523,-880,-428,4850,1911,6716,5592,9884,3837,8309,6567,-927,4198,7823,4889,9242,4311,5652,6032,5813,3786,1554,999,7922,3488,1855,4205,1687,8975,4145,6033,5185,8269,1180,9720,1413,8313,1229,-789,5963,3913,3289,1893,6063,6253,-192,9531,5740,7151,7222,7747,5642,6191,5175,3981,1217,2923,6393,3887,3132,809,2116,2811,9485,5549,-717,5761,5950,1889,1555,7877,7379,9681,8568,8372,6892,6313,3875,9596,1638,-647,4625,1564,6121,8071,5955,8664,4405,877,1646,9510,8784,9298,6472,4742,1460,-713,5792,2346,2690,7520,-684,8060,4374,184,4192,-804,8980,7941,4908,5745,6516,3022,8867,8369,5934,4007,9687,3044,4323,4972,7925,4951,3082,6260,9053,9441,1549,3872,9735,1742,7733,6026,7503,2990,8103,5345,5508,1164,3660,5336,6909,7755,9801,8620,4661,4110,4404,2707,-559,9093,7936,7178,7059,-123,3741,1574,4907,8379,6166,6898,8310,-471,6057,9811,4303,6478,7797,9060,627,8274,793,8325,9724,8137,9719,8370,7486,338,4890,1216,2622,8594,879,7798,2689,9999,2903,7513,4183,6088,-265,9254,6789,4583,9090,2419,5739,9850,2149,81,7562,9030,876,8446,7323,9906,9177,178,4231,5321,6719,442,5596,3987,1326,5918,4586,3195,8842,3124,1308,3835,5435,7385,7001,9366,9678,9570,5437,6349,8454,4481,256,5889,9504,1044,5969,-109,6964,2258,3828,9479,5898,1374,3431,4351,-334,8324,9599,8852,8782,4244,3868,-987,8060,1017,6441,-268,3857,1326,8625,-683,8618,3311,2622,8116,4388,9361,7554,4603,1825,3469,8878,-990,5685,7326,46,4341,5764,3206,6025,3103,4179,5511,4189,1024,7853,4966,5679,529,885,9276,6492,8520,3433,355,1631,5344,7629,7261,-700,7543,9827,3976,9362,4192,4195,-833,-26,4190,8225,4623,5211,-511,-708,2657,4100,-599,1463,1368,4067,6620,8067,3396,9630,8893,4817,6813,9347,5997,809,2068,6772,8910,8919,6455,9875,4072,7626,4358,1422,5938,9472,2239,8907,9785,8250,1579,5438,4616,2879,-573,4140,6264,1638,7325,891,3472,1747,1397,2955,4918,4622,3242,1673,9521,7769,-242,5767,6919,6771,3787,8770,1201,9913,1862,5696,726,-352,448,3648,5489,732,-732,7743,7976,5335,84,6534,2904,5588,2633,3578,1308,1790,5610,4343,4498,5475,2628,8310,1007,3062,2297,3706,5554,8682,8562,8719,46,3172,3519,4528,4789,1504,-191,5627,9165,9272,2775,906,-553,-950,-368,3918,9269,5080,6495,-924,2108,7720,7546,1487,8657,6509,-470,1133,7900,4260,1621,2773,3224,9160,5859,2473,7236,8606,2819,5190,6667,2765,6172,7521,9995,4566,9004,5054,4158,3594,7427,9855,1959,-751,7237,8825,8211,4269,176,8683,5931,3130,2741,3853,3296,343,-313,9519,5641,5922,5531,8705,4026,1832,-224,1351,7172,7176,1521,6756,5595,2291,8422,863,222,-880,3076,7247,7069,6741,875,1725,4418,3358,9307,-419,4488,457,8041,4207,-34,2063,3966,7571,870,9389,8329,8023,7432,9064,3327,2213,8189,3805,537,9986,5979,7831,6350,9759,3231,6162,6598,6047,7788,2151,9958,8961,1731,8813,5345,2770,231,1060,6352,3342,7940,-368,4945,6517,8684,1118,9717,-735,866,309,2902,5775,990,3333,366,1822,5279,1399,1537,6445,9593,6922,9458,4116,5135,9609,-795,9034,1411,1110,-790,6972,-450,4214,3276,6111,3082,3932,3754,3321,5602,-657,-105,4374,3010,9675,6206,2186,6038,-80,4889,379,5705,4327,8509,8423,8318,5286,1453,7549,6789,1162,-71,7133,9173,-835,2407,4536,3512,2232,8983,7009,9198,-640,5245,2436,2016,3847,230,5079,19,47,1172,5670,6995,9050,182,1465,5790,3347,8758,1631,548,6682,4699,6778,1244,8115,4319,-770,286,4215,1847,3612,10,-753,436,4170,9995,1066,1316,30,1208,9320,2255,7321,7861,647,9975,9276,8025,8747,7370,-282,6886,969,4187,685,2279,6373,4091,6249,3325,5025,3583,8111,5147,9658,856,941,3548,3169,7799,2596,-130,9523,3435,6351,3894,2794,8805,7032,7970,9315,5557,7738,7004,3431,8835,-992,7071,5529,1618,9798,2764,2087,3439,1066,8722,7635,8098,8501,4036,9014,3801,9674,1360,5425,7534,572,5509,280,9279,3423,9465,6274,9764,5010,5612,8791,4225,7511,2560,4451,-48,6691,606,-418,4090,4260,4023,5158,5856,-610,7344,7160,1157,866,9467,6725,4520,4000,1076,3711,3114,5517,9828,492,5625,9303,7011,9774,238,2946,8954,4636,6518,5278,8197,4140,-552,2707,4941,2844,-788,114,6487,7530,4557,4805,4646,2462,7080,-562,98,9219,9497,7807,3498,3506,-351,5115,9286,11,-662,7293,1627,6665,3876,8914,898,3549,-381,8292,8786,9877,7007,5259,520,4216,5992,9044,4458,-2,8694,108,-918,9191,8887,9534,-8,900,2572,8941,-380,-540,6420,9646,7867,-793,1489,-345,1348,2984,9828,188,1809,8820,6023,5910,2637,5619,8719,1811,7377,7133,2963,6676,3906,7048,8404,8449,1381,5425,6408,5315,6290,-748,3145,9903,9243,3803,8325,8238,9602,9254,4401,7365,5054,4936,742,7259,7728,1407,4676,-835,7435,7121,-643,6386,9383,-326,1204,6763,5615,-559,3827,-366,3135,6197,5859,74,5637,3980,6278,4036,467,7765,482,6146,4984,9072,-163,4151,5508,8144,5373,1136,5571,586,-815,1314,7172,3556,3322,5762,4389,-575,6594,8192,-32,5492,3920,8874,6984,6952,574,2731,891,4410,9095,-721,1271,9635,-313,1279,5618,4689,7366,7833,4606,791,2286,6299,3389,828,-202,1284,3666,3767,8336,-976,7584,5627,3188,4326,-411,8281,1396,3933,2208,4056,2818,1705,2284,2436,2213,2231,6601,8548,7113,-535,9279,2746,6584,6070,1218,3315,313,-517,9882,6450,3280,2090,1313,-406,5725,2606,178,7914,4201,2783,9748,5776,5219,8004,-903,8584,558,2971,-754,739,7254,8125,9928,3370,5247,-373,8755,2939,3532,6843,7243,394,-941,2638,6507,8547,6231,6958,5761,6435,-359,8236,5498,2341,7293,7875,9234,7986,2375,2042,9938,3212,8058,5090,1902,615,3785,5480,605,1073,8164,2261,5321,7829,-598,1239,1967,5939,5398,5226,3290,8706,8439,-970,4004,5723,1993,8930,9067,8416,8865,-405,3102,4003,6919,7265,9503,1491,5819,4454,1791,-173,138,807,9751,9886,-978,7243,3980,858,5847,1484,7503,6311,8494,-400,8926,4698,3679,167,9401,5563,9648,7187,-735,5054,8366,1081,9748,3093,1498,8238,1928,9398,3222,8989,6615,9252,2603,474,3245,1819,5906,112,-923,2715,7868,5997,1963,8344,76,-397,9903,813,6583,9407,7671,3861,565,2356,2037,2370,5732,953,3434,3492,3023,-221,8068,9257,1271,3136,8822,7228,-228,4779,7657,3949,6402,2571,208,9169,8511,1870,4808,7007,4516,-452,380,9616,7540,6908,7423,5352,9391,3796,880,8704,8757,3593,7792,273,9918,2717,2102,4774,518,7753,6105,8138,-509,2228,2952,5152,2180,5742,9624,5733,2554,5410,808,6802,5774,3661,6007,5615,-674,6192,8209,5587,-343,5569,4148,8026,9744,3732,4234,3483,7563,2855,230,8247,5039,2690,9012,1223,3194,-781,-328,9092,8315,-577,5448,1179,9940,7472,1919,3323,7240,4793,4474,3837,338,9282,8167,7711,9609,8392,5260,2029,171,8636,987,-982,6090,838,5158,7473,809,4426,749,9434,4290,1738,5748,1530,6110,8124,7839,4739,3407,3428,3499,-118,3196,9126,-585,7511,7955,-86,8971,-218,6312,-941,9773,3511,5117,-316,4505,977,2964,784,681,6963,-898,7678,-751,2531,8967,1273,9178,9897,840,9464,8154,9438,6595,-974,7125,9007,1732,8241,9537,5562,4693,6847,6733,3745,1614,4037,4820,5763,5985,1480,-460,7344,978,8495,2489,9176,-84,4957,5021,7767,3627,2789,33,-482,1941,6905,5356,1151,5456,3784,4399,7477,9493,4155,1878,275,5720,9049,4468,9615,9895,-640,7735,3516,8103,7927,2232,3271,3918,8128,811,6377,7676,7110,5261,3168,7376,6741,6116,5034,5492,6565,-536,-230,8683,-231,9695,3280,1300,3290,5218,5276,6669,4400,4667,9788,8237,2848,6253,-83,-797,1252,-578,1230,371,4565,8365,-760,8564,1023,717,8130,4905,618,7574,4960,2620,2198,6978,1688,4874,6301,2419,4349,752,3609,1018,8517,3099,6075,213,8719,9284,3310,3341,9330,2928,2553,5092,2912,-14,8117,5148,8536,8545,5614,6953,3937,1989,6185,8478,5477,3597,327,1252,5381,5268,8620,2824,2950,5692,1030,8483,330,2971,2705,6213,7957,-687,7724,6945,2388,989,3063,5035,4353,634,7024,7472,4665,824,-331,4279,8047,7035,3674,4541,-341,7340,-407,9830,5812,3728,1705,7506,4761,-505,7449,-827,5906,3457,4411,6512,3808,3800,7519,6618,3200,-358,9602,462,2898,-497,3052,6465,2490,2191,7570,8256,-456,5511,2822,-599,9155,4942,9469,4016,6658,657,2398,2506,7785,910,2962,4472,4448,6200,8084,-998,1752,8612,-447,6327,-565,5562,4921,356,8729,3843,9659,8955,3324,9994,830,-770,3485,-994,9118,7506,3315,1494,-288,3068,8842,-402,4055,6896,-740,9754,8889,7227,8367,1549,5441,9111,6624,645,1342,8839,307,678,458,2973,8794,9639,640,7479,-927,3238,4761,-724,3298,1793,2669,2003,5637,-712,1060,5222,4398,7806,6084,1815,5268,-896,5868,-354,8176,6772,2307,-273,2426,631,4527,2633,2046,6992,1541,-922,1421,1308,2688,2508,-504,7837,1729,2225,7309,7700,5227,3142,8491,846,3794,1877,5895,3890,38,5061,3786,3775,4437,8986,4032,5524,9411,5982,7084,906,-661,-915,3051,1334,2062,2024,2654,7408,6162,7573,756,5787,1546,8787,6375,5387,1409,-889,7288,9160,3036,9483,983,7523,-420,5838,6019,3955,6721,1235,5601,2201,1426,1453,7177,5547,6850,4040,2535,4344,6945,1419,2972,-894,6736,5012,5815,580,1480,5935,-161,5801,1609,2624,6514,5271,8657,1774,6251,8840,9438,5270,-969,9230,2633,40,1466,7412,9692,4131,1223,7381,9611,1001,9157,230,5316,4800,4160,7382,112,3670,6701,594,7131,3721,6851,8973,1708,3676,3743,2060,7177,7083,4616,-96,-733,4267,1885,3000,3545,2345,5480,214,8125,2929,8041,7346,9611,2627,-444,316,1238,9838,7812,2999,902,440,4431,-734,6989,3920,8984,3234,6313,9286,3219,3531,7103,1070,6481,5801,879,5833,3665,3667,-920,145,4592,413,5559,9120,2852,7829,-118,797,5576,4517,7858,130,143,4480,5110,1615,2054,2195,3878,4192,6983,3616,3996,8816,-399,6731,4441,7672,8535,4260,1687,1733,8804,9880,9193,9334,9728,1482,1733,8534,4315,5917,6689,2710,1145,1506,4305,1954,-945,-990,1070,8469,3383,-305,4127,-150,8878,7475,2467,8536,-99,8135,6926,265,7247,8364,4626,6686,7209,2047,2978,6331,-480,2665,9953,6869,2384,2273,4093,612,8683,6138,2599,9879,5652,-637,1676,8676,5774,6336,2100,5347,3848,2131,9177,-64,382,4308,-933,4744,5007,9758,3291,5133,3030,2986,4314,1553,6997,2277,5174,4601,1871,-343,3640,1201,-561,771,2409,5398,5562,8729,-584,4673,7933,1646,3498,8120,143,-88,8633,7262,4163,8550,3066,4485,7325,2708,8372,1800,4256,644,3254,5291,8809,7391,677,9596,6423,-312,487,1172,-393,-618,-785,3567,8469,8688,2192,5876,1872,4754,7784,6269,3929,8824,4822,3565,1827,-158,6148,7949,9621,2388,5450,378,3610,7933,2114,1341,2107,3497,8791,5697,7819,5227,1384,8127,2640,240,5579,6249,1123,7070,6849,2406,9864,3300,6503,8680,7146,2789,2718,8293,3894,965,7996,5351,442,3505,8977,-49,2589,4095,2833,1957,-46,1446,352,9666,3336,9613,5452,-849,2625,4258,4302,187,5591,9096,281,5408,363,8953,4806,6300,5898,8654,4275,2705,9899,8328,4589,5508,4461,8226,7822,5900,6715,6220,7809,2817,-406,2320,8076,446,8720,3267,1085,8308,9791,93,7143,1556,6830,1670,8493,8166,293,7071,1567,5482,3582,7525,-295,4919,8087,-96,2594,9343,3960,-563,3445,3467,2528,2601,529,5964,9919,9928,5956,77,323,8684,4648,-349,6974,8843,7290,7671,549,-386,9841,1899,4356,6481,7847,4650,852,7054,6914,6838,6773,6015,1650,3717,2511,1138,1940,2789,302,855,3720,365,6232,2942,97,3425,8132,9522,-421,1395,9695,2704,8779,1161,-490,4290,4396,2203,9566,4309,5686,4844,9106,963,3307,-492,7688,2694,3770,8022,2318,6041,9824,2124,6369,-370,4699,1460,703,4297,4116,8486,9679,8522,7747,8917,836,4326,9510,9728,-627,6086,4794,6294,6101,6809,7186,6290,6731,6655,-35,9812,8165,6843,8007,3763,2155,1628,-808,4423,9713,2574,-692,6825,4586,-505,321,6292,6502,9230,2136,4637,9805,4586,7598,3365,-854,5264,178,2982,8124,9858,4318,6722,9189,2209,5690,4585,426,8628,1104,7888,7190,8311,9441,3692,1020,7513,2598,980,7299,8930,7866,8144,5281,9797,8086,5215,7984,2173,8660,-383,1501,-406,7603,4208,1406,3402,3968,4503,6577,7893,3853,5473,4421,4745,8355,7263,-998,631,3221,2487,1641,6526,694,8540,1111,9749,2597,2956,6114,3909,5491,5881,3288,2691,6077,7974,7968,1729,9537,3473,7928,1151,8616,6673,9095,2764,6399,254,322,-772,2534,1336,9903,984,5210,944,2232,7463,170,2077,3409,8500,8308,3052,1911,4112,1009,-11,5878,1669,2872,1788,6319,4558,5452,4604,9241,5914,116,5453,451,4915,248,5397,8114,6058,7616,1916,2370,3660,3012,1587,2797,5083,6858,9607,6308,8490,6115,1919,-52,627,-41,-765,4246,4283,6943,5099,2761,2445,9263,542,3374,5673,9351,9788,313,718,652,7132,8228,8139,2365,8232,9852,-465,5826,5933,7908,1913,6587,8136,6525,6650,623,336,4821,8282,2040,7927,8053,6413,2813,-852,6566,9956,3706,5513,9341,5619,1420,7146,6058,377,7402,5933,6127,4289,8023,2419,1840,2660,4146,8725,8801,7950,9246,9509,7783,229,6813,4989,7010,885,6915,1071,7905,7045,5587,3531,9647,706,1612,7422,3786,7352,2818,7353,1067,6645,9060,6524,1531,4952,4241,5326,1101,2808,7839,4876,3800,1248,-269,8946,5356,5744,8668,9313,4779,9589,7088,1658,-41,698,-439,-935,8451,4904,3956,4179,5631,489,6565,1095,552,1858,7999,1098,8958,1326,-519,4982,9767,1966,6744,9378,8393,7427,4593,6588,7287,1541,8202,8263,9531,8854,-819,2012,3388,651,8901,3078,4836,7572,3689,8760,3322,-68,9493,7106,8351,791,1999,8827,8977,8878,1759,3094,4729,1591,2928,8007,6538,1606,461,6529,4612,9694,34,4929,1761,-737,1278,1360,4178,-417,3488,8690,2883,8596,8426,4536,9690,6015,-169,5513,7334,4188,4419,448,7728,5707,2659,9918,8599,5203,8484,4449,5362,3560,3394,1178,-821,3425,7157,1157,9447,9676,3298,9455,9074,6615,2285,7659,7683,-583,-363,-61,-727,7417,7716,6585,9620,4332,4091,8900,8684,4450,1625,2542,-33,1944,2528,7424,1237,6459,6735,6849,9981,7837,-851,1821,8410,2505,4502,9354,1403,9733,1145,1043,4692,3518,8510,8892,5374,9299,8903,968,8162,1732,6502,3479,5378,415,9376,5559,3144,5982,6951,9072,73,332,6987,4719,3902,1349,8183,9756,3446,-360,4004,-605,3941,2259,6898,956,8087,1336,7202,6623,9173,5139,9272,5768,1446,7706,6123,-567,8364,3689,5841,3845,5789,1289,8182,-755,8981,2749,2003,4316,8832,1097,9623,768,9454,6469,5065,2491,4488,6502,-369,-247,-879,9881,3973,7333,8633,7642,3277,2675,5527,2472,6893,691,565,3600,4718,5165,1933,6041,4354,-609,1063,9495,-597,420,8598,6506,4559,5482,9474,970,9253,1194,7937,3476,6037,-816,467,7409,7042,2483,9745,-967,6110,4044,9942,7609,9093,1842,9659,6554,273,-26,2218,3235,2841,8701,2845,7680,7498,6246,4681,8266,3249,1861,4472,-425,-239,1105,6404,7856,9161,9117,6919,8541,1022,4213,3747,8636,7329,7749,9307,9866,2293,7802,5921,5745,1356,3153,7800,1725,2836,7970,8391,2490,1247,7722,4098,514,2238,9970,7882,-530,7183,3938,6848,7822,3493,3550,6373,3082,6918,3068,8776,8153,6389,-103,4424,1700,5696,1753,1248,6030,6675,6155,3643,2566,2599,7594,9894,371,5833,7046,8330,1019,-962,9212,7021,2837,-584,75,2361,2074,4139,7317,1839,-618,5977,2113,-622,3314,3470,-669,7291,1241,330,644,4395,4386,2516,4989,7628,8414,7993,2346,5211,5275,1086,4487,8779,2378,-755,-455,8332,1182,8239,5879,687,3540,9719,3923,6439,4655,7205,573,5057,2971,-978,8309,3829,5383,1472,5994,-737,8315,8016,7938,2277,5389,8502,4256,9159,3441,3217,5425,-754,9741,2035,-674,3594,8652,-253,7487,439,7083,5541,8636,5538,8741,-937,254,3756,8850,5908,6087,5209,7358,8989,1360,-428,6249,173,9950,8128,5504,6635,-937,8613,1282,7891,3785,-516,-489,167,709,9630,-289,6824,8664,5244,5456,5556,590,778,5161,7788,403,8709,9896,5057,-320,2760,700,2757,6066,2999,323,8810,5152,9854,918,310,1789,8413,1866,6017,8624,8051,7716,656,3808,9549,6339,854,9826,4696,7229,5523,-166,3313,3230,8603,1416,-848,3702,6845,2683,8566,39,6181,8330,8044,5679,8725,1958,-566,6438,5624,1878,6133,4518,3859,7675,-378,-173,9613,4348,2121,1764,44,9638,-562,2846,6882,718,7422,-392,3050,5929,2369,3938,750,2439,1915,6598,2954,5466,4663,7920,3093,9033,-58,4638,3096,1077,5975,-464,1189,164,9566,1949,5585,2843,7172,5695,3031,7201,726,7530,3565,-488,4743,9234,1077,1876,1630,7629,5372,3939,2111,470,8946,738,8884,4807,1982,2942,9502,908,2486,2312,1546,7617,9962,8953,7120,9264,6694,8658,9863,9572,783,3865,6067,597,6716,6923,2536,4358,5908,5103,-484,-503,4791,4419,4062,4099,7437,1628,6576,8348,304,-800,-930,-235,-285,19,-81,2485,3771,1040,612,8464,4550,8679,3651,6133,3130,4544,8439,8983,7344,1261,4736,527,7313,9906,9985,9624,7508,7829,9048,8503,9725,3860,8655,-999,6885,6123,1424,8914,133,5010,8405,5137,2837,1214,3270,4314,5409,8131,2234,-217,7336,2662,5633,5877,8539,8183,1503,4634,9188,7635,628,9587,7900,7952,1870,658,1742,7266,2501,2502,8224,1799,2726,1118,1372,42,6888,5109,2058,333,329,6509,3703,4002,4140,3715,1378,6146,2437,5710,-765,5345,2923,7972,7673,2441,5333,8311,3247,1647,8154,-672,2669,5573,6392,7464,-262,895,3237,9632,7310,-140,3494,290,2940,7316,9689,4428,9460,1783,4067,2804,801,-796,9898,4529,2393,6312,7247,694,4478,2407,6226,4189,8564,3969,2532,4058,6409,5090,4715,-206,935,1830,1736,391,2875,265,4684,101,1300,6586,3009,1215,6700,8438,1609,6674,1071,2336,478,8276,1464,1303,8172,3579,2317,8318,1876,856,534,8272,1573,4106,6204,705,5454,2920,-348,8433,6632,4037,3037,6378,7739,6514,5370,4556,9292,3544,3701,6171,981,9911,1398,9490,-711,147,6904,-258,8,9357,9039,-51,4670,651,732,889,1963,4163,9844,-647,-210,5173,652,4901,9705,5860,9323,1176,-907,829,132,9197,8251,1587,575,787,1451,6961,584,4356,7482,9067,2759,7706,4538,495,8690,7414,125,1748,6573,7691,8243,5572,6370,9858,-758,991,3959,986,8596,3099,3968,7186,5321,8464,6323,9213,2738,1375,9928,4420,1854,3748,8686,752,9540,252,8227,9672,9039,658,-160,7055,5646,-365,2542,4589,-602,6570,2206,4368,-168,4168,9200,1883,6343,6385,8416,1721,5506,-472,4577,6070,4639,253,7202,270,6515,205,4040,5786,2966,6229,5698,832,5068,4722,4645,1243,9890,6932,880,7681,2139,-853,6797,5073,5002,3471,-168,4665,1529,3974,4029,4245,4030,4901,294,3229,2040,9562,5926,2498,9738,127,-961,5597,4862,3356,3887,520,-537,1224,7026,1958,6888,2459,8876,5104,5952,2176,1985,8123,3922,8848,9444,8406,2158,5087,4311,3922,3580,1540,658,1584,9330,1178,1791,1677,6537,1093,3833,9778,6920,1606,3273,5225,8987,2799,-774,921,527,5355,4641,5673,4981,2608,9908,3745,409,5050,7230,2234,461,6699,6470,5608,9654,6804,2251,7068,5258,-387,2571,8366,3497,1443,-413,5842,637,717,3186,7587,2970,-55,262,9451,1263,5217,8500,6606,1612,5965,2812,2710,5305,1985,2132,921,9567,8663,3420,8187,2273,4966,3782,2066,5425,8039,2049,5565,1367,9250,-708,374,8799,8618,9012,5617,7618,6815,437,2265,-803,5451,950,1848,4762,-872,4186,3822,977,1993,7807,-443,7621,3544,7075,-142,7522,-477,1742,9480,8824,-488,-475,4431,8526,5017,4291,8789,2325,4264,6026,9228,921,5570,8414,-30,2001,9458,543,1416,440,5134,4117,4246,2015,3794,1938,5173,2995,4910,5385,7492,2961,-487,-786,459,81,2384,-520,210,734,6365,9904,7826,2711,9878,197,9210,-255,6704,8905,8524,9374,3773,8094,9254,2608,7866,8666,-289,-665,796,51,8030,702,8626,5678,5140,7906,4243,2574,9397,8011,2965,2637,9021,2984,4177,2052,2030,8072,4298,3249,-711,1526,8907,2263,7044,5862,8706,3391,8536,9410,4900,7885,1883,4024,7760,-266,8007,189,3793,5170,2685,4642,1017,8047,4876,8785,1904,4937,2117,2615,1438,868,247,7584,3857,-517,8703,8993,4549,5127,7147,3841,2503,5266,4090,9176,4428,7041,8370,6591,6254,1738,8356,440,1801,8954,-554,816,8766,6111,7129,-590,3529,477,-723,1310,1464,3361,-808,-476,5333,745,136,7169,8274,5971,2713,9814,910,-836,3717,6096,3560,3952,6278,2924,7244,1145,1776,5481,8917,7081,6170,9381,3258,2416,3086,7788,836,8422,6665,3766,5389,2475,4682,5578,-527,5040,5525,695,9627,4059,9109,951,-533,8036,-520,6553,5796,-156,226,-923,5842,3678,5617,2998,9773,5436,3463,2346,-529,-153,7795,1209,-310,1923,2234,1184,8479,1440,5188,-726,4720,5881,5398,5121,8187,2611,-140,2276,9762,2075,8709,1063,-734,718,1636,550,6394,7978,6257,4834,6296,5467,1902,632,7928,6177,7382,9647,6828,1064,7021,2611,3442,9577,-78,6355,2991,4470,5047,-126,6921,4931,4637,9579,6850,4665,9907,7650,9811,4278,1220,3221,4433,4777,5914,8530,2935,5942,1059,5337,374,461,7716,-110,-292,6087,5501,7985,8519,-162,1920,9363,3178,9587,1094,1826,6181,8722,7637,4174,3782,4003,6936,6940,568,6737,6680,7239,1113,7871,6239,-71,8466,6549,5244,-872,4770,3466,8462,9194,3199,7640,7327,473,7105,-179,-938,1232,7044,7457,8153,-609,8414,2569,77,5587,5811,3071,3271,3038,5998,5784,6249,8634,2029,2952,4529,5358,8834,3400,6053,7295,5329,4489,2334,7353,1077,9820,2736,8601,2375,3887,4078,1321,-6,8564,1607,1663,5829,7110,8396,8721,4369,4554,8611,7393,7427,2441,1390,8254,3239,179,6577,201,3685,9070,4439,1876,1372,-181,1556,5915,9797,3229,7560,2535,9984,1260,-894,-315,6536,6530,8166,9137,901,9440,6599,2719,5692,8700,-195,5363,5754,7172,7669,1767,9611,3704,626,9202,3080,2738,3713,4975,1045,3090,-615,-66,2338,6714,8300,3359,592,5457,4012,7136,96,519,2751,8169,5048,-915,5444,6697,8207,6719,5865,9000,3271,6715,5111,1340,9362,4456,7030,1776,8901,3015,727,6292,431,-554,8975,161,350,2571,1754,7078,8111,6484,1194,3393,310,1577,-966,505,8347,5883,2261,9093,3601,1141,5375,976,1518,8892,7798,70,1711,-260,8451,8978,7811,6747,1312,8112,-998,5035,1592,1689,7854,-704,6766,2796,8304,1436,4630,6013,669,6831,-918,2767,9273,3866,5713,1874,-6,5344,-394,2319,8651,7891,8439,6284,2313,-993,628,401,8625,9617,13,194,8298,9020,725,2373,2315,8238,5149,4864,5161,1298,8665,8326,4125,4628,2189,4946,1620,6963,8477,5373,6094,9922,2451,9422,-203,11,3128,7482,641,5784,1019,-835,-198,307,2976,175,5423,814,6472,5006,6580,1867,9361,6808,2289,2030,8492,7194,908,4852,576,-186,-554,9119,2176,5312,6018,3473,6833,561,9249,2972,8517,4488,1964,1506,2932,4402,2711,5954,5571,1310,435,4167,6466,-870,8191,7632,7063,1716,8960,6772,1065,1612,3887,6893,9022,8459,7736,-858,-325,-958,250,3564,712,106,3490,4392,8468,715,5,2219,1246,6083,2657,9816,3625,3159,3952,678,2823,8467,8554,1495,7262,483,2997,3572,6551,6135,-740,318,8150,7355,-891,6762,8772,9536,3809,1081,815,6267,4298,9732,7445,6486,2404,8639,1688,6236,4327,3155,7935,8495,-339,-362,4842,8903,3725,9363,7045,-594,4308,2664,7163,7437,107,-902,6412,6553,4308,7806,6660,7989,9321,3806,9012,1753,391,1284,1719,6400,5884,8115,1229,4004,2260,1719,9941,3778,9812,8629,2941,4864,1627,3287,6362,5915,9901,5814,230,4788,4664,-929,2688,3267,9551,9344,6508,6049,4254,3705,1271,6746,6478,908,1802,6796,4525,2911,695,347,607,5364,4905,6655,3465,-766,1138,328,126,4445,-827,6367,-356,8869,7604,2249,9227,7147,1863,6561,8194,5718,3219,3650,364,5189,951,1259,7749,650,-508,2345,8287,8945,3975,9923,4247,3859,-181,8784,168,3777,387,4585,-396,8528,1920,-953,7364,7721,6355,1550,6474,3945,1901,2116,8103,9253,6719,8774,739,2803,9766,832,6681,1476,8036,4162,4224,2605,5970,-790,-677,4306,5242,1553,9744,804,2188,3686,9502,8390,580,3138,1429,4924,8217,4935,341,5261,1164,8516,-594,3327,7771,4487,3999,5515,-191,5450,2350,-325,8238,5511,776,219,4038,9237,3138,6995,1456,5,7224,-322,4382,1154,7713,1985,8130,2108,9139,7391,-260,9012,-492,5511,248,600,5378,5801,6474,3762,3612,-548,4212,-140,7731,8960,-722,236,4136,-479,-809,7699,490,3150,5211,1847,5094,9672,7366,-611,1419,1912,5569,5858,1515,2066,-793,7584,-370,6691,1584,2627,2200,6447,314,4448,9681,5195,6650,-185,1660,1209,2076,8050,8367,3773,7640,6826,8022,8756,9757,4944,633,2973,-84,4363,3250,9805,4202,5913,2963,7957,3532,5234,4257,4371,5812,1641,9305,4114,5072,9678,6704,5468,1842,9,2361,8541,6550,7038,4399,5534,4253,8627,1432,4204,11,1210,5043,1443,1731,4491,4475,4783,6377,-119,7630,3292,9960,-263,6763,1102,7946,4483,7155,3800,7283,-591,1913,2204,9120,8259,5090,9406,7685,3475,9158,9497,9126,6700,2009,4574,1756,5680,8516,9303,1171,6124,311,6516,6198,5802,3203,7416,876,9246,7387,713,1769,3342,371,708,5738,5530,-655,3333,3239,6571,7948,8853,2090,8478,5968,2144,3004,2882,484,8410,-339,1102,1066,6249,1962,4221,6136,5238,7948,3185,2114,8962,4713,441,757,-452,6012,218,8073,8329,6732,4973,7102,8812,2673,-646,7578,1484,1578,8221,5178,6159,8066,3923,9233,7139,2534,-419,-656,8059,7517,1173,4245,170,-348,1671,8265,5504,5213,3080,4536,3102,7653,9889,9446,-747,4442,-680,4079,2405,7926,2311,9189,4469,9794,3473,1799,1081,9721,725,6462,1791,5587,-94,6649,8546,9580,1568,2205,6277,7545,4592,5962,9006,523,-804,8390,8560,8696,1320,2585,4349,9571,4573,4621,5105,-663,4994,1188,865,5915,945,5056,4444,5151,4041,-124,6149,9926,7780,8804,7911,8353,6960,6942,3365,8715,-946,9867,2476,1465,3337,9754,4798,-599,170,-361,811,4695,8069,-998,-738,8455,3050,6629,8909,-405,7094,8358,1902,4947,6353,2513,8322,8909,7715,2858,2538,7173,8067,3473,2917,8182,9501,-42,9842,3841,7927,9259,4822,4893,606,5470,9823,1057,4120,2352,6891,3684,1329,4344,2377,67,362,5821,1983,1231,2549,9660,9021,-768,807,6933,8039,9816,-661,2439,7655,6805,3953,6167,1648,6546,3162,5248,2208,3932,4334,6532,5314,-73,6621,1442,164,2485,348,9140,2453,7844,-525,9417,769,5512,9439,9782,1368,1429,8010,1492,9235,8167,1826,4638,3321,6040,105,6593,7614,807,-497,9271,5895,2564,6510,1997,8569,9574,3830,1253,7352,1874,6012,1476,6637,-96,7000,4589,6896,7837,7784,8636,916,-466,3188,8938,7109,9486,7127,8158,4414,9966,7492,873,4312,8189,568,2279,4497,2387,256,721,7704,7308,4693,6506,937,4482,3074,3627,2911,6586,5216,477,3504,7991,5281,7197,5395,-45,4737,7981,2913,9738,774,9554,2818,-140,-616,6665,7765,2461,5178,2286,5679,8098,5823,3859,9837,-678,1510,88,2031,1188,3408,1064,4115,8436,1623,3313,5644,201,7505,8795,9144,416,8540,4588,2741,4960,460,5058,8825,5496,-183,9741,9985,3684,4857,9812,4160,957,6540,9806,8113,6326,8784,4855,724,4075,2995,6094,5170,2049,445,1170,3434,4974,4650,4822,2840,980,8994,5788,4273,8411,118,5433,6990,2735,1652,7000,6920,3387,-845,2467,758,-908,3055,8925,4596,7899,1750,29,1889,5483,1295,9661,6419,4309,459,5501,1793,184,-326,2535,6794,6784,5872,-801,8002,4949,3472,3783,3031,4384,255,9776,7401,5247,5563,144,-516,3731,4892,4060,7159,179,1715,4305,8384,6088,-659,5628,3550,519,2684,-619,3856,2800,3707,2140,9418,4721,2519,769,469,924,1124,5234,2462,-772,9183,1438,5186,7615,3913,862,4181,6285,6766,776,8053,6973,8365,5903,55,6657,7577,2538,7442,5185,8303,3856,-833,3545,6939,6096,-496,2265,9319,8381,5403,9357,5999,2482,-321,7016,5602,-255,114,1874,6369,31,5701,6120,9781,7032,824,3747,2720,154,4438,5817,7607,-556,-780,1107,2848,1581,4563,79,4464,3191,8410,-462,9093,1030,4864,-745,4622,9039,6779,-995,8042,6303,6004,3251,4158,2495,9861,3709,6280,6914,3007,9171,7263,6243,6202,7096,9232,6047,5597,1134,4311,4282,6343,8772,7201,9116,3911,-639,9637,6931,2966,4808,1103,622,1677,4073,9671,-390,5464,6309,7867,9543,3253,3868,1234,6649,1293,9265,-874,6447,5867,2458,6731,-103,-770,4167,8634,9463,7271,9643,5553,1375,1847,69,1053,7078,2655,7810,7998,8211,9178,7907,8710,8277,8072,4940,4246,5944,7814,3829,1334,-552,7330,8223,-699,9614,9849,8488,1514,363,3267,2571,3492,2968,2504,4376,398,3098,2213,6445,8780,4976,-766,3956,-899,4639,5915,3476,6269,5872,7910,625,3378,1927,6858,2593,539,4629,9168,-909,3334,-927,3990,2569,556,9236,400,4927,6396,3471,2498,2690,7042,8244,8609,7542,9915,1858,2063,6663,4456,6493,207,8718,6179,2980,9432,1582,9738,7938,579,-202,4365,8896,576,7251,5739,7769,5168,6168,1386,4408,6252,8631,4843,7841,6316,5193,71,7996,-71,107,8972,3114,9900,2264,-312,3546,9230,7098,600,320,7813,5035,7367,5670,1440,9688,7476,7278,1164,3232,724,4478,2419,6044,-173,1460,9242,9874,6823,4288,8198,1921,923,9051,6004,691,1336,1545,9434,9993,-589,3001,3980,5453,1012,3337,4268,7918,3630,9718,6320,6858,3629,2731,9416,1770,6878,3634,3706,5403,751,4454,5121,4537,7814,4070,6591,9160,666,3999,9386,6489,7815,8100,2730,7762,5726,2668,1177,4139,9588,1327,1571,1772,3672,5022,6003,8734,8020,8341,4791,9558,4573,1594,9845,2467,4289,6505,533,5506,5561,5260,7748,7821,585,1277,8105,2690,2669,9921,6867,-7,8227,739,744,8324,9802,3534,245,6390,83,4559,8988,-708,7194,1621,8889,3829,2273,6998,3031,2137,1919,3406,8713,2669,6916,338,1380,7751,1660,5448,5095,5984,406,1945,4395,6694,6707,5986,5194,8525,4846,9102,1581,2283,4179,2884,2774,7234,5705,5869,1534,6088,184,3443,1617,393,8447,3788,5704,6800,7999,3999,2387,-631,869,1486,-974,4774,3967,7449,8692,8419,5945,7717,8845,850,6412,8696,8728,932,950,4441,1827,9611,443,5966,7703,5694,8139,8567,921,337,6476,5648,7853,2784,1483,7327,9816,3433,1676,3191,7390,5496,6408,3945,6013,8859,8505,4451,3949,3925,5670,1666,3838,2979,6135,9613,2513,8523,-577,831,5440,8330,9233,7976,1853,2155,-89,-644,9398,-641,7139,8675,507,7702,8590,5863,6190,3153,-126,1894,1111,1862,7629,1251,4043,-626,5873,9534,2665,5676,5815,9701,5388,4565,5414,2349,1166,4983,1863,1043,8717,2814,3503,5555,2011,428,-746,5979,6422,9261,576,2755,7696,2910,9538,1416,8708,1903,6950,1578,4646,9165,615,-978,6579,5744,4798,7048,1883,6884,3398,5840,1883,7187,4175,3350,9844,2670,6694,6288,1897,2274,2184,-335,5428,4752,5595,1671,7839,5213,5024,6834,2235,3348,6546,463,1651,4478,5131,-61,5507,3058,4352,5096,6195,589,8238,1587,3340,6924,2142,-325,5489,2162,7286,7164,6729,271,7806,-700,1117,164,7904,9163,7373,5184,7515,-489,7979,7835,1836,1841,71,2740,5935,3664,6703,-205,8162,5633,1843,4198,9823,3858,2412,260,6689,5333,1671,3655,8960,4854,5787,3433,754,1989,8973,2185,2290,8326,3664,1474,9626,1445,2750,5497,-826,4033,328,9978,6110,2891,2866,5259,7661,2678,2175,7054,2506,1866,4981,573,6421,6302,2163,1891,791,7131,5568,8515,8954,9609,3474,4622,4963,3524,3575,4880,1571,-990,4261,-690,9732,9597,8256,9334,7307,2409,7645,5609,18,9669,7143,8493,5932,9785,2500,1795,3795,4786,8107,323,6040,-480,5040,8726,2965,9010,424,1137,7223,-557,6586,2061,1438,1809,2218,6486,5174,911,6848,2033,9807,-96,7343,2563,5908,6528,-407,-434,7200,9592,-969,5884,1183,7327,-784,6812,5505,3397,5866,2380,6106,-6,6031,785,6794,1387,880,-123,2442,401,9442,4372,524,7249,6626,9999,6608,2196,2043,8044,-737,5879,488,4248,8940,-888,4408,5684,2684,6266,9923,5492,22,2100,8711,8900,3550,4671,6588,8699,4581,6238,8329,8494,-252,827,3638,-937,2130,2672,3682,-396,8343,6936,7855,5662,8737,1424,4647,4467,462,4002,8044,3980,2895,6291,4415,1795,1719,3569,-260,9021,9902,4363,2078,6525,8413,334,2755,6416,4761,8960,4823,9295,-704,-177,1784,8934,2607,17,8167,1115,9064,-574,2901,7081,-382,8660,4453,5678,6760,-13,6910,5874,7060,9297,9864,6757,8657,5345,9081,-962,699,-893,8351,8221,665,5752,199,5513,1465,5741,354,8594,2186,8880,9631,4656,833,9040,2534,496,707,7688,8381,245,427,6667,6336,9933,6126,5572,4782,454,5097,2628,8695,5173,470,5614,7582,4735,3525,599,-45,5742,4709,4087,2825,2438,4030,4427,9951,7918,3415,9214,-719,3226,1573,5487,8316,7251,5183,8887,4268,8880,159,9556,1137,2114,6407,-858,1599,753,1430,2220,9456,5078,-733,9095,2943,4595,9024,6905,1030,2449,2773,9579,1177,9384,7772,7085,2761,9482,8984,4537,-610,9074,8908,8561,6291,9386,651,6234,67,191,7690,8136,7699,2984,1889,3220,-768,8206,7440,6404,1143,9885,9323,7275,422,2911,9590,8069,4960,-50,4742,7421,9786,-621,1568,6512,9182,7536,4981,6281,-447,3707,-344,8775,29,2584,8906,-701,-707,8109,2825,3246,-622,7379,1086,600,3949,5862,4016,782,4363,-839,7311,4538,8422,7831,464,1304,2242,4457,2409,-794,-916,8401,5475,5912,9601,5045,4740,5501,7172,-725,7642,5988,9099,2902,9776,-235,6170,4244,1093,-125,3675,4731,1182,9039,9255,7767,-946,4045,699,5588,1041,3077,9886,6723,4982,622,8701,7573,8021,2612,6368,4138,7862,-680,3775,6905,-143,7080,8821,5411,397,7134,9810,4724,2095,9452,2867,8701,5056,7821,6183,8996,3082,3404,5218,9388,2564,2712,9043,-269,2053,7845,7998,2848,2924,3968,4555,8735,3357,-764,7400,5309,6983,3699,991,9463,2410,5085,5909,75,2660,3996,3171,831,4939,8502,7150,8838,6139,6501,1838,9119,8566,4955,4798,3285,9478,2687,7013,9229,9719,8389,3788,413,3134,9912,-130,3942,9385,8005,382,7591,5967,8599,1488,8135,46,7545,7559,1141,2087,8309,7401,3785,3922,8976,-329,7591,3620,3660,7550,9652,3206,5868,967,6967,4054,5065,7769,-403,7683,8329,1333,5104,1379,-300,9776,2574,5099,-60,3929,6818,8518,1193,8869,4165,3382,7359,4306,742,3698,-165,344,7067,1606,-900,7771,7887,3357,2532,1576,-776,-628,2179,4804,5245,4416,3369,6715,6180,4578,5466,6760,-522,5041,4278,8666,9601,21,4528,2409,-49,8967,7950,7800,4838,2327,-369,-41,2419,9164,-288,1752,4531,7738,6965,2556,1831,3767,782,9536,6114,8412,3784,1811,2971,1435,-524,-937,3315,2604,1069,7448,6683,1332,7680,5445,5850,4235,8333,-978,3334,4197,-159,7151,-194,26,5806,4803,750,5002,4005,56,6337,2975,619,6920,453,5012,-965,9278,6133,8282,6921,6057,17,2880,-589,4218,-444,4136,247,-286,-547,-235,-377,9434,8826,1230,5879,-846,-230,8553,5657,9928,9280,4457,4355,5557,9063,3799,200,4054,5868,8950,6873,-198,4800,3566,8045,-888,1980,712,629,7146,-701,1446,1124,8386,7323,7409,9519,-846,9327,201,3620,8465,-140,1961,4027,1670,8664,4787,3081,4504,9078,9556,7961,7356,4527,3793,4508,1482,7217,1569,5664,2274,3914,8615,2646,8934,8502,-222,3349,2048,8958,7265,7236,3731,5838,6863,1290,4070,770,1610,4467,9544,191,6953,2870,7003,3461,6955,187,1636,7713,5907,2016,8529,5715,7050,655,7009,-249,-263,1552,7405,4355,2883,7128,1289,2838,7574,8830,2970,993,2499,3584,1785,5731,4449,9562,8307,9061,9379,4504,9444,-496,4382,801,6421,6821,2739,8605,157,622,-212,7451,7288,2262,2972,3815,6446,5169,3045,-891,3411,2823,5583,4916,5172,2567,8333,6136,3617,332,8308,1076,856,8751,1267,-205,6373,3788,2977,2637,6603,4587,4869,-741,3315,2319,2151,902,1991,619,1161,4575,6680,4338,840,2879,4571,3358,4622,1566,7082,7791,8244,9302,5590,9124,2614,9563,7253,9083,-870,4464,4212,4114,6450,5942,431,9728,6453,1683,8928,4042,-650,3613,386,4718,8157,2374,3750,9470,8285,9554,4314,5427,2141,2405,2870,5354,-411,-616,2369,3854,8782,7468,8908,9279,5677,1766,887,525,4002,1772,6214,14,6876,9409,5680,3189,7791,3353,7376,4282,799,8671,-535,6657,3239,4223,448,6938,5862,3266,5175,5792,2025,-254,2588,8630,-105,-59,4426,403,3726,357,5136,1757,8494,7136,2287,8847,549,2470,-866,4453,4045,1906,4204,3440,2194,1971,5341,761,635,3690,5990,7453,6555,6419,4155,5704,-608,-402,-135,4287,7289,7312,3135,7374,579,6213,757,-386,377,5459,8249,2687,9367,8037,8364,4250,8674,2915,7810,7230,653,364,7244,6547,3696,4724,9045,253,7210,681,4536,3103,1885,3441,7838,3262,9677,-370,4065,9828,2891,4976,-314,7935,3338,3979,2607,3406,9868,-832,6299,7486,9765,5901,9432,9288,8664,7665,6482,5936,8118,1573,349,6977,2310,8193,-33,7508,8993,5295,252,4136,6081,9980,1763,7307,9341,1794,830,5424,6881,80,46,1806,-512,6426,4141,-895,2558,3415,2661,416,6810,7059,-850,9464,-609,3178,7582,6645,4974,2444,8196,7766,5533,5690,7417,6786,862,4488,2955,6511,5951,5055,91,7971,986,1353,3049,1649,2902,3044,-791,4343,6370,-114,8751,4395,2677,2957,2445,8102,4358,7160,8017,-559,5088,5370,-225,4390,5401,2296,9805,2515,7946,3004,907,682,3992,1179,8411,3885,-202,9942,9070,7131,3967,3211,-232,6433,7985,-166,5485,4053,9421,-968,5918,2779,2336,2892,5297,6636,4371,2809,4394,9989,1143,4147,2986,5500,5711,6674,7543,7833,1973,4839,1181,8629,5366,8896,9131,4332,4771,9823,-402,6796,2552,7477,3366,9132,-746,3114,5308,9518,-277,7526,999,8737,1207,989,-513,9198,6954,4215,3397,4721,8014,5828,68,8598,4915,214,3970,8769,1941,4873,5826,6609,8439,38,4024,8937,6636,4642,3332,9390,8880,9310,1941,8588,5904,7905,4758,788,2236,8852,9921,4714,3896,1244,9042,9467,-468,360,2250,448,6447,1692,2691,6810,-440,5366,1060,9478,2971,2579,6930,9440,8172,3916,1881,-986,4501,1664,4052,7620,7095,3229,-421,5440,893,111,1122,2887,2362,2185,-67,8388,8959,6632,3604,2350,168,2639,8640,3317,874,8181,62,3911,6332,196,4471,521,5736,2553,1208,4197,3011,2854,4291,5847,1999,2704,1683,3228,939,-891,3247,3850,3137,4166,2894,3445,8913,7600,9073,8200,8597,3286,7179,7673,2485,8398,-515,441,6222,3709,8602,8967,3329,3491,4850,7073,917,1249,882,1194,934,8042,218,6769,9696,3087,9261,8298,2842,167,7053,713,8580,4509,3810,8491,6024,6485,3719,9099,861,4706,6006,844,55,3279,7604,1075,3100,3636,7961,696,4000,8185,4737,4966,5944,1977,5357,4658,9774,745,1895,6628,3236,1586,6989,4585,8572,8026,5210,3509,7806,9692,606,1130,8990,7298,789,2276,-288,-852,7574,-482,-496,80,9924,2044,8802,1327,1024,8509,6509,2193,-332,6694,8615,2958,6871,-267,-216,5558,4563,8667,7335,1783,265,9860,6806,1735,3999,-143,-233,3067,3763,8439,6623,5030,7781,7866,-560,8805,3652,-214,1748,7900,8936,97,-685,7553,1878,923,8133,-259,9113,584,5922,5880,5234,7899,7095,4441,6005,6085,6568,5309,817,9381,1337,7902,-948,6007,2850,8760,6843,2471,4124,4986,2679,9793,8154,9108,838,3535,3735,7700,5304,3988,908,4159,973,3263,639,9837,3317,3405,3753,9283,303,4844,848,2884,5122,5274,-180,5311,3737,4739,9614,8655,-19,8076,2573,6325,851,-429,-839,-476,3917,1205,5829,1153,2566,860,3792,2675,-918,5280,4861,5418,4741,8937,9535,5789,8544,7970,9415,573,5345,5821,5918,2444,223,2301,9743,3339,9032,1732,8822,9819,-537,5813,2351,4812,2904,2230,1292,2125,1192,-848,-772,4416,9800,-914,9231,2853,6889,5431,4854,-700,9727,4301,5565,4195,3944,3550,9121,5693,7662,4766,8188,1786,698,8793,321,4424,2029,4202,307,1773,3049,425,3332,4286,929,6656,5533,3321,8670,5636,9544,7151,8807,2755,2625,-267,-46,6391,6712,8150,1701,-168,5671,7527,543,4096,-324,4167,3574,2479,7308,-885,2585,8095,6032,2458,9305,5140,665,8972,3101,6190,1630,4620,9533,516,3169,9439,1893,1119,5866,5902,5239,-197,8579,6925,8520,-67,5338,8005,6922,6118,5825,8260,6363,858,8992,4756,3692,2080,8973,-636,7666,3881,-356,5899,-90,4105,5902,8856,2344,1774,-229,1298,7061,8198,6643,4090,4673,6585,1153,-610,1185,2540,5337,1601,1525,9865,1576,7747,4923,2082,6034,7786,648,9060,2132,2102,4330,1739,-753,3088,3277,-315,-422,8270,1812,1585,7947,3587,2595,803,3759,8391,4268,2598,4251,9776,923,3330,5126,5844,-531,8193,7005,7714,7211,-772,5223,8868,8430,1646,8921,-429,-622,3192,1830,5652,1653,4222,463,1100,4078,1905,4666,3695,1417,8515,7903,5251,8332,7005,7044,9977,7540,1194,6804,2628,3976,1968,-501,9526,378,4107,4743,-842,504,6234,967,-33,8762,4890,8617,4078,-991,6781,3386,1835,9696,7952,1387,407,1564,2018,6821,6244,8139,8650,4275,3914,6064,4495,170,6088,5345,6827,9875,259,396,1347,4249,6702,539,4730,-283,502,3269,9654,-64,2313,806,2036,4890,3710,4733,-24,2806,1768,6851,8152,8299,810,2049,6064,2482,2735,5372,5618,275,9879,7114,4758,7215,4684,2576,5472,-276,-759,1999,4579,3402,6611,-713,6155,4382,2447,9982,5205,3666,5070,5233,9575,6897,7476,-696,7322,869,5621,5794,-924,9352,4936,5345,7400,8039,997,5140,2602,5957,7165,8200,5776,7849,9340,6963,25,6105,-163,7236,7671,755,3787,-656,8465,-934,5652,-820,3091,6257,713,4156,600,1272,5904,6332,482,7461,7352,1693,2491,8059,5165,9057,8398,292,279,9682,4994,8884,5813,2906,7370,4756,2715,1958,3994,1219,5273,1983,1639,1166,7531,5810,3481,2821,-820,1135,7528,-616,7295,9725,7891,-985,2341,8277,4565,-215,3888,9094,910,318,5499,8854,3825,5280,1865,966,6347,5634,-628,-545,7886,-296,9355,1505,8669,380,8206,6256,3567,8516,1973,3072,5869,9695,-389,6633,2451,9292,1941,3849,8288,7621,6338,7161,5735,9663,206,1952,5942,-249,3601,9074,8535,2974,4486,-786,5042,9692,1968,4240,4737,4645,2722,5006,6656,5246,1818,2425,8325,8953,9316,4687,3362,-156,459,7305,4601,4982,1198,340,2356,-783,5315,6769,3095,1892,-694,1727,6652,4253,248,2340,8781,231,2070,8751,5684,651,8259,6311,422,4476,8549,7432,8763,2264,152,4948,-219,3192,8610,-812,4701,-854,3707,7732,9317,-648,1709,9227,-562,6829,6057,8433,6818,2584,9130,3930,7198,7982,4075,6684,1613,5810,4996,3610,2728,7065,5652,6356,1613,3128,441,3150,6586,1223,5181,2730,8529,5937,6252,-7,3968,9472,4030,2623,4599,2111,3423,-247,2224,-38,9354,-73,684,2393,969,3037,8524,2308,5419,1410,7085,6937,7678,71,6023,3361,-478,-631,5140,8031,5055,8563,1128,1718,7509,3511,-943,66,1099,-851,8572,8056,-829,8082,-823,9508,8564,6086,9456,6985,-660,789,-757,6370,1353,3466,4113,5736,5484,1475,5274,5335,8713,-704,5239,9425,9681,2045,-451,6540,7726,8419,565,3756,575,2224,3505,9874,1102,6404,7393,42,915,5819,521,8067,4472,4180,3161,1394,2691,-111,1298,8171,6676,2306,1016,1555,1761,1091,-679,877,1465,4714,1570,5099,5286,2552,9594,7022,1952,682,9742,7454,6550,2318,7210,5229,3738,5333,4926,953,-312,352,9935,6739,235,5306,4358,9521,3393,118,3263,7748,5933,4490,4849,-822,6262,9859,2909,4913,6803,2918,8824,-958,6840,9494,8801,-167,-488,791,3511,399,3422,6872,585,6090,529,2144,4754,9228,-530,-806,2541,2271,5811,7991,-166,3249,4144,-956,3458,1681,-660,6,269,8812,8314,6390,6522,4652,-332,3587,7288,5221,5026,7429,-603,802,-543,8106,3206,4342,698,3133,6443,8638,4408,1461,1511,6950,3760,1316,6917,6564,2028,160,5396,3872,2965,8868,-833,-661,8268,8785,-377,-104,3128,5829,6400,-987,8454,1640,3891,2919,2887,-992,6545,9296,791,4141,8526,1888,2039,9530,9697,477,2705,1277,3128,2865,6641,5878,6378,9379,9827,1821,6459,8069,1484,5036,9501,-316,8519,3424,3784,-533,1545,-88,6283,954,181,1407,8429,7307,-949,1740,2564,3878,9232,9447,713,3851,8617,7044,1246,7061,4929,2507,4812,3850,2640,1755,3566,4691,9851,5335,9955,2314,3362,-782,-471,1164,8437,9111,3798,7304,3869,4040,2320,3275,-686,4783,8862,1003,3215,-811,1248,9078,497,4344,5787,482,4745,2792,-757,5132,6652,6766,9561,-298,3112,2710,-612,-227,5425,5875,8664,4595,8077,5345,1460,3912,9630,6794,6593,7611,5492,143,8600,-975,461,462,630,5739,6801,7114,2152,6254,5444,1466,1368,247,8360,3277,9104,1250,4012,5502,1189,7801,3743,8192,6995,7184,9004,8526,-647,8931,2719,5946,2424,5006,6360,6457,8332,509,1874,8052,2061,1238,7172,8634,-339,7213,-825,4467,2600,7450,4122,4117,4890,1163,9575,9843,1409,5928,-113,6174,2519,7828,1232,3469,8503,-117,3240,4099,8113,5669,2004,7158,7711,255,600,5511,7819,3935,9668,4744,9799,2076,1928,7113,4259,8770,4367,9841,2125,7156,3561,5827,806,3683,6273,-432,716,5119,5899,7050,8127,193,-640,4598,3696,7676,5584,-761,6433,5753,221,3073,1583,6731,6783,2008,7792,956,5924,5840,-901,839,4507,4704,55,2344,7423,-219,6936,8833,6565,4792,467,9647,733,2914,8469,-267,8924,6770,8433,-845,6022,601,2691,9138,9362,3578,2784,4450,1084,3801,-573,6653,5015,4816,5139,1037,5362,7668,9188,-879,131,7424,6488,9677,-25,6239,9296,6082,3906,5807,9277,8276,6548,1145,3376,7732,8110,225,1649,9752,9060,4387,-961,9443,6975,2832,7295,4508,5647,4018,-399,3664,-671,9411,4831,956,932,4440,7251,4159,689,2176,3070,9906,-689,7910,7842,1619,8060,4248,7207,4645,7843,9561,2337,5653,4936,-365,7045,2302,9816,2404,1111,339,4315,606,8880,-174,6360,58,4687,966,9330,4303,3249,4768,3343,6637,3181,5361,2462,8682,7264,4157,9673,3797,-805,9523,6397,2233,3457,156,8707,-931,2126,3482,3555,1405,-281,4733,6921,6506,2239,5624,9104,9039,6645,7266,-659,3511,1621,3236,7933,-905,8935,1249,4229,1091,1162,4250,2596,3954,4593,737,2384,56,6128,5823,7351,1655,3964,4703,144,3544,5004,55,5867,5852,-165,4411,8628,8929,1577,317,-752,8476,1028,9133,5295,-233,3944,1813,3275,7649,924,7497,9170,1310,4506,4382,-389,4131,827,4821,5247,5845,6239,6130,6582,2281,1354,8861,7707,2046,2004,7764,4230,7495,783,-811,3037,560,-888,2836,2267,1296,153,6840,396,7172,6920,2161,9897,966,9664,2604,480,845,-343,6354,6195,-926,473,1977,444,9864,3116,3907,3224,-413,1357,6762,5309,-89,5749,3629,5236,4556,3288,9330,6082,-120,1333,6313,756,4156,245,2519,1751,1971,-418,6228,6007,3492,-196,6184,9617,4209,6155,5707,4035,579,2474,5361,7776,3683,9657,6317,8929,9672,9001,2727,8870,-580,5252,9711,514,3314,764,5016,6052,3594,2987,6824,-234,7400,8734,5448,8255,6798,3304,7962,445,7331,9661,9138,-86,6033,5438,676,8988,-67,5596,649,7595,2903,5798,8862,475,7708,6054,-999,2354,8241,6932,9276,3542,8969,9999,8494,2216,4940,6158,49,6597,9314,6622,5339,7783,247,473,5646,6814,1276,6397,8441,8588,362,2777,8406,9865,7453,5132,-831,4462,5182,5161,8457,2664,2105,8943,7344,1592,787,8583,2551,6793,4972,161,843,3031,6112,-108,3610,5320,6906,6957,415,4802,1445,8158,-171,-360,-48,3674,4080,6535,3760,2085,9047,3278,6381,1595,9553,2683,6972,4829,9870,9851,1991,6603,8107,6445,1428,9669,3490,4137,6945,8305,3037,7245,155,9384,28,352,-592,5740,3789,-634,2764,1998,6835,2789,5321,713,530,9018,4020,5001,3254,2641,3389,8399,4887,4836,3030,-976,8049,-188,8323,4666,7114,5350,6507,-151,4589,3662,-238,671,8604,2870,4997,1816,-463,5034,8316,-604,1658,8320,2987,9098,1360,-872,-706,7375,5247,9304,9338,-820,8202,875,3030,441,6859,1382,-653,5381,7023,-153,7505,8451,3027,5559,9888,445,8969,7570,630,2492,402,2294,4107,7399,9881,8971,9914,8906,2863,1971,556,1938,3511,9838,9416,9833,-174,9470,6731,9278,3779,3987,1400,4,7114,3086,6916,-334,-646,15,2810,6177,9251,6546,4433,8329,3318,6053,4754,6166,1462,3780,3236,1559,5070,194,9040,313,8322,3591,6913,8292,5279,9467,629,-302,9164,1326,413,2065,2295,9766,8626,9916,8247,8654,5761,2003,-498,5131,5352,157,1875,8395,7145,8977,9687,6841,3517,9465,5853,6761,4793,-231,-574,5784,2192,4755,1367,2827,8559,-326,3654,918,-945,5240,8410,7340,7714,29,9497,5811,9920,1524,9503,5572,1421,6495,4431,-659,9752,8,329,-67,5187,9222,1979,1825,-27,539,6563,2525,1606,1784,6836,3512,9273,5658,9125,-50,1891,830,5094,8474,2349,7505,8733,7534,7265,2885,5376,-74,4473,-924,2363,7727,4454,7496,-640,5156,3863,7826,1136,3523,3309,3541,9830,9590,9688,3916,8112,141,-543,7319,8785,4866,9283,8623,350,5421,6486,6322,8791,1026,6509,2852,19,7582,6228,8050,7609,6086,9770,5484,-168,1251,9831,7774,1581,-85,2298,-671,5492,7334,8522,9375,6532,7685,7809,2155,8467,8317,1555,3106,3596,4606,5945,974,1333,-61,5984,5709,7211,301,5071,6250,5859,1896,7839,5546,-742,9142,7769,833,4669,5457,2738,-498,3385,7076,1817,-741,9960,6396,6165,-745,5043,-305,3272,2465,9917,2458,225,-514,9226,5412,3196,2293,2569,3011,4480,546,7994,9609,4778,980,7145,-244,1977,7555,-196,7686,6982,5720,6737,886,5728,6621,2596,580,3400,1347,8491,-961,8954,4867,4370,2782,8920,4946,9092,-424,7,376,5557,5351,9586,4209,9220,9831,5392,652,4115,-244,7275,5943,-497,7791,-451,7856,8634,1572,6401,5379,5829,2895,5379,2011,8660,2488,1699,6336,2787,8167,2446,3956,6614,4213,4332,7496,3908,9621,1184,5311,3781,7353,3265,-739,5795,-271,9580,5457,2381,7829,9694,117,7817,8035,1168,3295,6490,500,-150,7292,5401,2922,-704,7893,4743,2648,5279,8363,6963,3546,5507,1947,4403,-343,3902,7185,8654,-490,190,7884,27,6152,9745,8711,3934,-600,8477,4648,-259,-564,1290,995,1664,6133,3519,4859,4844,8767,-736,-908,1422,4505,8444,2195,6463,9146,-727,4271,5212,5463,8127,6724,8552,2599,3509,9613,1122,2968,7623,7703,4024,9062,1463,9171,7619,393,4200,8046,263,5102,717,3128,8368,4423,5053,4780,7714,2852,8066,9694,184,2016,-953,130,9789,5979,4215,6096,1073,4362,-204,2156,1371,6640,8084,3712,3322,3640,2734,2926,3957,2569,729,5117,3415,4988,6557,-419,979,480,3319,5848,8398,4423,483,6824,591,9039,4410,2116,9208,5934,7448,165,8722,2614,6916,9145,617,3433,1294,1166,8533,9048,2983,7794,4241,8455,501,1810,3955,9351,584,9862,5632,6237,8644,1845,2427,-949,4193,247,8173,7897,1975,9834,6375,7573,2272,3106,8330,8298,1819,7068,2134,5229,-936,7484,4571,499,6720,1134,6431,4369,4566,5630,8889,7450,5102,7767,1212,6198,795,9534,6259,-492,6136,1207,7017,5347,8614,5854,540,2920,1048,2919,8653,4380,1089,8432,1931,3380,9539,6889,4419,3754,5186,6501,5615,2610,2539,-411,2002,43,286,3097,5071,761,7,464,7040,2952,1724,9138,-696,4332,5635,39,-700,9407,5876,1747,1475,2732,3600,1081,2729,1920,9145,3992,2429,-796,1858,5169,5165,4568,2458,1645,9227,4864,4010,7695,9600,-597,8878,3988,745,-418,8920,3028,2429,562,1341,2687,4861,1869,773,5591,2828,4157,8397,6278,-775,1257,2478,9993,5880,1520,7640,-591,5964,9224,7724,182,5070,9067,9874,6823,5969,-883,3091,-711,2501,3357,3312,6510,9240,-725,1811,-310,8896,9974,776,-530,2407,6170,8714,1515,4296,5942,6699,-770,3199,8661,1839,516,463,3450,1597,6241,1005,1499,4066,9293,2222,129,7721,2505,6935,8870,3769,3691,867,8009,7064,377,-340,4833,510,7553,4926,9511,5686,2675,9566,-964,706,5767,9675,3535,2260,3120,93,9839,8427,-501,6231,9541,2316,563,356,-719,8319,6267,4650,5333,-351,4325,1592,26,4954,1094,352,55,9771,2272,5649,2075,4010,9793,5822,5940,7834,6534,7685,1029,5611,9630,4409,495,2496,3680,3675,7953,3953,3751,2124,2541,8144,3339,1199,4964,4541,2870,3219,7663,7820,7284,-751,5080,7399,6199,7432,2181,-546,8282,6342,2127,848,6818,362,4945,2894,8240,8462,1087,179,1650,7583,1942,9765,6080,90,7245,-990,-532,8480,8814,893,2629,8331,2170,414,8073,8799,1154,8023,3677,2270,8718,4986,2267,6761,4535,5381,-451,2608,4496,5402,4647,9457,5639,4392,4023,436,9706,4971,1138,4116,9540,698,6297,1303,6852,9150,4438,8831,5981,2325,9845,6199,-857,1953,4228,3025,5799,9164,-661,3040,8311,1583,-804,7966,5819,7304,7573,2966,9135,2280,4762,9417,7715,8773,2057,-12,1138,-855,1209,8482,8373,4422,7321,-214,5779,1296,9817,135,6510,9492,3683,2892,6353,-622,9046,969,8417,9279,973,2906,4075,-121,3161,2681,2087,655,747,1168,4193,3939,-515,7196,5213,6465,258,7403,8720,4038,3243,9546,2300,2377,7807,6450,1152,3721,4506,5412,8363,7550,1134,5351,7442,8688,8668,7708,-423,4287,8345,9862,-609,9696,232,3719,7259,6316,8234,9650,7456,2985,1354,4317,5978,1051,5529,3082,3161,9525,5717,1966,5594,627,9183,6095,8684,1706,919,2606,267,9938,-401,1945,3082,3908,7803,3277,587,4040,9716,9454,4100,7977,5344,2494,3998,4283,2986,8478,2075,1695,776,5253,2850,6724,-773,-540,118,7697,3390,-396,4358,147,7530,4122,4228,2483,7394,-391,6855,5667,266,6888,1394,6017,2644,2163,7741,9161,4433,4247,9214,1024,6303,3262,-950,7515,6207,5345,9172,585,7552,2269,4084,6141,2334,7199,2113,1175,1230,7966,2306,-376,3514,9775,7491,2763,18,3955,7359,937,2540,1349,3924,5384,111,8586,9608,7999,3603,9781,7933,3824,5247,2230,984,1882,936,-900,2637,9594,2661,8935,5154,8513,7574,6651,7131,6866,3509,1443,2558,-551,-938,8042,5199,4045,3309,-50,3049,-327,4734,4006,6649,3012,2936,3548,2949,1159,997,3369,1739,1375,6165,8593,9221,6822,8406,7172,-698,9905,6482,8979,-973,3380,1566,2476,5672,-934,4026,4670,7914,5279,7703,1,4174,5669,3589,7212,6368,6494,5076,6441,8823,1591,7733,466,7432,6098,1298,3671,5976,8991,-147,5738,6759,4200,3654,5563,7865,4453,9757,2101,1224,9112,4127,6858,7197,6871,4849,4420,2662,331,3663,4835,1464,2502,1691,-174,-275,-926,-475,-135,1324,475,6649,9297,-839,904,8946,9219,7540,1063,8900,6285,4996,1421,4787,585,6523,936,1457,4003,1921,3399,35,7193,6081,6188,2138,7192,5177,3197,1604,5037,-551,6558,2898,4487,837,8754,2622,1589,1508,5329,843,6010,4915,908,-240,-232,3336,5950,7893,7705,377,4773,7597,5586,2403,1419,4228,8286,2636,8613,4276,-112,6525,3703,617,5844,8140,8910,2122,6836,3333,2944,7906,4364,6295,6225,9114,3622,8006,7155,7945,7906,2484,3824,107,7129,3692,6033,6990,7130,1557,6141,6480,5093,1954,5125,3299,3314,6285,3963,2002,6061,5535,7786,352,9224,1086,6852,2187,1316,7096,6638,8839,5362,9696,2945,3846,2344,5646,2353,-161,3860,3967,8071,2625,8021,5440,5168,24,4106,7262,367,8687,8605,4231,3871,1382,4862,7788,2246,-176,2993,5306,-582,577,4699,9345,5166,950,415,7536,881,7859,4500,6573,1184,5693,1069,6578,2781,-242,9701,1963,7674,6425,9658,4770,4225,2164,723,3499,424,-146,7969,3107,6738,-689,2212,-675,4349,9902,3980,5781,3549,4074,2396,8264,-802,3032,9357,8431,7488,2840,775,8596,733,6061,3977,-284,1238,3291,9657,3546,6858,1189,8213,9747,5660,6476,4528,4957,7253,3890,680,4761,9241,2633,1453,5043,3648,8879,8454,7166,2957,6903,7264,4511,-405,-184,4784,3105,8377,9393,1320,7344,3443,1258,534,8827,-986,474,4198,535,7245,8086,3974,3728,3435,2475,-140,2463,9480,5245,7833,5557,9731,1512,3579,3117,2722,5002,5462,8151,7016,1569,1105,-709,5349,-330,8632,4049,-539,-21,4874,1108,7450,277,8838,6733,1398,891,4679,9122,-970,393,-804,6124,9225,1520,1503,8058,3402,1799,3917,6121,2811,-396,7828,8167,282,7565,7266,226,2682,7862,4070,1432,-605,2693,9785,3110,8008,9044,8506,3050,111,2687,3917,6691,3614,8329,1916,1815,3580,8073,1402,12,6763,2390,8798,8299,2445,5232,9177,1738,4798,8109,7201,4315,5231,7786,3538,7301,3518,9725,1589,9220,-195,6659,1987,-764,-960,1399,2833,9187,-350,5820,4843,3126,3502,4812,3442,5436,6335,7275,4818,1204,4351,4374,9641,1274,5661,8018,9493,881,-396,6990,2239,6584,1476,1556,-271,138,1433,2455,323,3899,485,5025,7182,8658,2570,9016,3261,7596,665,8000,6293,8757,6953,9772,1628,4966,748,4608,2874,9674,3330,5803,7741,2359,9496,9336,4933,6507,3226,7234,3543,-71,-314,913,8350,2729,2782,2850,8550,1491,7039,2405,2999,4122,1472,4461,7686,2379,-170,4499,3095,3667,3733,6493,1302,6137,8516,5951,253,443,813,-769,2660,3629,7515,8879,-667,3281,588,9936,5841,3433,-713,9357,2096,2447,5149,8325,794,9433,9222,6369,6176,5892,7210,6387,1533,65,9788,-314,2253,3587,37,6902,6823,5321,4587,6954,8890,3051,1789,2215,5948,538,1706,3853,8798,-420,3590,195,-29,1835,750,7036,4360,2797,7510,5774,3125,2752,9344,4368,2713,679,-518,4061,2704,5707,488,6980,8385,88,9779,8975,5997,6546,5705,-828,2978,8969,2357,1129,-444,2334,8708,9051,6979,3528,1432,6121,1089,-268,386,2554,9990,9117,8697,3440,5614,-450,4474,5711,4713,7577,7811,2817,5184,4302,7431,9758,5450,3561,-941,455,2487,7270,2165,762,8640,4476,4973,4879,8523,6667,-773,6620,2121,8373,9262,4134,3660,3674,-141,8380,9482,-652,3520,528,7022,6270,4377,3984,3589,2088,-110,-400,91,7406,-56,3313,3852,2951,-208,1234,1848,1886,1548,8721,9810,7500,3944,3767,7011,9517,8093,9607,4725,-723,3534,-664,4207,7599,2456,1204,7808,1009,2778,7281,-861,7117,930,3570,4153,1875,5304,1091,167,8880,2410,-274,7413,802,8529,499,2164,9961,8973,6035,-913,2538,2192,1672,4355,6863,9494,1687,1757,3332,2967,8823,7444,646,1285,-502,3223,4720,6662,-97,456,7656,-878,6493,2371,2081,4928,8567,1998,1505,9888,-666,7439,9658,-261,7004,2680,5639,798,5821,8517,6976,7622,50,5706,1889,644,4161,9544,713,-602,5488,3099,1038,4791,6118,497,2548,5077,8602,7884,225,1460,5512,6060,-66,3546,8471,5204,6553,4734,8254,1988,7892,4070,1073,6084,8136,5070,5526,8606,6501,7111,6282,2002,2116,6455,1596,648,5233,9111,6049,4109,9143,2245,3990,5015,-922,-388,4493,7700,1842,1384,6807,5994,2965,5566,-723,7806,4758,1277,5060,4222,1595,1690,9977,6721,8371,8287,3793,6458,6332,6555,7394,4942,5354,1919,8381,9371,5887,2344,5143,966,5831,5215,9534,6357,6071,7480,3698,925,972,5361,8289,8469,9159,2902,2627,2337,3207,7298,6264,1329,2023,2782,221,6652,6185,5670,9142,897,6546,9177,9721,4057,4338,1685,7723,4902,7319,5416,976,339,6146,-806,5805,3202,1300,6889,872,8502,6653,-214,9437,4469,6018,6486,6482,6514,3933,763,6030,3590,8261,8460,6249,8376,63,7806,261,9516,9170,2160,6948,6921,5264,7285,7416,8956,9147,8609,-792,5377,1550,233,6828,99,9080,5076,2013,523,9022,4388,4064,5786,2397,354,4034,3849,347,4325,2616,377,1705,9852,8384,2065,9636,-408,6331,-946,3908,4026,5996,9821,4719,3549,7351,2955,-911,-29,3517,8228,6181,9002,8925,-801,9377,6830,7455,3687,9823,527,3118,6551,3098,9440,5371,5316,549,-98,6125,6645,8018,2750,2648,3912,2054,195,-710,4454,105,7222,6976,2394,-427,5912,8809,6746,3005,737,8847,406,5650,3529,1992,3076,7257,360,5312,6640,739,2077,-853,9242,6428,8202,1917,8233,3631,6004,634,7913,8465,9504,2360,2748,9063,7257,8566,6575,5734,5047,1383,4468,-604,1159,6497,9436,2788,1972,8944,2525,3243,-633,1404,4514,421,465,1815,8454,2039,6714,3947,-412,1182,-778,3333,2231,5483,4515,3399,5948,5002,2934,2071,8620,4650,1119,9395,1512,7886,3265,3847,5617,8972,4732,2607,8894,3033,8933,1470,5308,8022,5604,6687,6829,4871,3482,-911,8410,3971,7042,9438,5008,5596,1048,8287,7877,3134,-795,4944,3518,-558,-641,6760,9600,5576,1158,2517,3830,5422,705,7473,4479,1667,8401,-276,5930,6272,1414,7822,3713,9486,813,690,-649,3103,7888,579,1162,8460,8563,2297,-93,1975,4588,5354,513,5434,9574,5857,7474,8132,6101,6830,5546,8876,6487,8414,7211,4504,-842,44,4340,4543,-826,6679,5097,2427,2914,4712,6653,1528,7493,5672,3729,5565,1607,9435,7358,4012,2047,3694,7077,5839,8244,5486,641,846,9187,-327,8598,-17,4047,4718,5130,7034,1467,7626,-156,61,-468,-22,7585,8760,6049,8679,426,6959,6600,959,4650,5892,1676,4985,8450,4188,8232,3904,5535,7521,3779,317,9399,7561,3442,5773,1706,4850,3156,8108,6008,5162,-7,-103,5836,1859,5610,9118,8878,441,8467,580,8915,7158,9005,1471,6932,8001,-272,8997,2635,8273,4686,7634,2156,-470,8945,8749,6505,-141,5257,1134,7653,-902,4697,8456,6707,1145,7438,2022,8750,1997,1136,2604,5799,5669,8008,7404,7842,3549,3746,5755,6647,7744,8253,3625,5785,3058,2831,585,-193,6815,3477,4735,-344,8589,6023,6815,4673,7374,4902,5824,7984,3320,8970,3642,-404,3123,6023,1522,5490,3821,-827,4421,3511,1823,1249,2691,4061,9719,5127,3045,987,244,4719,4333,-625,7303,2173,8345,948,4973,5267,7553,8024,7721,3755,5156,3608,5315,6534,9504,7610,406,4109,7917,-251,3242,157,4734,3691,2024,3310,3725,1514,7908,2944,6656,6534,8885,4281,8397,288,4656,3416,8848,5531,5033,1734,6142,5485,162,6507,4905,7975,7962,8986,7968,5523,9483,206,1150,6086,7954,6097,2734,3403,4454,5837,7486,1785,-346,9672,3279,6825,-404,718,4305,1134,4517,-941,1746,104,2303,2585,7913,9128,-461,777,6210,180,6644,813,873,9837,5992,9772,7033,2781,-369,4799,5987,1563,9913,3239,1481,-322,9982,1265,2586,4379,3358,-296,3408,3858,7617,1616,450,5611,157,-193,6282,4780,474,9559,8970,17,5880,664,2481,2087,3939,8263,8667,-347,-529,9784,6506,697,269,8244,-662,1282,6477,4183,6751,-37,2918,-729,9990,-812,-291,2762,4787,1265,5874,-854,-782,4324,6929,3134,5928,362,6993,2258,5678,-75,211,2302,9861,349,2815,-18,5104,9473,3958,4747,9315,9964,1218,-182,-591,2645,9184,163,6037,1308,1813,6096,3375,1843,632,1995,4196,-648,4676,5619,242,6023,4249,2173,6438,1513,6732,67,4048,9862,8001,9401,7478,2754,5553,3813,1522,4417,4606,281,-41,9060,1999,5856,8391,9434,3402,4265,2101,554,2145,6001,-580,2730,9039,1610,3174,2719,9363,6433,1955,7758,355,4787,6929,7957,-625,5611,5973,4026,9458,5096,8517,5555,2737,9622,5704,9637,1535,4022,4237,3459,4146,4650,7142,9238,-251,-228,8396,3732,3969,4492,6789,2850,4131,5552,8655,-714,5229,8637,9235,1458,-661,3822,924,4435,2153,7593,1077,233,4445,6449,3800,6609,3998,690,4077,6797,-81,4105,5339,1170,1315,81,912,1576,3395,1591,3379,4072,7733,8185,6947,5376,4684,9314,6877,3146,8944,-54,1034,6740,1038,1055,8726,7353,5164,1431,6508,-176,3177,1808,146,-114,7458,2064,7816,9704,1230,9269,6027,-622,6116,4740,6188,248,6983,8067,6867,1429,4107,26,-261,4374,6310,2536,8266,6219,231,2305,7776,4473,7630,-715,9031,8138,4398,5769,7100,7641,9256,3466,134,8616,9511,7079,6631,4609,8777,1126,9662,3608,-270,-799,1232,714,8471,-921,7293,3169,845,3588,3538,-607,2255,9356,5963,8335,2265,1118,3725,5472,9891,9686,932,6879,6261,6313,7127,3013,2169,9926,3200,8306,2032,5458,-789,7809,3982,6742,2066,6321,5221,2122,3748,7763,-139,4480,1396,4002,2808,2302,3264,9708,4610,4363,2655,8617,-522,7565,1681,9311,8392,5095,2315,4379,5120,6927,6246,-666,8850,6679,1608,8741,5540,792,678,8128,4147,1040,3778,5925,5081,69,-195,651,4150,435,2176,71,2844,8872,551,7267,7417,4858,7472,642,2735,4988,3432,6220,9778,2140,72,7140,1218,-85,9653,5740,8330,9117,6249,-867,5067,7963,22,6557,9374,2487,4885,9596,7318,4485,1971,1174,409,6753,4764,3662,7699,3369,384,-92,3985,9252,2289,9547,2538,3164,9456,8069,930,6535,8470,4669,8469,-305,2934,1414,8004,-431,5748,1733,5595,1050,318,6095,8163,1256,77,2190,9774,4022,1092,2514,8853,2473,7776,8501,7030,1961,-704,4446,1062,2693,9798,4520,7522,60,1313,-189,1009,-59,7365,8136,7421,8784,2396,4601,5590,273,5626,2184,-162,9093,8500,3987,3006,7549,3894,9209,1696,3131,7399,2824,733,5368,2252,3762,2789,1418,2068,8367,8082,5392,5053,4618,6615,9477,114,889,4137,9857,9987,3211,2155,2463,1189,2308,3972,-326,7396,2501,5511,6357,5106,7066,849,366,4207,8876,-164,2904,2762,3497,7843,1749,1673,9221,2632,1623,7538,2755,-495,6365,441,812,-211,5965,7194,6270,242,8607,9545,6660,3121,1674,2832,7229,3064,2307,1612,9824,2884,8393,259,9720,6419,9340,9071,8401,3843,9802,8341,3919,9790,530,3473,2228,5575,4786,380,9460,3210,7508,1605,8992,3505,3070,1358,7830,5020,5008,9112,1053,192,6705,6487,5491,503,8967,258,8606,8472,4681,3397,906,6945,2470,5518,3645,8757,3642,4663,2366,4722,7309,5976,6187,4110,3742,1410,7063,3513,6725,6134,1707,384,4431,7040,466,1738,1563,5019,1000,2702,2821,6475,483,8942,567,4725,8737,7934,8431,5097,6782,2887,9940,8148,4444,6814,-5,8987,7696,9097,7529,5997,5633,4160,-817,8333,3656,-446,4715,7129,8314,8803,8228,8227,9273,3524,2540,1043,3725,3969,-889,519,1639,638,2916,5313,6941,3818,2772,2084,7842,2771,1116,3988,4738,-586,8641,4599,9604,8579,-670,4850,757,3884,5679,9582,-309,5628,6508,2088,7864,9159,7381,8427,7718,3572,5282,6166,6338,2673,2030,4146,1180,3676,4124,291,7158,9956,6250,5345,7001,-559,7480,-540,5612,9739,4417,-464,2339,9265,6843,9243,5283,7758,5811,3133,2983,5403,-101,4177,8466,7392,4048,9352,3250,6986,4148,1589,6253,-970,441,3634,6379,8270,5751,2802,1998,1786,-983,9693,985,2483,1056,4336,-633,7266,4186,2447,3844,9076,6268,6859,9824,4847,8080,931,4742,3801,8016,3803,7598,6466,7459,2325,8046,590,8206,8551,2025,7098,4082,8074,2900,1168,2986,165,2559,5803,4569,9806,7075,8516,484,1446,1759,4344,4724,6627,-269,2363,5332,-343,1897,2899,7686,9044,9704,6444,3986,6260,7688,3081,6909,8592,777,7228,2457,7969,6464,164,8696,8850,1030,4785,7783,8493,5857,7361,6677,2693,7970,9990,9226,576,6170,1858,870,3219,3575,1393,9548,3859,2324,2713,7419,6819,8193,9580,7460,3751,804,-62,5368,761,9091,4378,6915,8,1088,1610,2032,6481,2621,6187,4701,7494,3829,3132,7208,2060,2661,751,5127,3712,8497,8880,5993,4771,7272,-692,7917,6721,3207,5084,473,782,5460,4387,48,2457,1653,8266,8758,7348,1,558,7734,-97,51,3178,8361,1267,8259,6298,2269,4464,5695,2571,8174,3110,7677,5724,5375,-525,850,9981,8825,3765,9164,5939,7455,3101,2712,5275,6538,2294,3663,-632,5131,4515,4934,8558,643,485,9435,2667,5746,7057,297,389,9422,8908,8842,9537,4336,-802,-322,7652,6943,7585,4781,4911,8045,8343,8727,4104,7296,3746,1470,8075,-468,7398,403,5811,5189,7270,3857,8929,8975,6824,6509,9375,-743,4375,6010,5294,4334,9598,117,7608,2653,8990,2763,5088,1932,8512,2111,926,8764,1687,7115,-717,-55,2521,321,3924,1056,5066,1001,3073,5919,2176,5695,68,7679,4897,-279,7863,6396,6291,5703,4340,9646,-492,7495,3838,6920,-292,2482,812,741,3410,6768,3861,3346,8492,9838,9748,9758,5334,5082,4072,1910,-411,187,-24,3487,5837,7686,4217,2640,2573,6443,3871,9607,6147,6539,9062,2033,3864,1962,-966,5032,6716,-131,292,2085,4560,4019,3368,1770,3575,8935,7276,752,-63,2093,8903,3902,5912,1494,8859,4507,9510,-754,3483,5614,1386,8895,2011,7261,2861,7800,8821,75,9119,8410,7890,-431,9827,9267,4682,3795,5534,5521,6547,1392,6524,7009,8736,520,7068,-229,5299,6849,-392,5442,-128,2564,4986,7608,7694,2264,7383,1301,496,9526,7708,3351,9160,5416,6884,5182,4382,9888,-134,4396,7375,6264,3600,7140,7486,1741,4717,2562,5713,8636,2982,7519,8011,4049,2519,6455,59,2042,3542,2081,-449,6794,9593,8356,7199,-166,451,6667,4726,7173,1764,5166,7544,8748,2708,3475,6651,6377,2606,5434,2449,7938,7917,4180,7901,216,4284,4816,5316,2235,-817,8204,9236,8998,2230,5785,5908,6495,3596,8119,7273,2120,3685,8872,5903,2797,3950,6357,4504,3132,4228,1223,9946,3172,6361,3865,9274,5304,3234,6295,4242,9485,670,-440,7090,5057,2493,7313,232,7166,-975,9086,-382,7923,921,7442,6172,8501,9216,7434,2836,1848,7047,572,2268,552,4814,8069,1742,9631,1999,2115,3161,3558,852,2451,3678,2016,8966,-106,2558,5078,9951,7103,1517,-835,8835,200,768,7449,2860,2997,2385,5806,-234,9516,4111,7107,3100,8366,7502,8851,2209,4377,4150,5291,3368,1132,8545,6327,8298,3167,2148,4710,1903,2232,921,7411,5693,-685,654,-219,4018,-236,3029,5739,6967,1787,9940,7537,2106,8805,4297,7550,-604,6741,1425,2062,9060,-203,7899,9779,3200,2629,2942,6132,8152,-47,7568,4679,461,8349,3123,3498,5982,5433,4076,8508,8120,52,262,8584,7389,1544,9690,9905,726,2719,2052,2169,9784,8875,4318,-634,293,118,67,4586,1148,2114,5725,8669,8188,3106,8778,3886,-827,8376,4147,9982,5267,4684,9155,4129,1648,-280,4495,9609,-749,-727,-98,9630,1824,1802,3953,7150,756,7247,4325,1857,2942,4598,2336,9992,8654,3797,1109,3298,3956,3669,4351,-353,2273,1962,-374,1866,3540,1180,3525,-244,5300,5888,7735,-313,406,7204,7925,1993,-66,4855,9349,2781,4243,-887,1938,2083,8180,4748,7617,7299,452,8497,1972,-511,6001,-250,655,-579,4849,7581,6600,3985,491,9046,106,-476,4846,-968,1840,-298,7636,1039,7546,4235,-203,9985,-687,5642,-408,3820,4280,8648,6705,5797,2618,4866,386,4210,2024,3251,5626,8682,1246,1973,3311,4107,7170,4666,5568,8466,-587,5070,5223,8221,1323,9928,7313,7120,4262,9535,1462,3723,9989,2254,0,2067,987,6620,7539,-661,7287,2104,8747,8414,9874,3514,1040,6895,907,-917,4105,4863,1937,8372,9514,3269,1536,7454,8574,124,-342,6067,1733,188,6774,2901,9046,5316,1672,85,-341,3266,9258,1796,2826,4286,1160,1060,7707,4819,2944,4783,9693,5357,6740,9184,8147,-800,-23,8720,5617,9514,9340,6517,3738,7183,4559,729,2856,5139,884,7582,655,9437,870,5161,299,7104,6522,8539,3451,670,9483,7215,6514,924,9169,3280,9830,7120,3613,4809,504,2594,8453,5533,5194,2397,2590,7489,761,6292,5860,3189,2593,7306,40,5901,2288,8511,1693,-498,7846,-143,9045,8994,4522,9187,8472,1178,4669,-586,5382,2543,9359,9996,3024,1878,7380,6084,3975,5847,-94,6783,-941,8618,2647,7318,338,3151,9398,1447,9768,6350,5430,7491,8999,2858,7305,9813,4489,6771,295,9014,2453,7358,2620,9730,1722,4804,2504,3673,5934,1939,7099,810,-28,4645,3484,5747,-521,3203,2345,4697,2870,5161,6288,1492,9647,2989,9637,5452,1476,2965,7182,2756,8139,9533,9157,7242,5332,3004,-981,4903,4566,3628,1918,8215,7867,7526,2573,669,4281,7733,2792,3719,8196,2938,2019,8079,1141,6753,9759,1658,186,-964,-833,6509,-969,1410,9007,8540,9516,6882,340,5902,342,5076,7880,9291,738,-525,1284,2394,3823,2211,5000,1986,7863,-315,9879,4622,9176,3641,4866,-855,3088,3683,6176,7281,6840,6944,8560,-721,6058,5430,9766,2094,9543,8810,6560,2047,196,4418,3443,7412,8056,7437,7977,9280,4555,3843,1035,900,1803,8922,1520,535,9356,-508,-654,5410,2908,-463,3107,8264,6616,-284,1561,4854,3327,7320,6067,2063,5277,4108,4023,6248,9429,286,6885,3172,5351,8136,7960,7401,-710,6945,6193,5127,9132,2503,6592,6030,6589,9129,3068,739,7546,2573,8343,139,5910,2703,827,7090,1360,2740,89,1231,4186,3230,4966,6090,152,9687,1834,5398,3941,7624,2613,6621,-632,7150,5864,3566,9413,7621,1504,6956,4931,9331,1576,-837,1262,4530,3875,563,-432,4218,5105,1196,4047,4605,-897,2581,5097,7341,165,4068,-654,1484,6661,6885,9623,-385,-85,5236,6043,-513,9447,1230,9282,2831,2767,6786,2047,1169,1167,103,4295,9937,5521,2379,9105,1754,6069,4635,2995,-712,-103,3816,5525,2034,1199,-400,8663,345,8080,6163,859,-22,-814,622,612,8529,5280,1583,428,2391,3196,9058,3973,857,6801,528,148,5659,1813,6790,3694,4573,4765,3003,-678,64,6239,7676,4888,-425,9981,6328,5146,2862,2449,-517,-682,6994,6501,1948,7882,9619,6569,6585,-992,1734,2417,6409,4538,4081,9561,599,7472,9033,8048,9639,8218,5197,1011,3340,13,4552,1303,6109,-318,4209,8766,-804,2357,1248,2630,8847,5680,1901,8689,3736,8679,6299,2344,9242,9551,9434,3384,-58,8626,8890,2825,237,2551,8707,1060,6102,7057,4682,3098,2463,2912,3191,5853,7269,5811,1885,1400,7126,3413,4881,6936,7629,8651,1003,2087,1317,1136,7914,3370,8854,5717,3933,9225,8425,4314,-867,7175,8187,2442,8778,787,574,-124,5934,9037,2919,278,9616,2577,9058,1199,2105,3820,7592,4061,9723,9083,1644,2201,216,7158,1300,1485,2438,6431,3945,9539,8608,9383,4757,1675,3448,3436,6238,7946,-369,-693,1382,9774}, + []int{12469,6652,8255,3153,19990,8137,20644,3549,10075,13807,1604,20669,13697,7455,15314,4335,2013,14163,21393,12452,21732,16930,1605,8114,7629,14082,4288,7385,1029,16557,17132,15143,2732,13546,508,5711,12651,4021,19587,18621,4702,8842,13949,7863,14290,1450,7266,2219,5924,18054,17360,13882,16635,17971,1681,16217,9992,14529,2396,5283,6230,20618,1413,18319,18520,12576,18144,4197,20959,7445,18395,13352,3579,8441,18367,20131,18329,11439,16227,17599,13338,17833,18169,3926,215,1164,9428,11478,6926,18122,19092,2714,3059,10814,6327,10920,2148,6280,5947,20298,20911,2820,2915,13444,17196,3756,18974,7812,3521,9534,17839,9369,6816,13644,10174,17777,17992,12806,13130,17179,15742,5176,15916,1694,21332,11233,16862,21879,16489,831,3242,14954,20552,11053,14006,14581,6890,15433,533,5944,16728,21302,13081,7464,5531,12390,9138,10659,20787,10653,5408,5159,21194,4987,1047,11590,12839,10336,297,9718,8736,19130,17697,6628,17489,20678,21715,18252,15570,793,13231,13583,7273,16067,13995,1367,19207,5667,793,9089,2417,2857,4896,19095,13333,36,4837,18088,16059,14523,710,8289,20165,11147,7168,17089,17873,3717,13442,4828,18926,2671,17609,20316,15570,4493,15805,6773,13742,4039,13898,2702,2621,36,9094,3960,17236,18843,15185,21214,14978,9799,2964,4738,2239,9360,34,13972,5805,2145,11504,21713,8223,15577,5680,11393,8160,11230,6494,860,15660,19853,20337,1481,10650,12556,4373,996,17625,10529,9043,3057,5483,14597,20646,19688,1260,10941,1171,4593,18647,5214,11873,17165,15274,5103,14304,6670,16306,20783,16341,15050,10091,15566,16726,3250,15877,17800,11888,6475,17730,16691,15865,13778,4690,21421,18356,0,11624,7022,15894,3862,6395,20148,14031,12828,10682,20723,19995,1651,12003,17096,7614,14277,16181,65,12680,10648,4564,15175,15984,739,10697,17133,6250,9859,15703,11365,7008,4746,14358,7561,12319,13918,10301,4728,21357,6800,21644,18040,4113,12324,4875,11794,4398,15496,15946,2464,17812,5515,16984,17964,19380,9367,6094,18619,9788,8574,18239,10573,3810,15925,11723,5592,9329,21385,6252,15466,10321,933,17298,8164,20009,7670,20206,8310,2904,6921,19218,2822,12350,15511,2843,17011,2847,14889,7440,555,10416,20184,14284,5405,16800,12821,12906,6638,6327,13565,9345,5315,15266,136,12122,6922,9449,6093,2263,3073,9905,11335,3784,2971,16966,7877,6514,223,15250,18437,14140,5947,4946,17205,21361,8039,10497,4585,13344,5014,15061,15749,20218,7857,762,5711,17435,1220,9412,40,20197,371,9221,4625,13693,6160,14262,3067,13101,20813,8525,16478,11390,9410,18995,8399,13686,11214,13061,522,14362,328,15805,8936,11250,1373,7919,8622,1563,21048,21316,13611,4791,6817,342,20264,626,18888,4582,2882,2413,14171,13891,8611,10600,6165,11670,11436,19706,11667,10737,19808,2290,6300,4006,14064,6955,10000,4745,2154,8802,17528,2892,5493,5910,19246,10991,5790,11003,12651,6301,5537,18125,17188,684,8456,12385,18440,4840,13026,10423,5840,8867,6722,15103,8786,11953,7938,13995,16570,17366,6391,13749,8623,15615,6836,20410,16618,10002,14350,6005,4006,4176,7487,18144,2101,12310,18396,5770,7910,13010,11064,7233,11816,14324,12229,5331,13678,3350,21400,15855,11477,19540,6101,20857,18771,2930,10361,2562,5576,3092,18957,13230,18147,9923,4718,80,1184,20929,13705,4288,21379,2446,12569,15571,8763,5946,2628,5931,7870,4778,8426,9225,10211,13998,7718,17062,14459,19262,12596,17416,7651,20419,12065,18786,18117,17475,19909,18050,850,5207,17798,6902,11604,860,11786,618,9841,9135,7519,19398,6980,12252,18612,2651,753,16374,5442,7174,16071,17754,18346,11854,10849,11179,15595,4217,210,6099,20028,8229,12640,255,15947,20816,14200,2804,13037,11184,3212,15868,13960,14340,15845,12882,3985,7737,17758,2544,127,5995,15384,16593,1437,5363,7703,3526,5292,990,21312,2868,7507,17276,14224,14610,11128,20949,8451,13717,1007,17408,7666,14047,18188,19158,5174,7203,77,19137,5863,19673,15021,1250,6575,5040,16815,3230,7435,6895,17460,264,16109,2000,6957,387,19744,8849,10659,6854,2272,13991,10145,16710,17723,17824,7893,6644,8694,3059,14283,12132,10239,1876,17805,19129,10873,17834,9883,2806,12582,12672,16769,19629,19299,16484,6592,824,16773,10208,6250,5821,10127,8775,14493,14018,11096,8963,1319,12771,21141,10298,5387,5544,4951,19823,12845,8202,1520,7230,1720,19240,18216,7427,6581,15921,6809,12815,10307,1356,6658,19689,16941,6159,18100,9402,3442,15345,4947,20734,20822,13056,14549,13420,1031,10692,6907,10860,13146,5876,3961,13014,10044,7921,12540,9854,14651,2708,1505,13014,1409,15065,15516,383,1230,10628,3818,15646,7340,7326,12175,10167,14231,8598,2939,12433,3154,15028,3435,1837,10065,13975,16208,18093,9274,6406,20058,6491,15341,9863,6193,21082,4056,10783,10891,13057,20469,9961,17683,3332,12075,13521,7174,2684,10026,8565,9211,20361,9271,15646,15254,20314,21056,19950,2575,21075,13848,4208,11120,20475,2159,16133,10287,3592,15275,6311,6680,11917,19510,15353,20485,17837,16503,135,8186,14636,4130,10230,17674,9282,12111,8785,14073,16365,9701,5071,13646,21135,10587,19679,12239,13192,16207,2206,19942,17440,15576,10983,3327,15669,6877,15084,4110,17735,2882,19804,6587,819,11013,18247,12661,17566,13669,11089,9181,14693,508,3938,1761,5232,15218,13755,6757,18561,21089,14964,587,6458,11900,16649,5802,18292,17431,10237,14036,153,1730,555,20825,12379,10372,11410,4665,20608,9973,13962,14158,8854,6671,8679,13080,5843,18619,18091,10798,15991,12171,4768,12181,12979,20182,1272,1360,19338,18400,13673,15941,19780,19295,6506,9249,14117,16638,1651,935,10413,847,11713,8243,13609,11163,11040,17187,5451,14698,11397,17477,14147,7512,20546,18763,17338,19781,19916,5741,2305,14118,1664,14029,1198,13360,11276,4130,3776,3345,11667,6849,18204,11139,2335,13057,10603,8777,18476,19503,14610,653,9284,4417,1897,9054,6305,4153,16421,20936,16027,2941,2058,4082,16590,7315,9167,13029,2381,11705,16930,1550,12382,20173,11955,5766,2611,10946,4338,6109,5111,14891,2158,8863,2401,9201,4543,20910,18262,8215,5676,6597,20920,8725,17922,9262,632,5497,10560,12328,18207,19270,19762,14352,9081,6623,4305,13404,18586,6516,327,4372,15091,9874,5178,20733,14715,18975,1055,17361,19607,1764,17476,12390,10147,18078,306,6379,15944,4514,5049,9456,8282,4765,13380,8517,16483,19467,20295,13216,10461,13831,13249,15004,930,19919,16104,12551,8013,19679,5316,12900,1912,7422,19787,7351,6767,19959,2651,3897,7025,17484,6193,19733,9107,19337,14245,11858,16534,9208,12804,20661,8840,8851,17985,1820,12535,12189,9497,19201,8615,1984,14700,13298,14012,13666,17168,13473,8698,20250,14433,1825,10260,19863,5108,9397,20844,7281,15838,6035,14414,10756,13740,9041,12900,2420,5305,11223,13585,17017,14451,4227,8905,3190,2246,7991,19940,19328,8984,5401,5907,514,16318,18258,2532,11714,966,8960,17998,2646,1389,13757,8300,16071,17571,14023,6875,960,20195,6169,5980,8241,19736,5692,10973,8808,17807,12932,16274,4865,7624,13812,12022,18441,14742,3065,939,12819,13573,8507,11816,19611,15341,14284,4060,18037,12237,11835,14187,14311,10301,2850,2919,8961,4734,15616,20525,5548,5800,150,9439,13380,12713,2627,4266,17014,1000,6309,11328,10236,5645,10050,15155,6136,14575,11664,17323,12698,19093,9973,5049,18785,0,18858,14710,8727,9082,8059,10447,5798,15045,14481,216,20728,6407,575,3676,18265,3674,16485,8601,17843,12795,11254,1074,8187,3028,18944,1901,11645,3879,18332,16848,599,114,9470,15264,501,17385,571,19908,5099,4646,10113,424,18150,7134,2211,20578,2544,3058,83,13636,10760,10611,10257,12795,18589,15715,6223,18978,7695,17657,5317,7724,12018,10990,11044,16731,11337,15669,4966,12946,9238,7928,15945,10285,12230,12540,14687,500,2598,7641,18458,8326,2362,17671,19762,11123,17743,19627,17123,14684,6941,17716,2413,5652,872,19397,13692,3865,1947,5354,4058,19938,13000,4287,12492,7883,18069,3911,15788,8473,1891,2094,2475,7500,4916,16485,11869,10274,1581,11217,11782,6843,8509,6390,16951,9420,19346,4598,2985,8325,10596,4346,5693,19432,10774,4941,2265,8491,521,1777,997,13091,5803,12348,9626,12199,8031,3300,17201,15172,15774,4693,18320,7040,7615,16301,16744,2041,19196,4789,10364,4661,12318,1894,15310,11265,3763,16788,14518,15132,782,20090,11172,1134,9225,10347,18680,19849,17240,17594,8773,16470,1225,6119,2823,16697,11050,3546,1889,13367,11341,12409,806,8095,2101,3349,8768,4002,15486,10729,14193,1369,16890,1823,5198,19410,15941,4903,2451,11390,2694,18115,19450,18556,10368,14517,4190,19768,4722,2343,14344,515,3314,8576,7767,12908,975,8813,20330,16041,6482,18827,12883,15162,18699,2212,6999,4805,18215,6897,19586,12135,17799,11298,2282,19346,1070,11297,8044,13569,3472,8234,5304,5869,857,5599,5670,5632,14811,15431,7725,10731,19944,8722,7266,1650,9293,6914,3241,2164,12186,6342,6003,8955,17233,5903,8080,9717,10423,12627,3939,822,11314,7734,17837,1437,12498,15021,15905,266,9265,14073,13179,1746,15925,19306,463,5687,18384,6647,9615,6744,5019,15973,2385,11169,13990,5846,14583,10014,20410,508,12656,7223,27,11193,16872,20214,8338,8632,10089,13224,17967,10321,2861,4589,3121,1780,4582,3879,4670,2466,3700,17121,11146,8240,16397,1623,1922,19622,18827,1853,3021,20094,13186,5984,14628,5555,13912,10623,13519,10388,11241,12139,6390,7917,12295,9404,14838,11512,1077,8742,19747,17841,10695,5704,6119,17782,16519,11945,6411,8568,17061,19234,15608,17751,9665,13011,14553,15316,13093,4574,11790,9746,2361,15081,18585,3301,7731,8949,3947,11688,14049,15450,17088,3706,5318,982,1725,15769,20092,7061,5922,285,17729,5709,16051,6641,17922,1389,2086,19232,12079,13280,10332,9073,9217,8538,11950,7435,8406,16431,496,16048,11060,3027,12279,6586,9556,8989,17609,16625,4352,16298,8675,16391,17709,3055,5186,13013,5295,9831,5863,17992,2242,10404,13915,18086,13289,10994,11711,10851,7844,7049,11566,5849,10859,17025,10621,11676,18021,2680,13747,5420,206,17463,11819,12629,975,13554,15739,11487,4631,10040,16913,17001,1442,10084,2940,9777,17180,2465,8933,20084,10345,12916,17004,13625,4565,1149,18803,2894,798,13413,19662,3894,2620,9784,18588,11540,10877,14673,18711,17100,7320,4243,11999,13214,7003,6789,15464,4153,12868,7883,11981,398,4060,16588,18028,7446,15150,14770,1306,1389,4466,19205,17844,4230,10815,17805,19301,3972,332,222,16682,17611,16577,13880,18088,12668,2174,7936,12232,12022,10176,13486,4886,9030,15314,19945,10184,15935,19553,13137,10206,5145,3592,9121,3508,18151,13161,17465,5995,16575,8513,17891,3672,9250,9091,19895,8642,2619,12942,5277,13699,13081,9681,16715,5206,4785,18935,16667,6587,14046,15825,9479,14813,7375,5453,9892,12814,16181,16227,13030,8615,3762,15592,7656,16379,18956,14849,365,12415,13572,18852,16431,19526,2701,15683,13458,10764,16770,20103,1502,13456,9054,12847,13166,4519,18141,7965,9159,14987,10867,12576,15018,4734,6877,15842,6463,1436,7930,9597,18562,17554,5300,14136,1135,19424,9260,8385,18437,2659,13987,8068,9691,6780,19628,17087,3662,7243,15407,2366,9765,15713,18610,4970,2376,13903,13253,5437,8230,9749,3404,11956,1044,14441,6142,11804,17627,5033,11444,1641,8926,11466,4702,11522,17008,19450,8354,19337,9977,5040,18421,20080,9976,16243,15209,18003,11755,19465,17720,15257,9885,3004,5312,759,4686,15432,15768,8426,4603,5389,14957,10932,13869,5218,9994,11086,14868,17504,2507,18338,15785,18058,19912,6618,14246,7432,3359,11589,7559,13737,11806,9143,7115,8889,19622,5140,7366,4878,17353,19733,19341,17599,19548,19427,4363,2918,10040,3148,243,12216,12054,6217,5063,14679,13464,5218,18957,4151,685,14776,8989,14664,1649,1879,1419,14213,13739,12125,5369,15679,939,1450,18653,1325,10092,10659,3212,9194,8142,9309,135,18155,19806,8128,16749,15057,12878,5044,9762,4744,18852,2695,1022,1485,10016,2456,13736,10205,15980,8736,9813,16794,14475,3905,14308,1637,9086,3700,9562,2810,2967,9707,5222,16547,2980,9287,11199,19679,3509,19248,19577,15755,7468,2108,14348,12674,3326,6147,12520,5885,142,8718,13513,1638,14008,9440,19427,2454,4601,18720,4568,3115,14674,13218,16528,1201,19538,11199,3268,17163,16594,8632,15702,12155,2501,3731,9735,17548,18791,10338,2401,14384,1729,10048,9864,14381,17801,6268,2194,13520,9838,264,12323,10466,15821,7980,14434,1178,12227,12890,8937,4761,18787,7670,13459,6096,5979,8685,4893,9702,5246,12268,16329,12760,16676,10831,1096,4010,19854,4808,16418,10157,9352,15635,12643,1910,8247,5789,10726,13007,19142,9986,13391,19753,747,9129,17358,8444,169,7884,16632,11064,9448,6992,14827,4002,4782,17933,11821,15841,3271,2866,19722,8849,427,17418,6261,1254,19382,852,2364,9557,9439,14161,15766,4270,12891,5046,14370,8584,11221,3080,1038,2754,15012,6809,10773,5488,4764,10079,8057,1923,630,3625,4981,5005,12636,1503,6839,15569,126,10758,415,15089,1931,16304,16374,3778,6760,12707,19517,12873,6425,12626,501,3476,1405,13081,4411,2493,3439,2304,7498,17402,1151,12090,4073,3058,18480,11856,10045,10289,6687,3591,16741,13582,2418,12561,19769,17348,9423,11638,9,3903,6958,6838,8664,1829,5681,6191,16574,13007,10790,19322,1661,1103,12765,2738,12056,17270,101,10294,5060,19495,1396,15772,9455,17319,4883,6307,11964,15920,8924,4826,3812,16186,12215,14390,2371,15541,273,8677,3045,498,18107,8130,11621,4607,4077,14096,15217,6609,4781,15430,4860,10982,16837,6035,3931,216,6302,10226,3480,9684,3337,1332,3177,3903,13754,16998,15060,14158,15786,4182,15985,9612,7007,6974,4502,2435,9672,2593,19329,4277,15576,3079,10008,10423,4555,3547,3497,13876,1028,2925,15424,17183,11880,1606,17470,19537,1342,16377,8389,8466,13953,19411,16612,6074,4680,13666,15209,11515,2504,4261,15162,12855,10739,1774,4450,17479,9633,16852,323,11168,3440,14137,14514,12720,3817,4313,10099,8887,3809,6360,16382,151,13384,3049,7175,16787,3189,16684,4952,4234,11527,18441,12447,15324,5464,11370,11599,15384,1766,4551,3673,5715,1942,14131,13180,1614,19116,5356,868,1225,18684,9542,10671,10277,7618,6062,16848,7849,4308,16242,2855,19299,6086,16212,4602,2701,9626,10014,19143,15202,7481,8387,7337,3487,2809,8399,2568,7305,7884,17829,1316,16113,13406,11087,7967,8115,16066,13389,12413,14393,17865,8786,17498,6707,14060,11868,2655,4655,9992,305,10887,3693,4453,18003,16996,1416,16171,4356,5740,4988,10959,16507,6686,11028,8056,13541,3452,11885,8933,6790,4174,16358,15889,4184,9361,3674,1095,18188,289,2677,13523,800,15920,173,4519,17348,14855,7989,11676,2151,6330,17422,1840,10823,19353,655,4561,14172,14393,11120,890,5382,9637,9892,14205,16610,10561,14411,2900,14663,12792,3409,12905,5948,2792,8550,10565,11587,4954,12218,2447,11232,11442,10771,13093,8298,13198,10626,1280,10848,9839,8816,5018,17557,2400,10594,18742,17390,10148,8534,18488,9863,7788,19459,11753,13630,17814,8543,5098,16505,18700,16642,2445,17452,14727,285,16261,1432,6648,12720,15320,7898,5969,2290,8958,14359,16259,6013,2939,4695,5353,4212,19338,15513,698,9439,19049,8368,4134,8730,14661,3313,1738,4809,1155,18940,11444,16753,7369,7270,15629,2934,14026,10346,10144,6562,11303,6862,5333,8039,8969,3048,13723,11461,10296,5876,4155,14133,4970,18860,3872,15408,1520,19320,12121,3341,10010,12956,14087,5411,11139,832,12239,809,11024,4694,8578,5534,6594,10882,12575,16807,19279,13727,15132,7350,8240,5179,18633,18306,11662,6220,18380,17883,16214,1955,1863,7542,11713,14862,9898,7492,18950,15963,4076,5576,13907,2280,5542,1765,4765,12681,13432,2174,4255,11852,6329,873,15230,11795,7010,12714,5356,7121,12876,979,219,4746,3930,5480,5504,14643,6946,8305,6041,12034,12456,11525,12917,16684,557,712,6985,4307,9217,13920,11565,9881,15789,11537,99,8272,10798,11935,2523,10266,13590,11496,17522,14994,8432,18864,14701,9338,2037,6535,7867,16180,19107,18647,4814,11491,14299,17710,9892,1534,7052,14005,16409,4317,3410,13333,18726,3630,6469,10419,6308,2378,18496,11753,17782,14408,2049,7254,12272,10835,1976,1232,16569,15568,5211,596,6568,17807,3093,8850,18182,8087,5637,16339,15532,3528,7182,16514,12254,6156,6324,18161,7173,16142,4323,9348,13823,12905,686,7092,9517,13885,9923,1802,10308,10067,17818,12813,18914,4259,9830,7157,8096,3252,13945,913,11509,13253,3154,11131,3779,17034,12083,8668,11525,13159,8137,5017,631,18192,6857,4560,1641,3305,3189,6793,825,18757,11665,10768,18655,8776,7031,9912,16071,13848,3219,14117,17262,4390,13444,10619,10117,5788,14580,13246,16391,5806,3558,8480,4695,297,4515,9650,3682,16475,4844,18032,579,13995,14890,3332,4748,5295,10569,14753,15380,19110,4351,17429,6301,18857,8840,3615,10625,9772,9682,1567,7561,11792,13700,8480,1807,14767,13558,17860,1051,11009,9820,13389,5960,9417,15566,15200,10171,7428,1869,5989,6951,15270,6799,5413,18380,1064,14509,8095,2628,17033,7764,16846,14658,502,5628,15120,5700,1901,8130,8013,12482,2174,10836,14860,10478,9445,18250,15728,5998,18523,4113,15452,6759,18347,15905,16641,14748,13871,3612,7144,12520,18368,1262,4352,4064,10337,5335,14885,467,3987,10497,5442,16361,1396,1321,8330,4265,13244,10616,18835,15536,16807,11904,8900,18254,15284,7333,1703,10154,17511,11139,5095,2464,1501,12505,17904,3399,14599,7706,7449,14901,2165,1101,14912,198,11386,7833,18876,16015,18104,5252,4360,7507,6612,16859,11811,13101,16553,15517,6530,10260,17461,16026,170,10355,10430,1912,9303,2336,12144,17830,8831,17933,14121,824,5845,572,13974,17359,4945,6591,10556,7030,3828,9807,6211,11386,16707,15775,2113,7671,13532,13370,7105,17777,1192,12102,9354,9710,17702,1401,14765,17041,13211,14567,17536,18316,4479,8445,5209,101,4342,2164,6316,14765,5462,7296,18283,7680,2407,5976,7020,6697,10963,18333,1249,444,745,8778,18823,11428,4871,7772,15468,3370,13050,11493,17741,15657,10029,12858,820,12575,15500,2621,17898,6790,12328,10496,1480,11303,16833,10413,5814,9124,12310,10948,5386,3374,16349,16195,1677,16801,15875,10539,14703,13452,829,7209,9760,13663,16191,12824,16597,8452,2987,1329,8807,17143,2266,5098,2352,3773,7922,16773,10302,2481,7224,16116,8420,5779,11825,8372,2723,10236,14913,13351,3734,18548,14448,18255,1856,18861,17911,517,5273,13595,13454,12413,9859,1549,6105,1701,2346,9880,17351,1417,16708,14155,4712,17251,772,13226,2105,14950,9706,7356,606,16772,17774,13234,13317,7781,11728,7873,2272,5408,3541,18321,7038,1476,11811,15638,6133,1993,4973,2059,3639,1391,7092,7039,14936,7565,4260,256,2948,5107,12584,15168,3186,1788,15893,7786,12814,18510,1062,6828,7696,8797,6793,3700,6917,4112,13197,8735,9365,18088,16947,7892,17359,3315,2529,848,3492,6172,1763,6906,6575,8290,7674,4151,15884,10998,3678,16214,14966,1193,14111,12317,10786,1984,9631,1698,5886,10076,11907,991,13752,6908,7740,8638,8455,309,7757,8655,933,17430,12674,18514,12527,197,10847,4912,2832,9206,6837,11147,14663,5696,13295,13766,15399,16792,18705,15998,11427,15146,4058,9542,4311,16601,10482,10461,4698,10199,5608,12255,120,17135,8294,4697,1830,7171,18327,6214,4681,2194,11475,11888,16955,1631,12269,13986,12271,11531,16915,1913,15859,5507,18275,158,370,181,3766,2313,1078,3523,8849,16013,4121,3165,13811,14885,3298,15303,17655,11387,2043,16862,13134,2779,8878,12378,6985,6001,3898,12389,4432,7687,1270,7498,13579,4417,18475,4954,4043,901,16426,15375,9422,8854,3279,9046,7025,7240,12557,5310,6063,17699,249,16993,12665,15534,14714,16646,6664,6643,14952,2607,12638,1561,761,3435,16871,16275,3623,8366,17497,12420,8532,3780,3696,1472,8117,17068,10612,7409,12144,9508,13375,14207,15907,15495,4792,13075,10889,14214,198,12765,10306,7443,2944,14083,276,2555,8983,14671,2815,3189,6609,9050,16978,4686,15672,17075,16445,18313,3485,3021,5081,4106,18576,7611,13239,12718,16395,17101,9695,16157,12648,798,13125,15250,13551,3150,2911,14598,9200,7730,15463,5725,1806,15213,13574,4358,6580,16610,641,6195,2428,15496,17571,11886,11767,1013,1199,9241,3694,1897,12883,1653,6216,4583,14741,17882,2445,15154,3687,10669,15200,5208,13831,17133,14659,10111,8815,13535,5035,7185,1106,6205,217,17223,3804,561,12185,3375,3022,5790,10699,10325,10415,8895,16497,5400,15263,11229,10559,6866,26,9839,16198,3552,3273,16636,2,3848,8610,7575,1677,8995,8065,6392,14347,11859,6136,15934,15918,12832,15985,4664,9492,7740,14857,3627,18439,14040,106,540,15732,14254,9700,9106,12042,13824,13339,9820,3317,17622,1369,14213,1923,3400,16389,16347,16670,9440,13173,12656,6392,13277,16241,8194,14323,4178,12206,9732,17188,5965,17659,11119,7936,12510,18458,4034,4727,6740,7722,16199,3162,1270,11051,2980,14945,10194,12193,15574,11021,17355,4963,12263,7305,3989,2760,2727,11308,9457,13985,7903,10835,13498,962,1873,11692,15386,15557,2590,12277,13026,14612,18351,1444,7929,3767,320,10862,18058,1159,6978,13706,17482,13352,11327,17307,10943,4988,3564,15359,6391,7732,1464,12412,15916,13559,2576,11266,18300,9073,9179,7366,5289,17057,17218,3216,7254,14924,3918,4225,17934,3530,9878,15687,77,222,10398,15638,6063,16799,13071,8138,9650,9598,13217,16403,10398,3873,16371,7526,1940,5779,13845,14272,5380,2903,11716,8230,10593,12907,2170,3402,14772,9305,701,4177,15351,6719,9585,8389,10674,18234,15756,11885,8288,11460,9397,12000,12204,16406,12632,11969,9774,4002,711,13096,6234,5342,10914,9267,11786,10973,12959,14874,9947,11260,14353,2445,14632,11870,7834,11991,2368,9574,12932,16774,11437,1865,7648,2970,7348,12731,3266,4267,1049,10050,18250,7711,1891,7790,13537,7558,4452,11853,16286,13598,6261,2477,10340,1718,7041,6144,2908,3300,12799,6296,8259,10971,7049,16806,1660,13377,12967,1654,9821,11702,7221,612,8708,10823,2270,2477,4598,16599,5737,17434,11596,5325,18182,16841,7406,14011,9762,10870,12951,14300,15782,10615,13213,6220,16860,11518,4395,11022,12200,670,741,12409,6634,14500,5769,10297,929,1800,5848,1115,18188,7780,17928,6583,12230,10755,6523,3851,11571,12246,5648,6171,3626,2264,15794,1823,14537,18101,8072,9933,16511,1619,10434,14356,16302,8023,9896,12576,8136,9756,4652,11521,9867,10077,2766,4977,1988,16749,7457,8146,12885,3340,17258,6333,18104,11709,5505,14781,14591,10056,17157,3962,253,10719,14761,13193,12622,14306,18113,1943,365,11598,5365,7122,10877,1838,15539,10067,160,13622,16324,4066,12212,12132,12278,10875,3354,2916,12900,16611,5376,9951,1316,15109,4898,10402,17779,11559,13014,2915,9813,8055,7572,608,327,7920,6456,5649,15598,16754,3642,17872,2158,8858,10860,2061,15211,5646,476,14704,17594,15398,16448,6089,17986,8863,11024,4028,5125,14736,8293,25,8161,16126,17120,3835,1533,3025,5358,6024,12049,16924,7262,16838,7451,15379,5192,13040,9210,11219,8626,5197,12519,4552,25,10951,4657,320,2925,15586,7773,6779,15291,1448,14158,1916,152,8789,14932,6693,17597,13391,760,1865,7576,483,11013,14067,11287,1345,12692,14050,5240,5015,3199,12305,13112,7757,3185,17409,13991,5481,1754,10268,12368,6487,476,5320,3123,13825,7849,10292,10327,11551,9754,16467,14215,7179,8679,15706,7829,10222,4001,12228,16803,1296,16598,3001,3126,16403,540,2581,14299,12946,13854,547,2589,7301,13801,9861,9684,3945,11482,11559,17724,2441,2895,6217,17635,1851,4817,3253,134,15531,9853,15640,16133,17060,7718,6434,2563,5819,6636,15105,9631,10893,6262,10808,14437,16659,13669,10363,7177,16589,4265,2252,17250,13610,4672,16652,12053,4317,9564,14441,6727,12112,11682,4638,17399,10843,4697,11401,8190,13102,8821,11546,1638,16523,3683,15216,4248,11216,2979,12962,14016,10072,11327,10340,9274,7414,6978,17284,10316,15389,2893,16414,11589,17081,9947,757,9247,4088,7164,17115,3400,4464,13513,17019,7381,17267,1892,599,8064,17429,10513,6342,12709,644,5947,13204,9944,17268,10029,9242,13442,2364,16717,12928,11885,3245,1626,11444,6649,9203,4364,4873,16638,10116,11075,10014,12458,14462,9494,16447,5525,14928,11994,1647,6668,17328,9722,9328,14781,12369,16990,17434,17687,6731,9211,11519,414,15553,2624,13274,16574,980,11760,2611,14374,6019,16317,15976,6140,11171,12827,4745,3733,12624,12418,10482,15867,7510,11734,10374,8810,3161,9876,15441,13123,15840,10496,6292,16873,2202,9107,15811,11561,7450,11799,14315,12120,17721,16474,2989,6983,383,16145,1751,8049,1574,13057,11317,8672,10440,6317,16419,3983,5876,7752,8888,16694,17022,16854,8022,5445,10894,8424,8300,1807,13439,8300,8593,12110,9510,7574,12100,14314,14631,2437,8966,12686,14438,14317,4304,12617,17419,11742,16588,12358,8141,2482,1231,7348,4614,17403,14371,13974,9629,13989,16433,9993,13837,13231,13892,11696,5583,14916,16032,11106,13256,8461,13806,9285,11512,5995,5443,1793,10216,13204,2066,15724,2825,16307,12647,8798,6267,3872,3578,9716,16720,606,3863,15171,6416,17712,9575,6688,16368,6388,9442,14995,9667,695,12257,938,403,8357,6793,9120,9422,16488,15050,719,17626,541,11529,10782,1172,7010,7739,1180,6006,6727,9967,16206,15784,12800,15305,15450,8393,3078,13944,5506,1461,3338,12450,2948,4846,15811,15594,16266,10701,15216,7032,11107,12136,9759,10181,10234,6215,4498,10368,10970,1601,9667,1988,76,10916,13100,10252,2617,6865,9083,8819,342,542,6907,3256,5019,11637,2126,16442,6238,7643,17588,11061,13208,7136,5901,3815,12937,15368,13892,13265,4443,6359,10775,4356,1579,4437,4598,688,9421,3959,1833,10354,13398,17626,15415,14855,8225,492,7695,13427,6946,876,17315,15349,14470,5888,16856,11333,13432,12174,7288,5730,16516,5959,9330,1733,964,14590,14056,1425,10383,8474,9244,16195,3304,1917,16766,11289,4518,8961,15964,752,14530,5728,10488,146,13106,14135,8554,12306,10114,16401,1142,16579,3305,16228,9428,3729,12895,16383,14262,14334,9712,3861,3014,6550,16111,10276,15570,1722,4482,3731,10299,13707,14753,7436,3392,4283,1269,16185,5877,11546,9144,10353,1974,13886,16948,5296,16329,15228,9472,5896,8931,6381,13680,8996,13818,2161,8721,9399,15654,6291,14124,9035,11660,4193,3669,12580,9919,10199,9137,6992,2454,3247,4766,14354,8387,5106,9868,2197,4262,12181,11551,6769,1726,13996,13542,1351,14691,15848,3780,9003,13524,12650,6748,11047,5064,11824,15883,5250,14381,12516,12818,11618,1221,15531,8052,9284,12422,4734,5294,15663,13658,8586,9822,376,4001,2950,12264,8860,7451,1754,12316,1706,3798,10347,10049,6534,10586,1384,11113,15216,8060,6111,3514,15666,525,2614,5890,11620,8826,4849,12680,3171,3383,10055,9211,10295,11787,9147,8607,12188,199,32,2705,12115,7457,7855,5852,433,17298,132,8220,1400,8050,3810,4450,10817,10003,6930,1998,7657,4740,1552,7669,15282,4465,9738,10313,12841,8776,13591,14719,9213,5998,3985,14623,6705,11474,7178,10485,12024,17255,10118,14821,3523,15633,3904,11053,15426,1544,5542,2235,4244,12677,3379,3127,5441,9825,5287,4635,2988,4987,14537,8246,4699,3654,2865,6036,12326,7103,11859,13772,5146,5738,1518,12363,15428,10542,6899,988,16100,100,3358,4401,2081,12833,1959,11601,8834,15318,1399,16177,14556,991,17129,12536,5538,10374,15340,15769,2502,6696,4427,9539,16949,15130,10109,2956,13573,9021,12393,7026,4846,13884,3136,1983,856,14088,6175,7993,14136,3563,3608,3405,949,13164,11412,3453,4501,3683,11576,5489,13000,11336,2422,3814,10146,16787,1031,16293,5860,5975,3590,12150,14944,5685,3300,15352,9493,15268,5763,16599,7409,2435,12520,9056,5967,11830,3745,13135,6994,17106,6370,5059,9699,10875,5938,7510,5664,15567,15158,5164,7871,3349,11129,7255,3818,2613,2473,13815,13338,3564,16706,15886,2054,11858,2769,2406,10164,7035,11984,16670,1580,6413,12288,9647,5322,4222,887,1136,13554,13441,4646,8345,6234,10265,3437,11652,4013,7672,5664,13275,2082,11707,13891,15508,6542,8473,4767,597,9007,2478,5210,12320,7321,15307,16354,8041,9405,16931,14964,6614,7299,3973,4864,5809,3116,12351,11830,6425,4925,14365,5516,8490,11812,10426,9019,1038,1129,1990,11595,11033,1093,9094,6551,14129,13628,16371,5432,15325,14678,4946,14594,2470,12809,2122,7488,14472,13146,13621,7323,3288,9149,8171,3244,9679,7283,9606,11563,2497,13896,7386,14524,11904,14975,2681,11332,3772,3083,5336,6579,14058,14021,6980,16161,10807,12328,9578,6975,11205,2960,17065,16138,3260,9525,8980,16414,12171,7116,7414,10133,9938,14386,1660,9215,13926,2596,15954,8099,1702,3776,2923,10460,5045,9272,10693,3601,4838,15646,5183,4090,16091,2440,4696,3199,15216,1917,1369,12529,14349,14099,6220,5180,793,16095,1388,14479,3064,13880,13633,9573,6753,12021,1386,11860,13373,8014,7840,14922,8759,5751,5894,2801,12617,15015,13820,15586,14948,11271,15868,14917,1893,7969,5061,10992,4405,7755,6455,7706,13262,4876,980,5901,2038,6602,8965,9609,10514,377,4575,6919,4784,13122,27,7518,4430,15475,1207,15184,3485,1382,9504,5509,7998,16211,6536,15863,2819,3941,5004,14915,4371,11226,10008,16162,11279,9947,9325,11236,9268,1124,3953,9725,9554,5436,1317,11794,16796,687,11435,9443,4699,11232,4016,11519,11968,8054,3086,16011,8544,10456,1384,2024,1664,7262,3515,3843,16597,12205,4302,8597,6931,74,13270,12720,16001,6170,5532,6471,6694,4591,2395,16591,13844,11119,3440,10564,314,35,6259,9191,2066,9766,1249,7529,16487,14202,865,11041,3109,7705,1881,10722,10646,2910,311,10710,8816,16182,9133,15650,15151,7641,12775,15146,5081,11666,11260,4923,853,15645,2315,10145,493,5450,6377,13172,5469,2164,501,10313,14477,7508,11183,974,11707,5983,3606,13964,12626,4004,1939,15302,5750,695,11383,7626,11967,1788,9373,4779,6804,4269,10681,12409,6043,10214,16297,12914,4709,8902,9306,8871,4270,8586,11689,7662,4013,8112,10137,14752,5926,6994,3852,3014,2442,4960,11983,1644,5889,11985,14586,16712,1975,8427,14580,5058,13770,9390,5911,5141,10798,16120,7691,6044,16011,16806,11255,8611,8755,12966,4928,12139,10816,1224,5949,912,13027,6511,15894,5363,10815,10533,4861,5562,2214,16717,11750,11040,9110,14948,4819,11441,4121,15834,16686,15394,1245,4222,15826,14856,8894,7152,8108,4725,2694,7999,9295,14218,6255,868,13710,6740,11529,76,13366,11821,11514,4981,10226,11320,14575,11179,6017,7308,2088,6894,7834,460,15067,2190,15137,16541,16240,12820,13758,4819,3895,11420,15737,12934,2124,6381,10885,11482,9621,12733,15223,10577,14566,11934,16493,15426,9036,3808,1891,6159,9583,3640,898,11381,16678,8401,9897,10034,14419,6542,15508,6570,7427,2558,15576,1335,3801,2619,15122,4735,12456,15325,9384,8258,6499,9135,522,9144,27,4599,13956,6604,12931,16473,3048,3375,3666,14128,11492,7190,2262,10502,14701,16349,9380,9770,3898,55,3292,15484,7074,9013,15143,13927,14022,13657,12722,1930,198,4299,10819,13844,15915,4266,15309,15132,4757,7644,4079,1495,9304,15163,3580,16501,8121,11538,4383,15829,3947,1243,14606,6738,3216,8129,3297,9037,10476,15381,2298,746,15912,15798,8138,3130,2255,5964,16027,16399,7863,4937,5347,1053,16616,2417,13968,2531,16516,12546,4713,16609,15237,12928,12178,856,9661,2922,474,1744,14003,7398,14952,13139,1672,1889,8526,5202,3302,1070,9740,11670,11083,3498,8372,13317,1497,12421,5257,459,9577,11461,15925,1554,2531,8541,11599,5675,2273,11615,7372,12256,4798,14031,7670,1914,8217,13618,4955,15104,9715,4838,14603,14492,8832,8091,16129,11583,2155,4830,8495,11857,7204,8419,15975,7104,6498,14356,2604,8739,13457,6880,15539,10129,1328,2114,6652,1044,9888,15743,2044,6331,13600,14679,5032,5223,11467,16215,12421,687,14009,12161,9544,15441,13000,14831,16032,3566,6203,2074,4103,10226,151,15513,3117,8718,8552,5033,15476,3710,2329,5179,13919,9044,3463,5142,4347,523,9639,3683,8663,1217,4519,8989,2207,14829,1835,3621,11921,10400,9924,9446,759,3018,13258,7618,6711,12568,11850,16442,15075,7460,7433,6662,11260,11203,4135,1486,2313,3149,11684,7350,248,7090,5947,13474,5268,10922,14861,3161,576,10732,11071,2506,9788,11229,1216,14414,6522,12616,14939,13892,14629,3799,1107,7226,13931,3409,6001,13858,1038,15091,8652,11747,14014,14179,5674,6600,13121,15491,3003,10445,12173,4963,12271,328,2676,12267,1630,3365,12233,15236,8143,15084,13367,11035,10911,12413,1035,15861,11729,1519,6868,13294,1219,5622,10711,1090,12543,5695,1395,597,9602,10380,8539,4300,9749,10521,1157,10391,12000,4026,13324,3976,11843,10931,14791,12512,9494,12494,8652,1511,12578,2633,11548,2429,14821,3730,11897,7975,12339,13,5380,13693,4954,10602,15680,3906,3530,15863,6251,14705,12674,9264,11930,7090,12084,8928,10306,11726,4522,13037,16191,7995,4579,5527,10189,16270,2353,14428,5535,14603,9008,3934,8041,3527,4024,13138,8469,8956,5659,4921,6016,11713,12879,1162,194,6234,5268,8774,12084,7485,991,3215,1951,7522,278,12462,15534,15048,7236,4642,7421,14810,11740,5680,7925,15431,14828,8831,5985,11991,4900,5633,8149,5975,5695,1261,10949,4798,3917,7239,3088,12259,10402,12468,12227,15372,9637,12648,2827,4281,12505,954,16131,275,10860,9949,6827,4460,6659,12292,14954,2138,14365,5701,5436,11877,7642,13886,6261,9916,4105,8046,10063,5173,6594,7104,1253,741,188,11364,11798,9036,15147,12168,10443,15580,14859,7194,13667,12269,13496,1364,15108,7893,2965,1299,7141,14805,1423,9248,14791,4897,6816,11059,8076,5925,11092,14150,4100,11893,4000,12452,5055,5872,7022,8523,6242,2128,10429,11769,70,11050,1329,5467,7835,5274,13458,904,10862,10034,6389,3494,3787,5639,6424,7997,2107,10031,14546,10528,4782,9508,10796,11290,2015,12901,7965,7923,11977,8469,10072,7263,10871,14958,1220,10673,2848,1249,8047,13493,11167,10983,9448,9005,10712,4023,9814,1102,5118,6520,5264,13904,4585,13904,1410,11999,11393,9183,440,11240,10589,6038,10617,15665,10591,14669,495,16086,4029,15520,3691,13802,751,3562,13507,733,1429,7439,15504,14650,11107,2178,8,1855,6356,2379,3297,13456,7740,2565,12921,2995,12120,5809,735,6036,6586,1550,2064,14559,6586,14109,4264,8543,8345,4811,14976,16095,4896,1994,13177,1671,14095,15625,3183,12155,7613,11082,6890,3385,7970,14219,4197,11886,7182,5389,4339,1947,4877,14263,500,15821,8891,2687,15813,7767,1836,6065,1341,867,14200,14716,11967,15335,8802,11268,12960,8944,12406,7464,3787,266,4881,8394,6122,8253,15214,4400,7870,15477,10420,5540,12417,13409,12054,5087,5441,13696,3357,1916,2718,13130,12066,6010,10490,2111,2053,3716,831,5422,6198,14289,6037,12060,3025,13008,107,3018,13388,59,5406,11529,6991,15331,9161,3944,13554,15453,9300,2408,15192,9441,6764,11268,10433,12905,9222,4008,8645,135,81,14277,15058,12032,6742,11139,5407,6356,4482,6171,12404,11972,9887,12713,8288,14926,11572,12582,6136,11491,10237,14840,3824,2168,704,3516,11967,7361,12803,2527,8615,4253,4643,4108,14479,13168,190,7761,15162,1683,6917,8203,7146,5871,7491,4779,251,850,12482,3646,8654,15160,8307,479,2464,721,15604,547,11680,8667,5435,12611,13815,4896,14739,7049,12636,4363,11458,11448,2696,5150,3969,224,11474,2708,10656,9374,4408,15821,8546,244,6409,9630,11615,7966,9697,5842,12367,13118,15220,1890,3714,4306,13475,11731,13300,3928,9221,13949,11208,3968,5520,1297,7260,10191,10509,13108,535,11130,9633,3550,8806,5648,1785,15901,6817,5090,7563,6069,15163,7445,1311,1216,9443,2237,2520,9812,8250,8678,9847,1495,12658,6577,2384,12024,7978,5958,14944,13402,4149,8020,4575,11780,3614,12436,10796,11607,13161,4828,15132,4886,10582,13157,5572,5382,3485,187,8085,1330,9380,11837,12135,15556,7623,12772,6581,6094,8280,5186,10706,1996,7948,8009,6776,10601,15739,3370,15143,8310,2282,4027,12678,10452,10194,14160,11119,6160,4401,6573,12582,2477,6910,15409,6742,14815,4764,6360,5622,6584,303,6714,4866,5348,4528,14774,13677,3495,15156,12436,8111,12769,13790,1766,13921,13069,6269,5700,6039,6661,6785,1719,7743,15055,6868,10056,2867,7308,4625,4453,7817,12522,9254,9823,2632,2988,13733,12308,769,2296,10710,15200,9596,3174,7042,7811,3558,13897,9853,1196,11422,12484,2478,1840,11536,1563,9649,2323,3532,7420,13863,7178,7559,14921,4399,11612,7425,4347,4197,15562,1134,4314,3433,11358,5822,1110,8603,12538,13363,15371,14298,11158,8980,10836,6902,1518,5859,13210,15321,11660,2698,8400,9794,3612,9460,8743,7752,13808,10444,15448,5564,5471,5207,11668,5165,4507,1690,11201,4901,8079,10886,10012,4116,11258,7294,5766,15332,3730,131,9208,11855,12109,1030,2455,6466,10795,3975,7134,12323,2733,14056,7240,3416,3898,953,11966,11300,2865,5992,15353,5420,7941,6839,6068,13458,13458,4289,7217,9323,2757,14121,9086,12876,4508,6027,10594,4988,13696,4644,14086,2094,13341,13536,7817,14566,12771,12579,1725,12557,3616,9811,5914,5354,14061,11520,15193,2871,13753,2877,11969,11307,3129,631,3821,10344,1381,1898,8131,9239,9528,10354,8342,9267,8874,15266,1514,14988,15013,8806,7135,3912,15353,692,9436,3341,7582,11286,1482,11382,3024,14433,3452,38,742,15170,7898,6945,14219,14420,3943,8635,6295,3779,403,387,15257,1064,15107,7428,6932,3073,11261,5727,7391,7992,5903,13471,14075,2748,342,344,14413,8453,5368,5947,3090,5425,4803,209,12157,1077,12240,5868,14772,14583,14791,9439,11531,12419,10112,11281,14795,1275,14616,4155,2476,5170,1071,5631,1029,10323,10930,226,13847,1591,6731,1210,3765,2196,15056,8610,10273,779,1298,1428,12509,10382,10868,4903,2953,13247,8006,12562,2666,146,5975,3387,10345,8174,5617,12793,7923,2840,3436,11862,11773,12278,2372,13789,3778,1160,7995,14356,6924,13999,3558,8180,11425,3925,551,1805,9763,9767,2015,2465,3492,7455,8158,3816,9462,457,10035,102,6126,10216,14209,6286,13453,9785,6517,15505,14620,9812,1575,10536,13037,11090,7254,10199,9977,13431,12114,15424,12196,2047,14811,9382,11801,5208,1699,8936,1475,12619,9223,10135,14423,7497,4569,9786,14057,13338,13474,15063,4047,6781,2194,7296,14619,4987,14593,12129,8185,3999,1777,7156,4668,14763,1484,3119,8211,14279,8787,10153,10914,9731,5059,6696,4134,5208,2309,4445,13281,10744,13811,10442,4365,6689,802,512,9652,14699,6021,11086,15191,12204,11492,8958,2432,2701,6362,6424,7333,4694,81,5116,14452,9596,14157,15388,12982,10626,9041,5178,13021,5064,9464,1965,12107,5875,747,1465,2975,8619,8991,4950,11556,10663,7053,13096,9975,4602,11153,9155,8346,6925,15350,3204,11390,5449,6048,11781,12860,12549,15197,1999,9305,1612,3026,8361,5735,11735,10821,1596,14692,3565,1974,12787,9135,9109,12569,2655,14483,2305,5893,14246,10174,1258,3056,408,13971,10396,11002,7183,8859,9422,14052,9110,3673,14758,1899,9155,14039,13065,14622,1684,8364,2419,9071,14443,7040,7414,4986,14763,11911,12297,8334,10974,9621,8485,14316,12216,7213,8434,8696,2126,1454,11061,27,6093,354,1623,2813,4309,2945,13723,2904,3946,9848,4043,2177,12325,12710,12060,8520,7676,626,5098,5924,9422,1773,8000,8244,5595,1663,9335,2271,11193,9834,3630,8712,4502,13665,3243,5067,9477,12517,12171,5407,2346,596,7191,1209,8529,5294,7818,10660,7393,4175,3449,5763,14361,11054,14478,8565,5174,14459,5611,5400,11448,10294,14302,1019,1809,6272,11680,8694,4992,5364,9053,9086,11551,6650,14090,536,13467,11035,11327,2639,15056,11156,6664,1511,7976,13242,452,9757,509,9553,8448,9033,14664,653,12768,5231,11879,7682,6141,2044,25,9083,12151,10816,1373,682,13682,8398,9207,11998,14918,907,11428,12445,7421,14765,1208,7301,4244,1853,1318,5968,8160,191,14081,8269,942,11987,543,12232,12303,10944,12894,8644,15085,272,12332,11119,10727,8568,9411,13430,11729,9136,3756,168,3272,8866,3513,13546,2081,5650,3538,6331,3475,9538,3951,4801,3295,241,4815,8795,11679,6520,2493,13244,14343,4076,7239,13679,4683,84,8182,8560,14512,10650,4503,9216,9214,13893,15069,7283,6138,4474,1392,6184,3087,2010,8599,3354,2155,6800,6000,7162,7537,5177,4981,1143,11410,11961,8524,6608,8877,9650,2897,3899,282,1760,4070,5858,7969,10168,6252,12457,14166,3219,11753,7531,10086,3274,7797,4514,14624,5352,9442,3322,12557,6163,4867,13492,7494,8705,12889,3280,2544,5517,2784,4654,3081,4442,53,14831,491,14521,9244,6910,5335,797,10481,1329,14299,6709,10211,5790,7211,8267,8825,7945,575,5079,2758,12695,1708,3916,656,1651,5666,6809,14043,3968,3415,3964,12030,11806,11693,14452,8983,9712,1942,5293,1133,3204,5198,4282,11932,12392,611,4815,2570,11336,3875,4212,9227,9692,10551,13878,3649,6801,2681,10804,11122,10926,11682,6557,6115,14568,2374,11717,6265,7457,2843,2165,7067,11239,7465,13279,1827,13863,9138,6446,11381,787,10806,6569,12032,1800,12356,5629,548,9269,11212,8083,13626,12351,2839,5882,10120,3558,3393,8784,9033,6919,12513,5614,7037,13599,14241,6958,1399,12536,2231,12332,14574,14226,9142,11096,7391,11402,9383,8293,9556,2347,5765,314,13247,8704,5154,13777,2414,10416,7324,10508,2905,1357,13734,13840,12623,5768,4024,4397,1285,1774,6579,9345,2597,296,4784,7671,6671,233,1016,2386,10069,12462,6652,12765,12814,13716,14322,14754,3943,6012,12080,13199,5560,4889,4328,159,11948,6827,4408,11039,1464,10297,12684,4900,2424,454,250,210,11782,4066,2280,8583,442,2983,8214,13306,7142,14621,3301,10580,13749,6657,430,768,3719,7848,2144,6421,13229,1470,14813,9162,3441,5312,10883,504,203,8574,1740,11701,2619,6684,4076,3753,7463,11976,5471,9842,11133,9234,12957,8994,440,8813,9196,8442,14558,12227,8602,451,10767,11343,6046,13588,4125,7912,764,1676,12487,4201,9291,9730,6268,12824,6148,5418,8527,6772,7415,13768,7801,523,263,13636,12900,2444,4916,13090,12968,4911,4989,13399,4312,13114,6560,12259,1517,4065,7081,5291,456,6860,8764,13108,5320,10838,2535,7029,14742,14396,9425,2794,14353,2794,10080,6240,3105,3366,3838,693,1011,5760,13525,8336,12431,3214,6489,2752,7491,14196,1323,13176,778,5680,8861,8457,9448,9179,10511,3077,6903,8320,6385,8885,1267,398,2082,8462,11791,1020,14337,5247,10877,2052,7685,3954,3248,9092,3314,4515,8649,2142,4455,5271,342,9701,8726,12022,10016,6429,7655,769,7051,6902,5006,12887,11583,14654,6826,5419,189,14640,11028,10583,3242,9059,4394,11594,8573,13065,14384,9710,2897,10406,9232,7559,13991,5875,10107,13782,14564,2149,1805,2188,181,13354,12719,7982,14463,9748,8405,10882,10849,157,10186,9009,13695,10121,9530,7150,11399,7195,14649,13072,473,6970,3901,13693,4447,13515,11024,5747,9795,13406,1859,6866,6684,5085,14345,867,14357,13999,7751,90,14385,8877,9998,12847,8519,277,13569,277,1115,2545,5257,705,3979,9065,8723,6247,742,7657,9988,11946,3834,1969,9487,10627,8157,9657,3881,8160,11479,12241,7157,13945,13870,6604,13187,8249,14598,6097,9745,3142,14150,157,244,1422,10881,13641,8432,2061,1006,2317,5784,9765,7970,4839,582,832,10980,1857,12189,12165,2460,10180,6548,402,12413,1842,3000,1602,7243,10665,11398,280,9779,1520,6239,5869,8883,7401,10479,6526,12529,520,7923,11182,6471,10183,13220,10640,8234,11578,452,4391,6280,6623,12834,10216,7451,5578,9874,1390,13389,12996,6638,7077,1853,3079,9523,10476,730,4747,6467,9330,14138,12632,8314,11601,7937,10083,6132,5435,3645,4306,11639,12615,8181,832,6120,12409,10037,5895,13320,10982,8673,12030,216,6148,7653,14207,10344,59,6328,9144,11292,9597,13453,11088,11386,5180,9544,946,8501,7390,9028,990,7439,6173,470,835,350,13000,11840,11007,13068,13739,12354,12246,8812,11218,1407,10889,9886,2037,2119,14224,14041,12005,7563,762,3301,6540,2090,504,12659,6802,2183,11863,12871,5918,9047,315,7735,10032,12103,8850,11009,3817,1014,565,8164,12511,2909,10244,6593,6890,3298,8611,3146,4613,9074,4633,14443,10367,8215,13089,9669,1886,6553,4317,7953,7629,11905,12348,8883,5711,1553,2595,4271,13271,3075,11744,4699,3621,5374,3436,11139,9440,13837,3620,10343,7508,5666,5689,14126,555,3957,6341,12771,12330,1953,1130,3914,8937,8881,7962,6104,10681,5120,14368,9085,1262,3169,2972,12639,5773,5539,5711,5876,9607,12936,9012,6115,10757,7490,5132,8408,4279,2210,14160,4194,9238,11219,7788,3510,1764,3410,6228,1199,9010,1646,6163,4999,7138,9369,9108,2132,5082,6766,4036,13484,13849,8110,6918,13833,13641,4324,11577,6769,7059,14042,2654,1528,12681,3394,8836,2643,11436,493,13178,9565,6256,13234,1951,38,918,5591,5973,3439,2707,3595,11394,10756,11729,11705,8471,3901,5245,12306,5548,2785,12852,13586,6018,4065,12259,2291,3390,5351,2053,12356,2744,1745,5752,555,9621,5174,6983,10577,995,12067,10533,4422,4137,5022,10092,9287,2080,13930,5723,3013,12192,6010,13523,3357,564,13042,223,12312,10916,8259,8077,2049,10185,4446,10385,6911,2642,12949,11154,5784,1682,11618,3369,11666,6457,2160,7868,3895,7633,12064,13192,10981,8719,12809,325,7163,9798,575,7487,1136,10657,12363,11846,13839,6490,10180,7790,3941,2707,9408,11287,8346,11417,1025,10453,2788,5537,13891,4796,13587,11944,9416,3508,4909,1510,5102,11953,4167,6044,11262,13842,5196,9695,3534,631,2971,3709,8601,4856,3517,4426,10081,8402,8161,5089,11552,3079,13375,12684,9139,12588,9879,13859,12966,12580,5794,5296,10677,440,4563,13082,13080,9906,7097,4939,1404,1561,8527,7925,542,4966,13752,5038,12538,3851,1771,5433,1490,3376,13260,6415,283,11475,9198,1974,7265,9251,10308,5520,9657,12062,3556,9154,12949,1660,7072,10682,8067,5454,8081,9511,5936,11244,7608,2417,7493,2342,11414,5306,5956,4368,8846,9285,5634,10180,4404,13036,5807,8294,823,3250,11429,10922,11660,13424,10648,6309,6653,393,2201,4486,10815,5806,10481,6387,12728,7049,1439,12016,11508,3309,3798,12107,13534,5397,450,11637,13505,2220,12679,11062,3730,9549,2000,3147,2584,12981,2553,2997,13074,12160,5740,8302,6563,8571,11434,1425,9140,2776,13639,10804,263,6037,13556,6362,3098,3787,12652,8135,1306,2576,11950,3851,12961,6699,3622,10075,6190,8621,5931,11677,5756,3648,1701,7510,8076,12319,11924,4985,11359,8603,984,1144,6541,714,3700,2685,11870,9180,733,13630,7982,7392,8318,5120,58,9091,4115,6090,2047,3360,469,1285,9661,5981,2791,7665,12294,8288,7315,4625,11194,8267,2710,13045,7817,7312,5197,11613,8806,5355,10958,645,6255,5097,8737,3283,7404,593,10392,13437,9471,11048,5252,8189,8470,12574,652,854,4104,4172,6073,7918,8211,2781,593,7531,36,5686,705,11202,1964,477,6573,13278,4200,12570,769,1352,1570,12452,9013,9741,9780,3540,8903,6773,11497,11943,9962,4464,13071,13389,421,13715,849,7863,8700,2780,5623,3794,5912,5957,5288,5811,4354,8276,10622,4465,1699,6220,1337,10663,12601,10194,4553,6333,8645,9387,12486,918,5570,2669,2022,1972,1944,9698,7829,12461,12736,5007,2908,9273,10633,7242,3410,10378,2966,11383,4681,9136,9185,6515,8112,10209,5833,7245,860,117,9179,9009,9730,5936,9756,7912,8029,10363,3954,4993,9452,9474,6591,8247,9318,6622,9310,2865,5726,3749,3072,9658,507,2202,5110,2275,7033,10628,8748,7150,2592,2078,10701,13067,1616,10095,13528,6989,351,10732,2461,10276,9048,11547,10766,1710,6486,5015,4305,1174,3655,10810,12117,10912,7199,1644,4957,3916,10249,13092,4946,2004,3038,3677,750,7675,12160,13240,7904,13390,12804,6410,12065,3557,7782,8224,10678,10069,10251,4326,13656,5784,320,3340,10465,9620,167,5694,3105,3491,777,7762,3093,11915,12828,12848,12846,11287,12921,6399,12604,9492,4276,6503,8562,11814,3072,2597,711,3411,8848,5639,7544,7770,5664,11839,4045,11216,4325,4750,8186,12269,5040,6538,3641,12139,11919,10002,1007,9055,2015,10509,2424,4113,13430,2857,7446,6232,12442,843,1666,2875,6036,13756,184,4141,7411,7542,11857,5279,10589,5167,6520,8441,7433,4440,12312,454,9321,4961,11089,4467,7549,5125,10175,5620,6293,12991,7902,3402,5413,3031,12449,6698,404,10098,11653,10143,11996,8208,2117,4280,8374,5023,11609,13621,8956,9852,8714,8264,1396,3421,2033,1733,9886,1099,1734,12628,3951,5635,3077,11269,8911,9946,10891,9059,12576,9090,1536,3563,3066,1616,8453,5853,1630,10649,6591,1129,4434,11067,9984,8857,9906,5017,10701,2680,11578,9187,9085,3551,6003,13614,7973,1944,4572,6986,4984,10660,7415,11346,3391,6297,1058,5088,12963,525,1435,11042,1654,10829,6927,2568,9143,3092,10305,10290,7343,11750,5312,5504,10984,10077,12209,2925,9810,7356,4576,4423,5021,7353,3213,7817,2096,12171,8769,1176,830,5278,8948,10409,1396,3199,2090,1684,9552,12940,8220,11663,2504,11584,7295,13050,3981,7267,1177,10746,6528,2217,13084,10791,12888,4825,11759,12105,11984,11441,1256,3047,4747,5786,4157,10381,126,13558,10351,8150,9520,10492,12526,5404,5533,12201,2876,6733,2671,10212,3961,8058,8626,9901,12626,974,10467,1933,11436,11134,4245,11142,3534,3060,641,7485,11412,8736,2413,12654,10794,10588,4213,5340,4177,8072,121,10027,4955,12890,11771,4795,9228,11946,7061,6541,12837,7438,3849,6105,6101,9363,4087,7492,1601,2376,6033,2815,2901,3211,13245,5305,10186,11216,9039,8122,11678,10988,3484,9399,6624,3121,6091,1983,67,7320,8343,2455,5010,8364,528,10046,3342,10224,9741,5998,2813,11540,12370,2820,359,2031,10732,13291,2498,4244,2670,2992,9899,1607,9731,12902,8064,5870,6156,2955,12641,12314,12719,9740,10135,8729,10610,12056,6479,1325,9849,2980,9566,479,13159,9169,12250,549,4866,10957,11671,4411,4981,4825,7789,11243,6772,5423,4711,5979,9784,4272,4627,6361,10098,4325,11327,2443,6699,9919,10138,8558,10700,8941,11965,5519,6723,6942,5036,7136,5299,527,13408,12856,2222,10107,7528,5871,11041,8405,6999,4106,11312,2276,11273,164,2231,9983,1106,9951,3356,6787,10944,8454,3454,10481,1437,11952,1139,11874,7539,11943,5605,5109,97,3791,9253,12828,5550,6707,4890,2781,4949,3010,10252,13082,4746,17,5928,2316,8861,884,4146,8167,4800,9760,4314,7474,12277,8189,10718,8115,11234,8631,2791,8200,160,6228,9243,9807,926,12197,5095,3347,8617,11376,4613,9985,11212,2712,4640,11195,12356,12833,3181,630,11081,2337,668,10731,2363,1989,1206,5104,7187,3175,3531,11601,8821,9428,8081,7337,3863,5637,7602,12042,7284,3591,9578,207,4674,4100,8676,621,4697,5530,10454,9507,8789,2312,3352,2146,5503,11215,2021,10787,6050,1336,6950,1962,4040,1910,8044,8352,1465,5783,10272,11180,6328,96,9036,6524,7966,1311,10739,2823,6576,11567,9080,7187,4372,8538,9543,3515,9770,5952,7086,11989,9137,11297,10067,12371,8974,1872,12289,9319,5051,8173,11640,932,8234,1930,1211,4733,8308,4767,10811,1355,3226,6373,11075,2842,5643,3837,5706,3837,5123,9804,1216,10783,2909,1960,8170,10761,808,2921,943,4496,12496,1597,3617,1405,2081,10860,7258,7217,8290,4589,5761,7561,3775,5244,9758,2150,4676,7609,12632,7133,4516,1595,6103,2467,596,146,704,7156,3592,9314,7995,13088,5888,11166,9140,91,6351,10606,7190,12332,6490,8062,8525,8244,5827,3157,2494,10711,5468,3516,6355,3323,12009,6275,8517,7500,11106,2720,12856,2988,11150,2778,254,8426,5965,5232,3564,8539,8742,1004,12613,8145,9793,9874,10480,8035,8680,7481,6061,2764,4802,8889,5932,5051,2260,3835,4663,12547,7907,347,8152,8398,3553,3148,10617,10041,12774,11463,11199,9471,8794,5916,12658,3258,441,6858,3157,8582,10836,8396,11571,6584,2345,3263,12549,11712,12330,8943,6994,3035,350,8171,4084,4509,10186,392,10808,6535,1458,6303,229,11947,10666,7163,8119,9005,4904,11787,11163,8350,6075,12734,4926,6461,7218,10636,7201,4965,8700,12015,12438,3134,5898,12779,3364,10406,8449,10143,4873,10826,7625,7828,2682,5622,7613,9442,10419,12848,11464,6871,6191,6560,4523,544,12034,10628,9758,9616,1079,5727,3162,7143,11137,8583,9422,11042,653,8462,12838,6420,8905,10447,11981,2011,10999,2230,11054,12725,10847,12716,11114,10096,1638,7121,2748,4405,11390,2336,10439,4492,13024,4740,10122,6266,8487,907,12185,9273,6764,11991,4145,8068,12857,3841,1334,10168,11918,2331,11185,9898,12917,12086,1442,6321,7565,9186,1770,7898,6013,2868,8281,6758,5063,11671,4994,2847,5819,7697,9949,9511,12273,12626,12493,7699,8739,11172,6639,1545,8232,12411,2516,8327,1091,9465,3945,5807,12376,8232,2911,5334,6450,820,10996,12502,11660,11579,6317,5855,17,10697,2482,8814,899,5834,2860,11373,390,11365,5185,4384,10750,6491,12229,10116,6758,3433,5365,11665,13,7969,9852,1275,6423,8048,5058,8366,4956,6224,7758,6236,2485,10437,7135,7951,1883,2330,12119,8847,11221,5320,1653,3212,7543,10166,9746,369,10072,12725,5964,12195,6230,6233,190,1188,6227,10834,6755,7385,600,356,4413,6113,494,3000,2887,6073,8989,10643,5270,12470,11641,6975,9209,12156,8296,2228,3719,9164,11658,11665,8778,12750,6076,10134,6415,2950,8230,12273,3905,11644,12633,10838,3131,7634,6729,4666,525,6149,8567,3203,9791,2326,5340,3320,2914,4752,7050,6724,5075,3240,12303,10267,922,7992,9304,9137,5711,11458,2701,12755,3447,7921,2116,786,1760,5532,7670,2119,326,10230,10492,7484,1320,8847,4682,7784,4364,5458,2816,3357,7799,6365,6575,7642,4355,10849,2452,4859,3953,5594,7725,11321,11172,11369,1265,4979,5381,6599,6897,3033,982,7811,11878,11996,4529,2330,544,59,767,5827,11987,7178,8756,92,3735,10166,9976,3012,11266,8777,641,2583,10362,6247,3164,4516,5016,11845,8051,4137,9607,11186,4563,7293,8963,4509,8406,9930,12754,6618,11667,7131,6121,5449,9821,12604,3540,296,9598,11438,10696,6247,1415,11271,8133,4919,4479,5739,5097,1616,834,12194,7793,8117,7666,11288,5951,3390,937,2845,9509,9519,3038,9031,7730,3924,10920,2275,1467,141,4840,9582,9387,9014,2287,3255,6406,5160,11955,690,6506,1754,10461,6148,1160,3660,5851,9932,2277,12021,10778,10439,9781,11675,5116,3822,10624,5670,1862,12673,8148,10220,8541,12420,4997,8345,8829,8223,10155,3754,12639,11536,3254,11360,7411,4486,1475,2476,8534,5132,10325,762,6979,8722,11203,2551,12350,316,2267,1561,4620,7884,2411,5109,1637,3356,7325,2873,3032,8610,12189,9173,12043,6019,7166,12203,238,11588,2887,2537,244,9225,656,6126,5032,8262,4817,5774,5574,5081,7681,412,1062,6308,4749,12268,8349,3771,8175,1097,6899,1646,7789,6247,10940,10830,10694,7311,2928,9845,8981,2595,1102,9375,11711,183,4012,6504,5286,3812,11495,9235,11729,430,7254,4032,3570,5662,1460,7071,1209,1243,2606,7726,9209,11558,1404,2935,7848,5094,11212,3129,1852,8848,6662,8946,2692,10436,6219,265,1526,6092,3355,5383,1194,288,1697,6040,12555,2461,2768,1221,2644,11822,3813,9549,10141,1969,12521,11772,10321,11172,9597,853,9052,2358,6047,2013,3843,8467,5935,8325,5048,6978,5339,10397,7108,12156,2229,2330,5298,4869,10042,4209,1033,11994,5161,8428,5676,4451,11210,9192,10230,11781,7555,9976,9167,5152,11235,9,9234,7530,3095,12292,4419,3631,5157,2452,11111,9848,10356,10829,5850,11440,5576,12140,2797,7398,9739,1866,7497,1516,11719,5138,11898,8329,12224,6942,7601,11164,6061,9708,4155,6333,1129,8790,1912,682,5904,6097,5823,7085,7860,462,9508,9304,2557,2232,11877,8818,6417,5793,2457,5453,4798,7487,12277,1779,7601,11711,9132,12204,1459,4603,11318,6519,8571,7204,10427,5950,530,4332,6849,4485,244,1312,8511,9687,6436,6720,6525,4021,9184,515,1293,11584,11872,9973,5196,5206,761,7015,11667,1183,394,9412,3081,8721,5622,11242,2254,5256,731,10491,11096,12284,9096,7158,1796,6016,7979,11381,6309,1167,10986,1299,99,11541,11194,11875,1158,2248,4147,11253,730,535,8413,11999,10020,237,2915,762,2756,4629,12201,1385,3256,11100,7999,7874,4222,7547,10996,3258,9472,9201,4587,8700,5621,9107,10593,10643,2781,7323,8386,7192,8262,289,4793,12259,11558,5522,10485,10391,11911,11565,6209,9445,6910,6796,2055,9318,9832,2807,6518,181,9513,9167,418,8351,11669,783,2592,8769,7519,513,5534,737,4777,8154,7780,1250,7541,5706,8225,5776,1716,9839,1736,8097,6827,11334,977,5906,7394,10258,7243,2492,7459,1860,207,2708,9191,5224,4964,7651,6171,499,8558,10296,1124,7362,5615,11080,8990,8956,1832,4314,2221,6185,11327,321,2653,11886,799,2662,7491,6500,9386,9888,6416,2101,3777,8217,5023,2145,923,2661,5314,5435,10428,26,9606,7488,4791,6073,672,10352,2767,5609,3684,5769,4388,3109,3767,3924,3688,3704,8526,10675,9079,532,11486,4310,8500,7958,2584,4925,1503,554,12118,8332,4889,3560,2688,677,7566,4132,1351,9931,5909,4340,11948,7605,7011,10019,113,10682,1804,4547,277,2022,9207,10144,12143,4975,7036,719,10878,4502,5144,8760,9185,1601,67,4168,8373,10633,8084,8892,7581,8291,732,10247,7307,3809,9234,9858,11385,9976,3848,3486,12124,4785,10051,6857,3318,1864,5414,7274,1856,2391,10159,3711,7092,9797,468,2596,3384,7775,7184,6990,4868,10784,10453,32,5661,7523,3415,11020,11178,10427,10943,674,4671,5655,8804,9173,11608,2857,7611,6171,3180,941,1292,2098,11870,12025,22,9139,5617,2158,7640,2845,9420,8132,10497,682,10991,6427,5269,1326,11482,7336,11746,9076,298,6786,10332,2388,11845,4642,2853,10186,3326,11468,4767,11058,8443,11332,4090,1696,4792,3200,7694,1265,89,4225,9790,7790,3358,10291,1228,684,11997,2099,8398,11453,9551,5463,1791,3793,3448,3806,7486,2249,4982,5041,4554,883,9978,11309,2608,4676,10827,9080,878,6492,9526,5537,8181,4033,1369,11204,10465,3241,6525,8845,6209,619,1565,11646,9402,8727,9278,7067,11407,5375,2164,10688,10740,5146,9657,1444,11963,4207,3513,6475,1734,9613,7870,10025,557,3635,4454,6841,3591,7468,11631,7455,4001,7118,2082,8586,7484,5195,7754,7333,367,7944,10083,7302,735,7284,5755,9883,11737,5285,5842,5009,9387,4347,1384,10106,6710,4164,10983,2540,4696,241,752,11054,10166,485,7137,2489,11932,9279,3286,4835,9030,6474,6121,5383,1502,11247,10009,9522,11559,10244,6926,3411,1321,10541,2270,20,7810,2105,6814,9267,2073,6048,1996,11354,5885,3075,7431,2850,7819,9940,9646,6394,4915,4931,5003,989,4680,11055,475,9296,9755,1024,10883,876,8010,64,11698,5007,6757,763,6138,2246,4435,2036,1907,8712,113,9439,273,3938,10858,2575,11089,11823,2095,11356,9949,11323,8301,27,8860,10907,3049,10028,11420,7214,6314,8568,8445,5251,2939,5579,6457,7407,7660,2787,606,9083,2240,10305,3885,11059,1021,6574,6636,9509,5113,4232,1149,580,3275,8607,6979,2423,7085,5282,5975,9206,11340,5698,3207,1424,7354,10910,6056,11468,11769,403,9468,4990,9845,9663,3592,4734,5415,9868,2057,8022,9385,8806,6860,4626,9084,8417,7763,6624,7107,8222,513,856,10489,854,11530,4742,2586,4748,6808,6866,8331,5960,6253,11617,9954,4281,7880,1017,220,2542,476,2507,1520,6140,10081,260,10324,2266,1933,9835,6492,1811,9255,6535,4018,3548,8642,2988,6465,7916,3775,5879,1975,5063,2258,10250,4539,7681,1341,10485,11080,4742,4786,11109,4353,3928,6648,4332,1088,9797,6703,10265,10275,7186,8598,5399,3308,7783,10182,7044,5043,1462,2530,6947,6817,10342,4231,4366,7256,2264,10177,1466,4390,4105,7789,9609,346,9371,8570,3734,2231,4480,6571,5858,1828,8637,9101,6202,2050,734,5770,9691,8639,5096,6080,724,8959,648,11571,7349,5164,2985,9126,6306,544,9064,180,7459,4867,5912,8072,5248,5240,9127,8181,4604,702,11304,1622,4291,552,4463,7996,3835,3516,9161,9864,596,7037,4208,450,10854,6459,11153,5462,8220,1852,3729,3853,9368,2130,4350,5972,5940,7737,9684,2,3024,10251,601,7852,477,7072,6427,1486,10389,5253,11326,10622,4717,11665,2040,245,4875,6,10789,9077,4702,2747,767,4450,10484,646,5489,8439,277,11405,10532,8778,9943,2791,6933,10763,8143,1822,2585,10470,1420,1856,1599,4352,10422,11276,1812,9029,78,4606,6253,294,4668,3048,4017,3286,7117,306,2257,6684,5848,9334,7574,3069,6727,110,7343,690,9718,8274,3602,775,3721,1796,5991,3968,3325,8506,2769,84,2644,2537,4026,3817,533,9355,2964,3505,8821,9204,6667,4499,10030,2040,5163,3127,7351,5253,1116,6496,5150,5134,5864,10575,5417,6969,10977,7440,8570,2095,361,91,4400,2556,3332,3285,3969,8895,7610,9049,1937,7203,2762,10342,7811,6821,2619,115,8761,10723,4376,11025,2178,8997,613,7259,7462,5305,8168,2456,7025,3468,2636,2665,8638,6967,8302,5403,3816,5733,8403,2626,4301,109,8173,6423,7217,1732,2695,7359,899,7192,2829,3920,7925,6666,10161,2997,7655,10347,10940,6664,29,10751,3930,1112,2677,8848,11196,5489,2434,8812,11106,2188,10668,1321,6700,6220,5519,8808,1195,4978,8109,1745,8545,5042,8266,10473,2921,4983,5059,3302,8592,8495,6008,963,279,5620,3104,4316,4851,3594,6854,1302,9531,4231,9445,8751,11071,3907,587,1405,2442,11310,9207,4306,2074,1546,5790,277,8384,5219,10455,4516,7676,10754,4498,4820,8485,2239,7822,7143,2053,7184,4949,4950,85,1220,5958,1515,6911,10574,4137,9200,936,1965,6928,5883,9226,1203,1213,5836,6458,2813,3278,3424,5162,5505,8347,4895,5291,10234,634,8076,5776,9009,9930,5577,2881,2917,10214,11299,10616,10742,11129,2668,2916,9924,5632,7254,8028,3974,2318,2687,5612,3149,57,10,2228,9827,4645,730,5423,900,10264,8808,3686,9907,948,9463,8262,1350,8571,9691,5948,8010,8538,3252,4246,7634,550,3911,11322,8192,3596,3479,5374,1737,10053,7455,3833,11248,6952,383,2858,10041,7058,7627,3305,6644,5098,3341,10545,985,1469,5589,71,6063,6307,11094,4535,6425,4280,4243,5592,2712,8296,3477,6461,5906,3045,682,4872,2379,461,1917,3605,6678,6837,10068,444,5963,9204,2814,4725,9392,1200,956,9946,8528,5424,9854,4296,5772,8601,3935,9638,2964,5516,1763,4478,6543,10116,8649,1799,10885,7662,718,1596,2331,634,404,217,4788,9736,9988,3375,7122,3028,6031,9020,7508,5141,10108,6102,4781,2983,883,7397,9184,10889,3568,6693,1454,4819,9163,3294,2497,3286,4699,10066,6932,9045,6462,2530,9346,3844,1300,6812,7462,2261,8300,8082,3577,11121,4501,7704,9943,8367,3997,3923,9494,5088,2101,9199,6574,1524,4696,10236,995,3777,5307,4035,3107,998,2590,1418,10887,4527,10832,6667,144,3814,5472,5512,1243,6797,10336,1345,6619,1430,10182,6050,7492,7091,9875,5479,3897,11108,9501,5821,6714,5686,9397,9002,7088,7901,7399,8982,4006,612,3482,9252,1522,9933,4448,2205,9460,10978,1147,8319,2680,8014,2807,9667,9324,1352,8248,2689,6668,4755,8687,726,6129,9246,938,3761,10518,5130,454,4613,4627,3684,3769,1619,7135,11081,11090,7131,1128,1375,9863,5847,667,8140,10006,8441,8799,1633,637,10994,3028,5536,7604,8985,5843,1969,8202,8061,7993,7921,7176,2777,4869,3661,2255,3063,3955,1352,1970,4867,1422,7360,4103,1143,4573,9235,10636,594,2508,10814,3861,9918,2275,532,5450,5565,3332,10675,5466,6823,6020,10239,2072,4443,528,8781,3853,4900,9115,3446,7172,10924,3259,7471,644,5860,2567,1791,5443,5263,9576,10765,9623,8832,10025,1943,5470,10587,10805,391,7200,5965,7395,7219,7904,8279,7386,7829,7759,996,10879,9226,7943,9072,4885,3277,2740,188,5569,10772,3708,318,7916,5738,511,1358,7378,7567,10307,3257,5776,10850,5735,8654,4487,134,6375,1213,4122,9162,10898,5449,7800,10261,3318,6785,5726,1471,9688,2198,8922,8248,9326,10473,4796,2110,8562,3719,2077,8351,9981,8899,9166,6380,10812,9116,6319,9009,3282,9708,631,2594,603,8632,5326,2497,4509,5064,5639,7632,8907,4947,6563,5540,5875,9349,8293,2,1702,4326,3590,2733,7567,1764,9556,2196,10731,3706,4072,7175,4987,6565,6946,4393,3809,7131,8966,8957,2807,10510,4557,8921,2240,9615,7709,10100,3882,7419,1294,1354,224,3626,2431,10859,2072,6277,2036,3314,8466,1203,3175,4495,9471,9254,4155,2990,5197,2089,1009,6915,2746,3969,2859,7327,5650,6502,5695,10210,6947,1145,6501,1492,5988,1280,6447,9060,7081,8575,2987,3447,4708,4111,2661,3886,6132,7844,10522,7299,9425,7127,2989,970,1685,981,234,5311,5346,7926,6143,3850,3503,10199,1598,4434,6682,10264,10685,1335,1783,1712,8088,9131,9050,3433,9131,10741,548,6817,6933,8830,2974,7556,9037,7485,7615,1677,1357,5882,9164,3110,8839,8960,7364,3883,137,7526,10809,4741,6524,10228,6618,2482,8079,7043,1399,8328,6921,7105,5335,8915,3470,2891,3724,5189,9626,9691,8838,10133,10359,8675,1253,7745,6015,7943,1955,7843,2126,8789,7969,6575,4562,10482,1758,2674,8327,4810,8257,3875,8258,2122,7574,9931,7452,2584,5971,5271,6310,2157,3863,8712,5911,4821,2319,731,9803,6343,6704,9534,10151,5812,10398,7987,2708,977,1746,567,67,9276,5921,4962,5202,6589,1533,7476,2146,1594,2889,8829,2146,9790,2383,490,5972,10544,2995,7640,10178,9197,8290,5614,7489,8153,2576,9009,9058,10303,9670,174,3051,4401,1693,9715,4104,5841,8408,4683,9576,4338,939,10257,7970,9137,1849,3030,9630,9786,9674,2787,4117,5728,2628,3963,8810,7418,2642,1485,7405,5613,10436,1045,5903,2784,259,2331,2400,5171,583,4474,9486,3900,9372,9195,5535,10416,6923,835,6445,8166,5175,5402,1467,8532,6616,3681,10624,9366,6141,9248,5434,6292,4544,4384,2224,170,4412,7978,2194,10162,10380,4292,10167,9831,7458,3294,8439,8459,430,632,943,264,8217,8497,7426,10312,5293,5067,9638,9440,5421,2650,3553,968,2947,3532,8215,2281,7279,7561,7672,10620,8597,137,2824,9123,3512,5475,10045,2424,10393,2177,2071,5639,4477,9230,9607,6276,10000,9615,2010,8877,2728,7311,4438,6278,1422,10049,6438,4134,6841,7758,9777,1084,1332,7785,5655,4831,2372,8879,10380,4405,632,4951,403,4868,3240,7687,1994,8795,2362,7969,7418,9853,6030,9940,6604,2458,8428,6954,435,9030,4621,6676,4772,6616,2313,8854,237,9655,3741,2996,5245,9500,2117,10228,1802,10066,7239,5944,3471,5426,7272,621,743,114,10464,4891,8068,9300,8347,4235,3658,6377,3443,7650,1708,1578,4525,5619,6027,2910,6854,5262,395,2073,10076,409,1415,9237,7254,5472,6316,10052,1995,9870,2215,8598,4400,6840,173,1473,8107,7761,3444,10290,31,6898,4953,10473,8281,9703,2810,10206,7304,1274,963,3179,4168,3799,9327,3802,8332,8179,7000,5563,8866,4181,2825,5372,560,743,2105,7137,8497,9747,9703,7628,9152,2026,5107,4638,9242,8013,8390,9869,10374,3245,8433,6706,6531,2348,4090,8425,2690,3783,8580,8963,3441,2255,8359,4983,1518,3189,10432,8491,461,7857,4804,7549,8441,4386,4447,7093,4012,7605,3997,9344,8727,7101,883,5296,2668,6471,2712,2252,6785,7373,6893,4517,3507,3543,8211,10349,1356,6583,7708,8867,2020,36,9725,7681,3771,419,1066,3302,3029,5004,7954,2786,383,6720,3065,376,4203,4341,323,7916,2238,1307,1640,5242,5234,3444,5792,8211,8929,8536,3278,5989,6045,2070,5335,9294,3304,233,530,8836,2174,8744,6603,1679,4395,10132,4754,7090,5475,7816,1560,5835,3883,17,8792,4665,6145,2435,6700,250,8792,8533,8465,3201,6145,8988,5091,9619,4301,4095,6169,232,10125,2973,314,4438,9135,718,8051,1408,7682,6270,9116,6268,9217,59,1234,4583,9301,6600,6764,5957,7924,9441,2320,545,6893,1149,10290,8604,6228,7248,59,9071,2252,8389,4606,466,493,1138,1685,9989,671,7422,9118,5978,6176,6258,1573,1767,5897,8284,1366,9152,10222,5803,645,3659,1674,3656,6720,3887,1283,9230,5885,10177,1897,1270,2700,8835,2770,6672,9051,8507,8211,1635,4610,9883,6946,1836,10136,5465,7762,6215,802,4148,4075,9015,2345,133,4500,7413,3569,8978,1001,6800,8728,8477,6342,9129,2850,416,7006,6288,2777,6751,5305,4642,8135,589,790,9908,5117,3023,2668,1003,9928,417,3708,7420,1682,7909,576,3903,6560,3243,4697,1715,3295,2805,7149,3806,6135,5402,8342,3931,9373,905,5376,3932,2020,6588,513,2141,1118,9834,2828,6222,3694,7657,6320,3873,7683,1686,7974,4345,491,5475,9540,2016,2758,2540,8054,6034,4677,2992,1426,9263,1695,9200,5531,2855,3778,9744,1863,3338,3170,2444,8029,10147,9255,7586,9545,7200,8990,10068,9799,1746,4609,6637,1558,7217,7410,3377,5082,6492,5771,494,473,5503,5143,4804,4834,7853,2530,7077,8652,1252,186,65,714,663,968,872,3321,4505,1967,1561,8755,5261,8978,4384,6668,3933,5257,8727,9248,7756,2188,5424,1478,7730,10055,10107,9802,7896,8179,9304,8790,9884,4584,8939,0,7338,6653,2317,9165,1078,5657,8676,5769,3655,2142,4047,5016,6011,8423,3072,731,7733,3488,6197,6423,8809,8459,2388,5309,9401,7983,1570,9732,8213,8256,2723,1605,2605,7655,3321,3323,8483,2655,3542,2030,2264,985,7312,5727,2905,1264,1260,6953,4411,4696,4835,4425,2265,6637,3238,6245,218,5919,3718,8247,7977,3240,5901,8528,3998,2515,8398,307,3474,6118,6829,7802,684,1830,3983,9727,7667,810,4207,1227,3719,7667,9769,5089,9567,2625,4746,3595,1738,186,9948,5189,3196,6748,7588,1621,5137,3208,6663,4855,8756,4632,3320,4729,6818,5666,5332,736,1869,2665,2579,1314,3643,1207,5300,1041,2193,6975,3775,2121,7077,8605,2471,7055,1972,3131,1413,8443,2328,2194,8355,4261,3115,8471,2695,1784,1469,8432,2418,4746,6623,1625,5967,3677,596,8577,6991,4680,3777,6762,7972,6883,5890,5170,9364,4218,4358,6585,1897,9890,2258,9516,264,1077,7226,688,940,9400,9123,890,5256,1572,1647,1804,2757,4789,9822,336,730,5691,1573,5459,9690,6289,9361,2061,85,1743,1060,9252,8370,2420,1492,1700,2292,7265,1505,4948,7709,9131,3507,7899,5132,1418,8784,7648,1054,2551,6901,7876,8346,6023,6715,9794,220,1884,4564,1879,8674,3797,4567,7440,5794,8539,6667,9224,3483,2215,9837,5000,2641,4366,8756,1660,9492,1177,8315,9603,9064,1572,784,7310,6064,582,3278,5151,381,6875,2969,4938,767,4759,9196,2658,6663,6696,8474,2518,5943,492,5132,6436,5174,1173,7423,1192,6807,1127,4627,6157,3663,6549,6094,1729,5542,5244,5172,2101,9760,7172,1772,7807,2901,125,7041,5544,5483,4093,765,5184,2339,4547,4608,4805,4608,5396,1204,3879,2802,9453,6281,3218,9593,1047,35,5982,5361,3989,4456,1426,426,2077,7221,2705,7101,3173,8837,5550,6296,2921,2734,8158,4478,8806,9326,8396,2905,5527,4847,4477,4179,2337,1557,2381,9222,2031,2556,2465,6768,1943,4396,9593,7104,2400,3904,5631,8922,3487,201,1796,1431,5748,5124,6012,5419,3306,9694,4308,1304,5473,7360,2952,1356,6893,6673,5944,9463,6981,2962,7213,5648,562,3260,8313,4078,2246,530,6141,1528,1598,3807,7651,3625,871,1174,9273,2097,5600,8434,6791,2395,6250,3477,3387,5664,2712,2861,1787,9362,8585,4006,8138,2975,5379,4316,2797,5771,8011,2780,5884,2171,9094,264,1261,8687,8529,8882,5921,7647,6954,1321,2957,176,5788,1811,2584,5204,108,4679,4341,1834,2710,7794,506,7635,4093,7165,782,7549,479,2486,9241,8680,472,481,4893,8419,5398,4765,8650,3004,4740,6263,9031,1777,5862,8295,881,2713,9208,1429,2194,1313,5487,4602,4715,2722,4302,2645,5514,3614,5299,5701,7498,3575,473,189,1334,994,3043,439,1108,1593,6508,9562,7769,3348,9544,1098,8979,666,6803,8708,8377,9105,4264,7992,9017,3250,7798,8504,631,302,1654,950,7928,1556,8455,5912,5464,7821,4688,3212,9105,7907,3558,3272,8797,3582,4627,2744,2721,7955,4728,3797,256,2281,8680,2915,7074,6057,8506,3919,8358,9092,5260,7783,2582,4478,7674,653,7882,1080,4264,5469,3308,5020,1833,7910,5239,8559,2603,5274,2800,3241,2197,1712,1131,7518,4308,439,8478,8732,4944,5417,7139,4290,3128,5528,4526,8883,4826,7042,8152,6654,6361,2449,8136,1298,2502,8672,404,1667,8511,6246,7106,382,4016,1345,243,2089,2210,3871,167,468,5564,1585,1021,7133,8046,6117,3309,9370,1734,138,4169,6217,4032,4362,6355,3495,7179,1932,2469,5683,8606,7044,6265,8991,3769,3026,3620,7631,1671,8159,6687,4202,5610,3078,5009,5756,424,5306,5714,1532,9178,4462,8756,1768,416,7820,430,6573,5913,749,1101,69,5963,4111,5771,3547,9279,5631,3927,2961,420,749,7608,1990,603,2583,2853,1964,8183,2168,5414,237,5019,5989,5587,5352,7912,3191,757,2886,9245,2715,8378,1840,232,1545,2333,1395,6389,7738,6281,5118,6317,5631,2555,1470,7693,6217,7235,9135,6770,1837,6931,3180,3890,9073,812,6348,3517,4801,5273,767,6837,5181,4932,9064,6778,4953,9337,7439,9255,4616,1985,3697,4755,5054,5986,8187,3461,6008,1829,5496,1217,1301,7488,781,611,6121,5631,7699,8160,739,2557,8869,3654,9043,1855,2476,6188,8333,7409,4516,4162,4361,6823,6829,1401,6646,6602,7065,1867,7594,6218,812,8079,6485,5406,107,5030,3884,8069,8714,3663,7391,7138,1311,6944,718,55,1981,6890,7242,7800,354,8018,3113,954,5670,5844,3547,3718,3528,6018,5814,6206,8210,2642,3452,4821,5489,8366,3824,6058,7083,5452,4784,2900,7127,1830,9176,3269,8162,2938,4223,4408,2049,864,8128,2286,2328,5848,6912,7964,8261,4652,4820,8161,7143,7174,2978,2093,7833,3673,1036,6461,1062,4046,8543,4710,2499,2077,713,2223,5918,9120,3659,7271,3061,9254,1997,91,588,6413,6405,7748,8584,1685,8816,6462,3230,5714,8210,697,5460,5764,6937,7334,2400,8945,4050,1441,8621,3525,3248,4057,5136,1796,3533,348,809,2884,6540,7828,3756,1415,5517,4308,6887,961,1342,3249,7722,5180,74,5502,6519,7749,6533,5835,8431,3676,6528,5232,2046,8713,4698,6788,2399,8329,3473,1522,6174,1251,391,8394,1009,1172,3077,2375,6817,7656,6309,1926,3763,1136,2225,29,1327,7832,5837,2795,8472,3930,1864,5427,1735,2175,8295,7385,936,2334,632,7907,8371,7397,6524,2011,7635,1,5139,2235,2314,7428,251,6532,3258,7765,2099,4809,5929,1461,6592,68,3232,8588,4137,5668,2449,851,5372,517,2836,8067,7433,7872,6123,2829,3,1421,1210,8036,8839,866,1033,7736,8362,1499,2871,2825,7690,5205,4997,5209,1985,8064,7753,4357,4788,2722,5046,2247,6674,7887,5385,5960,9061,2925,8651,677,862,3510,7082,1426,5680,1744,129,680,1119,3386,1011,5408,1583,6225,5078,6331,2428,8594,6515,2786,2569,7871,6826,1652,4963,1364,692,385,8395,2693,5304,5877,3765,6532,1350,8497,3370,7888,4657,2498,2132,3334,4570,3147,5819,5500,1982,1228,4364,6197,101,7596,7160,6697,2298,8234,6459,1767,2221,4099,6558,8285,7805,7238,106,565,35,1072,3830,1465,945,3761,4545,7806,1472,846,2707,1919,5890,3081,8893,3867,3494,4137,1439,3214,7792,7873,2112,6824,1276,3367,3822,6255,5923,215,1114,7530,6899,86,6416,8036,8642,4016,1762,1564,6012,4437,8796,6964,6173,2844,7926,2262,5979,4457,3480,7347,7792,548,529,4892,8123,3937,8492,6632,353,4437,3074,6723,6940,940,77,6104,6231,4434,7225,6321,7369,8449,4003,8204,2301,1175,1934,2272,6090,5698,7466,1892,4169,2713,2271,8919,3967,8817,7877,3296,4899,2206,3569,6054,5715,8881,5618,1040,4835,4714,58,3087,3549,8594,8433,6159,5813,4379,3903,1923,6350,6121,1624,2326,6384,4611,3266,1438,1130,1374,5263,4906,6274,3695,190,1801,1112,951,4523,131,6028,526,8021,7017,2690,8316,6648,2367,6186,7469,5520,3491,3833,1146,5107,1655,1905,7121,1398,412,2766,7522,8073,4099,8837,4342,4002,680,7937,984,3932,1161,4621,498,7729,2405,37,6800,7084,5994,2107,6072,4058,2388,2579,7374,8302,6278,7911,1459,3146,8681,1548,6252,2056,7312,4259,4306,2978,5698,167,266,4366,5115,2104,8654,1523,2629,3844,8457,7569,1334,3414,2007,4863,7430,4871,1114,5119,1804,7672,346,3544,7084,4520,4094,5316,668,5262,2746,548,7428,5305,1490,1017,4123,8245,3405,6468,2021,827,6639,550,4412,1787,7022,2434,7340,2550,8154,6762,603,8049,421,5292,1039,1340,5194,5497,6017,3882,3759,374,4259,704,7020,7987,220,1024,4191,426,147,6984,1242,3389,5042,2314,4952,8524,6723,328,1977,2361,5313,5537,2056,2495,163,6890,505,6182,2109,2956,2601,5973,1074,4435,8514,5022,6142,659,2165,1829,2495,7231,7462,3863,6912,6276,7207,7784,8555,4823,1353,3237,748,4350,3443,8592,4220,5567,3222,7144,3665,5031,4266,4354,5465,2146,8205,4146,4906,8481,6160,5208,2296,819,2716,7591,6039,6415,4376,5253,4259,7654,1980,4213,819,1826,4873,1986,2201,4452,4436,4681,5886,714,6868,3465,8662,591,6179,1716,7099,4440,6485,3868,6587,343,2339,2582,8023,7317,4895,8223,6885,3602,8047,8291,8023,6127,2421,4502,2219,5336,7527,8151,1784,5684,1065,5978,5739,5414,3387,6673,1550,8103,6646,1401,2223,3495,1114,1398,5366,5214,285,3479,3405,6006,7066,7767,2487,7473,5552,2526,3232,3125,1222,7405,525,1707,1682,5745,2358,4191,5669,4979,7052,3356,2497,7840,4571,1166,1438,436,5571,993,7142,7315,6103,4773,6390,7707,2950,294,6762,2001,2069,7231,4924,5668,7120,3920,8034,6409,2817,460,283,7112,6704,1767,4195,953,510,2135,7246,5161,4936,3258,4431,3280,6790,8513,8161,197,4347,257,4059,2700,7000,2633,7981,4369,8424,3552,2222,1678,8362,1399,5855,2214,5196,724,6005,7456,8245,2044,2543,5720,6696,4454,5492,7818,1241,150,7312,7454,7565,1868,2849,4249,8224,4434,4466,4838,268,4750,1772,1517,5444,1582,4789,4326,4858,4001,696,5612,8478,6844,7625,6950,7263,6231,6213,3457,7557,42,8434,2744,1964,3432,8331,4602,332,944,498,1470,4500,7048,1,203,7329,3212,5948,7686,462,6302,7244,2282,4696,5735,2768,7208,7678,6778,3055,2783,6361,7031,3519,3110,7107,8107,760,8377,3805,6930,7939,4605,4659,1299,5069,8348,1646,4045,2635,6136,3684,1858,4213,2648,851,1082,5312,2335,1787,2784,8209,7737,180,1458,6158,6983,8322,265,2681,6696,6047,3877,5575,2084,5852,3273,4883,2513,3856,4188,5835,4925,727,5896,1928,926,2726,1063,7808,2690,6829,372,7991,1417,5069,8008,8269,1868,1912,6938,1962,7869,7042,2203,4409,3374,5465,879,5864,6641,1451,395,7881,5347,2776,5798,2327,7338,8089,3765,1794,6433,2229,5436,1946,5880,709,6163,4372,6078,6789,6743,7380,1528,416,3261,7607,6230,8003,6241,7007,4228,8346,6526,1497,4145,7020,1252,2544,4299,2623,997,1367,6671,6382,4427,5765,1548,4283,3172,3587,3055,5825,4810,1178,3485,6864,4854,6275,4945,751,4459,6855,3055,8156,1411,8022,2970,673,311,5878,6688,2671,4776,2539,5137,6925,5240,3759,8220,254,1951,861,2341,1730,3411,1623,3969,7157,2041,3326,5094,950,6486,7431,7706,1111,7239,4330,2906,4600,1148,4668,7443,4987,634,8118,8282,3611,4537,8170,4000,1546,5751,8162,6908,5592,7409,4533,1358,3927,3098,5425,4742,2349,1133,1705,3413,4596,4352,4500,2967,1559,7559,5169,4069,7100,881,4922,6070,2889,2046,6074,6007,3372,112,2656,1387,70,3124,7479,4310,6724,2109,802,2207,4938,1786,8011,5616,4082,1140,4953,2133,925,510,2698,5885,5879,5222,151,6779,4556,3414,3656,3097,4137,981,8074,6338,4755,4979,889,375,3615,4518,3878,6147,916,2076,4063,7022,5367,267,5013,3475,1188,2823,305,3697,2912,3587,2396,7786,4360,2679,1382,1145,1501,1635,4722,2626,171,7626,1867,4691,6465,3725,1454,3954,5478,5822,1383,6769,5986,6976,5204,814,5751,6428,2678,6322,4684,6919,3682,119,3448,5953,5341,386,2469,7689,6972,4834,7709,5267,2634,509,5997,4959,561,863,2165,5518,794,5029,5344,8002,5995,1413,3594,2828,885,4128,5105,6418,343,164,1608,2914,1954,4218,837,4144,3165,6966,406,7493,1552,4444,189,4250,7440,5785,1,6704,5451,5241,3207,3909,2631,8027,3550,5425,5881,3039,7540,6130,5395,5374,6007,7575,5267,4929,1621,4010,3991,5463,7224,6079,7482,3686,280,7843,5888,3001,4388,1600,1250,2020,3830,7859,456,4834,5428,6559,7763,3199,3654,1708,5666,1743,7568,90,5510,5112,2589,5716,676,169,3895,7093,7686,6106,7818,4875,1789,2126,819,1560,5960,2746,6491,6618,6761,7494,6563,7138,6800,6672,4450,3945,5164,6491,3615,1769,337,6143,6756,227,7774,7941,6949,1885,1031,3194,2668,3351,2982,2618,4027,1055,3065,2398,5478,7163,4454,172,3691,75,4205,5120,3334,5360,5084,6534,1242,3265,2167,5772,2678,1177,4197,7440,68,3228,54,3716,2654,1185,7478,1052,4407,5423,3319,2600,2755,5884,6723,7004,6253,7932,2114,2275,5622,4067,5482,913,7080,5278,2973,7573,1923,7798,6520,1200,593,3988,7200,1195,6017,4952,6393,4557,5261,1778,4016,5311,6999,4338,6444,5354,4571,813,6537,691,836,7241,3057,7886,2408,502,3359,7425,5893,1213,983,6409,4450,6088,4887,1812,7725,6166,6021,1622,3128,1297,4063,2519,5160,613,1818,7415,7847,5686,3917,6643,2142,1449,7273,5125,1274,1742,1872,7516,7902,312,2964,3665,4730,1509,3192,3890,6456,3402,7716,5320,5698,3399,2759,7494,2030,5710,3400,3458,4686,1315,4019,4482,4084,6366,3735,5498,7324,1257,3674,7464,5414,6361,6546,2753,6320,4892,2704,1626,3785,7592,1730,1885,2026,3419,4402,5090,6992,6483,6689,4258,7566,4094,1910,7764,2539,3886,5409,1160,4730,4762,4553,6295,6342,1197,1694,6520,2714,2695,7792,5665,737,6589,1299,1303,6649,7709,3309,928,5319,818,4068,7150,211,5879,1922,7069,3521,2387,5748,2954,2293,2115,3217,6938,2685,5677,987,1744,6269,1941,4670,4421,5042,1042,2125,3937,5515,5522,5040,4486,6784,4260,7202,1883,2385,3779,2832,2755,5877,4825,4948,1850,5098,881,3229,1914,1030,6697,3471,4816,5563,6396,3630,2456,279,1392,1819,17,4194,3590,6016,6878,6666,4992,6209,6970,1379,5284,6874,6896,1440,1448,3947,2038,7501,1068,4997,6186,4798,6466,6767,1425,983,5311,4759,6283,2748,1808,5919,7623,3202,1936,3029,5950,4660,5266,3561,5016,6952,6704,3943,3563,3547,4766,1926,3484,2890,5088,7469,2534,6712,317,1359,4616,6556,7214,6337,2046,2275,673,266,7306,266,5750,6816,1124,6150,6740,4892,5112,2998,642,2070,1538,2044,6096,1654,3627,279,4891,7378,2642,4748,4839,7497,4569,4000,4580,2403,1585,4282,2041,1495,6812,2740,3216,4655,2148,1050,179,4948,5223,7184,1166,2697,6110,2814,7359,1744,6793,2064,5595,1852,4028,7119,1193,12,5329,4770,4154,5646,2044,5536,3141,4833,2044,5737,3706,3106,7549,2628,5399,5126,2056,2333,2273,470,4559,4105,4654,1908,6177,4402,4279,5485,2301,3097,5283,1075,1897,3912,4346,686,4595,2892,3811,4319,5048,1177,6401,1852,3087,5529,2236,479,4575,2247,5769,5683,5386,937,6122,216,1527,854,6186,7054,5822,4369,5925,368,6228,6139,2005,2008,792,2660,4865,3293,5359,573,6329,4646,2007,3688,7463,3430,2408,923,5347,4448,1894,3280,6878,4147,4733,3129,1277,2095,6886,2250,2313,6410,3282,1769,7314,1746,2651,4549,120,3552,959,7524,4950,2746,2729,4381,5980,2598,2239,5561,2467,2009,4198,1148,5126,5062,2227,2023,1304,5602,4573,6528,6837,7276,3133,3952,4181,3169,3206,4140,1821,4,3703,222,7348,7256,6326,7080,5719,2384,5949,4579,737,7294,5595,6491,4808,7370,2450,1959,3355,4066,6229,954,4874,367,4213,6650,2784,6851,1026,1530,5640,317,5214,2137,1732,1960,2243,5130,4297,1380,5384,2113,7357,652,5712,2478,4772,5165,414,390,5606,7207,18,4753,1566,5697,150,5340,4501,3059,4733,2347,4889,712,4840,1285,5318,1686,1352,627,2373,1000,7085,3742,1102,5613,5204,7433,5191,2221,2106,6135,181,4730,1074,3655,6744,75,3758,4591,2557,4965,7379,4475,729,2149,6578,6704,3148,3926,5166,6569,3876,4935,6288,6413,521,1304,3200,44,2170,2541,3227,418,6293,5385,5996,4560,6572,1700,3897,3789,1041,3455,6102,3434,2692,4956,3745,1929,1882,3146,515,6754,7326,3705,2121,5100,6326,942,2589,5017,3979,6703,4024,6929,203,576,1915,6679,2481,717,6154,1482,6772,302,2683,5447,426,6492,3755,4542,5226,697,5329,4674,5424,6910,7273,5222,6482,4334,6767,25,1203,69,6251,6168,1179,4583,850,4437,1709,4573,949,6416,2180,6608,7101,3871,1292,6714,2404,1059,1201,5829,6253,878,1001,5158,4940,7275,4814,4457,3967,1021,4158,2478,6474,4207,1035,4471,5751,3924,3084,1127,674,4552,3892,3485,2604,2325,3438,3716,7261,5956,3012,6795,187,2877,1763,4393,6177,5497,4197,6573,3602,6565,816,7008,1482,2120,4950,85,1783,1224,1673,2175,6924,4120,177,6702,2681,3809,6649,5262,1406,2323,2559,7000,1511,6871,5832,5373,2549,6927,6617,3774,272,6675,6559,6329,4867,6863,1154,4826,752,834,5770,6041,5774,2701,1941,2852,157,6079,5598,4923,1477,7167,6810,5483,987,2647,6971,5992,4025,662,3889,5577,7095,267,1741,4989,6718,5653,4031,4843,369,3170,434,6437,715,2408,6520,200,195,5998,2570,2854,261,5531,1425,1110,3321,4573,3377,1228,3619,100,5485,3743,6175,5820,1010,1579,2163,3680,2276,139,56,6153,4324,4593,6931,4046,3859,4335,5373,176,5688,4635,6614,2615,7032,511,4742,3536,1426,597,3121,3840,1490,6558,6702,5750,35,3382,1165,4364,1390,2718,7085,5066,3991,1112,6337,5623,5896,2410,4842,3450,5796,210,3184,5178,581,5289,6391,4263,953,5318,7016,3820,2064,6785,2576,6320,4025,5762,4726,6508,2713,2936,4119,6740,2364,2474,6524,484,2028,5770,5852,2556,2617,3300,3709,6319,2893,153,5472,4167,5212,3122,1355,6762,2258,4031,4542,740,2433,3320,2767,1246,3941,6148,5294,6361,4677,4879,1878,6547,6188,3947,3858,2840,6751,2447,5211,6611,6903,6054,3169,959,2746,7012,590,3264,6691,5823,938,5578,4561,6193,1663,5892,709,5544,5555,1439,2043,5985,5441,3159,3246,6431,436,5567,3047,3066,5539,6828,2775,4488,1331,5165,3342,3983,5661,390,5605,5979,1566,4012,1585,456,6894,2355,4005,634,3237,5047,6109,1476,6325,3417,2884,5392,3502,1175,3089,562,902,5200,1723,63,5639,5706,2860,2312,1697,144,248,2087,3820,4066,3561,2864,4964,4643,3667,4214,4984,310,3944,3469,6179,6746,682,3640,2228,637,6353,5720,5633,3827,2174,408,639,2226,6477,457,1798,3634,5596,5112,2315,1845,3111,1192,6684,4584,5977,3117,1827,2595,1608,309,42,2808,2345,1371,5391,4920,1546,5535,4174,4410,3424,5908,11,2821,3391,558,5191,532,676,4362,3782,1162,3886,3253,699,4685,2586,1078,5040,963,3888,21,6492,4564,5851,5038,4517,668,2514,270,3395,351,3338,823,452,287,490,396,6557,6192,1464,4399,89,495,6020,4252,6852,6473,3537,3465,4191,6340,3096,788,3270,4384,6262,4988,517,3753,2940,5691,66,1904,1118,1067,5139,186,1580,1377,5878,5259,5304,6582,88,6468,785,2968,5925,555,1873,3238,1710,6065,3729,2614,3548,6314,6596,5623,5262,3566,3073,3555,1600,5170,1646,4225,2089,3143,6014,2342,6208,5937,497,2787,1946,6219,5185,5167,3028,4328,4947,1487,3250,1154,1674,3506,6557,774,4996,2473,5023,2847,4997,770,1683,5453,4362,1912,5934,4239,5039,1081,5018,475,466,1626,5251,3421,2472,5075,1480,2446,5357,6099,2532,1294,2221,2912,1761,4232,3476,6536,5759,6240,6421,3513,6455,319,3434,1168,4628,4881,2383,5948,745,1053,502,5257,5155,2054,2523,3047,4635,3892,2564,63,2796,2422,4127,3747,3888,2254,5753,4460,2922,852,5731,1332,1198,6011,1460,503,4586,3022,2516,2304,4720,3530,3715,158,2723,2091,1987,1223,1869,1047,1382,3518,4765,3371,1182,2442,3512,2741,3535,1617,4987,5414,5663,6318,4099,6213,2276,6465,5081,6185,72,3445,3291,3227,4593,4313,914,6551,4592,1684,6078,3172,221,2895,885,3576,5604,2114,2978,6381,5666,6438,3337,4007,1972,2130,2427,3958,362,243,2109,3031,5971,5193,6046,6268,4129,1729,1208,982,3130,1729,4440,641,4835,6321,4125,2614,5373,2719,5123,3307,1151,5899,286,4704,2643,3271,920,4863,4231,2661,3823,4171,1880,462,2235,5854,560,593,3387,887,2939,859,3791,1712,5754,4953,2033,5959,989,2147,74,3391,3134,1788,3240,2749,1983,1822,3901,1115,1037,2901,4273,5129,4601,4507,3206,4098,247,365,540,3279,5022,5041,2570,5068,1003,4390,1108,378,863,3965,5562,2279,6234,5448,5624,3255,5835,2423,5322,4975,1044,859,4976,4576,2896,3517,6035,791,4956,1057,3417,2528,1761,2730,5322,2621,6384,383,3121,6474,2395,3658,416,5370,2670,3058,2221,2708,6493,94,4414,5102,6419,4183,6222,6157,5795,5206,4500,4207,5457,1586,840,4808,2030,5491,598,5111,5975,3822,786,3158,4279,6512,1693,4988,6161,1705,1139,3911,4740,678,648,1706,300,4453,3153,62,2169,2696,2241,878,4680,4824,82,6204,242,2552,5130,4583,3629,2085,5461,5228,3946,4030,5020,4656,1154,3350,2415,4498,4188,3664,679,5332,1229,1448,2464,1616,2377,2460,125,3250,4406,539,5770,3285,2238,2408,2079,5386,3252,4849,5337,266,3669,3845,472,3276,3859,1993,6360,2129,5289,2429,1171,1039,3025,1341,5538,2946,485,6422,5937,4818,2997,2546,465,4404,5300,506,3885,3058,6113,18,4125,2287,2011,2351,3762,4520,3242,2304,3257,6418,1309,3112,2406,3881,3990,4542,5038,5198,1778,3510,1338,5651,3811,5802,5939,3209,3471,6319,357,4595,2137,4985,2622,5932,147,2476,3753,6135,428,5009,1222,5693,1352,1218,291,5960,4686,3139,2632,3416,5268,4039,653,5601,3536,738,2976,5697,1743,3516,4031,4467,5490,626,3014,5789,4481,3355,2594,6034,5752,5994,1742,5580,4074,5197,3439,1090,1936,5723,6321,3397,2919,1365,5831,6056,314,824,1937,876,4351,1612,2208,4561,327,3771,1244,6050,2373,2136,4631,6030,5312,2921,1705,6,3276,1592,3011,5016,4707,2513,338,3799,1146,670,1272,2312,2001,1898,555,5408,5750,4441,2729,1990,709,2166,5570,2554,1133,5290,640,2898,4267,723,3234,923,3925,2101,1331,3078,2371,2285,3128,3989,1763,2193,1591,2490,1173,60,2498,2850,2446,3053,2297,2607,5688,4962,5780,5273,5507,2522,4711,4990,2058,5376,286,856,4176,2762,5500,5702,2540,2621,3426,4647,1148,1347,1131,1314,1164,5173,728,4469,6093,2391,5859,5298,2262,704,4626,1023,5471,3227,2808,5412,4057,4292,2754,5754,1117,3316,4041,1103,629,2502,4928,1228,2394,2698,5111,1015,2917,5220,3331,3455,4000,1729,3683,3276,6098,1042,1681,4364,2466,1520,4568,3238,5433,5131,3577,2606,5012,6039,970,1253,5661,4726,1068,1911,414,77,4885,303,297,646,6154,1766,5541,1371,1189,5377,4278,1861,382,4382,5435,2303,4482,426,457,3754,3211,5462,4729,1608,751,6104,4432,1584,2890,502,446,2345,2748,5309,4329,3454,4963,5009,260,5511,2673,456,1589,5022,5584,646,184,4840,1647,1126,5131,428,5672,940,3936,3915,3553,5010,4565,3131,3977,4021,4285,3594,1071,5801,1359,5004,30,3973,2219,5460,4430,1993,2950,3412,2121,6016,5122,5643,1075,2590,2710,4886,3577,2859,1111,2966,1150,2438,964,6026,2468,2517,2715,5729,765,3330,1079,2228,3468,3545,471,3567,2701,3264,5884,5381,572,5059,2046,4114,1080,323,81,299,2791,1276,3841,1236,2035,1081,2718,2102,47,3534,3324,3620,3251,5507,5818,3800,5294,4985,5747,923,3571,3821,3876,1952,706,1875,5921,2461,5542,1549,5425,5958,267,3810,1907,3287,2221,1832,1312,1783,1261,76,126,3060,5939,48,5642,2189,4381,3605,3299,166,5893,2994,3660,2937,2779,2566,5568,3724,4789,3247,5050,1569,982,5383,759,3059,1705,2935,753,1562,2281,816,2435,2975,1104,4234,3628,2429,5315,3678,5762,4485,5372,2124,2049,414,546,4076,4246,5012,1524,468,3693,4693,896,2857,376,2904,2556,1953,4565,60,2013,4975,3875,1938,5617,3406,957,5438,2293,3958,1484,3126,5718,875,2332,5667,1606,1191,3781,3796,3446,448,5217,4339,5188,524,3501,4907,4336,3905,3751,5020,4033,1057,5426,3198,2611,1720,5412,210,4724,2708,353,3781,510,2838,3781,5337,1865,1543,431,1289,4385,4975,4164,2830,3128,4134,1206,225,1230,1965,3481,1455,1413,5850,1434,4752,3262,1710,3833,4762,938,5422,1743,1723,2942,1517,133,2254,2361,375,316,4981,1542,1437,4830,2520,1984,1021,2617,5037,2904,1985,2898,5772,1077,2378,3340,3714,261,4930,4322,4703,4424,124,3385,5285,5048,1464,5314,309,218,2301,1547,3603,1465,2867,819,1164,2788,1576,3079,2570,1337,5089,4778,3388,4976,4304,4319,5824,4593,1221,4191,1992,2718,1604,274,5592,769,2790,3124,75,851,3877,1092,530,5198,3201,5124,2775,3,4161,2383,1536,5672,4773,1309,783,1406,1633,4177,3872,4857,5129,2867,2664,3781,2984,654,3793,3414,4176,5748,702,773,1285,2854,4104,865,3091,385,842,2314,5615,512,1794,1003,1636,3176,2545,3084,532,2066,1495,4170,4834,4895,1003,1641,3757,1878,2025,3413,3523,708,5716,4285,3095,4343,3046,1931,3454,388,126,1603,2995,2362,4025,149,3787,2896,1847,5735,3305,2503,3229,3314,5533,4166,4469,161,4387,1022,3505,3588,42,5414,3167,3371,4415,4738,1085,3267,1934,3674,4282,4804,3574,4649,5395,4190,555,3746,451,4313,4547,963,2560,189,4931,37,3510,87,2185,3809,933,2767,884,1227,3633,3843,812,4429,4364,1441,1864,4717,3263,5224,4875,707,700,5536,3170,5135,3578,2086,4363,3059,1984,1554,2663,1196,3298,1571,1411,1165,4447,3561,2366,2034,87,1143,4439,210,4310,5538,4616,6,1772,4783,2946,414,2584,5210,1025,711,3404,5083,2551,3288,1502,1051,3813,3460,204,238,4596,367,5326,1330,4989,740,4733,3761,2408,4898,1548,2144,3573,5490,319,3949,1812,5288,1526,2546,4758,4456,3795,4208,3495,5458,649,1529,3597,390,2420,5162,4894,2093,2886,109,3151,5462,1536,2760,3004,2945,1958,3130,3948,3244,1473,1792,4751,5084,5267,2969,2281,440,776,4263,2928,3109,1166,711,1757,109,3265,3983,2135,1498,155,1426,3924,2753,669,1743,4977,654,1594,4960,3436,882,4694,3741,751,2856,4853,4300,4957,1691,611,3081,403,2179,4879,90,2949,66,2445,4451,5222,185,1413,5180,226,3989,3600,4768,3977,1856,5118,2549,4162,4556,2640,3914,1370,3473,3082,2389,1933,4091,3398,3734,1370,2140,750,2150,3855,1162,3168,1932,4806,3527,3677,513,2563,5249,2604,1874,2884,1605,2274,383,1658,497,5190,478,887,1744,1025,2079,4786,1703,3272,1249,4068,4003,4368,562,3547,2232,263,197,3128,4529,3080,4786,1097,1397,4282,2296,30,554,1084,67,4782,4529,75,4546,80,5224,4775,3563,5196,4010,172,932,113,3696,1205,2265,2618,3388,3274,1272,3164,3200,4832,142,3151,5164,5296,1539,265,3774,4363,4674,816,2421,819,1632,2274,5384,1074,3691,4176,528,981,3411,790,4499,2782,2637,2111,1215,1871,444,1171,4537,3823,1670,1027,1296,1393,1064,155,962,1250,2874,1301,3062,3141,1786,5208,3973,1461,868,5279,4186,3747,1666,4056,3110,2385,3159,2976,995,340,687,5358,3822,633,3137,2696,5155,2200,569,2138,4319,3429,2764,2934,80,3582,5316,1963,2962,3841,1967,4806,22,3860,5122,4794,411,251,914,2241,706,2203,3870,813,3489,783,1565,2871,5001,227,86,1761,1624,3348,4396,408,2115,2575,22,2208,1334,165,494,641,4771,4517,3610,3679,2803,319,2271,4042,3064,2977,4107,195,907,216,4423,2086,2654,851,2056,3614,4678,2685,1219,1244,3872,2353,1152,3849,3687,1481,579,3139,2405,1961,4762,70,160,4468,4725,294,430,2040,3323,3586,4,4552,1299,2402,1934,1915,1,3655,4963,893,2540,4594,1397,1476,5054,5142,734,1819,1123,2029,1901,3689,3334,3562,4981,5191,1369,3588,4361,1222,2942,5024,320,4575,2155,2337,216,1247,437,3511,959,580,1176,4508,3991,22,1327,1731,2373,4899,4983,841,2357,4599,3854,1099,3858,2883,1704,2832,2354,1771,1332,2214,2761,5166,3053,5202,1604,2112,95,240,1056,4488,4809,2322,3963,2355,2447,1603,2069,143,2800,4679,974,2040,79,1094,4784,737,2585,3240,727,2774,1837,103,2944,3641,3689,4992,322,1987,1789,179,360,3072,3274,4578,2695,4302,3027,1184,2354,5008,3689,3602,4087,3095,549,4530,7,703,704,792,3197,3684,3822,1504,3434,3071,1184,1135,602,4392,2046,4748,1085,2401,3083,1056,4151,2270,4314,3768,3845,4697,4479,163,4656,1777,3279,1625,2859,3466,3498,4364,733,1348,4250,1443,1076,3826,4510,300,3848,72,2614,1710,3959,2449,2448,2809,1036,4924,5057,1145,3253,408,3367,1667,4135,1069,2108,4435,406,2011,2424,4250,3131,1406,3799,4075,601,775,3055,4119,2330,4946,2723,5010,1443,1357,3770,2498,4532,2543,5025,1474,3787,2154,3190,868,2213,3391,247,819,2874,3216,3736,4225,570,164,2641,2219,4024,3068,100,3438,3146,577,1918,1213,3577,3601,1396,4072,925,3212,3179,43,872,2600,2675,491,1559,3883,352,3664,4511,3501,2722,694,4883,817,1836,4346,331,4549,3580,4325,60,3241,764,1725,4643,4747,2137,1772,2557,972,2240,192,3523,2795,2717,2850,947,2951,3977,4663,49,527,3856,3427,4868,443,3322,4703,3251,2277,3132,4692,4221,3464,997,2032,3999,4156,569,1225,4882,4579,2516,16,4741,3643,1783,3780,2573,3056,2333,263,2164,138,4716,2705,908,901,2532,3741,2405,790,1463,1883,4931,131,4052,4021,1210,4110,2440,3718,2600,4019,4768,1532,3041,2735,274,3647,1515,4875,1562,970,614,2454,753,4454,363,3339,482,2615,901,4650,2447,1954,2651,1997,3452,1926,2902,1580,4357,3714,2384,4788,2202,75,4716,3337,1474,2036,530,4356,29,1428,2038,2086,1097,309,2617,3562,3372,1470,2993,4520,4489,3436,3697,145,2047,1197,1936,4006,39,4435,1026,2398,952,984,2405,1632,2250,2546,795,1530,476,3194,3063,3721,1199,2253,2582,518,2061,2708,474,3078,3068,364,2459,4281,4405,1164,594,94,4209,912,4492,2820,332,2230,1248,1934,3849,872,3777,4505,1041,2495,2439,261,2328,830,2621,2789,3045,3210,3163,3362,1469,1053,4346,3857,1352,1333,3879,2368,3756,815,71,1822,714,43,1726,1452,1025,515,3457,626,3590,3489,1406,4779,878,4676,1603,668,829,273,3239,3174,29,659,1300,645,4756,1839,2182,1885,241,1039,3403,2783,392,2973,2056,2753,2476,1906,4509,3104,376,1031,3203,785,2304,553,1551,1204,1283,239,3156,3063,1976,337,3138,4613,2315,3123,2938,2236,708,1522,2793,3819,2071,4620,3185,4307,4624,4343,1642,4276,176,2738,4638,676,1903,786,2637,3065,2024,1763,3385,322,3631,4213,2819,3989,3371,1893,3877,637,3597,4598,4376,387,3051,2813,744,4309,394,2866,730,3718,1717,2946,4245,651,3762,3050,0,1458,3963,3415,4425,1986,4280,4710,4085,1398,2594,3087,452,3270,4427,3281,2753,3777,545,644,2877,3347,987,3174,4038,4107,594,1648,4022,4643,3621,2668,58,2392,2684,2673,4037,1599,1343,4242,3563,1122,781,4089,1536,3328,2591,505,797,1758,3047,373,2001,2724,3369,3393,615,2524,1048,3892,346,260,402,2022,2214,3212,2063,1320,4261,1853,3139,1114,4469,1591,3381,2520,4597,4590,1264,3229,3856,3150,1038,4504,1927,2231,3363,3919,1749,3474,497,4380,438,579,167,2872,2060,148,1620,1262,3307,1631,2696,733,661,4216,2160,2565,1828,1563,1877,3948,2528,2502,1734,5,3806,335,3900,2419,3396,2695,3153,349,2396,1989,314,718,4020,1657,2548,1181,214,2557,3881,159,1119,3881,1706,4215,993,43,112,3490,2637,4301,4306,60,3831,789,1718,605,3280,992,137,2690,3338,341,3545,3922,1711,2752,4516,607,4137,3573,688,1471,588,1378,2169,3481,4506,4133,4512,4109,1638,1223,659,1207,1888,4486,4301,4482,332,4321,3206,4260,2012,2105,996,408,3348,1717,3276,262,140,412,1602,2979,4237,3127,2293,3834,1810,2925,2418,2968,1017,2004,1779,1061,2525,497,4126,545,3821,1920,3255,3810,2605,4285,678,277,4173,965,585,1258,1361,4401,3951,4456,3786,3961,2792,1229,194,2548,2631,476,1169,3838,3325,4080,4355,3215,1869,4262,2822,3180,2422,307,167,2788,1316,2397,968,1591,3901,262,1924,782,20,2572,3827,3392,3561,414,4254,2789,4419,1035,4252,2696,986,3049,2260,133,4349,401,539,366,2547,4147,1198,1140,384,631,3079,1441,1060,1117,3176,1843,4160,2714,4092,376,1156,741,2497,3831,1358,3441,3931,3451,3327,1592,2602,364,2257,27,1361,3531,2248,3429,138,2512,1988,3561,858,1841,1756,1849,4340,4239,4278,2001,3666,458,169,3341,3927,2404,4129,3864,539,2603,3001,2949,3921,805,3017,1572,399,3446,2904,3631,3457,2851,4286,2619,322,907,4312,3515,1033,355,1322,122,2618,3325,3803,4126,3016,3469,3521,1262,3768,3700,1020,1664,1858,2281,2782,783,935,363,2794,2692,3260,521,2448,2891,2747,1136,3515,2623,88,4012,3487,728,2291,2591,1508,186,1763,3193,1108,88,4300,2931,2847,86,2426,262,1719,1378,4282,1373,478,178,4034,2563,1684,1302,1417,1611,2212,612,3545,4159,2324,774,3197,285,1157,3374,302,3418,3138,2663,3042,737,2664,2997,1424,624,1747,920,3714,14,3892,2354,2155,1505,3876,2373,3940,208,378,531,2585,2513,4116,2085,3984,4212,2530,645,2048,283,3222,2721,183,3431,195,3452,3749,1000,2885,2519,2675,1538,2518,1158,3754,1368,1047,2861,1496,3555,1340,1955,2957,2074,2115,3301,1932,4097,853,2476,1885,3228,1681,86,2643,269,4072,2526,1315,3416,4111,425,3411,3492,839,1684,2889,581,311,3194,2502,1540,104,3428,2267,1428,2449,3585,3067,1774,2524,1119,2133,237,1912,3136,3702,184,451,3409,379,2757,4097,3716,1921,146,3627,2209,271,155,877,753,1013,2740,1750,2293,2283,3725,86,32,920,2158,3592,1226,2840,3860,86,2058,2403,2490,3471,2942,3633,1384,1735,4019,800,1540,3291,3318,1954,3815,932,3856,3286,522,2026,3434,473,2357,644,1599,3535,2112,2328,2241,3311,1488,3429,4024,440,1130,15,418,4059,2648,2023,2692,776,2076,282,1195,887,2881,3428,1807,1656,1773,1431,1506,1898,1358,643,2337,1685,2290,2847,199,736,549,1647,2582,3515,2088,549,2931,600,3749,2078,1173,3812,2603,3161,429,3630,1369,2959,3782,601,1677,856,806,3557,3743,1514,3288,2007,3515,559,1036,1876,3839,591,4023,2487,2697,3585,1049,1280,16,1980,458,3403,3311,1091,4004,2745,3196,1222,1551,3445,3436,1038,2988,1168,2339,21,3149,2114,554,2858,781,2744,2035,2107,2469,3645,3125,2294,3248,821,2668,663,3864,2684,174,2644,817,2953,2370,3534,2541,570,1473,745,1470,3541,2035,763,3457,1060,1633,3849,2901,2042,1781,2308,2749,2445,1342,1312,198,1090,370,469,1522,2256,642,356,532,2932,1472,990,3689,101,1992,2437,366,99,3773,2517,997,896,1380,1697,750,1376,1045,3678,1852,1249,66,1025,2276,2272,2067,1261,957,3704,2174,1852,3159,3820,137,3568,1843,627,192,3581,1479,1243,564,843,1348,2161,1022,637,2386,1400,1908,3380,2624,71,813,1257,3929,2481,905,3122,136,2505,3669,3149,420,2208,3611,3884,2805,2504,34,1483,91,1262,1577,1563,2689,3663,81,994,230,3539,3891,631,149,1223,2564,3466,895,1932,2483,2744,72,1518,3444,997,538,516,1596,923,2575,703,882,1838,3655,1141,395,3111,1250,2812,3497,1716,1684,653,3203,2849,482,216,2107,532,3042,2134,3701,2378,1312,3724,12,595,2399,3756,1612,1148,1471,379,3812,3322,159,2548,3704,1169,546,472,82,3272,2556,2018,2249,205,1908,905,345,2124,723,465,354,3762,1144,2341,1062,1783,3772,2397,2432,3100,2633,3049,691,2321,3703,1932,517,1222,1652,1648,3130,1749,1680,1089,1235,3189,1526,761,2107,1971,1361,1487,3027,3075,2878,74,2139,2916,2502,2928,1107,140,3213,2546,1086,630,2703,466,2096,1360,3192,3267,710,401,907,2983,992,3705,2449,370,2838,1,142,3269,3379,639,1254,3205,1090,479,3130,3368,729,3117,1624,1121,3337,2088,1117,2666,1945,2215,165,1239,1927,2216,1966,3573,2286,1893,1751,484,3654,2075,720,1792,3597,573,2495,781,2678,3464,1898,3350,2383,1131,3687,2459,36,982,1824,1386,2321,3460,103,1388,3161,872,54,3057,2325,2823,2929,1363,3440,1111,1997,3521,2973,3313,1025,324,715,36,743,3211,3166,1878,2823,246,2301,767,3643,376,2536,3530,1599,1324,2479,116,3387,653,3174,3465,654,1327,1748,278,1413,1245,1030,550,577,717,1783,1676,144,2746,2105,2490,414,2819,3256,1718,1435,3524,1097,1124,2958,2480,708,1594,1879,2161,3121,2874,699,2141,2823,3235,3228,2923,169,1802,3108,3602,117,3548,402,1588,2747,2438,3073,3530,2823,1338,768,1803,2321,670,2181,1364,1395,3480,2242,962,2197,533,3372,2354,3208,887,626,1194,416,3587,176,949,1356,1640,2916,1423,524,1691,3518,3436,1714,2972,2112,1153,1675,1775,1326,3120,1003,880,580,2074,1279,2533,65,132,364,2870,1444,176,1789,369,2810,1712,1747,1139,2749,179,2566,2186,408,2577,764,2291,1195,1028,2866,3313,1803,1748,3324,645,2380,1399,13,2784,2345,2083,3307,513,2797,1060,1689,2322,1076,2659,1009,697,713,2913,1067,181,1464,3474,2761,1226,319,1622,2707,623,1140,745,1608,2081,355,3090,3410,2906,1496,3462,2888,1571,2032,1036,628,910,620,27,1172,3392,1179,3188,1999,3056,2769,2453,2609,2524,1448,770,1137,128,17,2899,2008,1638,1383,293,1300,190,1860,1623,2438,1292,1264,1457,1271,677,625,1392,863,737,2278,3049,3248,2483,2987,2595,82,3441,2363,3167,5,1392,807,1101,2122,16,1614,1813,2831,2000,2769,305,1665,2113,1458,2595,2323,2355,1938,2334,3090,812,2765,459,2663,2243,715,1483,2196,3141,249,2127,2437,1667,1474,2073,2788,1739,3360,974,693,3168,1641,2460,2567,2464,1867,1729,1158,412,1473,1859,761,1099,836,242,207,16,141,251,719,456,2378,3205,34,585,3094,3175,2670,634,3078,2263,1886,737,1832,491,2330,599,744,1577,883,1365,306,2532,2194,2227,966,2528,1933,1309,794,1885,122,2330,1210,1718,562,3003,1117,786,760,1962,562,2157,1851,582,216,218,1337,2134,2731,2681,416,1802,2647,2024,1039,726,1630,2834,1115,2941,1638,252,2293,1449,490,2093,2788,3022,951,2385,1328,1211,2714,1661,2219,2195,3075,1416,2740,2474,2721,2709,1061,1481,333,2463,1438,2138,2419,2461,768,2169,2251,1869,872,1877,1314,1317,2200,1520,893,2137,1986,2654,407,3079,623,2362,963,696,2428,2292,2952,1936,3208,1204,1475,1004,2009,1007,239,1479,1509,2716,1093,2704,1948,1877,299,1559,2462,410,2895,2868,1598,1479,699,1788,2628,972,233,1206,1897,117,475,1724,3070,1862,582,421,2547,559,2631,1664,2244,648,1992,611,2242,1133,214,3162,860,2577,2184,3149,1744,1581,938,509,1337,421,237,2646,1224,2274,80,948,84,1603,3196,1490,1999,1352,1524,999,2712,48,1197,3035,2760,2500,1145,524,2810,506,2073,1482,194,652,1270,3114,1341,2290,637,2682,3130,1953,2167,1643,1766,2397,1448,495,1712,2984,1068,703,1779,1369,2870,2738,2367,1169,2289,2390,1630,156,224,1711,1204,2708,3003,671,2414,1298,652,451,2835,1,429,1534,449,2372,2622,1459,1382,1288,1008,233,1002,3008,1812,2545,1896,3080,713,1331,1198,1082,1744,1866,2621,2296,732,599,74,1832,175,2756,1470,117,272,1712,595,2417,366,2800,2202,669,539,1639,2887,4,399,44,2030,2910,705,698,2573,1258,779,1413,2023,1096,155,2507,2592,365,2439,2333,346,1048,2507,1458,674,102,1048,3043,1171,2543,2833,2680,1152,311,1045,1401,2165,1311,2612,802,778,1298,2548,662,275,2177,951,2743,2600,963,1761,2854,755,1654,2548,2294,1506,1757,2468,1278,2322,1270,2991,713,2851,211,2138,814,56,9,656,1083,2839,161,1900,1651,1159,1255,1644,1239,1796,2034,2294,1645,612,1504,1509,2947,629,1846,2498,2896,523,152,2208,897,2092,673,696,187,309,660,951,365,1362,409,1672,2247,2656,982,2754,1184,2375,459,2471,2001,2672,2181,2944,708,1654,479,1556,1075,2918,1193,1859,2404,920,2862,2817,1645,2043,1171,2243,1247,242,172,521,2534,1022,1042,1061,2596,667,2183,929,1098,1412,662,1498,2368,919,211,1509,1113,1267,1288,2015,624,1931,2569,1879,342,392,496,54,995,1250,2305,2657,77,1164,433,2925,1840,1192,65,2778,834,922,1662,2488,485,2787,2741,1970,1921,1845,2194,1970,668,279,2879,169,870,1226,266,2104,2083,1695,1505,2117,2633,1087,729,860,1849,415,707,1298,2598,140,1221,316,247,734,463,2123,1434,1015,2262,1793,1098,998,2729,1432,987,447,114,1345,982,1769,395,2097,2462,284,2832,2624,1837,1978,1765,34,1053,2614,883,552,131,874,2544,2635,2086,1184,627,1864,543,180,363,927,2857,2644,2534,1154,1728,128,1438,1750,1500,2243,2299,1001,1620,1392,2192,2788,1681,1185,10,378,906,2135,826,458,2500,1430,1558,1542,2466,1979,51,1961,814,2411,2650,1343,1200,1204,204,2409,2692,81,1164,395,2057,1865,1396,1289,1180,798,210,139,275,2153,230,1110,1246,1022,188,569,711,719,638,2479,2755,2178,1261,1215,2037,2679,2316,2700,1472,56,1153,74,1335,2196,877,559,2240,502,965,2093,25,2051,486,1154,1318,709,1592,523,291,2495,860,168,2122,452,2404,377,797,2747,2511,1769,15,884,804,651,1351,1971,2631,658,676,1084,998,2458,2117,410,567,110,1061,1436,1912,208,362,2172,21,1855,836,760,1484,2385,724,608,2702,69,2099,2652,167,1985,910,1646,442,1685,2364,1974,2146,244,1658,691,402,1285,2608,416,89,1598,1004,488,1442,1751,367,863,1495,2363,2184,295,585,1593,1729,212,1106,2324,1523,1846,1416,2261,705,2177,1245,499,1726,2226,1483,1590,2343,1817,1972,1769,711,758,1800,616,398,1518,2461,1712,1252,2467,781,1217,1465,12,132,1338,2117,669,562,1883,1686,960,1585,52,2127,1407,544,1463,1270,609,631,2631,1849,2246,2228,1147,1777,1756,1808,2012,1441,1527,678,2240,2483,1647,797,1481,467,1630,1491,2518,1749,1688,2028,1122,460,466,1521,2208,2251,2422,935,864,792,1009,1966,1720,552,701,902,290,1805,1698,1581,2405,450,1778,2412,2536,1208,1276,623,2068,1416,1961,1519,464,319,1681,36,1601,998,538,1848,444,2232,1788,172,2447,1297,1646,1739,1738,1750,1162,420,1648,1075,2158,2202,1687,2180,242,2055,298,2450,2375,738,1848,1836,1466,1920,1955,2312,2361,2231,42,1497,584,288,1812,253,2340,1424,681,358,2320,1269,1190,1575,784,317,1180,1131,315,1244,835,320,609,2494,2151,698,2445,123,1682,9,1137,1169,1607,2477,1333,1049,1905,916,13,213,1038,2105,1639,2287,2265,36,2364,1782,1926,1073,2461,350,944,1713,936,2372,1461,1448,353,192,1620,1725,2047,856,834,1123,685,272,52,1247,248,1848,1793,764,115,1564,2207,1737,911,388,2209,316,1505,1024,654,919,1840,307,1426,1703,387,684,22,2292,1649,2053,634,2060,1034,1570,362,1986,2103,2335,748,838,2246,1827,2128,1680,1507,1362,519,1230,78,474,1652,2309,846,641,2201,779,949,70,521,1232,315,325,609,2079,658,1689,1095,113,480,40,953,705,1429,1222,965,1529,1332,868,667,2106,1246,457,2268,538,1941,938,1064,1451,2175,1271,788,2157,883,2162,528,1381,1965,1440,1660,1692,1303,974,13,2036,1084,1728,2256,1317,1434,441,2006,1919,902,36,1307,979,82,65,1661,2279,1424,462,756,1046,1388,368,1817,1190,561,2011,142,1488,1554,509,1889,1008,2237,391,364,63,879,1895,342,457,2008,2035,700,182,616,1200,1360,326,1373,2240,1456,1796,1933,1506,1650,1394,2088,1571,1986,1728,1181,21,213,1147,1186,26,1609,1302,717,835,1222,1599,524,1784,1405,997,1385,536,2181,1741,1063,630,987,1674,1433,1927,1364,345,385,2125,123,1995,200,1063,1213,1296,1656,504,1799,163,214,93,195,1783,2018,1462,1999,297,1639,1563,401,1184,1426,540,1256,1939,1094,1900,1025,1356,1753,994,277,2130,1763,922,1395,543,1230,864,1863,1437,1284,197,171,1399,573,1354,2064,2011,296,1921,326,2014,1651,2032,494,1604,1831,137,2025,746,1881,1182,1760,642,92,2008,1968,1510,161,1282,425,1757,13,1177,1899,1546,428,1700,594,1956,587,425,728,1372,1348,1811,1686,1773,924,963,1364,1526,1758,1846,935,1364,823,780,322,151,1552,905,1175,116,1900,1400,1548,1155,1658,1209,1362,1785,874,1963,931,104,831,1393,494,1300,968,23,1101,905,549,446,736,1015,2100,1230,812,388,250,1151,1072,64,1619,625,1820,384,1194,1239,1677,1761,1709,943,1225,911,1248,1462,2030,1682,281,1020,1730,134,848,224,1144,923,577,854,925,482,1718,787,1471,1450,1899,1045,1802,256,1115,871,1882,1268,1183,519,1369,1258,225,1431,1169,1720,1715,1896,1716,1261,1990,236,413,1353,1708,1356,731,862,1072,1305,1617,526,112,2019,841,1478,102,328,1037,406,1075,9,515,210,632,691,1679,1901,91,338,1352,224,1430,345,354,2031,1315,2014,1494,728,105,1123,1311,473,2032,819,459,112,2040,424,681,1033,827,119,836,918,1608,480,273,1233,216,139,1342,1101,276,1949,1834,183,1273,308,647,567,922,1698,1774,107,75,1981,1369,311,235,1691,53,414,1360,975,1405,169,736,36,2003,26,115,696,1086,408,1253,18,30,990,1425,766,1258,246,1434,588,1214,154,214,594,1962,242,698,167,1120,1883,903,1062,1855,1968,390,132,62,660,1825,201,1257,402,484,1263,790,488,282,512,947,53,1030,1184,215,1243,955,558,1304,429,1351,178,907,1927,1590,1840,1499,668,1167,855,430,975,1008,221,159,1770,506,1203,1641,1830,781,945,536,266,544,1220,64,656,1752,438,740,653,1810,1279,493,1530,232,1031,1360,1556,57,1151,1205,887,1811,1072,1646,1144,652,1838,1162,1840,424,882,926,775,906,991,1386,1763,115,120,1608,819,863,960,1317,671,899,1129,1650,37,1077,1643,1747,410,48,833,320,944,533,1467,348,205,942,1245,822,1271,863,279,875,1299,144,877,1080,359,383,177,313,414,749,417,746,863,1468,1534,1313,1077,967,1728,1294,708,1661,150,327,1268,328,334,1614,1379,1039,393,1228,124,709,447,185,133,1395,492,1457,1772,360,1699,1149,55,1159,964,1168,200,1290,1482,1271,386,853,158,111,895,1183,576,1508,1162,194,532,1433,906,1411,36,1629,1480,898,1101,1293,1408,1665,733,178,1553,1696,1286,1222,925,1576,334,1724,754,108,28,352,264,1516,10,1321,685,285,744,736,52,512,1657,1110,1483,513,327,760,1043,1738,1703,302,1234,1143,1152,1273,654,495,1731,683,1467,462,1036,27,1394,801,1206,471,1144,995,488,757,1383,120,875,362,801,607,510,685,1680,892,856,580,1498,60,1341,400,1610,1455,963,510,855,965,1211,1110,43,1523,1175,386,1503,1021,274,257,1404,813,306,746,1066,950,157,112,248,810,213,479,156,598,1508,231,1246,1280,914,1289,243,575,925,683,1083,1643,472,156,1215,327,128,1621,1021,1401,1533,1081,14,927,1351,144,1125,1563,522,908,1595,1241,838,427,316,206,1142,882,705,1306,667,200,126,758,1532,482,1573,523,634,1554,1341,280,1105,1396,853,1394,95,595,342,1328,74,999,380,975,291,189,1035,1342,320,151,458,1582,750,296,509,1440,502,1286,1381,1150,410,34,808,293,537,1573,812,1239,145,321,108,279,126,1201,1314,1214,1410,479,819,952,175,954,447,110,1453,1357,730,584,1231,713,1463,363,599,1197,548,235,916,451,683,541,326,423,1323,1288,914,864,805,1062,1479,150,260,738,1535,1550,607,437,479,298,453,707,87,1173,481,913,1014,863,1106,251,185,737,1376,108,548,522,626,1226,361,349,1420,503,342,1183,516,63,1002,190,244,103,950,1113,985,165,1314,1450,1033,568,343,523,1112,554,439,336,1482,528,1272,166,1463,992,1408,1373,1270,659,1470,1260,671,1467,203,602,425,889,793,180,1412,574,1148,331,1344,603,547,302,1184,813,811,1359,267,158,1010,983,870,196,1328,164,1275,1253,761,585,246,1038,452,864,612,1288,611,752,435,762,1088,911,934,681,625,303,1037,592,993,923,334,178,720,1027,187,335,318,788,252,481,496,951,188,1288,200,748,1256,1155,1212,791,983,504,1407,1175,711,986,128,1278,1123,1297,1095,892,849,673,20,1186,595,68,738,1019,1181,1242,1175,1174,1305,579,446,254,602,637,12,189,313,202,500,800,982,607,480,381,1108,478,257,631,725,48,1198,707,1322,1190,38,738,215,614,822,1313,85,818,913,378,1096,1255,1030,1157,1085,568,777,871,892,461,362,641,262,576,637,160,981,1336,872,781,958,49,1031,49,801,1305,672,60,400,1243,933,1240,765,1064,819,512,490,779,104,633,1126,1003,616,1238,525,940,629,299,854,4,170,559,866,1101,802,463,346,315,1,1267,230,413,238,641,40,959,619,402,577,1184,840,904,1269,696,1062,228,681,567,1050,567,1005,854,982,387,1046,186,1065,1099,344,918,601,1045,462,246,471,139,412,778,650,1241,907,1082,171,271,302,624,663,859,84,383,727,72,316,451,989,1133,1214,829,577,810,987,470,876,1071,203,913,392,1007,825,136,1077,1095,225,659,984,1047,765,928,845,424,998,1218,1133,180,793,308,211,484,517,260,1162,547,369,422,924,848,1005,1158,929,533,203,105,708,197,1099,602,850,114,225,274,323,800,404,776,629,918,532,459,875,329,408,193,666,515,1004,1052,750,629,874,31,950,812,467,658,164,195,698,588,115,372,271,972,1019,876,112,170,924,99,113,452,970,235,962,759,346,580,699,377,948,441,907,701,673,45,193,1130,1004,502,1044,721,872,436,395,654,765,346,487,39,638,574,622,962,172,158,1055,388,687,800,143,150,1047,994,984,1059,557,20,70,878,787,868,594,611,901,923,962,526,825,489,241,900,52,835,147,679,627,814,494,971,973,767,734,1014,23,550,693,632,547,1031,117,848,378,963,383,610,282,915,315,192,937,254,777,25,97,350,137,489,196,595,190,405,669,313,645,109,834,583,74,840,699,689,642,529,1006,48,806,473,739,70,337,173,166,430,719,469,424,873,1010,999,999,606,582,490,267,55,117,95,433,633,807,498,354,340,677,463,969,655,683,916,280,460,269,5,563,692,81,124,286,518,469,413,245,430,887,738,160,89,284,881,452,622,221,873,502,928,20,416,592,209,871,266,723,356,776,859,100,883,819,780,51,946,894,512,434,583,579,651,207,649,685,839,136,686,72,558,670,54,572,77,318,532,744,750,289,716,197,131,891,747,392,857,560,661,541,478,915,76,477,705,612,409,675,713,226,500,312,567,795,353,711,746,440,308,616,92,258,399,264,48,638,866,760,670,73,123,626,489,662,224,521,697,784,319,387,619,601,311,539,293,717,714,438,711,106,448,488,523,275,16,726,806,781,272,545,556,590,388,711,649,266,394,766,552,318,410,580,451,350,432,181,845,352,575,401,786,508,359,567,429,798,138,47,608,484,289,632,105,616,2,759,51,673,152,639,550,704,762,636,313,223,597,125,264,123,459,668,211,786,236,253,335,364,143,274,368,235,721,71,278,464,796,584,193,12,708,99,136,613,299,312,260,499,64,749,389,575,317,660,609,696,248,406,389,465,336,155,666,523,649,319,244,424,217,246,144,589,478,24,123,63,367,62,303,474,547,199,750,586,235,665,385,587,31,526,174,225,676,61,600,729,308,266,287,489,609,70,577,400,108,614,298,321,472,446,356,617,596,76,93,620,556,178,699,711,119,263,217,225,702,634,367,29,94,81,76,376,141,219,441,612,584,283,617,329,13,588,345,691,413,378,632,344,175,56,358,661,16,16,60,661,183,180,324,503,113,511,347,183,262,356,214,670,584,310,132,282,317,300,339,46,210,190,44,180,290,136,288,53,383,410,523,49,90,484,526,187,58,354,601,235,318,8,179,191,528,339,503,480,89,537,180,33,401,49,96,28,340,491,430,295,86,558,65,34,335,3,164,44,487,111,479,300,45,607,18,369,35,275,297,519,418,370,208,326,77,292,168,244,359,513,121,164,245,283,433,306,352,492,24,323,333,482,126,575,437,422,285,549,131,261,571,174,51,166,101,390,441,20,424,166,489,470,556,246,103,400,98,5,268,300,152,461,523,230,131,423,466,55,35,346,138,59,379,201,482,312,133,51,35,220,490,136,191,259,100,96,417,281,198,277,510,302,361,475,428,12,44,448,309,488,477,348,233,381,262,78,187,285,87,395,75,474,85,283,61,365,338,421,216,75,467,368,335,84,447,205,482,359,215,263,66,168,406,290,275,151,165,370,76,316,293,195,164,355,46,291,142,393,118,27,368,36,413,407,234,419,387,87,243,21,267,151,420,449,179,120,345,288,214,275,37,312,4,377,156,334,55,178,407,98,427,292,259,336,382,161,327,422,220,302,54,378,141,325,150,411,109,230,142,188,263,117,307,69,38,220,181,252,21,170,127,217,152,231,266,97,388,156,385,238,94,154,294,144,323,371,356,293,230,155,1,215,203,171,110,317,303,294,134,62,191,297,141,170,308,147,111,302,74,259,357,99,45,2,6,246,1,86,317,301,337,256,47,221,47,199,280,323,56,16,75,112,158,107,192,98,271,26,332,179,307,149,183,3,132,147,215,250,235,238,275,6,207,194,315,100,305,280,220,96,38,164,140,242,256,242,253,285,166,146,59,56,86,269,78,45,279,16,11,179,115,15,120,245,207,21,73,159,122,221,184,86,167,142,137,188,262,37,201,116,164,226,223,212,7,200,181,158,244,96,189,172,187,239,112,44,203,96,214,29,166,99,44,190,62,97,27,55,127,106,142,160,29,235,71,146,117,187,91,167,11,176,150,108,215,180,62,169,134,209,62,3,53,120,108,34,12,114,127,46,108,117,1,81,121,159,25,106,8,52,143,146,195,12,16,117,126,9,184,42,180,77,75,135,59,39,38,19,96,182,109,61,167,50,114,98,73,4,13,83,102,52,35,9,142,20,133,106,28,13,2,23,22,130,92,36,18,47,62,138,73,22,104,18,14,84,35,99,64,74,76,55,5,12,85,102,74,6,134,84,73,49,43,5,4,85,81,32,91,120,80,80,0,28,35,75,60,57,110,12,79,98,83,107,84,62,14,44,7,55,18,63,4,51,82,1,28,14,32,79,51,22,74,41,72,55,25,78,81,79,36,4,66,70,29,5,26,64,9,46,49,39,28,24,25,26,39,46,38,18,14,40,25,33,37,40,45,8,16,11,8,36,20,40,28,23,41,35,25,0,29,31,16,31,6,5,2,21,27,14,3,29,12,24,3,8,12,18,13,22,19,6,7,2,13,2,3,4,9,6,11,9,9,6,3,4,3,3,3,1,0,0,0 }, +}, + // 可以有多个 testcase +} + +func Test_countSmaller(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, countSmaller(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_countSmaller(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + countSmaller(tc.nums) + } + } +} diff --git a/Algorithms/0316.remove-duplicate-letters/README.md b/Algorithms/0316.remove-duplicate-letters/README.md new file mode 100755 index 000000000..dae4e89cf --- /dev/null +++ b/Algorithms/0316.remove-duplicate-letters/README.md @@ -0,0 +1,23 @@ +# [316. Remove Duplicate Letters](https://leetcode.com/problems/remove-duplicate-letters/) + +## 题目 + +Given a string which contains only lowercase letters, remove duplicate letters so that every letter appear once and only once. You must make sure your result is the smallest in lexicographical order among all possible results. + +Example: + +```text +Given "bcabc" +Return "abc" + +Given "cbacdcbc" +Return "acdb" +``` + +Credits:Special thanks to @dietpepsi for adding this problem and creating all test cases. + +## 解题思路 + +lexicographical: :字典排序(lexicographical order)是一种对于随机变量形成序列的排序方法。其方法是,按照字母顺序,或者数字小大顺序,由小到大的形成序列。 + +见程序注释 diff --git a/Algorithms/0316.remove-duplicate-letters/remove-duplicate-letters.go b/Algorithms/0316.remove-duplicate-letters/remove-duplicate-letters.go new file mode 100755 index 000000000..47dae7182 --- /dev/null +++ b/Algorithms/0316.remove-duplicate-letters/remove-duplicate-letters.go @@ -0,0 +1,39 @@ +package Problem0316 + +import ( + "strings" +) + +func removeDuplicateLetters(s string) string { + lens := len(s) + if lens == 0 { + return "" + } + // 统计每个字母出现的次数 + count := [26]int{} + var ch rune + for _, ch = range s { + count[ch-'a']++ + } + + // index of min character + imc := 0 + for i := range s { + if s[imc] > s[i] { + imc = i + } + count[s[i]-'a']-- + if count[s[i]-'a'] == 0 { + break + } + } + + // 贪心算法:更小的 s[i] 值得拥有更小的 i + // 1. s[:ims] 中出现的字母,在 s[ims+1:] 中都会再出现 + // 2. s[ims] 是 s[:ims+1] 中最小的字母 + // 综合以上两条 + // 1. 删除 s[:ims] + // 2. 把 s[ims] 作为答案的首字母 + // 3. 删除 s[ims+1:] 中的 s[ims] 后,递归求解 + return string(s[imc]) + removeDuplicateLetters(strings.Replace(s[imc+1:], string(s[imc]), "", -1)) +} diff --git a/Algorithms/0316.remove-duplicate-letters/remove-duplicate-letters_test.go b/Algorithms/0316.remove-duplicate-letters/remove-duplicate-letters_test.go new file mode 100755 index 000000000..e304b213d --- /dev/null +++ b/Algorithms/0316.remove-duplicate-letters/remove-duplicate-letters_test.go @@ -0,0 +1,39 @@ +package Problem0316 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + ans string +}{ + {"bbbacacca", "bac"}, + {"ccacbaba", "acb"}, + {"cbacdcbc", "acdb"}, + {"cbac", "bac"}, + {"bcabc", "abc"}, + + // 可以有多个 testcase +} + +func Test_removeDuplicateLetters(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, removeDuplicateLetters(tc.s), "输入:%v", tc) + } +} + +func Benchmark_removeDuplicateLetters(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + removeDuplicateLetters(tc.s) + } + } +} diff --git a/Algorithms/0318.maximum-product-of-word-lengths/README.md b/Algorithms/0318.maximum-product-of-word-lengths/README.md new file mode 100755 index 000000000..7c13cf461 --- /dev/null +++ b/Algorithms/0318.maximum-product-of-word-lengths/README.md @@ -0,0 +1,37 @@ +# [318. Maximum Product of Word Lengths](https://leetcode.com/problems/maximum-product-of-word-lengths/) + +## 题目 + +Given a string array words, find the maximum value of length(word[i]) * length(word[j]) where the two words do not share common letters. +You may assume that each word will contain only lower case letters. +If no such two words exist, return 0. + +Example 1: + +```text +Given ["abcw", "baz", "foo", "bar", "xtfn", "abcdef"] +Return 16 +The two words can be "abcw", "xtfn". +``` + +Example 2: + +```text +Given ["a", "ab", "abc", "d", "cd", "bcd", "abcd"] +Return 4 +The two words can be "ab", "cd". +``` + +Example 3: + +```text +Given ["a", "aa", "aaa", "aaaa"] +Return 0 +No such pair of words. +``` + +Credits:Special thanks to @dietpepsi for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0318.maximum-product-of-word-lengths/maximum-product-of-word-lengths.go b/Algorithms/0318.maximum-product-of-word-lengths/maximum-product-of-word-lengths.go new file mode 100755 index 000000000..a5e28ae1d --- /dev/null +++ b/Algorithms/0318.maximum-product-of-word-lengths/maximum-product-of-word-lengths.go @@ -0,0 +1,30 @@ +package Problem0318 + +func maxProduct(words []string) int { + size := len(words) + + masks := make([]int, size) + for i := 0; i < size; i++ { + for _, b := range words[i] { + // 利用 bite 位来描述 words[i] + masks[i] |= (1 << uint32(b-'a')) + } + } + + var max int + for i := 0; i < size-1; i++ { + for j := i + 1; j < size; j++ { + // 当 words[i] 和 words[j] 拥有相同的字母时 + // 这个字母所对应的位进行 & 运算后,为 1 + if masks[i]&masks[j] != 0 { + continue + } + temp := len(words[i]) * len(words[j]) + if max < temp { + max = temp + } + } + } + + return max +} diff --git a/Algorithms/0318.maximum-product-of-word-lengths/maximum-product-of-word-lengths_test.go b/Algorithms/0318.maximum-product-of-word-lengths/maximum-product-of-word-lengths_test.go new file mode 100755 index 000000000..b58c41c98 --- /dev/null +++ b/Algorithms/0318.maximum-product-of-word-lengths/maximum-product-of-word-lengths_test.go @@ -0,0 +1,37 @@ +package Problem0318 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + words []string + ans int +}{ + {[]string{"abcw", "baz", "foo", "bar", "xtfn", "abcdef"}, 16}, + {[]string{"a", "ab", "abc", "d", "cd", "bcd", "abcd"}, 4}, + {[]string{"a", "aa", "aaa", "aaaa"}, 0}, + + // 可以有多个 testcase +} + +func Test_maxProduct(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, maxProduct(tc.words), "输入:%v", tc) + } +} + +func Benchmark_maxProduct(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + maxProduct(tc.words) + } + } +} diff --git a/Algorithms/0319.bulb-switcher/README.md b/Algorithms/0319.bulb-switcher/README.md new file mode 100755 index 000000000..5cb12ce93 --- /dev/null +++ b/Algorithms/0319.bulb-switcher/README.md @@ -0,0 +1,28 @@ +# [319. Bulb Switcher](https://leetcode.com/problems/bulb-switcher/) + +## 题目 + +There are n bulbs that are initially off. You first turn on all the bulbs. Then, you turn off every second bulb. On the third round, you toggle every third bulb (turning on if it's off or turning off if it's on). For the ith round, you toggle every i bulb. For the nth round, you only toggle the last bulb. + +Find how many bulbs are on after n rounds. + +Example: + +```text +Given n = 3. + +At first, the three bulbs are [off, off, off]. +After first round, the three bulbs are [on, on, on]. +After second round, the three bulbs are [on, off, on]. +After third round, the three bulbs are [on, off, off]. +So you should return 1, because there is only one bulb is on. +``` + +## 解题思路 + +大概意思是,要在[1,n]里头找哪些灯泡被执行了奇数次操作 + +1. 对于一个非平方数来说(比如12),因为有成对的补数(1vs12; 2vs6),所以总是会按下2的倍数次 +1. 但是对于一个平方数来说(比如36),因为其中有个数(6)它的补数是自己,所以会按被下奇数次 + +然后这道题就变成了找[1,n]中间有几个平方数了 diff --git a/Algorithms/0319.bulb-switcher/bulb-switcher.go b/Algorithms/0319.bulb-switcher/bulb-switcher.go new file mode 100755 index 000000000..0a4654a6b --- /dev/null +++ b/Algorithms/0319.bulb-switcher/bulb-switcher.go @@ -0,0 +1,16 @@ +package Problem0319 + +func bulbSwitch(n int) int { + return intSqrt(n) +} + +// intSqrt 返回 x 的平方根的整数部分 +func intSqrt(x int) int { + root := x + + for root*root > x { + root = (root + x/root) / 2 + } + + return root +} diff --git a/Algorithms/0319.bulb-switcher/bulb-switcher_test.go b/Algorithms/0319.bulb-switcher/bulb-switcher_test.go new file mode 100755 index 000000000..70f37a392 --- /dev/null +++ b/Algorithms/0319.bulb-switcher/bulb-switcher_test.go @@ -0,0 +1,41 @@ +package Problem0319 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + n int + ans int +}{ + + {10, 3}, + {100, 10}, + {3, 1}, + {4, 2}, + {5, 2}, + {10000000, 3162}, + + // 可以有多个 testcase +} + +func Test_bulbSwitch(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, bulbSwitch(tc.n), "输入:%v", tc) + } +} + +func Benchmark_bulbSwitch(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + bulbSwitch(tc.n) + } + } +} diff --git a/Algorithms/0321.create-maximum-number/321.100.png b/Algorithms/0321.create-maximum-number/321.100.png new file mode 100644 index 000000000..05da1f434 Binary files /dev/null and b/Algorithms/0321.create-maximum-number/321.100.png differ diff --git a/Algorithms/0321.create-maximum-number/README.md b/Algorithms/0321.create-maximum-number/README.md new file mode 100755 index 000000000..efd7f3048 --- /dev/null +++ b/Algorithms/0321.create-maximum-number/README.md @@ -0,0 +1,42 @@ +# [321. Create Maximum Number](https://leetcode.com/problems/create-maximum-number/) + +## 题目 + +Given two arrays of length m and n with digits 0-9 representing two numbers. +Create the maximum number of length k <= m + n from digits of the two. The relative order of the digits +from the same array must be preserved. Return an array of the k digits. You should try to optimize your time and space complexity. + +Example 1: + +```text +nums1 = [3, 4, 6, 5] +nums2 = [9, 1, 2, 5, 8, 3] +k = 5 +return [9, 8, 6, 5, 3] +``` + +Example 2: + +```text +nums1 = [6, 7] +nums2 = [6, 0, 4] +k = 5 +return [6, 7, 6, 0, 4] +``` + +Example 3: + +```text +nums1 = [3, 9] +nums2 = [8, 9] +k = 3 +return [9, 8, 9] +``` + +dits:Special thanks to @dietpepsi for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 + +![100](321.100.png) \ No newline at end of file diff --git a/Algorithms/0321.create-maximum-number/create-maximum-number.go b/Algorithms/0321.create-maximum-number/create-maximum-number.go new file mode 100755 index 000000000..33804747d --- /dev/null +++ b/Algorithms/0321.create-maximum-number/create-maximum-number.go @@ -0,0 +1,92 @@ +package Problem0321 + +func maxNumber(nums1 []int, nums2 []int, k int) []int { + size1 := len(nums1) + size2 := len(nums2) + + res := make([]int, k) + var temp []int + + // for 循环作用是,每次 + // 从 nums1 中取 i 个数,得到temp1,在保证顺序的前提下,其值最大 + // 从 nums2 中取 k-i 个数,得到temp2,在保证顺序的前提下,其值最大 + // 把 temp1 和 temp2 混合成 temp,使其值最大。 + // 记录 最大的 temp 值,就是答案 + for i := 0; i <= size1 && i <= k; i++ { + if size2 < k-i { // nums2 不够长 + continue + } + + temp = combine(selecting(i, nums1), selecting(k-i, nums2)) + if isBigger(temp, res) { + copy(res, temp) + } + } + + return res +} + +// 从 nums 当中挑选 k 个数,其组成的 []int 最大 +// 不满足 0 <= k <= len(nums) 会 panic +func selecting(k int, nums []int) []int { + if k == len(nums) { + return nums + } + + res := make([]int, k) + // idx 是 res 上次获取的 nums 的值的索引号 + idx := -1 + for i := 0; i < k; i++ { + idx++ + // res[i] 是 nums[idx:len(nums)-k+i+1] 中的最大值 + res[i] = nums[idx] + for j := idx + 1; j <= len(nums)-k+i; j++ { + if res[i] < nums[j] { + res[i] = nums[j] + idx = j + } + } + } + + return res +} + +// 混合 nums1 和 nums2 使得其组成的 []int 最大 +func combine(nums1, nums2 []int) []int { + size1 := len(nums1) + size2 := len(nums2) + res := make([]int, 0, size1+size2) + + var i, j int + for i < size1 && j < size2 { + // nums1[i] > nums2[j]: 优先使用较大的值 + // isBigger(nums1[i:], nums2[j:]): 当 nums1[i] == nums2[j]时,优先使用后面的值较大的那组 + if nums1[i] > nums2[j] || isBigger(nums1[i:], nums2[j:]) { + res = append(res, nums1[i]) + i++ + } else { + res = append(res, nums2[j]) + j++ + } + } + + res = append(res, nums1[i:]...) + res = append(res, nums2[j:]...) + + return res +} + +func isBigger(a1, a2 []int) bool { + s1 := len(a1) + s2 := len(a2) + + for i := 0; i < s1 && i < s2; i++ { + if a1[i] > a2[i] { + return true + } else if a1[i] < a2[i] { + return false + } + } + + return false +} diff --git a/Algorithms/0321.create-maximum-number/create-maximum-number_test.go b/Algorithms/0321.create-maximum-number/create-maximum-number_test.go new file mode 100755 index 000000000..99179436a --- /dev/null +++ b/Algorithms/0321.create-maximum-number/create-maximum-number_test.go @@ -0,0 +1,103 @@ +package Problem0321 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums1 []int + nums2 []int + k int + ans []int +}{ + + { + []int{1, 6, 5, 4, 7, 3, 9, 5, 3, 7, 8, 4, 1, 1, 4}, + []int{4, 3, 1, 3, 5, 9}, + 21, + []int{4, 3, 1, 6, 5, 4, 7, 3, 9, 5, 3, 7, 8, 4, 1, 3, 5, 9, 1, 1, 4}, + }, + + { + []int{6, 7}, + []int{6, 0, 4}, + 5, + []int{6, 7, 6, 0, 4}, + }, + + { + []int{1, 1, 1}, + []int{9, 9, 9}, + 2, + []int{9, 9}, + }, + + { + []int{1, 1, 1}, + []int{1, 1, 1}, + 5, + []int{1, 1, 1, 1, 1}, + }, + + { + []int{2, 8, 0, 4, 5, 1, 4, 8, 9, 9, 0, 8, 2, 9}, + []int{5, 9, 6, 6, 4, 1, 0, 7}, + 22, + []int{5, 9, 6, 6, 4, 2, 8, 1, 0, 7, 0, 4, 5, 1, 4, 8, 9, 9, 0, 8, 2, 9}, + }, + + { + []int{3, 4, 6, 5}, + []int{9, 1, 2, 5, 8, 3}, + 5, + []int{9, 8, 6, 5, 3}, + }, + + { + []int{3, 9}, + []int{8, 9}, + 3, + []int{9, 8, 9}, + }, + + // 可以有多个 testcase +} + +func Test_maxNumber(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, maxNumber(tc.nums1, tc.nums2, tc.k), "输入:%v", tc) + } +} +func Test_outOf(t *testing.T) { + ast := assert.New(t) + + nums, k := []int{3, 8, 4, 6, 5, 8}, 3 + actual := selecting(k, nums) + expected := []int{8, 6, 8} + ast.Equal(expected, actual, "输入,%v, %d", nums, k) +} + +func Test_combine(t *testing.T) { + ast := assert.New(t) + + nums1 := []int{6, 7} + nums2 := []int{6, 0, 4} + actual := combine(nums1, nums2) + expected := []int{6, 7, 6, 0, 4} + ast.Equal(expected, actual, "输入,%v,%v", nums1, nums2) +} + +func Benchmark_maxNumber(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + maxNumber(tc.nums1, tc.nums2, tc.k) + } + } +} diff --git a/Algorithms/0322.coin-change/README.md b/Algorithms/0322.coin-change/README.md new file mode 100755 index 000000000..99f011fa2 --- /dev/null +++ b/Algorithms/0322.coin-change/README.md @@ -0,0 +1,27 @@ +# [322. Coin Change](https://leetcode.com/problems/coin-change/) + +## 题目 + +You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you need to make up that amount. If that amount of money cannot be made up by any combination of the coins, return -1. + +Example 1: + +```text +coins = [1, 2, 5], amount = 11 +return 3 (11 = 5 + 5 + 1) +``` + +Example 2: + +```text +coins = [2], amount = 3 +return -1. +``` + +Note: You may assume that you have an infinite number of each kind of coin. + +Credits: Special thanks to @jianchao.li.fighter for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0322.coin-change/coin-change.go b/Algorithms/0322.coin-change/coin-change.go new file mode 100755 index 000000000..cfd9d6c2a --- /dev/null +++ b/Algorithms/0322.coin-change/coin-change.go @@ -0,0 +1,56 @@ +package Problem0322 + +func coinChange(coins []int, amount int) int { + // dp[i] 更换金额为 i 时,最小的零钱数量 + // res = dp[amount] + dp := make([]int, amount+1) + dp[0] = 0 + + for i := 1; i <= amount; i++ { + dp[i] = amount + 1 + for _, c := range coins { + if c <= i && dp[i] > dp[i-c]+1 { + dp[i] = dp[i-c] + 1 + } + } + } + + if dp[amount] > amount { + return -1 + } + + return dp[amount] +} + +// func coinChange(coins []int, amount int) int { +// max := amount + 1 +// dp := make([]int, amount+1) +// for i := range dp { +// dp[i] = max +// } +// dp[0] = 0 + +// sort.Ints(coins) + +// for i := 1; i <= amount; i++ { +// for _, c := range coins { +// if i-c < 0 { +// break +// } +// dp[i] = min(dp[i], dp[i-c]+1) +// } +// } + +// if dp[amount] > amount { +// return -1 +// } + +// return dp[amount] +// } + +// func min(a, b int) int { +// if a < b { +// return a +// } +// return b +// } diff --git a/Algorithms/0322.coin-change/coin-change_test.go b/Algorithms/0322.coin-change/coin-change_test.go new file mode 100755 index 000000000..c29611d6a --- /dev/null +++ b/Algorithms/0322.coin-change/coin-change_test.go @@ -0,0 +1,42 @@ +package Problem0322 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + coins []int + amount int + ans int +}{ + + {[]int{1}, 1, 1}, + {[]int{1}, 0, 0}, + {[]int{1, 3, 5}, 8, 2}, + {[]int{1, 2}, 3, 2}, + {[]int{1, 2, 5}, 11, 3}, + {[]int{2}, 3, -1}, + + // 可以有多个 testcase +} + +func Test_coinChange(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, coinChange(tc.coins, tc.amount), "输入:%v", tc) + } +} + +func Benchmark_coinChange(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + coinChange(tc.coins, tc.amount) + } + } +} diff --git a/Algorithms/0324.wiggle-sort-ii/README.md b/Algorithms/0324.wiggle-sort-ii/README.md new file mode 100755 index 000000000..7e9e42468 --- /dev/null +++ b/Algorithms/0324.wiggle-sort-ii/README.md @@ -0,0 +1,22 @@ +# [324. Wiggle Sort II](https://leetcode.com/problems/wiggle-sort-ii/) + +## 题目 + +Given an unsorted array nums, reorder it such that nums[0] < nums[1] > nums[2] < nums[3].... + +Example: + +1. Given nums = [1, 5, 1, 1, 6, 4], one possible answer is [1, 4, 1, 5, 1, 6]. +1. Given nums = [1, 3, 2, 2, 3, 1], one possible answer is [2, 3, 1, 3, 1, 2]. + +Note: +You may assume all input has valid answer. + +Follow Up: +Can you do it in O(n) time and/or in-place with O(1) extra space? + +Credits:Special thanks to @dietpepsi for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0324.wiggle-sort-ii/wiggle-sort-ii.go b/Algorithms/0324.wiggle-sort-ii/wiggle-sort-ii.go new file mode 100755 index 000000000..c48bcf0f3 --- /dev/null +++ b/Algorithms/0324.wiggle-sort-ii/wiggle-sort-ii.go @@ -0,0 +1,22 @@ +package Problem0324 + +import "sort" + +func wiggleSort(nums []int) { + n := len(nums) + temp := make([]int, n) + copy(temp, nums) + sort.Ints(temp) + + mid := n / 2 + + for i := 0; i < n; i++ { + if i < mid { + // 把较大的数,按照降序插入 nums 的奇数位 + nums[2*i+1] = temp[n-1-i] + } else { + // 把较小的数,按照降序插入 nums 的偶数位 + nums[2*(i-mid)] = temp[n-1-i] + } + } +} diff --git a/Algorithms/0324.wiggle-sort-ii/wiggle-sort-ii_test.go b/Algorithms/0324.wiggle-sort-ii/wiggle-sort-ii_test.go new file mode 100755 index 000000000..264fba218 --- /dev/null +++ b/Algorithms/0324.wiggle-sort-ii/wiggle-sort-ii_test.go @@ -0,0 +1,49 @@ +package Problem0324 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int +}{ + + {[]int{1, 5, 1, 1, 6, 4}}, + {[]int{1, 3, 2, 2, 3, 1}}, + + // 可以有多个 testcase +} + +func check(nums []int) bool { + for i := 0; i < len(nums); i += 2 { + if 0 <= i-1 && nums[i-1] <= nums[i] { + return false + } + if i+1 < len(nums) && nums[i] >= nums[i+1] { + return false + } + } + return true +} + +func Test_wiggleSort(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + wiggleSort(tc.nums) + ast.True(check(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_wiggleSort(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + wiggleSort(tc.nums) + } + } +} diff --git a/Algorithms/0326.power-of-three/README.md b/Algorithms/0326.power-of-three/README.md new file mode 100755 index 000000000..d7faad019 --- /dev/null +++ b/Algorithms/0326.power-of-three/README.md @@ -0,0 +1,16 @@ +# [326. Power of Three](https://leetcode.com/problems/power-of-three/) + +## 题目 + +Given an integer, write a function to determine if it is a power of three. + + + Follow up: + Could you do it without using any loop / recursion? + + +Credits:Special thanks to @dietpepsi for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0326.power-of-three/power-of-three.go b/Algorithms/0326.power-of-three/power-of-three.go new file mode 100755 index 000000000..717163f9c --- /dev/null +++ b/Algorithms/0326.power-of-three/power-of-three.go @@ -0,0 +1,13 @@ +package Problem0326 + +func isPowerOfThree(n int) bool { + if n < 1 { + return false + } + + for n%3 == 0 { + n /= 3 + } + + return n == 1 +} diff --git a/Algorithms/0326.power-of-three/power-of-three_test.go b/Algorithms/0326.power-of-three/power-of-three_test.go new file mode 100755 index 000000000..028589465 --- /dev/null +++ b/Algorithms/0326.power-of-three/power-of-three_test.go @@ -0,0 +1,41 @@ +package Problem0326 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + n int + ans bool +}{ + + {-1, false}, + {8, false}, + {2, false}, + {3, true}, + {81, true}, + {243, true}, + + // 可以有多个 testcase +} + +func Test_isPowerOfThree(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, isPowerOfThree(tc.n), "输入:%v", tc) + } +} + +func Benchmark_isPowerOfThree(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + isPowerOfThree(tc.n) + } + } +} diff --git a/Algorithms/0327.count-of-range-sum/README.md b/Algorithms/0327.count-of-range-sum/README.md new file mode 100755 index 000000000..1ccba0da5 --- /dev/null +++ b/Algorithms/0327.count-of-range-sum/README.md @@ -0,0 +1,24 @@ +# [327. Count of Range Sum](https://leetcode.com/problems/count-of-range-sum/) + +## 题目 + +Given an integer array `nums`, return the number of range sums that lie in `[lower, upper]` inclusive. + +Range sum `S(i, j)` is defined as the sum of the elements in `nums` between indices `i` and `j` (`i` ≤ `j`), inclusive. + +Note: +A naive algorithm of O(n2) is trivial. You MUST do better than that. + +Example: + +```text +Given nums = [-2, 5, -1], lower = -2, upper = 2, +Return 3. +The three ranges are : [0, 0], [2, 2], [0, 2] and their respective sums are: -2, -1, 2. +``` + +Credits:Special thanks to @dietpepsi for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0327.count-of-range-sum/count-of-range-sum.go b/Algorithms/0327.count-of-range-sum/count-of-range-sum.go new file mode 100755 index 000000000..55d82ece3 --- /dev/null +++ b/Algorithms/0327.count-of-range-sum/count-of-range-sum.go @@ -0,0 +1,98 @@ +package Problem0327 + +var lo, up int +var tmp []int + +func countRangeSum(nums []int, lower int, upper int) int { + size := len(nums) + if size == 0 { + return 0 + } + + // sum[i] == sum(nums[:i]) + // sum[j] - sum[i] == sum(nums[i:j]) + sum := make([]int, size+1) + for i, n := range nums { + sum[i+1] = sum[i] + n + } + + lo = lower + up = upper + tmp = make([]int, len(sum)) + + return mergeSort(sum) +} + +// 对前 i 项的和,进行归并排序 +// 归并 left 和 right 的同时,检查符合条件的子数组 +func mergeSort(nums []int) int { + size := len(nums) + if size == 1 { + return 0 + } + + mid := size / 2 + // left 中任意一个值,所代表的 sum(nums[:i]) + // right 中任意一个值,所代表的 sum(nums[:j]) + // 可以得知, i < j, 这一点很重要, + // 正因为如此,对于任意一个 right[j]-left[i] 都是某个子数组的 sum,统计才有意义 + left := nums[:mid] + right := nums[mid:] + + // 分而治之 + count := mergeSort(left) + mergeSort(right) + + // 用于归并 + i := 0 + j := 0 + + // 用于 count + cl := 0 + cr := 0 + + for i < len(left) && j < len(right) { + if left[i] < right[j] { + tmp[i+j] = left[i] + + for cl < len(right) && right[cl]-left[i] < lo { + cl++ + } + for cr < len(right) && right[cr]-left[i] <= up { + cr++ + } + // 对于 left[i] 所代表的 sum(nums[:x]) 来说 + // 此时 right 中存在有 cr - cl 个 right[cy] 所代表的 sum(nums[:y]) + // 能够保证 lower <= sum(nums[x:y]) <= upper + // + // 上段注释中,在 nums 中用到了新的索引号 x , y ,而不是 left 和 right中用到的 i 和 cy + // 是因为 left 和 right 经过排序后,位置已经打乱,两者的索引号对应关系也被打乱了 + // 但是,我们知道 x < y 一定成立,就可以了 + count += cr - cl + i++ + } else { + tmp[i+j] = right[j] + j++ + } + } + + if i == len(left) { + copy(tmp[i+j:], right[j:]) + } else { + copy(tmp[i+j:], left[i:]) + // left 中的元素没有检查完,继续检查 + for i < len(left) { + for cl < len(right) && right[cl]-left[i] < lo { + cl++ + } + for cr < len(right) && right[cr]-left[i] <= up { + cr++ + } + count += cr - cl + i++ + } + } + + copy(nums, tmp) + + return count +} diff --git a/Algorithms/0327.count-of-range-sum/count-of-range-sum_test.go b/Algorithms/0327.count-of-range-sum/count-of-range-sum_test.go new file mode 100755 index 000000000..dfb3dd9f2 --- /dev/null +++ b/Algorithms/0327.count-of-range-sum/count-of-range-sum_test.go @@ -0,0 +1,39 @@ +package Problem0327 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + lower int + upper int + ans int +}{ + + {[]int{13, 6, 13, 4, 27, -14, -13, 15, -4, 13, -15, 21, -23, 19, 3, -14, -27, -17, -4, 15, 1, -27, -17, -12, -26, 12, 11, -24, 9, -18, 18, 26, -5, -25, -29, -26, 17, -24, -22, 27, -2, 16, -7, -17, 15, -10, -24, -14, -19, -22, -1, -9, -30, -11, 20, -14, -5, 4, 20, 7, -2, 20, 26, 16, -13, -10, 3, -29, 13, 26, 14, -2, -13, 18, 28, 9, -11, 17, -28, -4, -23, -23, -7, -22, 11, 2, -24, -4, -11, 9, -23, 29, 9, -10, -17, -16, -11, 2, -28, 3, 12, -8, -16, -16, -25, 27, 21, -17, -5, 17, -17, -30, 2, -13, -14, -2, -15, -26, -12, 9, 12, -26, 19, 21, 10, -10, 9, -15, 5, -1, -14, 19, -18, -30, 15, -9, -19, -11, -20, 14, -9, 18, -19, -9, -18, 29, 14, -29, 11, -9, -7, -21, 12, -17, -11, -23, -8, 1, -1, -5, -22, -26, -18, 27, 6, -24, -27, 21, -25, -22, 17, 18, 28, 20, -7, 19, 6, -11, 14, 10, 6, -22, -4, 13, 5, 5, 3, -10, 0, -6, -29, 2, -22, 10, -26, 3, -23, 29, 28, 4, 0, -26, 13, -1, 4, -13, 25, 23, 27, -30, 5, -21, 26, -12, 4, 4, 23, 4, -27, 15, 5, 15, 11, -1, 0, -28, 8, -26, -22, 27, -3, 6, -19, -28, 27, 8, -13, -30, 3, 25, -9, 2, -5, 26, -2, 7, 11, -22, 26, -6, 8, 22, 24, 7, 8, 8, 28, -22, -12, 5, -2, 1, -8, -30, -20, 4, -17, 22, -6, -25, -4, 27, 20, 25, 8, 14, -26, 20, 3, 1, 18, -27, 3, 4, -20, 9, -30, 3, -26, -21, 0, -24, -20, -18, -28, -28, -18, -25, -14, -3, -15, 25, 3, -16, -24, -13, 13, -12, 27, -26, 9, 15, 23, 17, -14, -20, -2, 15, 0, 3, 6, 9, 26, 18, -11, 27, 19, 16, 3, 9, 7, -12, 15, 7, 26, 28, 1, -3, -19, 27, -27, -29, 8, 22, 9, -15, -3, -17, 25, 15, -16, 20, -28, 28, 22, 28, 16, -27, -21, -17, -17, 24, -10, -16, -27, -18, -25, -13, 25, 11, 28, -7, 7, 6, 23, -27, -19, 13, 25, -23, -14, -21, 4, -10, 0, -24, 26, 5, -6, 6, -27, 23, -30, 10, 19, -12, 10, 15, -5, -15, -2, 7, -1, -17, -14, 10, 29, -24, -7, 2, 21, -19, -8, -27, -3, 22, -5, -6, 8, 26, 10, -17, 12, -6, 9, 3, 7, -26, -26, 4, 6, 2, 23, 7, 13, -20, -19, 5, 3, 0, -10, -21, 25, -20, -20, -22, 6, -18, 19, 22, -13, -21, 17, 4, -22, 19, 6, 5, 25, -17, 6, 18, 19, 11, 23, 3, 6, 22, 24, -15, -27, -5, -12, -27, 14, -22, 26, -26, -11, -20, -7, 18, 19, 23, -25, 17, -27, 22, 22, -13, -23, -6, -18, 25, 7, -13, -24, -6, -1, 18, 13, -12, 3, 11, -20, 10, -13, 18, 25, -7, -8, -17, 17, -3, 5, 16, 23, 17, -18, 27, 26, -10, 20, 5, -11, 5, -29, 18, 29, 12, 2, -21, -11, -4, 12, -5, 24, 5, -20, 25, 9, 3, -8, 2, 19, 20, 24, -1, -3, -2, -27, 19, 24, 28, 13, 17, 16, 13, -12, -8, 5, -14, 21, -2, -25, 6, 9, -13, 1, -12, 26, -13, 15, -21, 13, 4, 16, 5, -24, 15, -14, 15, 14, -28, 21, 1, -8, 21, -25, -5, -23, -15, -18, -25, -24, 7, 25, -18, -22, 15, 4, -25, -17, -9, -1, 15, 6, 26, 22, 15, 17, -22, -2, 15, -28, -16, -14, -20, 17, -18, -4, 6, 17, -19, 7, 0, -3, -26, 15, 12, -5, -25, -21, 26, 17, 14, -28, 13, 13, 29, 2, 7, -12, 1, 28, -1, -20, -30, -15, 5, 25, -20, -18, -15, -25, -23, 24, 16, -2, -26, -22, 16, -20, -5, -20, 18, -28, -24, 7, -17, -12, -22, 17, 29, -8, 11, 25, -4, -26, -18, 20, -23, -29, 27, 27, 17, 20, 7, -11, -9, -26, -5, 5, -6, -16, -4, 13, 11, -6, -20, 19, -9, 8, 12, -15, 3, 25, -23, 0, -24, 6, -24, -23, -1, -5, 22, -29, 7, -20, -7, 18, -18, -18, 15, 17, -7, -12, 29, -12, -28, -11, -25, 28, 19, -16, -25, 23, -25, 8, -13, -18, -28, -17, -15, 6, -5, -27, 18, 15, -11, -30, 6, 23, 8, -4, 4, -14, -29, 12, 18, 11, 1, 12, 4, 24, 5, -14, -29, -4, -11, 4, 16, -30, -16, 23, -21, -19, 6, 26, 22, 19, -8, 27, -14, -8, -6, -30, -26, 27, -26, -28, -25, 8, 10, -4, -15, 0, 22, -20, -20, 10, -17, -11, 13, 9, 8, 24, -16, -16, -8, 25, 3, 22, -8, 24, -6, 9, -29, 20, -9, 24, -8, 23, -8, 22, -4, 15, 0, 19, 10, 27, 26, 23, 20, 15, 18, -22, 4, -18, -18, -30, 7, -21, 5, -12, 25, -9, -4, -30, -4, 20, -19, 22, 3, 18, 17, 8, -13, -17, 9, 7, 25, 11, -10, -27, -3, -17, 10, -30, -24, -29, -21, -2, -3, 2, -25, 26, -9, -12, 18, -17, 15, 20, 9, 21, -24, 5, 7, -28, 18, 8, -11, 16, -26, 3, 3, 6, -16, -12, 18, 4, -17, -19, 10, 22, -6, 20, 6, 28, 2, -15, 7, -20, 11, 3, -22, -20, -25, 28, 5, -11, -23, 20, 16, 23, -5, 5, 8, -23, 25, 6, 26, -7, -13, -2, -8, 29, 17, 20, -14, -15, 17, -20, -14, -27, 21, 29, -11, -20, 8, 19, -18, -1, 29, 5, 14, 23, 15, 7, 11, -15, 15, 10, 9, 16, 26, -8, -29, 7, 6, -9, -30, -6, 18, -2, -10, 18, -29, -1, -23, 24, 23, -15, -4, -3, -19, 22, 18, -27, -11, 14, 8, 4, -6, 10, -12, -10, 21, 7, -15, -21, 2, 12, 3, -30, -9, -25, 8, 19, 5, 12, -12, -15, -12, -9, 19, -7, 17, 0, 5, 17, -1, 22, 13, -27, 15, -28, -29, 23, -19, 13, -8, 23, 12, -13, -15, -18, -26, -22, -3, -7, 2, -4, 24, 2, 11, 21, -27, 26, 14, 13, 14, -30, 19, -22, -29, -1, -27, -4, 25, -14, -12, 4, -6, -18, -11, -8, -5, 29, 9, -11, 22, -10, 10, -8, 5, 12, -21, 27, -1, 28, -21, 15, 26, -16, 10, -17, 7, -24, 0, -20, -13, 3, 15, -19, -18, -8, -12, 20, 10, -8, 25, 26, -11, 23, 14, -1, -7, -22, -22, -16, -2, 19, -27, 5, 17, 28, 20, 17, -12, -13, -7, 22, 17, -8, -2, 28, 5, 29, -27, -15, -2, 26, -30, -6, -4, 16, 25, 5, -19, 1, -14, -6, 29, -13, 27, 20, 7, 10, 21, 12, 10, -12, -21, -10, -2, -18, -11, -15, 1, -11, 21, 6, 26, 20, -24, 29, 6, 26, -5, -18, -12, -16, -11, 11, -24, 4, 13, 15, -9, -3, 17, -16, 5, -17, -25, -30, -21, 15, -16, 27, -5, -4, -25, 28, 7, 17, 27, -18, -20, -9, 13, 3, -12, -16, -23, 19, -9, 10, 0, -22, -23, 10, -20, -4, 25, 28, -8, -20, 7, -1, -26, -12, 8, -22, 24, 21, -15, -26, -5, 10, 24, -27, -5, -1, -30, 29, 23, 28, -10, -27, -16, 13, -1, 12, -10, 13, 14, -30, -5, -25, 19, -19, 13, 26, 27, 3, 3, 28, 3, -9, 8, 6, 23, -2, -9, -26, 22, -2, 19, 12, -19, -15, 15, 9, -29, -24, 27, -1, -15, -17, 11, 11, -1, 14, -29, -19, 24, -29, -4, -15, -26, -21, 9, -1, -22, -17, -9, -28, -1, -29, 9, 25, 13, 14, -29, -23, -22, 1, -14, 26, -27, -14, 12, 13, 11, 1, 14, -1, 11, -14, -16, -3, 5, 2, -8, -12, 0, 17, -5, -6, -6, 25, -19, 21, 25, 12, 4, 21, -9, 8, -11, -30, 26, 19, 15, 20, 18, -13, 0, -30, 8, -16, -2, -17, 2, 17, -21, -25, 5, 26, 26, 23, -6, -28, 11, -16, 1, -5, 13, -14, 7, 0, -10, -30, -16, -29, -25, 12, -15, -9, -2, 15, 4, -18, 27, 19, -26, 4, -17, 18, -15, -24, 24, -17, -16, 19, -30, -20, 13, 20, 18, -14, -26, -22, 10, 23, 27, -28, 5, -6, -21, 26, -3, 10, 1, 26, -18, 9, 16, -6, 13, -29, 8, 6, -30, -1, 20, -30, 0, 23, 1, -23, 20, -25, -29, 29, 29, 21, -13, -5, 3, -16, -18, 24, 7, 27, -27, -11, -21, 14, 10, 0, 15, 26, -9, 23, -13, -6, 22, -9, -9, -6, -7, -25, 6, -7, 19, 22, -24, 28, 29, 4, 16, 28, 23, 0, -3, 21, -1, 3, -25, -19, -19, 17, -22, 9, 28, -11, 28, -4, -3, -25, 21, -23, -30, 10, 25, -18, 10, 17, -15, 27, 19, 3, 18, -30, 29, 6, -26, 10, 27, 21, 1, -26, -20, -10, -6, 26, -3, -13, 0, -2, 22, 4, -28, -8, -26, -29, 8, -12, -13, 29, 4, 3, 3, -12, -7, 28, 26, -29, 28, -20, -15, -19, 26, 26, -27, 14, -5, -6, 21, -28, 15, -30, -20, -26, -7, -26, 27, 24, -9, -10, -21, 26, -5, -16, 0, 23, -3, -20, -5, 15, -10, -4, -2, 16, 17, -17, -3, -22, -27, 25, 28, -26, -6, -14, -8, -19, -24, -8, 12, -26, -13, -7, 10, 29, -7, -10, -30, 13, 15, 21, -1, 5, 7, 1, 8, 7, -2, -13, 15, -19, 15, 23, 10, 20, 28, 22, -2, -1, 25, -22, 9, -22, 3, -8, -5, 10, 18, -7, 2, 4, -1, -4, -17, 29, 29, 29, -27, -16, -18, -14, -3, -12, 19, -9, -1, -2, -14, 16, -15, 7, -4, 24, -5, -14, -29, -21, -21, 12, 17, 20, -10, -3, -16, 19, 7, -28, -22, -30, -28, -3, -23, 11, 8, 14, 11, 19, 24, -12, -25, 10, 2, -13, 9, 10, -12, -8, 20, -14, 14, 8, 24, -28, 0, 1, 14, -28, 2, -6, 4, -19, -19, -28, 21, -3, 15, -28, 25, -27, 8, 25, -29, -17, 9, -21, -20, -21, 6, -22, -6, -30, -13, -27, 25, 21, 26, 6, -19, -1, 29, -30, -23, 29, 12, -5, -8, -25, 19, 18, -1, 25, -9, 3, 15, 0, -2, 28, -19, -24, -17, 26, -12, 17, 23, 7, 21, -25, 2, 6, 10, 18, -4, 21, -14, -8, -27, 24, 26, -2, 20, -29, -14, 13, 16, 21, -26, -9, -20, 9, -5, -7, 13, -26, 2, -30, 13, -12, 12, -27, 27, -9, -19, 7, -9, -2, -5, -16, 29, 25, 26, 0, 6, 27, -22, -1, -22, -1, 13, -10, 15, -29, 24, 14, 27, -28, -16, 10, 3, 9, -22, -8, -22, -25, -7, -3, 5, 26, -28, 14, 15, 28, 4, 4, 20, -5, -13, 20, -30, 5, -25, -23, -11, -14, -14, 14, 21, 3, -25, -21, 19, -19, 11, -28, 9, -4, -30, -3, -18, -8, -15, -6, -10, -17, -23, -2, 22, -1, -11, 28, 9, 3, -20, -6, 8, 5, 14, 26, 24, -22, -17, -24, -15, -10, 19, 13, -10, -8, 21, -7, 12, -19, 25, 16, 4, -7, 28, 23, -30, -2, 4, 27, 8, 13, -23, 3, 24, -15, -20, 10, 2, 11, 7, 21, -2, 20, -30, 19, 11, 5, 5, -29, 21, 28, -18, 19, -28, 29, 9, -18, -26, -12, 12, -15, -6, -13, 29, 23, 7, -23, -19, -30, -11, -11, -25, 19, -26, -28, -28, 25, -2, 29, 6, 3, -19, -18, 27, 20, 23, 25, -27, 27, -30, -25, 28, 13, -25, -30, 1, -14, -9, -15, 27, 2, 28, 28, -20, 8, 1, -19, -8, -4, 6, 10, -11, 27, -18, -9, 27, 7, -1, -12, -16, 3, -28, -8, -22, 20, -5, -16, 16, 17, 20, -29, 22, -3, -1, -5, -11, 18, 2, -12, 8, 4, 15, -14, 5, 25, 17, -18, -17, -12, -10, 18, -7, 8, -30, -22, -28, -10, -30, 14, -5, -9, 16, -24, -16, 0, 2, 4, -14, 9, -2, 1, -6, -7, 10, -20, -1, 0, 25, 27, -24, 3, -10, 27, -8, 12, 8, 6, 16, -14, -24, 4, 5, 12, -7, -9, 8, 3, 9, 10, -8, 24, 12, -13, 8, 10, -23, 4, 10, 16, 20, 7, 8, -29, -11, -29, 21, 23, 20, 23, 12, -26, -14, 10, -2, 21, -29, 5, 18, 10, -27, -11, -22, -25, 1, 14, -12, 1, -26, -11, -13, -2, 7, 10, -24, -15, -26, 1, 13, 23, 8, -26, 29, 8, -13, -11, -21, 5, -25, 13, -7, 20, 28, 5, 25, 22, -23, 7, -21, 4, -8, 9, -24, 13, 22, 19, 24, -27, 2, 23, 28, -22, 0, 14, 3, -27, -1, -17, 27, 12, -19, 13, 3, 23, 0, -26, 28, -15, 0, 2, -11, 4, -26, 3, 8, -15, -12, 2, -12, -25, 15, 4, 4, 11, -18, 9, 6, 5, 26, -11, -22, 6, 17, -23, -14, -7, -24, -28, -25, -3, -15, 18, 10, -20, 15, -17, -16, 11, 22, 13, 4, 6, -10, -12, 28, 15, 0, 19, -30, -5, 8, 16, -23, 4, -18, 10, -1, -25, -8, -21, -13, 5, -19, -8, -6, 6, 0, 13, 7, 17, 12, -3, -17, -21, 16, -17, -3, 13, 10, -27, -1, -16, 9, 18, -1, 5, -19, 11, 14, -12, -3, -1, -16, 22, -9, 19, -11, 28, -14, -19, 2, 22, 9, 9, 23, 22, 0, 1, 21, 5, -3, 10, -3, -8, -6, 13, 25, -19, 26, 9, -29, -26, 13, -28, 20, -2, 20, 12, 6, 3, 22, -13, -29, -5, -22, -2, -14, -17, -2, 7, 24, 27, 17, -21, 7, -21, 9, 19, 26, -28, 8, -20, -26, -9, 22, -2, 1, -9, -28, 26, 15, -13, -29, -25, -11, -23, 2, 15, 6, -14, -18, -9, -4, -17, -30, -12, 7, -19, -8, 14, -29, -17, 0, -5, -29, 4, 14, 25, -29, 4, -6, 18, 10, 7, 0, -19, 21, 29, 2, 21, 17, -26, 16, 22, -24, 18, 19, -4, 19, 29, -6, 0, 23, -23, 17, 18, -30, 4, 23, 17, 17, 14, -5, -9, -19, 4, 23, 9, -14, 23, 18, 19, 4, 20, 17, 24, 13, 11, -3, -16, 29, 9, 11, 23, 26, -18, 24, 7, 19, 13, -20, 14, 11, -4, 19, 6, 22, -2, 8, -5, -15, 29, 14, 23, -8, 16, -21, 29, 5, 15, 16, 3, 15, -25, 27, -23, -11, 15, 17, -29, -27, 13, 13, -11, 6, 18, 9, -2, 26, -11, -15, 11, 5, 17, -3, 25, 11, 6, -20, -19, 8, -7, -9, -27, 22, -21, -25, -28, -5, -17, -24, -28, 26, -3, 11, -28, 21, -16, -18, 4, -15, 29, 7, 5, -26, 22, -12, 14, 14, 21, -25, 29, -27, -4, -29, 24, 10, 27, 29, -5, 21, -22, -4, -6, -28, 1, -24, -4, 25, 11, -26, 16, -13, -11, 19, -15, 17, -4, 10, -11, 16, -18, -8, -21, -8, -13, -9, 5, -5, -7, -29, -7, 22, -23, -26, 12, 13, 17, -18, 14, 1, 25, 28, 17, 20, 15, -12, 11, 5, -28, -28, 3, 11, 17, 23, -20, 1, 23, -4, 23, 13, -26, 0, -12, 22, 18, -19, -1, -29, -12, -4, -8, 9, -27, -11, -9, 4, -11, 2, -8, -17, -27, -10, 0, 18, -14, 21, -11, -18, 22, -18, -13, 12, -22, 28, 27, -30, 23, -22, -2, -17, -16, -2, -21, 2, -4, 9, 23, -13, -25, -7, 6, -22, 7, -29, -21, 28, 1, -4, -12, -12, -25, -11, -8, 19, -27, -5, -14, -15, -24, 1, -30, 29, 3, 24, 8, -25, -8, 7, 5, 4, -13, 1, 2, -30, -6, 9, 17, -13, -11, -26, 11, -15, -5, -4, 12, -28, -10, -6, -16, 8, 23, 5, 27, 29, 5, 6, -23, 8, 16, 16, 0, -23, 11, 27, 25, 4, 15, 17, -19, -27, -17, -18, 24, 8, 16, 11, 3, -27, -5, -29, -21, 2, -22, -13, -17, 19, -20, 24, -28, -30, 0, 0, 9, -16, 12, -11, 9, 7, -7, 10, -21, -28, -13, 20, -7, 22, -4, -24, 14, 12, -2, 0, -10, -21, 12, -1, 13, 10, -14, -17, 3, -19, 13, -10, 3, -13, 10, 13, 7, -8, -12, -30, 12, -18, -11, 24, -12, -6, -2, -19, -16, 19, 3, -12, -19, 20, 6, -28, 27, 28, 12, -30, 0, 28, -30, -21, -17, -8, 25, 10, 16, -10, -11, 10, -24, 4, 13, -30, 3, -28, 23, -5, -18, -25, 12, -1, 16, 12, -14, 3, 29, 8, -30, 21, 5, -29, -21, -25, -28, -8, 20, 12, -22, -27, 11, -11, 14, 22, 2, 7, -16, 21, -2, -23, 20, -28, 3, 29, -5, -20, -22, 20, -16, -7, 24, -16, 20, 18, 0, -15, -29, -17, 5, -21, 7, -30, 22, 28, -29, 28, 21, 10, -19, -7, 27, 4, 1, -2, 5, -26, -14, 15, 26, -13, 20, -20, -23, -5, 0, 18, 2, 2, 19, 29, 22, -20, -27, 20, -14, -13, -5, -10, 26, -10, -7, -22, -6, -12, 29, 9, -14, -1, -7, 25, 8, -25, 12, -14, -1, 22, 24, -29, -16, -3, 9, 26, 28, 29, -10, 24, -28, 9, 16, -29, -16, 13, 7, 6, 0, -12, -3, -27, -30, 18, 4, -13, -14, -12, 20, 1, 12, -10, -6, -4, -22, 11, -24, -26, 22, -4, 4, 21, -17, 27, 5, 5, 5, 14, -23, -7, 24, -19, 17, -6, 0, 17, 15, -28, 7, 28, -30, -30, 24, 10, 1, -3, 1, 20, 5, 12, 26, 12, -3, 19, 7, 1, -24, -5, 7, -2, 10, -26, -26, 7, 16, 4, 2, 27, -2, 17, -9, 13, -5, -15, -23, 5, -8, 15, 24, -12, -5, 2, -6, -23, -24, -25, 29, 22, -15, -16, -21, 3, 5, -7, 10, -3, -13, -26, -10, 24, 9, 9, -17, -5, 5, -26, 13, -15, 5, -3, -5, 10, 3, 23, 3, -21, 4, 25, 19, -25, -15, -15, -15, 3, 8, -5, 25, -4, -23, 10, 29, 24, 1, 24, 6, -17, 4, 17, 5, -14, -13, -1, -30, -5, 21, -2, -28, 10, -9, 7, -25, 15, 12, 3, 0, 16, 22, 19, 2, -4, -21, -22, -2, -12, 28, 15, 12, -27, 27, -11, 29, -10, 22, 26, -26, -30, 16, 0, 7, -5, 4, 7, -19, -24, -3, -8, -10, 0, -25, -26, -19, 20, 20, 11, 3, -18, 23, -6, -2, -7, 11, -20, -15, 6, 26, 5, -14, -11, -8, 17, -30, 4, -13, -3, -4, -20, -4, 13, -3, -22, 23, 11, 27, 17, 17, -19, -30, -8, 10, -5, 3, -6, -28, -7, -15, -17, -17, -27, 22, 29, -6, 14, 6, 23, -13, 24, 3, -21, -6, 14, -7, 19, 14, -18, -17, 7, -11, 1, -24, -7, -10, 0, 11, 13, -20, -17, 4, -16, -7, 1, 15, -11, -18, -23, -13, 3, -10, 0, 5, 15, -25, 7, 4, 13, -16, -12, 21, -7, -7, -16, -4, -7, 29, -3, 26, -14, -14, -1, 23, 25, 4, -3, 27, 3, 7, 15, 21, -8, -17, -30, 15, 29, -6, -25, 13, 17, 17, 8, -10, -20, -23, -27, 4, -8, 0, 25, -7, 4, 4, 18, -26, 22, 0, 10, 0, 8, -26, -1, -5, 15, 14, -23, 7, 12, -16, 16, 3, 20, -27, -5, 16, 0, -28, -13, 26, -10, 24, 20, -5, -12, 14, 26, 0, 19, 9, -28, -26, 3, 10, 3, -18, 18, -29, -7, 24, -26, 16, -15, 19, 9, 4, -12, -27, 12, 14, -6, -5, 12, 27, 15, 16, 29, -27, -4, -21, 12, 15, 21, -13, -19, 12, -30, 14, -9, 2, -13, -14, 8, 7, 9, -15, 0, 26, 11, -23, -7, -16, 26, 7, -8, 19, 17, -4, -11, 1, 20, 13, 10, -10, -9, -19, -26, 27, 3, -5, -12, 11, -5, 18, -2, 4, 18, 12, -19, 7, -15, -10, 7, 26, -10, -10, -24, 14, 11, -12, -15, -19, -30, -29, 12, -6, 2, -16, -19, 0, -16, 16, -21, -14, 23, -1, -5, -4, 22, 22, 24, 19, 5, 2, 29, -13, 19, 3, -29, 14, 12, 27, 24, 21, 9, 25, -26, -9, 13, 22, -5, -6, 15, -17, 3, 27, -18, 29, -8, -10, -22, -7, -14, -6, 0, 24, 24, 3, -22, -1, -15, 21, 0, 25, 4, -18, -9, 10, -16, 17, -16, 21, 12, -30, -22, 6, -8, -18, -27, -27, 28, -9, -2, -30, 21, 5, 1, 5, 11, -25, 9, -6, -17, 17, 8, -29, 10, 0, -25, 19, -30, -3, -12, -4, 27, -29, -1, 22, 23, -21, 10, 29, 28, 2, -6, 12, -9, 22, -12, -5, -17, -25, -11, 28, 3, -15, -21, 20, 13, -10, -12, 1, 28, 25, -16, -5, -7, -22, 15, 26, -14, -10, -24, 27, -24, -24, 14, -11, 7, -6, -10, 8, 4, -2, -26, -7, 7, 20, -7, -12, 11, -7, 0, 1, 19, -2, -15, 19, -10, 23, 10, -4, 3, 7, 0, 23, -20, -7, -14, 3, 9, -6, -2, 28, 26, 29, 8, 4, 25, 4, 23, -24, 17, 0, -15, -6, 29, 25, -6, 19, -15, -11, -20, -6, 13, -9, 17, 7, -9, 4, 18, -25, 25, -20, -3, 5, 0, 3, 7, -14, 23, 0, 9, -26, -30, 28, 24, -10, 0, -28, -21, -13, 23, -28, -3, -19, -12, -20, -24, 9, 21, 21, -26, 29, 12, 21, -18, -19, 7, 1, -1, -21, 4, -12, 22, 24, 20, 12, 9, 7, 11, -16, -27, 11, -16, -7, 12, -19, -16, -29, 28, 24, -4, 9, 21, 8, -16, -2, 18, -9, -22, -2, 24, -1, 17, 15, -18, 26, -16, -27, 24, -9, 26, 18, 3, -12, -21, -20, -13, 25, -3, 16, -3, -7, 18, -4, 25, -22, -9, 25, -21, -9, -18, -13, 1, 17, 20, 19, 25, -22, 9, -10, 1, 2, 13, -12, 1, -3, -3, 16, 28, 15, 0, -4, -12, -30, 8, 1, -24, 5, 28, 24, -20, -2, 3, -1, 0, -22, 14, 27, 8, 2, -12, -28, 12, -18, 17, 0, 16, -14, -10, 22, -19, 1, -13, -7, -12, 25, 13, 21, -13, -6, -5, -19, 18, -13, -28, -1, -13, 22, 20, 7, -9, -15, -11, -17, -27, 5, 21, 28, 20, 12, 25, 25, 4, -12, 28, 17, -14, -2, -6, -25, 15, 29, 8, -10, -5, 6, -9, -29, -29, 25, 9, -17, 1, -4, -29, 18, 23, 4, -20, 14, 4, 18, -13, 6, -13, 19, -6, 10, 21, -17, -5, -16, 26, -27, 3, 21, -21, 28, 25, -26, -28, 23, -11, 15, 10, -27, 19, -27, -12, -17, 0, -24, 8, 8, -24, 0, 12, 4, -27, -3, -7, -26, 15, -29, -27, -25, 25, 20, 5, -29, -23, 0, 27, 23, 0, -1, -2, 6, -7, 13, 6, 10, 28, 24, 8, -14, -9, -8, 24, -3, -11, -1, 27, 6, -29, 17, 0, 19, 9, -11, -7, -26, -27, 10, 26, -6, -10, -1, -14, 19, 28, 22, 19, 8, 20, -3, 5, 13, 21, -7, -21, -25, 2, -26, -17, 28, 7, 25, -1, 9, -14, -6, -24, 26, -30, 4, 26, -4, 20, -21, -22, 6, 17, -17, 21, -25, -23, 18, -13, 16, 29, 8, -27, -26, 9, -16, 15, -30, -2, -16, -7, 29, -2, 2, -3, 5, -21, 13, 10, 5, 4, 15, -19, 9, -24, 28, 17, 9, 21, -19, -3, -1, 17, 24, 5, -14, -23, -8, -19, -10, -7, 25, 4, -6, 24, -12, -19, 17, -11, 26, 8, -16, 28, -29, 27, 15, 20, 22, 15, 11, 26, 9, -21, 3, -6, -22, -23, 14, 2}, -52, 2, 289392}, + {[]int{-2, 5, -1}, -2, 2, 3}, + {[]int{}, -2, 2, 0}, + // 可以有多个 testcase +} + +func Test_countRangeSum(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, countRangeSum(tc.nums, tc.lower, tc.upper), "输入:%v", tc) + } +} + +func Benchmark_countRangeSum(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + countRangeSum(tc.nums, tc.lower, tc.upper) + } + } +} diff --git a/Algorithms/0328.odd-even-linked-list/README.md b/Algorithms/0328.odd-even-linked-list/README.md new file mode 100755 index 000000000..8fcacfc9c --- /dev/null +++ b/Algorithms/0328.odd-even-linked-list/README.md @@ -0,0 +1,25 @@ +# [328. Odd Even Linked List](https://leetcode.com/problems/odd-even-linked-list/) + +## 题目 + +Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not the value in the nodes. + +You should try to do it in place. The program should run in O(1) space complexity and O(nodes) time complexity. + +Example: + +```text +Given 1->2->3->4->5->NULL, +return 1->3->5->2->4->NULL. +``` + +Note: + +1. The relative order inside both the even and odd groups should remain as it was in the input. +1. The first node is considered odd, the second node even and so on ... + +Credits:Special thanks to @DjangoUnchained for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0328.odd-even-linked-list/odd-even-linked-list.go b/Algorithms/0328.odd-even-linked-list/odd-even-linked-list.go new file mode 100755 index 000000000..732e1381c --- /dev/null +++ b/Algorithms/0328.odd-even-linked-list/odd-even-linked-list.go @@ -0,0 +1,30 @@ +package Problem0328 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" +) + +type ListNode = kit.ListNode + +func oddEvenList(head *ListNode) *ListNode { + if head == nil { + return head + } + + // oe: odd end 指向 odd group 的最后一个 node + oe := head + // eb: even begin 指向 even group 的第一个 node + eb := head.Next + // ee: even end 指向 even group 的最后一个 node + ee := eb + + for ee != nil && ee.Next != nil { + oe.Next = ee.Next + oe = oe.Next + ee.Next = oe.Next + ee = ee.Next + oe.Next = eb + } + + return head +} diff --git a/Algorithms/0328.odd-even-linked-list/odd-even-linked-list_test.go b/Algorithms/0328.odd-even-linked-list/odd-even-linked-list_test.go new file mode 100755 index 000000000..bdc4b5951 --- /dev/null +++ b/Algorithms/0328.odd-even-linked-list/odd-even-linked-list_test.go @@ -0,0 +1,50 @@ +package Problem0328 + +import ( + "fmt" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + head []int + ans []int +}{ + + { + []int{1, 2, 3, 4, 5}, + []int{1, 3, 5, 2, 4}, + }, + + { + []int{1, 2, 3, 4, 5, 6}, + []int{1, 3, 5, 2, 4, 6}, + }, + + { + []int{}, + []int{}, + }, + // 可以有多个 testcase +} + +func Test_oddEvenList(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + head := kit.Ints2List(tc.head) + ast.Equal(tc.ans, kit.List2Ints(oddEvenList(head)), "输入:%v", tc) + } +} + +func Benchmark_oddEvenList(b *testing.B) { + head := kit.Ints2List([]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9}) + for i := 0; i < b.N; i++ { + oddEvenList(head) + } +} diff --git a/Algorithms/0329.longest-increasing-path-in-a-matrix/README.md b/Algorithms/0329.longest-increasing-path-in-a-matrix/README.md new file mode 100755 index 000000000..0db16bbcc --- /dev/null +++ b/Algorithms/0329.longest-increasing-path-in-a-matrix/README.md @@ -0,0 +1,37 @@ +# [329. Longest Increasing Path in a Matrix](https://leetcode.com/problems/longest-increasing-path-in-a-matrix/) + +## 题目 + +Given an integer matrix, find the length of the longest increasing path. + +From each cell, you can either move to four directions: left, right, up or down. You may NOT move diagonally or move outside of the boundary (i.e. wrap-around is not allowed). + +Example 1: + +```text +nums = [ + [9,9,4], + [6,6,8], + [2,1,1] +] +Return 4 +The longest increasing path is [1, 2, 6, 9]. +``` + +Example 2: + +```text +nums = [ + [3,4,5], + [3,2,6], + [2,2,1] +] +Return 4 +The longest increasing path is [3, 4, 5, 6]. Moving diagonally is not allowed. +``` + +Credits:Special thanks to @dietpepsi for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0329.longest-increasing-path-in-a-matrix/longest-increasing-path-in-a-matrix.go b/Algorithms/0329.longest-increasing-path-in-a-matrix/longest-increasing-path-in-a-matrix.go new file mode 100755 index 000000000..df6462fff --- /dev/null +++ b/Algorithms/0329.longest-increasing-path-in-a-matrix/longest-increasing-path-in-a-matrix.go @@ -0,0 +1,56 @@ +package Problem0329 + +func longestIncreasingPath(mat [][]int) int { + if len(mat) == 0 || len(mat[0]) == 0 { + return 0 + } + + m, n := len(mat), len(mat[0]) + + // path[i][j] 从 (i,j) 点出发的最长路径长度 + path := make([][]int, m) + for i := range path { + path[i] = make([]int, n) + } + + res := 0 + dx := []int{-1, 1, 0, 0} + dy := []int{0, 0, -1, 1} + + var dfs func(int, int) int + dfs = func(x, y int) int { + if path[x][y] > 0 { + // 已经访问过 (x,y) 点了,可以直接返回历史记录 + return path[x][y] + } + + path[x][y] = 1 + + for i := 0; i < 4; i++ { + nx := x + dx[i] + ny := y + dy[i] + if 0 <= nx && nx < m && + 0 <= ny && ny < n && + mat[x][y] < mat[nx][ny] { + path[x][y] = max(path[x][y], dfs(nx, ny)+1) + } + } + + return path[x][y] + } + + for i := 0; i < m; i++ { + for j := 0; j < n; j++ { + res = max(res, dfs(i, j)) + } + } + + return res +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} diff --git a/Algorithms/0329.longest-increasing-path-in-a-matrix/longest-increasing-path-in-a-matrix_test.go b/Algorithms/0329.longest-increasing-path-in-a-matrix/longest-increasing-path-in-a-matrix_test.go new file mode 100755 index 000000000..7a2990f2a --- /dev/null +++ b/Algorithms/0329.longest-increasing-path-in-a-matrix/longest-increasing-path-in-a-matrix_test.go @@ -0,0 +1,88 @@ +package Problem0329 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + matrix [][]int + ans int +}{ + + {[][]int{ + []int{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, + []int{19, 18, 17, 16, 15, 14, 13, 12, 11, 10}, + []int{20, 21, 22, 23, 24, 25, 26, 27, 28, 29}, + []int{39, 38, 37, 36, 35, 34, 33, 32, 31, 30}, + []int{40, 41, 42, 43, 44, 45, 46, 47, 48, 49}, + []int{59, 58, 57, 56, 55, 54, 53, 52, 51, 50}, + []int{60, 61, 62, 63, 64, 65, 66, 67, 68, 69}, + []int{79, 78, 77, 76, 75, 74, 73, 72, 71, 70}, + []int{80, 81, 82, 83, 84, 85, 86, 87, 88, 89}, + []int{99, 98, 97, 96, 95, 94, 93, 92, 91, 90}, + []int{100, 101, 102, 103, 104, 105, 106, 107, 108, 109}, + []int{119, 118, 117, 116, 115, 114, 113, 112, 111, 110}, + []int{120, 121, 122, 123, 124, 125, 126, 127, 128, 129}, + []int{139, 138, 137, 136, 135, 134, 133, 132, 131, 130}, + []int{0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + }, + 140, + }, + + {[][]int{}, 0}, + + {[][]int{ + []int{9, 9, 4}, + []int{6, 6, 8}, + []int{2, 1, 1}, + }, + 4, + }, + + {[][]int{ + []int{3, 4, 5}, + []int{3, 2, 6}, + []int{2, 2, 7}, + }, + 5, + }, + + {[][]int{ + []int{3, 4, 5}, + []int{10, 11, 6}, + []int{9, 8, 7}, + }, + 9, + }, + + {[][]int{ + []int{7, 8, 9}, + []int{9, 7, 6}, + []int{7, 2, 3}, + }, + 6, + }, + + // 可以有多个 testcase +} + +func Test_longestIncreasingPath(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, longestIncreasingPath(tc.matrix), "输入:%v", tc) + } +} + +func Benchmark_longestIncreasingPath(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + longestIncreasingPath(tc.matrix) + } + } +} diff --git a/Algorithms/0330.patching-array/README.md b/Algorithms/0330.patching-array/README.md new file mode 100755 index 000000000..49a398c98 --- /dev/null +++ b/Algorithms/0330.patching-array/README.md @@ -0,0 +1,31 @@ +# [330. Patching Array](https://leetcode.com/problems/patching-array/) + +## 题目 + +Given a sorted positive integer array nums and an integer n, add/patch elements to the array such that any number in range [1, n] inclusive can be formed by the sum of some elements in the array. Return the minimum number of patches required. + +```text +Example 1: +nums = [1, 3], n = 6 +Return 1. + +Combinations of nums are [1], [3], [1,3], which form possible sums of: 1, 3, 4. +Now if we add/patch 2 to nums, the combinations are: [1], [2], [3], [1,3], [2,3], [1,2,3]. +Possible sums are 1, 2, 3, 4, 5, 6, which now covers the range [1, 6]. +So we only need 1 patch. + +Example 2: +nums = [1, 5, 10], n = 20 +Return 2. +The two patches can be [2, 4]. + +Example 3: +nums = [1, 2, 2], n = 5 +Return 0. +``` + +Credits:Special thanks to @dietpepsi for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0330.patching-array/patching-array.go b/Algorithms/0330.patching-array/patching-array.go new file mode 100755 index 000000000..3250415de --- /dev/null +++ b/Algorithms/0330.patching-array/patching-array.go @@ -0,0 +1,29 @@ +package Problem0330 + +// nums 是升序排列的 +func minPatches(nums []int, n int) (count int) { + var max, i int + + // nums[:i] 的所有 子数组 的和的集合,等于 max + // nums[:i+1] --> max+nums[i] + max += nums[i] + i++ + } else { + // 此时 + // nums[i] > max + // 如果还 max += nums[i] 的话 + // 会导致 x ∈ [max, nums[i]) 无法获取 + // 需要添加 max 来实现,来让 自然数的集合达到 [1, 2*max) + max <<= 1 + count++ + } + } + + return +} diff --git a/Algorithms/0330.patching-array/patching-array_test.go b/Algorithms/0330.patching-array/patching-array_test.go new file mode 100755 index 000000000..a64a6e33d --- /dev/null +++ b/Algorithms/0330.patching-array/patching-array_test.go @@ -0,0 +1,54 @@ +package Problem0330 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + n int + ans int +}{ + + {[]int{1, 3}, 6, 1}, + + {[]int{1, 5, 10}, 20, 2}, + + {[]int{1, 2, 2}, 5, 0}, + + {[]int{1, 2, 2, 2}, 7, 0}, + + {[]int{1, 2, 2}, 7, 1}, + + {[]int{1, 2, 31, 33}, 2147483647, 28}, + + {[]int{1, 2, 14, 15, 17, 18}, 2147483647, 27}, + + {[]int{1, 2, 14, 15, 17, 18}, 65, 2}, + + + {[]int{1, 2, 63 }, 65, 4}, + + // +} + +func Test_minPatches(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, minPatches(tc.nums, tc.n), "输入:%v", tc) + } +} + +func Benchmark_minPatches(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + minPatches(tc.nums, tc.n) + } + } +} diff --git a/Algorithms/0331.verify-preorder-serialization-of-a-binary-tree/README.md b/Algorithms/0331.verify-preorder-serialization-of-a-binary-tree/README.md new file mode 100755 index 000000000..24585296a --- /dev/null +++ b/Algorithms/0331.verify-preorder-serialization-of-a-binary-tree/README.md @@ -0,0 +1,41 @@ +# [331. Verify Preorder Serialization of a Binary Tree](https://leetcode.com/problems/verify-preorder-serialization-of-a-binary-tree/) + +## 题目 + +One way to serialize a binary tree is to use pre-order traversal. When we encounter a non-null node, we record the node's value. If it is a null node, we record using a sentinel value such as #. + +```text + _9_ + / \ + 3 2 + / \ / \ + 4 1 # 6 +/ \ / \ / \ +# # # # # # +``` + +For example, the above binary tree can be serialized to the string "9,3,4,#,#,1,#,#,2,#,6,#,#", where # represents a null node. + +Given a string of comma separated values, verify whether it is a correct preorder traversal serialization of a binary tree. Find an algorithm without reconstructing the tree. + +Each comma separated value in the string must be either an integer or a character '#' representing null pointer. + +You may assume that the input format is always valid, for example it could never contain two consecutive commas such as "1,,3". + +```text +Example 1: +"9,3,4,#,#,1,#,#,2,#,6,#,#" +Return true +Example 2: +"1,#" +Return false +Example 3: +"9,#,#,1" +Return false +``` + +Credits:Special thanks to @dietpepsi for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0331.verify-preorder-serialization-of-a-binary-tree/verify-preorder-serialization-of-a-binary-tree.go b/Algorithms/0331.verify-preorder-serialization-of-a-binary-tree/verify-preorder-serialization-of-a-binary-tree.go new file mode 100755 index 000000000..bd23d727d --- /dev/null +++ b/Algorithms/0331.verify-preorder-serialization-of-a-binary-tree/verify-preorder-serialization-of-a-binary-tree.go @@ -0,0 +1,21 @@ +package Problem0331 + +import ( + "strings" +) + +func isValidSerialization(preorder string) bool { + parts := strings.Split(preorder, ",") + s := make([]string, 0, len(parts)) + for _, p := range parts { + for p == "#" && len(s) > 0 && s[len(s)-1] == "#" { + s = s[:len(s)-1] + if len(s) == 0 { + return false + } + s = s[:len(s)-1] + } + s = append(s, p) + } + return len(s) == 1 && s[0] == "#" +} diff --git a/Algorithms/0331.verify-preorder-serialization-of-a-binary-tree/verify-preorder-serialization-of-a-binary-tree_test.go b/Algorithms/0331.verify-preorder-serialization-of-a-binary-tree/verify-preorder-serialization-of-a-binary-tree_test.go new file mode 100755 index 000000000..27e63c982 --- /dev/null +++ b/Algorithms/0331.verify-preorder-serialization-of-a-binary-tree/verify-preorder-serialization-of-a-binary-tree_test.go @@ -0,0 +1,84 @@ +package Problem0331 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + preorder string + ans bool +}{ + + { + "1,2,#,#,3,4,#,5,6,#,7,#,#,8,#,9,#,#,10,#,#", + true, + }, + + { + "9,#,93,#,9,9,#,#,#", + true, + }, + + { + "#", + true, + }, + + { + "#,3,4,#,#,1,#,#,2,#,6,#,#", + false, + }, + + { + "9,#,92,#,#", + true, + }, + + { + "9,3,4,#,#,1,#,#,2,#,6,#,#", + true, + }, + + { + "1", + false, + }, + + { + "1,2,3,4,5", + false, + }, + + { + "1,#", + false, + }, + + { + "9,#,#,1", + false, + }, + + // 可以有多个 testcase +} + +func Test_isValidSerialization(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, isValidSerialization(tc.preorder), "输入:%v", tc) + } +} + +func Benchmark_isValidSerialization(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + isValidSerialization(tc.preorder) + } + } +} diff --git a/Algorithms/0332.reconstruct-itinerary/332.100.png b/Algorithms/0332.reconstruct-itinerary/332.100.png new file mode 100644 index 000000000..d3be52be4 Binary files /dev/null and b/Algorithms/0332.reconstruct-itinerary/332.100.png differ diff --git a/Algorithms/0332.reconstruct-itinerary/README.md b/Algorithms/0332.reconstruct-itinerary/README.md new file mode 100755 index 000000000..b91f23e00 --- /dev/null +++ b/Algorithms/0332.reconstruct-itinerary/README.md @@ -0,0 +1,30 @@ +# [332. Reconstruct Itinerary](https://leetcode.com/problems/reconstruct-itinerary/) + +## 题目 + +Given a list of airline tickets represented by pairs of departure and arrival airports [from, to], reconstruct the itinerary in order. All of the tickets belong to a man who departs from JFK. Thus, the itinerary must begin with JFK. + +Note: + +1. If there are multiple valid itineraries, you should return the itinerary that has the smallest lexical order when read as a single string. For example, the itinerary ["JFK", "LGA"] has a smaller lexical order than ["JFK", "LGB"]. +1. All airports are represented by three capital letters (IATA code). +1. You may assume all tickets form at least one valid itinerary. + +```text +Example 1: +tickets = [["MUC", "LHR"], ["JFK", "MUC"], ["SFO", "SJC"], ["LHR", "SFO"]] +Return ["JFK", "MUC", "LHR", "SFO", "SJC"]. + +Example 2: +tickets = [["JFK","SFO"],["JFK","ATL"],["SFO","ATL"],["ATL","JFK"],["ATL","SFO"]] +Return ["JFK","ATL","JFK","SFO","ATL","SFO"]. +Another possible reconstruction is ["JFK","SFO","ATL","JFK","ATL","SFO"]. But it is larger in lexical order. +``` + +Credits:Special thanks to @dietpepsi for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 + +![100](332.100.png) \ No newline at end of file diff --git a/Algorithms/0332.reconstruct-itinerary/reconstruct-itinerary.go b/Algorithms/0332.reconstruct-itinerary/reconstruct-itinerary.go new file mode 100755 index 000000000..88f8c1efe --- /dev/null +++ b/Algorithms/0332.reconstruct-itinerary/reconstruct-itinerary.go @@ -0,0 +1,45 @@ +package Problem0332 + +import "sort" + +func findItinerary(tickets [][]string) []string { + // nexts[k]v: from k to v + nexts := make(map[string][]string, len(tickets)+1) + for _, t := range tickets { + nexts[t[0]] = append(nexts[t[0]], t[1]) + } + + // 对所有的下一站进行排序 + for k := range nexts { + sort.Strings(nexts[k]) + } + + // 路径集合 + route := make([]string, 0, len(tickets)+1) + + var visit func(string) + var next string + visit = func(airport string) { + // 优先访问值靠前的 下一站 + for len(nexts[airport]) > 0 { + next = nexts[airport][0] + nexts[airport] = nexts[airport][1:] + visit(next) + } + // 全部下一站都访问完毕后,把本站添加入路径 + // 所以添加顺序是,先访问的后添加 + route = append(route, airport) + } + + visit("JFK") + + // 逆转 route + i, j := 0, len(route)-1 + for i < j { + route[i], route[j] = route[j], route[i] + i++ + j-- + } + + return route +} diff --git a/Algorithms/0332.reconstruct-itinerary/reconstruct-itinerary_test.go b/Algorithms/0332.reconstruct-itinerary/reconstruct-itinerary_test.go new file mode 100755 index 000000000..9b44410ca --- /dev/null +++ b/Algorithms/0332.reconstruct-itinerary/reconstruct-itinerary_test.go @@ -0,0 +1,162 @@ +package Problem0332 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + tickets [][]string + ans []string +}{ + + { + [][]string{ + []string{"JFK", "SFO"}, + []string{"JFK", "ATL"}, + []string{"SFO", "ATL"}, + []string{"ATL", "JFK"}, + []string{"ATL", "SFO"}, + }, + []string{"JFK", "ATL", "JFK", "SFO", "ATL", "SFO"}, + }, + + { + [][]string{ + []string{"MUC", "LHR"}, + []string{"JFK", "MUC"}, + []string{"SFO", "SJC"}, + []string{"LHR", "SFO"}, + }, + []string{"JFK", "MUC", "LHR", "SFO", "SJC"}, + }, + + { + [][]string{ + []string{"AXA", "EZE"}, + []string{"EZE", "AUA"}, + []string{"ADL", "JFK"}, + []string{"ADL", "TIA"}, + []string{"AUA", "AXA"}, + []string{"EZE", "TIA"}, + []string{"EZE", "TIA"}, + []string{"AXA", "EZE"}, + []string{"EZE", "ADL"}, + []string{"ANU", "EZE"}, + []string{"TIA", "EZE"}, + []string{"JFK", "ADL"}, + []string{"AUA", "JFK"}, + []string{"JFK", "EZE"}, + []string{"EZE", "ANU"}, + []string{"ADL", "AUA"}, + []string{"ANU", "AXA"}, + []string{"AXA", "ADL"}, + []string{"AUA", "JFK"}, + []string{"EZE", "ADL"}, + []string{"ANU", "TIA"}, + []string{"AUA", "JFK"}, + []string{"TIA", "JFK"}, + []string{"EZE", "AUA"}, + []string{"AXA", "EZE"}, + []string{"AUA", "ANU"}, + []string{"ADL", "AXA"}, + []string{"EZE", "ADL"}, + []string{"AUA", "ANU"}, + []string{"AXA", "EZE"}, + []string{"TIA", "AUA"}, + []string{"AXA", "EZE"}, + []string{"AUA", "SYD"}, + []string{"ADL", "JFK"}, + []string{"EZE", "AUA"}, + []string{"ADL", "ANU"}, + []string{"AUA", "TIA"}, + []string{"ADL", "EZE"}, + []string{"TIA", "JFK"}, + []string{"AXA", "ANU"}, + []string{"JFK", "AXA"}, + []string{"JFK", "ADL"}, + []string{"ADL", "EZE"}, + []string{"AXA", "TIA"}, + []string{"JFK", "AUA"}, + []string{"ADL", "EZE"}, + []string{"JFK", "ADL"}, + []string{"ADL", "AXA"}, + []string{"TIA", "AUA"}, + []string{"AXA", "JFK"}, + []string{"ADL", "AUA"}, + []string{"TIA", "JFK"}, + []string{"JFK", "ADL"}, + []string{"JFK", "ADL"}, + []string{"ANU", "AXA"}, + []string{"TIA", "AXA"}, + []string{"EZE", "JFK"}, + []string{"EZE", "AXA"}, + []string{"ADL", "TIA"}, + []string{"JFK", "AUA"}, + []string{"TIA", "EZE"}, + []string{"EZE", "ADL"}, + []string{"JFK", "ANU"}, + []string{"TIA", "AUA"}, + []string{"EZE", "ADL"}, + []string{"ADL", "JFK"}, + []string{"ANU", "AXA"}, + []string{"AUA", "AXA"}, + []string{"ANU", "EZE"}, + []string{"ADL", "AXA"}, + []string{"ANU", "AXA"}, + []string{"TIA", "ADL"}, + []string{"JFK", "ADL"}, + []string{"JFK", "TIA"}, + []string{"AUA", "ADL"}, + []string{"AUA", "TIA"}, + []string{"TIA", "JFK"}, + []string{"EZE", "JFK"}, + []string{"AUA", "ADL"}, + []string{"ADL", "AUA"}, + []string{"EZE", "ANU"}, + []string{"ADL", "ANU"}, + []string{"AUA", "AXA"}, + []string{"AXA", "TIA"}, + []string{"AXA", "TIA"}, + []string{"ADL", "AXA"}, + []string{"EZE", "AXA"}, + []string{"AXA", "JFK"}, + []string{"JFK", "AUA"}, + []string{"ANU", "ADL"}, + []string{"AXA", "TIA"}, + []string{"ANU", "AUA"}, + []string{"JFK", "EZE"}, + []string{"AXA", "ADL"}, + []string{"TIA", "EZE"}, + []string{"JFK", "AXA"}, + []string{"AXA", "ADL"}, + []string{"EZE", "AUA"}, + []string{"AXA", "ANU"}, + []string{"ADL", "EZE"}, + []string{"AUA", "EZE"}, + }, + []string{"JFK", "ADL", "ANU", "ADL", "ANU", "AUA", "ADL", "AUA", "ADL", "AUA", "ANU", "AXA", "ADL", "AUA", "ANU", "AXA", "ADL", "AXA", "ADL", "AXA", "ANU", "AXA", "ANU", "AXA", "EZE", "ADL", "AXA", "EZE", "ADL", "AXA", "EZE", "ADL", "EZE", "ADL", "EZE", "ADL", "EZE", "ANU", "EZE", "ANU", "EZE", "AUA", "AXA", "EZE", "AUA", "AXA", "EZE", "AUA", "AXA", "JFK", "ADL", "EZE", "AUA", "EZE", "AXA", "JFK", "ADL", "JFK", "ADL", "JFK", "ADL", "JFK", "ADL", "TIA", "ADL", "TIA", "AUA", "JFK", "ANU", "TIA", "AUA", "JFK", "AUA", "JFK", "AUA", "TIA", "AUA", "TIA", "AXA", "TIA", "EZE", "AXA", "TIA", "EZE", "JFK", "AXA", "TIA", "EZE", "JFK", "AXA", "TIA", "JFK", "EZE", "TIA", "JFK", "EZE", "TIA", "JFK", "TIA", "JFK", "AUA", "SYD"}, + }, + + // 可以有多个 testcase +} + +func Test_findItinerary(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findItinerary(tc.tickets), "输入:%v", tc) + } +} + +func Benchmark_findItinerary(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findItinerary(tc.tickets) + } + } +} diff --git a/Algorithms/0334.increasing-triplet-subsequence/README.md b/Algorithms/0334.increasing-triplet-subsequence/README.md new file mode 100755 index 000000000..992eb0566 --- /dev/null +++ b/Algorithms/0334.increasing-triplet-subsequence/README.md @@ -0,0 +1,28 @@ +# [334. Increasing Triplet Subsequence](https://leetcode.com/problems/increasing-triplet-subsequence/) + +## 题目 + +Given an unsorted array return whether an increasing subsequence of length 3 exists or not in the array. + +Formally the function should: + +1. Return true if there exists i, j, k such that arr[i] < arr[j] < arr[k] given 0 ≤ i < j < k ≤ n-1 +1. else return false. + +Your algorithm should run in O(n) time complexity and O(1) space complexity. + +Examples: + +```text +Given [1, 2, 3, 4, 5], +return true. + +Given [5, 4, 3, 2, 1], +return false. +``` + +Credits:Special thanks to @DjangoUnchained for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0334.increasing-triplet-subsequence/increasing-triplet-subsequence.go b/Algorithms/0334.increasing-triplet-subsequence/increasing-triplet-subsequence.go new file mode 100755 index 000000000..0939c4afe --- /dev/null +++ b/Algorithms/0334.increasing-triplet-subsequence/increasing-triplet-subsequence.go @@ -0,0 +1,32 @@ +package Problem0334 + +func increasingTriplet(a []int) bool { + max := 1<<63 - 1 + ai, aj := max, max + + for _, ak := range a { + if ak <= ai { + ai = ak + } else if ak <= aj { + aj = ak + } else { + return true + } + } + + return false +} + +// TODO: 复习此题 + +// 按照题目要求,ai < aj < ak, 对应的索引值 i < j < k +// 按照程序的运行逻辑可知,ai < aj < ak,但对应的索引值,却有可能出现 i > j 的情况 +// 例如,下面的 test case 返回 true 时 +// [1,2,-10,3,-6] +// ↑ ↑ ↑ +// aj ai ak +// 出现这样的情况,不代表程序出错了。因为 +// 虽然,ai 从 1 变成了 -10 前,递增数的个数为 2,变化后,并没有让递增数的个数降低。 +// 反过来说,保持递增数个数不变的前提下,ai 变小后,可以增大 aj 和 ak 的取值范围,避免遗漏某些情况。 +// 观察下面 test case 的运行过程,可以清楚这一点。 +// {[]int{1, 2, -10, -8, -6}, true}, diff --git a/Algorithms/0334.increasing-triplet-subsequence/increasing-triplet-subsequence_test.go b/Algorithms/0334.increasing-triplet-subsequence/increasing-triplet-subsequence_test.go new file mode 100755 index 000000000..8288c3456 --- /dev/null +++ b/Algorithms/0334.increasing-triplet-subsequence/increasing-triplet-subsequence_test.go @@ -0,0 +1,41 @@ +package Problem0334 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans bool +}{ + {[]int{1, 2, 3, 1, 2, 1}, true}, + {[]int{1, 4, 3, 2, 5}, true}, + {[]int{2, 5, 3, 4, 5}, true}, + {[]int{1, 2, -10, -8, -6}, true}, + {[]int{5, 4, 3, 2, 1}, false}, + {[]int{}, false}, + {[]int{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100000000}, true}, + + // 可以有多个 testcase +} + +func Test_increasingTriplet(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, increasingTriplet(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_increasingTriplet(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + increasingTriplet(tc.nums) + } + } +} diff --git a/Algorithms/0335.self-crossing/335.100.png b/Algorithms/0335.self-crossing/335.100.png new file mode 100644 index 000000000..5aa7f7717 Binary files /dev/null and b/Algorithms/0335.self-crossing/335.100.png differ diff --git a/Algorithms/0335.self-crossing/335.png b/Algorithms/0335.self-crossing/335.png new file mode 100644 index 000000000..b2f5edde7 Binary files /dev/null and b/Algorithms/0335.self-crossing/335.png differ diff --git a/Algorithms/0335.self-crossing/README.md b/Algorithms/0335.self-crossing/README.md new file mode 100755 index 000000000..d19e81cf1 --- /dev/null +++ b/Algorithms/0335.self-crossing/README.md @@ -0,0 +1,44 @@ +# [335. Self Crossing](https://leetcode.com/problems/self-crossing/) + +## 题目 + +You are given an array x of n positive numbers. You start at point (0,0) and moves x[0] metres to the north, then x[1] metres to the west, x[2] metres to the south, x[3] metres to the east and so on. In other words, after each move your direction changes counter-clockwise. + +Write a one-pass algorithm with O(1) extra space to determine, if your path crosses itself, or not. + +Example 1: +Given x = [2, 1, 1, 2], +????? +? ? +???????> + ? + +Return true (self crossing) + +Example 2: +Given x = [1, 2, 3, 4], +???????? +? ? +? +? +?????????????> + +Return false (not self crossing) + +Example 3: +Given x = [1, 1, 1, 1], +????? +? ? +?????> + +Return true (self crossing) + +Credits:Special thanks to @dietpepsi for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 +只会出现下面三种情况 +![335](335.png) + +![100](335.100.png) \ No newline at end of file diff --git a/Algorithms/0335.self-crossing/self-crossing.go b/Algorithms/0335.self-crossing/self-crossing.go new file mode 100755 index 000000000..dcfe8cc40 --- /dev/null +++ b/Algorithms/0335.self-crossing/self-crossing.go @@ -0,0 +1,25 @@ +package Problem0335 + +func isSelfCrossing(x []int) bool { + size := len(x) + + is4th := func(i int) bool { + return i+3 < size && x[i+2] <= x[i] && x[i+3] >= x[i+1] + } + + is5th := func(i int) bool { + return i+4 < size && x[i+3] == x[i+1] && x[i+4]+x[i] >= x[i+2] + } + + is6th := func(i int) bool { + return i+5 < size && x[i+2] > x[i] && x[i+3] > x[i+1] && x[i+4] <= x[i+2] && x[i+4]+x[i] >= x[i+2] && x[i+5]+x[i+1] >= x[i+3] + } + + for i := 0; i < size; i++ { + if is4th(i) || is5th(i) || is6th(i) { + return true + } + } + + return false +} diff --git a/Algorithms/0335.self-crossing/self-crossing_test.go b/Algorithms/0335.self-crossing/self-crossing_test.go new file mode 100755 index 000000000..2c95b202c --- /dev/null +++ b/Algorithms/0335.self-crossing/self-crossing_test.go @@ -0,0 +1,79 @@ +package Problem0335 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + x []int + ans bool +}{ + + { + []int{1, 1, 2, 2, 3, 3, 4, 4, 10, 4, 4, 3, 3, 2, 2, 1, 1}, + false, + }, + + { + []int{1, 1, 4, 2, 2, 1, 1}, + false, + }, + + { + []int{1, 1, 3, 2, 1, 1, 1}, + true, + }, + + { + []int{1, 1, 2, 1, 1}, + true, + }, + + { + []int{2, 1, 3, 2, 2, 1}, + true, + }, + + { + []int{2, 1, 1, 2}, + true, + }, + + { + []int{1, 2, 2, 3, 4}, + false, + }, + + { + []int{1, 2, 3, 4}, + false, + }, + + { + []int{1, 1, 1, 1}, + true, + }, + + // 可以有多个 testcase +} + +func Test_isSelfCrossing(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, isSelfCrossing(tc.x), "输入:%v", tc) + } +} + +func Benchmark_isSelfCrossing(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + isSelfCrossing(tc.x) + } + } +} diff --git a/Algorithms/0336.palindrome-pairs/README.md b/Algorithms/0336.palindrome-pairs/README.md new file mode 100755 index 000000000..e23107bfc --- /dev/null +++ b/Algorithms/0336.palindrome-pairs/README.md @@ -0,0 +1,23 @@ +# [336. Palindrome Pairs](https://leetcode.com/problems/palindrome-pairs/) + +## 题目 + +Given a list of unique words, find all pairs of distinct indices (i, j) in the given list, so that the concatenation of the two words, i.e. words[i] + words[j] is a palindrome. + +```text +Example 1: +Given words = ["bat", "tab", "cat"] +Return [[0, 1], [1, 0]] +The palindromes are ["battab", "tabbat"] + +Example 2: +Given words = ["abcd", "dcba", "lls", "s", "sssll"] +Return [[0, 1], [1, 0], [3, 2], [2, 4]] +The palindromes are ["dcbaabcd", "abcddcba", "slls", "llssssll"] +``` + +Credits:Special thanks to @dietpepsi for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0336.palindrome-pairs/palindrome-pairs.go b/Algorithms/0336.palindrome-pairs/palindrome-pairs.go new file mode 100755 index 000000000..4795ec14e --- /dev/null +++ b/Algorithms/0336.palindrome-pairs/palindrome-pairs.go @@ -0,0 +1,66 @@ +package Problem0336 + +func palindromePairs(words []string) [][]int { + res := make([][]int, 0, len(words)) + size := len(words) + if size < 2 { + return res + } + + hash := make(map[string]int, size) + + for i := 0; i < size; i++ { + hash[words[i]] = i + } + + for i := 0; i < len(words); i++ { + for k := 0; k <= len(words[i]); k++ { + right := words[i][k:] + left := words[i][:k] + + if isPalindrome(right) { + leftRev := reverse(left) + if j, ok := hash[leftRev]; ok && i != j { + res = append(res, []int{i, j}) + } + } + + // 因为 + // k == 0 的 right + // 和 + // k == len(words[i]) 的 left + // 相等,会导致重复答案 + // 需要,len(left) != 0 来过滤掉这种情况 + if len(left) != 0 && isPalindrome(left) { + rightRev := reverse(right) + if j, ok := hash[rightRev]; ok && i != j { + res = append(res, []int{j, i}) + } + } + + } + } + + return res +} + +func isPalindrome(s string) bool { + i, j := 0, len(s)-1 + for i < j { + if s[i] != s[j] { + return false + } + i++ + j-- + } + return true +} + +// 反转字符串 +func reverse(s string) string { + bs := []byte(s) + for i, j := 0, len(bs)-1; i < j; i, j = i+1, j-1 { + bs[i], bs[j] = bs[j], bs[i] + } + return string(bs) +} diff --git a/Algorithms/0336.palindrome-pairs/palindrome-pairs_test.go b/Algorithms/0336.palindrome-pairs/palindrome-pairs_test.go new file mode 100755 index 000000000..28fa3dd0d --- /dev/null +++ b/Algorithms/0336.palindrome-pairs/palindrome-pairs_test.go @@ -0,0 +1,1199 @@ +package Problem0336 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + words []string + ans [][]int +}{ + + { + []string{ + "beeeebcdeicajgjj", + "ihjggahfgdecdgjdedi", + "eaigjcciegijcgdcjea", + "bdicecf", + "feiihebjibiddcgcc", + "fijj", + "bbbgcihffajefeeadi", + "jeca", + "hhijbeccecaa", + "aifjbigjfigdabacdh", + "haj", + "jehdgheabgbg", + "caj", + "giead", + "fjjeehae", + "bhbgaeabgbf", + "deadjf", + "daddab", + "bdjhgchbi", + "fb", + "cedjdjdegchhjcdfeh", + "jeahjejjib", + "bgbfheeijfdbihcfb", + "adijbibd", + "deafbiibjbca", + "bdhffghhgbidcciiiiaf", + "aigahcacecbjfgiajeh", + "jigifibdgcg", + "ieajccfdeda", + "hcacfaiceae", + "g", + "ehegg", + "hbahheegccjacdf", + "icea", + "jdhajghidajgehf", + "ahjcfhejgbgfacddgeg", + "ffagecdjjidfbjeb", + "gaaghabdd", + "ehbjbcciei", + "fgjdbcbabbfhh", + "dcfbfc", + "icca", + "gahcjffhhdccgacdddi", + "heegjjgddfde", + "hejahhhfhjbdcb", + "hecdffia", + "fhidfgajhjfi", + "bdibhdjaejefe", + "adhecf", + "jhieebddigahheicgc", + "bghdjeceb", + "fhhfjccdbbeaai", + "dfhjeajbcgbgfjbiie", + "gaaaiaahj", + "gihgagfiabjaheaefjgg", + "bbfgchfjfibgg", + "giabcacjiaiigd", + "cifeffjfjdcgeccddi", + "cfajjie", + "febcfjibeegehbggf", + "jbbajgefgbiegeihgaf", + "hjibifcbib", + "hgbcifgjiiejghhabg", + "dhaiigahggijacjb", + "ajiejafg", + "ddghi", + "aifdhgbg", + "idehafjcacafjhaa", + "bedfchdcaicjfa", + "bje", + "eabbhhcbdj", + "b", + "cifc", + "ajcabichajdijdhjah", + "jjbj", + "ejcfbadje", + "ajefhghdgagdg", + "cgjdfahec", + "cajhbi", + "ggahjiibacech", + "jiii", + "gbejbgjfggghgccic", + "aedhbha", + "cbgeajjacbffj", + "gfaedaihaehchhfbca", + "igegjjdfgcj", + "cggdfbefidb", + "aeggefjgidhcjai", + "iccfgfjbifj", + "babeeacadbgcejdgb", + "hjfbiieg", + "jgfjafegfcjabig", + "cgghcbaigicccdadgj", + "edhc", + "bhfdggfeedjbcc", + "idhfifjh", + "dhg", + "bigcjbedahicachdc", + "hbhehd", + "ddejegadb", + "dcghcjidb", + "h", + "f", + "bibfbgiigdjdhcicgfa", + "j", + "cfcbbcagdhficdfbgge", + "diieibdchje", + "iaideefbacd", + "chbgg", + "ejgfdifgdecidefadc", + "hca", + "ajhaacceddigfdaijhh", + "jjcbbhh", + "jcdejeiddeghibcdiahd", + "cgbh", + "jccgf", + "eibbhcafih", + "agfbaffjehf", + "gciaddbdd", + "caabfhbb", + "dhiafhfghbbiaciebe", + "hcbaijchdbibhijeij", + "hje", + "jgaagcgcbfhbhg", + "baf", + "gg", + "fafifdcacdjajea", + "babiaggad", + "hidgc", + "ihgfdeddjffcbfbg", + "cga", + "jjhcicf", + "bgacedbcchbffb", + "hbghiffibeeh", + "ieeihfdihc", + "dbdfhfcg", + "gaf", + "fibacfgcdhgci", + "agdeibjediabfcgacaaf", + "dhhddehiih", + "ddaebjgifhjeide", + "heefhfgdfa", + "ji", + "fdbajeehi", + "cfjiab", + "adbifjaddbidgec", + "jcf", + "hbebghj", + "hbcebe", + "gihjdadbcdjdeb", + "cagicfjgibajj", + "beibhadf", + "ddahi", + "afgcjdghiedaifbgj", + "hbbchcbhd", + "e", + "cbcafdgg", + "gdagdfdafhdbi", + "haaeifhf", + "jifegiibebddig", + "iccaadccijjehhbej", + "giabhggeba", + "a", + "afechgcgjh", + "icaeaga", + "dgchd", + "ifafc", + "bdecfaggfijdc", + "cfihfjdagfbdjhfjjfgd", + "fbgc", + "fgefhdhhihhhcad", + "gbdaifaedahbicejah", + "ae", + "ciafhbghigacjgbg", + "fhjjcafh", + "fifhibchebgibj", + "dcfabcjbahbbgibifi", + "hdjbjgcdhifji", + "iij", + "bbgahabheacdidfjgcdb", + "hccdaigbeegcahgdhe", + "hcffjjcfhfhdbhihjb", + "abefdhjfj", + "cdhba", + "dcccigaff", + "c", + "ii", + "jdhcgbhgjhdcge", + "ddjh", + "hehaihc", + "ihj", + "jiceb", + "ddidajcbhe", + "eidhcicecfhbjg", + "ejiaiggbdjbffc", + "ibcffeb", + "bagchhdf", + "bbaefcedhf", + "bfeffgjcjcgfcjhj", + "ciha", + "ga", + "aebcgjajdccbghh", + "agjbijcefbbedaa", + "hjchddgdffchbcbaaji", + "geahiefhfh", + "jfhjca", + "jegcaci", + "afhiiaedggj", + "fce", + "jjabde", + "ejghfgbidafhgfddged", + "eefjbdabfjdjjcfab", + "ffcgebgejghcgga", + "jj", + "dhbihgahec", + "ijadjcbdbdcaag", + "ghi", + "eddaeggiiahdegigd", + "gef", + "bgjhdhghgjjigb", + "de", + "cbhehdhcagiddh", + "hahefidijehedd", + "gjbcija", + "fgfgedgijdhc", + "jf", + "ci", + "egacd", + "egdchfjaicga", + "adcffgcbcfg", + "gghcafhicegeffecej", + "dibeeahcjhgd", + "bddada", + "jcc", + "edbjfdaaadfh", + "eeieahcfga", + "ddjhaachfdgj", + "adhhegabeid", + "dbf", + "gicdfaa", + "faeb", + "gfdfdbdeeehidjcddjf", + "bcg", + "jchahhacjhaicdh", + "abjeeefbf", + "idj", + "habcgfbcfbafgbedeag", + "dfjjcjihhjidhif", + "giagidiaejhhbebgfiii", + "dcjieibddijacedjjd", + "djhbbeegjdbcdc", + "hbjihacidcjf", + "ebcjcbjggcejaedbjbgh", + "ccjhffdgheii", + "ebjjjidafeiiadagd", + "ebgiccfjcdhij", + "fahi", + "gbfjedheihagdfjfiadj", + "fbfcebefe", + "cjed", + "fciaffbfhheaajiee", + "jhbeeccdbfffaefgbag", + "ejdhijbfjedi", + "abgcfhafdiihjgcjb", + "gjdaedagb", + "gaebghaficjij", + "ggjcbb", + "eeahgbehcdf", + "bdh", + "cfiecig", + "ef", + "jeagcjgj", + "edjeeg", + "ehdeahei", + "jb", + "dheaefcbiaaibihbi", + "ceac", + "fbbjifdbgeabahbeic", + "ehceeieajcbcigdea", + "ccia", + "ejb", + "jaa", + "jdfccf", + "cehdehada", + "cajagdgbdfdief", + "ecchaahfccahbfiiagh", + "gfecfgiicf", + "begeif", + "ccdj", + "chjece", + "chjdcjhiaadiaja", + "ehiffbeefbh", + "ijeaaaab", + "bbceg", + "jhiij", + "jbadgfdb", + "cjfiffbgigjjehc", + "deifejfji", + "ccijhjdecbhbae", + "jgdhhgjfdecicj", + "edhjhecdehidecd", + "faidghgaeiccgabaeeih", + "ibabaafhegcbhadfgjfc", + "hgcceegjceh", + "cjjichhceebfhfe", + "ihdibgjichedbejgjfd", + "i", + "ejjdiiahidjcde", + "ghidg", + "jaejg", + "bdhbj", + "dgcbagf", + "ggjefhjaffeidecgi", + "fhjf", + "dahaedfcccdcddegfb", + "dceagcfigijagaiagg", + "ee", + "bdfjhageebbdgjf", + "idifga", + "fdhcbjjdijcc", + "hgii", + "gcecbdjeebh", + "gfjggaggaaeahdcg", + "cjeaee", + "deghch", + "jd", + "fbgbdaijfc", + "jjbahggccfchgc", + "idbigaa", + "fh", + "jhaffeiafcfic", + "hjbajajbhhgbhh", + "jcfffgi", + "eid", + "bdiddidbiehaicjjj", + "cadefbfcdiia", + "chbb", + "jcdieaa", + "chafeehdifjdhe", + "dbjbdefdhh", + "agiebcaafefbehfgfecf", + "ajbcdccde", + "bajddcfegdchbhaa", + "gjdhffifjbghj", + "fac", + "ibhdghc", + "ddcbheggh", + "ja", + "ehbecbic", + "dhcahcdi", + "eaicgfahhhcga", + "ajgjadi", + "cej", + "ijf", + "jgjiggibgegfcgdh", + "dhbcgbdb", + "idibfaecedbefh", + "jhhad", + "hbgfeb", + "addjdgibc", + "edfji", + "jfhdih", + "defdbchi", + "hhcbbdbhfcjafaidi", + "hjjfef", + "afgiedffbebgdeceg", + "caagacfafihjbc", + "cbd", + "hbechjjdhjcajhi", + "ecdbhcfjiajjdi", + "eafj", + "eedgcddibhjicghhgi", + "cebihhefjfaajgcbihh", + "iad", + "bhcjh", + "bbfcfbhbjheffijffgci", + "idfifbag", + "ehhiifgefabajccif", + "ccdhdgbg", + "dbegdcffhej", + "gbbhiddajaej", + "dbcfgbaegdaefb", + "jeafifjhgdggied", + "dbfbgjg", + "fhde", + "dbbgjjihbb", + "gejccfbehd", + "dihae", + "cbedgcefibh", + "ibgdbbdeeafd", + "gdacjhcae", + "eig", + "caiffaiecbjifbed", + "bhbhicif", + "jicegfihhfehdgefgbe", + "gbceggcjifcgbe", + "chaihfjha", + "fabchhfgcbdeh", + "haghigeccecfciachjd", + "fejdbifdgihhgejejaij", + "eahdcbjigibh", + "bcaedbddccccfchaaa", + "bbhghajdha", + "icieaaihjfbjc", + "haifhbehfeh", + "fdbaiehdacbcg", + "haiichhejicibifgch", + "hcgjjdbfg", + "gefhecjbid", + "iijifbe", + "fdccfgidfhfaefb", + "ehhigje", + "ehejhaadgjagajfgi", + "dadebcejhjacj", + "fgbhfgfdciebca", + "iadfab", + "ggihahf", + "bfeg", + "ddjfhaeefe", + "eeacdagjacjif", + "jadigc", + "dgd", + "ehhihj", + "afagacheibifg", + "cd", + "eaaeddaijbjbcdhiaj", + "ic", + "cabfah", + "aefbebcahfccgcc", + "geafcjcccafjaafgb", + "ecf", + "bbegiajc", + "dbeegbdbiadbiebbhijj", + "ejjebcaec", + "hhfabf", + "fgiegjbfbajgagjedfd", + "hgcje", + "iiifeei", + "iadhide", + "jehbfiiebcebjgbfi", + "bfgid", + "ejjfijcbhhchc", + "jedcjgfc", + "bdecjaddjjjhddgejb", + "bcedaeaicg", + "beijbfihjiebicfbdah", + "hbcifghfjdg", + "bcf", + "jjhbj", + "fhdieehbfjhga", + "efgbjgccg", + "dhbaciegffcbgcdecfge", + "cc", + "ibibeaehdgf", + "jecifgb", + "hfcbjjddjig", + "gcihafaajifgfjgee", + "jbifgjecfaecf", + "gfbjjhfj", + "fgj", + "eeddbihhhbcggb", + "cdghjidd", + "jdffiaccgdhebhfa", + "fhjibdjjdhajacgdaa", + "djefgjebeehbdcfgh", + "geci", + "fedcibeihbcdddg", + "ba", + "acjejdfcd", + "adcggijbbdaaajcji", + "bhgec", + "ch", + "gbggegj", + "fdcj", + "ghhjf", + "geaeecc", + "ebaehjfiegbhiiigj", + "jbhhfhgcg", + "djjhcebjhgjhddegjaf", + "ddbbgbbgb", + "dagejcifjiidhfj", + "cigjjdba", + "ddfjgecjbhibhdab", + "igdh", + "cjihcghd", + "fgidhihgahiedcdhceec", + "eccaeecchciijjhicc", + "acjggfg", + "gjfgjgdgcejegigbcj", + "jdhchcdejbc", + "hjchcjheeggebbgejb", + "hgegdjedbeghj", + "egigbbdg", + "dddihccgiehijeee", + "aebfhec", + "ebeagii", + "ejjajcaj", + "chefcjciijgagbiddb", + "jcha", + "acbdhfigjbafj", + "dcib", + "hhhid", + "cbj", + "ibia", + "fddh", + "hjeeidijdifhceechj", + "hieibajd", + "fgeee", + "jfbg", + "egba", + "dc", + "ajjajgddeebgba", + "hfhgjibig", + "ehbdd", + "hgdag", + "ffiddacjcfcebfhafiad", + "bah", + "dibhacehhdahhfghi", + "cfeagjcdhahgbhiefg", + "fiddgc", + "adbgdcifjabchhfj", + "cfhcjidifgiebg", + "jfbgbda", + "jjfiijdb", + "cdiegf", + "agfhddhibhjchjahgfe", + "eh", + "gjhaadg", + "bgj", + "fifaiagcicgic", + "hibdj", + "ddaffibhjbjebjhed", + "hfhjfh", + "dejahcbheihaccfcaci", + "hbd", + "egfddiie", + "fahgbhjbbegjcigf", + "fhjdcacebdhfc", + "fhihecei", + "abeffcdga", + "cdifdea", + "jbde", + "gbfcj", + "ehgfiaebhbeafcadfiec", + "fdcfac", + "ebaajggaaff", + "deifaeidijaif", + "aafhehdihdiafcgf", + "eihccaf", + "bhhhchije", + "iaheehiadeidie", + "bgehefjheccgdjihde", + "highgd", + "jh", + "hfbdfdcaf", + "ecdddb", + "gijbffg", + "dbfbjefjdhbifch", + "dcb", + "adcceefaa", + "difbcegagjad", + "bicjchaigdidhbjbbc", + "befdibhhgjfbjh", + "jccebjagcbe", + "bgggfhdfjhj", + "figcbjdffe", + "ggdfbgj", + "efjaiicejebhaiij", + "jbga", + "ijedeijfbgcaicdchaa", + "fc", + "dffga", + "jcadghifjeej", + "bbeibajjghcjii", + "hbiificbjggbdbcddgi", + "cefhddgg", + "jbifiecihibcajhhe", + "befhgaja", + "ddhjgj", + "aifdedjiijjiifaefji", + "jgigdbegdejed", + "dbafbg", + "bhiecchgeghgf", + "bgejidbbcgjbbej", + "gdjihbajbdjfbhhdgg", + "cfjgc", + "gcedgcfdcbhbaehbh", + "fagbdceffcfeg", + "dehdbdadeadheb", + "jdjbcdaebefhfjefgib", + "agghajfajcifiggcehbc", + "figadcadgjbifacff", + "fdhijdjei", + "dbjehghfbfaba", + "dddgihhaecfjia", + "bjedbhdejbeccc", + "gbaa", + "jcbcjdicgdeafcjgfa", + "jeieibahadejjia", + "jejbegecjcghag", + "degeeig", + "idiefaiagbdccbeg", + "bebbihjajiacc", + "agcded", + "jiajjghadiib", + "ggiaicj", + "gaa", + "bjfegdebhdafcjc", + "jedbe", + "dcegghfah", + "d", + "cdcfhcejaidjhdihf", + "jedahaebjgafjij", + "eehhbfhcbheibeafbjhh", + "iacbiidjjdafgdeebgeg", + "ehg", + "gce", + "cibbdfjabajfhicjhc", + "gabe", + "bcahifdhefgcihfcj", + "bachiajbbghf", + "cbcggfjbddig", + "aigjififbibbhee", + "bhjichaeacebhde", + "jhjjedbejhjef", + "bdbgicjg", + "hhbjeeig", + "afcgd", + "chb", + "hidjidieebe", + "fjeeaahabghbdijeehj", + "ffehejehacheff", + "bfhijbfhgeij", + "fahffagajgifhegiahd", + "daeagh", + "bfhhcfi", + "igaebicbbidc", + "ahgaeadaeaeejhbbd", + "hhfifc", + "bba", + "jhahbbgcahega", + "cgbfjibbgejahhi", + "fceidghhbc", + "ddhbiijfagbijabhchg", + "edfdgfhgedciijjb", + "cggacbegcab", + "cffddejagdedbjbhbehh", + "iiabejchcegffe", + "bfjdcjdiefifhdd", + "idceadhahebjdaebaag", + "ghfab", + "gbbcabghjfjecb", + "ca", + "jacajeeee", + "fiafccce", + "addheieceacdbid", + "gcie", + "cegfjdjiifibbbfde", + "bgjiefggbhajjjhdeeb", + "cbhcdghcgjggbibefi", + "jhaeggbeacc", + "cdcebbcb", + "eei", + "fiehihb", + "ddejbhahf", + "ghacaijhbh", + "dbjagbdjgadg", + "aaecfdhfchicha", + "bgfdjiddeaigeibie", + "chaeffghac", + "jeaiafidbebcdddchbi", + "ceicfhhbceidigbijiga", + "iebdcjcdgcchd", + "feefcfjhegbibcef", + "chjfbd", + "bhehcgbaa", + "dhaidbeigj", + "ggfcihbjgaacg", + "gbafcaccb", + "icbgbdfccjiegfagehja", + "deheh", + "bjifj", + "gig", + "fiheejdgc", + "afgcfbifgggiiac", + "hjjgjiahec", + "agebjdfbfbijdjciciac", + "dbhgbeeabghfdaded", + "cecccfedd", + "idihib", + "jjjefigiajaegd", + "eieiabhefdg", + "hhfdbgj", + "hefhfafhegbddha", + "abgbeifbcihjcjjf", + "deh", + "hf", + "cacgihjgc", + "cgechchgca", + "fdghe", + "aeae", + "beefijjifh", + "fhejjjgdjbfdfjbc", + "jfhgccjgfeaejcdd", + "cbehieicjgjb", + "gabecadiafiidaedjhg", + "bihahejcffh", + "cdieiaicj", + "aebbgdfefedbghcdjie", + "hidhaaejcfddegdbj", + "hhdfbhhgdib", + "ajcagaadbhdjfjh", + "jhcjhacaciahafgfbeae", + "fbadf", + "hdhghbhjg", + "dicjdjhbh", + "behjeedjfdchif", + "jgbfd", + "hhjge", + "hjhjhhifihd", + "gjgjceigcgabgeejb", + "ieaeffdeba", + "cchgjhe", + "dafefccaagef", + "bjfcddaaafifjbgg", + "fhihc", + "igghbbj", + "aeadajbahefdaffgddfb", + "gihfecbfbdih", + "cififdedahjhie", + "feeec", + "bfe", + "ijah", + "babfbjjefeghdiif", + "bj", + "bfg", + "fdbcfcicejedbf", + "ggjgbajhdee", + "ceaffjfffibaac", + "bjacfedbcfc", + "acbeeahbcaaa", + "ehfhifbibbchgdcddeb", + "hecdh", + "bhi", + "gehiiiifbedejjhhdjha", + "cccifbgjigfhfaeef", + "fciddhfiiheai", + "daccaegdc", + "jjciidaei", + "abdhadcf", + "affbdeehj", + "adeigihacbace", + "dcje", + "edjg", + "abfieiaifbehaegbdhj", + "ceg", + "efbgheebjih", + "bi", + "hbceaaciigghgeed", + "fcjcjiaddafehcgdh", + "cdhafhafcagecahh", + "hdicbggdbhhaec", + "jdffibg", + "jfdgai", + "jafddhhfecafccd", + "ddecjfffdibhfbec", + "aebdacjfbbabhd", + "cejgjedbggc", + "cfigijhghgjhjigaj", + "didgicafefibfhia", + "hfigi", + "aeahfbhj", + "ejfabcgidfebiejac", + "cijadecfidbha", + "ccefhhaddgefbec", + "acaf", + "iffafgffibbhjabifh", + "cgaijjdiadjdijd", + "jebhhifdcjdbgfaj", + "ciiajeafhb", + "ahgjhaih", + "ffhjjjdf", + "igbfdbcgdced", + "hhi", + "ajadfhdbfic", + "dcicgbegafchdjbeaiac", + "eeaieibbaahbj", + "jaefgbgajceddada", + "abdaeff", + "baggdhigcidi", + "digibh", + "beeahagffig", + "hecafdaibjac", + "cbdiaaecebgddfebcgeg", + "cjdid", + "iag", + "fdejghdbchcfhcc", + "gieg", + "hafhhjda", + "cfiacbfbjaj", + "acaaecbfa", + "fghcdbhihfjgggbbe", + "ddjiachf", + "bceefdfch", + "cibbcjfajbicjbeg", + "eehbcbiebhdj", + "ecdjefcagc", + "cjfedhjgecdicejej", + "eachghacfd", + "bbeeabfgcj", + "cjcibgaiji", + "fijacjhbcce", + "cdgjc", + "echbchiiahbieeabeaj", + "bhad", + "heeegadbjcbbh", + "biaga", + "giijhchaidhajja", + "aiccg", + "jahigbhcijfceifab", + "gbba", + "chfjehffad", + "acbfagcdiei", + "dbjbhabehejgacigjief", + "jdgbghhc", + "iigffdaibedidbgai", + "efhhbddeadaeedcbe", + "hbaggcdhajeecf", + "baachfdfihfhec", + "hfhgcafh", + "if", + "ebddaigjbche", + "ggcebefhcif", + "cdhcfeghheadhb", + "ibigdgehibfheafg", + "ajgjdbediidiiedgbbj", + "egcefhcaegcchab", + "ffcccigbgddhiej", + "jiihhffbdba", + "higcb", + "bdcj", + "iibjghgddgibjdbhg", + "jjbfgjbaegfeafdice", + "eicfigbgcbfbh", + "hbc", + "ddai", + "ebgedc", + "dihhegaedie", + "hhichheibgh", + "ibfghigejcgccdgfhha", + "hjaefhhgbeaabiiiia", + "jcbgfbi", + "iib", + "dgifigccgeajacad", + "ajadieihjddajf", + "daaebahhceaaccjce", + "ebcegebbaehihc", + "dcdigbbfcjfjgejafih", + "cahaeid", + "jgadcfbiebh", + "bjgehica", + "jcdbecicddhgdcgah", + "abebiggeegied", + "iegidfdcaghbh", + "abcgjhccecihjcehjbih", + "ggbjjdbj", + "ebd", + "hb", + "aegifehccjbfjdfgh", + "fcgfhjef", + "jcjecfjg", + "cfjfejehj", + "ebehfcefjagdehbgaf", + "acbfcjbaacf", + "ghfiiihbafg", + "ggjfhjejjjebgi", + "bedeg", + "jhcgbdabcicjjcf", + "jggejdjb", + "gj", + "jdj", + "bd", + "bihffeibbhhahdeh", + "ciii", + "ggggfigdahcbcggaea", + "heibfaefccbcbjdjhf", + "ej", + "ijfia", + "geaffgjgcdhfaigjhb", + "jggbjcbjaigbhcajdgf", + "ihjia", + "cdafebccdfiejbihfa", + "hcbfh", + "cibeabfaceadjdcahcje", + "cedhehfggahfdjafi", + "idehcgghh", + "ecbbahfbjga", + "agegadhbcbggdjh", + "icebg", + "gdfhjdhgfi", + "iibajaagg", + "bc", + "egdjeb", + "ifg", + "dbdihce", + "djgcddgfhhjhfeficfb", + "aifei", + "adgbahccdhfggidff", + "chaheaaibfjgaicjggi", + "fabibje", + "fgca", + "dcfgejefjediehebfe", + "jhcjjbehdaefehgfgddb", + "gedfbgbddddgjihdai", + "iheijfcccgjjic", + "jhdcijachjdicida", + "cdcgdjgbdgceagbgccij", + "ijehdcaaii", + "cedgjjcaga", + "gbiahdcdbbgc", + "dhdjjfgiic", + "efajajhfdhggbdhd", + "cibdgdchfiagcddihfe", + "ffbbjbe", + "afjib", + "ddgicdhhcjebgijihfd", + "ddchbjfed", + "gjedbhgj", + "jdb", + "ijea", + "hcjjhhecfa", + "cghffiidjddgdjfig", + "gjgebbhghbabfdfb", + "gaeddgibiddfe", + "hgihcbchageicggajg", + "dadhjcfejbcefgdjgde", + "agdbegjjdciicffc", + "ggahfhcgdj", + "ijaiiheecg", + "eeficbjfbdjafbib", + "bfagahdeddaeje", + "fjagijihjaadj", + "hecgddeahd", + "jahccjdhgajhbcdhe", + "bjae", + "aggjagjdeejfbc", + "fcefadj", + "gaadg", + "bcgdidjaiihabfg", + "bfbjidcjbgaggd", + "aggfjjgibd", + "hfidbgiaiegcff", + "dchegbggcgi", + "idij", + "gabbcdedcbieaefhcdbg", + "iidbdidehdjj", + "dbfdhebhiehh", + "dgdbj", + "fdfcjhjigcgbaibhcifi", + "eadaafhfgdagajbe", + "abagbjaaibb", + "jhdjbfjfiijccdedd", + "gbcd", + "cedfiabchdijgbh", + "ahjdbbja", + "jiaag", + "ghiifaiehaajc", + "iejifjdchjci", + "iacgi", + "hdgf", + }, + [][]int{ + []int{5, 830}, + []int{7, 352}, + []int{347, 10}, + []int{347, 12}, + []int{19, 102}, + []int{71, 19}, + []int{125, 31}, + []int{40, 610}, + []int{886, 69}, + []int{69, 274}, + []int{69, 280}, + []int{74, 104}, + []int{274, 74}, + []int{80, 104}, + []int{80, 178}, + []int{110, 471}, + []int{886, 122}, + []int{122, 553}, + []int{125, 30}, + []int{30, 125}, + []int{142, 104}, + []int{306, 142}, + []int{570, 146}, + []int{172, 162}, + []int{155, 172}, + []int{142, 178}, + []int{178, 186}, + []int{104, 178}, + []int{186, 306}, + []int{306, 186}, + []int{553, 190}, + []int{200, 30}, + []int{162, 200}, + []int{208, 430}, + []int{213, 104}, + []int{104, 213}, + []int{220, 610}, + []int{155, 220}, + []int{225, 104}, + []int{102, 225}, + []int{226, 185}, + []int{306, 226}, + []int{226, 426}, + []int{233, 104}, + []int{452, 233}, + []int{19, 238}, + []int{238, 881}, + []int{325, 245}, + []int{270, 155}, + []int{102, 270}, + []int{274, 104}, + []int{71, 274}, + []int{274, 734}, + []int{734, 280}, + []int{280, 69}, + []int{281, 104}, + []int{325, 288}, + []int{316, 155}, + []int{155, 316}, + []int{325, 104}, + []int{610, 325}, + []int{329, 102}, + []int{101, 329}, + []int{329, 696}, + []int{652, 344}, + []int{347, 104}, + []int{162, 347}, + []int{353, 142}, + []int{367, 901}, + []int{218, 417}, + []int{424, 185}, + []int{610, 424}, + []int{424, 510}, + []int{426, 306}, + []int{185, 426}, + []int{426, 226}, + []int{570, 430}, + []int{430, 208}, + []int{570, 447}, + []int{452, 185}, + []int{185, 452}, + []int{465, 755}, + []int{467, 71}, + []int{162, 467}, + []int{471, 185}, + []int{101, 471}, + []int{274, 502}, + []int{502, 901}, + []int{162, 503}, + []int{510, 610}, + []int{185, 510}, + []int{510, 424}, + []int{526, 155}, + []int{101, 526}, + []int{553, 104}, + []int{101, 553}, + []int{901, 558}, + []int{558, 424}, + []int{717, 566}, + []int{570, 102}, + []int{185, 570}, + []int{603, 130}, + []int{606, 30}, + []int{162, 639}, + []int{652, 185}, + []int{162, 652}, + []int{662, 316}, + []int{306, 662}, + []int{696, 101}, + []int{102, 696}, + []int{696, 329}, + []int{700, 162}, + []int{155, 700}, + []int{270, 731}, + []int{731, 19}, + []int{10, 732}, + []int{734, 71}, + []int{104, 734}, + []int{734, 274}, + []int{735, 19}, + []int{743, 867}, + []int{757, 71}, + []int{306, 757}, + []int{770, 329}, + []int{344, 775}, + []int{102, 775}, + []int{306, 783}, + []int{200, 795}, + []int{797, 391}, + []int{818, 279}, + []int{830, 306}, + []int{102, 830}, + []int{373, 845}, + []int{757, 852}, + []int{852, 186}, + []int{71, 852}, + []int{867, 101}, + []int{71, 867}, + []int{879, 30}, + []int{104, 879}, + []int{325, 880}, + []int{881, 71}, + []int{610, 881}, + []int{883, 185}, + []int{883, 426}, + []int{886, 155}, + []int{104, 886}, + []int{901, 71}, + []int{185, 901}, + []int{881, 928}, + []int{104, 953}, + []int{274, 957}, + []int{558, 962}, + }, + }, + + { + []string{ + "bat", + }, + [][]int{}, + }, + + { + []string{ + "bat", + "tab", + "cat", + }, + [][]int{ + []int{0, 1}, + []int{1, 0}, + }, + }, + + { + []string{ + "abcd", + "dcba", + "lls", + "s", + "sssll", + }, + [][]int{ + []int{0, 1}, + []int{1, 0}, + []int{3, 2}, + []int{2, 4}, + }, + }, + + // 可以有多个 testcase +} + +func Test_palindromePairs(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, palindromePairs(tc.words), "输入:%v", tc) + } +} + +func Benchmark_palindromePairs(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + palindromePairs(tc.words) + } + } +} diff --git a/Algorithms/0337.house-robber-iii/README.md b/Algorithms/0337.house-robber-iii/README.md new file mode 100755 index 000000000..8dc9e166f --- /dev/null +++ b/Algorithms/0337.house-robber-iii/README.md @@ -0,0 +1,32 @@ +# [337. House Robber III](https://leetcode.com/problems/house-robber-iii/) + +## 题目 +The thief has found himself a new place for his thievery again. There is only one entrance to this area, called the "root." Besides the root, each house has one and only one parent house. After a tour, the smart thief realized that "all houses in this place forms a binary tree". It will automatically contact the police if two directly-linked houses were broken into on the same night. + +Determine the maximum amount of money the thief can rob tonight without alerting the police. + +Example 1: +``` + 3 + / \ + 2 3 + \ \ + 3 1 +``` +Maximum amount of money the thief can rob = 3 + 3 + 1 = 7. + +Example 2: +``` + 3 + / \ + 4 5 + / \ \ + 1 3 1 +``` +Maximum amount of money the thief can rob = 4 + 5 = 9. + +Credits:Special thanks to @dietpepsi for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0337.house-robber-iii/house-robber-iii.go b/Algorithms/0337.house-robber-iii/house-robber-iii.go new file mode 100755 index 000000000..70417b3d8 --- /dev/null +++ b/Algorithms/0337.house-robber-iii/house-robber-iii.go @@ -0,0 +1,33 @@ +package Problem0337 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" +) + +type TreeNode = kit.TreeNode + +func rob(root *TreeNode) int { + var dfs func(*TreeNode) (int, int) + // a 抢劫 root 节点时的最大值 + // b 不抢劫 root 节点时的最大值 + dfs = func(root *TreeNode) (a, b int) { + if root == nil { + return 0, 0 + } + la, lb := dfs(root.Left) + ra, rb := dfs(root.Right) + a = root.Val + lb + rb + b = max(la, lb) + max(ra, rb) + return a, b + } + + a, b := dfs(root) + return max(a, b) +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} diff --git a/Algorithms/0337.house-robber-iii/house-robber-iii_test.go b/Algorithms/0337.house-robber-iii/house-robber-iii_test.go new file mode 100755 index 000000000..caf63537e --- /dev/null +++ b/Algorithms/0337.house-robber-iii/house-robber-iii_test.go @@ -0,0 +1,56 @@ +package Problem0337 + +import ( + "fmt" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + pre, in []int + ans int +}{ + + { + []int{5, 2, 4, 1, 3, 1000}, + []int{2, 4, 5, 1, 3, 1000}, + 1009, + }, + + { + []int{5, 2, 4, 1, 3}, + []int{2, 4, 5, 1, 3}, + 12, + }, + + { + []int{3, 4, 1, 3, 5, 1}, + []int{1, 4, 3, 3, 5, 1}, + 9, + }, + + // 可以有多个 testcase +} + +func Test_rob(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + root := kit.PreIn2Tree(tc.pre, tc.in) + ast.Equal(tc.ans, rob(root), "输入:%v", tc) + } +} + +func Benchmark_rob(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + root := kit.PreIn2Tree(tc.pre, tc.in) + rob(root) + } + } +} diff --git a/Algorithms/0338.counting-bits/README.md b/Algorithms/0338.counting-bits/README.md new file mode 100755 index 000000000..d409165c4 --- /dev/null +++ b/Algorithms/0338.counting-bits/README.md @@ -0,0 +1,23 @@ +# [338. Counting Bits](https://leetcode.com/problems/counting-bits/) + +## 题目 + +Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation and return them as an array. + +Example: + +```text +For num = 5 you should return [0,1,1,2,1,2]. +``` + +Follow up: + +1. It is very easy to come up with a solution with run time O(n*sizeof(integer)). But can you do it in linear time O(n) /possibly in a single pass? +1. Space complexity should be O(n). +1. Can you do it like a boss? Do it without using any builtin function like __builtin_popcount in c++ or in any other language. + +Credits:Special thanks to @ syedee for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0338.counting-bits/counting-bits.go b/Algorithms/0338.counting-bits/counting-bits.go new file mode 100755 index 000000000..02afaa210 --- /dev/null +++ b/Algorithms/0338.counting-bits/counting-bits.go @@ -0,0 +1,19 @@ +package Problem0338 + +func countBits(num int) []int { + res := make([]int, num+1) + for i := 1; i <= num; i++ { + // i>>1 == i/2 + // i&1 == i%2 + // 只是 位运算 更快 + // + // 观察以下三个数的二进制表示 + // 5 : 101 + // 10: 1010, 10>>1 == 5 + // 11: 1011, 11>>1 == 5 + // 10 的二进制表示,含有 1 的个数,可以由 5 的答案 + 10%2 计算 + // 11 同理 + res[i] = res[i>>1] + i&1 + } + return res +} diff --git a/Algorithms/0338.counting-bits/counting-bits_test.go b/Algorithms/0338.counting-bits/counting-bits_test.go new file mode 100755 index 000000000..5eb74ac0a --- /dev/null +++ b/Algorithms/0338.counting-bits/counting-bits_test.go @@ -0,0 +1,37 @@ +package Problem0338 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + num int + ans []int +}{ + + { + 5, + []int{0, 1, 1, 2, 1, 2}, + }, + + // 可以有多个 testcase +} + +func Test_countBits(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, countBits(tc.num), "输入:%v", tc) + } +} + +func Benchmark_countBits(b *testing.B) { + for i := 0; i < b.N; i++ { + countBits(1000) + } +} diff --git a/Algorithms/0342.power-of-four/README.md b/Algorithms/0342.power-of-four/README.md new file mode 100755 index 000000000..21b6447ca --- /dev/null +++ b/Algorithms/0342.power-of-four/README.md @@ -0,0 +1,17 @@ +# [342. Power of Four](https://leetcode.com/problems/power-of-four/) + +## 题目 + +Given an integer (signed 32 bits), write a function to check whether it is a power of 4. + +Example: +Given num = 16, return true. +Given num = 5, return false. + +Follow up: Could you solve it without loops/recursion? + +Credits:Special thanks to @yukuairoy for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0342.power-of-four/power-of-four.go b/Algorithms/0342.power-of-four/power-of-four.go new file mode 100755 index 000000000..4d6c8b2de --- /dev/null +++ b/Algorithms/0342.power-of-four/power-of-four.go @@ -0,0 +1,13 @@ +package Problem0342 + +func isPowerOfFour(n int) bool { + if n < 1 { + return false + } + + for n%4 == 0 { + n /= 4 + } + + return n == 1 +} diff --git a/Algorithms/0342.power-of-four/power-of-four_test.go b/Algorithms/0342.power-of-four/power-of-four_test.go new file mode 100755 index 000000000..37fbca0a6 --- /dev/null +++ b/Algorithms/0342.power-of-four/power-of-four_test.go @@ -0,0 +1,38 @@ +package Problem0342 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + num int + ans bool +}{ + + {16, true}, + {5, false}, + {-5, false}, + + // 可以有多个 testcase +} + +func Test_isPowerOfFour(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, isPowerOfFour(tc.num), "输入:%v", tc) + } +} + +func Benchmark_isPowerOfFour(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + isPowerOfFour(tc.num) + } + } +} diff --git a/Algorithms/0343.integer-break/README.md b/Algorithms/0343.integer-break/README.md new file mode 100755 index 000000000..a171c8657 --- /dev/null +++ b/Algorithms/0343.integer-break/README.md @@ -0,0 +1,15 @@ +# [343. Integer Break](https://leetcode.com/problems/integer-break/) + +## 题目 + +Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum product you can get. + +For example, given n = 2, return 1 (2 = 1 + 1); given n = 10, return 36 (10 = 3 + 3 + 4). + +Note: You may assume that n is not less than 2 and not larger than 58. + +Credits:Special thanks to @jianchao.li.fighter for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0343.integer-break/integer-break.go b/Algorithms/0343.integer-break/integer-break.go new file mode 100755 index 000000000..fc27e92ac --- /dev/null +++ b/Algorithms/0343.integer-break/integer-break.go @@ -0,0 +1,34 @@ +package Problem0343 + +func integerBreak(n int) int { + if n == 2 { + return 1 + } + + if n == 3 { + return 2 + } + + switch n % 3 { + case 0: + return pow3(n / 3) + case 1: + return 4 * pow3(n/3-1) + default: + return 2 * pow3(n/3) + } + +} + +func pow3(n int) int { + if n == 0 { + return 1 + } + + res := pow3(n >> 1) + if n&1 == 0 { + return res * res + } + + return res * res * 3 +} diff --git a/Algorithms/0343.integer-break/integer-break_test.go b/Algorithms/0343.integer-break/integer-break_test.go new file mode 100755 index 000000000..352cfb73c --- /dev/null +++ b/Algorithms/0343.integer-break/integer-break_test.go @@ -0,0 +1,41 @@ +package Problem0343 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + n int + ans int +}{ + + {2, 1}, + {3, 2}, + {58, 1549681956}, + {9, 27}, + {10, 36}, + {11, 54}, + + // 可以有多个 testcase +} + +func Test_integerBreak(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, integerBreak(tc.n), "输入:%v", tc) + } +} + +func Benchmark_integerBreak(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + integerBreak(tc.n) + } + } +} diff --git a/Algorithms/0344.reverse-string/README.md b/Algorithms/0344.reverse-string/README.md new file mode 100755 index 000000000..3f4810ec8 --- /dev/null +++ b/Algorithms/0344.reverse-string/README.md @@ -0,0 +1,12 @@ +# [344. Reverse String](https://leetcode.com/problems/reverse-string/) + +## 题目 + +Write a function that takes a string as input and returns the string reversed. + +Example: +Given s = "hello", return "olleh". + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0344.reverse-string/reverse-string.go b/Algorithms/0344.reverse-string/reverse-string.go new file mode 100755 index 000000000..3a48d4fa6 --- /dev/null +++ b/Algorithms/0344.reverse-string/reverse-string.go @@ -0,0 +1,15 @@ +package Problem0344 + +func reverseString(s string) string { + bytes := []byte(s) + + i, j := 0, len(s)-1 + + for i < j { + bytes[i], bytes[j] = bytes[j], bytes[i] + i++ + j-- + } + + return string(bytes) +} diff --git a/Algorithms/0344.reverse-string/reverse-string_test.go b/Algorithms/0344.reverse-string/reverse-string_test.go new file mode 100755 index 000000000..0151a042b --- /dev/null +++ b/Algorithms/0344.reverse-string/reverse-string_test.go @@ -0,0 +1,37 @@ +package Problem0344 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + ans string +}{ + + {"hello", "olleh"}, + {"world", "dlrow"}, + + // 可以有多个 testcase +} + +func Test_reverseString(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, reverseString(tc.s), "输入:%v", tc) + } +} + +func Benchmark_reverseString(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + reverseString(tc.s) + } + } +} diff --git a/Algorithms/0345.reverse-vowels-of-a-string/README.md b/Algorithms/0345.reverse-vowels-of-a-string/README.md new file mode 100755 index 000000000..aed336862 --- /dev/null +++ b/Algorithms/0345.reverse-vowels-of-a-string/README.md @@ -0,0 +1,18 @@ +# [345. Reverse Vowels of a String](https://leetcode.com/problems/reverse-vowels-of-a-string/) + +## 题目 + +Write a function that takes a string as input and reverse only the vowels of a string. + +Example 1: +Given s = "hello", return "holle". + +Example 2: +Given s = "leetcode", return "leotcede". + +Note: +The vowels does not include the letter "y". + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0345.reverse-vowels-of-a-string/reverse-vowels-of-a-string.go b/Algorithms/0345.reverse-vowels-of-a-string/reverse-vowels-of-a-string.go new file mode 100755 index 000000000..12329e321 --- /dev/null +++ b/Algorithms/0345.reverse-vowels-of-a-string/reverse-vowels-of-a-string.go @@ -0,0 +1,28 @@ +package Problem0345 + +func reverseVowels(s string) string { + bytes := []byte(s) + i, j := 0, len(s)-1 + for { + for i < len(s) && !isVowel(bytes[i]) { + i++ + } + for 0 <= j && !isVowel(bytes[j]) { + j-- + } + + if i >= j { + break + } + + bytes[i], bytes[j] = bytes[j], bytes[i] + i++ + j-- + } + + return string(bytes) +} + +func isVowel(b byte) bool { + return b == 'a' || b == 'e' || b == 'i' || b == 'o' || b == 'u' || b == 'A' || b == 'E' || b == 'I' || b == 'O' || b == 'U' +} diff --git a/Algorithms/0345.reverse-vowels-of-a-string/reverse-vowels-of-a-string_test.go b/Algorithms/0345.reverse-vowels-of-a-string/reverse-vowels-of-a-string_test.go new file mode 100755 index 000000000..17d19330e --- /dev/null +++ b/Algorithms/0345.reverse-vowels-of-a-string/reverse-vowels-of-a-string_test.go @@ -0,0 +1,40 @@ +package Problem0345 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + ans string +}{ + + {"hello", "holle"}, + + {"leetcode", "leotcede"}, + + {"aA", "Aa"}, + + // 可以有多个 testcase +} + +func Test_reverseVowels(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, reverseVowels(tc.s), "输入:%v", tc) + } +} + +func Benchmark_reverseVowels(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + reverseVowels(tc.s) + } + } +} diff --git a/Algorithms/0347.top-k-frequent-elements/README.md b/Algorithms/0347.top-k-frequent-elements/README.md new file mode 100755 index 000000000..45ebf83d2 --- /dev/null +++ b/Algorithms/0347.top-k-frequent-elements/README.md @@ -0,0 +1,17 @@ +# [347. Top K Frequent Elements](https://leetcode.com/problems/top-k-frequent-elements/) + +## 题目 + +Given a non-empty array of integers, return the k most frequent elements. + +For example, +Given [1,1,1,2,2,3] and k = 2, return [1,2]. + +Note: + +1. You may assume k is always valid, 1 ≤ k ≤ number of unique elements. +1. Your algorithm's time complexity must be better than O(n log n), where n is the array's size. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0347.top-k-frequent-elements/top-k-frequent-elements.go b/Algorithms/0347.top-k-frequent-elements/top-k-frequent-elements.go new file mode 100755 index 000000000..00cc06fc9 --- /dev/null +++ b/Algorithms/0347.top-k-frequent-elements/top-k-frequent-elements.go @@ -0,0 +1,29 @@ +package Problem0347 + +import "sort" + +func topKFrequent(nums []int, k int) []int { + res := make([]int, 0, k) + // 统计每个数字出现的次数 + rec := make(map[int]int, len(nums)) + for _, n := range nums { + rec[n]++ + } + // 对出现次数进行排序 + counts := make([]int, 0, len(rec)) + for _, c := range rec { + counts = append(counts, c) + } + sort.Ints(counts) + // min 是 前 k 个高频数字的底线 + min := counts[len(counts)-k] + + // 收集所有 不低于 底线的数字 + for n, c := range rec { + if c >= min { + res = append(res, n) + } + } + + return res +} diff --git a/Algorithms/0347.top-k-frequent-elements/top-k-frequent-elements_test.go b/Algorithms/0347.top-k-frequent-elements/top-k-frequent-elements_test.go new file mode 100755 index 000000000..7f9d37231 --- /dev/null +++ b/Algorithms/0347.top-k-frequent-elements/top-k-frequent-elements_test.go @@ -0,0 +1,40 @@ +package Problem0347 + +import ( + "fmt" + "sort" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + k int + ans []int +}{ + + {[]int{1, 1, 1, 2, 2, 3}, 2, []int{1, 2}}, + + // 可以有多个 testcase +} + +func Test_topKFrequent(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ans := topKFrequent(tc.nums, tc.k) + sort.Ints(ans) + ast.Equal(tc.ans, ans, "输入:%v", tc) + } +} + +func Benchmark_topKFrequent(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + topKFrequent(tc.nums, tc.k) + } + } +} diff --git a/Algorithms/0349.intersection-of-two-arrays/README.md b/Algorithms/0349.intersection-of-two-arrays/README.md new file mode 100755 index 000000000..5675799c3 --- /dev/null +++ b/Algorithms/0349.intersection-of-two-arrays/README.md @@ -0,0 +1,19 @@ +# [349. Intersection of Two Arrays](https://leetcode.com/problems/intersection-of-two-arrays/) + +## 题目 + +Given two arrays, write a function to compute their intersection. + +Example: +Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2]. + +Note: + +1. Each element in the result must be unique. +1. The result can be in any order. + +## 解题思路 + +intersection: 交集 + +见程序注释 diff --git a/Algorithms/0349.intersection-of-two-arrays/intersection-of-two-arrays.go b/Algorithms/0349.intersection-of-two-arrays/intersection-of-two-arrays.go new file mode 100755 index 000000000..325e41da5 --- /dev/null +++ b/Algorithms/0349.intersection-of-two-arrays/intersection-of-two-arrays.go @@ -0,0 +1,30 @@ +package Problem0349 + +func intersection(a1, a2 []int) []int { + res := []int{} + m1 := getInts(a1) + m2 := getInts(a2) + + if len(m1) > len(m2) { + m1, m2 = m2, m1 + } + // m1 是较短的字典,会快一些 + for n := range m1 { + if m2[n] { + res = append(res, n) + } + } + + return res +} + +// 清理重复的值,也便于查询 +func getInts(a []int) map[int]bool { + res := make(map[int]bool, len(a)) + + for i := range a { + res[a[i]] = true + } + + return res +} diff --git a/Algorithms/0349.intersection-of-two-arrays/intersection-of-two-arrays_test.go b/Algorithms/0349.intersection-of-two-arrays/intersection-of-two-arrays_test.go new file mode 100755 index 000000000..19a3f5591 --- /dev/null +++ b/Algorithms/0349.intersection-of-two-arrays/intersection-of-two-arrays_test.go @@ -0,0 +1,37 @@ +package Problem0349 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums1 []int + nums2 []int + ans []int +}{ + + {[]int{1, 2, 2, 1}, []int{2, 2}, []int{2}}, + + // 可以有多个 testcase +} + +func Test_intersection(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, intersection(tc.nums1, tc.nums2), "输入:%v", tc) + } +} + +func Benchmark_intersection(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + intersection(tc.nums1, tc.nums2) + } + } +} diff --git a/Algorithms/0350.intersection-of-two-arrays-ii/README.md b/Algorithms/0350.intersection-of-two-arrays-ii/README.md new file mode 100755 index 000000000..fd1844929 --- /dev/null +++ b/Algorithms/0350.intersection-of-two-arrays-ii/README.md @@ -0,0 +1,23 @@ +# [350. Intersection of Two Arrays II](https://leetcode.com/problems/intersection-of-two-arrays-ii/) + +## 题目 + +Given two arrays, write a function to compute their intersection. + +Example: +Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2, 2]. + +Note: + +1. Each element in the result should appear as many times as it shows in both arrays. +1. The result can be in any order. + +Follow up: + +1. What if the given array is already sorted? How would you optimize your algorithm? +1. What if nums1's size is small compared to nums2's size? Which algorithm is better? +1. What if elements of nums2 are stored on disk, and the memory is limited such that you cannot load all elements into the memory at once? + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0350.intersection-of-two-arrays-ii/intersection-of-two-arrays-ii.go b/Algorithms/0350.intersection-of-two-arrays-ii/intersection-of-two-arrays-ii.go new file mode 100755 index 000000000..d0df74e2d --- /dev/null +++ b/Algorithms/0350.intersection-of-two-arrays-ii/intersection-of-two-arrays-ii.go @@ -0,0 +1,41 @@ +package Problem0350 + +func intersect(a1, a2 []int) []int { + res := []int{} + m1 := getInts(a1) + m2 := getInts(a2) + + if len(m1) > len(m2) { + m1, m2 = m2, m1 + } + // m1 是较短的字典,会快一些 + for n := range m1 { + m1[n] = min(m1[n], m2[n]) + } + + for n, size := range m1 { + for i := 0; i < size; i++ { + res = append(res, n) + } + } + + return res +} + +// 清理重复的值,也便于查询 +func getInts(a []int) map[int]int { + res := make(map[int]int, len(a)) + + for i := range a { + res[a[i]]++ + } + + return res +} + +func min(a, b int) int { + if a < b { + return a + } + return b +} diff --git a/Algorithms/0350.intersection-of-two-arrays-ii/intersection-of-two-arrays-ii_test.go b/Algorithms/0350.intersection-of-two-arrays-ii/intersection-of-two-arrays-ii_test.go new file mode 100755 index 000000000..8bd6ba141 --- /dev/null +++ b/Algorithms/0350.intersection-of-two-arrays-ii/intersection-of-two-arrays-ii_test.go @@ -0,0 +1,43 @@ +package Problem0350 + +import ( + "fmt" + "sort" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums1 []int + nums2 []int + ans []int +}{ + + {[]int{1, 2, 2, 1}, []int{2, 2}, []int{2, 2}}, + {[]int{1, 3, 3, 3, 2, 2, 1}, []int{3, 2, 2}, []int{2, 2, 3}}, + + // 可以有多个 testcase +} + +func Test_intersect(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + + ans := intersect(tc.nums1, tc.nums2) + sort.Ints(ans) + + ast.Equal(tc.ans, ans, "输入:%v", tc) + } +} + +func Benchmark_intersect(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + intersect(tc.nums1, tc.nums2) + } + } +} diff --git a/Algorithms/0352.data-stream-as-disjoint-intervals/README.md b/Algorithms/0352.data-stream-as-disjoint-intervals/README.md new file mode 100755 index 000000000..0c27e9933 --- /dev/null +++ b/Algorithms/0352.data-stream-as-disjoint-intervals/README.md @@ -0,0 +1,24 @@ +# [352. Data Stream as Disjoint Intervals](https://leetcode.com/problems/data-stream-as-disjoint-intervals/) + +## 题目 + +Given a data stream input of non-negative integers a1, a2, ..., an, ..., summarize the numbers seen so far as a list of disjoint intervals. + +For example, suppose the integers from the data stream are 1, 3, 7, 2, 6, ..., then the summary will be: + +```text +[1, 1] +[1, 1], [3, 3] +[1, 1], [3, 3], [7, 7] +[1, 3], [7, 7] +[1, 3], [6, 7] +``` + +Follow up: +What if there are lots of merges and the number of disjoint intervals are small compared to the data stream's size? + +Credits:Special thanks to @yunhong for adding this problem and creating most of the test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0352.data-stream-as-disjoint-intervals/data-stream-as-disjoint-intervals.go b/Algorithms/0352.data-stream-as-disjoint-intervals/data-stream-as-disjoint-intervals.go new file mode 100755 index 000000000..9a09d5214 --- /dev/null +++ b/Algorithms/0352.data-stream-as-disjoint-intervals/data-stream-as-disjoint-intervals.go @@ -0,0 +1,100 @@ +package Problem0352 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" +) + +/** + * Definition for an interval. + * type Interval struct { + * Start int + * End int + * } + */ +type Interval = kit.Interval + +type SummaryRanges struct { + is []Interval +} + +/** Initialize your data structure here. */ +func Constructor() SummaryRanges { + return SummaryRanges{} +} + +func (sr *SummaryRanges) Addnum(val int) { + if sr.is == nil { + sr.is = []Interval{ + Interval{ + Start: val, + End: val, + }, + } + return + } + + lo, hi := 0, len(sr.is)-1 + for lo <= hi { + mid := lo + (hi-lo)>>1 + if sr.is[mid].Start <= val && val <= sr.is[mid].End { + return + } else if val < sr.is[mid].Start { + hi = mid - 1 + } else { + lo = mid + 1 + } + } + + if lo == 0 { + if sr.is[0].Start-1 == val { + sr.is[0].Start-- + return + } + ni := Interval{Start: val, End: val} + sr.is = append(sr.is, ni) + copy(sr.is[1:], sr.is) + sr.is[0] = ni + return + } + + if lo == len(sr.is) { + if sr.is[lo-1].End+1 == val { + sr.is[lo-1].End++ + return + } + sr.is = append(sr.is, Interval{Start: val, End: val}) + return + } + + if sr.is[lo-1].End+1 < val && val < sr.is[lo].Start-1 { + sr.is = append(sr.is, Interval{}) + copy(sr.is[lo+1:], sr.is[lo:]) + sr.is[lo] = Interval{Start: val, End: val} + return + } + + if sr.is[lo-1].End == val-1 && val+1 == sr.is[lo].Start { + sr.is[lo-1].End = sr.is[lo].End + n := len(sr.is) + copy(sr.is[lo:], sr.is[lo+1:]) + sr.is = sr.is[:n-1] + return + } + + if sr.is[lo-1].End == val-1 { + sr.is[lo-1].End++ + } else { + sr.is[lo].Start-- + } +} + +func (sr *SummaryRanges) Getintervals() []Interval { + return sr.is +} + +/** + * Your SummaryRanges object will be instantiated and called as such: + * obj := Constructor(); + * obj.Addnum(val); + * param_2 := obj.Getintervals(); + */ diff --git a/Algorithms/0352.data-stream-as-disjoint-intervals/data-stream-as-disjoint-intervals_test.go b/Algorithms/0352.data-stream-as-disjoint-intervals/data-stream-as-disjoint-intervals_test.go new file mode 100755 index 000000000..e5771982f --- /dev/null +++ b/Algorithms/0352.data-stream-as-disjoint-intervals/data-stream-as-disjoint-intervals_test.go @@ -0,0 +1,99 @@ +package Problem0352 + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_Constructor(t *testing.T) { + ast := assert.New(t) + + sr := Constructor() + + sr.Addnum(1) + ast.Equal([]Interval{Interval{Start: 1, End: 1}}, sr.Getintervals()) + + sr.Addnum(7) + ast.Equal([]Interval{ + Interval{Start: 1, End: 1}, + Interval{Start: 7, End: 7}, + }, + sr.Getintervals(), + ) + + sr.Addnum(3) + ast.Equal([]Interval{ + Interval{Start: 1, End: 1}, + Interval{Start: 3, End: 3}, + Interval{Start: 7, End: 7}, + }, + sr.Getintervals(), + ) + + sr.Addnum(2) + ast.Equal([]Interval{ + Interval{Start: 1, End: 3}, + Interval{Start: 7, End: 7}, + }, + sr.Getintervals(), + ) + + sr.Addnum(8) + ast.Equal([]Interval{ + Interval{Start: 1, End: 3}, + Interval{Start: 7, End: 8}, + }, + sr.Getintervals(), + ) + + sr.Addnum(2) + ast.Equal([]Interval{ + Interval{Start: 1, End: 3}, + Interval{Start: 7, End: 8}, + }, + sr.Getintervals(), + ) + + sr.Addnum(2) + ast.Equal([]Interval{ + Interval{Start: 1, End: 3}, + Interval{Start: 7, End: 8}, + }, + sr.Getintervals(), + ) + + sr.Addnum(4) + ast.Equal([]Interval{ + Interval{Start: 1, End: 4}, + Interval{Start: 7, End: 8}, + }, + sr.Getintervals(), + ) + + sr.Addnum(6) + ast.Equal([]Interval{ + Interval{Start: 1, End: 4}, + Interval{Start: 6, End: 8}, + }, + sr.Getintervals(), + ) + + sr.Addnum(0) + ast.Equal([]Interval{ + Interval{Start: 0, End: 4}, + Interval{Start: 6, End: 8}, + }, + sr.Getintervals(), + ) + + sr.Addnum(-2) + ast.Equal([]Interval{ + Interval{Start: -2, End: -2}, + Interval{Start: 0, End: 4}, + Interval{Start: 6, End: 8}, + }, + sr.Getintervals(), + ) + +} diff --git a/Algorithms/0354.russian-doll-envelopes/README.md b/Algorithms/0354.russian-doll-envelopes/README.md new file mode 100755 index 000000000..b289fe20c --- /dev/null +++ b/Algorithms/0354.russian-doll-envelopes/README.md @@ -0,0 +1,17 @@ +# [354. Russian Doll Envelopes](https://leetcode.com/problems/russian-doll-envelopes/) + +## 题目 + +You have a number of envelopes with widths and heights given as a pair of integers (w, h). One envelope can fit into another if and only if both the width and height of one envelope is greater than the width and height of the other envelope. + +What is the maximum number of envelopes can you Russian doll? (put one inside other) + +Example: + +```text +Given envelopes = [[5,4],[6,4],[6,7],[2,3]], the maximum number of envelopes you can Russian doll is 3 ([2,3] => [5,4] => [6,7]). +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0354.russian-doll-envelopes/russian-doll-envelopes.go b/Algorithms/0354.russian-doll-envelopes/russian-doll-envelopes.go new file mode 100755 index 000000000..9a65f270e --- /dev/null +++ b/Algorithms/0354.russian-doll-envelopes/russian-doll-envelopes.go @@ -0,0 +1,55 @@ +package Problem0354 + +import "sort" + +func maxEnvelopes(e [][]int) int { + if len(e) <= 1 { + return len(e) + } + + sort.Sort(sortedEnvelopes(e)) + + var tails []int + + for i := 0; i < len(e); i++ { + lo, hi := 0, len(tails) + // 按照信封高度来二分查找插入 + for lo < hi { + mid := (lo + hi) / 2 + if e[i][1] <= tails[mid] { + hi = mid + } else { + lo = mid + 1 + } + } + + // 出现了新高度,添加到 tail 尾部 + if lo == len(tails) { + tails = append(tails, e[i][1]) + } else { + // e[i][1] 是一个更合理的高度, + // 用 e[i][1] 替换掉 tails[lo] 可以避免遗漏最优解 + tails[lo] = e[i][1] + } + } + + return len(tails) +} + +type sortedEnvelopes [][]int + +func (s sortedEnvelopes) Len() int { + return len(s) +} + +func (s sortedEnvelopes) Less(i, j int) bool { + if s[i][0] == s[j][0] { + // 同样宽度时,矮信封排在后面 + return s[i][1] > s[j][1] + } + return s[i][0] < s[j][0] +} + +func (s sortedEnvelopes) Swap(i, j int) { + s[i], s[j] = s[j], s[i] +} diff --git a/Algorithms/0354.russian-doll-envelopes/russian-doll-envelopes_test.go b/Algorithms/0354.russian-doll-envelopes/russian-doll-envelopes_test.go new file mode 100755 index 000000000..191e6683b --- /dev/null +++ b/Algorithms/0354.russian-doll-envelopes/russian-doll-envelopes_test.go @@ -0,0 +1,61 @@ +package Problem0354 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + envelopes [][]int + ans int +}{ + + { + [][]int{ + []int{46, 89}, + []int{50, 53}, + []int{52, 68}, + []int{72, 45}, + []int{77, 81}, + }, + 3, + }, + + { + [][]int{ + []int{5, 4}, + []int{6, 4}, + []int{6, 7}, + []int{2, 3}, + []int{100, 4}, + }, + 3, + }, + + { + [][]int{}, + 0, + }, + + // 可以有多个 testcase +} + +func Test_maxEnvelopes(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, maxEnvelopes(tc.envelopes), "输入:%v", tc) + } +} + +func Benchmark_maxEnvelopes(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + maxEnvelopes(tc.envelopes) + } + } +} diff --git a/Algorithms/0355.design-twitter/README.md b/Algorithms/0355.design-twitter/README.md new file mode 100755 index 000000000..80815981a --- /dev/null +++ b/Algorithms/0355.design-twitter/README.md @@ -0,0 +1,43 @@ +# [355. Design Twitter](https://leetcode.com/problems/design-twitter/) + +## 题目 + +Design a simplified version of Twitter where users can post tweets, follow/unfollow another user and is able to see the 10 most recent tweets in the user's news feed. Your design should support the following methods: + +1. postTweet(userId, tweetId): Compose a new tweet. +1. getNewsFeed(userId): Retrieve the 10 most recent tweet ids in the user's news feed. Each item in the news feed must be posted by users who the user followed or by the user herself. Tweets must be ordered from most recent to least recent. +1. follow(followerId, followeeId): Follower follows a followee. +1. unfollow(followerId, followeeId): Follower unfollows a followee. + +Example: + +```text +Twitter twitter = new Twitter(); + +// User 1 posts a new tweet (id = 5). +twitter.postTweet(1, 5); + +// User 1's news feed should return a list with 1 tweet id -> [5]. +twitter.getNewsFeed(1); + +// User 1 follows user 2. +twitter.follow(1, 2); + +// User 2 posts a new tweet (id = 6). +twitter.postTweet(2, 6); + +// User 1's news feed should return a list with 2 tweet ids -> [6, 5]. +// Tweet id 6 should precede tweet id 5 because it is posted after tweet id 5. +twitter.getNewsFeed(1); + +// User 1 unfollows user 2. +twitter.unfollow(1, 2); + +// User 1's news feed should return a list with 1 tweet id -> [5], +// since user 1 is no longer following user 2. +twitter.getNewsFeed(1); +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0355.design-twitter/design-twitter.go b/Algorithms/0355.design-twitter/design-twitter.go new file mode 100755 index 000000000..a201d18ed --- /dev/null +++ b/Algorithms/0355.design-twitter/design-twitter.go @@ -0,0 +1,100 @@ +package Problem0355 + +import "sort" +import "time" + +type tweet struct { + id int + time int64 +} + +// tweets 用于排序 +type tweets []tweet + +func (t tweets) Len() int { + return len(t) +} +func (t tweets) Less(i, j int) bool { + return t[i].time > t[j].time +} +func (t tweets) Swap(i, j int) { + t[i], t[j] = t[j], t[i] +} + +// Twitter is twitter user +type Twitter struct { + userTweets map[int]tweets + follow map[int][]int +} + +// Constructor initialize your data structure here. +func Constructor() Twitter { + t := make(map[int]tweets) + f := make(map[int][]int) + return Twitter{userTweets: t, follow: f} +} + +// PostTweet compose a new tweet. +func (t *Twitter) PostTweet(userID int, tweetID int) { + t.userTweets[userID] = append( + t.userTweets[userID], + tweet{ + id: tweetID, + time: time.Now().UnixNano(), + }, + ) +} + +// GetNewsFeed retrieve the 10 most recent tweet ids in the user's news feed. Each item in the news feed must be posted by users who the user followed or by the user herself. Tweets must be ordered from most recent to least recent. +func (t *Twitter) GetNewsFeed(userID int) []int { + // 获取本人的 tweets + temp := make(tweets, len(t.userTweets[userID])) + copy(temp, t.userTweets[userID]) + // 获取 followee 的 tweets + for _, id := range t.follow[userID] { + temp = append(temp, t.userTweets[id]...) + } + // 按照时间排序 + sort.Sort(temp) + // 获取最近的 10 条或更少的内容 + res := make([]int, 0, 10) + for i := 0; i < len(temp) && i < 10; i++ { + res = append(res, temp[i].id) + } + return res +} + +// Follow followee. If the operation is invalid, it should be a no-op. +func (t *Twitter) Follow(followerID int, followeeID int) { + // 不能 follow 自己 + if followerID == followeeID { + return + } + // 不能重复 follow + for _, id := range t.follow[followerID] { + if id == followeeID { + return + } + } + + t.follow[followerID] = append(t.follow[followerID], followeeID) +} + +// Unfollow follower unfollows a followee. If the operation is invalid, it should be a no-op. +func (t *Twitter) Unfollow(followerID int, followeeID int) { + for i, id := range t.follow[followerID] { + if id == followeeID { + // 删除 followeeID 记录 + t.follow[followerID] = append(t.follow[followerID][:i], t.follow[followerID][i+1:]...) + } + } +} + +/** + * Your Twitter object will be instantiated and called as such: + * obj := Constructor(); + * obj.PostTweet(userID,tweetID); + * param_2 := obj.GetNewsFeed(userID); + * obj.Follow(followerID,followeeID); + * obj.Unfollow(followerID,followeeID); + */ diff --git a/Algorithms/0355.design-twitter/design-twitter_test.go b/Algorithms/0355.design-twitter/design-twitter_test.go new file mode 100755 index 000000000..99a4da361 --- /dev/null +++ b/Algorithms/0355.design-twitter/design-twitter_test.go @@ -0,0 +1,28 @@ +package Problem0355 + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_Constructor(t *testing.T) { + ast := assert.New(t) + twitter := Constructor() + + twitter.PostTweet(1, 5) + twitter.Follow(1, 1) + + ast.Equal([]int{5}, twitter.GetNewsFeed(1)) + + twitter.Follow(1, 2) + + twitter.PostTweet(2, 4) + + ast.Equal([]int{4, 5}, twitter.GetNewsFeed(1)) + + twitter.Follow(1, 2) + twitter.Unfollow(1, 2) + + ast.Equal([]int{5}, twitter.GetNewsFeed(1)) +} diff --git a/Algorithms/0357.count-numbers-with-unique-digits/README.md b/Algorithms/0357.count-numbers-with-unique-digits/README.md new file mode 100755 index 000000000..5799ae131 --- /dev/null +++ b/Algorithms/0357.count-numbers-with-unique-digits/README.md @@ -0,0 +1,14 @@ +# [357. Count Numbers with Unique Digits](https://leetcode.com/problems/count-numbers-with-unique-digits/) + +## 题目 + +Given a non-negative integer n, count all numbers with unique digits, x, where 0 ≤ x < 10n. + +Example: +Given n = 2, return 91. (The answer should be the total numbers in the range of 0 ≤ x < 100, excluding [11,22,33,44,55,66,77,88,99]) + +Credits:Special thanks to @memoryless for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0357.count-numbers-with-unique-digits/count-numbers-with-unique-digits.go b/Algorithms/0357.count-numbers-with-unique-digits/count-numbers-with-unique-digits.go new file mode 100755 index 000000000..49cb92c41 --- /dev/null +++ b/Algorithms/0357.count-numbers-with-unique-digits/count-numbers-with-unique-digits.go @@ -0,0 +1,12 @@ +package Problem0357 + +var res = []int{1, 10, 91, 739, 5275, 32491, 168571, 712891, 2345851, 5611771, 8877691} + +func countNumbersWithUniqueDigits(n int) int { + if n >= 10 { + return res[10] + } + return res[n] +} + +// 参考 《代码大全2》 第 18 章 表驱动法 diff --git a/Algorithms/0357.count-numbers-with-unique-digits/count-numbers-with-unique-digits_test.go b/Algorithms/0357.count-numbers-with-unique-digits/count-numbers-with-unique-digits_test.go new file mode 100755 index 000000000..f5cb90e88 --- /dev/null +++ b/Algorithms/0357.count-numbers-with-unique-digits/count-numbers-with-unique-digits_test.go @@ -0,0 +1,47 @@ +package Problem0357 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + n int + ans int +}{ + + {0, 1}, + {1, 10}, + {2, 91}, + {3, 739}, + {4, 5275}, + {5, 32491}, + {6, 168571}, + {7, 712891}, + {8, 2345851}, + {9, 5611771}, + {10, 8877691}, + {11, 8877691}, + + // 可以有多个 testcase +} + +func Test_countNumbersWithUniqueDigits(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, countNumbersWithUniqueDigits(tc.n), "输入:%v", tc) + } +} + +func Benchmark_countNumbersWithUniqueDigits(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + countNumbersWithUniqueDigits(tc.n) + } + } +} diff --git a/Algorithms/0363.max-sum-of-rectangle-no-larger-than-k/363.100.png b/Algorithms/0363.max-sum-of-rectangle-no-larger-than-k/363.100.png new file mode 100644 index 000000000..4f8d6424e Binary files /dev/null and b/Algorithms/0363.max-sum-of-rectangle-no-larger-than-k/363.100.png differ diff --git a/Algorithms/0363.max-sum-of-rectangle-no-larger-than-k/README.md b/Algorithms/0363.max-sum-of-rectangle-no-larger-than-k/README.md new file mode 100755 index 000000000..e8234c728 --- /dev/null +++ b/Algorithms/0363.max-sum-of-rectangle-no-larger-than-k/README.md @@ -0,0 +1,30 @@ +# [363. Max Sum of Rectangle No Larger Than K](https://leetcode.com/problems/max-sum-of-rectangle-no-larger-than-k/) + +## 题目 + +Given a non-empty 2D matrix matrix and an integer k, find the max sum of a rectangle in the matrix such that its sum is no larger than k. + +Example: + +```text +Given matrix = [ + [1, 0, 1], + [0, -2, 3] +] +k = 2 +``` + +The answer is 2. Because the sum of rectangle [[0, 1], [-2, 3]] is 2 and 2 is the max number no larger than k (k = 2). + +Note: + +1. he rectangle inside the matrix must have an area > 0. +1. hat if the number of rows is much larger than the number of columns? + +Credits:Special thanks to @fujiaozhu for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 + +![100](363.100.png) \ No newline at end of file diff --git a/Algorithms/0363.max-sum-of-rectangle-no-larger-than-k/max-sum-of-rectangle-no-larger-than-k.go b/Algorithms/0363.max-sum-of-rectangle-no-larger-than-k/max-sum-of-rectangle-no-larger-than-k.go new file mode 100755 index 000000000..50b7105ea --- /dev/null +++ b/Algorithms/0363.max-sum-of-rectangle-no-larger-than-k/max-sum-of-rectangle-no-larger-than-k.go @@ -0,0 +1,165 @@ +package Problem0363 + +func maxSumSubmatrix(mat [][]int, target int) int { + if len(mat) == 0 || len(mat[0]) == 0 { + return 0 + } + + m, n := len(mat), len(mat[0]) + // 本算法的复杂度是 O(M*M*N*logN) + // 让 N = max(m,n) 可以加快程序 + M := min(m, n) + N := max(m, n) + // 从此开始称, M 为行,N 为列 + + ans := -1 << 63 + + var findTarget func([]int, int, int) int + // 运用归并排序,在给 sums 排序的同时 + // 查找符合 <=target 的最大值 + findTarget = func(sums []int, beg, end int) int { + if beg+1 >= end { + return -1 << 63 + } + + mid := (beg + end) >> 1 + + res := max(findTarget(sums, beg, mid), findTarget(sums, mid, end)) + if res == target { + return res + } + + l, r := beg, mid + // sums[mid:end] 中任意的的 sums[r] 和 + // sums[beg:mid] 中任意的的 sums[l] 相减 + // temp = sums[r] - sums[l]都是某个子矩阵的所有元素之和 + // 此时,由于 sums[beg:mid] 和 sums[mid:end] 都是递增的 + // 可以避免不必要的检查 + for l < mid && r < end { + temp := sums[r] - sums[l] + switch { + case temp < target: + res = max(res, temp) + // r++ 可以让 temp 变大 + // 这样才可能找到 更大的 res + r++ + case temp > target: + // temp > target + // l++ 能让 temp 变小 + l++ + default: + // 命中 target + // 结束程序 + return target + } + } + + // 另外使用归并排序,这样的程序更简洁 + copy(sums[beg:end], merge(sums[beg:mid], sums[mid:end])) + + return res + } + + var iFirst, iLast, j, minSum, maxSub int + var temp, sums []int + + for iFirst = 0; iFirst < M; iFirst++ { + // temp[j] 表示 mat[iFirst:iLast+1][j] 中所有元素之和 + temp = make([]int, N) + for iLast = iFirst; iLast < M; iLast++ { + // sums[j] 是 mat[iFirst:iLast+1][:j+1] 中所有元素之和 + // sums[j2] - sums[j1], j1 < j2 表示 + // mat[iFisrt:iLast+1][j1:j2+1] 中所有元素之和 + // sums 中添加 0 为了 sums[j] - 0 , 表示 + // mat[iFisrt:iLast+1][:j+1] 中所有元素之和 + sums = []int{0} + // maxSub 是 mat[iFirst:iLast+1][:] 中所有子矩阵中,所有元素之和的 最大值 + maxSub = -1 << 63 + // minSum 是 sums 中的 最小值 + minSum = 0 + + for j = 0; j < N; j++ { + // 分情况更新 temp[j] + if m < n { + temp[j] += mat[iLast][j] + } else { + temp[j] += mat[j][iLast] + } + + sums = append(sums, sums[len(sums)-1]+temp[j]) + // 求解 maxSub 的算法解释,看这里 + // https://www.youtube.com/watch?v=yCQN096CwWM + maxSub = max(maxSub, sums[len(sums)-1]-minSum) + minSum = min(minSum, sums[len(sums)-1]) + // TODO: 弄清楚这里的内容 + } + + // ans < target + // ---- ans ---- target ---> + // 分 3 中情况讨论 maxSub 的值 + switch { + case maxSub < target: + // 可知,此时,maxSub == findTarget(sums,0,N+1) + // 这时就体现了 maxSub 的巨大作用了 + // 省掉了运行 findTarget 的时间 + ans = max(ans, maxSub) + case maxSub > target: + // mat[iFirst:iLast+1][:] 中可能有个子矩阵的所有元素之和, + // 比 ans 更接近 target + // 需要运行 findTarget 查找 + tempAns := findTarget(sums, 0, N+1) + if tempAns == target { + // 找到答案,可以结束程序了 + return target + } + ans = max(ans, tempAns) + default: + // 找到答案,可以结束程序了 + return target + } + } + } + + return ans +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} + +func min(a, b int) int { + if a < b { + return a + } + return b +} + +// a, b 都是升序的切片 +// merge 把 a,b 合并起来,并保持升序 +func merge(a, b []int) []int { + lenA, lenB := len(a), len(b) + temp := make([]int, lenA+lenB) + + var i, j, k int + for i < lenA && j < lenB { + if a[i] < b[j] { + temp[k] = a[i] + i++ + } else { + temp[k] = b[j] + j++ + } + k++ + } + + if i == lenA { + copy(temp[k:], b[j:]) + } else { + copy(temp[k:], a[i:]) + } + + return temp +} diff --git a/Algorithms/0363.max-sum-of-rectangle-no-larger-than-k/max-sum-of-rectangle-no-larger-than-k_test.go b/Algorithms/0363.max-sum-of-rectangle-no-larger-than-k/max-sum-of-rectangle-no-larger-than-k_test.go new file mode 100755 index 000000000..d58a4e649 --- /dev/null +++ b/Algorithms/0363.max-sum-of-rectangle-no-larger-than-k/max-sum-of-rectangle-no-larger-than-k_test.go @@ -0,0 +1,295 @@ +package Problem0363 + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + matrix [][]int + k int + ans int +}{ + { + [][]int{ + []int{2, 2, -1}, + }, + 3, + 3, + }, + + { + [][]int{ + []int{1, 0, 1}, + []int{0, -2, 3}, + }, + 2, + 2, + }, + + { + [][]int{ + []int{3, 1, 1}, + []int{-2, 3, 0}, + }, + 3, + 3, + }, + + { + [][]int{ + []int{0, 1, 1}, + []int{-2, 3, 0}, + }, + 2, + 2, + }, + + { + [][]int{}, + 2, + 0, + }, + + { + [][]int{ + []int{2, 2, -1}, + }, + 0, + -1, + }, + + { + [][]int{ + []int{9, -10, -3, -1, 1, 7, -6, -2, 1, -4, -6, -8, -1, 2, -9, -7, -9, -1, -1, 5, -4, 5, -8, 3, 4, 2, 9, 4, 5, 4, -8, 5, 4, -9, -10, 3, -2, -2, 9, 0, -4, 3, 5, -10, 8, -10, 9, -7, -6, 1, 2, 6, -8, 1, 7, 3, 0, -5, 7, -6, 1, 9, -8, 4, -7, -9, 1, 8, -2, 6, -1, 0, 8, 4, -9, 8, -3, 7, -4, 3, -6, 2, -1, -2, -10, -10, -10, -3, 8, 2, -4, 3, -6, -3, 1, 9, -9, 7, -6, 8}, + []int{8, -10, -4, -5, 7, 2, -6, 7, -9, 0, -8, 9, -4, -5, -2, 3, 2, 7, 3, 3, 0, -3, -10, 8, -9, 3, -6, -9, 3, -10, 9, 9, -3, 6, -8, -7, 5, 5, 9, 5, -6, 6, 1, 4, 4, -5, -1, 2, 9, -8, 8, -9, -9, -6, 8, -3, 1, 0, -7, 9, 8, -3, -9, -4, 8, -2, -9, 2, 7, -3, 0, 6, -7, 3, 3, -8, 1, -2, -6, -5, 3, 6, 0, -9, -6, -4, -10, -6, 8, 3, 1, 0, -1, -5, -10, 5, -2, -5, -10, 6}, + []int{-3, -5, -1, -8, -7, -6, -6, 0, 7, 0, 3, -6, -9, 7, -5, -7, 8, 4, -4, 2, 7, -4, -6, 4, -9, -8, -1, -9, -1, 8, 3, 8, -2, 2, -2, 5, 9, -1, 3, -6, 8, 2, -6, -2, 2, 2, -8, -2, -2, 0, 6, 2, 2, 4, -1, -3, -3, 4, -2, 4, -6, -7, 3, 2, -6, 3, 5, -10, -6, 7, -4, -4, -3, -5, -8, -7, -9, -8, -7, 5, -9, 7, 8, -10, 7, 6, 6, -1, -3, 4, 4, -2, 3, -1, -9, -10, -5, -7, 8, -1}, + []int{-8, -3, 3, 7, 9, -5, 3, 5, -1, -9, 5, 8, 5, 2, 6, 6, -5, -2, -6, 5, -2, -5, 3, 2, -1, -7, 5, -3, -6, 0, 4, -4, -6, 9, -6, -9, -10, 7, 9, 3, 6, -6, 4, -3, -7, -9, -3, 6, -3, 0, 7, 9, -7, -3, 9, -8, 2, 7, -9, 6, 2, 8, -5, 5, -7, 0, -5, 3, 8, -6, 8, -5, -9, -6, -5, -7, 5, -3, 7, 2, 3, 5, -2, -3, -3, 3, 4, -4, 0, 2, -4, 3, -3, -6, -2, -3, -4, 9, -3, -7}, + []int{8, 8, 6, -3, 2, 9, 0, -8, 5, -8, 1, 1, 1, -8, 9, 2, -5, -8, -10, -6, -1, 1, -9, -10, 3, 1, -6, 2, -8, -8, 7, 7, -2, -2, -6, 8, 8, 6, 0, -10, 0, -3, 8, -4, -8, 2, 1, -1, 6, 4, 6, -7, 2, 0, -10, -4, 5, 5, -7, -10, 0, -10, -9, -6, 9, -1, -5, -3, 5, 2, -9, 6, -9, -5, 2, -9, -8, -7, -2, 2, -5, 0, -4, 2, -1, 0, -8, -7, 3, -1, -7, 9, 9, 9, -8, -2, -2, 7, 3, -4}, + []int{8, -1, -2, -2, 9, 6, 9, -6, 8, -1, 5, 1, -10, -2, 7, 9, 6, 8, 5, 9, -4, 6, -8, -7, -10, -4, 6, -5, 4, 3, 9, -3, -6, 0, -1, 4, -5, -9, 4, 8, -3, -4, 8, -3, -6, 5, 5, 6, 0, -4, 5, 0, -3, -2, -8, 9, 4, 8, 9, 5, -8, -3, 9, 8, 2, 9, -8, -7, 1, 1, 2, -9, -10, -2, 5, 2, -8, -6, 1, 1, 5, 4, -4, 9, 9, 8, 0, -8, 3, -5, 1, -9, 2, -4, 3, -8, 9, -1, 7, -7}, + []int{-10, 0, 9, 9, -4, -9, -6, -4, -5, 7, -1, 5, 8, 1, -6, -3, 5, 7, -9, -1, -10, 8, 2, 2, -7, -3, 3, -5, -5, 9, 6, -5, -1, -7, -8, 7, -6, -5, 9, -10, -4, -5, -5, -5, 6, 2, -5, 8, -4, -5, -1, -2, -2, 4, -8, -10, -7, -6, -7, -9, 3, 3, 3, 9, 7, 6, -5, -7, 9, 0, 1, 2, -6, 3, 2, 7, 6, 0, -9, 2, -5, -8, 3, -7, -2, -3, 7, -1, 3, 6, -7, -3, -10, 1, -8, -7, -9, 6, 2, 3}, + []int{9, -8, -7, 6, -6, 5, -6, 9, 9, 9, 3, -5, -10, 3, -5, -9, -1, -7, -8, 4, 7, -7, 8, 9, 7, -8, -8, -4, -10, -2, 9, -4, 5, 6, 3, -9, -1, 7, -4, -7, 3, 3, 9, 2, 8, 3, -1, -6, 4, 4, 9, -5, -8, -8, 0, -6, -9, -8, 7, -6, -3, -4, -8, -3, -3, -5, 6, -3, -10, 1, 8, -10, -5, 6, -1, -4, 2, 1, 3, -4, -10, 4, -8, -10, -5, -2, 6, -2, -7, -9, 1, 3, -9, -1, -9, -2, 3, -10, 2, -1}, + []int{-5, 9, 7, 2, -6, 4, 3, -6, 3, 8, 3, -2, 4, -5, 7, 2, 7, 4, 3, -1, 2, 3, 2, -6, 1, -5, -2, 7, 8, 7, 3, -9, -3, -7, -5, 3, -5, -1, -9, -7, 0, 0, 8, -4, 3, -3, 8, -5, 1, 8, 1, 2, 9, -5, 6, -8, -5, 1, -7, 0, 3, 2, -3, 7, 5, -3, 6, 2, -10, 7, 1, -4, 8, 1, 4, 9, -5, 8, 1, 5, 5, 0, -10, -1, 7, 7, 5, -2, 0, 0, 1, -3, -10, 4, -8, 0, 2, -9, 2, -6}, + []int{-3, -6, 3, -2, 0, 8, 0, -1, 3, 2, -8, -1, -6, -4, 4, -7, 0, -8, 7, -10, 1, -7, 8, 9, -7, 8, 1, 6, 9, 5, 9, -7, 6, -10, -1, 2, -1, -4, 5, 4, -8, -5, 4, -6, 1, 6, 5, 6, -1, 1, 5, 4, 5, -10, 7, -7, 9, -1, -2, 9, -6, 7, 6, 1, 1, -2, 3, -3, 3, 5, -3, -7, -7, -7, 4, -10, 5, -4, 0, 4, -3, 7, 5, -6, 5, 9, -9, 1, 6, 7, -4, -4, -9, 3, 8, 3, 3, 7, -10, -9}, + []int{-7, 4, -10, 6, -1, -2, 6, -5, -5, 5, 5, 0, -7, 4, 0, -10, -4, 6, 7, 1, -1, 6, 4, 1, -1, -5, 9, 3, 0, -8, 4, 0, 7, 4, 2, -5, -6, 5, 5, -7, -2, -2, -1, -2, 0, -6, -9, -3, 7, -1, -2, -4, 9, -8, 0, 2, 0, -6, 8, 5, 3, -7, 5, 0, -7, -3, -5, -1, -7, -9, -3, 8, 3, 2, -8, 2, 1, -3, -8, -1, 6, -6, -6, 8, -9, -1, -2, -8, 7, 1, 1, -7, 0, 3, 1, 6, -2, 4, 0, -8}, + []int{0, -5, 2, -5, 1, -3, -5, -9, 9, 3, -3, 8, 4, 6, -6, -5, -10, -7, -4, -1, 7, -9, 0, 2, 9, 8, -4, 7, -1, -8, -3, -8, 0, -3, 8, -5, -7, 7, -8, 3, 8, 6, 4, -8, -10, 4, 9, -10, 9, 6, -4, -10, -3, 0, 5, -3, 3, -6, -10, 7, 8, 5, -7, -8, -7, -3, -8, -4, 7, -3, 0, 0, -3, -10, 3, -10, 7, -9, -7, 5, 9, 4, -4, -6, 0, -4, -8, -2, -7, -3, 0, 6, -8, 7, -6, 3, -6, 8, -8, -10}, + []int{-10, 6, 1, 3, -4, 9, -7, 3, 3, 7, 1, -8, -6, 5, -2, -4, -3, 4, 2, 5, 1, 4, 8, 0, 3, 7, -1, -1, 0, 5, -7, -3, 3, 7, -4, -9, 7, 9, -6, -8, -4, 5, 5, 2, -1, -4, 1, 6, -4, -9, -7, -10, -1, -1, 3, 8, -10, 8, -8, 2, -6, 8, -5, -4, 5, 2, 1, -10, 3, -3, 1, -6, 4, -1, 5, 0, -4, -2, -3, 8, -4, 9, 2, 4, 0, -6, -6, -5, 9, -9, 9, 5, 1, -2, -5, 8, -3, 9, -7, -2}, + []int{-5, 6, -4, 4, 7, 0, -10, -2, 3, -10, -10, 8, 1, 7, 2, -3, 8, -2, 3, 5, -9, -5, -1, -8, -7, -10, -9, 5, 2, 8, -10, -3, 9, -1, -10, -7, -6, -7, 2, 0, 9, -8, 4, -3, 0, -8, 7, 7, 2, -10, 0, 2, -3, 8, 8, -5, 1, 0, -3, 7, -7, 1, -2, -7, 9, 0, -5, 8, -7, -4, -2, -10, -3, 0, -1, -2, 9, -3, -5, -1, 3, 6, -1, -2, -6, 2, 9, -2, 6, 9, 3, -10, -10, 6, -9, -6, 8, 1, 8, 6}, + []int{-9, 4, -2, -8, 5, -5, 3, 8, -9, 4, 8, -7, -10, 7, -2, -7, 7, 6, 3, -4, -1, 8, -5, 9, 8, -9, -1, 6, -6, 3, -9, 7, 5, 5, -9, 9, 5, 4, 4, -9, -1, 3, 4, -4, 8, -4, 0, 2, -8, 3, -8, -5, 0, 5, 8, 2, 3, 2, 8, -8, 6, -7, 5, 3, -2, -8, -1, 6, -6, -8, -5, -10, 5, -7, 6, -3, 8, -7, -8, -10, 4, -3, 1, -3, -5, 5, -10, -1, 0, 9, -8, -5, -4, -4, 6, -3, 7, 0, 8, 7}, + []int{0, -3, -2, -5, 4, 7, 5, 5, 3, -10, 0, -3, 0, 9, -9, -1, 2, 3, 9, 5, 3, 7, -10, 0, 6, -6, -1, -9, 3, -3, 0, -8, -10, 5, -10, 8, -8, 0, -9, -10, 1, -4, -9, -9, 7, -10, 5, 4, 5, -1, -4, -1, 3, -3, -2, -1, 1, 1, -10, -9, -9, -8, 1, 0, 1, -8, -4, -6, 2, -8, 7, 8, -7, 2, 9, -5, 5, 4, 6, 2, -7, -7, -7, -9, -7, -2, 8, -1, 8, -7, 9, -10, -1, 8, 2, -7, 4, 0, 2, -7}, + []int{-10, 4, 5, 1, 4, 9, -2, -1, -4, -4, 4, 3, -2, -6, -4, -9, 5, -2, 0, -6, 9, 8, -2, 0, 2, 1, -10, -7, -4, 7, 2, -3, -5, -2, 1, -9, -3, -8, -6, -3, -6, 1, 2, 0, 3, -7, 7, 4, 6, -6, -2, -2, 0, 8, 3, -4, 4, 3, -5, -3, 8, -7, -5, -10, 6, 4, -1, -4, -7, -9, 5, -2, -5, -5, 4, 5, -8, 7, 3, 2, 4, -4, 6, 0, 2, 8, -5, -4, -1, -9, 4, 5, -7, 4, 0, -1, 6, -10, -9, 6}, + []int{-9, 6, -8, -2, 8, -2, -2, -2, 7, 2, -4, 5, 1, -10, 4, -8, -5, -3, -7, -10, 0, -7, 9, 1, 3, 2, 7, 1, 0, -9, 6, -6, 4, -10, 5, 5, 5, -1, 7, 2, 6, 1, 2, 5, -10, -8, 4, 2, 6, -6, -1, -5, -2, -9, -6, -8, 5, -2, -1, 8, 4, 7, 2, -1, 7, 2, -7, -6, 1, -3, 6, -9, 9, 5, -6, -3, 1, 9, 3, 6, 8, -9, 4, 7, -5, 3, -1, -1, -9, 9, -8, -8, 9, 2, 4, -5, 9, -2, 5, -10}, + []int{8, 5, -8, 7, -3, 4, 6, -2, 6, -3, -5, -9, -8, -3, -4, -7, -9, 4, 4, -2, -1, -10, -2, 9, -9, 5, -3, -8, 6, -5, 3, 5, 0, 2, -2, 3, 5, 5, -8, 4, -7, 8, -2, -6, -1, -1, -1, 7, 3, 6, 5, -3, 6, -7, -7, -2, -5, -1, -5, -5, 5, 4, 5, -9, -6, -4, 8, 3, 2, 0, 6, -1, 9, -9, -10, 3, 1, 5, -7, -1, -9, 2, -1, 8, 7, -10, -7, 8, -3, -8, 8, 4, -9, 5, 9, -4, -3, -9, -2, -10}, + []int{4, -6, -10, -5, 2, 5, -7, -6, 5, -5, -6, -10, -10, -1, -4, -5, 8, -10, -10, 0, -8, -7, 2, -9, 7, -9, -3, -9, -1, 0, -7, -10, -6, 5, -2, -5, 9, -6, 1, 7, -9, -6, 6, -8, 9, 6, -7, 1, 5, 0, 0, -1, 1, -7, -9, -9, 6, 1, 0, -6, -4, -6, 3, 5, -3, -4, -4, -3, 6, 7, -4, 9, 8, 1, -10, 1, -9, 1, -5, 3, -1, 5, 7, -8, -8, 0, -6, -10, -1, 3, 9, 7, 9, 9, -2, 4, 4, -4, -5, -1}, + []int{-4, -2, -7, -10, 0, 0, 0, 5, 1, 6, 4, -7, -6, -5, 4, 6, 0, -1, 6, 6, -9, -2, -6, -1, -10, -6, 0, -5, -8, 3, 7, -10, -8, -6, -1, -4, -6, -4, 1, -1, 2, -7, 6, 3, -7, -8, 5, 0, 1, -7, -7, 8, -2, 5, 6, -10, -10, -8, -9, 2, 9, -4, 8, 5, 9, -4, 4, 0, 3, 0, -6, 8, -5, 4, -4, 8, -7, 4, -4, 7, 0, -6, 2, 8, -9, -8, -3, -9, 6, -5, 5, 4, -6, 0, -2, -2, 8, -6, 7, 9}, + []int{-5, 8, -7, 4, -5, 1, -7, -6, -3, -7, 7, 7, 9, -2, 9, 1, 7, 3, 3, 8, 9, -8, -8, -9, 7, -6, -7, -9, 8, -5, -8, -7, -3, 9, -8, -1, 0, 3, 7, -9, 2, 9, -4, -8, 3, 6, -2, -7, 5, 3, 8, -5, 4, 9, 7, -3, 9, -2, -7, 9, -10, -4, -1, -6, -7, 6, 9, -7, -9, 7, -3, 0, -1, 8, -7, 5, 3, 9, -3, -2, 2, -9, -8, 1, 2, 5, -2, -9, 4, -8, 2, 0, -6, 0, 4, 1, -4, 3, 2, 5}, + []int{-6, 4, -1, 1, 1, 0, -8, 8, 0, -8, -10, -7, 1, 8, 4, 2, -8, 9, 1, -4, -9, 1, 0, 4, 7, 7, 4, -2, 6, 9, -6, -8, 1, -2, 5, -10, -4, 3, 8, 3, 3, 1, 1, 2, 7, -4, -6, -3, 6, -5, 4, -6, -5, 8, -4, 9, 6, -3, -3, 1, -2, -9, 1, -10, 4, 9, -1, 6, 7, 4, 5, -9, -8, -2, -9, 5, -4, -7, -9, 4, 3, -10, 3, -1, -1, -7, 4, -2, -6, 7, -8, -6, 5, 5, -9, 3, -7, -6, -7, -6}, + []int{2, 0, 3, 8, 6, -1, -10, -7, -1, -9, 8, 9, 8, -1, 2, -8, 8, -3, -7, 0, -8, -8, -10, 0, -10, 4, 3, -1, -1, -4, -9, -2, -9, -2, -6, 5, 9, -5, 3, -1, -4, 8, -9, -7, -8, 0, 1, 9, 6, -5, 4, 8, -1, -8, -7, 8, -6, 2, -9, -7, 0, 4, 9, -2, -1, -10, -2, 8, -9, -2, -9, 7, -8, 2, -6, -8, -4, -8, -4, 2, -8, 3, 3, -9, 4, -8, 6, -6, -4, -7, 7, -9, 4, -7, -5, -10, 5, -3, -1, -1}, + []int{-3, -4, -8, -7, 3, 9, -1, -2, -1, -4, -1, -5, -1, 2, 8, 4, 3, 3, 6, -2, -3, 1, -7, -9, 9, -5, 6, -2, -1, -3, 5, -5, -2, -2, 4, 9, 8, 3, 4, -10, -6, -2, 3, -1, 6, -5, 2, 5, -9, 9, 0, 4, -3, -7, -2, -2, 0, -6, -8, 5, 1, 8, 8, 8, -1, -2, 2, -9, 8, 2, -8, -2, -7, -3, -10, 4, 1, 6, 0, -8, -4, 7, 3, -5, 7, -3, -2, -9, -8, -1, -6, -4, -8, 6, 0, 6, 3, -9, 1, -2}, + []int{-1, 9, -6, 8, -1, -7, -6, -8, 6, 4, 0, -9, -8, 4, 9, 4, -8, 9, 1, 8, 2, -3, 9, -1, 8, -10, -6, 0, -8, 2, 3, 7, -4, -3, 0, -3, 4, -1, 5, 8, 3, 0, 1, -1, 0, 4, 1, 7, -9, 2, -8, 7, 1, -8, 8, -6, 4, 4, -8, 0, -6, 5, 7, -2, 3, 5, 1, 1, 9, -6, -3, 7, 0, -10, 3, 8, 7, -1, -9, 8, -7, -1, -3, 6, -9, 9, -10, 0, -4, 0, 3, 8, -6, -9, 5, 3, -3, 1, -3, -9}, + []int{-10, 2, -7, 7, -6, 6, -10, -7, 3, -2, 3, -1, -3, 4, -6, 3, 4, -5, -7, -5, 2, -1, 4, 5, 4, 9, -3, -2, -10, -2, 8, -7, -2, -8, -8, 2, 9, -7, 2, 7, -4, -8, 5, 8, 4, -2, -3, 6, 1, -6, -4, 1, -8, 0, 6, 2, 7, -2, 3, 6, -7, -10, 6, -7, 2, 2, 0, 9, -4, 2, -1, -5, -1, -6, 5, -2, 6, -8, 4, 9, 2, 6, 6, -5, -10, -1, -4, -7, 8, 6, 7, 4, -9, 7, -1, -4, 6, -5, 8, -4}, + []int{-1, 6, -7, -1, 8, -1, -5, 6, 2, -10, -6, 6, -6, -8, -7, -3, 1, -8, -8, -4, 2, 1, -3, -4, -9, 1, 0, -6, -3, 8, 4, 7, 0, -4, -3, -5, 6, -5, -9, -4, -3, 1, 2, 3, 6, 7, 8, -9, 1, 8, 5, 9, -6, 0, -7, 2, -6, -5, -5, -2, -1, -1, 4, -7, -4, 0, -3, 1, -7, -6, 1, 8, 2, -4, 6, -6, 5, -4, 7, 4, 5, -9, -10, -10, 0, 6, 0, 2, 8, 5, 9, -6, 5, 7, 0, 8, -6, 2, 6, -1}, + []int{3, -7, -2, -7, -7, 7, 5, 4, -4, -6, -6, -3, -3, 3, 5, 3, -9, 8, 4, -1, -8, -9, -5, -8, -1, 9, 8, 2, -4, -9, 9, 7, -7, 3, 8, 1, -8, -2, 7, 0, 3, -3, 6, 6, -2, -6, 1, -6, -9, 4, 2, -5, -10, 6, -1, -3, 4, 7, -4, 4, -10, -6, 8, -1, -6, -8, 8, -10, 1, -10, 4, 8, -7, 5, 5, -9, -4, 3, -2, 5, -10, -8, 3, -8, -8, -7, 7, -7, 9, -5, -8, -10, -3, 3, 1, 3, -4, 5, -1, 5}, + []int{8, -6, 8, 6, -6, -5, 8, 8, -1, 7, 4, 2, 9, -4, 1, 3, -1, -8, 9, 4, 5, -3, -3, -9, 1, -5, 2, 5, -9, 5, -1, -6, 2, 7, -5, -5, 3, -10, 7, 9, 6, 8, 8, -5, -5, -2, -6, 7, -2, 4, -5, 5, 1, -8, -7, 5, 5, 5, 5, 4, 0, -8, 2, -4, -5, -8, 9, -9, 0, 2, 7, 1, -3, 8, 0, -7, -10, -4, 9, -6, -2, -8, -4, -10, 5, 4, -7, 2, 6, 5, 1, -5, -5, 7, 3, 1, 2, 9, -9, -6}, + []int{4, -8, 6, 5, -7, 7, 1, 7, -2, 1, 9, 2, -6, -8, -5, -7, 4, -3, 2, 3, 3, -1, -2, -5, -5, 5, 5, 3, 0, -6, -5, -5, 4, 3, 2, 1, -10, -8, -5, 7, 0, 6, -4, -4, 8, -8, -2, -9, 7, -8, 6, -4, -7, 4, 3, 4, 1, -2, 6, -5, 4, -8, 6, -8, 0, 3, 5, 9, -5, -1, 7, -5, -5, -6, 1, -8, -4, -3, -8, -1, -7, -8, 7, -7, 4, -4, -10, -10, 4, 3, 5, 5, -9, -10, -7, 3, -1, 5, 5, 8}, + []int{0, 8, 3, 0, 5, -3, -8, -6, -8, -10, -7, -5, 2, 5, 8, -7, 7, -3, -10, -8, 9, -6, 2, -7, -8, 8, 2, 5, -7, 8, -3, -8, 7, 4, 1, -6, 7, 4, -3, -6, 1, 8, -7, 1, 8, 3, -4, -10, -10, 5, 7, -4, 4, -2, 9, -2, 0, 3, 7, 2, -5, -8, 4, -9, -6, 2, -9, 9, -1, 9, -4, -1, 1, -6, 0, -9, 9, -5, -7, 2, -6, -5, -7, -4, 0, 0, -2, -10, -1, 2, -2, -3, 5, -6, 4, 6, -3, -10, -9, -3}, + []int{1, 3, 1, 6, 0, 8, -2, 3, 9, 5, 2, -6, -5, -5, 1, -3, 5, -10, 5, -9, 8, 1, -3, 4, -2, 5, -8, -3, -7, 0, 8, 9, -7, -9, 4, -1, 2, -2, 4, -10, 1, -5, 7, -7, 0, -6, -7, 2, 8, 7, -6, 2, 7, -3, -9, 1, -5, 9, 0, 0, 1, -3, 1, -2, 5, 7, 1, 2, 2, -7, 8, 7, 9, 7, -8, -3, -6, 3, -6, 9, -3, -9, -10, -10, -3, -8, 8, 9, -9, -6, 8, 6, -5, 1, 4, 8, 8, -2, 9, -5}, + []int{-8, -4, 3, -4, 8, 0, 9, -4, -8, -9, 1, 1, -5, 7, 3, -7, -6, 5, -8, -4, 3, 1, 8, -4, -4, 6, 4, -9, 8, 0, 2, -6, -3, 7, 6, -1, -10, -1, 2, 3, 7, -8, -8, 5, -9, 2, -10, -3, -2, -3, 7, -2, -5, 1, 4, -5, 2, -2, 9, -9, -6, 6, -7, 2, 9, -1, -5, 1, 9, -2, 3, 2, 3, 8, -4, 6, 4, -3, 4, 8, -9, -6, 1, 2, 2, 3, 0, -4, 1, 4, 3, -9, 1, 7, -9, -8, 7, 7, -4, 6}, + []int{-6, -1, 9, -3, -1, 7, -6, 4, 3, -6, -5, -4, -8, -1, -2, 1, 4, 1, -3, -6, 9, 1, 2, 4, -7, -5, -10, -4, 0, 7, -1, 6, 4, 6, -2, 0, -1, -1, 1, -10, -4, 7, -7, -7, -5, -7, 2, 8, 6, -10, 9, 0, 0, -9, 6, -2, -4, 3, 4, 6, -1, -4, 2, -4, -7, 2, 3, 6, -7, 6, 0, 6, -2, 7, -8, -3, 0, -2, 9, -8, 0, -9, 1, 1, 1, -3, -4, -7, 4, -10, 8, 9, -7, 9, -8, 1, 1, 3, 1, 9}, + []int{6, -5, 5, 6, 6, 3, 2, -5, -7, 8, 7, 8, -7, 2, 2, -10, -6, 8, -10, 9, -3, 4, -3, 2, 5, -10, 4, -10, -7, 5, 2, -5, 1, 3, 7, -1, -9, -10, 6, 6, -5, 3, -3, -1, 6, 6, -6, 3, 0, 2, -7, -2, 0, -2, 5, 6, -4, -8, 0, -7, -7, 5, -4, 9, -8, -7, 2, -7, -10, -4, 4, -1, -3, -6, -3, 4, -1, -1, -5, -4, 6, -10, 2, 7, 1, -9, 7, -1, -2, 2, 3, -2, 4, 6, -3, -6, 7, 5, 2, 8}, + []int{-6, -10, 8, 2, -4, 1, 8, -8, 7, -6, 0, -7, 4, 0, -9, 1, -9, 7, 7, 9, -6, 0, -7, -9, 3, 4, -9, 0, -1, -8, 7, -1, -4, 3, -7, -1, 3, -8, 7, 3, 6, 1, -4, 9, 4, 1, -2, 8, -2, 2, 9, -10, 0, -2, 6, -2, 1, -9, 5, 9, -4, -4, 5, 0, -5, -9, 1, -7, -4, 8, 8, -7, 1, -1, 5, -7, -4, -8, -7, -8, 0, -3, -3, -4, -2, -7, -2, -3, 3, -8, -6, -10, -3, -4, 8, 5, -8, 2, -4, 1}, + []int{-9, 7, 9, 6, -8, 5, 6, 9, 4, -3, -2, -8, 2, -1, 7, -7, 9, 4, -3, 2, 0, 7, 0, -1, 6, -7, -8, -5, 7, -3, -4, 8, -7, -4, 5, 5, 6, 1, -5, -3, 9, 5, 3, -6, 3, 9, -1, -1, -8, 0, 4, 1, 1, -10, 2, 4, 5, -3, 9, 2, 7, -9, 6, -1, -10, -8, -1, 3, 0, 2, 0, 1, -6, -10, -6, -4, -3, 9, 1, -5, 9, 3, 5, -4, -10, 3, 4, 0, -5, -1, -5, -7, -3, 9, -2, -7, 5, -3, -7, -8}, + []int{1, -7, 5, 0, 9, -9, 6, -5, -4, -6, -3, -8, 8, -5, 5, -10, -10, -3, -2, -3, -5, 3, 7, 2, 4, 1, -4, -7, -1, 2, -2, -8, -2, -3, -10, -9, -9, 9, -1, -9, 5, 5, -4, 4, 6, -8, 9, 2, -6, 1, 4, 9, -5, -6, -9, 7, 5, 9, -3, 6, -5, 4, 2, 3, 2, -6, 7, -5, -10, 2, -3, -1, 8, 0, 4, 1, -1, -4, -9, 1, 5, -3, -6, 9, -1, -9, -3, 9, 3, -3, 7, -7, 6, -10, -3, -4, -2, 4, -4, 5}, + []int{2, 1, 4, -7, -8, 2, 7, 4, -6, 5, 9, -1, -8, 3, 1, -7, 8, -2, 7, -8, -1, -5, 8, 6, -8, 4, 3, -7, -10, 0, -7, 4, 7, -9, -8, 7, -10, -9, 3, -3, -4, -5, 9, -1, 6, -9, 3, -8, 6, 8, 3, -5, 1, 1, 6, -3, 0, -10, 0, 4, 9, -3, -5, -9, 3, 7, -7, -6, 1, -4, 2, 4, 8, -4, -3, -5, -4, -5, -7, -8, 8, -8, -8, 4, 4, -9, -1, 2, -10, -7, 8, -6, 8, 7, -8, -7, -7, -3, -9, 2}, + []int{2, -4, -10, -4, 3, -6, 8, 5, 2, 6, 4, -5, 7, 6, 5, 5, -8, 7, 6, 0, -1, 4, 0, -5, -6, -9, 9, -1, 3, 5, 7, 3, -8, -1, 5, -1, 4, 4, -10, -10, -1, 1, -10, -10, -2, 7, -4, 7, -6, 3, 6, 9, 7, 8, -10, 6, 8, -8, 7, -7, 2, -4, -5, -8, 8, 1, -2, -5, 0, 3, 6, -10, 3, -2, 1, -3, 2, -3, -4, -2, -10, -2, -7, -1, -7, 7, -9, -4, 9, -2, 1, 3, -3, -3, -4, 6, -6, 7, -7, -3}, + []int{-5, -2, 2, -3, -9, -1, -9, -4, -10, -9, -7, 6, 3, 9, -10, -1, -2, 3, -4, -6, -6, 2, 6, 9, 0, -4, 3, 2, 5, 5, -2, 1, -4, 9, -3, -1, 7, 7, 2, -2, 3, 6, 3, -10, 6, -1, 1, -4, -6, -4, -1, 6, -1, -5, -8, 2, -7, -10, 6, -6, -7, 5, 1, 2, 0, -4, -9, -9, -6, -9, -3, 5, 1, 8, 6, 8, -1, -8, -6, 4, -1, 8, 2, -8, -9, -7, -2, -5, -10, 2, -9, -2, 8, 5, 6, 6, -6, 0, 4, -10}, + []int{5, 9, -4, -1, -1, 4, -10, -10, 9, 0, -3, 9, -8, -3, 8, -6, -9, -7, 7, 8, 3, 4, 5, 4, -9, -4, -3, -5, -1, -8, 9, -8, 0, -4, -6, 9, -2, 7, -1, 5, 0, 0, -10, -4, -9, -5, 8, -1, 6, 2, -3, -7, 9, -7, -5, -2, -7, -6, -6, -2, -6, 1, 0, 9, -6, 5, -3, -2, -7, -5, 5, 5, -2, 7, -7, -7, 5, -8, 8, 6, -3, 8, -1, 2, -9, 8, -1, -3, -4, 8, -3, -1, 0, 6, 2, -7, -1, -5, 4, 0}, + []int{1, -2, 5, 5, 8, -2, -9, -8, -7, 2, -5, 8, 7, -9, -7, -2, -1, -7, 8, 9, 4, 5, 6, 6, -4, -5, -5, 3, -8, -2, -9, 5, -7, 4, -7, 3, 8, 4, -2, 5, 4, 8, -3, -7, -3, -8, -1, -6, 2, 0, 6, -10, -6, -6, 6, 2, 8, 4, -4, 1, -3, 6, 2, -2, 6, 3, -1, 1, -6, -7, 7, -9, -3, 7, -6, -8, -6, -6, 6, 3, -6, 2, 5, 4, -6, -7, 7, 8, -7, 2, -5, 1, 1, 8, -2, -9, -8, 1, 1, 8}, + []int{6, -7, -9, -5, 5, 2, 6, -1, -9, -10, 4, 6, -9, -6, -7, -6, -5, -4, -9, 0, 5, 8, 6, -8, 1, 3, -7, 0, -6, -6, 1, -8, 3, 9, 4, 9, 3, -7, -3, 4, 4, 2, -6, 2, 1, 5, 2, 2, -10, -5, 0, 6, -4, -6, -9, -3, 1, 4, -8, -3, 8, 0, 9, 5, -7, -4, 0, 5, 0, -4, -9, 8, 8, 8, -8, -10, -6, -6, -4, 6, -2, -8, -4, 2, 1, 9, -4, 2, 3, 5, 3, -7, 0, -3, -5, 6, 9, -6, 1, -5}, + []int{-4, 8, -4, 3, 4, 4, 3, 5, 1, 9, -9, -1, 4, 5, 9, 8, 9, 7, 8, 9, 6, -8, 3, -10, -5, 5, 2, 4, -9, -1, 1, -6, -6, 8, -4, -7, -9, -4, 1, 4, -8, -6, -9, 4, -9, 6, 1, -9, 8, 3, 3, -5, -4, 1, 2, 6, 4, 6, 5, -5, -2, -8, 3, 7, -5, 8, -8, -10, -10, -6, -4, -9, -8, -10, 9, -9, 0, 5, -5, -8, 5, -10, 4, -4, -10, -10, 2, -10, 1, -10, -2, 7, -9, 5, 7, -6, -10, -3, -6, -3}, + []int{0, 2, -10, 2, 8, 8, -1, 2, -9, 0, -1, 7, 0, 6, 9, -4, 3, 9, -2, 5, -6, 0, 8, 0, 5, 8, 0, 3, 0, -2, -5, 7, -6, -6, 1, 1, -4, -4, -1, 2, -5, -2, -3, 0, -6, -10, 5, -9, 0, -2, 1, -3, 8, -7, 7, 2, -3, -5, 4, 6, -8, 8, 8, -8, 4, -4, 4, -5, 2, -9, -5, -9, 8, -8, -3, -5, 7, 3, 4, 8, -8, 7, -7, 4, 7, 0, -9, 0, -6, -7, 6, -1, 3, -3, -1, 0, 1, 4, 2, 9}, + []int{8, -8, -3, -7, -8, 5, -9, -5, -10, 4, -6, 4, 4, -10, 5, 3, 6, -7, -8, 3, 9, -5, 6, -3, 5, -5, -6, 2, -7, 8, -7, -9, 6, 7, -5, 8, 9, 5, -9, 1, 8, -3, 0, 7, 7, 6, -7, 6, -7, -4, -9, -5, -2, -5, 4, 5, -3, -3, 4, -4, -10, 6, 4, -3, 1, 9, -5, 7, -9, 0, -3, 5, 8, -2, -8, 1, 2, -4, 0, 5, 6, -10, -6, 0, -8, 8, 9, -9, -1, -8, 5, 4, 9, 5, 7, -5, -8, 9, 8, 3}, + []int{-5, -5, -3, 3, -9, -4, 3, -2, 9, 3, 8, -5, -2, 2, -10, -7, -4, -1, -5, -1, -7, -1, 0, -9, 9, -10, 6, 0, -7, -1, -10, -8, -8, -7, -5, -9, -3, 2, -7, 1, -5, 3, 5, -6, -4, 8, -9, -8, -3, 6, -5, -4, -8, -10, -5, 5, -8, -5, 1, -7, 5, 3, 9, -6, 3, -6, -8, 8, 1, -8, 7, -8, 0, 4, 9, 0, -6, -7, 2, -1, 8, 4, -10, 0, -9, 6, 1, -10, -6, -1, 0, -9, -6, 2, 4, -7, 0, 7, 2, 8}, + []int{-1, -9, -1, -3, -10, -9, 5, 2, -8, 8, -3, 3, -4, -7, 2, 5, -4, 9, 6, 1, 0, -9, -9, -9, 4, 3, 5, -8, 2, -1, -9, 1, -7, 2, -1, -3, -9, -5, 5, -4, -5, 5, -10, 0, 2, -2, 5, 0, -9, -6, -2, 0, -6, -3, 3, 4, -9, 3, 4, 8, 2, -6, 9, -8, 0, 5, -7, -1, 7, -7, 5, -7, -1, -3, -9, 6, 2, -6, 5, 5, 5, 6, -3, -3, -5, 8, 2, 9, 1, 5, -5, 1, -1, -7, -10, 0, -1, 9, -9, 5}, + []int{-5, -1, 2, 3, -9, -5, -2, -4, 3, 5, 0, -5, -2, -9, -8, -7, 8, 0, -3, 1, 9, 1, 3, -9, -10, 7, 0, 3, -9, 9, 8, -7, -6, -9, 6, -8, 4, -5, -6, -9, -3, 0, -4, 0, -7, 8, -3, 3, 0, -2, 5, 5, 9, -1, -4, -2, 2, 4, -3, -9, -1, 9, 4, 4, 9, 1, -5, 5, 9, -6, -1, -4, 2, 6, 7, 6, -2, 1, -7, 9, -8, -7, 4, 9, 2, 0, -1, 1, -4, -3, 8, 9, -7, 2, -6, 6, -8, -9, -9, 6}, + []int{-1, 7, -3, -8, -9, -5, 4, 6, 3, 7, 1, -7, -9, 9, 4, -7, -1, -5, -6, -6, 4, 1, -3, 1, 5, 6, -4, -5, 2, -1, -4, -9, -3, 2, -5, -6, 7, -9, -1, -4, -2, -7, -5, 0, 6, 7, -4, 9, -8, 8, -10, 3, 9, 8, 0, -9, -8, 0, -3, -5, -4, -7, 8, -1, 4, 3, -1, -7, 0, 3, 0, 8, -1, -1, 4, 2, 1, -10, -9, 4, -9, -8, 4, -7, 8, -6, 4, 7, 2, 9, -3, -7, 9, -5, 1, 0, -4, 3, 9, -4}, + []int{2, -10, -1, 9, 7, 2, -3, -5, -5, -6, 7, 3, 5, 2, -2, -8, 4, 8, -5, 8, 6, 3, 8, -2, 2, -9, -6, 4, -8, 9, -5, 4, 2, -3, 0, -7, 5, -3, 9, 3, 8, 8, -1, -2, 1, -2, -2, 7, 6, -7, -3, 3, -3, -3, 3, -6, -6, -4, -5, -4, -7, -6, -2, 5, 0, 7, -1, -2, -5, -8, -9, -3, -10, -6, -5, -3, -3, 9, -9, 8, -3, -6, 0, 9, -9, -5, -8, 9, -10, 7, 8, 7, -10, 8, 2, -9, 3, 0, 8, 5}, + []int{-6, 4, 1, -1, 6, -5, -9, -4, -3, -6, 9, 5, -6, -2, -7, -1, -6, -2, -4, -9, -2, -1, 1, -1, -8, -2, -9, -10, -1, 0, -9, -7, 4, 4, 2, 7, 3, 0, 3, 6, -10, 5, -1, 3, 0, 5, -4, -8, -3, -3, 7, -1, 9, 4, -10, -6, -6, -7, 2, -7, 2, -4, -7, 0, -7, -8, -6, 9, -9, 7, -9, 8, -4, 6, -5, -2, -8, -1, -6, 3, 6, 9, -10, -2, -4, 6, 3, 6, -3, 3, 5, 1, 9, -9, 8, 0, -4, 0, -3, 3}, + []int{-10, -9, -1, -1, -10, -10, -8, 5, -2, 5, 9, 7, -10, 4, -9, 1, -10, 2, 4, -3, -3, 3, 6, 6, -5, 9, 5, -9, -10, 9, -1, 4, -3, -3, -9, 8, -7, 0, -6, -2, 9, 2, -2, 5, -8, 0, -4, -7, 4, 3, -7, -9, -7, 1, -1, -4, -10, -1, 1, 3, 3, -2, 8, 7, -8, 3, 7, -6, 8, 5, -3, 3, -2, 2, -10, -7, 8, -3, 3, 5, -3, -10, 2, 2, -3, -2, 6, -1, -2, -8, -10, 9, 6, 4, 4, 1, 2, -9, 4, -4}, + []int{-4, 8, -7, 1, -8, 2, 4, -1, -8, 9, 2, -4, -2, -3, -8, -4, -1, -8, 1, -10, 4, 8, -6, 0, 3, 2, 7, -10, -9, 5, -8, 1, 5, -7, -1, 0, 0, 5, -5, -10, -10, 6, 0, -3, 7, -6, 5, -5, 8, -6, -10, 7, -8, 8, -4, -6, 8, -4, 1, 6, -3, -1, -8, 2, -6, -4, -3, -8, 1, -5, -7, -4, 6, -9, 1, 5, -1, -7, 7, 5, 3, 9, 0, 0, 5, -5, 0, 9, -10, 2, 7, -8, -6, 7, -7, -5, -1, 6, -8, -4}, + []int{8, 1, -3, -5, 9, -3, -4, 4, -2, -8, -4, -9, -3, -9, -9, 2, -8, 9, -7, -6, 3, -7, 3, -10, 2, 9, 2, -4, -10, 6, -3, 1, 1, 1, -5, 8, -5, -9, -9, 2, 6, 5, -2, -4, -7, -1, 3, 4, 0, 7, -3, 9, -5, 0, 6, -6, -2, -9, -10, 1, 8, 4, -2, -9, -9, -6, -10, -10, 7, 1, -7, 2, 0, 4, 4, 2, 1, 6, 0, -4, -6, -1, -1, 2, -6, -9, 5, 9, 9, -9, 3, -7, 4, 5, 5, 6, 7, 1, 4, -5}, + []int{-3, 3, -10, -6, -9, 7, -7, 7, 5, 7, 2, -4, 2, 8, 3, -4, -1, -5, -1, -1, 1, -8, 4, 9, -5, 0, -4, -2, 4, 4, -4, 2, -9, -10, -2, 0, -4, 4, 3, 4, 3, 6, 5, -7, 7, 3, 9, -4, 6, -5, 3, 3, 7, 3, 8, 9, 0, 5, -7, 7, -1, -6, -2, 2, 6, 1, 6, 1, -10, -2, -7, -3, -8, 7, 9, -5, 5, -6, 5, -9, -8, 3, -5, -5, 9, 7, 5, 5, 5, -3, 7, 8, -9, -4, -9, -8, 5, -3, 8, -7}, + []int{-1, -6, 3, 2, -1, -9, -10, -6, 5, -4, 7, -10, 1, 8, 6, 1, 7, -4, -6, 9, 6, 3, -7, 2, -7, 8, -7, 8, -2, -7, 9, 4, 7, -1, -3, -2, 9, -3, 9, 2, -5, 1, 0, -4, 8, 1, 7, -10, 4, -9, 3, 4, -8, -5, -3, -7, 0, 0, 5, -3, 1, 5, 1, 9, -8, -3, 7, 3, 5, -3, 4, -6, 2, 6, -2, 4, 6, 2, -8, -2, -3, -2, 8, -9, -9, -10, 6, 1, 1, -4, -9, -7, -5, 1, 9, 1, -9, 0, -7, 3}, + []int{5, 0, 4, -5, 7, -6, -2, -3, 6, -9, -4, -7, 2, -8, 2, 7, -10, 6, 0, -6, -4, -10, -4, -2, 4, 6, 3, 4, -10, 5, 7, -1, -3, 5, -2, -7, -3, 2, 5, 4, 9, -7, 3, -6, -10, -2, -9, 9, -10, 2, -1, -9, 8, 4, -6, -7, -5, 3, -3, -10, 9, -9, 1, -5, -2, 4, -4, -8, 5, 4, -7, 5, -1, 3, -7, 6, -3, -6, 8, 8, -6, 3, 3, 2, -6, -2, -5, 2, -7, 0, 6, 7, 0, 3, 4, -6, -8, -10, -4, 4}, + []int{-5, -10, 8, 4, -9, -6, 6, 9, 5, 3, -3, 3, -1, -5, -4, 5, 9, -6, -7, -3, 1, -10, 1, -5, 6, 3, -10, 6, 6, -6, -7, 0, -6, -1, 5, -7, 5, -8, -9, -5, 3, -3, -5, 1, 9, -3, 6, 8, 2, -6, 6, 1, -8, 3, -8, 1, -9, 1, 0, 5, -7, 4, 2, 2, 7, -8, -5, -5, -2, 0, -10, 0, -6, -3, 4, 3, 7, 9, -2, 5, -7, 6, 9, 8, 9, -10, 6, -10, 0, 5, -9, -4, 4, -7, 5, 4, 9, -8, 8, 4}, + []int{-10, 7, 8, 0, -5, 6, -10, 9, -3, 0, -2, 3, 5, -8, 2, -8, -7, -4, 3, -2, 1, -7, -3, -1, -4, 0, -7, -5, -7, -5, 7, 6, 0, -1, 2, -6, 5, -8, -5, -9, 1, -7, -1, 5, 6, -2, 4, 6, 4, -5, -6, 1, 5, 7, 0, -10, -4, 1, 6, -6, -6, -6, 4, 2, 9, -1, -2, -9, 2, 8, 5, -3, -4, -8, -10, 0, 1, -5, -3, 6, 1, 2, -7, 2, -7, -9, 7, 4, -3, 0, -4, -9, 9, 8, -5, 7, 8, 3, 6, -1}, + []int{-10, -7, 3, -2, -3, -2, 5, -8, -10, 0, -4, 3, -7, -6, 3, -9, -8, 3, 9, -9, 7, -10, 7, -8, -7, -7, -4, 7, -10, 8, 4, -2, -2, 7, 0, 7, -3, -10, -10, 9, 0, -8, 5, -1, -5, 2, 5, 2, -1, 1, 0, 1, 5, -10, -5, -1, -5, 9, -5, 0, 7, 9, -6, -4, -2, 6, 6, 4, -1, -8, 8, 6, -8, 3, 0, -8, -4, -10, 9, -8, 1, 8, -5, -1, 8, 9, 4, -3, 3, -7, 4, -5, -10, 6, 2, -8, 5, 3, 0, 1}, + []int{-3, 9, -2, -7, 5, -3, 2, 3, -9, 2, -8, 1, -5, 1, -2, -8, -9, -10, -1, -7, 4, 4, -9, 4, 0, 3, 2, -1, -8, 2, 6, 2, -1, 4, -10, 4, 0, -5, -3, -4, -7, 7, 6, 4, -3, 7, 1, 6, -9, 9, 2, -10, 7, -5, -8, 7, 4, 5, 9, 5, -2, 1, 8, 6, -2, -3, -5, 0, 9, -8, 6, 7, -3, 0, 4, -9, 6, 6, -4, 3, -9, -6, -2, 3, 7, 4, -9, 8, -9, 0, 3, -10, 8, -2, -2, -10, -10, 5, -7, 9}, + []int{3, -4, 5, -9, -4, 1, 8, -4, -1, 6, -9, 5, 8, -2, 0, 2, 1, -3, -7, -2, 8, -2, 4, -2, -10, -4, 0, -5, 6, -10, 0, 6, 6, 0, -5, 9, -10, -9, -5, 4, -5, 0, 2, 6, -6, -4, -6, -3, 8, -2, -4, 6, -8, -7, 0, -4, -9, 3, -10, 2, -9, -9, 8, -7, -9, -5, 6, 5, 2, -3, -6, -1, 7, -1, -2, -10, 8, -8, -6, 8, -3, 1, -10, 8, -2, -8, -1, -2, -9, 8, 5, -10, -4, 5, 9, 8, -6, 1, -8, 7}, + []int{1, -5, 8, 1, -6, 4, 1, -9, -6, -1, -2, 1, 8, -8, -7, -4, -1, 4, 9, 6, -5, -2, -9, -2, -2, -6, 7, 0, -2, -5, 3, -5, -6, -2, 4, 9, -3, 1, 8, -9, -10, -4, -4, 7, -8, -9, -9, 2, 3, -9, 2, 1, -5, -10, -7, -7, 1, 1, 6, 1, 0, 0, 9, 5, 2, -3, -4, -3, -9, 0, 0, -4, -7, 3, -9, 5, 9, -4, 7, 9, -3, -1, 2, -6, -2, -10, 8, 0, 0, 2, -5, -1, 8, 0, 5, -4, 8, 4, 7, -1}, + []int{-3, 1, -5, -8, -2, -4, -1, 0, -8, -7, 4, 2, -6, -4, 2, 3, -3, 0, -6, 3, -5, -10, 8, -7, -3, -4, -9, -3, -7, 0, -7, 0, 7, -6, -5, -8, -6, -4, -9, 4, 5, -3, -8, 5, -3, 0, -4, 6, 8, 0, 1, 6, -8, -4, -10, -3, -5, -5, -6, -4, 1, 3, 5, 8, 0, 9, -6, 3, -8, 7, 9, 1, 7, -7, -2, 2, 3, -3, 2, 9, 6, -4, 0, 9, 4, 4, -2, 9, -5, -7, 0, 5, 3, 4, -3, 6, 9, -7, 6, -1}, + []int{6, 7, -8, 6, 7, -4, -6, -3, -9, 3, 2, -6, -9, -6, 6, -9, -10, -5, -2, 2, 1, -6, 0, -8, -4, -4, -4, -8, 9, 3, -2, -2, 0, -6, -4, 0, 9, 6, 8, -6, 2, 4, -10, 5, 8, 1, 1, 5, -9, 8, 0, -5, -4, -9, 2, -4, -1, -7, 7, -8, 9, -2, 5, -3, 0, 3, 6, -8, -4, -1, -4, 0, 0, -2, 4, 8, -7, -6, -8, 3, 2, -5, 6, -6, 1, 3, -2, -10, 5, 2, 4, -5, -7, -10, -7, 0, 3, -6, -4, 0}, + []int{4, 8, 2, 0, 0, 5, 2, 5, 5, 4, 7, 5, -7, -3, -10, 9, 7, 7, 0, 2, 5, 7, 0, 5, -8, -4, 5, -5, -5, -8, -1, 4, 7, 4, 2, -10, -2, -9, 7, -6, 1, -1, 6, -5, 4, 1, 3, 2, 7, -2, 5, 4, 0, -7, -5, -7, -6, -9, 9, 9, -4, -8, -1, 6, -6, 8, -3, 6, -8, 2, -5, 1, 8, -9, -3, 4, 8, -1, 1, 7, -3, 8, -5, 0, 6, 3, 2, -7, 8, -9, -3, -8, -6, 3, 5, 4, 7, 3, -7, 3}, + []int{7, 5, -7, -5, 3, 5, -4, 5, 5, 8, 4, -4, 4, 9, 3, -3, -10, -2, 3, 7, 6, 4, 5, -10, 8, -5, 3, -8, -2, -3, -9, -9, -6, 1, -5, -1, -6, 8, -5, 3, -2, 3, 8, 3, 8, -10, 6, 1, 0, 0, -5, -8, -1, 3, 9, 0, 6, 2, 2, 8, -5, -10, -4, 4, -1, -3, 8, 7, 8, -7, -10, -1, 0, -4, 5, 3, -6, 6, -6, -10, -7, -5, -5, 8, -4, 3, 2, -6, 5, -4, 7, 5, -3, 3, -10, -9, 2, -7, 8, -7}, + []int{1, 3, -3, -4, -6, -9, 7, 7, 6, 1, 1, 1, -7, -9, -10, -9, -8, 0, -10, 7, -7, -1, -3, 2, 8, -5, -9, 0, 4, 5, 8, 6, 6, 2, 9, 5, -3, 5, 6, -8, -9, 8, 9, -7, 3, -2, 3, -8, 0, 7, 6, 1, 1, 1, 7, -3, 9, 2, 5, 6, 5, -10, -6, -6, -5, 2, 0, 9, 1, 5, -10, 2, -10, -2, -4, -8, -4, -10, 4, -7, -4, -9, -5, -6, 6, 1, 3, -4, -8, -4, -10, 3, 0, 7, -9, -7, -5, -8, -5, -7}, + []int{-7, -5, -9, -8, -1, -5, 9, 0, -4, 2, -4, -8, -1, 5, -9, 7, 7, -4, -4, -4, 4, -10, 9, -7, 5, 1, 3, 2, 7, -1, -1, 5, 1, 8, -6, 8, 5, 8, 3, -10, 2, 7, 3, -2, 9, 3, 0, 0, 1, -3, -2, 9, 6, 4, 2, 1, -2, -6, 7, 7, -9, -1, 3, 5, 3, 3, 1, 4, 0, 7, 4, -10, -6, -8, 5, -5, -8, 7, -8, -7, 7, 8, 5, 7, -7, 4, -8, -9, -8, 8, -3, -2, 1, 5, 6, 5, -8, 1, -10, -3}, + []int{5, 7, -9, 0, -7, 5, -3, -10, -7, -8, 5, 5, 6, 6, -3, -7, 6, 4, 5, 7, -6, 3, -5, -8, -4, -4, 6, 4, -5, -8, -9, 3, 0, -7, 8, 8, 7, -6, -10, 1, 3, 7, 2, 2, 6, 9, -10, 5, 4, 7, 0, -4, 2, 1, -1, 1, -10, -8, -10, 3, -3, -6, -2, -2, 8, -5, 7, 5, -9, 8, -7, 2, -5, 7, 3, -10, 6, 4, 4, -7, 8, 6, 1, 0, 8, -8, -9, 0, 0, -3, -7, 6, -3, 6, -3, 2, -10, 4, 8, 1}, + []int{6, -10, -9, -10, -8, 0, 3, 2, 3, 0, 3, 2, -10, 7, 1, 9, 9, -4, -3, 3, -3, 0, 5, 5, 1, 1, -2, -2, 9, -3, 7, -10, 3, 9, -4, 5, -4, 7, -8, 1, 4, -1, 7, 0, 1, 9, 2, -8, 9, -9, -1, 8, -6, 8, -7, 0, -7, 2, -4, -5, -6, 8, 9, -4, 7, -1, -4, -10, -9, -9, -7, 1, -6, 0, 5, -2, 6, 1, -7, -7, -1, 7, -4, 4, -6, 2, 9, 2, -6, 5, 7, 1, 5, -1, -4, -3, -6, 7, 8, -1}, + []int{3, 8, -2, -8, 0, -9, -9, -6, 4, 9, 2, -9, 8, -1, -4, 3, 6, 1, -7, 8, 4, -9, -2, 4, -3, 6, 9, 0, 7, 2, -10, -6, -7, 6, 7, 8, -9, 1, -6, -6, 4, -8, 2, -1, -9, -8, -5, 9, -7, 9, -6, -1, 6, 3, 7, -4, -10, -8, -3, -8, -6, 6, 3, 8, 3, -2, 1, 3, -5, -3, -5, 3, 9, 6, -5, -10, -3, 5, 9, 5, 0, -2, 2, 8, 5, 9, -3, 8, -10, 5, -10, -2, 9, -2, 0, -3, -3, -1, 6, -3}, + []int{-9, 3, 0, 9, -8, 8, 7, 6, -10, 6, -2, 0, -1, -7, -2, -10, 0, -7, 5, -3, -10, 9, 2, -10, 9, -10, 4, -7, 3, 5, 3, 8, -1, 4, -1, -5, -3, 9, 8, 8, 5, 7, -2, 3, -7, 9, -2, 8, 0, 8, 1, 7, 9, 8, -5, -8, -3, 6, -2, 3, 8, -3, 4, -2, 0, 7, -9, 3, -5, -7, 4, -1, 2, -3, -7, 8, 3, 2, -5, -3, 9, 1, -6, -10, -4, -1, 7, -9, 7, -1, -8, 9, -8, -2, 6, -7, -6, 0, -9, 7}, + []int{-6, 5, 5, 5, -2, -9, 4, 3, 8, 1, 7, -10, 2, -3, -4, 6, -6, -6, -7, 1, 7, 9, 1, -3, 4, -8, -1, 7, -3, 4, -7, -4, 8, 4, 9, 8, -7, 9, 5, 6, 9, 5, -8, -5, 7, -6, -9, -5, -3, -1, 4, -4, 6, -2, 9, -8, 8, -8, 1, 5, 7, 5, 0, 6, -2, -6, 3, 1, -2, 0, 1, -5, -7, -6, 0, 4, 2, 6, 4, 8, 1, 0, 6, 5, -5, 4, 4, 1, -1, 5, 3, 2, 3, 2, 4, 1, -9, 7, -5, 0}, + []int{2, -1, -7, 7, -3, 5, 1, 5, -8, 9, -3, -6, 3, 8, -2, -9, -8, -2, -10, -10, -6, 7, 0, 4, -5, 8, -3, 0, -3, -8, -7, 1, -7, -10, 3, -6, 1, -3, 2, -7, -8, 1, 4, -3, -5, 8, -4, -8, -2, -7, -9, 5, 4, -5, -2, -3, -9, 5, -5, -7, 4, 8, 1, 3, -10, -6, 1, -8, -4, -10, 2, -7, 3, -8, -9, -3, 8, -9, 8, 7, -5, -8, -5, 0, 2, 0, -4, -10, 5, 4, 2, -10, 5, 0, 3, 7, 9, 2, -3, -7}, + []int{-1, 9, 3, 5, 4, 6, 0, -3, 7, -3, 2, -1, -5, 3, -2, -3, -1, 2, 2, -5, -6, -10, 2, -4, 8, 3, 3, -2, 7, -10, 5, 4, -7, 9, 8, 1, 1, 1, 2, -1, -1, 2, 6, 5, -10, -10, 8, 8, 8, -2, -1, 4, -4, 1, 7, 7, -8, 5, -3, -2, 0, 3, -8, 6, -9, -10, 9, -7, -2, -5, 5, -7, 9, -5, -3, 9, 7, -2, 9, 7, 9, 6, 5, 8, 7, -9, 6, 6, 1, 6, 1, -5, -1, 4, 2, -1, 4, 4, 6, -4}, + []int{4, -9, 0, 4, -7, -5, -3, -10, 6, -2, -6, 5, -3, 1, -9, -7, -9, 0, 1, -5, 5, -5, 0, -1, 9, -7, 6, -5, -7, 4, -9, 7, -1, -6, -3, -4, -10, 7, -1, 2, 4, -6, 1, 5, -7, 0, -2, 9, -9, 6, -6, 0, 5, -5, 8, -8, -7, 7, -10, 2, 9, -7, 8, 7, -10, 3, -5, -8, 4, -7, -8, -5, 1, 7, -8, -8, -8, 5, -4, 9, -1, 7, -1, 6, 8, -2, 3, -9, 0, -4, 1, -4, 1, 8, -7, 1, 6, 6, -6, -6}, + []int{-3, -5, -6, 2, -4, 4, 1, -2, -9, -9, -2, 9, 0, -1, -6, -7, -4, 5, 7, 8, 1, 3, -5, -8, 5, 3, -5, 0, 2, 7, 6, 8, -2, 5, 7, -5, -10, 9, 6, -9, 5, 6, -8, 0, 2, 0, 5, 0, -7, -5, -2, 7, -3, 9, 1, -5, 8, 5, 8, 3, 3, -5, 3, -5, -2, 5, 9, -2, -6, 7, 9, -10, -1, -9, 3, 0, 8, 4, 2, 5, 8, -8, -2, 8, -4, -8, -7, 9, -1, 3, 5, -3, 5, -3, -6, -5, -5, 5, -6, -6}, + []int{-7, -3, 0, 4, 4, -3, -7, -1, -9, -9, -4, 6, 5, 1, -7, 6, -7, 3, 0, -6, -7, 7, -9, 3, -9, 6, 1, 0, -7, -8, -4, -3, 6, -9, -6, 6, 5, 0, -4, 6, 6, -1, -10, 8, -1, -7, -2, -5, 9, -6, -2, -7, -1, -4, -8, -7, -7, -4, -7, 5, -7, 3, 9, -3, -2, -6, -5, -6, -10, 9, -10, -7, 6, -10, -2, -9, -9, 8, 8, 9, -5, -10, -8, -8, 8, 2, -10, -5, -7, -7, 3, 8, -2, 9, 0, 3, 5, 8, -1, 8}, + []int{2, 7, 5, 8, -2, -1, -5, -9, 8, 3, 5, 9, 8, 2, 0, 9, 5, -10, -4, 1, -8, 1, 1, 3, 6, -6, 1, -1, -2, -8, 6, 2, -10, 6, -5, 2, 7, 3, -3, 0, 7, 0, -4, -6, -9, -10, 0, -7, -2, -2, 1, -10, 9, -10, 9, -5, 6, -5, -4, 4, -3, 7, -8, -6, 1, 7, 6, 9, 9, 1, -4, 5, 4, -2, -7, 6, -3, 7, -6, 4, -6, 9, -5, -5, -7, -2, 1, -9, 4, -2, 9, 0, 8, -9, 1, -3, 4, -7, 1, 7}, + []int{-5, -7, 8, -5, -6, -10, 0, 3, -10, 0, -8, -3, -7, 4, 9, -4, 3, -7, -5, 1, -8, -2, 0, 9, 5, -9, 5, -4, 7, -8, -8, 9, -10, 7, -2, -2, 9, -10, 5, -2, 9, 9, -3, -2, -7, -7, 3, -3, 5, -3, 6, -9, -10, 8, 1, 8, 8, -5, 8, 8, 1, 9, 7, -2, 1, 0, 8, -10, 6, -7, 9, -1, 3, 7, 4, -7, 3, 3, -7, -2, -5, 4, 5, -5, 4, -10, 8, 1, -2, -4, -6, 0, -6, -10, 2, 4, 5, -5, -5, 2}, + []int{1, 3, 2, -2, -9, 9, 3, -5, -2, -5, -5, 2, -2, 1, -6, 7, 1, 7, -2, -4, -10, 9, -4, 2, -9, -2, -3, 1, 5, 0, -9, 4, 1, 9, -7, 7, -7, 3, 9, 0, 8, 8, -3, -6, -2, 9, -8, 7, 3, 7, -3, 0, -3, 3, -4, 0, -8, 6, 4, -5, 6, 0, 9, -10, -9, -6, 6, -3, 7, 9, 2, 3, 1, 6, 7, 3, -2, -9, -5, -7, -9, 7, 6, -2, -1, 4, 0, 4, 0, -8, -9, -8, 0, 6, -5, -7, -6, 7, -10, 1}, + []int{7, 4, -6, -6, -2, -7, -3, 6, 3, -9, 7, -5, -4, 2, -6, -2, -1, 2, 6, -9, -4, 3, -2, -8, -2, -2, 3, 5, 7, -2, 3, 3, 9, -9, 9, 3, 7, -10, -5, 6, 0, -3, 8, -1, -2, -4, -5, 8, 6, 1, 0, 0, -9, -5, -7, 5, -8, -7, 4, -2, -2, -7, 7, -9, 6, -9, 7, 3, 3, 4, 2, -6, 2, -6, 2, -1, -9, 6, -9, -4, -1, -5, -4, -7, 2, 1, 1, 9, -9, -6, -7, 3, 2, 3, 1, -7, 6, 7, 0, -2}, + []int{-5, 3, -4, 9, 9, 5, -7, 8, -3, 3, -7, -10, -5, -6, -8, 0, 9, 8, 4, 6, 7, 9, -4, -7, -4, 5, -8, 8, -4, -9, 1, 8, -6, 0, 6, -8, 8, -5, 2, 5, -4, 3, 0, 9, 1, -3, -5, -2, -9, 0, -4, -10, 3, 3, 0, 0, -9, -2, -6, -7, 1, 3, 0, -3, 1, -10, -7, -9, 7, -6, -1, 0, 5, -5, -2, -10, 6, -7, 5, -1, 8, -2, -5, -2, 0, -9, -7, 8, 4, 6, 6, 0, 8, 4, -2, -4, 3, 1, -4, -2}, + []int{3, -4, -7, 3, -8, -2, -6, 5, 2, 5, -6, -5, 2, 9, -1, -7, -6, -7, -1, 1, 6, -10, 4, 5, 2, -3, 0, 2, 5, -6, 2, 1, -8, -3, 9, -1, -4, -4, 0, -10, 4, -7, 6, 6, 2, -7, 7, -7, 8, 9, 6, -9, 2, 1, -8, -8, -2, 6, 4, 3, -1, 8, 9, -5, -3, -9, -7, 4, 5, 5, 8, -3, 5, 1, -7, -9, 7, -9, -10, 4, -2, -4, -10, 1, 7, 3, 6, 5, 5, 4, 0, -9, 4, 3, 0, -3, -5, 4, 7, 2}, + []int{1, -2, 6, 5, 8, 6, 3, -5, -5, -2, -6, 3, -3, 9, -5, 8, 6, 8, -6, -1, -9, 2, 2, 2, 8, 8, -10, 3, 6, 8, -10, 5, 5, -10, -10, -5, 6, 3, 4, -2, -10, -6, -2, -6, -3, 1, 9, -8, -5, 5, 8, -1, -1, 0, -8, 7, -3, -10, 9, 9, 1, 9, -3, -4, 8, -6, -4, -1, 6, 5, -8, 4, 1, -4, -6, -3, 9, 2, 0, 5, -7, 5, -4, -7, 5, 3, -3, 7, 8, 9, 4, 3, 4, 5, -10, 4, 0, 0, 4, 5}, + []int{9, -6, 3, -7, -9, -2, 6, 8, 6, -10, 8, 7, -3, 9, 6, -3, -6, -7, 9, -2, 8, -3, -1, -8, -4, -9, -4, 5, 9, 3, -1, -3, 7, 1, 6, -8, -6, -2, -6, 2, -4, -7, -6, -7, 2, 3, 7, 6, -10, 1, -8, 8, -5, -1, 2, 5, -7, 4, -9, -9, -4, 4, -1, -6, -9, -1, -5, -9, 3, 4, -2, -8, 6, -6, -8, -8, 5, -7, 9, -2, 5, 8, 1, 1, 9, 6, 2, -9, 2, -5, -5, -2, -3, 1, 1, 2, -7, 6, -4, 4}, + []int{1, -1, 2, 2, -4, -7, -4, 8, 9, -1, -3, -1, -3, -4, -10, 0, -9, 3, 1, 3, -4, -8, -4, 5, 7, 1, 2, -1, 6, 5, -5, 4, -7, -5, 6, 4, -9, 2, -8, -3, -5, -9, 4, 6, 9, -8, -9, -1, -3, -4, 4, -4, 6, 3, -10, 1, -9, 8, -4, -2, 6, 4, -6, 6, -10, 0, -9, -6, -9, -2, -10, -1, -9, -9, -4, -1, -9, 5, -2, 8, -6, -9, 7, -3, 9, -3, 9, 6, -4, 3, -7, -6, 8, 3, -1, -4, -10, -5, -1, 3}, + []int{-5, -5, 4, 5, -8, 3, -1, -7, -1, 9, -4, 8, -2, -8, 3, -7, -7, -7, -3, 8, 3, -3, -4, 9, -7, 7, 4, -4, 9, 3, -9, 0, -8, -4, 0, 1, -6, -3, 4, -10, 3, 6, 5, -6, 7, 1, -2, -3, 5, -8, -10, -1, -5, 6, 4, -3, -7, -8, -8, 3, 0, 0, -4, -7, 1, -6, 9, 5, 2, -1, -2, -4, 8, 8, 1, -4, -9, -8, 2, -3, 1, 0, 1, -2, -7, 6, 3, -9, -9, -4, -1, 5, -9, -5, -4, 6, 7, 7, -5, -6}, + []int{8, 8, 7, 0, 1, -10, 1, 0, -2, -3, -7, -7, -6, -5, -8, 7, 9, -6, 8, 7, -5, -7, 9, -10, -3, -1, 5, 7, 1, -10, -6, 7, -4, 9, 2, 2, 3, -8, -1, -4, 5, -2, -3, -3, -8, 5, -7, -4, 2, 5, -5, -3, 6, 6, -10, 2, 3, 4, 6, -5, -8, 8, -10, 2, -4, 9, -9, -10, -7, -6, 5, 9, -1, 9, 1, 8, -2, 4, -2, 6, 0, -8, -8, -3, -8, -4, -6, -8, 0, -9, 6, -4, 0, 4, 7, 1, 3, 0, -2, 7}, + []int{1, 1, 9, 6, 5, 6, 4, -9, -3, -10, 9, 9, -7, -10, 3, 2, 0, -3, 1, 1, -7, -5, -5, -4, -8, -6, 9, -3, -9, -10, 3, -9, -1, 8, -7, -2, -1, -5, 0, 2, 9, -9, 8, 8, 6, -5, 4, -2, -5, 0, 3, 1, -7, 4, 0, 0, -3, 2, 4, -2, 4, -8, 2, 4, 8, 7, -8, 8, -8, 2, 8, 9, 1, 5, 5, -7, -6, 7, -9, -1, -4, 6, 4, 4, 1, -10, -7, -1, 2, 9, 0, 4, -4, 9, -9, 3, 0, -2, -3, -2}, + []int{9, 6, -4, 0, 9, 2, 7, -2, 3, 7, -4, 1, 4, 5, -8, 6, -3, -6, -6, -5, -8, -10, -2, -5, -4, -2, 3, 4, -10, -10, -10, -6, 1, 0, -4, 6, -2, 5, 6, 4, -3, -6, -8, 2, 3, 0, 4, -6, 8, 3, 3, 2, -10, 5, 8, 2, -10, 5, 8, 6, -1, -2, 6, 9, 9, -9, 8, 5, -8, 7, -6, 7, 1, -7, 9, 9, 8, 3, 6, 6, -5, 6, 8, -6, 1, 7, 3, 6, -6, -3, -5, 3, -6, 3, 5, -6, -7, -9, 0, 7}, + []int{2, -1, 3, -2, -5, 6, 0, 5, -1, 3, 0, 0, 1, 6, -7, 9, -4, 7, 0, -1, 8, 7, 5, -7, 0, 0, 7, -1, -8, -4, 4, 5, 5, 9, -7, 3, -10, 7, 6, -9, 6, -9, 0, -4, -5, -5, 2, -5, -7, -7, 9, 9, -9, 1, 8, 1, 5, 5, 8, 6, 2, 7, 1, -6, 8, 1, -4, 4, 7, 4, 9, -5, -10, 7, 8, -4, 0, 1, 0, -6, 5, 6, 8, 0, -9, 2, 6, -9, 0, -2, 0, 8, -7, 3, -7, 8, 4, -8, -8, 6}, + []int{5, -5, -9, -7, 2, 0, -2, -5, 1, 5, 5, -8, -6, 9, -4, -5, 1, 2, 1, 2, 9, 0, -9, 5, -10, 8, -3, 1, -7, 1, -7, 5, 1, 2, 3, -8, -5, 9, 8, 4, 1, 2, 3, 3, 4, -6, 1, -4, 1, -3, -5, -8, 5, -2, 6, 1, 8, -1, 2, 6, -10, 9, -1, 5, 6, 0, -4, -6, -8, -10, -3, 4, -6, 4, -4, 1, 6, -6, -10, -7, 2, -4, -1, -9, -8, -3, -5, -1, -8, -1, -10, -9, -5, -5, -5, 9, 5, -10, 4, -7}, + []int{3, 3, -7, -5, 9, -8, -6, -9, -7, 8, -7, -9, 1, -5, 1, 4, 9, -1, -1, 1, -7, 4, -1, 0, 5, -1, 3, 6, -6, 7, 2, -6, 8, -7, 0, -3, -4, 5, 3, 8, -3, -8, 1, -7, -3, -8, 1, 7, 5, -2, -9, 1, -3, 7, 4, -3, 4, -3, 0, 1, 4, -9, -2, 1, 8, 0, -2, -6, 7, -9, 5, -2, 5, -2, -6, 5, 3, 9, 6, -8, 8, -10, 1, -8, 0, -1, 0, 1, -1, -10, -5, -8, 4, 3, 0, -3, -1, 6, -5, 1}, + []int{9, 3, 7, -1, 1, -1, -4, 5, -10, -7, -10, 6, -4, -7, -9, -2, -1, -4, 1, 5, -9, 5, -1, -9, -7, 5, -4, -8, 0, -3, 3, 7, -1, -4, -4, -4, -2, -2, 3, -6, -1, 1, -3, 2, 0, 1, -9, -6, -10, -9, 6, -3, -4, -10, -1, 8, -4, 8, -10, 4, -4, -8, -6, 8, 5, 6, 6, -3, 0, 0, 3, -8, 6, -5, 9, 9, -10, -2, -5, 6, 4, -2, -9, 5, 5, 9, 1, 1, 8, 9, -6, 6, 7, -1, 4, -8, 2, -7, -8, 6}, + []int{6, -8, -7, 7, 2, -2, -5, 9, -5, -2, -2, 4, -6, 8, 4, 5, -2, -9, 8, -5, -2, 2, 4, -2, 7, -5, 5, -5, 2, 6, -10, 3, 9, -6, 3, -9, -8, -5, -9, -10, -2, -5, -4, 9, -9, -6, -3, 4, 4, -8, -5, -10, 5, -10, -8, -9, 3, 7, -10, -4, -6, 4, -8, 3, 9, -10, -6, 3, 3, 8, -3, -2, 0, -8, 1, -7, 8, -2, -6, -8, -5, 2, 0, -6, 6, -7, 3, -1, -3, 4, 1, 4, 6, 0, -2, 7, 0, 9, -9, 4}, + }, + 292, + 287, + }, + + { + [][]int{ + []int{27, 5, -20, -9, 1, 26, 1, 12, 7, -4, 8, 7, -1, 5, 8}, + []int{16, 28, 8, 3, 16, 28, -10, -7, -5, -13, 7, 9, 20, -9, 26}, + []int{24, -14, 20, 23, 25, -16, -15, 8, 8, -6, -14, -6, 12, -19, -13}, + []int{28, 13, -17, 20, -3, -18, 12, 5, 1, 25, 25, -14, 22, 17, 12}, + []int{7, 29, -12, 5, -5, 26, -5, 10, -5, 24, -9, -19, 20, 0, 18}, + []int{-7, -11, -8, 12, 19, 18, -15, 17, 7, -1, -11, -10, -1, 25, 17}, + []int{-3, -20, -20, -7, 14, -12, 22, 1, -9, 11, 14, -16, -5, -12, 14}, + []int{-20, -4, -17, 3, 3, -18, 22, -13, -1, 16, -11, 29, 17, -2, 22}, + []int{23, -15, 24, 26, 28, -13, 10, 18, -6, 29, 27, -19, -19, -8, 0}, + []int{5, 9, 23, 11, -4, -20, 18, 29, -6, -4, -11, 21, -6, 24, 12}, + []int{13, 16, 0, -20, 22, 21, 26, -3, 15, 14, 26, 17, 19, 20, -5}, + []int{15, 1, 22, -6, 1, -9, 0, 21, 12, 27, 5, 8, 8, 18, -1}, + []int{15, 29, 13, 6, -11, 7, -6, 27, 22, 18, 22, -3, -9, 20, 14}, + []int{26, -6, 12, -10, 0, 26, 10, 1, 11, -10, -16, -18, 29, 8, -8}, + []int{-19, 14, 15, 18, -10, 24, -9, -7, -19, -14, 23, 23, 17, -5, 6}, + }, + -100, + -101, + }, + + { + [][]int{ + []int{28, 4, -19, 18, -7, -10, 27, 19, 1, 16, 0, 10, -17, 11, 11, 27, -1, 10, 12, -1}, + []int{-2, -19, 17, 4, 25, -20, 4, 3, 4, 28, -10, 7, 16, -14, -3, -19, 6, 17, -4, -7}, + []int{2, 8, 18, -17, -2, 10, -6, -5, 11, 10, 22, -6, 19, -16, 6, -4, 18, 5, 22, -17}, + []int{-14, -7, -20, 13, -19, -20, -15, 21, -11, -10, -8, -9, 10, 13, 6, -10, 15, 9, -15, -2}, + []int{-18, 26, 12, 8, 2, 16, -17, 12, 0, -5, 9, -3, -12, -11, 3, -6, -18, 16, -7, -14}, + []int{5, 29, 25, 22, 11, -3, -2, -15, 4, 13, -17, -2, 0, -2, 20, 10, -18, 6, 25, -20}, + []int{5, -7, 8, 5, 15, 22, 8, -5, 22, -18, -5, -14, 23, 2, -8, 12, -16, -18, 12, -12}, + []int{27, 18, 4, 11, -3, 12, -4, -8, -3, 25, -9, 24, -14, 5, 11, -9, -17, 0, 25, -15}, + []int{26, -7, 18, 4, 4, 18, -17, 9, -19, -9, -19, -8, -4, -13, 10, -11, 6, -16, -12, 12}, + []int{28, 22, 7, 11, -6, 13, 8, 22, 7, -14, 17, 14, 10, 29, 16, 9, -3, 18, -9, 10}, + []int{27, 19, -10, -9, 1, 3, 14, 1, 7, 3, -3, 16, -2, 9, 14, -7, -19, -5, 23, 19}, + []int{-17, 7, -20, 8, -5, -6, -2, 25, 29, 16, 23, 4, 4, 27, 16, 17, 9, 20, -6, 22}, + []int{2, 9, -13, 1, -18, 25, 4, 7, 25, 26, -4, 8, -19, 18, 6, -7, -5, 7, 21, -8}, + []int{-2, 11, 1, 29, 6, -16, -8, 3, 7, 11, 10, -2, -1, -20, 20, 4, 19, 5, 29, -7}, + []int{29, -12, -3, 17, 6, 19, 23, 12, -19, 13, 19, 5, 27, 22, -17, 27, 10, -12, 12, 23}, + []int{24, 16, 4, 25, 15, 13, 24, -19, 1, -7, -19, 13, -13, 14, 13, 26, 9, 18, -9, -18}, + []int{-17, 4, -18, -18, -19, 3, -13, 12, 23, -17, -10, -20, 14, 2, 18, 21, -12, 27, -3, 4}, + []int{27, 13, 12, 14, 16, -9, -2, -15, -20, 8, -2, 24, 18, 15, 26, 21, 27, 17, -15, -3}, + []int{25, -8, 17, -10, -16, 13, 26, -11, -15, 6, -5, -13, 23, 2, 24, -4, 5, 8, -15, -1}, + []int{15, -12, 18, 5, -3, 7, 5, 11, -4, -13, 28, 20, 0, -4, -13, -5, -13, -8, -16, 3}, + }, + -123, + -128, + }, + + { + [][]int{ + []int{2, -9, 2, -6, -3, -8, 6, -6, 3, 7, -10, -2, 9, 1, 3, -9, -3, 4, 0, -10, 7, -9, -8, 6, -10, -3, 4, -5, -7, 0, 2, 3, -1, -9, -3, 5, -6, -4, 1, -1, 8, -4, 5, -4, -1, 0, -9, -1, -10, -3}, + []int{-8, 7, 7, -10, -7, 7, 0, 4, 1, 0, 1, -2, 8, 4, -10, -1, 8, 5, -8, 5, 6, -1, 1, 3, -10, 2, 6, 1, -10, -1, 5, 6, 8, 0, 2, 2, 3, -2, 5, 2, 4, -1, 0, 8, -2, 5, 2, 3, -6, -2}, + []int{9, 7, 3, -8, 0, -8, 5, -2, -3, -7, -4, 3, 1, -9, 4, 6, -9, -1, 2, -1, 9, -7, 1, 2, -8, 9, 6, 5, 0, 7, -3, -1, 0, 5, -3, -2, 7, 0, -6, 8, -4, -8, -4, -2, -2, 8, -1, 8, -2, -6}, + []int{1, -7, 5, -10, -4, 6, 4, -3, 1, 5, 7, -1, 3, 4, 6, -7, 0, -6, -6, 1, -8, 5, -5, 7, 8, 1, -8, 9, -2, 3, 0, 9, -3, 5, -8, 9, 8, -2, 5, -8, -6, -3, -1, 7, 1, -5, -10, -10, 3, 0}, + []int{8, 8, -4, -7, -5, -4, -6, -9, 8, 6, 5, -1, -4, 6, 6, -9, -2, 3, -6, 4, -2, 6, -5, 0, 0, 4, -1, 1, -4, -4, 4, 7, -3, 2, -1, -1, 3, 5, 7, -7, 9, -4, -8, -9, -2, -5, -4, -6, 8, 2}, + []int{2, 0, 3, -9, 6, -2, -9, 0, -3, 9, 4, 3, 5, 8, 1, -7, -10, -4, 3, -4, 2, 2, -9, -3, -5, 8, -9, -10, 3, -6, -7, -4, -4, -1, -4, -9, 0, -8, 3, 8, -10, -3, 7, -5, -1, -2, 9, 7, 4, -1}, + []int{0, 3, 5, -9, -5, 2, 5, -7, 2, -7, 2, -4, -3, -8, 0, -3, 2, 2, 9, -2, 9, 4, 4, -7, -4, 1, -6, -10, -8, -1, -4, 1, 4, 5, -2, 7, -4, 8, -1, -9, 3, -6, -5, 8, -3, -7, 5, 5, 4, -8}, + []int{-7, -1, 3, 5, 1, -2, 0, -1, -6, 7, 6, -4, -7, 5, 6, -10, -2, 7, 7, 5, 1, 1, 7, 8, 4, 9, 0, 9, -4, 3, -10, 2, -1, -8, -9, 9, -2, 8, -3, -6, -10, -2, -9, 8, -4, 8, -1, 5, -3, 7}, + []int{-2, 3, -5, 4, 9, -5, -10, 8, -10, -5, -10, -3, -7, -2, -3, 9, 1, -2, -1, -2, 1, 3, 3, -9, 4, 2, 5, -2, 1, 4, 7, -6, -1, 8, 9, -9, 9, -5, -8, -4, -1, 7, -4, 1, -8, -3, 1, 1, -9, -9}, + []int{-9, 9, 8, 0, -2, 5, -8, -6, 8, 6, 3, -10, 8, 9, -3, -6, -2, -1, -1, 8, -4, -6, 8, 9, 1, -5, 8, 0, -8, 0, 7, -9, 0, 0, 4, 3, 1, 8, 8, 4, 5, 5, 6, 7, -9, -9, -3, -4, -4, 4}, + []int{0, -10, 4, 1, 4, 9, -8, 8, 7, -6, -10, -1, 0, 4, 0, 8, 3, 2, 4, 2, -5, 0, -5, -10, -3, -9, 9, 5, 2, 2, 1, 9, 7, -3, -7, 2, -8, 3, 0, -5, -9, -6, -6, -6, -5, 5, 8, 4, 5, -9}, + []int{-7, 8, 1, 6, -9, -10, 0, -1, -10, -9, 8, 3, -10, -5, -7, -7, -5, 1, 7, -5, 2, 5, -5, -10, -6, 8, -1, 2, 4, -7, 0, -3, 6, -3, -6, 2, 9, 8, -9, 1, 2, -8, 8, -3, -10, -7, 4, -10, 6, 9}, + []int{9, 1, 6, 2, 8, -7, 8, -6, 0, -5, -1, -5, 6, 7, -4, -9, -1, -4, 5, 1, 3, -10, -7, 4, 5, -9, 7, 4, 6, 5, -10, -9, -2, 9, -4, -3, 1, -10, 5, -9, -10, 4, -1, -3, -6, 7, -1, -6, -1, -7}, + []int{-1, 8, -9, -6, -2, 0, 3, 5, -1, -1, -1, -8, -6, -6, -1, -8, -1, -1, 2, -1, 1, 4, -6, -7, -6, -9, -7, 4, -5, -1, -5, -1, -10, -2, -5, -10, -10, 4, -6, 7, -4, 7, 9, 0, -9, 3, -1, 4, -7, 3}, + []int{-8, 3, -8, 1, 3, 2, -3, -5, 6, 6, 0, 2, 5, 3, 4, 7, 0, -8, -6, 7, 7, -6, 4, 3, -2, -2, 2, 1, -2, -6, -8, 6, -3, -2, -7, 1, -6, 3, 4, -6, -3, 5, -7, -2, 7, 2, -1, 2, -3, -2}, + []int{-1, -10, 9, -4, -9, -4, 6, 0, 8, -7, 9, 3, -3, 8, 0, -8, 1, 0, -6, -4, -5, -1, -2, 1, -4, -8, -7, -10, 0, 4, 6, 6, -4, 4, 4, -2, 7, 2, -1, 4, 0, -9, 7, 9, -8, 4, -6, -7, -7, -1}, + []int{-5, -6, -3, -8, 6, -10, -5, -9, 5, -3, -10, -8, 8, -2, 4, 6, -3, 8, 2, 4, -5, 1, -7, 6, 0, 6, 9, 6, 9, 6, -6, 2, 9, 7, -8, -3, 0, 4, -1, -4, -7, 6, 3, -5, 6, -7, -10, 8, 7, 7}, + []int{6, 7, -6, -2, 6, -2, 1, -3, 3, -9, -8, 9, -5, -4, 5, 5, -2, -1, -7, 4, 3, -10, -4, -4, 9, -4, -4, -5, -1, -7, 2, 1, -3, 6, 6, 1, 4, -3, -7, -3, -5, -5, 7, -1, 3, -10, 2, 2, 4, -10}, + []int{7, 4, -7, -6, -1, 5, -6, 8, -1, -1, -5, 9, -1, 4, -4, -10, -7, -7, 7, -8, -8, 4, 1, -7, -1, 1, -7, 4, 4, -4, -6, 1, -8, 5, -1, -8, 5, -8, 4, -9, 5, 3, 6, 2, 1, -2, 2, -9, 2, -2}, + []int{-9, -2, -1, -3, 5, 2, 7, 9, 6, -4, 4, -3, -5, 5, 8, 0, 6, 7, -6, 9, -1, 0, 1, -6, 7, 5, 0, 1, -3, -8, -6, -4, -1, -4, 4, 4, 3, -6, 3, 8, -10, 9, -7, -1, 9, 9, -3, -1, 2, 4}, + []int{7, -8, -3, 8, 0, 0, -8, -7, -3, 4, 3, -3, -8, -5, 4, 9, 6, 9, -6, -8, 0, 3, 5, -7, 7, -3, -2, -6, -3, 0, -9, -2, -2, -7, -8, -10, 0, 5, 3, 7, 7, -1, 9, -1, -4, 3, 3, 3, 2, 4}, + []int{-8, -4, 5, 9, -1, 1, 6, 7, 3, 7, -4, 6, -8, 6, -6, 0, 2, -5, 8, -10, 1, 2, 6, 2, -1, -6, -6, 4, 6, -1, -10, -3, -5, -9, 6, -3, -9, 4, -9, -4, -4, 5, 4, -4, -1, -5, -4, 1, -3, -6}, + []int{0, 9, -2, 4, -1, 8, 5, -3, 3, -9, 1, 4, -3, 8, 4, 5, 0, 5, 2, 7, -3, 6, 8, 4, 7, 8, 6, -2, -6, -4, -3, -4, 1, 7, -10, 5, 4, 7, 7, -3, 6, 6, -6, 6, 7, 2, -1, -3, -2, -4}, + []int{4, -7, -7, 4, -7, -1, -8, 5, 2, -10, 7, 6, 0, 1, 6, 5, 4, -5, -8, -6, 0, 5, -1, -10, -5, -9, -7, 1, 3, 4, 0, 2, 5, -1, -6, -5, -7, 2, 0, -1, 3, -4, -1, -7, 9, 4, 4, -3, -3, 7}, + []int{8, -6, 5, 6, -1, 0, -2, 4, 2, -6, -10, 5, 6, -9, -3, 0, -4, -7, 1, -9, 2, 2, 1, 4, -5, -10, -9, 5, 9, -4, -7, -5, 6, 5, 6, 4, -3, -6, -7, 0, -5, -2, -2, 5, 1, 3, -9, 9, 3, -9}, + []int{1, -5, -6, -10, 3, 9, 6, -2, -5, -3, -5, 7, 4, -1, 9, 4, 7, -2, 1, -6, 1, 9, -6, -1, -8, -1, 0, -10, 9, -10, 8, 9, -3, 5, -4, -1, 6, 0, 0, -1, -3, 8, 2, 9, -6, -1, 5, 3, 4, -7}, + []int{-8, -6, 1, 7, -7, 3, 4, 4, 4, 0, 9, 6, 6, 3, -8, 3, 9, 1, 2, -4, 6, 7, -3, 9, -4, -3, -9, 6, -5, -5, -4, 4, 9, -4, -1, 3, 4, -4, 5, -8, -4, -3, 0, -6, -3, 6, -8, 9, -4, -8}, + []int{3, 6, -1, 8, 2, 5, -5, 1, -6, -8, -10, 2, -8, 3, -8, 7, -3, 9, -7, 0, 1, -6, -4, 9, -2, 9, -6, 8, -1, 8, -6, -3, -7, -3, -1, -4, -10, -4, 2, 8, -8, 2, -2, -2, 4, 8, 6, -5, 4, 4}, + []int{-10, 2, 6, 3, 8, -3, -10, 8, 8, 3, -10, -8, -7, 6, 7, -6, 7, 6, -9, -3, 2, -2, 1, -4, 8, -7, 8, -3, -6, 7, 8, 5, -2, 6, 1, -10, 9, 7, -2, -10, -1, 5, 9, 4, 7, -4, 3, -3, -6, 2}, + []int{2, 0, -10, -10, 5, 5, -1, 1, -8, 2, 0, 5, 9, 3, -10, -4, -6, -8, -6, 5, 4, -8, 8, -8, 3, -7, -8, 4, 3, 5, 4, 0, -5, -6, 6, 2, 7, -2, 7, -4, 7, -8, 0, -8, 2, -9, -7, -5, -3, -8}, + []int{7, 1, 1, -10, -2, -9, -2, -10, 2, -4, 8, 7, 9, -8, -3, -9, -6, 5, 1, 2, 9, -4, 3, -9, 3, -8, 9, -3, 7, 1, -7, -5, 9, 5, -4, -9, 1, 1, 8, 4, -9, 2, 2, -10, -6, 2, 2, -10, -1, -4}, + []int{-3, -2, 4, -4, 6, 2, -8, -3, 8, -4, -4, 1, -8, 9, 3, -9, 3, 8, -6, -4, 2, 2, 3, 4, -8, 3, -2, -2, -4, 8, 8, 1, -4, 9, -4, 8, 9, 5, 4, 8, 8, 0, -3, 0, 8, -3, 1, 9, 5, 4}, + []int{0, -5, -4, 9, -8, 4, -4, 1, 6, 8, -8, 0, -6, 1, 2, 4, -10, 0, 4, 6, 5, -1, 1, 2, -3, -8, -6, 0, -8, -2, -3, -4, -1, -6, 5, -3, -8, 5, 0, -3, -3, 0, 2, -9, 0, 8, -6, -5, 0, 8}, + []int{-6, 3, -2, -5, -6, -2, 9, -6, 9, -3, -5, -3, 4, -1, 3, 9, -9, -7, -10, -5, -7, 6, -1, -2, -7, 5, 2, 3, -10, -3, 5, 4, 0, 4, -8, -7, 9, 3, -5, -2, -1, 1, -6, 4, 2, -10, 9, -4, 8, 9}, + []int{7, -10, 3, -7, -4, 3, 3, 1, 0, 8, 0, 3, -6, -4, 7, -10, 9, 7, 8, -6, -7, 5, -10, 7, 5, 2, -2, 4, 4, 7, 5, 3, -6, -2, -3, -10, 5, 9, -2, 7, 7, 0, 9, 4, 5, 8, -3, 8, 4, -6}, + []int{-8, 2, -5, 9, -8, -4, 9, 7, -2, -6, 9, -9, 2, 0, 7, -9, 9, 4, 5, -6, 3, 9, 6, 8, 9, -7, -3, 0, -6, 7, -7, 7, 1, -8, -9, 0, 7, 7, -7, 7, 8, -4, -6, -2, 7, -1, -2, 9, 9, 0}, + []int{-4, -8, -10, 8, 9, -1, -4, -3, 2, -8, -8, -1, -3, -3, -6, 0, -1, -4, 7, 9, -6, -9, -7, 9, 1, -7, 7, -6, 4, 8, 6, 5, -5, 5, 3, 3, -7, -8, -7, -3, -3, 1, 6, -9, 7, -9, 1, 9, 7, -5}, + []int{-2, 2, -2, 9, -7, 6, 6, 4, 4, -3, -8, -8, -8, 0, -3, 3, 6, -8, -8, 1, -2, 0, 9, -7, 7, 8, -9, -9, -4, 8, -7, -4, -2, -7, 8, 6, -8, -6, 0, 4, -4, -3, -5, -3, 3, 8, 2, 8, -2, -9}, + []int{5, 9, 1, -5, 6, 6, 4, 9, -7, 8, 8, 0, -5, 6, 9, 7, -7, -6, -6, 6, -1, 3, -8, -6, 7, -8, -6, -2, 6, 3, -4, 9, 9, 8, -9, -2, 9, -2, 9, -9, -10, -2, 5, 9, 8, -9, -3, -9, 3, -10}, + []int{-10, -3, -1, -9, -4, 7, -1, 7, -10, -2, -10, 4, 4, -3, -2, -3, -8, 4, 5, 7, 9, -6, 1, 5, -5, -3, -7, -6, -9, 2, 1, 8, 1, 8, -8, -1, -5, 1, 8, 3, -1, -1, -2, -1, 6, -3, 3, -6, -9, 6}, + []int{2, -1, -10, 5, -1, -3, -3, 6, 1, -1, -10, -1, -9, 2, 7, 3, 3, -10, 3, 3, 8, -7, 5, 6, -4, 4, -3, -10, -3, -2, 6, -1, 5, 0, -2, -4, -5, -6, 9, 8, -4, -6, 8, 7, -2, -2, -4, 9, 4, -2}, + []int{-2, -6, 6, -8, 8, 2, -6, -9, 3, -10, -5, -10, -1, -4, 5, 1, -2, -4, 9, -8, 1, 0, -1, -5, -9, -10, -3, 2, 7, -2, 5, -10, 5, 9, -2, 3, 0, -4, -9, 8, 6, 1, 5, 4, -9, -3, -6, 6, -10, 1}, + []int{1, 7, 2, -6, 8, -6, -8, -5, 8, -8, 2, 8, 0, 6, -8, -3, 8, 8, -8, -5, -5, -5, -5, -1, -1, 1, -10, 5, -3, -9, 6, -2, -8, -9, -8, 5, 1, -9, -9, -6, -5, -2, -5, -4, 0, -10, -6, -6, 1, -6}, + []int{9, 4, 3, 0, 6, -1, -2, 9, 7, 4, 4, -4, -2, -8, 1, 8, 2, -6, -10, -10, 8, -4, -9, -5, 3, 1, 6, -2, 1, 3, -7, 1, -9, 2, 6, -9, 3, 1, 5, -3, 8, -9, -6, 5, 9, -2, -3, -5, 2, -8}, + []int{6, -4, 7, 1, 8, -1, 2, 5, 5, -2, -1, 0, -6, -8, -6, -9, 5, 9, 5, 2, -8, -9, 7, -2, -8, -6, 4, 1, 6, 2, 2, 8, 1, -9, 7, 5, -8, 2, 8, -4, 1, -2, 9, -10, 6, -7, -2, 4, 6, 0}, + []int{5, 2, 8, 4, -7, 4, -4, 3, 3, 1, -2, -5, -5, -7, 3, 9, 1, -10, 1, -4, 4, 7, 6, -10, -5, 1, 8, -5, -10, -1, -9, -6, -4, -8, -8, 5, -6, 6, -7, -4, -10, 1, 9, 8, 9, 4, -7, 4, -7, 7}, + []int{-2, 1, 0, -10, 5, -6, 1, 9, -3, -10, 4, 4, 0, -3, -9, 1, -4, 1, -6, 7, 7, -2, -7, -7, 5, -5, -9, 0, -10, -10, 3, -2, -5, -7, 2, 0, 5, 7, -10, 1, -9, 3, 2, 6, 7, -9, 1, 0, 9, 3}, + []int{4, 0, 3, -5, -1, 7, 4, 7, 7, -5, -2, -3, 7, 8, -7, 0, -5, -6, 2, -1, 8, 5, 8, 4, 0, -2, -2, 2, 1, -6, -2, -7, 2, -7, 0, 8, 9, 0, 9, -1, -5, 6, 2, -9, -4, 8, 7, -6, -10, 7}, + []int{1, 4, -3, -6, 4, 6, 4, 4, 9, 8, 2, 2, -5, 6, 2, 5, 6, 6, -5, -9, 9, -7, -8, 7, -4, 7, -5, -2, 6, -8, 1, 4, 5, -8, -6, 4, -10, -7, -3, -1, -6, -4, 1, 1, 1, 2, 9, -4, -2, -1}, + []int{1, -2, 3, -4, 6, 2, 3, 0, -3, -8, 8, -4, -10, 4, 2, 1, -5, -10, 6, -2, 6, 3, -5, 6, -2, -5, 6, -7, -9, 8, -1, -7, 7, 5, -1, 8, -3, -6, 8, 0, 7, 7, -1, -4, -10, -4, 1, 5, 3, 0}, + }, + 300, + 194, + }, + + // 可以有多个 testcase +} + +func Test_maxSumSubmatrix(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + // fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, maxSumSubmatrix(tc.matrix, tc.k)) + } +} + +func Benchmark_maxSumSubmatrix(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + maxSumSubmatrix(tc.matrix, tc.k) + } + } +} diff --git a/Algorithms/0365.water-and-jug-problem/README.md b/Algorithms/0365.water-and-jug-problem/README.md new file mode 100755 index 000000000..7390699ff --- /dev/null +++ b/Algorithms/0365.water-and-jug-problem/README.md @@ -0,0 +1,34 @@ +# [365. Water and Jug Problem](https://leetcode.com/problems/water-and-jug-problem/) + +## 题目 + +You are given two jugs with capacities x and y litres. There is an infinite amount of water supply available. +You need to determine whether it is possible to measure exactly z litres using these two jugs. + +If z liters of water is measurable, you must have z liters of water contained within one or both buckets by the end. + +Operations allowed: + +1. Fill any of the jugs completely with water. +1. Empty any of the jugs. +1. Pour water from one jug into another till the other jug is completely full or the first jug itself is empty. + +Example 1: (From the famous "Die Hard" example) + +```text +Input: x = 3, y = 5, z = 4 +Output: True +``` + +Example 2: + +```text +Input: x = 2, y = 6, z = 5 +Output: False +``` + +Credits:Special thanks to @vinod23 for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0365.water-and-jug-problem/water-and-jug-problem.go b/Algorithms/0365.water-and-jug-problem/water-and-jug-problem.go new file mode 100755 index 000000000..fd9c04411 --- /dev/null +++ b/Algorithms/0365.water-and-jug-problem/water-and-jug-problem.go @@ -0,0 +1,33 @@ +package Problem0365 + +func canMeasureWater(x int, y int, z int) bool { + // 不需要水壶就能实现 + if z == 0 { + return true + } + + // 两个水壶都不够装 + if x+y < z { + return false + } + + // 此段以后,需要 x <= y + if x > y { + x, y = y, x + } + + // 只有一个水壶的话, + // 只能提供另一个水壶的容量 + if x == 0 { + return y == z + } + + // y%x == 0 时, + // x 是初始 x 和 y 的最大公约数 + // z%x == 0 的容量都可以提供 + for y%x != 0 { + x, y = y%x, x + } + + return z%x == 0 +} diff --git a/Algorithms/0365.water-and-jug-problem/water-and-jug-problem_test.go b/Algorithms/0365.water-and-jug-problem/water-and-jug-problem_test.go new file mode 100755 index 000000000..2e71bebb5 --- /dev/null +++ b/Algorithms/0365.water-and-jug-problem/water-and-jug-problem_test.go @@ -0,0 +1,45 @@ +package Problem0365 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + x int + y int + z int + ans bool +}{ + + {11, 3, 13, true}, + {0, 0, 0, true}, + {3, 5, 4, true}, + {4, 6, 8, true}, + {3, 5, 1, true}, + {2, 6, 5, false}, + {2, 6, 15, false}, + {0, 2, 1, false}, + + // 可以有多个 testcase +} + +func Test_canMeasureWater(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, canMeasureWater(tc.x, tc.y, tc.z), "输入:%v", tc) + } +} + +func Benchmark_canMeasureWater(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + canMeasureWater(tc.x, tc.y, tc.z) + } + } +} diff --git a/Algorithms/0367.valid-perfect-square/README.md b/Algorithms/0367.valid-perfect-square/README.md new file mode 100755 index 000000000..d2d637b71 --- /dev/null +++ b/Algorithms/0367.valid-perfect-square/README.md @@ -0,0 +1,27 @@ +# [367. Valid Perfect Square](https://leetcode.com/problems/valid-perfect-square/) + +## 题目 + +Given a positive integer num, write a function which returns True if num is a perfect square else False. + +Note: Do not use any built-in library function such as sqrt. + +Example 1: + +```text +Input: 16 +Returns: True +``` + +Example 2: + +```text +Input: 14 +Returns: False +``` + +Credits:Special thanks to @elmirap for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0367.valid-perfect-square/valid-perfect-square.go b/Algorithms/0367.valid-perfect-square/valid-perfect-square.go new file mode 100755 index 000000000..bebce7852 --- /dev/null +++ b/Algorithms/0367.valid-perfect-square/valid-perfect-square.go @@ -0,0 +1,16 @@ +package Problem0367 + +func isPerfectSquare(num int) bool { + r := intSqrt(num) + return r*r == num +} + +func intSqrt(n int) int { + r := n + + for r*r > n { + r = (r + n/r) / 2 + } + + return r +} diff --git a/Algorithms/0367.valid-perfect-square/valid-perfect-square_test.go b/Algorithms/0367.valid-perfect-square/valid-perfect-square_test.go new file mode 100755 index 000000000..c8ae08795 --- /dev/null +++ b/Algorithms/0367.valid-perfect-square/valid-perfect-square_test.go @@ -0,0 +1,39 @@ +package Problem0367 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + num int + ans bool +}{ + + {16, true}, + {64, true}, + {256, true}, + {14, false}, + + // 可以有多个 testcase +} + +func Test_isPerfectSquare(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, isPerfectSquare(tc.num), "输入:%v", tc) + } +} + +func Benchmark_isPerfectSquare(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + isPerfectSquare(tc.num) + } + } +} diff --git a/Algorithms/0368.largest-divisible-subset/README.md b/Algorithms/0368.largest-divisible-subset/README.md new file mode 100755 index 000000000..d63cca6a9 --- /dev/null +++ b/Algorithms/0368.largest-divisible-subset/README.md @@ -0,0 +1,29 @@ +# [368. Largest Divisible Subset](https://leetcode.com/problems/largest-divisible-subset/) + +## 题目 + +Given a set of distinct positive integers, find the largest subset such that every pair (Si, Sj) of elements in this subset satisfies: Si % Sj = 0 or Sj % Si = 0. + +If there are multiple solutions, return any subset is fine. + +Example 1: + +```text +nums: [1,2,3] + +Result: [1,2] (of course, [1,3] will also be ok) +``` + +Example 2: + +```text +nums: [1,2,4,8] + +Result: [1,2,4,8] +``` + +Credits:Special thanks to @Stomach_ache for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0368.largest-divisible-subset/largest-divisible-subset.go b/Algorithms/0368.largest-divisible-subset/largest-divisible-subset.go new file mode 100755 index 000000000..730d94a4a --- /dev/null +++ b/Algorithms/0368.largest-divisible-subset/largest-divisible-subset.go @@ -0,0 +1,57 @@ +package Problem0368 + +import "sort" + +func largestDivisibleSubset(a []int) []int { + size := len(a) + if size == 0 { + return []int{} + } + + sort.Ints(a) + // 注意:下面的 a 是升序的啦 + + // max 是符合题意的 largest subset 的长度 + // largest subset 中最小值是 a[idx] + max := 1 + idx := 0 + + // dp[i] 是 a[i:] 中包含 a[i] 的 largest subset 的长度 + dp := make([]int, size) + for i := range dp { + dp[i] = 1 + } + + // next 用来记录符合题意的 largest subset 的元素的索引值 + // largest subset 中 a[i] 的下一个元素是 a[next[i]] + // 这样的话,由 idx 就可以得出 result 了 + next := make([]int, size) + + // 从大往小,可以检查,因为 + // 如果 a[j]%a[i]==0的话,a[next[j]]%a[i]==0 肯定成立,就无需再检查了 + for i := size - 2; 0 <= i; i-- { + for j := size - 1; i < j; j-- { + if a[j]%a[i] != 0 { + continue + } + if dp[i] < dp[j]+1 { + // a[i] 指向 a[j] 可以让符合题意的 subset 变大 + next[i] = j + dp[i] = dp[j] + 1 + } + // 出现了更大的 subset + if max < dp[i] { + max = dp[i] + idx = i + } + } + } + + res := make([]int, max) + for i := range res { + res[i] = a[idx] + idx = next[idx] + } + + return res +} diff --git a/Algorithms/0368.largest-divisible-subset/largest-divisible-subset_test.go b/Algorithms/0368.largest-divisible-subset/largest-divisible-subset_test.go new file mode 100755 index 000000000..c52335996 --- /dev/null +++ b/Algorithms/0368.largest-divisible-subset/largest-divisible-subset_test.go @@ -0,0 +1,59 @@ +package Problem0368 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans []int +}{ + + { + []int{1, 2, 3,4,5,6,7,8,9}, + []int{1, 2,4,8}, + }, + + { + []int{1, 2, 3}, + []int{1, 3}, + }, + + { + []int{}, + []int{}, + }, + + { + []int{1, 2, 4, 8}, + []int{1, 2, 4, 8}, + }, + + { + []int{832, 33, 531, 416, 335, 298, 365, 352, 582, 936, 366, 305, 930, 530, 97, 349, 71, 295, 840, 108, 299, 804, 925, 627, 953, 571, 658, 732, 429, 136, 563, 462, 666, 330, 796, 315, 695, 500, 896, 982, 217, 200, 912, 98, 297, 612, 169, 943, 628, 593, 959, 904, 219, 240, 857, 789, 897, 940, 569, 384, 502, 382, 401, 184, 716, 230, 29, 963, 211, 597, 515, 122, 163, 86, 215, 105, 889, 842, 49, 847, 267, 87, 954, 407, 245, 975, 719, 746, 709, 471, 281, 238, 186, 510, 618, 149, 73, 214, 663, 194, 260, 825, 631, 474, 519, 668, 329, 718, 765, 947, 156, 353, 490, 962, 679, 560, 59, 387, 31, 692, 976, 568, 201, 273, 159, 730, 819, 418, 906, 801, 892, 672, 559, 866, 389, 675, 812, 744, 164, 737, 57, 195, 115, 933, 158, 909, 598, 359, 853, 314, 983, 11, 395, 153, 781, 301, 838, 625, 704, 256, 351, 996, 225, 644, 521, 509, 674, 417, 272, 622, 937, 723, 632, 331, 228, 412, 181, 435, 469, 157, 368, 524, 38, 132, 325, 420, 127, 731, 771, 604, 505, 634, 67, 374, 894, 3, 448, 878, 686, 641, 316, 207, 76, 363, 795, 235, 770, 446, 820, 493, 177, 816, 615, 410, 117, 944, 829, 190, 831, 289, 516, 964, 170, 134, 671, 885, 682, 119, 402, 82, 485, 901, 375, 68, 858, 739, 56, 974, 683, 884, 815, 872, 715, 104, 290, 348, 588, 834, 788, 472, 466, 867, 550, 779, 65, 802, 459, 440, 870, 753, 608, 808, 623, 642, 44, 437, 865, 758, 540, 506, 691, 958, 854, 546, 39, 595, 369, 504, 63, 311, 722, 441, 786, 899, 338, 651, 874, 946, 811, 848, 939, 284, 824, 309, 653, 133, 514, 460, 678, 54, 399, 759, 468, 61, 480, 783, 266, 900, 400, 237, 403, 534, 213, 914, 473, 198, 380, 373, 288, 154, 844, 535, 409, 249, 285, 168, 69, 345, 647, 851, 846, 264, 102, 246, 106, 648, 576, 212, 438, 981, 987, 379, 360, 667, 95, 172, 101, 580, 891, 385, 747, 161, 927, 361, 818, 657, 171, 342, 232, 734, 714, 362, 425, 475, 28, 41, 551, 142, 131, 51, 229, 9, 607, 326, 522, 687, 792, 845, 665, 358, 91, 720, 155, 565, 99, 26, 650, 539, 780, 589, 950, 935, 372, 227, 424, 750, 833, 554, 841, 552, 60, 757, 430, 916, 140, 790, 426, 776, 96, 199, 923, 806, 949, 755, 711, 659, 911, 611, 310, 774, 265, 880, 690, 706, 761, 286, 255, 756, 204, 444, 478, 601, 529, 669, 241, 784, 566, 528, 208, 270, 511, 236, 271, 378, 58, 453, 467, 233, 250, 567, 296, 932, 989, 367, 626, 35, 162, 887, 572, 603, 564, 797, 280, 406, 970, 689, 408, 431, 638, 489, 85, 50, 357, 803, 47, 555, 793, 422, 763, 110, 869, 861, 253, 320, 538, 347, 405, 769, 64, 875, 630, 537, 328, 553, 166, 948, 303, 160, 800, 507, 920, 922, 90, 693, 636, 17, 455, 183, 210, 856, 762, 656, 174, 873, 579, 176, 688, 640, 1, 938, 902, 341, 740, 581, 427, 111, 972, 443, 22, 791, 304, 574, 575, 725, 477, 700, 817, 381, 479, 248, 121, 411, 547, 182, 871, 599, 203, 13, 224, 541, 724, 178, 775, 388, 4, 251, 321, 52, 88, 100, 279, 614, 839, 84, 151, 735, 40, 752, 773, 376, 77, 476, 708, 396, 988, 961, 24, 231, 445, 609, 952, 965, 986, 414, 451, 881, 42, 257, 32, 334, 130, 596, 527, 94, 333, 317, 244, 960, 710, 852, 862, 421, 81, 37, 452, 274, 187, 268, 520, 491, 778, 18, 743, 620, 145, 72, 370, 118, 748, 633, 997, 436, 143, 573, 495, 180, 34}, + []int{1, 13, 26, 52, 104, 208, 416, 832}, + }, + + // 可以有多个 testcase +} + +func Test_largestDivisibleSubset(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, largestDivisibleSubset(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_largestDivisibleSubset(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + largestDivisibleSubset(tc.nums) + } + } +} diff --git a/Algorithms/0371.sum-of-two-integers/README.md b/Algorithms/0371.sum-of-two-integers/README.md new file mode 100755 index 000000000..3aa20550b --- /dev/null +++ b/Algorithms/0371.sum-of-two-integers/README.md @@ -0,0 +1,14 @@ +# [371. Sum of Two Integers](https://leetcode.com/problems/sum-of-two-integers/) + +## 题目 + +Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -. + +Example: +Given a = 1 and b = 2, return 3. + +Credits:Special thanks to @fujiaozhu for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0371.sum-of-two-integers/sum-of-two-integers.go b/Algorithms/0371.sum-of-two-integers/sum-of-two-integers.go new file mode 100755 index 000000000..3775f03ce --- /dev/null +++ b/Algorithms/0371.sum-of-two-integers/sum-of-two-integers.go @@ -0,0 +1,8 @@ +package Problem0371 + +func getSum(a int, b int) int { + for a != 0 { + a, b = (a&b)<<1, a^b + } + return b +} diff --git a/Algorithms/0371.sum-of-two-integers/sum-of-two-integers_test.go b/Algorithms/0371.sum-of-two-integers/sum-of-two-integers_test.go new file mode 100755 index 000000000..7e86797c4 --- /dev/null +++ b/Algorithms/0371.sum-of-two-integers/sum-of-two-integers_test.go @@ -0,0 +1,41 @@ +package Problem0371 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + a int + b int + ans int +}{ + + {0, 2, 2}, + + {1, 0, 1}, + + {1, 2, 3}, + + // 可以有多个 testcase +} + +func Test_getSum(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, getSum(tc.a, tc.b), "输入:%v", tc) + } +} + +func Benchmark_getSum(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + getSum(tc.a, tc.b) + } + } +} diff --git a/Algorithms/0372.super-pow/README.md b/Algorithms/0372.super-pow/README.md new file mode 100755 index 000000000..81f485a25 --- /dev/null +++ b/Algorithms/0372.super-pow/README.md @@ -0,0 +1,25 @@ +# [372. Super Pow](https://leetcode.com/problems/super-pow/) + +## 题目 + +Your task is to calculate ab mod 1337 where a is a positive integer and b is an extremely large positive integer given in the form of an array. + +```text +Example1: +a = 2 +b = [3] + +Result: 8 + +Example2: +a = 2 +b = [1,0] + +Result: 1024 +``` + +Credits:Special thanks to @Stomach_ache for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0372.super-pow/super-pow.go b/Algorithms/0372.super-pow/super-pow.go new file mode 100755 index 000000000..6318d1517 --- /dev/null +++ b/Algorithms/0372.super-pow/super-pow.go @@ -0,0 +1,27 @@ +package Problem0372 + +// (a*b) % k = ((a%k)*(b%k)) % k +func superPow(a int, b []int) int { + base := 1337 + + // return a^k mod base + powmod := func(a, k int) int { + a %= base + res := 1 + + for i := 0; i < k; i++ { + res = (res * a) % base + } + return res + } + + n := len(b) + if n == 0 { + return 1 + } + + lastB := b[n-1] + newB := b[:n-1] + + return (powmod(superPow(a, newB), 10) * powmod(a, lastB)) % base +} diff --git a/Algorithms/0372.super-pow/super-pow_test.go b/Algorithms/0372.super-pow/super-pow_test.go new file mode 100755 index 000000000..5de4937ae --- /dev/null +++ b/Algorithms/0372.super-pow/super-pow_test.go @@ -0,0 +1,53 @@ +package Problem0372 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + a int + b []int + ans int +}{ + + { + 2, + []int{3, 4, 5}, + 694, + }, + + { + 2, + []int{3}, + 8, + }, + + { + 2, + []int{1, 0}, + 1024, + }, + + // 可以有多个 testcase +} + +func Test_superPow(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, superPow(tc.a, tc.b), "输入:%v", tc) + } +} + +func Benchmark_superPow(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + superPow(tc.a, tc.b) + } + } +} diff --git a/Algorithms/0373.find-k-pairs-with-smallest-sums/README.md b/Algorithms/0373.find-k-pairs-with-smallest-sums/README.md new file mode 100755 index 000000000..a508ea947 --- /dev/null +++ b/Algorithms/0373.find-k-pairs-with-smallest-sums/README.md @@ -0,0 +1,41 @@ +# [373. Find K Pairs with Smallest Sums](https://leetcode.com/problems/find-k-pairs-with-smallest-sums/) + +## 题目 + +You are given two integer arrays nums1 and nums2 sorted in ascending order and an integer k. + +Define a pair (u,v) which consists of one element from the first array and one element from the second array. + +Find the k pairs (u1,v1),(u2,v2) ...(uk,vk) with the smallest sums. + +```text +Example 1: +Given nums1 = [1,7,11], nums2 = [2,4,6], k = 3 + +Return: [1,2],[1,4],[1,6] + +The first 3 pairs are returned from the sequence: +[1,2],[1,4],[1,6],[7,2],[7,4],[11,2],[7,6],[11,4],[11,6] + +Example 2: +Given nums1 = [1,1,2], nums2 = [1,2,3], k = 2 + +Return: [1,1],[1,1] + +The first 2 pairs are returned from the sequence: +[1,1],[1,1],[1,2],[2,1],[1,2],[2,2],[1,3],[1,3],[2,3] + +Example 3: +Given nums1 = [1,2], nums2 = [3], k = 3 + +Return: [1,3],[2,3] + +All possible pairs are returned from the sequence: +[1,3],[2,3] +``` + +Credits:Special thanks to @elmirap and @StefanPochmann for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0373.find-k-pairs-with-smallest-sums/find-k-pairs-with-smallest-sums.go b/Algorithms/0373.find-k-pairs-with-smallest-sums/find-k-pairs-with-smallest-sums.go new file mode 100755 index 000000000..9e0a67979 --- /dev/null +++ b/Algorithms/0373.find-k-pairs-with-smallest-sums/find-k-pairs-with-smallest-sums.go @@ -0,0 +1,79 @@ +package Problem0373 + +import "container/heap" + +type pair struct { + i int + j int + sum int +} + +type priorityQueue []*pair + +func (pq priorityQueue) Len() int { return len(pq) } + +func (pq priorityQueue) Less(i, j int) bool { + return pq[i].sum < pq[j].sum +} + +func (pq priorityQueue) Swap(i, j int) { + pq[i], pq[j] = pq[j], pq[i] +} + +func (pq *priorityQueue) Push(x interface{}) { + p := x.(*pair) + *pq = append(*pq, p) +} + +func (pq *priorityQueue) Pop() interface{} { + old := *pq + n := len(old) + p := old[n-1] + *pq = old[0 : n-1] + return p +} + +func kSmallestPairs(a, b []int, k int) [][]int { + var res [][]int + if len(a) == 0 || len(b) == 0 { + return res + } + + // 可以想象一下,存在一个 len(a) * len(b) 的矩阵 mat + // mat[i][j] == a[i]+b[j] + // res 就是 mat 中前 k 项值的坐标对 + // 由题意可知,a,b 递增,那么 mat 中的每一行和每一列也是递增的。 + + pqLen := min(k, len(a)) + // 先把 mat[:][0] 的值放入 pq + pq := make(priorityQueue, pqLen) + for l := 0; l < k && l < len(a); l++ { + pq[l] = &pair{i: l, j: 0, sum: a[l] + b[0]} + } + // 初始化 pq + heap.Init(&pq) + + var min *pair + + for ; k > 0 && len(pq) > 0; k-- { + // 获取 heap 中 sum 值最小的 pair + min = heap.Pop(&pq).(*pair) + // 加入到 res + res = append(res, []int{a[min.i], b[min.j]}) + // mat[i][j] 被 pop 出去了,就把 mat[i][j+1] push 到 pq + // 保证 mat 中每一行都有一个最小的在 pq 中, + // 就可以保证 pq 中的 min 就是下一个 sum值最小的元素 + if min.j+1 < len(b) { + heap.Push(&pq, &pair{i: min.i, j: min.j + 1, sum: a[min.i] + b[min.j+1]}) + } + } + + return res +} + +func min(a, b int) int { + if a < b { + return a + } + return b +} diff --git a/Algorithms/0373.find-k-pairs-with-smallest-sums/find-k-pairs-with-smallest-sums_test.go b/Algorithms/0373.find-k-pairs-with-smallest-sums/find-k-pairs-with-smallest-sums_test.go new file mode 100755 index 000000000..04d09f364 --- /dev/null +++ b/Algorithms/0373.find-k-pairs-with-smallest-sums/find-k-pairs-with-smallest-sums_test.go @@ -0,0 +1,85 @@ +package Problem0373 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums1 []int + nums2 []int + k int + ans [][]int +}{ + + { + []int{1, 7, 11}, + []int{}, + 3, + nil, + }, + + { + []int{1, 7, 11}, + []int{2, 4, 6}, + 3, + [][]int{ + []int{1, 2}, + []int{1, 4}, + []int{1, 6}, + }, + }, + + { + []int{1, 1, 2}, + []int{1, 2, 3}, + 2, + [][]int{ + []int{1, 1}, + []int{1, 1}, + }, + }, + + { + []int{3}, + []int{1, 2}, + 3, + [][]int{ + []int{3, 1}, + []int{3, 2}, + }, + }, + + { + []int{1, 2, 3, 4}, + []int{2, 6, 8}, + 3, + [][]int{ + []int{1, 2}, + []int{2, 2}, + []int{3, 2}, + }, + }, + + // 可以有多个 testcase +} + +func Test_kSmallestPairs(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, kSmallestPairs(tc.nums1, tc.nums2, tc.k), "输入:%v", tc) + } +} + +func Benchmark_kSmallestPairs(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + kSmallestPairs(tc.nums1, tc.nums2, tc.k) + } + } +} diff --git a/Algorithms/0375.guess-number-higher-or-lower-ii/README.md b/Algorithms/0375.guess-number-higher-or-lower-ii/README.md new file mode 100755 index 000000000..05ef0a2de --- /dev/null +++ b/Algorithms/0375.guess-number-higher-or-lower-ii/README.md @@ -0,0 +1,33 @@ +# [375. Guess Number Higher or Lower II](https://leetcode.com/problems/guess-number-higher-or-lower-ii/) + +## 题目 + +We are playing the Guess Game. The game is as follows: + +I pick a number from 1 to n. You have to guess which number I picked. + +Every time you guess wrong, I'll tell you whether the number I picked is higher or lower. + +However, when you guess a particular number x, and you guess wrong, you pay $x. You win the game when you guess the number I picked. + +Example: + +```text +n = 10, I pick 8. + +First round : You guess 5, I tell you that it's higher. You pay $5. +Second round: You guess 7, I tell you that it's higher. You pay $7. +Third round : You guess 9, I tell you that it's lower. You pay $9. + +Game over. 8 is the number I picked. + +You end up paying $5 + $7 + $9 = $21. + +Given a particular n ≥ 1, find out how much money you need to have to guarantee a win. +``` + +Credits:Special thanks to @agave and @StefanPochmann for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0375.guess-number-higher-or-lower-ii/guess-number-higher-or-lower-ii.go b/Algorithms/0375.guess-number-higher-or-lower-ii/guess-number-higher-or-lower-ii.go new file mode 100755 index 000000000..e10f55f0b --- /dev/null +++ b/Algorithms/0375.guess-number-higher-or-lower-ii/guess-number-higher-or-lower-ii.go @@ -0,0 +1,39 @@ +package Problem0375 + +func getMoneyAmount(n int) int { + // dp[i][j] 保证能猜出 i<=x<=j 中 x 的具体值的最小金额 + // dp[1][n] 是答案 + dp := make([][]int, n+1) + for i := range dp { + dp[i] = make([]int, n+1) + } + + for j := 2; j <= n; j++ { + for i := j - 1; 0 < i; i-- { + // 为了确保可以猜出 i<=x<=j 中的 x + // 第一次,我们可以猜 x 为,i,i+1,...,j-1 + // 所有这些可能性中的最小值就是 dp[i][j] 的值 + dp[i][j] = i + dp[i+1][j] + for k := i + 1; k < j; k++ { + // k+max(dp[i][k-1], dp[k+1][j])) 猜 x 为 k 所花费的最小费用 + dp[i][j] = min(dp[i][j], k+max(dp[i][k-1], dp[k+1][j])) + } + } + } + + return dp[1][n] +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} + +func min(a, b int) int { + if a < b { + return a + } + return b +} diff --git a/Algorithms/0375.guess-number-higher-or-lower-ii/guess-number-higher-or-lower-ii_test.go b/Algorithms/0375.guess-number-higher-or-lower-ii/guess-number-higher-or-lower-ii_test.go new file mode 100755 index 000000000..2d19c8f5e --- /dev/null +++ b/Algorithms/0375.guess-number-higher-or-lower-ii/guess-number-higher-or-lower-ii_test.go @@ -0,0 +1,50 @@ +package Problem0375 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + n int + ans int +}{ + + {12, 21}, + {5, 6}, + {1, 0}, + {2, 1}, + {3, 2}, + {5, 6}, + {6, 8}, + {7, 10}, + {8, 12}, + {9, 14}, + {10, 16}, + {12, 21}, + {20, 49}, + {100, 400}, + {300, 1640}, + + // 可以有多个 testcase +} + +func Test_getMoneyAmount(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, getMoneyAmount(tc.n), "输入:%v", tc) + } +} + +func Benchmark_getMoneyAmount(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + getMoneyAmount(tc.n) + } + } +} diff --git a/Algorithms/0376.wiggle-subsequence/README.md b/Algorithms/0376.wiggle-subsequence/README.md new file mode 100755 index 000000000..0d39675ea --- /dev/null +++ b/Algorithms/0376.wiggle-subsequence/README.md @@ -0,0 +1,33 @@ +# [376. Wiggle Subsequence](https://leetcode.com/problems/wiggle-subsequence/) + +## 题目 + +A sequence of numbers is called a wiggle sequence if the differences between successive numbers strictly alternate between positive and negative. The first difference (if one exists) may be either positive or negative. A sequence with fewer than two elements is trivially a wiggle sequence. + +For example, [1,7,4,9,2,5] is a wiggle sequence because the differences (6,-3,5,-7,3) are alternately positive and negative. In contrast, [1,4,7,2,5] and [1,7,4,5,5] are not wiggle sequences, the first because its first two differences are positive and the second because its last difference is zero. + +Given a sequence of integers, return the length of the longest subsequence that is a wiggle sequence. A subsequence is obtained by deleting some number of elements (eventually, also zero) from the original sequence, leaving the remaining elements in their original order. + +Examples: + +```text +Input: [1,7,4,9,2,5] +Output: 6 +The entire sequence is a wiggle sequence. + +Input: [1,17,5,10,13,15,10,5,16,8] +Output: 7 +There are several subsequences that achieve this length. One is [1,17,10,13,10,16,8]. + +Input: [1,2,3,4,5,6,7,8,9] +Output: 2 +``` + +Follow up: +Can you do it in O(n) time? + +Credits:Special thanks to @agave and @StefanPochmann for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0376.wiggle-subsequence/wiggle-subsequence.go b/Algorithms/0376.wiggle-subsequence/wiggle-subsequence.go new file mode 100755 index 000000000..882ebe425 --- /dev/null +++ b/Algorithms/0376.wiggle-subsequence/wiggle-subsequence.go @@ -0,0 +1,54 @@ +package Problem0376 + +func wiggleMaxLength(nums []int) int { + var res int + size := len(nums) + + checkFunc := func(n int) func(int) { + init := 1 + if n < 0 { + init = -1 + } + res = 2 + + // 当 x 与 init 不同号的时候 + // res++ + return func(x int) { + var new int + + switch { + case x < 0: + new = -1 + case x > 0: + new = 1 + default: + // 跳过 0 + return + } + + if init*new < 0 { + res++ + init = new + } + } + } + + var check func(int) + var i = 1 + for i < size && nums[i]-nums[i-1] == 0 { + i++ + } + + if i == size { + return 1 + } + + check = checkFunc(nums[i] - nums[i-1]) + + for i < size { + check(nums[i] - nums[i-1]) + i++ + } + + return res +} diff --git a/Algorithms/0376.wiggle-subsequence/wiggle-subsequence_test.go b/Algorithms/0376.wiggle-subsequence/wiggle-subsequence_test.go new file mode 100755 index 000000000..c7722b966 --- /dev/null +++ b/Algorithms/0376.wiggle-subsequence/wiggle-subsequence_test.go @@ -0,0 +1,73 @@ +package Problem0376 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans int +}{ + { + []int{1}, + 1, + }, + + { + []int{1, 2}, + 2, + }, + + { + []int{1, 7, 4, 9, 2, 5}, + 6, + }, + + { + []int{1, 1, 1, 1}, + 1, + }, + + { + []int{1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2}, + 2, + }, + + { + []int{7, 4, 9, 2, 5}, + 5, + }, + + { + []int{1, 17, 5, 10, 13, 15, 10, 5, 16, 8}, + 7, + }, + + { + []int{1, 2, 3, 4, 5, 6, 7, 8, 9}, + 2, + }, + + // 可以有多个 testcase +} + +func Test_wiggleMaxLength(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, wiggleMaxLength(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_wiggleMaxLength(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + wiggleMaxLength(tc.nums) + } + } +} diff --git a/Algorithms/0377.combination-sum-iv/README.md b/Algorithms/0377.combination-sum-iv/README.md new file mode 100755 index 000000000..973eff441 --- /dev/null +++ b/Algorithms/0377.combination-sum-iv/README.md @@ -0,0 +1,37 @@ +# [377. Combination Sum IV](https://leetcode.com/problems/combination-sum-iv/) + +## 题目 + +Given an integer array with all positive numbers and no duplicates, find the number of possible combinations that add up to a positive integer target. + +Example: + +```text +nums = [1, 2, 3] +target = 4 + +The possible combination ways are: +(1, 1, 1, 1) +(1, 1, 2) +(1, 2, 1) +(1, 3) +(2, 1, 1) +(2, 2) +(3, 1) + +Note that different sequences are counted as different combinations. + +Therefore the output is 7. +``` + +Follow up: + +- What if negative numbers are allowed in the given array? +- How does it change the problem? +- What limitation we need to add to the question to allow negative numbers? + +Credits:Special thanks to @pbrother for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0377.combination-sum-iv/combination-sum-iv.go b/Algorithms/0377.combination-sum-iv/combination-sum-iv.go new file mode 100755 index 000000000..88894e98e --- /dev/null +++ b/Algorithms/0377.combination-sum-iv/combination-sum-iv.go @@ -0,0 +1,18 @@ +package Problem0377 + +func combinationSum4(nums []int, target int) int { + // dp[i] 是 i 能用 nums 中的数所组合的种类数 + // dp[target] 是答案 + dp := make([]int, target+1) + dp[0] = 1 + + for i := 1; i <= target; i++ { + for j := range nums { + if nums[j] <= i { + dp[i] += dp[i-nums[j]] + } + } + } + + return dp[target] +} diff --git a/Algorithms/0377.combination-sum-iv/combination-sum-iv_test.go b/Algorithms/0377.combination-sum-iv/combination-sum-iv_test.go new file mode 100755 index 000000000..e1a871794 --- /dev/null +++ b/Algorithms/0377.combination-sum-iv/combination-sum-iv_test.go @@ -0,0 +1,41 @@ +package Problem0377 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + target int + ans int +}{ + + { + []int{1, 2, 3}, + 4, + 7, + }, + + // 可以有多个 testcase +} + +func Test_combinationSum4(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, combinationSum4(tc.nums, tc.target), "输入:%v", tc) + } +} + +func Benchmark_combinationSum4(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + combinationSum4(tc.nums, tc.target) + } + } +} diff --git a/Algorithms/0378.kth-smallest-element-in-a-sorted-matrix/README.md b/Algorithms/0378.kth-smallest-element-in-a-sorted-matrix/README.md new file mode 100755 index 000000000..5a38803dd --- /dev/null +++ b/Algorithms/0378.kth-smallest-element-in-a-sorted-matrix/README.md @@ -0,0 +1,26 @@ +# [378. Kth Smallest Element in a Sorted Matrix](https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix/) + +## 题目 + +Given a n x n matrix where each of the rows and columns are sorted in ascending order, find the kth smallest element in the matrix. + +Note that it is the kth smallest element in the sorted order, not the kth distinct element. + +```text +Example: +matrix = [ + [ 1, 5, 9], + [10, 11, 13], + [12, 13, 15] +], +k = 8, + +return 13. +``` + +Note: +You may assume k is always valid, 1 ≤ k ≤ n2. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0378.kth-smallest-element-in-a-sorted-matrix/kth-smallest-element-in-a-sorted-matrix.go b/Algorithms/0378.kth-smallest-element-in-a-sorted-matrix/kth-smallest-element-in-a-sorted-matrix.go new file mode 100755 index 000000000..a055cb396 --- /dev/null +++ b/Algorithms/0378.kth-smallest-element-in-a-sorted-matrix/kth-smallest-element-in-a-sorted-matrix.go @@ -0,0 +1,30 @@ +package Problem0378 + +func kthSmallest(mat [][]int, k int) int { + // 题目中说了 1 <= n + n := len(mat) + + lo, hi := mat[0][0], mat[n-1][n-1] + + for lo < hi { + mid := lo + (hi-lo)>>1 + count := 0 + j := n - 1 + for i := 0; i < n; i++ { + for j >= 0 && mat[i][j] > mid { + j-- + } + count += j + 1 + } + + // 移动 lo 或 hi + if count < k { + lo = mid + 1 + } else { + // 没有 -1 + hi = mid + } + } + + return lo +} diff --git a/Algorithms/0378.kth-smallest-element-in-a-sorted-matrix/kth-smallest-element-in-a-sorted-matrix_test.go b/Algorithms/0378.kth-smallest-element-in-a-sorted-matrix/kth-smallest-element-in-a-sorted-matrix_test.go new file mode 100755 index 000000000..c341b9fe3 --- /dev/null +++ b/Algorithms/0378.kth-smallest-element-in-a-sorted-matrix/kth-smallest-element-in-a-sorted-matrix_test.go @@ -0,0 +1,44 @@ +package Problem0378 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +var mat = [][]int{ + []int{1, 5, 9}, + []int{10, 11, 13}, + []int{12, 13, 15}, +} + +// tcs is testcase slice +var tcs = []struct { + k int + ans int +}{ + + {3, 9}, + + {8, 13}, + + // 可以有多个 testcase +} + +func Test_kthSmallest(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, kthSmallest(mat, tc.k), "输入:%v", tc) + } +} + +func Benchmark_kthSmallest(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + kthSmallest(mat, tc.k) + } + } +} diff --git a/Algorithms/0382.linked-list-random-node/382.100.png b/Algorithms/0382.linked-list-random-node/382.100.png new file mode 100644 index 000000000..bb00da64d Binary files /dev/null and b/Algorithms/0382.linked-list-random-node/382.100.png differ diff --git a/Algorithms/0382.linked-list-random-node/README.md b/Algorithms/0382.linked-list-random-node/README.md new file mode 100755 index 000000000..e066827c6 --- /dev/null +++ b/Algorithms/0382.linked-list-random-node/README.md @@ -0,0 +1,31 @@ +# [382. Linked List Random Node](https://leetcode.com/problems/linked-list-random-node/) + +## 题目 + +Given a singly linked list, return a random node's value from the linked list. Each node must have the same probability of being chosen. + +Follow up: + +1. What if the linked list is extremely large and its length is unknown to you? +1. Could you solve this efficiently without using extra space? + +Example: + +```text +// Init a singly linked list [1,2,3]. +ListNode head = new ListNode(1); +head.next = new ListNode(2); +head.next.next = new ListNode(3); +Solution solution = new Solution(head); + +// getRandom() should return either 1, 2, or 3 randomly. Each element should have equal probability of returning. +solution.getRandom(); +``` + +## 解题思路 + +见程序注释 + +运气好 + +![100](382.100.png) \ No newline at end of file diff --git a/Algorithms/0382.linked-list-random-node/linked-list-random-node.go b/Algorithms/0382.linked-list-random-node/linked-list-random-node.go new file mode 100755 index 000000000..03ad10d11 --- /dev/null +++ b/Algorithms/0382.linked-list-random-node/linked-list-random-node.go @@ -0,0 +1,52 @@ +package Problem0382 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" + "math/rand" +) + +type ListNode = kit.ListNode + +// Solution 是需要设计的数据结构 +// Definition for singly-linked list. +// type ListNode struct { +// Val int +// Next *ListNode +// } +type Solution struct { + head *ListNode + n int +} + +// Constructor 构建 Solution +// head is The linked list's head. +// Note that the head is guaranteed to be not null, so it contains at least one node. */ +func Constructor(head *ListNode) Solution { + count := 1 + temp := head + for temp.Next != nil { + count++ + temp = temp.Next + } + return Solution{ + head: head, + n: count, + } +} + +// GetRandom returns a random node's value. */ +func (s *Solution) GetRandom() int { + count := rand.Intn(s.n) + temp := s.head + for count > 0 { + temp = temp.Next + count-- + } + return temp.Val +} + +/** + * Your Solution object will be instantiated and called as such: + * obj := Constructor(head); + * param_1 := obj.GetRandom(); + */ diff --git a/Algorithms/0382.linked-list-random-node/linked-list-random-node_test.go b/Algorithms/0382.linked-list-random-node/linked-list-random-node_test.go new file mode 100755 index 000000000..172e6d698 --- /dev/null +++ b/Algorithms/0382.linked-list-random-node/linked-list-random-node_test.go @@ -0,0 +1,21 @@ +package Problem0382 + +import ( + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +func Test_Constructor(t *testing.T) { + ast := assert.New(t) + + ints := []int{1, 2, 3, 4, 5, 6} + head := kit.Ints2List(ints) + sol := Constructor(head) + + for i := 0; i < 200; i++ { + ast.Contains(ints, sol.GetRandom(), "从 %v 中随机获取一个数", ints) + } +} diff --git a/Algorithms/0383.ransom-note/README.md b/Algorithms/0383.ransom-note/README.md new file mode 100755 index 000000000..12af4bcb9 --- /dev/null +++ b/Algorithms/0383.ransom-note/README.md @@ -0,0 +1,20 @@ +# [383. Ransom Note](https://leetcode.com/problems/ransom-note/) + +## 题目 + +Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if the ransom note can be constructed from the magazines ; otherwise, it will return false. + +Each letter in the magazine string can only be used once in your ransom note. + +Note: +You may assume that both strings contain only lowercase letters. + +```text +canConstruct("a", "b") -> false +canConstruct("aa", "ab") -> false +canConstruct("aa", "aab") -> true +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0383.ransom-note/ransom-note.go b/Algorithms/0383.ransom-note/ransom-note.go new file mode 100755 index 000000000..c22f63b7e --- /dev/null +++ b/Algorithms/0383.ransom-note/ransom-note.go @@ -0,0 +1,22 @@ +package Problem0383 + +func canConstruct(ransomNote string, magazine string) bool { + mc := getCount(magazine) + + for _, b := range ransomNote { + mc[b-'a']-- + if mc[b-'a'] < 0 { + return false + } + } + + return true +} + +func getCount(s string) []int { + res := make([]int, 26) + for i := range s { + res[s[i]-'a']++ + } + return res +} diff --git a/Algorithms/0383.ransom-note/ransom-note_test.go b/Algorithms/0383.ransom-note/ransom-note_test.go new file mode 100755 index 000000000..bae6a20b5 --- /dev/null +++ b/Algorithms/0383.ransom-note/ransom-note_test.go @@ -0,0 +1,39 @@ +package Problem0383 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + ransomNote string + magazine string + ans bool +}{ + + {"a", "b", false}, + {"aa", "ab", false}, + {"aa", "aab", true}, + + // 可以有多个 testcase +} + +func Test_canConstruct(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, canConstruct(tc.ransomNote, tc.magazine), "输入:%v", tc) + } +} + +func Benchmark_canConstruct(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + canConstruct(tc.ransomNote, tc.magazine) + } + } +} diff --git a/Algorithms/0384.shuffle-an-array/384.100.png b/Algorithms/0384.shuffle-an-array/384.100.png new file mode 100644 index 000000000..8554b6098 Binary files /dev/null and b/Algorithms/0384.shuffle-an-array/384.100.png differ diff --git a/Algorithms/0384.shuffle-an-array/README.md b/Algorithms/0384.shuffle-an-array/README.md new file mode 100755 index 000000000..7c95666ef --- /dev/null +++ b/Algorithms/0384.shuffle-an-array/README.md @@ -0,0 +1,28 @@ +# [384. Shuffle an Array](https://leetcode.com/problems/shuffle-an-array/) + +## 题目 + +Shuffle a set of numbers without duplicates. + +Example: + +```text +// Init an array with set 1, 2, and 3. +int[] nums = {1,2,3}; +Solution solution = new Solution(nums); + +// Shuffle the array [1,2,3] and return its result. Any permutation of [1,2,3] must equally likely to be returned. +solution.shuffle(); + +// Resets the array back to its original configuration [1,2,3]. +solution.reset(); + +// Returns the random shuffling of array [1,2,3]. +solution.shuffle(); +``` + +## 解题思路 + +见程序注释 + +![100](384.100.png) \ No newline at end of file diff --git a/Algorithms/0384.shuffle-an-array/shuffle-an-array.go b/Algorithms/0384.shuffle-an-array/shuffle-an-array.go new file mode 100755 index 000000000..808dc500a --- /dev/null +++ b/Algorithms/0384.shuffle-an-array/shuffle-an-array.go @@ -0,0 +1,43 @@ +package Problem0384 + +import ( + "math/rand" +) + +// Solution 是答案 +type Solution struct { + origNums, nums []int +} + +// Constructor 构建 Solution +func Constructor(nums []int) Solution { + o := make([]int, len(nums)) + n := make([]int, len(nums)) + copy(o, nums) + copy(n, nums) + return Solution{origNums: o, nums: n} +} + +// Reset the array to its original configuration and return it. +func (s Solution) Reset() []int { + return s.origNums +} + +// Shuffle returns a random shuffling of the array. +func (s Solution) Shuffle() []int { + i, j := len(s.nums), 0 + for 1 < i { + j = rand.Intn(i) + s.nums[i-1], s.nums[j] = s.nums[j], s.nums[i-1] + i-- + } + + return s.nums +} + +/** + * Your Solution object will be instantiated and called as such: + * obj := Constructor(nums); + * param_1 := obj.Reset(); + * param_2 := obj.Shuffle(); + */ diff --git a/Algorithms/0384.shuffle-an-array/shuffle-an-array_test.go b/Algorithms/0384.shuffle-an-array/shuffle-an-array_test.go new file mode 100755 index 000000000..c36a9ddcd --- /dev/null +++ b/Algorithms/0384.shuffle-an-array/shuffle-an-array_test.go @@ -0,0 +1,24 @@ +package Problem0384 + +import ( + "sort" + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_Constructor(t *testing.T) { + ast := assert.New(t) + + original := []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18} + + s := Constructor(original) + + ans := s.Shuffle() + sort.Ints(ans) + ast.Equal(original, ans) + + ans = s.Reset() + ast.Equal(original, ans) + +} diff --git a/Algorithms/0385.mini-parser/README.md b/Algorithms/0385.mini-parser/README.md new file mode 100755 index 000000000..f9e24741b --- /dev/null +++ b/Algorithms/0385.mini-parser/README.md @@ -0,0 +1,40 @@ +# [385. Mini Parser](https://leetcode.com/problems/mini-parser/) + +## 题目 + +Given a nested list of integers represented as a string, implement a parser to deserialize it. + +Each element is either an integer, or a list -- whose elements may also be integers or other lists. + +Note: +You may assume that the string is well-formed: + +- String is non-empty. +- String does not contain white spaces. +- String contains only digits `0-9`,`[`, `-`, `,`, `]`. + +Example 1: + +```text +Given s = "324", + +You should return a NestedInteger object which contains a single integer 324. +``` + +Example 2: + +```text +Given s = "[123,[456,[789]]]", + +Return a NestedInteger object containing a nested list with 2 elements: + +1. An integer containing value 123. +2. A nested list containing two elements: + i. An integer containing value 456. + ii. A nested list with one element: + a. An integer containing value 789. +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0385.mini-parser/mini-parser.go b/Algorithms/0385.mini-parser/mini-parser.go new file mode 100755 index 000000000..e1ac3a2d4 --- /dev/null +++ b/Algorithms/0385.mini-parser/mini-parser.go @@ -0,0 +1,110 @@ +package Problem0385 + +import ( + "strconv" + "github.com/aQuaYi/LeetCode-in-Go/kit" +) + +/** + * // This is the interface that allows for creating nested lists. + * // You should not implement it, or speculate about its implementation + * type NestedInteger struct { + * } + * + * // Return true if this NestedInteger holds a single integer, rather than a nested list. + * func (n NestedInteger) IsInteger() bool {} + * + * // Return the single integer that this NestedInteger holds, if it holds a single integer + * // The result is undefined if this NestedInteger holds a nested list + * // So before calling this method, you should have a check + * func (n NestedInteger) GetInteger() int {} + * + * // Set this NestedInteger to hold a single integer. + * func (n *NestedInteger) SetInteger(value int) {} + * + * // Set this NestedInteger to hold a nested list and adds a nested integer to it. + * func (n *NestedInteger) Add(elem NestedInteger) {} + * + * // Return the nested list that this NestedInteger holds, if it holds a nested list + * // The list length is zero if this NestedInteger holds a single integer + * // You can access NestedInteger's List element directly if you want to modify it + * func (n NestedInteger) GetList() []*NestedInteger {} + */ + +type NestedInteger = kit.NestedInteger + +func deserialize(s string) *NestedInteger { + if len(s) == 0 { + return nil + } + + if s[0] != '[' { + return getValue(s) + } + + stack := new(stackChars) + + var cur *NestedInteger + + si, ci := 0, 0 + for ; ci < len(s); ci++ { + switch s[ci] { + case '[': + if cur != nil { + stack.Push(cur) + } + + cur = new(NestedInteger) + si = ci + 1 + case ']': + if ci > si { + cur.Add(*getValue(s[si:ci])) + } + + if !stack.Empty() { + tmp := stack.Pop() + tmp.Add(*cur) + cur = tmp + } + + si = ci + 1 + case ',': + if s[ci-1] != ']' { + cur.Add(*getValue(s[si:ci])) + } + si = ci + 1 + } + } + + return cur +} + +func getValue(s string) *NestedInteger { + val, _ := strconv.Atoi(s) + item := new(NestedInteger) + item.SetInteger(val) + return item +} + +type stackChars struct { + chars []*NestedInteger +} + +func (s *stackChars) Push(nb *NestedInteger) { + s.chars = append(s.chars, nb) +} + +func (s *stackChars) Pop() *NestedInteger { + slen := len(s.chars) + rb := s.chars[slen-1] + s.chars = s.chars[:slen-1] + return rb +} + +func (s *stackChars) Empty() bool { + return len(s.chars) == 0 +} + +// func (s *stackChars) Peek() *NestedInteger { +// return s.chars[len(s.chars)-1] +// } diff --git a/Algorithms/0385.mini-parser/mini-parser_test.go b/Algorithms/0385.mini-parser/mini-parser_test.go new file mode 100755 index 000000000..5cdbb82e5 --- /dev/null +++ b/Algorithms/0385.mini-parser/mini-parser_test.go @@ -0,0 +1,48 @@ +package Problem0385 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + ans *NestedInteger +}{ + + {"", nil}, + + {"324", &NestedInteger{Num: 324}}, + + {"[123,[456,[789]]]", + &NestedInteger{ + Ns: []*NestedInteger{ + &NestedInteger{Num: 123}, + &NestedInteger{ + Ns: []*NestedInteger{ + &NestedInteger{Num: 456}, + &NestedInteger{ + Ns: []*NestedInteger{ + &NestedInteger{Num: 789}, + }, + }, + }, + }, + }, + }, + }, + + // 可以有多个 testcase +} + +func Test_deserialize(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, deserialize(tc.s), "输入:%v", tc) + } +} diff --git a/Algorithms/0387.first-unique-character-in-a-string/README.md b/Algorithms/0387.first-unique-character-in-a-string/README.md new file mode 100755 index 000000000..7d72be019 --- /dev/null +++ b/Algorithms/0387.first-unique-character-in-a-string/README.md @@ -0,0 +1,21 @@ +# [387. First Unique Character in a String](https://leetcode.com/problems/first-unique-character-in-a-string/) + +## 题目 + +Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1. + +Examples: + +```text +s = "leetcode" +return 0. + +s = "loveleetcode", +return 2. +``` + +Note: You may assume the string contain only lowercase letters. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0387.first-unique-character-in-a-string/first-unique-character-in-a-string.go b/Algorithms/0387.first-unique-character-in-a-string/first-unique-character-in-a-string.go new file mode 100755 index 000000000..acc4b3f4a --- /dev/null +++ b/Algorithms/0387.first-unique-character-in-a-string/first-unique-character-in-a-string.go @@ -0,0 +1,16 @@ +package Problem0387 + +func firstUniqChar(s string) int { + rec := make([]int, 26) + for _, b := range s { + rec[b-'a']++ + } + + for i, b := range s { + if rec[b-'a'] == 1 { + return i + } + } + + return -1 +} diff --git a/Algorithms/0387.first-unique-character-in-a-string/first-unique-character-in-a-string_test.go b/Algorithms/0387.first-unique-character-in-a-string/first-unique-character-in-a-string_test.go new file mode 100755 index 000000000..08b48476b --- /dev/null +++ b/Algorithms/0387.first-unique-character-in-a-string/first-unique-character-in-a-string_test.go @@ -0,0 +1,46 @@ +package Problem0387 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + ans int +}{ + + { + "leetcode", + 0, + }, + + { + "loveleetcode", + 2, + }, + + {"aabbcc", -1}, + + // 可以有多个 testcase +} + +func Test_firstUniqChar(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, firstUniqChar(tc.s), "输入:%v", tc) + } +} + +func Benchmark_firstUniqChar(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + firstUniqChar(tc.s) + } + } +} diff --git a/Algorithms/0388.longest-absolute-file-path/README.md b/Algorithms/0388.longest-absolute-file-path/README.md new file mode 100755 index 000000000..ea67dda44 --- /dev/null +++ b/Algorithms/0388.longest-absolute-file-path/README.md @@ -0,0 +1,53 @@ +# [388. Longest Absolute File Path](https://leetcode.com/problems/longest-absolute-file-path/) + +## 题目 + +Suppose we abstract our file system by a string in the following manner: + +The string "dir\n\tsubdir1\n\tsubdir2\n\t\tfile.ext" represents: + +```text +dir + subdir1 + subdir2 + file.ext +``` + +The directory dir contains an empty sub-directory subdir1 and a sub-directory subdir2 containing a file file.ext. + +The string "dir\n\tsubdir1\n\t\tfile1.ext\n\t\tsubsubdir1\n\tsubdir2\n\t\tsubsubdir2\n\t\t\tfile2.ext" represents: + +```text +dir + subdir1 + file1.ext + subsubdir1 + subdir2 + subsubdir2 + file2.ext +``` + +The directory dir contains two sub-directories subdir1 and subdir2. subdir1 contains a file file1.ext and an empty second-level sub-directory subsubdir1. subdir2 contains a second-level sub-directory subsubdir2 containing a file file2.ext. + +We are interested in finding the longest (number of characters) absolute path to a file within our file system. For example, in the second example above, the longest absolute path is "dir/subdir2/subsubdir2/file2.ext", and its length is 32 (not including the double quotes). + +Given a string representing the file system in the above format, return the length of the longest absolute path to file in the abstracted file system. If there is no file in the system, return 0. + +Note: + +- The name of a file contains at least a . and an extension. +- The name of a directory or sub-directory will not contain a .. + +Time complexity required: O(n) where n is the size of the input string. + +Notice that a/aa/aaa/file1.txt is not the longest file path, if there is another path aaaaaaaaaaaaaaaaaaaaa/sth.png. + +## 解题思路 + +见程序注释 + +请注意 + +```go +len("\n") == 1 +``` \ No newline at end of file diff --git a/Algorithms/0388.longest-absolute-file-path/longest-absolute-file-path.go b/Algorithms/0388.longest-absolute-file-path/longest-absolute-file-path.go new file mode 100755 index 000000000..2078a8801 --- /dev/null +++ b/Algorithms/0388.longest-absolute-file-path/longest-absolute-file-path.go @@ -0,0 +1,70 @@ +package Problem0388 + +import ( + "strings" +) + +func lengthLongestPath(path string) int { + if !hasFile(path) { + return 0 + } + + // 添加了 "\n" 这个字符,所以,最后的答案需要 -1 + return llp("\n"+path) - 1 +} + +func llp(path string) int { + if !hasFile(path) { + // 按照题意,最长的路径中,必须包含文件 + return 0 + } + + if !hasSub(path) { + // 没有子文件夹,又是一个文件 + return len(path) + } + + var i = nextCR(path, -1) + // path[:i] 是 父目录 + dirLen := i + + var j, maxSub int + for i < len(path) { + j = nextCR(path, i) + // path[i:j] 是 子目录 + // 替换缩进层级后,可以递归处理 + maxSub = max(maxSub, llp(strings.Replace(path[i+1:j], "\n\t", "\n", -1))) + i = j + } + + // +1 是路径分隔符 "/" 的长度 + return dirLen + 1 + maxSub +} + +func hasFile(path string) bool { + return strings.Contains(path, ".") +} + +// 有下级,返回 true +func hasSub(path string) bool { + return strings.Contains(path, "\n") +} + +func nextCR(path string, idx int) int { + var i int + for i = idx + 1; i < len(path); i++ { + if path[i:i+1] == "\n" && + (i+1 == len(path) || // 防止路径末尾存在换行的情况,比如 "a.txt\n" + path[i+1:i+2] != "\t") { + break + } + } + return i +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} diff --git a/Algorithms/0388.longest-absolute-file-path/longest-absolute-file-path_test.go b/Algorithms/0388.longest-absolute-file-path/longest-absolute-file-path_test.go new file mode 100755 index 000000000..8c29fec2f --- /dev/null +++ b/Algorithms/0388.longest-absolute-file-path/longest-absolute-file-path_test.go @@ -0,0 +1,44 @@ +package Problem0388 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + input string + ans int +}{ + + {"dir\n\tsubdir1\n\tsubdir2\n\t\tfile.ext", 20}, + + {"dir\n\tsubdir1\n\t\tfile1.ext\n\t\tsubsubdir1\n\tsubdir2\n\t\tsubsubdir2\n\t\t\tfile2.ext\ndirasubdir2asubsubdir2aafile2.ext\n", 33}, + + {"a\n\tb.c\n\tddddddddddddddddddddddddd", 5}, + + {"dir\n\tsubdir1\n\tsubdir2", 0}, + + {"dir\n\tsubdir1\n\t\tfile1.ext\n\t\tsubsubdir1\n\tsubdir2\n\t\tsubsubdir2\n\t\t\tfile2.ext", 32}, + + // 可以有多个 testcase +} + +func Test_lengthLongestPath(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, lengthLongestPath(tc.input), "输入:%v", tc) + } +} + +func Benchmark_lengthLongestPath(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + lengthLongestPath(tc.input) + } + } +} diff --git a/Algorithms/0389.find-the-difference/README.md b/Algorithms/0389.find-the-difference/README.md new file mode 100755 index 000000000..82e1e9da0 --- /dev/null +++ b/Algorithms/0389.find-the-difference/README.md @@ -0,0 +1,26 @@ +# [389. Find the Difference](https://leetcode.com/problems/find-the-difference/) + +## 题目 + +Given two strings s and t which consist of only lowercase letters. + +String t is generated by random shuffling string s and then add one more letter at a random position. + +Find the letter that was added in t. + +```text +Example: +Input: +s = "abcd" +t = "abcde" + +Output: +e + +Explanation: +'e' is the letter that was added. +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0389.find-the-difference/find-the-difference.go b/Algorithms/0389.find-the-difference/find-the-difference.go new file mode 100755 index 000000000..180418754 --- /dev/null +++ b/Algorithms/0389.find-the-difference/find-the-difference.go @@ -0,0 +1,19 @@ +package Problem0389 + +func findTheDifference(s string, t string) byte { + rec := make([]int, 26) + for i := range s { + rec[s[i]-'a']-- + rec[t[i]-'a']++ + } + rec[t[len(t)-1]-'a']++ + + var i int + for i = 0; i < 26; i++ { + if rec[i] == 1 { + break + } + } + + return byte('a' + i) +} diff --git a/Algorithms/0389.find-the-difference/find-the-difference_test.go b/Algorithms/0389.find-the-difference/find-the-difference_test.go new file mode 100755 index 000000000..55ae3c2ec --- /dev/null +++ b/Algorithms/0389.find-the-difference/find-the-difference_test.go @@ -0,0 +1,41 @@ +package Problem0389 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + t string + ans byte +}{ + + { + "abcd", + "abcde", + 'e', + }, + + // 可以有多个 testcase +} + +func Test_findTheDifference(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findTheDifference(tc.s, tc.t), "输入:%v", tc) + } +} + +func Benchmark_findTheDifference(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findTheDifference(tc.s, tc.t) + } + } +} diff --git a/Algorithms/0390.elimination-game/README.md b/Algorithms/0390.elimination-game/README.md new file mode 100755 index 000000000..59b686b0a --- /dev/null +++ b/Algorithms/0390.elimination-game/README.md @@ -0,0 +1,29 @@ +# [390. Elimination Game](https://leetcode.com/problems/elimination-game/) + +## 题目 + +There is a list of sorted integers from 1 to n. Starting from left to right, remove the first number and every other number afterward until you reach the end of the list. + +Repeat the previous step again, but this time from right to left, remove the right most number and every other number from the remaining numbers. + +We keep repeating the steps again, alternating left to right and right to left, until a single number remains. + +Find the last number that remains starting with a list of length n. + +Example: + +```text +Input: +n = 9, +1 2 3 4 5 6 7 8 9 +2 4 6 8 +2 6 +6 + +Output: +6 +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0390.elimination-game/elimination-game.go b/Algorithms/0390.elimination-game/elimination-game.go new file mode 100755 index 000000000..e566c25bc --- /dev/null +++ b/Algorithms/0390.elimination-game/elimination-game.go @@ -0,0 +1,25 @@ +package Problem0390 + +func lastRemaining(n int) int { + isLeftStart := true + // remain 是剩余数字的个数 + remain := n + + // 剩余数字中,最小的数 + min := 1 + // min + step == 第二小的数字 + step := 1 + for remain > 1 { + if isLeftStart || remain%2 == 1 { + // 最小的数字被删除 + // 原先第二小的数字,变成了最小的啦 + min += step + } + + isLeftStart = !isLeftStart + step *= 2 + remain /= 2 + } + + return min +} diff --git a/Algorithms/0390.elimination-game/elimination-game_test.go b/Algorithms/0390.elimination-game/elimination-game_test.go new file mode 100755 index 000000000..9c35ae155 --- /dev/null +++ b/Algorithms/0390.elimination-game/elimination-game_test.go @@ -0,0 +1,38 @@ +package Problem0390 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + n int + ans int +}{ + + {9, 6}, + + {123456789, 56614230}, + + // 可以有多个 testcase +} + +func Test_lastRemaining(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, lastRemaining(tc.n), "输入:%v", tc) + } +} + +func Benchmark_lastRemaining(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + lastRemaining(tc.n) + } + } +} diff --git a/Algorithms/0391.perfect-rectangle/README.md b/Algorithms/0391.perfect-rectangle/README.md new file mode 100755 index 000000000..d3eabd096 --- /dev/null +++ b/Algorithms/0391.perfect-rectangle/README.md @@ -0,0 +1,63 @@ +# [391. Perfect Rectangle](https://leetcode.com/problems/perfect-rectangle/) + +## 题目 + +Given N axis-aligned rectangles where N > 0, determine if they all together form an exact cover of a rectangular region. + +Each rectangle is represented as a bottom-left point and a top-right point. For example, a unit square is represented as [1,1,2,2]. (coordinate of bottom-left point is (1, 1) and top-right point is (2, 2)). + +Example 1: + +```text +rectangles = [ + [1,1,3,3], + [3,1,4,2], + [3,2,4,4], + [1,3,2,4], + [2,3,3,4] +] +Return true. All 5 rectangles together form an exact cover of a rectangular region. +``` + +Example 2: + +```text +rectangles = [ + [1,1,2,3], + [1,3,2,4], + [3,1,4,2], + [3,2,4,4] +] + +Return false. Because there is a gap between the two rectangular regions. +``` + +Example 3: + +```text +rectangles = [ + [1,1,3,3], + [3,1,4,2], + [1,3,2,4], + [3,2,4,4] +] + +Return false. Because there is a gap in the top center. +``` + +Example 4: + +```text +rectangles = [ + [1,1,3,3], + [3,1,4,2], + [1,3,2,4], + [2,2,4,4] +] + +Return false. Because two of the rectangles overlap with each other. +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0391.perfect-rectangle/perfect-rectangle.go b/Algorithms/0391.perfect-rectangle/perfect-rectangle.go new file mode 100755 index 000000000..b894de361 --- /dev/null +++ b/Algorithms/0391.perfect-rectangle/perfect-rectangle.go @@ -0,0 +1,79 @@ +package Problem0391 + +type point struct { + x, y int +} + +func isRectangleCover(rects [][]int) bool { + if len(rects) == 0 || len(rects[0]) == 0 { + return false + } + + // 记录最后合成的正方形的 四个顶点 的坐标 + minX, maxX := 1<<63-1, -1<<63 + minY, maxY := minX, maxX + // 最后合成正方形的面积 + area := 0 + + // 记录添加的正方形的 四个顶点 位置 + isCorner := make(map[point]bool) + + var p, p1, p2, p3, p4 point + var x, y, x1, x2, y1, y2 int + + for _, r := range rects { + x1, y1, x2, y2 = r[0], r[1], r[2], r[3] + + minX = min(x1, minX) + minY = min(y1, minY) + maxX = max(x2, maxX) + maxY = max(y2, maxY) + + area += (x2 - x1) * (y2 - y1) + + for _, x = range []int{x1, x2} { + for _, y = range []int{y1, y2} { + p = point{x, y} + + // 如果想要最后能够合成一个矩形 + // 除了大矩形的四个顶点外,其余的小矩形的四个顶点会出现两次 + if isCorner[p] { + delete(isCorner, p) + } else { + isCorner[p] = true + } + + } + } + + } + + p1 = point{minX, minY} + p2 = point{minX, maxY} + p3 = point{maxX, minY} + p4 = point{maxX, maxY} + + if !isCorner[p1] || + !isCorner[p2] || + !isCorner[p3] || + !isCorner[p4] || + len(isCorner) != 4 { + return false + } + + return area == (maxX-minX)*(maxY-minY) +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} + +func min(a, b int) int { + if a < b { + return a + } + return b +} diff --git a/Algorithms/0391.perfect-rectangle/perfect-rectangle_test.go b/Algorithms/0391.perfect-rectangle/perfect-rectangle_test.go new file mode 100755 index 000000000..b0e64a8a0 --- /dev/null +++ b/Algorithms/0391.perfect-rectangle/perfect-rectangle_test.go @@ -0,0 +1,4067 @@ +package Problem0391 + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + rectangles [][]int + ans bool +}{ + + { + [][]int{ + []int{1, 1, 3, 3}, + []int{3, 1, 4, 2}, + []int{3, 2, 4, 4}, + []int{1, 3, 2, 4}, + []int{2, 3, 3, 4}, + }, + true, + }, + + { + [][]int{ + []int{-9573, 13095, -7899, 14471}, + []int{-12809, 12998, -12160, 14710}, + []int{4393, -19141, 4881, -18539}, + []int{13398, 17732, 14668, 20666}, + []int{-7786, -1346, -5208, -1090}, + []int{17684, 17536, 19299, 18654}, + []int{-12160, -718, -10867, 640}, + []int{-5354, -3895, -5208, -1346}, + []int{14100, -19878, 16099, -19142}, + []int{-7538, 11785, -5354, 12998}, + []int{13108, -14568, 14668, -11264}, + []int{19299, 17536, 19584, 19886}, + []int{6403, 2113, 7328, 3953}, + []int{-7538, -18539, -5208, -16655}, + []int{15348, 9733, 18000, 10728}, + []int{-9828, 4548, -9161, 4785}, + []int{-18464, -4715, -16393, -3649}, + []int{-17318, 8466, -16326, 10359}, + []int{-13424, 6233, -12748, 7825}, + []int{569, -2909, 3505, -1090}, + []int{-2015, -5235, -594, -3895}, + []int{-9161, -17630, -7786, -15085}, + []int{14100, -16734, 15348, -16501}, + []int{-16326, -5000, -14784, -3895}, + []int{13398, 13095, 15689, 15784}, + []int{3505, 4771, 4881, 6122}, + []int{-16326, 15308, -14835, 16478}, + []int{-10309, 11103, -9840, 12755}, + []int{19084, 9733, 19992, 10728}, + []int{-9890, 5618, -9803, 6634}, + []int{-2015, 8466, -494, 10212}, + []int{16099, -6552, 19084, -4197}, + []int{-12130, -17980, -10309, -16147}, + []int{13398, 1384, 15241, 3970}, + []int{-4918, -19515, -3933, -19431}, + []int{-18809, -14568, -17318, -11595}, + []int{-594, -8111, 518, -5235}, + []int{-5144, -13457, -3707, -9406}, + []int{5183, -14389, 5757, -13365}, + []int{518, -16655, 3621, -15085}, + []int{-19421, 8466, -17442, 10359}, + []int{1603, -6552, 1972, -4715}, + []int{15689, 2113, 19009, 3970}, + []int{-13921, 11137, -12809, 11785}, + []int{-19523, 3970, -18486, 5618}, + []int{-9803, 7721, -9573, 10359}, + []int{-5144, -9194, -4485, -6569}, + []int{-16900, 20150, -14992, 20990}, + []int{17021, 3970, 19159, 4771}, + []int{-5354, 13271, -4918, 15061}, + []int{15689, 7038, 15884, 7061}, + []int{15241, 2535, 15689, 4263}, + []int{9781, 4263, 11901, 5618}, + []int{15689, 11137, 17021, 14471}, + []int{13398, 214, 14120, 1118}, + []int{2714, -9404, 4881, -6714}, + []int{-11919, 17169, -10309, 19870}, + []int{-2139, -18767, -1445, -18539}, + []int{-17442, 17732, -16326, 19808}, + []int{1972, -4197, 4819, -3052}, + []int{-6999, -19431, -5144, -19142}, + []int{-18015, 4263, -16900, 5618}, + []int{300, 253, 3832, 803}, + []int{-19623, 16478, -18464, 18166}, + []int{4819, -6569, 5266, -5235}, + []int{4819, 18654, 5757, 20150}, + []int{-19421, -11138, -17318, -7636}, + []int{-17182, -8111, -15236, -6552}, + []int{15348, -13413, 18000, -11138}, + []int{-19527, -17791, -18795, -17630}, + []int{-19523, 6233, -18486, 7199}, + []int{-13095, -19709, -12748, -19431}, + []int{7468, 3283, 8139, 4771}, + []int{-1445, -18539, 1080, -17630}, + []int{7081, -18767, 7468, -18539}, + []int{-19800, -1346, -18809, -1044}, + []int{7328, -7020, 10246, -5000}, + []int{-2015, 4793, -145, 7038}, + []int{-3883, 10212, -2802, 11137}, + []int{19084, -4004, 19992, -2767}, + []int{-17318, 10865, -16326, 13095}, + []int{-14784, 16862, -13417, 19112}, + []int{-13095, 12140, -12809, 13595}, + []int{-2139, 18654, -494, 20990}, + []int{19009, 9585, 19084, 10400}, + []int{-5354, 10728, -4681, 12140}, + []int{-3883, 13095, -3707, 14710}, + []int{-9828, -4004, -7899, -1977}, + []int{-7899, -18801, -7538, -17791}, + []int{15884, -18539, 18000, -16734}, + []int{-13921, 8466, -13417, 9585}, + []int{-494, 9733, 569, 10359}, + []int{-5069, 1384, -3883, 1771}, + []int{8968, -5000, 11022, -3649}, + []int{9781, -14828, 11901, -13457}, + []int{-12160, -16147, -10193, -14389}, + []int{6728, 16423, 8935, 17536}, + []int{5266, 4164, 7328, 5618}, + []int{-1733, -13365, 518, -9654}, + []int{-14470, 10369, -12748, 10865}, + []int{-5208, -19878, -4485, -19515}, + []int{-12160, 10369, -11919, 11103}, + []int{-2796, -6714, -1696, -6552}, + []int{-13417, -13413, -12089, -11138}, + []int{2714, -1090, 4819, -390}, + []int{5757, -17980, 7029, -16734}, + []int{-14835, 16423, -14784, 18439}, + []int{-3065, -14279, -2015, -11264}, + []int{-19527, 2113, -18015, 3262}, + []int{15884, -16147, 19084, -14568}, + []int{-17318, 13095, -17180, 14710}, + []int{14213, 10728, 16099, 11137}, + []int{13398, 3970, 14804, 4771}, + []int{-3933, 12755, -2802, 12998}, + []int{-9840, -16655, -9161, -16113}, + []int{-3707, 7825, -2015, 9733}, + []int{-12951, 803, -11919, 1494}, + []int{-13095, 4785, -12809, 6233}, + []int{-18809, -19878, -18464, -19142}, + []int{-19800, 15784, -18795, 16478}, + []int{-17182, 1665, -16900, 2535}, + []int{19084, -14568, 19584, -11595}, + []int{-10921, -14279, -10193, -13365}, + []int{-11610, 3970, -10309, 4548}, + []int{-5069, -1977, -3758, 253}, + []int{-1733, 7038, 300, 7721}, + []int{-19523, -4715, -18464, -3649}, + []int{-9573, 15013, -5354, 16423}, + []int{-3933, -16113, -3065, -14704}, + []int{-5208, -3895, -4485, -1977}, + []int{-19523, -718, -17442, 253}, + []int{-9161, -1044, -5208, 529}, + []int{6403, -8859, 6801, -5468}, + []int{6403, 18439, 7468, 19870}, + []int{-11610, 19886, -9828, 20990}, + []int{-145, 10359, 1603, 12140}, + []int{-2015, 2535, -1445, 4164}, + []int{2714, 18166, 4819, 19870}, + []int{10246, 15683, 11012, 17732}, + []int{-10309, -5468, -9890, -4197}, + []int{-1781, 253, -1609, 1494}, + []int{-3883, -19539, -3217, -18801}, + []int{14668, 19886, 15348, 20666}, + []int{-13417, -4004, -12130, -2909}, + []int{14804, 19112, 16099, 19886}, + []int{7601, -13457, 8968, -11138}, + []int{13108, -11264, 14804, -8859}, + []int{-18015, -3052, -16326, -1090}, + []int{-14784, 13271, -13417, 14710}, + []int{-15236, -2909, -13424, -718}, + []int{4881, 1494, 5757, 1771}, + []int{-11610, 11137, -10309, 14471}, + []int{-9448, -18801, -9161, -17630}, + []int{11901, -19623, 13398, -19515}, + []int{-6145, 7199, -4681, 9729}, + []int{15884, 16862, 17684, 18166}, + []int{-16326, 8909, -14835, 9729}, + []int{-14535, -11595, -13417, -9654}, + []int{6403, 17536, 8139, 17732}, + []int{14213, -6569, 15241, -6552}, + []int{-15428, 13271, -15236, 15308}, + []int{5330, 14471, 7081, 15683}, + []int{2714, -5462, 4819, -4197}, + []int{-15861, -11730, -14535, -9654}, + []int{-14535, -654, -12951, 640}, + []int{14100, -16113, 14213, -14568}, + []int{14213, 4771, 16316, 5977}, + []int{-17442, 529, -14992, 1384}, + []int{-15236, 13271, -14835, 15061}, + []int{-14835, -13457, -13417, -11730}, + []int{-9573, -1346, -9161, -390}, + []int{4881, -9406, 5757, -6714}, + []int{-2802, 6634, -2015, 7825}, + []int{5183, -1977, 7328, 214}, + []int{18082, -18767, 19992, -16734}, + []int{7328, 214, 10303, 529}, + []int{-15428, -18801, -13921, -17679}, + []int{4393, 803, 5183, 1494}, + []int{-2015, -654, -1696, 214}, + []int{518, 9585, 569, 9733}, + []int{8139, 1494, 8968, 3858}, + []int{10303, 11785, 13108, 13595}, + []int{-1781, -16501, -594, -14568}, + []int{-3758, -9194, -3065, -6552}, + []int{-1445, -19878, 518, -19623}, + []int{4969, -16501, 6801, -14568}, + []int{-1781, -3895, -594, -2767}, + []int{-5208, -17630, -3758, -16501}, + []int{-10867, 253, -9840, 1384}, + []int{300, 13271, 3007, 15061}, + []int{14668, 7721, 15689, 9005}, + []int{5330, 12998, 7468, 13595}, + []int{5757, 11137, 7081, 12755}, + []int{11022, 7721, 13108, 9005}, + []int{10246, -7020, 10646, -5235}, + []int{-12951, 3283, -12130, 3953}, + []int{17684, -1346, 19992, 640}, + []int{6403, -9654, 7328, -8859}, + []int{1603, -1090, 2714, 214}, + []int{-9890, 10853, -9448, 11103}, + []int{15884, -4004, 16316, -3052}, + []int{8968, 10369, 10646, 11785}, + []int{518, -13365, 1603, -8859}, + []int{-2015, -19539, -145, -19141}, + []int{-13424, -4004, -13417, -2767}, + []int{12689, 4771, 13398, 6122}, + []int{11526, -13365, 12654, -11138}, + []int{6728, 1384, 7468, 1494}, + []int{1080, -19515, 3621, -18801}, + []int{8035, 12140, 10303, 13095}, + []int{16517, -9469, 19299, -9406}, + []int{-9840, -9469, -9161, -7636}, + []int{15241, -16501, 15884, -15085}, + []int{-19523, 9005, -19421, 9733}, + []int{6728, 13595, 7601, 14471}, + []int{-3707, 15013, -2015, 15308}, + []int{3007, 1494, 4881, 1665}, + []int{-7899, 13095, -6145, 13271}, + []int{4881, 16478, 6403, 18166}, + []int{-12748, -19141, -11610, -17980}, + []int{-13417, -19431, -12951, -18801}, + []int{-19800, 4785, -19623, 4793}, + []int{-19800, 10853, -19421, 13095}, + []int{-4681, -14389, -3065, -14279}, + []int{-9840, -4715, -9803, -4004}, + []int{-13921, -16655, -12748, -14568}, + []int{15884, 14471, 16316, 15061}, + []int{17684, 7721, 19299, 9585}, + []int{7468, 18439, 9781, 19112}, + []int{-4485, -19431, -3933, -17679}, + []int{-19527, 3283, -18809, 3970}, + []int{3007, 1665, 3505, 3858}, + []int{11526, -18801, 12654, -16655}, + []int{17021, -8111, 19299, -7636}, + []int{10246, 3262, 11901, 3970}, + []int{-19623, -16734, -19523, -15085}, + []int{6728, 3953, 7328, 4164}, + []int{1080, -6714, 2714, -6569}, + []int{-12130, 9585, -9890, 10039}, + []int{4881, 15683, 7029, 16423}, + []int{-12960, -9654, -11919, -7020}, + []int{-14835, -19515, -13417, -18801}, + []int{18082, 11103, 19992, 12998}, + []int{5757, 1494, 7328, 2113}, + []int{18000, 640, 19159, 2113}, + []int{11022, 6122, 12654, 7721}, + []int{-3217, -11264, -1781, -9469}, + []int{-9828, 14471, -6927, 15013}, + []int{-1696, -7636, -1445, -5235}, + []int{5266, 18166, 6801, 18439}, + []int{518, 19112, 1972, 20666}, + []int{-17318, -11264, -16900, -8859}, + []int{15241, 1118, 15884, 1771}, + []int{-5069, -16501, -3933, -14828}, + []int{-3883, 9005, -3707, 9733}, + []int{7468, 15061, 8035, 15784}, + []int{-3596, -6552, -1781, -5299}, + []int{-2802, 11785, -2344, 13271}, + []int{7468, 9585, 8139, 10359}, + []int{-14835, -8859, -13424, -6552}, + []int{-14835, 3953, -14470, 4548}, + []int{-5208, 2535, -4485, 4164}, + []int{15884, -9406, 19009, -8111}, + []int{-11919, 6634, -10309, 9005}, + []int{6403, -5235, 7081, -4715}, + []int{7328, 19886, 8139, 20990}, + []int{13830, 5977, 14100, 7038}, + []int{12654, 7038, 13398, 7721}, + []int{1603, 9585, 3621, 10369}, + []int{18082, -19878, 19584, -19623}, + []int{-17318, 14710, -16326, 15308}, + []int{-10193, 18166, -9828, 18654}, + []int{-3707, 16423, -2139, 19112}, + []int{11012, -2909, 12689, -1977}, + []int{5330, 7825, 6801, 10212}, + []int{7081, 10369, 7468, 11785}, + []int{-12960, 11785, -12160, 12140}, + []int{16517, 18654, 18000, 19886}, + []int{6728, 5977, 7468, 7061}, + []int{-14470, -19878, -12809, -19709}, + []int{-3217, 19343, -2344, 20990}, + []int{6403, -14568, 7328, -14389}, + []int{-7899, 5977, -6145, 7721}, + []int{17684, 13095, 19159, 14710}, + []int{14213, -15085, 15689, -14704}, + []int{-15236, -14568, -13921, -14279}, + []int{-7786, -8111, -5354, -5468}, + []int{-19421, 10369, -18739, 11103}, + []int{14213, -17791, 15884, -16734}, + []int{-13095, -17679, -12951, -17630}, + []int{19299, 10728, 19584, 11103}, + []int{3832, -2909, 5266, -1977}, + []int{300, -3101, 569, -1346}, + []int{14120, -2909, 15884, -718}, + []int{6801, -3101, 7029, -2909}, + []int{-14784, 803, -13095, 1665}, + []int{300, 19808, 518, 20990}, + []int{-1609, 16862, -594, 18439}, + []int{-10193, -19431, -9448, -17791}, + []int{-13095, 1118, -12960, 1384}, + []int{-9840, 1665, -9828, 3283}, + []int{-1445, 253, 300, 1118}, + []int{-19800, -11138, -19623, -7020}, + []int{5266, -2909, 7328, -1977}, + []int{-10193, 4771, -9890, 5977}, + []int{-2139, 12755, -1696, 13595}, + []int{-18809, 3858, -18015, 3970}, + []int{-19800, 8909, -19623, 9733}, + []int{10646, 10039, 11526, 10853}, + []int{-9448, 18654, -5208, 19886}, + []int{-1696, 1494, -494, 2535}, + []int{-7786, -4197, -5354, -2909}, + []int{-18486, 5977, -17182, 7061}, + []int{518, 1258, 3007, 1665}, + []int{-3883, -16501, -3596, -16147}, + []int{-1781, -8111, -594, -7636}, + []int{7081, -5000, 7468, -4197}, + []int{3621, 10039, 4881, 10865}, + []int{-494, -1044, 1080, -390}, + []int{4969, 6233, 6728, 7721}, + []int{-14784, -6552, -13095, -5000}, + []int{12654, -19142, 14100, -16734}, + []int{-2796, 3858, -2139, 4164}, + []int{18000, 9585, 19009, 10212}, + []int{10646, -5299, 12654, -5000}, + []int{-7786, -11730, -6999, -11595}, + []int{15689, -19142, 18000, -18767}, + []int{-19421, 11103, -18464, 13095}, + []int{-19800, -3052, -19523, -1944}, + []int{-16900, -19141, -16326, -17679}, + []int{569, -3052, 3007, -2909}, + []int{10303, -19623, 11022, -19141}, + []int{-13921, 2113, -13057, 3283}, + []int{-17180, -14828, -15236, -14389}, + []int{-4485, 11103, -3933, 12140}, + []int{1603, -14704, 3621, -11730}, + []int{10246, -1944, 11526, -1090}, + []int{14120, -19141, 15348, -17980}, + []int{-13424, 15308, -13057, 16862}, + []int{-3707, -4197, -3596, -2767}, + []int{13830, -5000, 14804, -4197}, + []int{-17442, 7061, -15861, 8466}, + []int{5183, -3052, 6801, -2909}, + []int{6728, -19709, 7601, -19431}, + []int{-19800, 19808, -19527, 20990}, + []int{-4918, 803, -3758, 1258}, + []int{5266, 214, 7029, 529}, + []int{-15236, -654, -14535, 529}, + []int{-2796, 9733, -2139, 11103}, + []int{-12951, -17630, -12130, -16655}, + []int{-9573, -19623, -7538, -19431}, + []int{8935, 15061, 9781, 16478}, + []int{-14535, -11730, -13921, -11595}, + []int{4881, -18539, 5757, -16734}, + []int{18000, 15061, 19992, 16478}, + []int{1972, 3858, 3832, 4548}, + []int{17021, 4771, 18082, 5977}, + []int{-11919, 640, -10921, 2535}, + []int{-12809, 4793, -11919, 6122}, + []int{-2802, 10359, -2796, 11103}, + []int{7601, 640, 8968, 1494}, + []int{-1696, 13271, -1445, 14471}, + []int{-19523, 14471, -17318, 15683}, + []int{-10309, -16734, -9840, -16147}, + []int{-3596, -5299, -3065, -4004}, + []int{2714, -19878, 3505, -19515}, + []int{-5208, 640, -4918, 1384}, + []int{-3065, -8111, -2015, -6714}, + []int{11526, 16862, 13108, 17732}, + []int{-10867, -1044, -9840, -654}, + []int{13398, -654, 14100, 214}, + []int{-15236, 16862, -14992, 18166}, + []int{-1781, -14389, -494, -13365}, + []int{-18015, 3262, -16326, 4164}, + []int{-11610, 2535, -10193, 3970}, + []int{300, 4263, 1972, 6122}, + []int{-3596, 6233, -2802, 7825}, + []int{-18809, -5462, -18795, -4871}, + []int{4969, 12755, 7081, 12998}, + []int{3832, -1346, 4969, -1090}, + []int{-13057, 3262, -12130, 3283}, + []int{-13057, 15308, -12809, 17536}, + []int{7328, 1494, 7468, 3858}, + []int{-17180, -17679, -14992, -14828}, + []int{2714, -18539, 4393, -17630}, + []int{11526, 16423, 11901, 16862}, + []int{-12089, -3895, -10921, -1346}, + []int{-14470, 3953, -13921, 4164}, + []int{-9840, -16113, -9828, -15085}, + []int{-13424, -2767, -13095, -1090}, + []int{-17442, -1044, -17182, 529}, + []int{-3217, -390, -2015, 803}, + []int{-18015, -19515, -16900, -19142}, + []int{13108, 16478, 14668, 17536}, + []int{7601, 5076, 9781, 6122}, + []int{-10867, 10400, -9803, 10853}, + []int{-18464, 11103, -17442, 12998}, + []int{-1781, -6552, -1696, -5462}, + []int{16099, 5977, 16517, 7199}, + []int{-19623, -19515, -19421, -18539}, + []int{-9573, 7825, -7538, 10039}, + []int{8035, 19808, 9781, 19870}, + []int{8035, 15683, 8935, 16423}, + []int{11022, -718, 13398, -654}, + []int{17021, -19539, 19299, -19142}, + []int{5757, -14389, 6801, -13365}, + []int{-1609, 12998, 569, 13271}, + []int{3621, -16147, 4393, -14704}, + []int{11022, 11103, 12689, 11785}, + []int{-9840, 11103, -9573, 11785}, + []int{5757, 19886, 7081, 20150}, + []int{17684, 7061, 19299, 7721}, + []int{14100, 6122, 15689, 7061}, + []int{10246, -1090, 11526, -1044}, + []int{13108, -6569, 14120, -5462}, + []int{1080, 16423, 3007, 17169}, + []int{-494, 19808, 300, 20990}, + []int{11901, 3262, 12654, 3970}, + []int{11022, 15061, 12654, 15784}, + []int{-18809, 18654, -17442, 19870}, + []int{-594, -4004, -494, -3649}, + []int{-18795, 7199, -18739, 7825}, + []int{-12960, 9005, -12130, 10359}, + []int{7081, 7061, 8035, 8466}, + []int{-2344, 11785, -2015, 12140}, + []int{569, -6552, 1080, -3895}, + []int{3621, 13271, 5183, 15013}, + []int{-3883, -18801, -2802, -17679}, + []int{-1696, -654, -1445, 253}, + []int{-2139, 15683, -1609, 17536}, + []int{-16900, -9654, -14835, -9194}, + []int{-3758, 1384, -2802, 1494}, + []int{2714, 15308, 4393, 15683}, + []int{-16326, 10853, -15861, 12755}, + []int{15348, -9654, 16517, -9406}, + []int{-18464, -5468, -16900, -5000}, + []int{-1445, -17630, 518, -16655}, + []int{-19623, 529, -19527, 1384}, + []int{7081, 14471, 7328, 15061}, + []int{-5069, -18539, -4485, -17630}, + []int{-14835, 9729, -14535, 10400}, + []int{7328, -718, 9781, 214}, + []int{-4485, 14710, -3758, 16423}, + []int{9781, 3970, 12654, 4263}, + []int{-19421, -7020, -17442, -6552}, + []int{-4681, 10728, -3982, 11103}, + []int{8935, 9005, 12654, 9733}, + []int{-2139, 9733, -2015, 10359}, + []int{-5144, 17536, -3933, 19343}, + []int{16099, 10728, 18000, 11103}, + []int{3832, 7199, 4881, 9729}, + []int{-3933, 6122, -3758, 8466}, + []int{-9573, -13457, -9161, -9654}, + []int{-13417, 11103, -12748, 11137}, + []int{12689, -2767, 13830, -718}, + []int{-9890, -5299, -9573, -5235}, + []int{-19421, -19878, -18809, -18801}, + []int{-19800, -13457, -19527, -11595}, + []int{-18486, 4548, -18015, 5076}, + []int{16316, 14471, 17684, 14710}, + []int{11901, -16655, 14100, -16501}, + []int{-3596, 2535, -2139, 3858}, + []int{-6145, 9729, -5069, 10728}, + []int{-16326, 3858, -15428, 4793}, + []int{18082, -3895, 19084, -1346}, + []int{15689, -654, 17684, 253}, + []int{-2015, -2767, -494, -1977}, + []int{-10193, -14828, -9840, -14389}, + []int{7029, 15784, 7468, 16423}, + []int{12654, 17732, 13398, 19343}, + []int{-19800, 10359, -18486, 10369}, + []int{5330, -5468, 7029, -5462}, + []int{-13417, 18439, -12809, 20666}, + []int{19009, -9406, 19159, -8111}, + []int{4881, -13365, 5757, -11264}, + []int{-16326, 1384, -15428, 1771}, + []int{4393, 1665, 4881, 3858}, + []int{3621, -19878, 5266, -19515}, + []int{4819, -4715, 4881, -4197}, + []int{-9890, 7199, -9828, 9005}, + []int{9781, -13457, 10646, -13413}, + []int{-16326, 2113, -14470, 3283}, + []int{10646, -384, 11901, 1258}, + []int{8139, 3858, 9781, 4785}, + []int{-5069, 12140, -4485, 13271}, + []int{518, 18166, 1972, 19112}, + []int{-13095, -9654, -12960, -8111}, + []int{6801, -8111, 7029, -6569}, + []int{-3982, 9733, -3758, 10212}, + []int{7328, -4004, 8139, -1977}, + []int{-11919, -1090, -10867, -718}, + []int{-19800, -6552, -18809, -5468}, + []int{-18015, -18801, -17180, -16655}, + []int{-5354, 12140, -5144, 13271}, + []int{14804, -14568, 15348, -13365}, + []int{-10193, 1771, -9890, 3858}, + []int{-12951, -1977, -12160, -1044}, + []int{-6999, 3262, -6145, 4771}, + []int{518, 1665, 2714, 3283}, + []int{-14784, 11785, -14470, 12998}, + []int{-10867, -19431, -10193, -17980}, + []int{11901, -390, 13398, 1118}, + []int{-10867, 4548, -10193, 5618}, + []int{-2802, -18539, -1781, -16734}, + []int{13108, 9005, 14120, 10728}, + []int{-10867, 9005, -9840, 9585}, + []int{18000, 12998, 19992, 13095}, + []int{8139, -19539, 10303, -18801}, + []int{7468, -18767, 8968, -17791}, + []int{10303, 2535, 11901, 3262}, + []int{-2802, -16655, -1781, -16113}, + []int{-12160, 16478, -12089, 18439}, + []int{-494, 214, 569, 253}, + []int{-18795, 18166, -18464, 18654}, + []int{-18464, 10400, -17182, 10865}, + []int{-10867, 10359, -9803, 10369}, + []int{-10867, -13365, -10193, -9469}, + []int{-5354, 4164, -3933, 4548}, + []int{6728, 17732, 7328, 18166}, + []int{-9803, 18439, -9448, 19886}, + []int{-2344, 19886, -2139, 20990}, + []int{4969, 5618, 6728, 5977}, + []int{-1781, -13365, -1733, -9654}, + []int{-17180, 13271, -16326, 13595}, + []int{15689, 7199, 16517, 9005}, + []int{-10867, -9406, -9890, -6569}, + []int{8139, 11785, 10303, 12140}, + []int{-2015, 4548, -1445, 4793}, + []int{13108, 20666, 14100, 20990}, + []int{-16900, -19431, -16326, -19142}, + []int{-19623, -15085, -18809, -14568}, + []int{-10309, -6569, -9828, -5468}, + []int{-18015, 7061, -17442, 7825}, + []int{4881, -1090, 5183, -718}, + []int{-5144, 12755, -5069, 13095}, + []int{15241, 1771, 16517, 2113}, + []int{-3707, -14279, -3217, -11138}, + []int{19299, 8909, 19584, 9585}, + []int{-3933, 2113, -3707, 4164}, + []int{-4681, 6233, -3933, 8909}, + []int{-9890, 6634, -9803, 7199}, + []int{13398, 10728, 14100, 11785}, + []int{-3596, -3052, -2139, -654}, + []int{-3596, -19878, -1781, -19539}, + []int{-1445, -7636, -594, -6569}, + []int{-6145, 6233, -5354, 7061}, + []int{-3217, 4164, -2344, 4548}, + []int{3621, -14389, 4819, -11595}, + []int{-12089, 7199, -11919, 9585}, + []int{-5144, 19870, -3883, 20990}, + []int{-5069, 5076, -4918, 6634}, + []int{-11610, -13365, -10921, -9469}, + []int{-10309, 10039, -9890, 10359}, + []int{-13921, -17630, -13057, -16655}, + []int{5757, -9194, 6403, -6569}, + []int{-1609, 10853, -494, 12998}, + []int{5266, 10039, 5330, 10369}, + []int{-17318, -14279, -16900, -13365}, + []int{11526, -1977, 12654, -1044}, + []int{-7786, 10369, -6999, 11103}, + []int{-19527, 6634, -19523, 7199}, + []int{-2802, -9194, -1445, -8111}, + []int{-18486, -1977, -18015, -1090}, + []int{1603, -9469, 2714, -7636}, + []int{13398, -3895, 15241, -3052}, + []int{-13417, 8909, -12951, 9005}, + []int{19299, 13271, 19992, 15061}, + []int{-9448, 19886, -7538, 20150}, + []int{-13921, 3970, -13417, 4771}, + []int{19084, -2767, 19584, -1346}, + []int{-4918, -6552, -3883, -5462}, + []int{-18486, -2909, -18015, -1977}, + []int{4393, 3858, 5266, 3970}, + []int{8035, 6634, 8968, 8466}, + []int{-3758, -1944, -3596, -718}, + []int{-2796, -16734, -2015, -16655}, + []int{-9448, 1665, -7538, 3970}, + []int{-18464, -19878, -18015, -19141}, + []int{-17182, -11595, -16326, -11264}, + []int{-9890, 1384, -9840, 3283}, + []int{8935, 8909, 10303, 9005}, + []int{10646, -19878, 12689, -19623}, + []int{9781, 3262, 10246, 3970}, + []int{-13424, -18801, -13095, -17791}, + []int{-19421, -4871, -18464, -4715}, + []int{-3883, 1494, -2796, 2113}, + []int{-15236, 18439, -14835, 19886}, + []int{-9890, 4785, -9161, 5076}, + []int{11901, 10400, 12689, 10865}, + []int{-3758, 18439, -3707, 19343}, + []int{15348, -6569, 15884, -4715}, + []int{-14835, -3649, -14470, -3052}, + []int{13108, 11785, 14100, 12755}, + []int{-7899, -6714, -7786, -5299}, + []int{6801, -16734, 7081, -14704}, + []int{5266, 3970, 6728, 4164}, + []int{1603, 11137, 3505, 13271}, + []int{11022, -6552, 11901, -5299}, + []int{-7899, -5235, -6145, -4197}, + []int{-13057, 4164, -12748, 4771}, + []int{17684, 16478, 19584, 17536}, + []int{4881, 8909, 5330, 9729}, + []int{14804, -4715, 15348, -4004}, + []int{18082, 4785, 19584, 5618}, + []int{6801, 9005, 7328, 10212}, + []int{-3758, 4548, -2344, 5076}, + []int{11526, 1384, 12654, 1771}, + []int{-9840, -19709, -7899, -19623}, + []int{15884, 6634, 16099, 7061}, + []int{-12809, 16478, -12160, 18166}, + []int{-19527, 253, -18795, 1384}, + []int{4393, -17980, 4881, -16734}, + []int{-15428, 1384, -14835, 1771}, + []int{-11919, -19709, -10193, -19431}, + []int{4969, 18439, 6403, 18654}, + []int{-7899, 17169, -5208, 18654}, + []int{16099, 253, 17684, 803}, + []int{-5208, -19142, -4485, -18801}, + []int{-7786, -16655, -6145, -15085}, + []int{19159, 1384, 19992, 3262}, + []int{-12748, -17679, -12130, -17630}, + []int{8968, 7038, 11012, 8466}, + []int{-14784, -17679, -14470, -16501}, + []int{-494, -16655, 300, -14828}, + []int{-12748, -16655, -12160, -16501}, + []int{-10309, 12998, -9573, 14471}, + []int{14120, 9005, 15348, 10359}, + []int{-12960, 1665, -12130, 1771}, + []int{12654, -1944, 12689, -1044}, + []int{-18739, 10865, -18015, 11103}, + []int{-2015, -5299, -1733, -5235}, + []int{-14470, 9585, -13057, 10369}, + []int{3007, 6634, 3832, 9585}, + []int{7601, 19112, 9781, 19808}, + []int{12654, 1118, 14120, 1384}, + []int{-14470, -19623, -13417, -19515}, + []int{10246, -18801, 11022, -16501}, + []int{16316, 11103, 18082, 11137}, + []int{-14784, -5000, -12809, -4715}, + []int{-9161, 4785, -7899, 7038}, + []int{18000, 10400, 19084, 11103}, + []int{-12748, -6569, -10921, -5462}, + []int{569, -19623, 1080, -19142}, + []int{1080, -1090, 1603, -654}, + []int{17684, 20666, 19584, 20990}, + []int{3505, -15085, 3621, -14704}, + []int{-12130, -7020, -10921, -6714}, + []int{-5208, -5462, -4681, -5235}, + []int{-9828, -14279, -9573, -13365}, + []int{-14784, 15061, -12960, 15308}, + []int{-12960, -14389, -12130, -13457}, + []int{-16326, -18801, -15428, -17679}, + []int{-13424, -8111, -13057, -7636}, + []int{19084, -19141, 19992, -18801}, + []int{8035, 13595, 8139, 15013}, + []int{-18795, -5462, -18739, -5000}, + []int{16316, -11138, 19084, -9654}, + []int{7029, -8111, 7328, -5462}, + []int{-1445, -6569, -594, -5462}, + []int{-4485, 12998, -3883, 13595}, + []int{-9161, 7038, -7899, 7061}, + []int{-16900, 4164, -16393, 4771}, + []int{19584, 18166, 19992, 19870}, + []int{-12809, 4785, -12130, 4793}, + []int{-10309, 17536, -9890, 17732}, + []int{-3596, 12998, -2802, 14710}, + []int{-9840, 16423, -7538, 16862}, + []int{-13057, 18166, -12951, 18439}, + []int{15241, 15784, 15689, 16423}, + []int{-4485, 13595, -3883, 14471}, + []int{-2796, -654, -2344, -390}, + []int{15348, 20150, 16099, 20990}, + []int{-14992, -16501, -13921, -16147}, + []int{-13417, -6714, -12951, -6569}, + []int{-1781, -17679, -1445, -16655}, + []int{-9828, 1258, -9448, 2535}, + []int{11901, -14279, 13108, -13365}, + []int{12654, -5299, 13398, -3101}, + []int{5757, 10359, 7081, 10400}, + []int{9781, 6233, 10246, 7038}, + []int{-4918, 13271, -4485, 15061}, + []int{-19800, 214, -19623, 1771}, + []int{-14470, 20666, -12748, 20990}, + []int{-9161, 10359, -7786, 11785}, + []int{19159, 3283, 19584, 4164}, + []int{-12130, 1494, -11919, 3283}, + []int{-16393, -1090, -15428, -654}, + []int{19584, 19870, 19992, 20990}, + []int{-10921, 15013, -9890, 16862}, + []int{7328, 9005, 8935, 9585}, + []int{-14835, -19878, -14470, -19539}, + []int{-12089, 15061, -10921, 16862}, + []int{7081, -16147, 7601, -14828}, + []int{-17442, 9005, -17318, 9733}, + []int{-9890, -2767, -9828, -1346}, + []int{-9161, -13365, -7786, -9654}, + []int{-18486, 10728, -18464, 10865}, + []int{-9828, -5468, -9161, -5299}, + []int{4819, -14828, 4969, -13457}, + []int{5266, -19623, 6403, -19515}, + []int{11012, -9469, 11526, -6569}, + []int{11012, 16862, 11526, 18654}, + []int{-18464, -7636, -17442, -7020}, + []int{1080, 1118, 3505, 1258}, + []int{3832, 253, 4969, 803}, + []int{18082, 6233, 19159, 7038}, + []int{-15236, 4785, -14784, 6233}, + []int{-3982, 10369, -3883, 10865}, + []int{-18739, -11264, -17318, -11138}, + []int{-19523, 10039, -19421, 10359}, + []int{-5208, -1944, -5069, -1346}, + []int{-3707, -14704, -3217, -14389}, + []int{-6999, 9729, -6927, 10212}, + []int{14100, -19142, 14120, -18539}, + []int{-3758, 4263, -3596, 4548}, + []int{16517, 15061, 17684, 16862}, + []int{-3883, -9194, -3758, -7020}, + []int{-16900, -11264, -16326, -9654}, + []int{12689, 10853, 13398, 10865}, + []int{5757, -13365, 7468, -11264}, + []int{-13424, 11785, -13095, 13095}, + []int{-3982, 5076, -3596, 6122}, + []int{-3933, 4263, -3883, 5076}, + []int{16316, -19878, 17021, -19431}, + []int{11526, 14710, 11901, 15061}, + []int{16316, -4197, 18000, -3052}, + []int{11901, -14389, 12654, -14279}, + []int{-18809, -11595, -17442, -11264}, + []int{10646, -6569, 11022, -5299}, + []int{16099, -14389, 18082, -13413}, + []int{-16326, -2909, -15236, -1977}, + []int{-5208, -1346, -5069, -384}, + []int{7601, -14279, 9781, -13457}, + []int{-13057, -14389, -12960, -13413}, + []int{2714, 4548, 3007, 5618}, + []int{-19623, -9194, -19523, -6569}, + []int{-16900, 5076, -15861, 6122}, + []int{18000, 10212, 18082, 10400}, + []int{10246, -13365, 10303, -8859}, + []int{-11610, -5462, -10867, -4871}, + []int{-4485, -5000, -3883, -3895}, + []int{11022, -16147, 13108, -14828}, + []int{-4681, 8909, -4485, 9733}, + []int{7328, -17679, 7601, -16501}, + []int{14213, -718, 15348, -390}, + []int{4881, 3970, 5183, 5076}, + []int{-18795, -18801, -18015, -16655}, + []int{13108, -7020, 15689, -6714}, + []int{-17442, 19870, -16900, 20990}, + []int{-3596, 11137, -2802, 12140}, + []int{16517, 7825, 17684, 9005}, + []int{-14992, 16478, -14835, 18166}, + []int{-19800, -5468, -19421, -4871}, + []int{-3217, -14704, -3065, -14568}, + []int{10646, -3052, 11526, -2909}, + []int{5183, 10728, 6801, 10853}, + []int{-3596, 5076, -3217, 6122}, + []int{-7538, 529, -6145, 1384}, + []int{16099, 4164, 16316, 4548}, + []int{1080, 17536, 3832, 18166}, + []int{-3758, 15013, -3707, 15683}, + []int{11012, 14710, 11022, 16423}, + []int{-17180, -1044, -16900, -384}, + []int{-5208, -9406, -4918, -9194}, + []int{-6999, -19141, -5208, -18539}, + []int{15689, -14568, 19009, -14389}, + []int{8968, -13413, 10246, -11264}, + []int{-5069, -14704, -3883, -14389}, + []int{-14784, 4548, -13921, 5977}, + []int{-2015, 15013, -1733, 15308}, + []int{-145, 1494, 300, 3953}, + []int{-594, 16862, 300, 18166}, + []int{-9828, 529, -7786, 1258}, + []int{-3065, 3858, -2796, 3953}, + []int{-12951, -17791, -12809, -17630}, + []int{12689, 6233, 13830, 7038}, + []int{1080, -19878, 2714, -19709}, + []int{16316, 803, 18000, 1665}, + []int{19159, -5468, 19299, -5299}, + []int{-16393, 1494, -16326, 1771}, + []int{-14470, 4164, -13921, 4263}, + []int{-2796, 1118, -2139, 1665}, + []int{3621, 11137, 4969, 11785}, + []int{-9573, 10359, -9161, 10400}, + []int{12654, 1494, 13108, 3283}, + []int{-18809, -16655, -17442, -14828}, + []int{-1609, 10369, -145, 10853}, + []int{-9161, -19878, -6999, -19709}, + []int{-7786, -14828, -6999, -13457}, + []int{-11919, -9406, -10921, -7636}, + []int{4969, 10853, 5757, 11137}, + []int{-15861, 12140, -15428, 14471}, + []int{1603, -3895, 1972, -3052}, + []int{-18464, 4164, -16900, 4263}, + []int{-9890, 5076, -9448, 5618}, + []int{13830, -1977, 14100, -1044}, + []int{14100, 11785, 15241, 13095}, + []int{10246, -1977, 11022, -1944}, + []int{-1696, -1346, -594, -1090}, + []int{19584, 3858, 19992, 4785}, + []int{-10193, -11138, -9573, -9469}, + []int{-17318, -14389, -15236, -14279}, + []int{-2802, -9406, -2015, -9194}, + []int{17684, -7636, 19299, -6569}, + []int{-7899, 4263, -6999, 5076}, + []int{15241, -4004, 15689, -3649}, + []int{-16900, -13413, -15861, -11595}, + []int{-11919, 10212, -10867, 10369}, + []int{-16393, -9194, -14992, -8111}, + []int{-12809, 7825, -12089, 8909}, + []int{-10309, -17791, -9448, -17679}, + []int{1972, -6569, 3505, -5462}, + []int{4969, -19515, 6728, -18767}, + []int{-13921, -17791, -13095, -17630}, + []int{2714, -9469, 3832, -9406}, + []int{11526, 13595, 12689, 14710}, + []int{-18486, -6552, -18464, -5299}, + []int{4969, 2113, 5330, 2535}, + []int{-18739, 529, -18015, 640}, + []int{-4918, 4785, -4681, 6122}, + []int{8035, -19709, 8139, -19539}, + []int{-1445, 13595, -145, 15308}, + []int{-7538, -5299, -5354, -5235}, + []int{-18739, 640, -17442, 803}, + []int{-19623, -18539, -19527, -16734}, + []int{-5208, 2113, -4681, 2535}, + []int{12689, -9194, 13108, -7020}, + []int{-10867, -6569, -10309, -5299}, + []int{13830, 5076, 14100, 5618}, + []int{-3883, -6552, -3758, -5299}, + []int{10646, -9654, 11901, -9469}, + []int{-9840, -1090, -9573, -384}, + []int{-16900, 6233, -15236, 7038}, + []int{4819, -13413, 4881, -11730}, + []int{13108, -16113, 14100, -15085}, + []int{1603, -11264, 3505, -9469}, + []int{-145, 12755, 1080, 12998}, + []int{-3883, -5299, -3596, -4715}, + []int{5757, 19343, 6403, 19886}, + []int{-15428, -5235, -14992, -5000}, + []int{4393, -384, 4969, 253}, + []int{5266, 5977, 6728, 6233}, + []int{-12748, 10359, -12160, 10853}, + []int{-145, 5977, 300, 7038}, + []int{-145, 15683, 300, 16478}, + []int{-16900, 4771, -16326, 5076}, + []int{-10867, 5977, -10309, 6233}, + []int{15884, -16734, 19159, -16147}, + []int{-13095, -6552, -13057, -5235}, + []int{-5069, -5000, -4681, -3895}, + []int{-19421, 5977, -18486, 6233}, + []int{-17182, 5618, -16900, 6122}, + []int{5330, -5000, 6403, -3895}, + []int{14668, 17732, 15241, 19112}, + []int{19159, 13595, 19299, 15013}, + []int{11901, 4548, 12689, 5618}, + []int{1972, 6233, 2714, 7038}, + []int{-9890, -13365, -9573, -11138}, + []int{19159, -5235, 19584, -4197}, + []int{-12951, -718, -12748, -384}, + []int{-10309, 17169, -9840, 17536}, + []int{-13424, -19709, -13095, -19623}, + []int{-3758, 214, -3707, 803}, + []int{-2802, 5618, -2015, 6634}, + []int{6728, 7061, 7081, 7721}, + []int{4881, -3649, 6403, -3052}, + []int{-1733, 17732, -1696, 18654}, + []int{-9803, 20150, -7786, 20990}, + []int{-19623, 8466, -19523, 9585}, + []int{-14835, -3052, -13424, -2909}, + []int{-2802, 11137, -1733, 11785}, + []int{-11919, -19878, -9573, -19709}, + []int{-19623, -3649, -18795, -3052}, + []int{-18486, -5000, -17182, -4871}, + []int{13108, -16147, 13830, -16113}, + []int{3505, 11785, 4881, 13271}, + []int{-17180, 14471, -15428, 14710}, + []int{-15428, -19623, -14835, -19142}, + []int{17684, -19878, 18000, -19539}, + []int{-12960, -4715, -11919, -4004}, + []int{3832, -11264, 4881, -9404}, + []int{9781, 1494, 11012, 2113}, + []int{-14535, -4197, -13095, -4004}, + []int{1080, -654, 1603, -390}, + []int{4881, -18767, 5266, -18539}, + []int{-7538, -11138, -5208, -8859}, + []int{11526, -16655, 11901, -16147}, + []int{15241, 16862, 15884, 19112}, + []int{-2344, 19343, -2139, 19808}, + []int{4819, 17169, 4881, 18654}, + []int{-17442, -16147, -17182, -14568}, + []int{-14535, 15013, -13417, 15061}, + []int{-19421, -3052, -18015, -2909}, + []int{-6145, 4164, -5354, 4785}, + []int{-10309, 10369, -9828, 10400}, + []int{-2139, -19141, -1609, -18801}, + []int{-4681, -5462, -4485, -4197}, + []int{7468, 10359, 8935, 10400}, + []int{-13417, 17169, -13095, 18166}, + []int{16099, 1665, 18000, 1771}, + []int{8139, -5000, 8968, -3895}, + []int{-4485, 2113, -3933, 3970}, + []int{-18015, 1384, -16393, 1665}, + []int{15689, 4548, 16316, 4771}, + []int{-10193, -19623, -9803, -19539}, + []int{14213, 5977, 15884, 6122}, + []int{12689, 13595, 13108, 16423}, + []int{14120, 10400, 15241, 10728}, + []int{-3596, 3858, -3217, 4548}, + []int{-5208, -1977, -5069, -1944}, + []int{4393, 10865, 4969, 11137}, + []int{15689, -8111, 17021, -6569}, + []int{-2139, -1346, -2015, -390}, + []int{14213, -16501, 14804, -15085}, + []int{-19800, -6714, -19623, -6552}, + []int{300, -16655, 518, -14828}, + []int{-2802, -5299, -2796, -4871}, + []int{-4485, 8909, -3982, 10039}, + []int{-10309, 14710, -9840, 15013}, + []int{-9890, 15061, -9803, 16423}, + []int{-7538, -13457, -5208, -13413}, + []int{11526, 10212, 12654, 10369}, + []int{15348, 2113, 15689, 2535}, + []int{5266, 10400, 7029, 10728}, + []int{1603, -11730, 3621, -11264}, + []int{19584, 17536, 19992, 18166}, + []int{-1609, 253, -1445, 803}, + []int{-494, 11137, -145, 11785}, + []int{-13095, -1977, -12960, -1090}, + []int{5330, -5462, 6728, -5235}, + []int{-9840, 19343, -9803, 19808}, + []int{-1609, 18439, -145, 18654}, + []int{-5208, 17732, -5144, 19112}, + []int{14668, 7061, 16099, 7199}, + []int{-4918, 10212, -3883, 10369}, + []int{-15428, 12140, -14784, 12998}, + []int{-1445, 3262, -145, 3953}, + []int{-11610, -19431, -10867, -17980}, + []int{-1445, -19141, -494, -18539}, + []int{-15861, 7061, -15236, 8466}, + []int{13830, -16147, 14120, -16113}, + []int{3505, 15683, 4881, 17169}, + []int{-145, -390, 1080, 214}, + []int{-9890, 19808, -9803, 19886}, + []int{-18809, 1494, -18015, 2113}, + []int{-19527, 20150, -18464, 20990}, + []int{-3758, 15683, -2344, 15784}, + []int{-17182, -16501, -17180, -14828}, + []int{-17442, 16423, -17182, 17732}, + []int{-18486, 7061, -18015, 7721}, + []int{7328, -9406, 8035, -7636}, + []int{15348, -14704, 15689, -13413}, + []int{11901, -6714, 14213, -6569}, + []int{7081, -17980, 7328, -17791}, + []int{8139, -14828, 9781, -14389}, + []int{-3596, -16655, -3217, -16147}, + []int{-16326, -5299, -14784, -5235}, + []int{-9573, -15085, -7786, -14389}, + []int{11526, 17732, 12654, 18166}, + []int{3832, -16655, 4969, -16147}, + []int{-10921, 640, -10867, 2535}, + []int{8968, -16501, 10246, -14828}, + []int{12654, -14828, 13830, -14568}, + []int{-12748, 12140, -12130, 12755}, + []int{-3065, -19515, -2344, -19431}, + []int{-18795, 19870, -17442, 19886}, + []int{-19527, -17980, -19421, -17791}, + []int{-16393, -5000, -16326, -4197}, + []int{13830, -8111, 15348, -7020}, + []int{-17442, -19539, -16393, -19515}, + []int{-18486, -19141, -17442, -18801}, + []int{19584, -5299, 19992, -4004}, + []int{-19421, -14568, -18809, -11138}, + []int{-16393, 19870, -15236, 19886}, + []int{-11610, -13457, -10921, -13413}, + []int{-6927, 13271, -5354, 14710}, + []int{-17182, 7038, -15236, 7061}, + []int{-1445, -9406, -145, -8111}, + []int{4881, 3283, 5757, 3858}, + []int{-14835, 6233, -13424, 7199}, + []int{-14992, -16147, -14784, -16113}, + []int{4969, -654, 5183, -384}, + []int{-9573, 3858, -9448, 3970}, + []int{-16900, -9194, -16393, -8111}, + []int{-9448, 10039, -7786, 10359}, + []int{-16326, 17732, -15236, 19870}, + []int{-3758, 19343, -3707, 19870}, + []int{-19623, 10369, -19527, 10853}, + []int{-12809, 19112, -11919, 19886}, + []int{4881, -16147, 4969, -16113}, + []int{17684, 11137, 18000, 13095}, + []int{-19623, -4004, -19523, -3895}, + []int{-2802, -19142, -2015, -19141}, + []int{9781, 13595, 11526, 14710}, + []int{-3758, 7199, -3707, 9005}, + []int{-15861, -3895, -14992, -2909}, + []int{-9448, -19142, -7538, -18801}, + []int{-13417, -2909, -12960, -2767}, + []int{-4485, 3970, -3982, 4164}, + []int{-2015, -1346, -1781, -654}, + []int{-16393, -654, -15236, 529}, + []int{14213, 214, 15348, 1118}, + []int{4969, -16734, 6403, -16501}, + []int{19009, 2113, 19084, 3970}, + []int{-13424, -1090, -13095, -654}, + []int{-15236, 3970, -14835, 4785}, + []int{-12130, 11785, -12089, 14471}, + []int{19159, 803, 19992, 1258}, + []int{-10309, -17679, -9573, -16734}, + []int{4969, 9733, 5183, 10359}, + []int{-7899, 13271, -6927, 13595}, + []int{-17180, 2535, -16326, 3262}, + []int{-6999, -1977, -6145, -1346}, + []int{10246, 5977, 10646, 7038}, + []int{300, 15784, 569, 16423}, + []int{-18486, 10359, -16900, 10400}, + []int{8935, 4785, 8968, 5076}, + []int{-9803, 15013, -9573, 15683}, + []int{18082, 5618, 19159, 6233}, + []int{-9890, -5000, -9840, -3895}, + []int{-17318, 15308, -16393, 15683}, + []int{3007, 15013, 4393, 15061}, + []int{-594, -390, -145, 214}, + []int{16517, 6634, 17684, 7199}, + []int{-4681, 16423, -3758, 16862}, + []int{-1696, 7825, -1609, 8466}, + []int{-594, -5235, -494, -4197}, + []int{-3217, -16501, -2802, -16147}, + []int{3832, 4263, 4819, 4771}, + []int{19084, -16147, 19299, -14568}, + []int{-6999, 19886, -5144, 20990}, + []int{7468, 2535, 8035, 3283}, + []int{11526, -8859, 12689, -6714}, + []int{16517, 7721, 17021, 7825}, + []int{-13417, 3953, -13095, 4793}, + []int{1603, -19623, 1972, -19515}, + []int{19584, -2767, 19992, -1346}, + []int{-494, -14828, 518, -14389}, + []int{-1445, 4263, -594, 4785}, + []int{-6999, -13365, -5208, -11138}, + []int{-13921, 4793, -13417, 6233}, + []int{518, 7038, 2714, 7825}, + []int{3505, 15061, 4393, 15308}, + []int{11012, 5977, 11022, 7825}, + []int{-18464, -1090, -17182, -1044}, + []int{-14535, 7721, -14470, 9005}, + []int{-9161, -5000, -7899, -4004}, + []int{7601, 6122, 9781, 6634}, + []int{-12160, 3970, -12089, 4263}, + []int{-4485, 12140, -3933, 12755}, + []int{-7786, -15085, -5354, -14828}, + []int{-14992, -16734, -14784, -16501}, + []int{4881, 5076, 5183, 5618}, + []int{8935, 16478, 8968, 17169}, + []int{-10921, -9194, -10867, -7636}, + []int{16517, -1977, 18082, -1346}, + []int{-12809, 12140, -12748, 12755}, + []int{-9803, 3970, -6999, 4263}, + []int{-3707, -17630, -2802, -16734}, + []int{-9840, 9005, -9803, 9729}, + []int{-16326, 8466, -15428, 8909}, + []int{-14835, -9654, -14470, -9406}, + []int{15348, 9005, 17684, 9729}, + []int{-19523, 1494, -18809, 1665}, + []int{-19523, -9654, -19421, -7020}, + []int{13398, 7061, 14213, 8466}, + []int{10246, 803, 10303, 1258}, + []int{-145, -18767, 1603, -18539}, + []int{-19800, -19878, -19527, -19709}, + []int{-2796, 13595, -1733, 15013}, + []int{9781, -654, 10646, 214}, + []int{7601, 529, 10246, 640}, + []int{8935, 14471, 8968, 14710}, + []int{-19523, 18166, -18809, 18439}, + []int{5183, -14568, 5266, -14389}, + []int{-14992, 1118, -14835, 1258}, + []int{-9573, 5618, -9448, 7199}, + []int{-9840, 14471, -9828, 15061}, + []int{-10921, -5468, -10867, -5462}, + []int{-19421, -16734, -18809, -16147}, + []int{-13424, -14568, -13095, -14279}, + []int{-9828, -1346, -9803, -1090}, + []int{10303, -11138, 10646, -9404}, + []int{-4681, 5076, -4485, 6233}, + []int{-13095, -5235, -11919, -5000}, + []int{-12951, -19431, -12748, -19141}, + []int{-10867, 214, -9840, 253}, + []int{7601, -5000, 8139, -4197}, + []int{1080, -19539, 1603, -19515}, + []int{-9840, -384, -9828, 1118}, + []int{-9828, -7636, -7899, -5468}, + []int{-12089, 11785, -11610, 13595}, + []int{-1781, -1977, -1445, -1346}, + []int{-15236, 7038, -14835, 8466}, + []int{-2015, 10212, -1696, 10853}, + []int{-19800, 7038, -19623, 8466}, + []int{14120, 10359, 15348, 10369}, + []int{16099, -19709, 16316, -19142}, + []int{-10309, 17732, -9161, 18166}, + []int{10646, 5977, 11012, 6233}, + []int{7328, -1090, 8139, -718}, + []int{-11610, -4871, -10309, -3895}, + []int{8035, 2535, 8139, 3283}, + []int{-5354, -8859, -5208, -6569}, + []int{-19623, 6233, -19523, 6634}, + []int{-18015, -19142, -17318, -19141}, + []int{-19421, -5462, -18809, -4871}, + []int{2714, 9005, 3007, 9585}, + []int{-14470, 7825, -13417, 8466}, + []int{-5354, -14279, -3982, -13457}, + []int{-9840, 3858, -9803, 4263}, + []int{-13095, -14568, -13057, -14279}, + []int{-13095, -1044, -12960, -654}, + []int{-19527, -19878, -19523, -19623}, + []int{-12951, 8909, -12089, 9005}, + []int{15241, 11137, 15348, 12755}, + []int{-15861, 10728, -14992, 12140}, + []int{-16326, -1977, -15236, -1346}, + []int{-9828, 15013, -9803, 15061}, + []int{-19623, -11595, -19421, -11264}, + []int{-16326, 16862, -15861, 17536}, + []int{16099, 18654, 16316, 20666}, + []int{-3982, -9404, -3883, -7636}, + []int{13398, 17536, 14213, 17732}, + []int{7601, 10400, 8935, 11103}, + []int{-494, -14279, 1603, -13365}, + []int{19084, 3262, 19159, 3970}, + []int{-16326, 1771, -15428, 2113}, + []int{-13095, 640, -12951, 1118}, + []int{-17182, -1090, -17180, -384}, + []int{3832, 3262, 4393, 4263}, + []int{569, -8859, 1603, -7020}, + []int{-12160, -1977, -12089, -1944}, + []int{-1696, 10359, -145, 10369}, + []int{-12160, 14471, -10309, 14710}, + []int{10646, -11595, 11526, -11138}, + []int{10246, 2113, 12654, 2535}, + []int{-6999, 16478, -5069, 17169}, + []int{-3758, 6634, -3596, 7061}, + []int{8139, -19878, 10646, -19709}, + []int{1972, -5000, 2714, -4197}, + []int{-6145, -19623, -5354, -19431}, + []int{-14835, 529, -14535, 803}, + []int{-2139, -14828, -1781, -14568}, + []int{-13424, 3283, -12960, 3858}, + []int{-14470, -718, -13424, -654}, + []int{15689, 14471, 15884, 15683}, + []int{-5069, 9733, -4918, 10728}, + []int{-18486, 13095, -18015, 14471}, + []int{-2344, 4793, -2015, 5618}, + []int{3505, -6569, 4819, -5468}, + []int{5757, -18767, 6801, -18539}, + []int{-5354, 4771, -5144, 5618}, + []int{-2796, -16113, -2139, -14279}, + []int{-1696, 10212, -494, 10359}, + []int{18000, 19112, 19159, 19886}, + []int{-7899, -9406, -7538, -8859}, + []int{-16393, 19886, -16326, 20150}, + []int{-3065, 2113, -2015, 2535}, + []int{-12809, 20150, -11919, 20666}, + []int{4881, -13457, 5183, -13365}, + []int{-12748, 14710, -12130, 15784}, + []int{-3596, 15784, -2344, 16423}, + []int{-5144, 4548, -4918, 5076}, + []int{3505, -1977, 4393, -1944}, + []int{300, 15061, 1603, 15308}, + []int{13830, -3052, 14100, -1977}, + []int{3621, -3052, 4969, -2909}, + []int{-10193, 7038, -9890, 7825}, + []int{-13095, 1494, -12130, 1665}, + []int{15348, -718, 15689, 214}, + []int{-3758, -14704, -3707, -14389}, + []int{-19800, 2113, -19527, 3262}, + []int{-3883, 19112, -3758, 20150}, + []int{-4485, -7020, -3758, -6569}, + []int{-18486, -1044, -17442, -718}, + []int{-3758, 803, -3217, 1258}, + []int{14804, -11138, 15348, -9469}, + []int{-15861, 9729, -14992, 10039}, + []int{-12748, 6122, -12130, 7825}, + []int{1603, 10400, 3505, 11137}, + []int{-16393, -19878, -15861, -19623}, + []int{-1609, 15683, -594, 16862}, + []int{-15861, -6552, -14992, -5468}, + []int{-19527, 19870, -18809, 20150}, + []int{-19800, 5618, -19623, 7038}, + []int{-10193, -4197, -9890, -3101}, + []int{-9890, -16147, -9840, -14828}, + []int{18082, -14279, 19084, -13365}, + []int{-3982, -3649, -3707, -3052}, + []int{-1445, -5462, -594, -5299}, + []int{-16900, 10359, -15861, 10853}, + []int{-494, -4715, -145, -3052}, + []int{-14784, 10865, -13057, 11103}, + []int{-9803, 5618, -9573, 7038}, + []int{19584, -11264, 19992, -8859}, + []int{-594, 3953, 300, 4771}, + []int{1972, -15085, 2714, -14704}, + []int{11022, -5000, 11526, -3052}, + []int{-19523, -2767, -18486, -1977}, + []int{19299, 9585, 19584, 9729}, + []int{-3217, -19431, -2802, -19141}, + []int{-18464, 17536, -17442, 18654}, + []int{6728, -5462, 7029, -5235}, + []int{1972, 4771, 2714, 5977}, + []int{11901, -11138, 12689, -8859}, + []int{-17442, 11785, -17318, 12140}, + []int{4969, -11264, 5266, -9406}, + []int{-6927, 11103, -6145, 11785}, + []int{-14992, 11785, -14835, 12140}, + []int{-18809, 5618, -18486, 5977}, + []int{17021, -3052, 18000, -2909}, + []int{17684, 20150, 19084, 20666}, + []int{-9448, -5235, -7899, -5000}, + []int{-494, 7825, 518, 9733}, + []int{-18486, 1118, -17442, 1384}, + []int{5757, 803, 6728, 1494}, + []int{-19800, -4004, -19623, -3649}, + []int{-1445, 1258, 300, 1494}, + []int{-3065, -14704, -2796, -14389}, + []int{18000, -19878, 18082, -19539}, + []int{-19527, 13271, -18739, 13595}, + []int{7601, 19870, 8935, 19886}, + []int{16316, -1346, 17684, -718}, + []int{-15428, 4771, -15236, 6122}, + []int{10303, 18166, 11012, 19343}, + []int{5266, 529, 7081, 640}, + []int{-14835, 19886, -14470, 20990}, + []int{-7786, 10212, -7538, 10369}, + []int{-15861, 15013, -15428, 15308}, + []int{-13921, 1771, -12809, 2113}, + []int{-19421, -7636, -18795, -7020}, + []int{4393, 15013, 5266, 15683}, + []int{-12960, -16734, -12951, -16655}, + []int{-9828, -1977, -6999, -1346}, + []int{9781, 15308, 10646, 15683}, + []int{-19527, 3970, -19523, 4793}, + []int{-3217, 3953, -2796, 3970}, + []int{-10309, 14471, -9890, 14710}, + []int{-19527, 214, -19523, 253}, + []int{-7538, 7721, -6145, 9005}, + []int{-14992, 3283, -14535, 3953}, + []int{-9573, -384, -9161, 214}, + []int{12689, -7020, 13108, -6714}, + []int{17684, 15013, 18000, 16478}, + []int{-19523, -16655, -19421, -15085}, + []int{-2344, 12140, -2015, 12755}, + []int{-5208, 15061, -4918, 16478}, + []int{-14784, -9406, -13921, -8859}, + []int{-14992, -5235, -14835, -5000}, + []int{5266, -19878, 6403, -19623}, + []int{10246, 5618, 12654, 5977}, + []int{4969, 7721, 7081, 7825}, + []int{14100, -17980, 14804, -17791}, + []int{-15428, -14279, -14992, -11730}, + []int{8968, -18801, 9781, -17980}, + []int{14100, -3052, 14120, -654}, + []int{-18795, 253, -18739, 1494}, + []int{7029, 15683, 7468, 15784}, + []int{-2802, -15085, -2796, -14704}, + []int{-12748, 4263, -12160, 4771}, + []int{-9890, 18654, -9828, 19343}, + []int{3505, 10853, 3621, 10865}, + []int{10646, 19808, 11022, 20990}, + []int{4819, 9729, 5330, 9733}, + []int{-3933, 17732, -3707, 18166}, + []int{-14992, -14279, -14784, -13457}, + []int{4819, -5000, 4969, -4715}, + []int{300, 803, 1080, 1118}, + []int{15884, 15308, 16517, 16862}, + []int{-594, -1944, -494, -1044}, + []int{-18464, -3101, -17182, -3052}, + []int{5183, 3262, 5757, 3283}, + []int{19584, 10728, 19992, 11103}, + []int{13108, -8111, 13830, -7020}, + []int{-13921, -9404, -13417, -9194}, + []int{11526, 19870, 12689, 20990}, + []int{1080, 803, 3621, 1118}, + []int{-15236, -7636, -14992, -6569}, + []int{-3758, -19878, -3596, -19623}, + []int{7328, -17980, 7468, -17679}, + []int{-1781, -9654, -1733, -9194}, + []int{4881, 1771, 4969, 2535}, + []int{18082, -19623, 19159, -19539}, + []int{7601, 8466, 10246, 8909}, + []int{14120, -384, 14213, 640}, + []int{-12130, 6122, -12089, 7721}, + []int{-9840, -19539, -9573, -19431}, + []int{-14784, -4715, -13417, -4197}, + []int{-5208, 214, -5069, 529}, + []int{-1445, 1118, -494, 1258}, + []int{7029, 253, 7081, 529}, + []int{7081, -11138, 7468, -9654}, + []int{14120, 20666, 15348, 20990}, + []int{15884, -1944, 16316, -718}, + []int{4881, 12140, 4969, 13271}, + []int{-17318, -19142, -17182, -18801}, + []int{-19623, 9585, -19523, 10212}, + []int{16517, 19886, 17684, 20150}, + []int{11022, -19623, 11901, -19431}, + []int{13398, -4197, 14213, -4004}, + []int{8035, -17791, 8968, -16113}, + []int{-10921, -2909, -10193, -1090}, + []int{18000, -3101, 18082, -2767}, + []int{-18795, -1944, -18739, -1090}, + []int{-7786, 5076, -6145, 5977}, + []int{-5208, -13413, -5144, -9406}, + []int{6728, -18801, 7029, -18767}, + []int{13108, -8859, 14213, -8111}, + []int{13398, -16501, 14120, -16147}, + []int{3505, 1665, 4393, 3262}, + []int{3505, -3052, 3621, -1977}, + []int{-10309, 3970, -9840, 4164}, + []int{-18464, -4871, -17182, -4715}, + []int{-9448, 5076, -9161, 6634}, + []int{13830, 4771, 14213, 5076}, + []int{-18486, 5076, -18015, 5977}, + []int{-3758, -654, -3217, 214}, + []int{11526, 1771, 11901, 2113}, + []int{-18739, -1977, -18486, -1346}, + []int{7029, -19431, 7468, -18801}, + []int{8935, -19623, 10303, -19539}, + []int{16316, 3970, 17021, 5076}, + []int{-3883, 17169, -3707, 17732}, + []int{-5354, -5235, -4681, -5000}, + []int{15884, -2909, 17021, -1977}, + []int{-9161, -13457, -7538, -13413}, + []int{-3933, 18439, -3883, 19870}, + []int{-4681, 16862, -3982, 17536}, + []int{-14535, 13095, -13424, 13271}, + []int{-3707, 14710, -3065, 15013}, + []int{-14470, 19886, -13424, 20150}, + []int{-11919, 3953, -11610, 4793}, + []int{-14470, 2113, -13921, 3858}, + []int{-4485, 4785, -3982, 6122}, + []int{13398, -5462, 14120, -5235}, + []int{-7786, 529, -7538, 640}, + []int{-5208, -17791, -5069, -17630}, + []int{-17180, 6122, -15428, 6233}, + []int{-19623, -9654, -19523, -9469}, + []int{-12960, -6552, -12748, -5235}, + []int{8035, -9404, 10246, -7636}, + []int{-14835, -17679, -14784, -16734}, + []int{19084, 4771, 19584, 4785}, + []int{-594, -3052, -494, -2767}, + []int{3505, 4548, 3832, 4771}, + []int{-17182, 16423, -17180, 17536}, + []int{-7899, 5076, -7786, 5977}, + []int{-5069, -6552, -4918, -5468}, + []int{-18809, -1090, -18464, -1044}, + []int{12689, -3101, 13398, -2767}, + []int{3621, 9729, 3832, 10039}, + []int{3505, 19886, 4819, 20666}, + []int{-145, 13271, 300, 15308}, + []int{13398, -4004, 14213, -3895}, + []int{-12160, -1944, -12130, -1044}, + []int{-11919, 4793, -11610, 6634}, + []int{8935, -9469, 9781, -9404}, + []int{-15236, 15061, -14784, 15308}, + []int{-12748, -11138, -11919, -9654}, + []int{-12960, -2909, -12130, -2767}, + []int{-7538, -19539, -6999, -19431}, + []int{7601, -15085, 8968, -14828}, + []int{-16900, -5468, -15236, -5299}, + []int{-19800, 3262, -19527, 4548}, + []int{6728, -4715, 6801, -3052}, + []int{-7786, 11103, -7538, 11785}, + []int{19084, -4197, 19159, -4004}, + []int{14668, -14704, 14804, -13413}, + []int{-18015, 2535, -17180, 3262}, + []int{-5208, 7038, -4681, 7061}, + []int{-2015, 1494, -1696, 2535}, + []int{8935, 9733, 10646, 10039}, + []int{-9828, 18654, -9803, 19343}, + []int{8935, -19709, 10646, -19623}, + []int{-9890, 16423, -9840, 17169}, + []int{-12130, 10039, -12089, 10359}, + []int{-16393, -19539, -15861, -19431}, + []int{-145, 12140, 569, 12755}, + []int{11022, -19141, 11901, -18801}, + []int{-3217, 15308, -2802, 15683}, + []int{-3065, -16113, -2802, -14704}, + []int{5266, -11138, 5330, -9406}, + []int{-9828, 214, -9161, 529}, + []int{-4681, 15308, -4485, 16423}, + []int{4969, 5977, 5183, 6233}, + []int{-19421, -1944, -18795, -1346}, + []int{-15861, -19878, -14992, -19623}, + []int{-12089, -14279, -11610, -11264}, + []int{19159, 19808, 19299, 20666}, + []int{19159, 5977, 19992, 7061}, + []int{-5208, -16147, -5069, -14704}, + []int{14668, 15784, 14804, 16478}, + []int{-3707, 6122, -3065, 6233}, + []int{-13095, 4771, -12960, 4785}, + []int{14120, -16501, 14213, -16113}, + []int{-9890, -3649, -9828, -2909}, + []int{-12089, 13595, -11610, 14471}, + []int{-16900, -5299, -16393, -4871}, + []int{6801, -8859, 7029, -8111}, + []int{-1445, -1090, -594, -718}, + []int{7029, -17791, 7081, -17679}, + []int{1603, -6569, 1972, -6552}, + []int{-18739, 1258, -18486, 1494}, + []int{11901, -16501, 13398, -16147}, + []int{6801, 640, 7601, 1384}, + []int{-14470, 11103, -13417, 11137}, + []int{-13095, -18801, -12951, -18539}, + []int{5757, -11264, 7029, -9654}, + []int{-19421, -5468, -18809, -5462}, + []int{-3982, -3052, -3933, -2909}, + []int{-13417, -7636, -12960, -7020}, + []int{10646, 6233, 11012, 7038}, + []int{19299, -16501, 19584, -14828}, + []int{-2015, 4263, -1445, 4548}, + []int{17021, 14710, 19159, 15013}, + []int{-16326, -19142, -15236, -19141}, + []int{8139, -3052, 9781, -1977}, + []int{-16393, -19623, -15861, -19539}, + []int{4969, -5235, 5330, -4197}, + []int{7081, -18801, 8935, -18767}, + []int{-9448, -19431, -7538, -19142}, + []int{-15428, 3858, -15236, 4771}, + []int{-9448, -17630, -9161, -16655}, + []int{-5354, 15308, -5208, 16423}, + []int{-19800, -1044, -19623, -390}, + []int{-12089, 10039, -11919, 10369}, + []int{-12809, 15784, -12130, 16478}, + []int{-5144, -4197, -5069, -3895}, + []int{-6927, -19623, -6145, -19515}, + []int{15348, 11785, 15689, 13095}, + []int{15884, -1977, 16316, -1944}, + []int{3505, 1118, 4393, 1494}, + []int{8968, 640, 10246, 1384}, + []int{8139, -1346, 9781, -718}, + []int{300, 15308, 1603, 15683}, + []int{12689, 20666, 13108, 20990}, + []int{-10309, 5618, -10193, 7721}, + []int{7328, 9585, 7468, 10369}, + []int{-15428, 12998, -14992, 13095}, + []int{-6145, -5000, -5144, -4197}, + []int{-3933, 11137, -3596, 12140}, + []int{7081, -4197, 7328, -3101}, + []int{16517, 5618, 17021, 6233}, + []int{-15428, 13095, -14784, 13271}, + []int{19084, 9585, 19299, 9729}, + []int{-14535, 3858, -13921, 3953}, + []int{10646, 10865, 11012, 11785}, + []int{4969, -1944, 5183, -1090}, + []int{-12748, -5462, -11919, -5235}, + []int{-15236, 6233, -14992, 7038}, + []int{-13424, 3858, -13095, 3953}, + []int{16099, -19878, 16316, -19709}, + []int{-10921, -11264, -10867, -9194}, + []int{-3758, 20150, -3596, 20990}, + []int{-2015, 7038, -1781, 7825}, + []int{-1781, -19878, -1445, -19623}, + []int{-4918, 529, -3883, 803}, + []int{-14992, 529, -14835, 1118}, + []int{5266, -18767, 5330, -18539}, + []int{18082, -19141, 19084, -18767}, + []int{-3982, -19623, -3933, -19515}, + []int{5183, 12998, 5330, 13095}, + []int{-12809, 1771, -12130, 2113}, + []int{-18739, -5299, -18486, -4871}, + []int{19584, 3262, 19992, 3858}, + []int{-10309, 1384, -9890, 1771}, + []int{-14535, 6122, -13921, 6233}, + []int{-7899, -19709, -5354, -19623}, + []int{7601, 13095, 10246, 13595}, + []int{8139, 9729, 8935, 10359}, + []int{19299, -6714, 19584, -5462}, + []int{9781, 18439, 10303, 19870}, + []int{12654, 9585, 13108, 10039}, + []int{-10309, 18654, -9890, 19886}, + []int{1972, -19709, 2714, -19515}, + []int{-9803, 16862, -6999, 17169}, + []int{-19623, 5618, -18809, 5977}, + []int{10246, 14710, 11012, 15308}, + []int{-11610, 4548, -10921, 6233}, + []int{-11919, -9469, -10921, -9406}, + []int{-4485, -19878, -3982, -19515}, + []int{-2344, 4164, -1781, 4263}, + []int{14100, 11103, 14213, 11785}, + []int{11022, -6569, 12654, -6552}, + []int{5330, 10212, 5757, 10400}, + []int{-7538, -11595, -6999, -11138}, + []int{-17182, -14704, -17180, -14389}, + []int{-9161, 11785, -7786, 12998}, + []int{7328, -16501, 7601, -16147}, + []int{4393, -1944, 4819, -1346}, + []int{-17180, -3649, -16900, -3052}, + []int{-9161, -9404, -7899, -8859}, + []int{-7538, 1494, -5208, 3262}, + []int{-9803, 11785, -9448, 12755}, + []int{-19523, -2909, -19421, -2767}, + []int{-2344, -654, -2139, -390}, + []int{-13095, 8466, -13057, 8909}, + []int{11526, 18654, 12654, 19112}, + []int{-12951, 13595, -12809, 15308}, + []int{12689, 19870, 13398, 20666}, + []int{11022, 19870, 11526, 20150}, + []int{-3883, 4263, -3758, 4785}, + []int{-15236, 1771, -14835, 2113}, + []int{-10921, -7020, -10867, -6552}, + []int{7328, -14389, 8968, -14279}, + []int{-9573, -5000, -9161, -4715}, + []int{-1696, 11103, -1609, 12140}, + []int{-19623, 13595, -18795, 14471}, + []int{-2344, 4548, -2139, 4785}, + []int{-145, -5235, 569, -4004}, + []int{-3596, 12140, -2802, 12755}, + []int{-6145, 11103, -5354, 11785}, + []int{-3758, -5462, -3596, -5299}, + []int{-14470, -16147, -13921, -15085}, + []int{-18015, 1771, -17182, 2535}, + []int{19299, -19515, 19992, -19142}, + []int{-12160, -5000, -11610, -4715}, + []int{-18486, 253, -17442, 529}, + []int{-5354, 15061, -5208, 15308}, + []int{-2139, 10359, -2015, 10400}, + []int{-7538, 3262, -6999, 3953}, + []int{-13424, -6569, -12809, -6552}, + []int{3007, 16423, 3505, 17536}, + []int{11526, 19343, 12689, 19870}, + []int{-6927, 14710, -6145, 15013}, + []int{13108, 7721, 13398, 9005}, + []int{-13921, -9194, -13424, -8859}, + []int{4393, 20666, 6801, 20990}, + []int{18000, -18767, 18082, -18539}, + []int{-145, 18166, 300, 18654}, + []int{-2802, -18801, -1696, -18767}, + []int{6801, 18166, 7468, 18439}, + []int{-10193, -2767, -9890, -1044}, + []int{-3758, 6122, -3707, 6634}, + []int{-12130, 14710, -12089, 16478}, + []int{7468, 19112, 7601, 19343}, + []int{3832, -19431, 4393, -18539}, + []int{11022, 20150, 11526, 20990}, + []int{-14835, 13595, -14784, 14710}, + []int{5330, -5235, 6403, -5000}, + []int{12654, -14389, 12689, -14279}, + []int{15689, -14389, 16099, -13413}, + []int{-9573, -16734, -9448, -16655}, + []int{-17182, 17536, -16900, 17732}, + []int{-14535, -4004, -13921, -3649}, + []int{-7538, 9005, -6145, 9729}, + []int{-145, -9404, 518, -8859}, + []int{-10867, 1494, -10309, 2535}, + []int{12654, 5618, 12689, 6233}, + []int{-14992, 19886, -14835, 20990}, + []int{-3065, -6714, -2796, -6552}, + []int{-1445, 4785, -494, 4793}, + []int{-9161, -8859, -7786, -7636}, + []int{-14835, 10853, -14784, 12140}, + []int{-3707, -11138, -3596, -9469}, + []int{-19527, 10369, -19421, 10853}, + []int{13108, 12755, 13398, 13271}, + []int{-9803, -4197, -9161, -4004}, + []int{-494, -18801, -145, -18539}, + []int{7468, 1665, 8139, 2113}, + []int{-18015, -19878, -16393, -19539}, + []int{3007, 1258, 3505, 1494}, + []int{-3982, 9005, -3883, 9733}, + []int{-16326, 10212, -15861, 10359}, + []int{-9803, -15085, -9573, -14389}, + []int{-3707, 2113, -3065, 2535}, + []int{-15861, 16478, -15428, 17536}, + []int{-14835, 7825, -14535, 9729}, + []int{7328, 14471, 8035, 15013}, + []int{15884, -5235, 16099, -4004}, + []int{-12809, -19878, -11919, -19709}, + []int{4819, -4004, 5183, -3649}, + []int{-15861, 10359, -15428, 10728}, + []int{-2796, 803, -2015, 1118}, + []int{18000, -19142, 19584, -19141}, + []int{-6927, 9733, -6145, 10212}, + []int{569, 10039, 1080, 10212}, + []int{-3758, 19870, -3596, 20150}, + []int{2714, 20150, 3007, 20990}, + []int{16099, 11103, 16316, 11137}, + []int{1080, -6552, 1603, -4715}, + []int{-14470, 15308, -13424, 16862}, + []int{-18795, -3649, -17318, -3101}, + []int{3007, 6122, 3505, 6233}, + []int{-19800, 15013, -19523, 15784}, + []int{11012, 19112, 11526, 19343}, + []int{6728, 640, 6801, 1384}, + []int{-9840, -14279, -9828, -13365}, + []int{-13921, 14710, -13095, 15013}, + []int{-9803, 18166, -7899, 18439}, + []int{-4485, -17679, -3933, -17630}, + []int{-16393, 1384, -16326, 1494}, + []int{7081, 529, 7468, 640}, + []int{15884, 1494, 16099, 1771}, + []int{-145, -3895, 1080, -3101}, + []int{7328, -14828, 7601, -14389}, + []int{1080, 15784, 3505, 16423}, + []int{-3707, -9469, -2796, -9406}, + []int{13398, 5618, 13830, 5977}, + []int{-3596, 214, -3217, 529}, + []int{7328, 3858, 7468, 4263}, + []int{12654, -14568, 13108, -14389}, + []int{-9448, 6634, -9161, 7199}, + []int{-4485, -5462, -3933, -5000}, + []int{3007, 6233, 3621, 6634}, + []int{1603, 10369, 3007, 10400}, + []int{5757, 10865, 7029, 11137}, + []int{-14470, 1665, -13057, 1771}, + []int{-12951, 18166, -12809, 18439}, + []int{8935, 20150, 10646, 20990}, + []int{-18795, -11264, -18739, -11138}, + []int{18082, -11264, 19299, -11138}, + []int{7328, 15013, 7468, 15683}, + []int{-14992, 10728, -14470, 10853}, + []int{-12089, -1346, -11919, -1090}, + []int{1080, -19623, 1603, -19539}, + []int{-14535, 9585, -14470, 10039}, + []int{-11610, -14279, -10921, -13457}, + []int{-594, 15308, -494, 16423}, + []int{-3933, 4164, -3758, 4263}, + []int{14213, -390, 14668, 214}, + []int{7601, 13595, 8035, 14471}, + []int{11901, 15784, 12689, 16423}, + []int{300, 16862, 518, 19112}, + []int{-3217, 5076, -3065, 5977}, + []int{14804, -6714, 15689, -6569}, + []int{-10309, 4263, -7899, 4548}, + []int{-12748, -16113, -12160, -14568}, + []int{-3933, -17679, -2802, -17630}, + []int{-15236, 16478, -14992, 16862}, + []int{-5208, 1384, -5069, 2113}, + []int{-3933, -19431, -3883, -17791}, + []int{-19800, -7020, -19623, -6714}, + []int{-13057, 10865, -12160, 11103}, + []int{-494, -14389, 300, -14279}, + []int{13398, 12755, 13830, 13095}, + []int{19299, -16655, 19992, -16501}, + []int{-19623, 4548, -19527, 4771}, + []int{4881, 10359, 5266, 10400}, + []int{-594, 16423, -145, 16862}, + []int{-3707, 19112, -3217, 19870}, + []int{3832, -6714, 4969, -6569}, + []int{8139, -1977, 9781, -1346}, + []int{9781, 5618, 10246, 6233}, + []int{-1733, 14710, -1609, 15308}, + []int{15689, -4715, 15884, -3101}, + []int{11526, -9404, 11901, -9194}, + []int{10303, 19343, 10646, 19886}, + []int{5183, -3895, 6728, -3649}, + []int{-3883, -9404, -3217, -9194}, + []int{-18795, 19886, -18015, 20150}, + []int{-9448, 10728, -9161, 10865}, + []int{-16326, -3052, -15861, -2909}, + []int{14120, -5468, 14804, -5000}, + []int{10246, 10359, 10303, 10369}, + []int{-14535, 10039, -14470, 10728}, + []int{-12951, 214, -12748, 253}, + []int{-7538, -2909, -6927, -1977}, + []int{-594, -1044, -494, -654}, + []int{300, 1258, 518, 2113}, + []int{-3933, -16147, -3065, -16113}, + []int{1603, 6122, 1972, 7038}, + []int{-13417, 9005, -13057, 9585}, + []int{6801, -13457, 7081, -13365}, + []int{18082, -9654, 19159, -9469}, + []int{-14835, 15308, -14535, 15784}, + []int{7468, -1977, 7601, -1090}, + []int{10646, -11138, 11022, -9654}, + []int{-12130, 18654, -11919, 19112}, + []int{14213, 11137, 15241, 11785}, + []int{4393, 17536, 4819, 18166}, + []int{1080, 15683, 2714, 15784}, + []int{-5208, -6569, -3933, -6552}, + []int{1080, -4715, 1972, -3895}, + []int{10646, -9469, 11012, -7636}, + []int{-12089, 15013, -11919, 15061}, + []int{-17182, -19142, -16393, -19141}, + []int{-13095, 3970, -13057, 4771}, + []int{13830, 15784, 14120, 16423}, + []int{-9161, 1258, -7899, 1665}, + []int{-3883, 4785, -3758, 5076}, + []int{-5144, -6552, -5069, -5462}, + []int{-13424, -7020, -12130, -6714}, + []int{-2802, 1258, -2796, 1494}, + []int{19009, -6569, 19299, -6552}, + []int{19299, -18801, 19992, -18767}, + []int{5266, -14568, 5757, -14389}, + []int{-13417, -19623, -13095, -19431}, + []int{9781, -3649, 10246, -1044}, + []int{-1696, -9654, -594, -9469}, + []int{19084, -5462, 19159, -4715}, + []int{-1781, -18539, -1445, -17791}, + []int{-13057, 3858, -12960, 3970}, + []int{6801, -14389, 7328, -14279}, + []int{12689, 16423, 14120, 16478}, + []int{-11919, 10400, -11610, 11137}, + []int{-3982, 10865, -3933, 11103}, + []int{-10921, -3895, -10193, -3101}, + []int{-9890, -9404, -9840, -7020}, + []int{18000, -6569, 19009, -6552}, + []int{-1696, 12998, -1609, 13271}, + []int{-9890, 3858, -9840, 3970}, + []int{-10309, 1771, -10193, 2535}, + []int{-10921, 5977, -10867, 6634}, + []int{13830, -19878, 14100, -19709}, + []int{-13095, -14279, -13057, -13413}, + []int{10646, -19141, 11022, -18801}, + []int{18082, 19886, 19159, 20150}, + []int{-1445, 2535, -145, 3262}, + []int{518, -14828, 1603, -14279}, + []int{518, 8466, 2714, 9585}, + []int{12654, -11595, 13108, -11138}, + []int{16316, 19112, 16517, 20666}, + []int{-19800, -19141, -19623, -16655}, + []int{7081, 8909, 8139, 9005}, + []int{-12748, -17980, -12130, -17791}, + []int{-14784, -16147, -14470, -16113}, + []int{11012, 19343, 11022, 19808}, + []int{15689, 15784, 15884, 16423}, + []int{-17442, 9733, -17318, 10359}, + []int{11901, -19515, 13398, -19142}, + []int{17684, 6634, 18082, 7061}, + []int{-9840, -7636, -9828, -6714}, + []int{7601, -14828, 8035, -14704}, + []int{16099, 1258, 16316, 1665}, + []int{-14535, -14279, -14470, -13457}, + []int{-9828, 2535, -9803, 3858}, + []int{-2139, 17536, -1609, 17732}, + []int{-5144, -18801, -4681, -18767}, + []int{5757, 640, 6403, 803}, + []int{-594, 4771, -494, 4785}, + []int{-3982, 16862, -3883, 17536}, + []int{-18809, 3262, -18015, 3858}, + []int{-10309, -384, -9840, 214}, + []int{-12089, 6122, -11919, 7199}, + []int{3505, -11264, 3832, -11138}, + []int{-14784, 5977, -14535, 6122}, + []int{-9828, 18166, -9803, 18654}, + []int{11012, -3649, 11022, -3052}, + []int{-145, -19515, 569, -18801}, + []int{-6927, -14568, -5354, -13457}, + []int{7328, -9654, 8139, -9469}, + []int{-13057, 1665, -12960, 1771}, + []int{-15428, 10039, -15236, 10212}, + []int{6801, 5618, 7029, 5977}, + []int{-19527, 7199, -18795, 8466}, + []int{-13057, -11138, -12809, -9654}, + []int{569, 16478, 1080, 18166}, + []int{7601, -17630, 8035, -16113}, + []int{-2802, 19112, -2796, 19343}, + []int{-2139, -4197, -2015, -2909}, + []int{10246, 529, 10303, 640}, + []int{-15861, 4793, -15428, 6122}, + []int{14100, 5977, 14213, 6122}, + []int{7081, -5235, 7328, -5000}, + []int{19084, 10728, 19159, 10865}, + []int{518, 7825, 1080, 8466}, + []int{5330, 2535, 5757, 3262}, + []int{-16900, 15784, -16326, 16423}, + []int{-13921, -18767, -13424, -17791}, + []int{-17318, -14568, -17182, -14389}, + []int{15884, -6552, 16099, -5235}, + []int{-14835, 19112, -14470, 19870}, + []int{-15236, -6569, -14992, -6552}, + []int{-2802, 13271, -2796, 14710}, + []int{-5354, -16655, -5208, -16147}, + []int{14120, 10865, 14213, 11103}, + []int{-19800, 14710, -19527, 15013}, + []int{14213, -14704, 14668, -14568}, + []int{3007, 4548, 3505, 5618}, + []int{-3883, -19709, -3758, -19539}, + []int{-1696, 18439, -1609, 18654}, + []int{7081, 10212, 7328, 10369}, + []int{-594, 13271, -145, 13595}, + []int{-19623, 7038, -19527, 8466}, + []int{8968, 14710, 10246, 15061}, + []int{-13057, 3970, -12160, 4164}, + []int{3832, 6233, 4969, 7061}, + []int{-14470, 5977, -13921, 6122}, + []int{-1445, -390, -594, 214}, + []int{5266, 1258, 5757, 1494}, + []int{-3707, 7199, -3596, 7825}, + []int{-145, -18801, 1080, -18767}, + []int{10646, -13457, 11022, -11595}, + []int{-10309, 4164, -9840, 4263}, + []int{-14835, -19539, -14535, -19515}, + []int{1080, -17791, 2714, -16655}, + []int{5330, 640, 5757, 1118}, + []int{14804, -16147, 15241, -15085}, + []int{-4681, 1258, -3933, 1384}, + []int{-13057, -14568, -12160, -14389}, + []int{11022, -19431, 11526, -19141}, + []int{-12951, 640, -12130, 803}, + []int{-5208, 17169, -5144, 17732}, + []int{11526, -5000, 12654, -3101}, + []int{-13095, 13595, -12951, 14471}, + []int{3621, -2909, 3832, -2767}, + []int{-13057, 2535, -12160, 3262}, + []int{-1609, 15061, -1445, 15308}, + []int{-12130, -1944, -12089, -1346}, + []int{-5069, 253, -3883, 529}, + []int{-3217, -19539, -2015, -19515}, + []int{10303, -3649, 10646, -3052}, + []int{18082, 10359, 19009, 10400}, + []int{14804, 3970, 15241, 4263}, + []int{7468, 19808, 8035, 19870}, + []int{2714, -17630, 3007, -16655}, + []int{10646, 1258, 12654, 1384}, + []int{-18809, -6552, -18486, -5462}, + []int{-2015, 529, -1781, 1494}, + []int{-14470, 11137, -13921, 13095}, + []int{4393, -11595, 4819, -11264}, + []int{-494, 11785, -145, 12755}, + []int{-10921, -14389, -9840, -14279}, + []int{518, -8111, 569, -5468}, + []int{-2015, 10853, -1696, 11103}, + []int{2714, -15085, 3505, -14704}, + []int{7601, -19878, 8035, -19142}, + []int{13830, 5618, 14213, 5977}, + []int{1972, 19870, 3621, 19886}, + []int{13398, -19709, 14100, -19623}, + []int{8139, -3895, 8935, -3649}, + []int{-19800, -4715, -19527, -4004}, + []int{2714, -384, 3621, 253}, + []int{1972, 18166, 2714, 19343}, + []int{12689, 6122, 13108, 6233}, + []int{14668, -13365, 15241, -11264}, + []int{2714, -9406, 3621, -9404}, + []int{-12960, 14710, -12951, 15308}, + []int{15689, 16423, 15884, 16862}, + []int{4881, -718, 4969, -390}, + []int{-3883, -6569, -3758, -6552}, + []int{-10921, 4785, -10867, 5618}, + []int{-1781, -19623, -145, -19539}, + []int{-17442, 19808, -17182, 19870}, + []int{3007, 5618, 3505, 6122}, + []int{-494, -3052, 300, -2767}, + []int{4969, -6714, 5183, -6569}, + []int{4393, -18539, 4819, -17980}, + []int{-10867, 1384, -10309, 1494}, + []int{-14835, -9404, -14784, -8859}, + []int{4819, -4197, 5330, -4004}, + []int{-5144, -5000, -5069, -4715}, + []int{-5208, -4004, -5144, -3895}, + []int{18000, -3895, 18082, -3101}, + []int{-10309, -4004, -10193, -3895}, + []int{19084, 20150, 19159, 20666}, + []int{-13921, -4004, -13424, -3052}, + []int{4969, 253, 5266, 803}, + []int{-1733, -14568, -494, -14389}, + []int{6403, 10853, 6801, 10865}, + []int{19084, -11595, 19299, -11264}, + []int{-7786, 13595, -6927, 14471}, + []int{-12130, -3649, -12089, -1977}, + []int{17021, 13271, 17684, 14471}, + []int{-7786, 20150, -7538, 20990}, + []int{13830, -1044, 14100, -654}, + []int{-9573, 11103, -9161, 11785}, + []int{-13424, -6714, -13417, -6569}, + []int{-9803, -14389, -7786, -14279}, + []int{8935, 17169, 8968, 18166}, + []int{-19523, 19343, -18809, 19870}, + []int{-13424, 4785, -13417, 4793}, + []int{-19623, 5977, -19421, 6233}, + []int{1972, 19343, 2714, 19808}, + []int{-10921, -3052, -9890, -2909}, + []int{8935, 10039, 9781, 10359}, + []int{6728, -19141, 7029, -18801}, + []int{-19800, 5076, -19523, 5618}, + []int{-19800, 16862, -19623, 17169}, + []int{-19800, -3101, -19623, -3052}, + []int{-5208, -7636, -5144, -6569}, + []int{-10867, 6233, -10309, 6634}, + []int{8139, -11138, 9781, -9654}, + []int{-19623, 10212, -19523, 10359}, + []int{-19800, 8466, -19623, 8909}, + []int{-2139, 3858, -2015, 4164}, + []int{-3883, 20150, -3758, 20990}, + []int{15348, -9406, 15884, -9404}, + []int{8035, -14828, 8139, -14389}, + []int{8968, 16478, 10246, 18166}, + []int{-5354, -4197, -5208, -3895}, + []int{-1696, -9469, 300, -9406}, + []int{-19800, -19142, -19623, -19141}, + []int{-11919, 3262, -11610, 3858}, + []int{-18486, 15683, -17442, 16478}, + []int{-13417, -13457, -13095, -13413}, + []int{-19800, -19623, -19623, -19142}, + []int{-2139, -5235, -2015, -4197}, + []int{-10193, -2909, -9828, -2767}, + []int{4393, -390, 4969, -384}, + []int{13398, -19539, 14100, -19142}, + []int{-3758, 1258, -3065, 1384}, + []int{-19527, -718, -19523, -384}, + []int{-13095, 17169, -13057, 18166}, + []int{19009, -14568, 19084, -14389}, + []int{10246, -16501, 10646, -15085}, + []int{3007, 13595, 3505, 15013}, + []int{-5208, -14704, -5069, -14568}, + []int{-5144, 12140, -5069, 12755}, + []int{-17182, 10400, -16900, 10865}, + []int{-3217, -19141, -2139, -18801}, + []int{7081, 15061, 7328, 15308}, + []int{-19523, -4871, -19421, -4715}, + []int{5757, 19112, 6403, 19343}, + []int{-18015, 12998, -17442, 14471}, + []int{-2139, -16113, -1781, -14828}, + []int{17021, 5977, 18082, 6634}, + []int{-7786, -8859, -5354, -8111}, + []int{17021, 12755, 17684, 12998}, + []int{-12160, -16501, -12130, -16147}, + []int{6403, -16734, 6801, -16501}, + []int{19159, -9404, 19299, -8111}, + []int{19299, -8859, 19584, -6714}, + []int{15241, 10400, 15348, 10728}, + []int{-14992, -3052, -14835, -2909}, + []int{-19421, -18801, -18795, -17791}, + []int{-19800, -16655, -19623, -14828}, + []int{5757, -9654, 6403, -9404}, + []int{-594, -16147, -494, -14568}, + []int{-5069, 6634, -4918, 7038}, + []int{-17442, -6714, -17182, -5468}, + []int{7328, -9469, 8935, -9406}, + []int{19299, -5462, 19584, -5235}, + []int{4881, -11264, 4969, -9406}, + []int{-12809, -6714, -12748, -6552}, + []int{18000, -18539, 18082, -17630}, + []int{-1781, 214, -1733, 253}, + []int{-17442, 8909, -17318, 9005}, + []int{11526, -9194, 11901, -8859}, + []int{-10193, -19539, -9890, -19431}, + []int{-18486, 1384, -18015, 1494}, + []int{5183, 13271, 5266, 14710}, + []int{-19527, -14389, -19421, -11595}, + []int{-4485, -7636, -3883, -7020}, + []int{-12960, -2767, -12130, -1977}, + []int{8935, 10359, 8968, 11137}, + []int{-2796, -9469, -1781, -9406}, + []int{-5144, -17980, -5069, -17791}, + []int{-12130, 4263, -12089, 4548}, + []int{-1733, -9406, -1445, -9194}, + []int{-3883, 12998, -3707, 13095}, + []int{-9448, 11785, -9161, 12998}, + []int{-1733, 7721, 300, 7825}, + []int{3505, 3283, 3832, 3858}, + []int{-6145, 3858, -5208, 4164}, + []int{6801, 7825, 7029, 8466}, + []int{6801, -4197, 7081, -3895}, + []int{-7786, -11595, -7538, -9469}, + []int{-18464, 3970, -18015, 4164}, + []int{-3933, -16501, -3883, -16147}, + []int{4819, -3101, 4881, -3052}, + []int{-14992, 9733, -14835, 10400}, + []int{-14470, -19709, -13424, -19623}, + []int{-16326, 19886, -14992, 20150}, + []int{-3758, -19623, -3596, -19539}, + []int{1080, -3895, 1603, -3101}, + []int{-2796, 1665, -2015, 2113}, + []int{5757, 2535, 6403, 3858}, + []int{1080, -18539, 2714, -17791}, + []int{-14784, 14710, -13921, 15013}, + []int{-19623, -11264, -19421, -11138}, + []int{-18809, -11264, -18795, -11138}, + []int{7029, -5462, 7081, -5235}, + []int{-494, 18654, -145, 19343}, + []int{-12809, -384, -12748, 214}, + []int{-2796, -19431, -2015, -19142}, + []int{-16393, -14279, -15428, -13457}, + []int{6728, -19878, 7468, -19709}, + []int{6403, 10212, 7081, 10359}, + []int{-12951, -19141, -12748, -18539}, + []int{-494, 2113, -145, 2535}, + []int{-18739, 7721, -18015, 8466}, + []int{-9840, 1118, -9828, 1494}, + []int{7468, 529, 7601, 640}, + []int{14213, 7721, 14668, 8909}, + []int{-3982, 4771, -3933, 5076}, + []int{-2796, -5235, -2139, -4715}, + []int{19299, -11595, 19584, -9194}, + []int{-10867, -654, -10309, -384}, + []int{-13417, 13271, -13095, 14471}, + []int{-19623, 19112, -18809, 19343}, + []int{11526, -3101, 12689, -2909}, + []int{-13424, 19112, -13417, 20666}, + []int{-14835, -14704, -14784, -14568}, + []int{10303, -13413, 10646, -11595}, + []int{9781, -1044, 10646, -654}, + []int{-6927, 4771, -6145, 5076}, + []int{14668, -4197, 14804, -3895}, + []int{15348, 214, 15689, 1118}, + []int{-2139, 1118, -2015, 1258}, + []int{17021, -19709, 17684, -19539}, + []int{-2802, 3970, -2796, 4164}, + []int{13108, 15061, 13398, 16423}, + []int{-2802, -18767, -2796, -18539}, + []int{18000, -11264, 18082, -11138}, + []int{13108, 11103, 13398, 11785}, + []int{-10193, -654, -9890, -390}, + []int{-18795, -14828, -18739, -14568}, + []int{-1781, 7721, -1733, 8466}, + []int{18082, -14389, 19084, -14279}, + []int{-9573, -5299, -9448, -5235}, + []int{-12160, -19431, -12089, -19141}, + []int{19159, -6552, 19299, -5468}, + []int{6728, -19431, 7029, -19141}, + []int{-10921, -13365, -10867, -11730}, + []int{14100, -390, 14213, -384}, + []int{-18739, 253, -18486, 529}, + []int{-9161, -9469, -7899, -9404}, + []int{12689, -19878, 13398, -19623}, + []int{4969, 11137, 5330, 11785}, + []int{-16900, -13457, -15428, -13413}, + []int{-19623, 1384, -19523, 2113}, + []int{1603, 3283, 1972, 3970}, + []int{-18464, 16478, -17442, 17169}, + []int{-9840, 16862, -9803, 17732}, + []int{-3065, 803, -2802, 1118}, + []int{15241, -5468, 15348, -4715}, + []int{-5208, -9194, -5144, -8111}, + []int{19584, -14568, 19992, -13413}, + []int{-5208, -384, -5069, 214}, + []int{-2139, 2535, -2015, 3283}, + []int{-3707, -2767, -3596, -1944}, + []int{-5354, -19878, -5208, -19515}, + []int{-12960, 14471, -12951, 14710}, + []int{-7538, -13413, -6999, -11730}, + []int{8968, 1494, 9781, 2113}, + []int{-6927, -13413, -5208, -13365}, + []int{-4485, -3895, -3883, -3649}, + []int{8935, -18801, 8968, -18767}, + []int{13398, 8909, 14668, 9005}, + []int{-594, -654, -494, -390}, + []int{9781, 1384, 11012, 1494}, + []int{5757, -6552, 6403, -5468}, + []int{-10921, 10039, -10309, 10212}, + []int{-3065, 14710, -2796, 15013}, + []int{8968, 1384, 9781, 1494}, + []int{-12130, -19709, -11919, -19431}, + []int{-7786, 803, -7538, 1494}, + []int{-7538, 3953, -6999, 3970}, + []int{14120, -3052, 14804, -2909}, + []int{8139, 14471, 8935, 15683}, + []int{-5354, -6552, -5208, -5299}, + []int{-1445, 3953, -594, 4263}, + []int{-12748, -19142, -12160, -19141}, + []int{-19800, -1944, -19421, -1346}, + []int{19009, -13365, 19084, -11595}, + []int{3505, 10865, 4393, 11137}, + []int{-3758, -6552, -3596, -5468}, + []int{-12748, 11103, -11919, 11137}, + []int{-2802, 15308, -1733, 15683}, + []int{-10867, 10865, -9890, 11103}, + []int{-10921, 10400, -10867, 11103}, + []int{-16900, -6552, -16393, -5468}, + []int{-1733, 15308, -594, 15683}, + []int{-494, -2767, 300, -1044}, + []int{-145, -8859, 569, -8111}, + []int{10646, -7020, 11012, -6569}, + []int{-16900, -14279, -16393, -13457}, + []int{14668, 10369, 15241, 10400}, + []int{-18486, -5299, -18464, -5235}, + []int{18082, 18654, 19299, 19112}, + []int{13108, -654, 13398, -390}, + []int{-9573, 12755, -9448, 13095}, + []int{12654, 10212, 13108, 10400}, + []int{-13921, -11730, -13417, -11595}, + []int{-12809, 18439, -12130, 18654}, + []int{-10867, 5618, -10309, 5977}, + []int{7328, -1944, 7468, -1090}, + []int{-12089, 3283, -11919, 4164}, + []int{-5354, 529, -4918, 640}, + []int{-19623, 6634, -19527, 7038}, + []int{-12748, -16501, -12160, -16113}, + []int{3832, 7061, 4969, 7199}, + []int{1080, -390, 1603, 253}, + []int{-9803, 2535, -9448, 3858}, + []int{10646, -2909, 11012, -1977}, + []int{8935, 13595, 9781, 14471}, + []int{6403, -4197, 6728, -3895}, + []int{-3596, 9733, -3065, 10039}, + []int{14100, 5076, 14213, 5618}, + []int{-2344, 4785, -2015, 4793}, + []int{-13417, -4715, -12960, -4197}, + []int{-10921, -3101, -9890, -3052}, + []int{7468, -11138, 7601, -9654}, + []int{-9890, -7020, -9840, -6569}, + []int{-2015, -16734, -1781, -16655}, + []int{14213, 17536, 14668, 17732}, + []int{-494, 4771, -145, 4785}, + []int{-14835, 4548, -14784, 4771}, + []int{15348, -18767, 18000, -18539}, + []int{11022, 15784, 11526, 16423}, + []int{8968, -9654, 10246, -9469}, + []int{-3596, -3649, -2139, -3052}, + []int{7468, 4771, 8035, 5076}, + []int{-17442, -11595, -17182, -11264}, + []int{10646, -390, 11901, -384}, + []int{15348, -3052, 16517, -2909}, + []int{4393, -16113, 4819, -14828}, + []int{-5354, 3283, -5208, 3858}, + []int{7468, 17732, 8139, 18166}, + []int{-18464, -6552, -17442, -5468}, + []int{2714, 5618, 3007, 7721}, + []int{2714, 1665, 3007, 1771}, + []int{-19800, 17732, -19623, 18166}, + []int{-7899, -3895, -7786, -3052}, + []int{-7786, -5468, -7538, -5299}, + []int{5183, 4263, 5266, 5618}, + []int{-9840, -15085, -9803, -14279}, + []int{1972, 17169, 2714, 17536}, + []int{-6999, 4785, -6927, 4793}, + []int{-19623, 4793, -19523, 5076}, + []int{-19421, 3262, -18809, 3283}, + []int{-5069, 16478, -4681, 16862}, + []int{-18015, 1665, -17182, 1771}, + []int{-13921, 4771, -13417, 4785}, + []int{-12748, -19709, -12160, -19142}, + []int{15348, -3101, 15884, -3052}, + []int{-12160, -19539, -12130, -19515}, + []int{-9161, -1090, -5208, -1044}, + []int{7328, 4548, 7468, 5076}, + []int{6801, 10728, 7029, 10853}, + []int{8968, -14389, 9781, -14279}, + []int{-6927, -5468, -6145, -5462}, + []int{-11919, -5299, -11610, -5000}, + []int{-7538, 10039, -6999, 10359}, + []int{5266, 3953, 5757, 3970}, + []int{3832, 17169, 4393, 18166}, + []int{19299, 7825, 19992, 8466}, + []int{-12960, 3858, -12951, 3953}, + []int{7029, -11264, 7081, -9654}, + []int{5266, -5468, 5330, -5235}, + []int{-2139, 1258, -2015, 1494}, + []int{-18739, 15683, -18486, 16478}, + []int{10646, -3649, 11012, -3052}, + []int{-3217, -19515, -3065, -19431}, + []int{15689, -718, 16316, -654}, + []int{15689, -16734, 15884, -16501}, + []int{14668, 16862, 15241, 17732}, + []int{19584, 5076, 19992, 5977}, + []int{-15236, -8111, -14992, -7636}, + []int{-7786, -17679, -7538, -16655}, + []int{19159, -16734, 19584, -16655}, + []int{-6999, -14568, -6927, -14279}, + []int{9781, 15784, 10246, 16478}, + []int{7468, 10728, 7601, 12755}, + []int{8968, 19870, 10303, 20150}, + []int{-11610, 16862, -10193, 17169}, + []int{-19800, 13095, -19421, 13271}, + []int{-6145, 529, -5354, 640}, + []int{3832, 6122, 4819, 6233}, + []int{-13095, 14471, -12960, 15061}, + []int{-3933, -14279, -3758, -13457}, + []int{7081, 11785, 7468, 12998}, + []int{4881, -19515, 4969, -19141}, + []int{-16326, 12755, -15861, 13271}, + []int{-9828, -5235, -9448, -5000}, + []int{-11919, 9005, -10867, 9585}, + []int{-19800, -390, -19623, 214}, + []int{4881, 9733, 4969, 10359}, + []int{-14784, 7199, -13424, 7721}, + []int{1972, -18801, 3832, -18767}, + []int{10246, 8466, 10303, 8909}, + []int{-10193, 16862, -9890, 17169}, + []int{-2139, 10400, -2015, 10853}, + []int{-14535, 15308, -14470, 16423}, + []int{14120, 15784, 14668, 16478}, + []int{-3883, 529, -3758, 803}, + []int{-15236, -19142, -14992, -18801}, + []int{7468, -7636, 10303, -7020}, + []int{-4918, 15308, -4681, 16478}, + []int{-6999, 12998, -5354, 13095}, + []int{518, 16423, 569, 17732}, + []int{7029, -4715, 7081, -4197}, + []int{15884, 18439, 17684, 18654}, + []int{12689, -14389, 13108, -14279}, + []int{-16900, -3649, -16326, -3052}, + []int{-3217, 803, -3065, 1118}, + []int{11526, -13457, 11901, -13365}, + []int{-16393, -4197, -16326, -4004}, + []int{4881, 10400, 4969, 10853}, + []int{5266, 14710, 5330, 15061}, + []int{10303, -11595, 10646, -11138}, + []int{-18809, 15683, -18739, 15784}, + []int{-9448, -390, -9161, -384}, + []int{-1781, -1346, -1696, -654}, + []int{-11919, -4715, -11610, -3895}, + []int{-3707, 12140, -3596, 12755}, + []int{-15861, -19539, -15428, -19515}, + []int{19299, 4263, 19584, 4771}, + []int{-5144, -19431, -4485, -19142}, + []int{-6927, 10212, -6145, 11103}, + []int{18000, -13365, 18082, -11730}, + []int{-2015, -14279, -1781, -11264}, + []int{19159, -19623, 19992, -19539}, + []int{-13921, 640, -13417, 803}, + []int{-13921, -14568, -13424, -14279}, + []int{12654, -16734, 13398, -16655}, + []int{-9840, -6714, -9828, -6569}, + []int{-12160, 10359, -12130, 10369}, + []int{14804, -5299, 15241, -4871}, + []int{-9161, -18539, -7899, -17630}, + []int{-16393, -5235, -15428, -5000}, + []int{-13057, -17630, -12960, -16655}, + []int{1972, 19808, 2714, 19870}, + []int{-3065, 5076, -2802, 5977}, + []int{-11610, 10369, -10867, 10400}, + []int{-5144, -14389, -4681, -14279}, + []int{6403, 16862, 6728, 17536}, + []int{4969, 7825, 5330, 8909}, + []int{569, 15683, 1080, 16423}, + []int{7468, 5618, 7601, 6233}, + []int{3505, -16734, 4393, -16655}, + []int{8139, -3649, 9781, -3101}, + []int{10646, 10853, 11022, 10865}, + []int{-12951, -6714, -12809, -6569}, + []int{-2802, 5076, -2344, 5618}, + []int{-14470, -3101, -13921, -3052}, + []int{2714, -6714, 3832, -6569}, + []int{4881, 16423, 5757, 16478}, + []int{7029, 7825, 7081, 8909}, + []int{19584, -16501, 19992, -14828}, + []int{7601, 11785, 8035, 13095}, + []int{-19623, -11138, -19523, -9654}, + []int{-5144, 19343, -5069, 19870}, + []int{19159, 13095, 19992, 13271}, + []int{-4485, -9406, -3982, -8859}, + []int{-12160, 2535, -12130, 3262}, + []int{-9803, -1346, -9573, -1090}, + []int{-14784, -4197, -14535, -3649}, + []int{-9448, -14279, -7899, -13457}, + []int{10246, -15085, 11022, -14828}, + []int{4393, 3970, 4881, 4263}, + []int{-6999, 16423, -5208, 16478}, + []int{-9828, 10369, -9803, 10400}, + []int{10646, -654, 11526, -390}, + []int{-9890, -5468, -9828, -5299}, + []int{-19623, 18439, -19523, 18654}, + []int{-12130, -4004, -12089, -3649}, + []int{15884, -6569, 18000, -6552}, + []int{14120, 1118, 14804, 1384}, + []int{14804, 16423, 15689, 16862}, + []int{-1733, 11103, -1696, 11785}, + []int{-9890, -1090, -9840, -1044}, + []int{-12748, -718, -12160, 529}, + []int{-18015, 10865, -17318, 11103}, + []int{-5144, -14568, -5069, -14389}, + []int{-19421, 1665, -18809, 2113}, + []int{-16326, 3283, -15236, 3858}, + []int{-5069, 19343, -4485, 19870}, + []int{19584, 640, 19992, 803}, + []int{-9840, -4004, -9828, -3649}, + []int{19159, 3262, 19299, 3283}, + []int{-3758, -3052, -3707, -2767}, + []int{-3707, 3262, -3596, 4263}, + []int{-3933, 8466, -3758, 9005}, + []int{-3707, -16734, -2796, -16655}, + []int{4819, 20150, 5183, 20666}, + []int{-6927, -2767, -5354, -1977}, + []int{518, 20666, 1080, 20990}, + []int{7328, 8466, 7601, 8909}, + []int{11012, 18654, 11526, 19112}, + []int{8968, -16655, 9781, -16501}, + []int{-9448, 12998, -9161, 13095}, + []int{-9840, 10212, -9803, 10359}, + []int{-9840, -5000, -9573, -4715}, + []int{7029, -3101, 7328, -2909}, + []int{10246, -3052, 10646, -1977}, + []int{-5354, 5618, -5208, 6233}, + []int{9781, 10039, 10646, 10212}, + []int{-7538, 9729, -6999, 9733}, + []int{-14835, 803, -14784, 1258}, + []int{569, 6122, 1603, 6233}, + []int{11526, -19142, 12654, -19141}, + []int{-12160, 4771, -12089, 4785}, + []int{-9840, 4548, -9828, 4771}, + []int{-14784, -14704, -14535, -14568}, + []int{8968, 2535, 9781, 3858}, + []int{-4918, -9406, -4681, -9194}, + []int{19299, 19886, 19584, 20150}, + []int{-7786, 12140, -7538, 13095}, + []int{-5354, -6569, -5208, -6552}, + []int{10246, 13095, 10303, 13595}, + []int{6801, -6552, 7029, -5468}, + []int{8035, 4785, 8935, 5076}, + []int{19299, 7721, 19992, 7825}, + []int{-16900, 1771, -16326, 2113}, + []int{8139, 8909, 8935, 9005}, + []int{-14992, -3895, -14835, -3101}, + []int{19584, -8859, 19992, -7020}, + []int{-12960, 4771, -12748, 4785}, + []int{-4485, -2909, -3933, -2767}, + []int{-5354, -19515, -4918, -19431}, + []int{8035, -19515, 8139, -19141}, + []int{3505, -1944, 3621, -1090}, + []int{-9573, 17169, -7899, 17732}, + []int{-14992, -7020, -14835, -5462}, + []int{4969, -3052, 5183, -2909}, + []int{-14470, -9469, -13095, -9406}, + []int{-2139, 10865, -2015, 11137}, + []int{-12089, 16862, -11919, 18166}, + []int{13398, -19623, 13830, -19539}, + []int{5266, -6569, 5757, -6552}, + []int{12689, 10400, 13108, 10853}, + []int{4819, -718, 4881, -390}, + []int{-18809, -19142, -18464, -19141}, + []int{-13921, 19343, -13424, 19886}, + []int{11012, 9733, 11901, 10039}, + []int{-4918, 1771, -3982, 2113}, + []int{-3065, 9733, -2802, 10212}, + []int{-3217, -654, -2796, -390}, + []int{1080, 7825, 3007, 8466}, + []int{7468, 18166, 8968, 18439}, + []int{5183, 1384, 5266, 1494}, + []int{-13921, 3283, -13424, 3970}, + []int{13108, -15085, 13830, -14828}, + []int{16517, -9654, 17684, -9469}, + []int{7468, -4871, 7601, -4004}, + []int{-18015, 7825, -17442, 8466}, + []int{1972, 6122, 2714, 6233}, + []int{-11919, 19870, -10921, 19886}, + []int{-14535, -14704, -13921, -14568}, + []int{9781, 2113, 10246, 3262}, + []int{-14535, 640, -13921, 803}, + []int{-15861, -13413, -15428, -11730}, + []int{8968, -17679, 10246, -16655}, + []int{17021, -7636, 17684, -6714}, + []int{-19523, 3262, -19421, 3283}, + []int{-16393, -6552, -16326, -5468}, + []int{2714, 1771, 3007, 3262}, + []int{11012, 8466, 11022, 9005}, + []int{1080, 9585, 1603, 10039}, + []int{300, 15683, 569, 15784}, + []int{15689, 640, 16099, 803}, + []int{300, -14389, 518, -14279}, + []int{5183, 5977, 5266, 6233}, + []int{-2015, -7020, -1696, -6714}, + []int{11901, 9733, 12654, 10212}, + []int{-18739, 10369, -18486, 10728}, + []int{-6999, 1384, -6927, 1494}, + []int{7468, -19431, 7601, -19141}, + []int{-5069, 7061, -4681, 7199}, + []int{-1696, 12755, -1609, 12998}, + []int{-1445, -654, -594, -390}, + []int{8139, 17536, 8935, 17732}, + []int{-3065, -4715, -2139, -3895}, + []int{-19523, -17630, -19421, -16655}, + []int{1603, -18801, 1972, -18767}, + []int{15884, 9729, 18000, 9733}, + []int{-14784, -718, -14470, -654}, + []int{-3933, -5462, -3883, -5000}, + []int{3832, -14568, 4819, -14389}, + []int{-12089, -19142, -11610, -19141}, + []int{-14992, -16113, -14470, -14704}, + []int{4969, 11785, 5266, 12755}, + []int{11012, 1494, 11526, 1771}, + []int{8139, 19886, 8968, 20150}, + []int{-18809, 18166, -18795, 18439}, + []int{-5208, -14568, -5144, -14389}, + []int{569, -7020, 1080, -6569}, + []int{-14470, 7721, -13921, 7825}, + []int{-1445, -16655, -494, -16501}, + []int{-13057, 2113, -12160, 2535}, + []int{11022, -13457, 11526, -13365}, + []int{-5144, 6634, -5069, 7038}, + []int{-3982, 8909, -3933, 9005}, + []int{6801, -14279, 7081, -13457}, + []int{-3707, 214, -3596, 640}, + []int{-9573, -390, -9448, -384}, + []int{13830, 7038, 14100, 7061}, + []int{11012, 16423, 11526, 16478}, + []int{-10193, -16147, -9890, -16113}, + []int{5183, 1118, 5266, 1384}, + []int{-12809, -5000, -12160, -4871}, + []int{-18464, 20666, -18015, 20990}, + []int{5757, -14568, 6403, -14389}, + []int{-12130, 18439, -11919, 18654}, + []int{-2139, -2909, -1781, -2767}, + []int{-6145, -16147, -5208, -15085}, + []int{10303, 214, 10646, 640}, + []int{19159, 19112, 19299, 19808}, + []int{-14535, 3283, -14470, 3858}, + []int{-9890, 19343, -9840, 19808}, + []int{13398, -5000, 13830, -4197}, + []int{19084, 2113, 19159, 3262}, + []int{16316, 18166, 17684, 18439}, + []int{-9573, 7721, -7538, 7825}, + []int{-17182, -16655, -17180, -16501}, + []int{11022, -18801, 11526, -16734}, + []int{4969, -1977, 5183, -1944}, + []int{-12960, 3953, -12748, 3970}, + []int{11526, 18439, 12654, 18654}, + []int{-19623, -390, -19527, 214}, + []int{-14470, -16734, -13921, -16655}, + []int{-5208, -18801, -5144, -17980}, + []int{17021, 7721, 17684, 7825}, + []int{-2139, 17732, -1733, 18654}, + []int{7328, 17732, 7468, 18166}, + []int{-12809, -18539, -12748, -17630}, + []int{15241, -3649, 15689, -3101}, + []int{-16326, -11595, -15861, -11138}, + []int{-1609, 14710, -1445, 15013}, + []int{-12960, -18539, -12809, -17980}, + []int{-9573, 10400, -9161, 10728}, + []int{-18464, 20150, -18015, 20666}, + []int{-19523, 18654, -18809, 19112}, + []int{-17318, -11730, -16900, -11595}, + []int{12689, 3283, 13398, 4164}, + []int{4819, -18539, 4881, -17980}, + []int{-13417, 7825, -13057, 8466}, + []int{-13095, 1384, -12960, 1494}, + []int{-9803, 10359, -9573, 10728}, + []int{7081, -17791, 7328, -16147}, + []int{-4918, 1258, -4681, 1384}, + []int{10646, -16501, 11526, -16147}, + []int{3621, -5468, 3832, -5462}, + []int{14804, -11264, 15241, -11138}, + []int{-14992, -14704, -14835, -14568}, + []int{-17318, -13365, -16900, -11730}, + []int{16316, -1944, 16517, -1346}, + []int{-9828, -384, -9573, 214}, + []int{3621, -19431, 3832, -19141}, + []int{-15428, 10212, -14992, 10728}, + []int{-14992, 1258, -14835, 1384}, + []int{14100, -384, 14120, 214}, + []int{15348, -9404, 15884, -8111}, + []int{19584, -7020, 19992, -6569}, + []int{1603, 3970, 1972, 4164}, + []int{-13057, -17980, -12809, -17791}, + []int{-11919, 2535, -11610, 3262}, + []int{-1781, 11103, -1733, 11137}, + []int{6728, 19870, 7601, 19886}, + []int{-19523, -6714, -19421, -6569}, + []int{-17442, 13271, -17318, 13595}, + []int{-1696, 14471, -1445, 14710}, + []int{-7786, -9469, -7538, -9406}, + []int{6801, -18767, 7081, -17980}, + []int{3505, -19878, 3621, -19539}, + []int{-12809, 15061, -12748, 15308}, + []int{-18795, -1044, -18486, -718}, + []int{7468, -5000, 7601, -4871}, + []int{-1609, -718, -594, -654}, + []int{16316, 14710, 17021, 15013}, + []int{7029, 214, 7328, 253}, + []int{15348, -18801, 15689, -18767}, + []int{-3883, -9406, -3707, -9404}, + []int{11526, -6714, 11901, -6569}, + []int{-9803, 19886, -9448, 20150}, + []int{-1609, 15013, -1445, 15061}, + []int{-12089, 4164, -11919, 4548}, + []int{-3065, -9406, -2802, -8111}, + []int{-7538, -5462, -5354, -5299}, + []int{-5208, 5618, -5069, 6122}, + []int{-494, 10853, -145, 11103}, + []int{3007, -3052, 3505, -2909}, + []int{-14835, 14710, -14784, 15061}, + []int{4393, 9729, 4819, 10039}, + []int{10646, -1044, 11012, -654}, + []int{8139, 11103, 8935, 11137}, + []int{-12160, 4548, -12089, 4771}, + []int{4969, 18166, 5266, 18439}, + []int{-3707, 640, -3596, 803}, + []int{-5354, -14704, -5208, -14389}, + []int{300, 3283, 1603, 3953}, + []int{-5354, 7038, -5208, 7061}, + []int{6801, -3895, 7081, -3649}, + []int{-19527, -18539, -19523, -17980}, + []int{1603, -7020, 1972, -6714}, + []int{-9890, 9729, -9840, 9733}, + []int{11526, 10853, 11901, 11103}, + []int{6801, 20150, 7328, 20990}, + []int{-9840, -5235, -9828, -5000}, + []int{-14535, 9005, -13921, 9585}, + []int{2714, 8466, 3007, 9005}, + []int{-12089, 4548, -11919, 4771}, + []int{-16900, 19808, -16393, 19886}, + []int{6801, -3649, 7081, -3101}, + []int{-7786, 1494, -7538, 1665}, + []int{-15861, -19623, -15428, -19539}, + []int{-15428, -1346, -15236, -654}, + []int{-18795, -7636, -18739, -7020}, + []int{14804, -9469, 15348, -8111}, + []int{15241, 10369, 15348, 10400}, + []int{10246, 17732, 11012, 18166}, + []int{-19800, 1771, -19623, 2113}, + []int{-17182, 6122, -17180, 6634}, + []int{5266, 11785, 5757, 12140}, + []int{3621, -16655, 3832, -16501}, + []int{-16326, -3101, -15861, -3052}, + []int{-1696, 10369, -1609, 11103}, + []int{-2802, -19431, -2796, -19142}, + []int{-10309, 18166, -10193, 18654}, + []int{4969, 10400, 5183, 10853}, + []int{-16393, -3895, -15861, -3649}, + []int{-19800, 17169, -19623, 17732}, + []int{-3596, -11138, -3217, -9469}, + []int{-19523, 1665, -19421, 1771}, + []int{17684, 9585, 18000, 9729}, + []int{-13921, 11785, -13424, 12998}, + []int{-145, -4004, 518, -3895}, + []int{13398, -3052, 13830, -2767}, + []int{14100, 20666, 14120, 20990}, + []int{15348, 19886, 15884, 20150}, + []int{-6145, 4793, -5354, 6233}, + []int{-6999, -19515, -6145, -19431}, + []int{19159, 10865, 19299, 11103}, + []int{-7538, -19431, -6999, -18539}, + []int{10303, 8466, 11012, 8909}, + []int{-14470, 8466, -13921, 9005}, + []int{-19421, 13095, -18486, 13271}, + []int{-7899, 12998, -7786, 13095}, + []int{-9573, -9654, -7899, -9469}, + []int{-14784, -14279, -14535, -13457}, + []int{12689, 4548, 13398, 4771}, + []int{10303, 19886, 10646, 20150}, + []int{-9573, 10728, -9448, 10853}, + []int{-19800, 18166, -19523, 18439}, + []int{15348, -16734, 15689, -16655}, + []int{-2015, 214, -1781, 253}, + []int{-15236, -5468, -14992, -5299}, + []int{-9828, 7721, -9803, 9005}, + []int{-9573, 10039, -9448, 10359}, + []int{7468, 2113, 8139, 2535}, + []int{-3217, -14279, -3065, -11264}, + []int{13830, 8466, 14120, 8909}, + []int{15241, 2113, 15348, 2535}, + []int{-5144, 17169, -5069, 17536}, + []int{14100, -17791, 14120, -17630}, + []int{13108, 13271, 13398, 15061}, + []int{14804, -4871, 15241, -4715}, + []int{-17180, -1090, -16900, -1044}, + []int{5330, -6552, 5757, -5468}, + []int{-12960, -1044, -12160, -718}, + []int{4819, -5235, 4881, -5000}, + []int{-14835, 1384, -14784, 2113}, + []int{-3707, 9733, -3596, 10039}, + []int{569, 9729, 1080, 10039}, + []int{-13057, -2767, -12960, -1977}, + []int{3832, 9729, 4393, 10039}, + []int{1603, -18767, 3832, -18539}, + []int{-12809, -11138, -12748, -9654}, + []int{7081, -5462, 7328, -5299}, + []int{-3217, 1118, -2796, 1258}, + []int{17021, 11137, 17684, 11785}, + []int{18082, -13365, 19009, -11264}, + []int{-13921, -9406, -13424, -9404}, + []int{-9161, 17732, -7899, 18166}, + []int{-16326, -19431, -15428, -19142}, + []int{1972, 19886, 2714, 20990}, + []int{-3596, 19886, -3217, 20990}, + []int{-9890, 9733, -9840, 10212}, + []int{13830, -14828, 14100, -14568}, + []int{-9161, -5299, -7538, -5235}, + []int{7029, -8859, 7328, -8111}, + []int{-17318, 15683, -16393, 15784}, + []int{14804, -19142, 15689, -19141}, + []int{-6999, -19878, -6145, -19709}, + []int{19299, 7199, 19992, 7721}, + []int{10303, 8909, 10646, 9005}, + []int{-19421, -1977, -18795, -1944}, + []int{-1781, -17791, -1696, -17679}, + []int{18000, -4004, 19084, -3895}, + []int{-14992, 10400, -14535, 10728}, + []int{14120, 10369, 14668, 10400}, + []int{-14992, -13457, -14835, -11730}, + []int{15884, 19886, 16099, 20150}, + []int{11012, -16147, 11022, -15085}, + []int{-19523, 15683, -18809, 15784}, + []int{-19623, -19709, -19527, -19623}, + []int{5757, 3953, 6728, 3970}, + []int{-13095, -4197, -13057, -4004}, + []int{-16393, 16423, -16326, 17169}, + []int{-7899, -7636, -7786, -7020}, + []int{5266, 13095, 5330, 14710}, + []int{-12960, 7825, -12809, 8466}, + []int{19159, 640, 19299, 803}, + []int{-1609, 7825, -494, 8466}, + []int{5330, 13595, 6403, 14471}, + []int{12689, -6569, 13108, -5468}, + []int{-14784, 16423, -14470, 16862}, + []int{-13057, 9585, -12960, 10212}, + []int{-16900, -654, -16393, 253}, + []int{3621, 6122, 3832, 6634}, + []int{569, -19878, 1080, -19623}, + []int{4969, 1771, 5757, 2113}, + []int{-145, 15308, 300, 15683}, + []int{14668, 19112, 14804, 19886}, + []int{2714, 15061, 3505, 15308}, + []int{-5354, 6233, -5144, 6634}, + []int{6728, 5618, 6801, 5977}, + []int{10303, -9194, 10646, -7636}, + []int{-15428, 6122, -15236, 6233}, + []int{300, 6122, 569, 6634}, + []int{4393, -1977, 4819, -1944}, + []int{4969, -718, 5183, -654}, + []int{518, 3953, 1603, 4164}, + []int{11012, 10865, 11022, 11785}, + []int{-9840, 3283, -9828, 3858}, + []int{8139, -3101, 9781, -3052}, + []int{18000, -13413, 18082, -13365}, + []int{-18464, 12998, -18015, 13095}, + []int{-17182, -384, -17180, 253}, + []int{-17442, -16655, -17182, -16501}, + []int{-2802, 9733, -2796, 10212}, + []int{14120, -19142, 14804, -19141}, + []int{5183, 3970, 5266, 4263}, + []int{-6145, 4785, -5354, 4793}, + []int{-12809, 12755, -12748, 12998}, + []int{12654, 15013, 12689, 15308}, + []int{-18464, 4263, -18015, 4548}, + []int{19584, 9729, 19992, 9733}, + []int{9781, -11264, 10246, -11138}, + []int{-3596, -4004, -3217, -3895}, + []int{7468, 12755, 7601, 13595}, + []int{12654, 3953, 12689, 4164}, + []int{1972, -5299, 2714, -5235}, + []int{-17180, -384, -16900, 253}, + []int{11901, 16423, 12654, 16862}, + []int{-13057, -8111, -12960, -7636}, + []int{-12160, -19709, -12130, -19539}, + []int{10246, -5235, 10303, -5000}, + []int{-5354, -14389, -5144, -14279}, + []int{-6145, -5468, -5354, -5462}, + []int{-2796, -3895, -2139, -3649}, + []int{-12960, -13457, -12089, -13413}, + []int{-9840, 10039, -9803, 10212}, + []int{300, 7061, 518, 7721}, + []int{-13095, -1090, -13057, -1044}, + []int{-6927, -19142, -5354, -19141}, + []int{300, 6634, 1603, 7038}, + []int{-6145, -14828, -5208, -14704}, + []int{-7899, -17679, -7786, -17630}, + []int{-5208, 6634, -5144, 7038}, + []int{-10309, -654, -10193, -384}, + []int{-12960, 17536, -12809, 18166}, + []int{13398, 4771, 13830, 4793}, + []int{-5208, -4197, -5144, -4004}, + []int{3007, -17630, 4393, -16734}, + []int{-1733, -9654, -1696, -9469}, + []int{-9448, 18439, -7899, 18654}, + []int{17021, -2909, 17684, -1977}, + []int{5183, 10400, 5266, 10728}, + []int{-12960, 3283, -12951, 3858}, + []int{7328, 5076, 7468, 5977}, + []int{-3065, -5000, -2802, -4715}, + []int{8035, -11138, 8139, -9654}, + []int{4819, -11595, 4881, -11264}, + []int{7468, -14279, 7601, -11595}, + []int{14668, -390, 15241, 214}, + []int{-145, 4771, 300, 5977}, + []int{-2344, -19515, -2015, -19431}, + []int{-1696, 18166, -1609, 18439}, + []int{-14784, 1665, -14470, 1771}, + []int{-18795, -5000, -18739, -4871}, + []int{-15428, -19141, -15236, -18801}, + []int{-6999, -5468, -6927, -5462}, + []int{-18809, -19141, -18486, -18801}, + []int{7468, 1384, 7601, 1665}, + []int{-9448, -5299, -9161, -5235}, + []int{19299, 8466, 19584, 8909}, + []int{-19523, -14568, -19421, -14389}, + []int{3505, -19539, 3621, -19515}, + []int{5266, 1118, 5757, 1258}, + []int{-12160, -6714, -10921, -6569}, + []int{5330, -11264, 5757, -9654}, + []int{19584, -19142, 19992, -19141}, + []int{-9161, -1346, -7786, -1090}, + []int{7601, -4197, 8035, -4004}, + []int{4393, -19431, 4881, -19141}, + []int{-11919, 16862, -11610, 17169}, + []int{11022, -11138, 11526, -9654}, + []int{7081, -11264, 7601, -11138}, + []int{-18739, -7636, -18464, -7020}, + []int{-3933, -17791, -3883, -17679}, + []int{-19623, -3895, -19523, -3649}, + []int{-14835, -5235, -14784, -5000}, + []int{9781, -9469, 10246, -9406}, + []int{-494, 15784, -145, 16423}, + []int{-3933, 18166, -3758, 18439}, + []int{-18015, 20150, -17442, 20990}, + []int{-11919, -11264, -11610, -9654}, + []int{-4918, 4548, -4485, 4771}, + []int{-17180, -19141, -16900, -17679}, + []int{-4681, 9733, -4485, 10039}, + []int{-17180, 16423, -16393, 17169}, + []int{-3065, 1258, -2802, 1384}, + []int{7081, -14279, 7468, -13365}, + []int{-1609, -1090, -1445, -718}, + []int{-3883, 1258, -3758, 1384}, + []int{-17318, -8859, -17182, -8111}, + []int{-11610, 6233, -10921, 6634}, + []int{-7899, -14279, -7786, -13457}, + []int{-4485, 19343, -3933, 19870}, + []int{-19527, -17630, -19523, -16734}, + []int{-3758, 7061, -3596, 7199}, + []int{12689, -9469, 13108, -9406}, + []int{3505, -390, 3621, -384}, + []int{-12130, -1346, -12089, -1090}, + []int{1080, 6233, 1603, 6634}, + []int{-9890, 3283, -9840, 3858}, + []int{-9828, 7199, -9803, 7721}, + []int{11012, 1771, 11526, 2113}, + []int{11526, 15784, 11901, 16423}, + []int{300, 3953, 518, 3970}, + []int{-14470, -14279, -13095, -13457}, + []int{9781, -18767, 10246, -17679}, + []int{-9890, 4548, -9840, 4785}, + []int{-13057, -6552, -12960, -5235}, + []int{-2139, -1944, -1781, -1346}, + []int{-18739, -5462, -18486, -5299}, + []int{11901, 14710, 12654, 15013}, + []int{569, 12140, 1603, 12755}, + []int{-3217, -9406, -3065, -9194}, + []int{4393, -16734, 4969, -16655}, + []int{-2015, -9406, -1781, -9194}, + []int{6801, 8466, 7029, 9005}, + []int{11526, 10369, 12654, 10400}, + []int{-4681, -4197, -4485, -3895}, + []int{3832, -14704, 4393, -14568}, + []int{5757, 10853, 6403, 10865}, + []int{300, 7038, 518, 7061}, + []int{-12130, 4785, -12089, 4793}, + []int{-13424, -9406, -13417, -9404}, + []int{569, 10212, 1603, 10359}, + []int{-14470, -9654, -13095, -9469}, + []int{12654, 6634, 12689, 7038}, + []int{-19623, -9406, -19527, -9404}, + []int{9781, 10212, 10646, 10359}, + []int{-9840, 9729, -9828, 10039}, + []int{-19623, -9404, -19527, -9194}, + []int{-13417, -11138, -13057, -9654}, + []int{-3065, -14389, -2802, -14279}, + []int{6403, -3101, 6728, -3052}, + []int{-5354, 803, -5208, 1494}, + []int{-13095, 3953, -13057, 3970}, + []int{-11919, 15013, -10921, 15061}, + []int{11526, -1044, 12654, -718}, + []int{-1733, -5299, -1696, -5235}, + []int{-16326, 9729, -15861, 10039}, + []int{-145, -19623, 518, -19515}, + []int{-4681, 11137, -4485, 12140}, + []int{-17442, -19141, -17318, -18801}, + []int{-11919, -9654, -11610, -9469}, + []int{-19523, -1977, -19421, -1944}, + []int{3505, 3262, 3832, 3283}, + []int{-16900, 17536, -15236, 17732}, + []int{-5354, -5299, -5208, -5235}, + []int{-14784, 11103, -14470, 11785}, + []int{15884, 18166, 16316, 18439}, + []int{12689, 19343, 13108, 19808}, + []int{-19523, 8466, -19421, 9005}, + []int{3505, 14471, 3621, 15013}, + []int{4969, 2535, 5266, 3262}, + []int{-13095, -17791, -12951, -17679}, + []int{-2015, 253, -1781, 529}, + []int{19584, -13413, 19992, -11264}, + []int{-2015, 11785, -1733, 12755}, + []int{-5208, -8111, -5144, -7636}, + []int{19299, 20150, 19584, 20666}, + []int{-1781, -16655, -1733, -16501}, + []int{-13417, 4793, -13095, 5977}, + []int{-3758, 15784, -3707, 16862}, + []int{-19800, 18439, -19623, 19808}, + []int{-12089, 18166, -11919, 18439}, + []int{-13417, 18166, -13095, 18439}, + []int{-12089, -19431, -11610, -19142}, + []int{5183, 14710, 5266, 15013}, + []int{11022, 5977, 12654, 6122}, + []int{-594, -4197, -494, -4004}, + []int{13398, -16734, 14100, -16655}, + []int{-7538, 16478, -6999, 16862}, + []int{18000, -17630, 18082, -16734}, + []int{5757, 10212, 6403, 10359}, + []int{3505, -5468, 3621, -5462}, + []int{-3933, -6569, -3883, -6552}, + []int{-2796, -5299, -2344, -5235}, + []int{-16326, 13271, -15861, 14471}, + []int{-5354, 4548, -5144, 4771}, + []int{2714, 3283, 3007, 3858}, + []int{-12160, 20666, -12089, 20990}, + []int{-7899, -3052, -7786, -2909}, + []int{-16900, 10853, -16326, 10865}, + []int{-10193, -13413, -9890, -11264}, + []int{569, -6569, 1603, -6552}, + []int{-13921, -18801, -13424, -18767}, + []int{-4918, 4771, -4485, 4785}, + []int{-12809, 14710, -12748, 15061}, + []int{6801, 10853, 7081, 10865}, + []int{3505, 10369, 3621, 10853}, + []int{-17442, 15683, -17318, 15784}, + []int{-14784, 10853, -14535, 10865}, + []int{18082, 15013, 19084, 15061}, + []int{19159, 15013, 19299, 15061}, + []int{-3758, -2767, -3707, -1977}, + []int{7029, 5618, 7328, 5977}, + []int{-7899, 1494, -7786, 1665}, + []int{-11919, 10039, -10921, 10212}, + []int{11526, -654, 13108, -390}, + []int{15241, -11595, 15348, -11138}, + []int{7468, 5076, 7601, 5618}, + []int{4969, -14568, 5183, -14389}, + []int{-18464, -14828, -17442, -14704}, + []int{-14835, 7199, -14784, 7825}, + []int{14213, 7199, 15689, 7721}, + []int{8968, 6634, 9781, 7038}, + []int{1080, 20666, 1972, 20990}, + []int{16517, 6233, 17021, 6634}, + []int{-17180, 6233, -16900, 7038}, + []int{15884, 4164, 16099, 4263}, + []int{-145, 19112, 518, 19808}, + []int{14100, 10728, 14120, 11103}, + []int{-16326, 14710, -15861, 15308}, + []int{-10193, 3858, -9890, 3970}, + []int{-12089, -4004, -11919, -3895}, + []int{-12809, 6122, -12748, 6233}, + []int{7468, 15013, 8139, 15061}, + []int{17021, -19878, 17684, -19709}, + []int{-12089, 4771, -11919, 4793}, + []int{-19623, -14568, -19527, -13457}, + []int{-18739, 7199, -18486, 7721}, + []int{19584, -19539, 19992, -19515}, + []int{11526, -19431, 11901, -19142}, + []int{7081, -14828, 7328, -14704}, + []int{7601, -14704, 8035, -14389}, + []int{-1445, -1944, -594, -1346}, + []int{-7538, 9733, -6999, 10039}, + []int{18000, -19141, 18082, -18801}, + []int{7029, 8909, 7081, 9005}, + []int{-17180, 17169, -16326, 17536}, + []int{15884, 18654, 16099, 19112}, + []int{-2344, 15683, -2139, 16423}, + []int{-1733, 14471, -1696, 14710}, + []int{-10193, -19709, -9840, -19623}, + []int{-13057, 17536, -12960, 18166}, + []int{-6927, -14828, -6145, -14704}, + []int{-6999, -19539, -6927, -19515}, + []int{14213, -4197, 14668, -3895}, + []int{569, 12998, 1603, 13271}, + []int{-594, 214, -494, 253}, + []int{-12960, 8466, -12809, 8909}, + []int{-17442, 12140, -17318, 13271}, + []int{-14835, -6552, -14784, -5462}, + []int{-4918, 10400, -4485, 10728}, + []int{300, 16423, 518, 16862}, + []int{-5208, -17980, -5144, -17791}, + []int{-17442, 11103, -17318, 11137}, + []int{1972, -7636, 2714, -6714}, + []int{-5069, -14828, -3982, -14704}, + []int{-18809, -1346, -18795, -1090}, + []int{7601, 6634, 8035, 7038}, + []int{12654, 10865, 12689, 11103}, + []int{-3707, 15308, -3217, 15683}, + []int{300, 3970, 518, 4164}, + []int{7601, -11138, 8035, -9654}, + []int{-4485, 10369, -3982, 10728}, + []int{-5069, 1771, -4918, 2113}, + []int{-16326, 16478, -15861, 16862}, + []int{-12748, 4771, -12160, 4785}, + []int{-19623, -19623, -19527, -19539}, + []int{6403, -19623, 6728, -19515}, + []int{4881, 5618, 4969, 6233}, + []int{-17182, -5000, -16900, -4871}, + []int{-7899, -17791, -7538, -17679}, + []int{13108, 1771, 13398, 3262}, + []int{-9890, -654, -9840, -390}, + []int{-13417, 16862, -13095, 17169}, + []int{-9890, 10212, -9840, 10359}, + []int{-594, -3101, -494, -3052}, + []int{-15428, 16478, -15236, 17536}, + []int{3832, -1944, 4393, -1346}, + []int{-5069, 9729, -4681, 9733}, + []int{-13921, 7721, -13424, 7825}, + []int{17684, 640, 18000, 803}, + []int{-3758, -1977, -3707, -1944}, + []int{-17182, -8859, -16900, -8111}, + []int{7029, 10400, 7081, 10728}, + []int{-14992, 11103, -14835, 11785}, + []int{14213, 7061, 14668, 7199}, + []int{-19527, -1044, -18809, -718}, + []int{-19527, -14568, -19523, -14389}, + []int{15689, 6122, 16099, 6233}, + []int{16316, 15013, 16517, 15308}, + []int{3621, -14568, 3832, -14389}, + []int{-13057, -4197, -12960, -4004}, + []int{14120, 640, 14213, 1118}, + []int{-13417, 8466, -13095, 8909}, + []int{14804, -17980, 15884, -17791}, + []int{-4485, -3649, -3982, -3052}, + []int{14120, 8466, 14213, 8909}, + []int{12654, 1384, 13398, 1494}, + []int{10303, -5235, 10646, -5000}, + []int{-18486, 10400, -18464, 10728}, + []int{-3217, 3858, -3065, 3953}, + []int{15348, 4548, 15689, 4771}, + []int{-14992, -9194, -14835, -8111}, + []int{-9828, 19886, -9803, 20990}, + []int{-3758, 14710, -3707, 15013}, + []int{-7538, 20150, -6999, 20990}, + []int{-15236, 10039, -14992, 10212}, + []int{-494, 1771, -145, 2113}, + []int{10646, 15308, 11012, 15683}, + []int{-4485, 12755, -3933, 12998}, + []int{-12748, 12755, -12160, 12998}, + []int{-12809, 19886, -11919, 20150}, + []int{15241, -13365, 15348, -11595}, + []int{14100, -18539, 14120, -17980}, + []int{16316, 5076, 16517, 5977}, + []int{4819, 4263, 4881, 4548}, + []int{-18015, 5618, -17318, 5977}, + []int{-6999, -14279, -6927, -13457}, + []int{19159, 4548, 19299, 4771}, + []int{-19800, 13271, -19623, 14710}, + []int{19584, 16478, 19992, 17536}, + []int{2714, 7721, 3007, 7825}, + []int{19584, 8909, 19992, 9729}, + []int{-2802, -14389, -2796, -14279}, + []int{-14835, 18439, -14784, 19112}, + []int{-14992, -7636, -14835, -7020}, + []int{-1733, -16655, -1609, -16501}, + []int{5266, 640, 5330, 1118}, + []int{-19527, -9469, -19523, -9406}, + []int{-16900, -1090, -16393, -718}, + []int{14804, -14704, 15241, -14568}, + []int{-19623, -19539, -19421, -19515}, + []int{-2796, 13271, -2344, 13595}, + []int{-10867, 11103, -10309, 11137}, + []int{8035, -1977, 8139, -1090}, + []int{10303, 1258, 10646, 1384}, + []int{13108, 6122, 13830, 6233}, + []int{-2139, -1977, -1781, -1944}, + []int{-13921, 12998, -13424, 13095}, + []int{4819, -1090, 4881, -718}, + []int{11526, 10728, 11901, 10853}, + []int{16517, 15013, 17021, 15061}, + []int{-6927, 9729, -6145, 9733}, + []int{-19623, -6569, -19527, -6552}, + []int{-17442, 8466, -17318, 8909}, + []int{17021, 15013, 17684, 15061}, + []int{5183, 803, 5266, 1118}, + []int{14668, 16478, 14804, 16862}, + []int{16517, 5076, 17021, 5618}, + []int{8968, -13457, 9781, -13413}, + []int{14804, 4263, 16099, 4548}, + []int{-11919, 19886, -11610, 20990}, + []int{15348, -18539, 15689, -17980}, + []int{8968, 10359, 10246, 10369}, + []int{14213, -6714, 14804, -6569}, + []int{-15236, -14704, -14992, -14568}, + []int{-1609, 803, -1445, 1384}, + []int{-18486, -5235, -18464, -5000}, + []int{-2015, -3101, -1781, -3052}, + []int{2714, 3262, 3007, 3283}, + []int{-13417, -9406, -13095, -9194}, + []int{-3933, -19623, -3883, -19515}, + []int{10303, -7636, 11012, -7020}, + []int{-16326, 4793, -15861, 5076}, + []int{-2796, 19112, -2139, 19343}, + []int{-17442, -7020, -17182, -6714}, + []int{-18809, -14828, -18795, -14568}, + []int{-6145, 640, -5354, 1384}, + []int{300, 2113, 518, 3262}, + []int{-13095, 3858, -13057, 3953}, + []int{-5069, -5468, -4918, -5462}, + []int{19009, -11595, 19084, -11264}, + []int{-19421, 1384, -18795, 1494}, + []int{-2139, 10853, -2015, 10865}, + []int{-19623, 19343, -19527, 19808}, + []int{-12130, -14389, -10921, -14279}, + []int{-12160, 12998, -12130, 13595}, + []int{-13057, 8466, -12960, 8909}, + []int{-17180, 13595, -16393, 14471}, + []int{-19523, -3052, -19421, -2909}, + []int{-3982, -14279, -3933, -13457}, + []int{7029, 10865, 7081, 11137}, + []int{-12960, -17630, -12951, -16734}, + []int{4969, 214, 5183, 253}, + []int{-11610, 10400, -10921, 10728}, + []int{11901, -5462, 13398, -5299}, + []int{-6145, 1384, -5354, 1494}, + []int{-6999, 10369, -6927, 11103}, + []int{-18739, 1118, -18486, 1258}, + []int{-5208, -6552, -5144, -5468}, + []int{-7538, 1384, -6999, 1494}, + []int{-9803, 17169, -9573, 17732}, + []int{300, 1118, 1080, 1258}, + []int{15884, 1118, 16099, 1494}, + []int{569, -19142, 1080, -18801}, + []int{12689, 4164, 13108, 4548}, + []int{-9890, 17536, -9840, 17732}, + []int{-3758, 9733, -3707, 10212}, + []int{-9573, -17630, -9448, -16734}, + []int{-494, 12755, -145, 12998}, + []int{-2796, -18767, -2139, -18539}, + []int{-14835, -5462, -14784, -5299}, + []int{-14784, 15013, -14535, 15061}, + []int{-3707, 2535, -3596, 3262}, + []int{6403, -19878, 6728, -19623}, + []int{4819, -1977, 4969, -1944}, + []int{-9573, -4715, -9161, -4197}, + []int{13398, 15784, 13830, 16423}, + []int{12654, -13365, 13108, -11730}, + []int{19584, -6552, 19992, -5299}, + []int{-3883, 1384, -3758, 1494}, + []int{-4918, 6122, -4681, 7038}, + []int{3505, 20666, 3832, 20990}, + []int{-3933, -3052, -3883, -2767}, + []int{-16900, 13095, -16326, 13271}, + []int{-594, -9654, 518, -9469}, + []int{-10867, -5235, -10309, -4871}, + []int{-16393, -4004, -16326, -3895}, + []int{569, -3101, 1603, -3052}, + []int{15884, 15061, 16099, 15308}, + []int{-19800, 10039, -19623, 10212}, + []int{-16393, 15308, -16326, 15683}, + []int{518, -4004, 569, -3895}, + []int{-12748, -17791, -12130, -17679}, + []int{11022, -1044, 11526, -718}, + []int{11022, -11730, 11526, -11595}, + []int{14668, -6552, 15348, -5468}, + []int{-17182, 19808, -17180, 19870}, + []int{-16900, 2113, -16393, 2535}, + []int{518, -19709, 569, -19515}, + []int{10646, 19343, 11012, 19808}, + []int{11526, 10039, 11901, 10212}, + []int{-5144, -18539, -5069, -17980}, + []int{-2344, 19808, -2139, 19886}, + []int{-3065, -5299, -2802, -5000}, + []int{-14992, 3953, -14835, 3970}, + []int{18082, 4771, 19084, 4785}, + []int{-9803, 15683, -9573, 15784}, + []int{4881, -19141, 4969, -18801}, + []int{4393, -14828, 4819, -14568}, + []int{5757, -9404, 6403, -9194}, + []int{15689, 6233, 16099, 6634}, + []int{4393, -16147, 4819, -16113}, + []int{13108, 1494, 13398, 1771}, + []int{10246, -8859, 10303, -8111}, + []int{-3065, -16147, -2802, -16113}, + []int{19084, 15013, 19159, 15061}, + []int{4969, -14389, 5183, -13457}, + []int{-14992, -5462, -14835, -5299}, + []int{-15428, 1771, -15236, 2113}, + []int{1080, -7020, 1603, -6714}, + []int{-14535, 5977, -14470, 6122}, + []int{-13057, 9005, -12960, 9585}, + []int{-16326, -6552, -15861, -5468}, + []int{-4485, -8859, -3982, -8111}, + []int{-18809, -1044, -18795, -718}, + []int{14100, -17630, 14213, -16734}, + []int{11526, -9469, 11901, -9404}, + []int{-3883, -4004, -3707, -3895}, + []int{-10193, 5977, -9890, 7038}, + []int{14120, 10728, 14213, 10865}, + []int{-12130, -1090, -11919, -718}, + []int{18082, 7038, 19159, 7061}, + []int{-16393, 13595, -16326, 14471}, + []int{16316, -19431, 17021, -19142}, + []int{-16326, -1346, -15428, -1090}, + []int{14120, -718, 14213, -654}, + []int{3621, -390, 4393, -384}, + []int{10646, -16113, 11012, -15085}, + []int{-14470, 19343, -13921, 19870}, + []int{-1445, -5299, -594, -5235}, + []int{19299, 4164, 19584, 4263}, + []int{7601, -1346, 8035, -1090}, + []int{4881, 7721, 4969, 8909}, + []int{7601, -16113, 8139, -15085}, + []int{-15861, 10039, -15428, 10212}, + []int{-14470, -17679, -13921, -17630}, + []int{11022, 14710, 11526, 15061}, + []int{-12951, 529, -12809, 640}, + []int{13108, 17536, 13398, 17732}, + []int{-3758, 18166, -3707, 18439}, + []int{18082, 10212, 19009, 10359}, + []int{19084, -18801, 19299, -18767}, + []int{4819, -1944, 4969, -1346}, + []int{5266, 10369, 5330, 10400}, + []int{-12809, 253, -12748, 529}, + []int{10246, -3649, 10303, -3052}, + []int{12689, 10865, 13108, 11137}, + []int{5757, 16423, 6728, 16478}, + []int{518, -19878, 569, -19709}, + []int{13398, 5076, 13830, 5618}, + []int{-7538, 16423, -6999, 16478}, + []int{8968, 18166, 10303, 18439}, + []int{5757, -18539, 6801, -17980}, + []int{-12089, 640, -11919, 803}, + []int{-9573, -17679, -9448, -17630}, + []int{6801, -14704, 7328, -14568}, + []int{-14992, 12998, -14535, 13095}, + []int{-10867, -9469, -9890, -9406}, + []int{12654, 16423, 12689, 16862}, + []int{14213, -8859, 14668, -8111}, + []int{11901, 18166, 12654, 18439}, + []int{-2139, -14568, -1781, -14389}, + []int{5266, 20150, 6801, 20666}, + []int{-9840, 4771, -9828, 4785}, + []int{5330, -9469, 5757, -9406}, + []int{-5069, 16862, -4681, 17536}, + []int{-3933, 1258, -3883, 1384}, + []int{-3707, -9406, -3217, -9404}, + []int{-18795, 16423, -18739, 16478}, + []int{-4485, -3052, -3982, -2909}, + []int{1603, -7636, 1972, -7020}, + []int{-19623, 4771, -19527, 4793}, + []int{-18486, 803, -17442, 1118}, + []int{4969, 13095, 5266, 13271}, + []int{-10309, -4197, -10193, -4004}, + []int{-3933, 14471, -3883, 14710}, + []int{-13057, -1090, -12951, -1044}, + []int{15241, 12755, 15348, 13095}, + []int{7468, -17791, 8035, -17679}, + []int{14120, -6569, 14213, -5468}, + []int{-4485, 6122, -3982, 6233}, + []int{-3982, -2767, -3933, -1977}, + []int{-19523, 18439, -18795, 18654}, + []int{-17318, -8111, -17182, -7636}, + []int{-17182, -4871, -16900, -4715}, + []int{-3883, -4715, -3707, -4004}, + []int{-19800, 4771, -19623, 4785}, + []int{-7538, 10359, -6927, 10369}, + []int{-3933, 1771, -3883, 2113}, + []int{-5144, -18767, -4681, -18539}, + []int{4881, 11785, 4969, 12140}, + []int{-9573, -19878, -9161, -19709}, + []int{-14535, 12998, -14470, 13095}, + []int{-3758, 16862, -3707, 17169}, + []int{8139, -9406, 8935, -9404}, + []int{-9161, -18801, -7899, -18539}, + []int{-18464, 17169, -17442, 17536}, + []int{-10921, 4548, -10867, 4785}, + []int{-14535, 10853, -14470, 10865}, + []int{6403, -3649, 6728, -3101}, + []int{19159, -5299, 19299, -5235}, + []int{-494, 19343, -145, 19808}, + []int{14804, -3052, 15241, -2909}, + []int{11022, -16734, 11526, -16655}, + []int{-9828, 9729, -9803, 10039}, + []int{-14835, 15784, -14535, 16423}, + []int{-5144, 5076, -5069, 5618}, + []int{-12748, -4871, -12160, -4715}, + []int{-5208, -13457, -5144, -13413}, + []int{3505, 6122, 3621, 6233}, + []int{-3707, -4715, -3596, -4197}, + []int{8139, 13595, 8935, 14471}, + []int{3621, 17169, 3832, 17536}, + []int{-4681, 11103, -4485, 11137}, + []int{8035, -19878, 8139, -19709}, + []int{19159, 4263, 19299, 4548}, + []int{-2015, 7825, -1781, 8466}, + []int{7081, 253, 7328, 529}, + []int{17684, -2909, 18000, -1977}, + []int{-12160, 2113, -12130, 2535}, + []int{-9890, -19539, -9840, -19515}, + []int{15689, 803, 16316, 1118}, + []int{-494, 1494, -145, 1665}, + []int{-11919, -1346, -10921, -1090}, + []int{-5208, -5468, -5144, -5462}, + []int{-3933, -2767, -3883, -1977}, + []int{-14470, -3649, -13921, -3101}, + []int{-17180, 253, -16900, 529}, + []int{-5144, 13095, -5069, 13271}, + []int{-12951, 10359, -12748, 10369}, + []int{-10309, 7825, -9890, 9005}, + []int{-10193, -11264, -9890, -11138}, + []int{-4681, -9406, -4485, -9194}, + []int{7601, -17679, 8035, -17630}, + []int{11901, -19141, 12654, -18801}, + []int{14120, -654, 14213, -390}, + []int{8935, 14710, 8968, 15061}, + []int{-18809, -17630, -18795, -16655}, + []int{15348, -16655, 15689, -16501}, + []int{19159, 4164, 19299, 4263}, + []int{-3758, -14279, -3707, -13457}, + []int{3621, 19870, 4393, 19886}, + []int{11526, 18166, 11901, 18439}, + []int{14213, -6552, 14668, -5468}, + []int{15348, -11138, 15689, -9654}, + []int{-1696, -1090, -1609, -1044}, + []int{-12160, -1044, -12130, -718}, + []int{4819, -3649, 4881, -3101}, + []int{-19421, -16147, -18809, -15085}, + []int{-17318, -7636, -17182, -7020}, + []int{-3758, -16734, -3707, -16501}, + []int{15348, 9729, 15884, 9733}, + []int{-17318, 5618, -17182, 5977}, + []int{5266, 15061, 5330, 15683}, + []int{-6145, -5235, -5354, -5000}, + []int{19084, -11138, 19299, -9654}, + []int{-11919, -5462, -11610, -5299}, + []int{3621, -11595, 4393, -11264}, + []int{-4918, 10369, -4681, 10400}, + []int{1603, 17169, 1972, 17536}, + []int{-9828, -16113, -9803, -15085}, + []int{-10193, -13457, -9840, -13413}, + []int{19584, -16734, 19992, -16655}, + []int{7601, 11103, 8139, 11137}, + []int{5330, 2113, 5757, 2535}, + []int{19159, 13271, 19299, 13595}, + []int{-18739, -14828, -18486, -14568}, + []int{-2344, 12998, -2139, 13095}, + []int{16517, 7199, 17021, 7721}, + []int{5183, 9733, 5330, 10039}, + []int{-19527, -19623, -19421, -19539}, + []int{3007, 19886, 3505, 20990}, + []int{-2802, -4871, -2796, -4715}, + []int{-6145, 7061, -5144, 7199}, + []int{-9803, 10728, -9573, 10853}, + []int{-13417, 5977, -13095, 6233}, + []int{-6145, -16655, -5354, -16147}, + []int{-12748, 3953, -12089, 3970}, + []int{-18739, 10728, -18486, 10853}, + []int{8139, -19623, 8935, -19539}, + []int{-3933, 10865, -3883, 11137}, + []int{518, -15085, 1972, -14828}, + []int{518, -17630, 1080, -16655}, + []int{19299, 640, 19584, 803}, + []int{-5208, 6122, -5144, 6233}, + []int{-3707, 13595, -3596, 14710}, + []int{17021, 12998, 17684, 13271}, + []int{19159, -9406, 19299, -9404}, + []int{4969, 12998, 5183, 13095}, + []int{-2344, 11103, -2139, 11137}, + []int{15689, -18539, 15884, -17980}, + []int{-19800, -14704, -19623, -13457}, + []int{-16393, 2113, -16326, 2535}, + []int{15348, -8111, 15689, -7020}, + []int{5266, -6714, 5330, -6569}, + []int{-12809, 11137, -11919, 11785}, + []int{-12809, 18166, -12160, 18439}, + []int{-3707, 12998, -3596, 13095}, + []int{-3707, 15784, -3596, 16423}, + []int{17684, 1771, 18000, 2113}, + []int{-9803, 3858, -9573, 3970}, + []int{-3933, 12140, -3758, 12755}, + []int{-1609, -16655, -1445, -16501}, + []int{15884, 529, 16099, 640}, + []int{-19623, -9469, -19527, -9406}, + []int{-14835, -3895, -14784, -3649}, + []int{-9803, -4715, -9573, -4197}, + []int{7601, 11137, 8935, 11785}, + []int{-9890, 14471, -9840, 14710}, + []int{-3707, 13095, -3596, 13271}, + []int{3621, -1944, 3832, -1090}, + []int{-14992, 10865, -14835, 11103}, + []int{-2015, 11103, -1781, 11137}, + []int{4881, 2535, 4969, 3283}, + []int{-3596, 19870, -3217, 19886}, + []int{-19527, 14710, -19523, 15013}, + []int{6403, 13595, 6728, 14471}, + []int{-10193, -14279, -9840, -13457}, + []int{-11610, -13413, -10921, -13365}, + []int{-9840, 11785, -9803, 12998}, + []int{-16393, 15683, -16326, 15784}, + []int{-19800, 10369, -19623, 10728}, + []int{-17182, 253, -17180, 529}, + []int{-16326, 10039, -15861, 10212}, + []int{-16900, 253, -16393, 529}, + []int{12689, -9406, 13108, -9194}, + []int{-2802, 10212, -2796, 10359}, + []int{-10867, -5299, -10309, -5235}, + []int{3621, 9585, 3832, 9729}, + []int{-2344, -5299, -2139, -5235}, + []int{9781, -9406, 10246, -9404}, + []int{-13424, 3953, -13417, 3970}, + []int{-14835, 13271, -14784, 13595}, + []int{11012, 1384, 11022, 1494}, + []int{11901, 1118, 12654, 1258}, + []int{-3933, 17536, -3883, 17732}, + []int{-6999, 11103, -6927, 11785}, + []int{-14992, 8466, -14835, 8909}, + []int{-10867, 10369, -10309, 10400}, + []int{-18015, -19539, -17442, -19515}, + []int{17021, 11785, 17684, 12755}, + []int{-12160, 18654, -12130, 19112}, + []int{3832, -384, 4393, 253}, + []int{5266, -6552, 5330, -5468}, + []int{-12748, 10853, -12160, 10865}, + []int{-17180, 19808, -16900, 19870}, + []int{-12130, -14279, -12089, -13457}, + []int{3505, 13271, 3621, 13595}, + []int{-9803, -19623, -9573, -19539}, + []int{-14784, 13095, -14535, 13271}, + []int{13830, 12755, 14100, 12998}, + []int{7029, 10728, 7081, 10853}, + []int{-14992, 6233, -14835, 6634}, + []int{-13095, 16862, -13057, 17169}, + []int{3007, -16734, 3505, -16655}, + []int{-1733, -9469, -1696, -9406}, + []int{-14992, -8111, -14835, -7636}, + []int{-3758, -718, -3596, -654}, + []int{-1696, -18801, -1445, -18767}, + []int{7601, -1977, 8035, -1346}, + []int{-11919, 10369, -11610, 10400}, + []int{8139, 20666, 8935, 20990}, + []int{-12160, 13595, -12130, 14471}, + []int{18082, -4197, 19009, -4004}, + []int{-10921, 19870, -10309, 19886}, + []int{-10309, 10853, -9890, 10865}, + []int{-19800, -11595, -19623, -11264}, + []int{-18795, -3101, -18486, -3052}, + []int{16099, 20666, 17021, 20990}, + []int{-3982, -19709, -3933, -19623}, + []int{18000, -18801, 18082, -18767}, + []int{-1733, 12140, -1609, 12755}, + []int{-10867, -384, -10309, 214}, + []int{16517, 20150, 17021, 20666}, + []int{10646, 9733, 11012, 10039}, + []int{-19527, -6569, -19523, -6552}, + []int{19299, -14828, 19584, -14568}, + []int{-13095, 11785, -13057, 12140}, + []int{19299, 9729, 19584, 9733}, + []int{-17442, -7636, -17318, -7020}, + []int{-594, 18166, -145, 18439}, + []int{-6145, -1977, -5354, -1346}, + []int{-7899, -7020, -7786, -6714}, + []int{-19800, 10212, -19623, 10359}, + []int{-17182, -14828, -17180, -14704}, + []int{-4681, 4785, -4485, 5076}, + []int{-19523, 1771, -19421, 2113}, + []int{-11610, 10728, -10921, 11137}, + []int{-14992, 10853, -14835, 10865}, + []int{-9448, 1258, -9161, 1384}, + []int{-6999, 10212, -6927, 10359}, + []int{-9890, -5235, -9840, -5000}, + []int{-2139, 4771, -2015, 4785}, + []int{569, 214, 1080, 253}, + []int{11022, -16655, 11526, -16501}, + []int{-7899, 13595, -7786, 14471}, + []int{-145, 18654, 300, 19112}, + []int{-13057, 7825, -12960, 8466}, + []int{5183, 10039, 5266, 10212}, + []int{-3982, 14471, -3933, 14710}, + []int{3505, -11138, 3832, -9469}, + []int{-13424, -8859, -13095, -8111}, + []int{15689, -11138, 16099, -9654}, + []int{-3596, -3895, -2802, -3649}, + []int{-12748, 529, -12160, 640}, + []int{-3982, 6122, -3933, 6233}, + []int{-19800, -11264, -19623, -11138}, + []int{-3883, -14704, -3758, -14389}, + []int{3832, -5468, 4819, -5462}, + []int{12654, -6552, 12689, -5462}, + []int{-6145, 3262, -5354, 3283}, + []int{-4918, 10039, -3982, 10212}, + []int{-18795, -2909, -18739, -2767}, + []int{-7786, -13413, -7538, -13365}, + []int{-14992, -17679, -14835, -16734}, + []int{-17442, 11137, -17318, 11785}, + []int{14804, 4548, 15348, 4771}, + []int{15689, 6634, 15884, 7038}, + []int{8035, -19539, 8139, -19515}, + []int{-3883, -3052, -3758, -2767}, + []int{7601, 1494, 8139, 1665}, + []int{-17182, 15784, -16900, 16423}, + []int{7468, 6634, 7601, 7038}, + []int{14804, 1118, 15241, 1384}, + []int{13398, -19878, 13830, -19709}, + []int{19584, 4785, 19992, 5076}, + []int{2714, 15683, 3007, 15784}, + []int{-5354, 640, -5208, 803}, + []int{-15861, 14710, -15428, 15013}, + []int{-3758, 4164, -3707, 4263}, + []int{-14835, 19870, -13921, 19886}, + []int{-15861, -19515, -15428, -19431}, + []int{-9803, 15784, -9573, 16423}, + []int{1080, -19709, 1972, -19623}, + []int{-9890, 15013, -9840, 15061}, + []int{4393, -19515, 4881, -19431}, + []int{9781, -11138, 10246, -9654}, + []int{-19623, 13271, -19527, 13595}, + []int{-14470, -15085, -13921, -14704}, + []int{-13424, -9194, -13095, -8859}, + []int{-4485, 4548, -3982, 4785}, + []int{-10921, 14710, -10309, 15013}, + []int{13830, -19623, 14100, -19539}, + []int{-7899, -9469, -7786, -9406}, + []int{11901, -14704, 12654, -14568}, + []int{-15236, 3858, -14992, 3970}, + []int{-7899, -4197, -7786, -4004}, + []int{-594, -16501, -494, -16147}, + []int{-6927, -14704, -6145, -14568}, + []int{-494, -5235, -145, -5000}, + []int{-16326, -3649, -15861, -3101}, + []int{-16900, -4871, -16393, -4715}, + []int{4819, 4548, 4881, 4771}, + []int{300, 4164, 1972, 4263}, + []int{-3707, 6233, -3596, 6634}, + []int{15689, 15683, 15884, 15784}, + []int{-145, -9406, 518, -9404}, + []int{-17442, 15784, -17182, 16423}, + []int{-3933, -9406, -3883, -9404}, + []int{-7786, 11785, -7538, 12140}, + []int{-3217, -14568, -3065, -14389}, + []int{7468, 19343, 7601, 19808}, + []int{-19800, 4548, -19623, 4771}, + []int{-6145, 14710, -5354, 15013}, + []int{19159, 10728, 19299, 10865}, + []int{7081, -5299, 7328, -5235}, + []int{-6145, 10728, -5354, 11103}, + []int{16316, -718, 17684, -654}, + []int{11901, 2535, 12654, 3262}, + []int{4393, 17169, 4819, 17536}, + []int{5183, -4004, 5330, -3895}, + []int{-13424, 13095, -13095, 13271}, + []int{-9448, 10865, -9161, 11103}, + []int{7601, -19142, 8035, -18801}, + []int{8968, -17980, 9781, -17791}, + []int{-12130, 3858, -12089, 3953}, + []int{4819, -16147, 4881, -15085}, + []int{8968, -11264, 9781, -11138}, + []int{19299, -4197, 19584, -4004}, + []int{8139, 17732, 8935, 18166}, + []int{-494, 4785, -145, 4793}, + []int{-12089, 14710, -11919, 15013}, + []int{-3065, 3970, -2802, 4164}, + []int{-3883, 253, -3758, 529}, + []int{11012, 16478, 11526, 16862}, + []int{-1781, 4164, -1609, 4263}, + []int{-19527, -384, -19523, 214}, + []int{-12130, 640, -12089, 803}, + []int{5757, 18654, 6403, 19112}, + []int{15689, -15085, 15884, -14568}, + []int{518, -5468, 569, -5299}, + []int{-1733, 11785, -1696, 12140}, + []int{-16326, -19141, -15861, -18801}, + []int{19299, 7061, 19584, 7199}, + []int{7081, 19886, 7328, 20150}, + []int{-6927, -2909, -5354, -2767}, + []int{16099, 15061, 16316, 15308}, + []int{15241, -3101, 15348, -3052}, + []int{-7786, 10039, -7538, 10212}, + []int{5266, 2535, 5330, 3262}, + []int{300, -1090, 569, -1044}, + []int{19159, 9729, 19299, 9733}, + []int{-10921, 5618, -10867, 5977}, + []int{-12960, 1258, -12951, 1384}, + []int{-9161, -5462, -7899, -5299}, + []int{-12130, 7721, -12089, 7825}, + []int{-19623, -1044, -19527, -390}, + []int{-15236, 18166, -14835, 18439}, + []int{-1696, 17732, -1609, 18166}, + []int{-1733, 13595, -1696, 14471}, + []int{-1445, 214, -594, 253}, + []int{-17182, -6552, -16900, -5468}, + []int{-19623, -4871, -19523, -4715}, + []int{13108, 10728, 13398, 10853}, + []int{-494, 1118, -145, 1258}, + []int{-9161, 7061, -7899, 7199}, + []int{-14835, 1258, -14784, 1384}, + []int{11526, 10400, 11901, 10728}, + []int{-14992, -19142, -14835, -18801}, + []int{-12960, -1944, -12951, -1090}, + []int{-12089, 20666, -11919, 20990}, + []int{12654, 15308, 12689, 15683}, + []int{-19800, 9733, -19623, 10039}, + []int{8035, -9406, 8139, -9404}, + []int{1080, -18801, 1603, -18767}, + []int{-12130, 10359, -12089, 10369}, + []int{7468, 6233, 7601, 6634}, + []int{12654, 3283, 12689, 3953}, + []int{11012, 7825, 11022, 8466}, + []int{12654, 14710, 12689, 15013}, + []int{19159, 5618, 19584, 5977}, + []int{-3707, -16655, -3596, -16501}, + []int{13108, 4164, 13398, 4548}, + []int{-17180, 13095, -16900, 13271}, + []int{-1445, -1977, -494, -1944}, + []int{-2015, -7636, -1696, -7020}, + []int{-14535, 1771, -13921, 2113}, + []int{-14784, 6122, -14535, 6233}, + []int{5183, 10212, 5266, 10359}, + []int{13398, -5235, 14120, -5000}, + []int{-18739, 13271, -18486, 13595}, + []int{-3707, 10039, -3065, 10212}, + []int{14100, -654, 14120, -390}, + []int{-18795, -1977, -18739, -1944}, + []int{-12160, 11785, -12130, 12140}, + []int{-3217, 19112, -3065, 19343}, + []int{-3933, -19878, -3883, -19623}, + []int{4881, 18166, 4969, 18654}, + []int{-2344, 12755, -2139, 12998}, + []int{16099, -11138, 16316, -9654}, + []int{18000, 11137, 18082, 11785}, + []int{-2015, -3895, -1781, -3649}, + []int{-14784, 1771, -14535, 2113}, + []int{13398, 7038, 13830, 7061}, + []int{12689, 11137, 13108, 11785}, + []int{-9161, -13413, -7786, -13365}, + []int{11901, -14828, 12654, -14704}, + []int{-14992, -19878, -14835, -19623}, + []int{-7899, -2909, -7538, -2767}, + []int{11022, 10853, 11526, 10865}, + []int{-7538, -5468, -6999, -5462}, + []int{-3982, -9406, -3933, -9404}, + []int{14804, -5462, 15241, -5299}, + []int{-10921, -11730, -10867, -11264}, + []int{-145, 16478, 300, 16862}, + []int{11526, 19112, 12654, 19343}, + []int{518, -5299, 569, -5235}, + []int{-3596, 529, -3217, 803}, + []int{-17182, -3101, -17180, -3052}, + []int{15241, -390, 15348, -384}, + []int{-12160, 12755, -12130, 12998}, + []int{17021, 1771, 17684, 2113}, + []int{-19523, -18539, -19421, -17980}, + []int{1080, 17169, 1603, 17536}, + []int{-3217, -4004, -3065, -3895}, + []int{-18486, -14704, -18015, -14568}, + []int{19584, -14828, 19992, -14568}, + []int{-2139, 4548, -2015, 4771}, + []int{11022, -13365, 11526, -11730}, + []int{-2344, 4263, -2139, 4548}, + []int{5183, -6714, 5266, -6569}, + []int{15241, -14704, 15348, -14568}, + []int{-19623, 214, -19527, 253}, + []int{18000, 19886, 18082, 20150}, + []int{-7899, 1384, -7786, 1494}, + []int{15689, 529, 15884, 640}, + []int{-19800, 4793, -19623, 5076}, + []int{-12130, 3283, -12089, 3858}, + []int{3621, -9406, 3832, -9404}, + []int{10303, 803, 10646, 1258}, + []int{-6999, -14828, -6927, -14568}, + []int{-12748, 4164, -12160, 4263}, + []int{-5354, -19142, -5208, -19141}, + []int{-2139, 4263, -2015, 4548}, + []int{13398, -718, 13830, -654}, + []int{8035, 4771, 8139, 4785}, + []int{-17442, 13595, -17318, 14471}, + []int{10303, -9404, 10646, -9194}, + []int{10303, -19141, 10646, -18801}, + []int{12654, 6233, 12689, 6634}, + []int{-494, 1665, -145, 1771}, + []int{-9448, 1384, -9161, 1494}, + []int{-9161, 4548, -7899, 4771}, + []int{16099, -4197, 16316, -4004}, + []int{17021, 7199, 17684, 7721}, + []int{5330, -9654, 5757, -9469}, + []int{-2139, -14389, -1781, -14279}, + []int{11022, 1384, 11526, 1494}, + []int{3505, 11137, 3621, 11785}, + []int{-3883, 18439, -3758, 19112}, + []int{5183, 20150, 5266, 20666}, + []int{-10867, -1090, -10309, -1044}, + []int{16316, 18654, 16517, 19112}, + []int{-1733, 214, -1696, 253}, + []int{10646, -16147, 11012, -16113}, + []int{-2802, -16113, -2796, -15085}, + []int{-19523, 1384, -19421, 1494}, + []int{3007, 15683, 3505, 15784}, + []int{-9161, 12998, -7899, 13095}, + []int{19299, 1258, 19584, 1384}, + []int{-12809, 18654, -12160, 19112}, + []int{-16393, 4164, -16326, 4771}, + []int{4881, 7199, 4969, 7721}, + []int{-19800, -19709, -19623, -19623}, + []int{7328, -7636, 7468, -7020}, + []int{18000, 18654, 18082, 19112}, + []int{-14470, 19112, -13424, 19343}, + []int{-10193, -390, -9840, -384}, + []int{-9448, 1494, -9161, 1665}, + []int{11012, -1044, 11022, -654}, + []int{-13057, 11785, -12960, 12140}, + []int{-7538, -19623, -6927, -19539}, + []int{-9890, 9585, -9840, 9729}, + []int{4881, -4715, 4969, -4197}, + []int{-16393, 19808, -16326, 19870}, + []int{17021, -6714, 17684, -6569}, + []int{19084, -4715, 19159, -4197}, + []int{-6999, 4771, -6927, 4785}, + []int{-3217, -16655, -2802, -16501}, + []int{-3883, -19878, -3758, -19709}, + []int{13108, 10865, 13398, 11103}, + []int{-9803, 7038, -9573, 7721}, + []int{-3065, 19112, -2802, 19343}, + []int{19084, 9729, 19159, 9733}, + []int{8035, -19141, 8139, -18801}, + []int{-2802, 803, -2796, 1118}, + []int{4819, 9733, 4881, 10039}, + []int{5757, 2113, 6403, 2535}, + []int{-19623, 14471, -19523, 14710}, + []int{-19523, -11138, -19421, -9654}, + []int{18000, 11785, 18082, 12998}, + []int{19299, 3262, 19584, 3283}, + []int{13398, 4793, 13830, 5076}, + []int{-3933, -19515, -3883, -19431}, + []int{300, -1346, 569, -1090}, + []int{15689, 3970, 15884, 4164}, + []int{-5208, 19343, -5144, 19870}, + []int{-7538, 11103, -6999, 11785}, + []int{5330, 11137, 5757, 11785}, + []int{-19623, 18654, -19527, 19112}, + []int{-19523, -19709, -19421, -19623}, + []int{5266, 12140, 5757, 12755}, + []int{-5354, 3262, -5208, 3283}, + []int{-7899, -9654, -7786, -9469}, + []int{-1609, 1384, -1445, 1494}, + []int{-11919, -7636, -10921, -7020}, + []int{2714, -390, 3505, -384}, + []int{-14835, -718, -14784, -654}, + []int{3621, -19141, 3832, -18801}, + []int{6801, -4715, 7029, -4197}, + []int{-1445, 13271, -594, 13595}, + []int{3007, 13271, 3505, 13595}, + []int{-5144, -16501, -5069, -16147}, + []int{12654, 4164, 12689, 4263}, + []int{-12951, 253, -12809, 529}, + []int{18000, -11595, 18082, -11264}, + []int{19159, 1258, 19299, 1384}, + []int{15348, -4715, 15689, -4004}, + []int{1080, 10039, 1603, 10212}, + []int{-7538, 12998, -6999, 13095}, + []int{-2344, 13095, -2139, 13595}, + []int{7468, 15784, 7601, 16423}, + []int{13830, -15085, 14100, -14828}, + []int{-13095, -18539, -13057, -17791}, + []int{-1781, 7038, -1733, 7199}, + []int{-14784, 7721, -14535, 7825}, + []int{-5144, 7061, -5069, 7199}, + []int{-10193, -16113, -9890, -14828}, + []int{-19523, -6569, -19421, -6552}, + []int{10246, 1258, 10303, 1384}, + []int{-12809, 15308, -12748, 15784}, + []int{3007, 10369, 3505, 10400}, + []int{-9573, 7199, -7899, 7721}, + []int{1972, 5977, 2714, 6122}, + []int{8139, 20150, 8935, 20666}, + []int{6403, 16478, 6728, 16862}, + []int{-1696, -17791, -1445, -17679}, + []int{17684, -9654, 18082, -9469}, + []int{7328, -1977, 7468, -1944}, + []int{-18795, 13595, -18739, 14471}, + []int{-18809, 19870, -18795, 20150}, + []int{-19527, 19343, -19523, 19870}, + []int{15884, 253, 16099, 529}, + []int{10646, 8909, 11012, 9005}, + []int{-11919, 14710, -10921, 15013}, + []int{16316, -1977, 16517, -1944}, + []int{-12748, 20666, -12160, 20990}, + []int{7328, -18539, 7468, -17980}, + []int{-5208, -16501, -5144, -16147}, + []int{-3982, 4548, -3933, 4771}, + []int{10303, 10359, 10646, 10369}, + []int{-12809, 529, -12748, 640}, + []int{-12160, -16655, -12130, -16501}, + []int{19084, -5468, 19159, -5462}, + []int{7029, -18801, 7081, -18767}, + []int{-18739, -1346, -18486, -1090}, + []int{7468, -19878, 7601, -19709}, + []int{-2139, -2767, -2015, -1977}, + []int{19584, 8466, 19992, 8909}, + []int{8968, -17791, 9781, -17679}, + []int{-2139, 1494, -2015, 1665}, + []int{-19623, 253, -19527, 529}, + []int{6801, -6569, 7029, -6552}, + []int{17021, 20150, 17684, 20990}, + []int{-9890, -13413, -9840, -13365}, + []int{11901, 4263, 12689, 4548}, + []int{-13095, -2767, -13057, -1977}, + []int{14804, -4004, 15241, -3895}, + []int{-18739, 803, -18486, 1118}, + []int{-3217, 3970, -3065, 4164}, + []int{16517, 1771, 17021, 2113}, + []int{-15861, 10212, -15428, 10359}, + []int{8035, 15061, 8139, 15683}, + []int{-3883, -2767, -3758, -1977}, + []int{4969, 3262, 5183, 3283}, + []int{8935, -9654, 8968, -9469}, + []int{8139, -19709, 8935, -19623}, + []int{-15861, -19141, -15428, -18801}, + []int{6403, 640, 6728, 803}, + []int{10246, 2535, 10303, 3262}, + []int{-15236, -14828, -14992, -14704}, + []int{-10309, 12755, -9840, 12998}, + []int{5266, 3858, 6403, 3953}, + []int{-13417, 14471, -13095, 14710}, + []int{11022, 19343, 11526, 19870}, + []int{-11919, 11137, -11610, 11785}, + []int{-16900, -718, -16393, -654}, + []int{-7786, -13365, -7538, -11730}, + []int{-15236, -718, -14835, -654}, + []int{1603, -14828, 1972, -14704}, + []int{-9890, -19515, -9840, -19431}, + []int{12689, -5468, 13108, -5462}, + []int{-19527, -4715, -19523, -4197}, + []int{-9840, -16734, -9573, -16655}, + []int{-4485, 14471, -3982, 14710}, + []int{12654, -11730, 13108, -11595}, + []int{-10921, -6552, -10867, -5468}, + []int{-4485, -2767, -3982, -1977}, + []int{1972, 4548, 2714, 4771}, + []int{-13417, 15013, -13095, 15061}, + []int{12689, -9654, 13108, -9469}, + []int{7029, -17679, 7081, -17630}, + []int{-9840, -1346, -9828, -1090}, + []int{-13921, 20150, -13424, 20666}, + []int{-19800, 16478, -19623, 16862}, + []int{300, 3262, 518, 3283}, + []int{12689, -11138, 13108, -9654}, + []int{-13921, 4785, -13424, 4793}, + []int{8139, -16113, 8968, -15085}, + []int{7081, 8466, 7328, 8909}, + []int{-18015, 19886, -17442, 20150}, + []int{-6145, 13095, -5354, 13271}, + []int{9781, 15683, 10246, 15784}, + []int{-19800, -3649, -19623, -3101}, + []int{-19527, -4197, -19523, -4004}, + []int{-1609, -19141, -1445, -18801}, + []int{3832, -19515, 4393, -19431}, + []int{-9840, 1494, -9828, 1665}, + []int{-6999, -19142, -6927, -19141}, + []int{9781, -18801, 10246, -18767}, + []int{8968, 4785, 9781, 5076}, + []int{14804, 15784, 15241, 16423}, + []int{2714, 19886, 3007, 20150}, + []int{518, 17732, 569, 18166}, + []int{-13424, -7636, -13417, -7020}, + []int{-3758, 12140, -3707, 12755}, + []int{-17318, -3649, -17182, -3101}, + []int{-4918, 9733, -4681, 10039}, + []int{-6999, 4793, -6927, 5076}, + []int{-14535, -19539, -14470, -19515}, + []int{-5144, 6122, -5069, 6634}, + []int{-3982, 1771, -3933, 2113}, + []int{-5354, -15085, -5208, -14828}, + []int{-14835, 4771, -14784, 4785}, + []int{-9890, -3895, -9840, -3649}, + []int{-17182, -19141, -17180, -18801}, + []int{10246, -8111, 10303, -7636}, + []int{4881, -5235, 4969, -5000}, + []int{-4681, 10369, -4485, 10400}, + []int{-18739, 13595, -18486, 14471}, + []int{-17442, -16501, -17318, -16147}, + []int{-1781, 7199, -1733, 7721}, + []int{15241, -384, 15348, 214}, + []int{9781, -16655, 10246, -16501}, + []int{-11919, 3858, -11610, 3953}, + []int{-14470, -16655, -13921, -16501}, + []int{-12089, -11264, -11919, -11138}, + []int{-4681, 15061, -4485, 15308}, + []int{7029, -17980, 7081, -17791}, + []int{2714, 17169, 3007, 17536}, + []int{1972, 15061, 2714, 15683}, + []int{-3217, 5977, -2802, 6122}, + []int{-17318, -16501, -17182, -16147}, + []int{-18739, 10853, -18486, 10865}, + []int{-15428, 8466, -14992, 8909}, + []int{-19527, 3262, -19523, 3283}, + []int{-494, 11103, -145, 11137}, + []int{-10921, -7636, -10867, -7020}, + []int{4819, -13457, 4881, -13413}, + []int{-18486, 3970, -18464, 4263}, + []int{18000, -2767, 18082, -1977}, + []int{-12960, -718, -12951, -654}, + []int{19159, -9654, 19299, -9469}, + []int{-18486, -3101, -18464, -3052}, + []int{-10193, 4548, -9890, 4771}, + []int{-10309, -17980, -10193, -17791}, + []int{-17182, -3649, -17180, -3101}, + []int{-19527, 18654, -19523, 19112}, + []int{7081, 15308, 7328, 15683}, + []int{4819, 6122, 4881, 6233}, + []int{4881, -18801, 4969, -18767}, + []int{12654, 9005, 13108, 9585}, + []int{-6999, -13413, -6927, -13365}, + []int{4881, -16113, 4969, -14828}, + []int{-2015, -3649, -1781, -3101}, + []int{-1733, 7825, -1696, 8466}, + []int{-16393, -19142, -16326, -19141}, + []int{-18486, 4263, -18464, 4548}, + []int{14120, -17791, 14213, -17679}, + []int{11901, 10865, 12654, 11103}, + []int{19299, -9194, 19584, -8859}, + []int{8935, 11137, 8968, 11785}, + []int{1972, 3283, 2714, 3858}, + []int{12689, 19808, 13398, 19870}, + []int{12654, 10039, 12689, 10212}, + []int{-9803, -16113, -9161, -15085}, + []int{-16900, 1665, -16393, 1771}, + []int{15241, -6569, 15348, -6552}, + []int{-3065, 6122, -2802, 6233}, + []int{-3883, -3895, -3707, -3649}, + []int{-494, -19141, -145, -18801}, + []int{-15236, 3283, -14992, 3858}, + []int{-7899, 1258, -7786, 1384}, + []int{7601, 15784, 8035, 16423}, + []int{19009, -4197, 19084, -4004}, + []int{19584, -19878, 19992, -19623}, + []int{3621, -16501, 3832, -16147}, + []int{-16900, 19886, -16393, 20150}, + []int{-9890, -9469, -9840, -9404}, + []int{-16326, -11138, -15861, -9654}, + []int{1972, -5235, 2714, -5000}, + []int{-17182, 6634, -17180, 7038}, + []int{1972, -5462, 2714, -5299}, + []int{11022, 10865, 11526, 11103}, + []int{-7899, -2767, -7786, -1977}, + []int{6403, -4715, 6728, -4197}, + []int{3505, 17169, 3621, 17536}, + []int{-18486, -14828, -18464, -14704}, + []int{-3707, 13271, -3596, 13595}, + []int{569, 16423, 1080, 16478}, + []int{-3982, -19878, -3933, -19709}, + []int{15884, 3970, 16316, 4164}, + []int{11901, 1771, 12654, 2113}, + []int{1603, 15061, 1972, 15683}, + []int{-12960, -1977, -12951, -1944}, + []int{-16393, -5299, -16326, -5235}, + []int{7468, -19141, 7601, -18801}, + []int{6403, 17732, 6728, 18166}, + []int{16099, 1118, 16316, 1258}, + []int{11022, -1977, 11526, -1944}, + []int{-9161, -5468, -7899, -5462}, + []int{17684, 19886, 18000, 20150}, + []int{-14992, -3101, -14835, -3052}, + []int{-7538, 19886, -6999, 20150}, + []int{8035, -4197, 8139, -4004}, + []int{-6927, 1384, -6145, 1494}, + []int{19159, -16655, 19299, -16501}, + []int{13398, 8466, 13830, 8909}, + []int{300, -9469, 518, -9406}, + []int{-19800, -14828, -19623, -14704}, + []int{14804, -16501, 15241, -16147}, + []int{5183, 214, 5266, 253}, + []int{14120, -17679, 14213, -17630}, + []int{569, -1090, 1080, -1044}, + []int{10246, 640, 10303, 803}, + []int{13830, 12998, 14100, 13095}, + []int{19584, 1258, 19992, 1384}, + []int{-4681, -18801, -4485, -18539}, + []int{-3982, -14828, -3933, -14704}, + []int{-145, 1118, 300, 1258}, + []int{19084, -6552, 19159, -5468}, + []int{-19800, -4871, -19623, -4715}, + []int{-145, -3101, 300, -3052}, + []int{19084, 10865, 19159, 11103}, + []int{-12130, 9005, -12089, 9585}, + []int{-9890, -1346, -9840, -1090}, + []int{5266, -11264, 5330, -11138}, + []int{12654, 15683, 12689, 15784}, + []int{-19523, -19878, -19421, -19709}, + []int{12654, -1977, 12689, -1944}, + []int{8139, -9654, 8935, -9469}, + []int{-2139, 3283, -2015, 3858}, + []int{-5144, -4715, -5069, -4197}, + []int{8035, 11785, 8139, 12140}, + []int{-494, 15308, -145, 15784}, + []int{18000, -11730, 18082, -11595}, + []int{19159, -16501, 19299, -16147}, + []int{10303, 640, 10646, 803}, + []int{-10867, 10853, -10309, 10865}, + []int{15241, -3052, 15348, -2909}, + []int{3505, 13595, 3621, 14471}, + []int{1080, 12755, 1603, 12998}, + []int{1603, 214, 2714, 253}, + []int{5330, -6714, 5757, -6569}, + []int{-1781, -5462, -1696, -5299}, + []int{-2802, 11103, -2344, 11137}, + []int{8935, -3895, 8968, -3649}, + []int{-1781, -14568, -1733, -14389}, + []int{-13057, 10359, -12960, 10369}, + []int{5330, -18767, 5757, -18539}, + []int{14668, -8859, 14804, -8111}, + []int{8968, 14471, 9781, 14710}, + []int{-14992, 6634, -14835, 7038}, + []int{-5208, 19112, -5144, 19343}, + []int{-18795, 7825, -18739, 8466}, + []int{-12160, 4263, -12130, 4548}, + []int{13108, 19343, 13398, 19808}, + []int{-18015, 529, -17442, 640}, + []int{3621, 803, 3832, 1118}, + []int{19299, -19539, 19584, -19515}, + []int{-19527, -9406, -19523, -9194}, + []int{-12809, -4871, -12748, -4715}, + []int{7468, 10400, 7601, 10728}, + []int{-1696, -1044, -1609, -654}, + []int{8968, 2113, 9781, 2535}, + []int{-12748, -6714, -12160, -6569}, + []int{-12960, 1118, -12951, 1258}, + []int{-12951, -384, -12809, 214}, + []int{-19421, -2909, -18795, -2767}, + []int{4969, -384, 5183, 214}, + []int{-2015, -3052, -1781, -2909}, + []int{-3982, 3970, -3933, 4164}, + []int{-10309, -1090, -10193, -1044}, + []int{-10867, 10212, -10309, 10359}, + []int{19584, 7061, 19992, 7199}, + []int{-18015, -14704, -17442, -14568}, + []int{-9161, 4771, -7899, 4785}, + []int{3621, -2767, 3832, -1977}, + []int{4819, -15085, 4881, -14828}, + []int{-12960, 10359, -12951, 10369}, + []int{15689, 4164, 15884, 4263}, + []int{-13095, 18166, -13057, 18439}, + []int{-3758, -17630, -3707, -16734}, + []int{-4485, -8111, -3982, -7636}, + []int{8935, 19870, 8968, 19886}, + []int{6403, 19870, 6728, 19886}, + []int{19159, -4197, 19299, -4004}, + []int{3832, 20666, 4393, 20990}, + []int{-9573, -14279, -9448, -13457}, + []int{18000, -4197, 18082, -4004}, + []int{19584, -6569, 19992, -6552}, + []int{-494, -5000, -145, -4715}, + []int{12689, 16478, 13108, 16862}, + []int{7468, -11595, 7601, -11264}, + []int{11901, -14568, 12654, -14389}, + []int{-13417, 640, -13095, 803}, + []int{-9803, 12755, -9573, 12998}, + []int{-7786, -2767, -7538, -1977}, + []int{-2802, -3895, -2796, -3649}, + []int{-18795, 15784, -18739, 16423}, + []int{11901, -6552, 12654, -5468}, + []int{13398, 5977, 13830, 6122}, + []int{-14470, 20150, -13921, 20666}, + []int{-19523, 9733, -19421, 10039}, + []int{-3758, -5468, -3596, -5462}, + []int{-13057, 10212, -12960, 10359}, + []int{-10921, 11103, -10867, 11137}, + []int{-14835, -9406, -14784, -9404}, + []int{569, 9585, 1080, 9729}, + []int{569, 6233, 1080, 6634}, + []int{-4918, 15061, -4681, 15308}, + []int{-14470, -17630, -13921, -16734}, + []int{3621, -384, 3832, 253}, + []int{4881, 10853, 4969, 10865}, + []int{11901, -5468, 12654, -5462}, + []int{15348, -19141, 15689, -18801}, + []int{-5208, 19870, -5144, 19886}, + []int{-18739, -2909, -18486, -2767}, + []int{-1609, 4164, -1445, 4263}, + []int{4819, -11730, 4881, -11595}, + []int{7328, -4197, 7468, -4004}, + []int{-19523, -7020, -19421, -6714}, + []int{14668, -13413, 14804, -13365}, + []int{12654, -6569, 12689, -6552}, + []int{-6145, 3283, -5354, 3858}, + []int{3621, -19515, 3832, -19431}, + []int{3621, -14704, 3832, -14568}, + []int{-13057, -18539, -12960, -17980}, + []int{15884, 5977, 16099, 6122}, + []int{-7786, 640, -7538, 803}, + []int{8139, 9585, 8935, 9729}, + []int{-7899, -4004, -7786, -3895}, + []int{-4681, 2113, -4485, 2535}, + []int{-12960, 1384, -12951, 1494}, + []int{7029, -17630, 7081, -16734}, + []int{3832, 803, 4393, 1118}, + []int{7468, 7038, 8035, 7061}, + []int{4393, 19870, 4819, 19886}, + []int{14804, -5468, 15241, -5462}, + []int{300, 7721, 518, 7825}, + []int{-5354, 6634, -5208, 7038}, + []int{-10309, 7721, -10193, 7825}, + []int{16517, -3052, 17021, -2909}, + []int{13108, 3262, 13398, 3283}, + []int{-14992, 9729, -14835, 9733}, + []int{-19421, -17630, -18809, -16734}, + []int{18000, 15013, 18082, 15061}, + []int{-2015, -8111, -1781, -7636}, + []int{-2139, -5299, -2015, -5235}, + []int{10246, -13413, 10303, -13365}, + []int{-3883, 16862, -3758, 17169}, + []int{-6145, -19878, -5354, -19709}, + []int{12654, -1044, 12689, -718}, + []int{-12160, -19515, -12130, -19431}, + []int{-16900, -19515, -16393, -19431}, + []int{15348, 11137, 15689, 11785}, + []int{15689, 253, 15884, 529}, + []int{-6145, -14704, -5354, -14568}, + []int{5757, -6569, 6403, -6552}, + []int{9781, 15061, 10246, 15308}, + []int{-594, -3649, -494, -3101}, + []int{11526, -11138, 11901, -9654}, + []int{11901, 15013, 12654, 15061}, + []int{12689, 10039, 13108, 10212}, + []int{-14470, 4263, -13921, 4548}, + []int{7081, -18539, 7328, -17980}, + []int{7328, 4263, 7468, 4548}, + []int{-19800, 10728, -19623, 10853}, + }, + true, + }, + + { + [][]int{ + []int{1, 1, 2, 3}, + []int{1, 3, 2, 4}, + []int{3, 1, 4, 2}, + []int{3, 2, 4, 4}, + }, + false, + }, + + { + [][]int{ + []int{1, 1, 3, 3}, + []int{3, 1, 4, 2}, + []int{1, 3, 2, 4}, + []int{3, 2, 4, 4}, + }, + false, + }, + + { + [][]int{}, + false, + }, + + { + [][]int{ + []int{1, 1, 3, 3}, + []int{3, 1, 4, 2}, + []int{1, 3, 2, 4}, + []int{2, 2, 4, 4}, + }, + false, + }, + + // 可以有多个 testcase +} + +func Test_isRectangleCover(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + // fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, isRectangleCover(tc.rectangles), "输入:%v", tc) + } +} + +func Benchmark_isRectangleCover(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + isRectangleCover(tc.rectangles) + } + } +} diff --git a/Algorithms/0392.is-subsequence/README.md b/Algorithms/0392.is-subsequence/README.md new file mode 100755 index 000000000..5dac72ff6 --- /dev/null +++ b/Algorithms/0392.is-subsequence/README.md @@ -0,0 +1,32 @@ +# [392. Is Subsequence](https://leetcode.com/problems/is-subsequence/) + +## 题目 + +Given a string s and a string t, check if s is subsequence of t. + +You may assume that there is only lower case English letters in both s and t. t is potentially a very long (length ~= 500,000) string, and s is a short string (<=100). + +A subsequence of a string is a new string which is formed from the original string by deleting some (can be none) of the characters without disturbing the relative positions of the remaining characters. (ie, "ace" is a subsequence of "abcde" while "aec" is not). + +Example 1: + +```text +s = "abc", t = "ahbgdc" +Return true. +``` + +Example 2: + +```text +s = "axc", t = "ahbgdc" +Return false. +``` + +Follow up: +If there are lots of incoming S, say S1, S2, ... , Sk where k >= 1B, and you want to check one by one to see if T has its subsequence. In this scenario, how would you change your code? + +Credits:Special thanks to @pbrother for adding this problem and creating all test cases. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0392.is-subsequence/is-subsequence.go b/Algorithms/0392.is-subsequence/is-subsequence.go new file mode 100755 index 000000000..ba8082cd8 --- /dev/null +++ b/Algorithms/0392.is-subsequence/is-subsequence.go @@ -0,0 +1,13 @@ +package Problem0392 + +func isSubsequence(s string, t string) bool { + var i, j = 0, 0 + + for i < len(s) && j < len(t) { + if s[i] == t[j] { + i++ + } + j++ + } + return i == len(s) +} diff --git a/Algorithms/0392.is-subsequence/is-subsequence_test.go b/Algorithms/0392.is-subsequence/is-subsequence_test.go new file mode 100755 index 000000000..a5d9bdada --- /dev/null +++ b/Algorithms/0392.is-subsequence/is-subsequence_test.go @@ -0,0 +1,47 @@ +package Problem0392 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + t string + ans bool +}{ + + { + "abc", + "ahbgdc", + true, + }, + + { + "axc", + "ahbgdc", + false, + }, + + // 可以有多个 testcase +} + +func Test_isSubsequence(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, isSubsequence(tc.s, tc.t), "输入:%v", tc) + } +} + +func Benchmark_isSubsequence(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + isSubsequence(tc.s, tc.t) + } + } +} diff --git a/Algorithms/0393.utf-8-validation/README.md b/Algorithms/0393.utf-8-validation/README.md new file mode 100755 index 000000000..7c4ffc7bc --- /dev/null +++ b/Algorithms/0393.utf-8-validation/README.md @@ -0,0 +1,45 @@ +# [393. UTF-8 Validation](https://leetcode.com/problems/utf-8-validation/) + +## 题目 + +A character in UTF8 can be from 1 to 4 bytes long, subjected to the following rules: + +For 1-byte character, the first bit is a 0, followed by its unicode code. +For n-bytes character, the first n-bits are all one's, the n+1 bit is 0, followed by n-1 bytes with most significant 2 bits being 10. + +This is how the UTF-8 encoding would work: + +```text + Char. number range | UTF-8 octet sequence + (hexadecimal) | (binary) + --------------------+--------------------------------------------- + 0000 0000-0000 007F | 0xxxxxxx + 0000 0080-0000 07FF | 110xxxxx 10xxxxxx + 0000 0800-0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx + 0001 0000-0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx +``` + +Given an array of integers representing the data, return whether it is a valid utf-8 encoding. + +Note: +The input is an array of integers. Only the least significant 8 bits of each integer is used to store the data. This means each integer represents only 1 byte of data. + +```text +Example 1: +data = [197, 130, 1], which represents the octet sequence: 11000101 10000010 00000001. + +Return true. +It is a valid utf-8 encoding for a 2-bytes character followed by a 1-byte character. + +Example 2: +data = [235, 140, 4], which represented the octet sequence: 11101011 10001100 00000100. + +Return false. +The first 3 bits are all one's and the 4th bit is 0 means it is a 3-bytes character. +The next byte is a continuation byte which starts with 10 and that's correct. +But the second continuation byte does not start with 10, so it is invalid. +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0393.utf-8-validation/utf-8-validation.go b/Algorithms/0393.utf-8-validation/utf-8-validation.go new file mode 100755 index 000000000..a38656640 --- /dev/null +++ b/Algorithms/0393.utf-8-validation/utf-8-validation.go @@ -0,0 +1,30 @@ +package Problem0393 + +func validUtf8(data []int) bool { + // cnt 是还需检查的 byte 的个数 + cnt := 0 + var d int + for _, d = range data { + if cnt == 0 { + switch { + case d>>3 == 30: //0b11110 + cnt = 3 + case d>>4 == 14: //0b1110 + cnt = 2 + case d>>5 == 6: //0b110 + cnt = 1 + case d>>7 > 0: + // data[0] 和 data[len(data)-1] 都会到此处来检查 + return false + } + } else { + // 非首尾的 byte 必须以 0b10 开头 + if d>>6 != 2 { //0b10 + return false + } + cnt-- + } + } + + return 0 == cnt +} diff --git a/Algorithms/0393.utf-8-validation/utf-8-validation_test.go b/Algorithms/0393.utf-8-validation/utf-8-validation_test.go new file mode 100755 index 000000000..5da612e6e --- /dev/null +++ b/Algorithms/0393.utf-8-validation/utf-8-validation_test.go @@ -0,0 +1,54 @@ +package Problem0393 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + data []int + ans bool +}{ + + { + []int{241, 130, 130, 130, 1}, + true, + }, + + { + []int{197, 130, 1}, + true, + }, + + { + []int{129}, + false, + }, + + { + []int{235, 140, 4}, + false, + }, + + // 可以有多个 testcase +} + +func Test_validUtf8(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, validUtf8(tc.data), "输入:%v", tc) + } +} + +func Benchmark_validUtf8(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + validUtf8(tc.data) + } + } +} diff --git a/Algorithms/0394.decode-string/README.md b/Algorithms/0394.decode-string/README.md new file mode 100755 index 000000000..2d0a4d7eb --- /dev/null +++ b/Algorithms/0394.decode-string/README.md @@ -0,0 +1,23 @@ +# [394. Decode String](https://leetcode.com/problems/decode-string/) + +## 题目 + +Given an encoded string, return it's decoded string. + +The encoding rule is: `k[encoded_string]`, where the encoded_string inside the square brackets is being repeated exactly k times. Note that k is guaranteed to be a positive integer. + +You may assume that the input string is always valid; No extra white spaces, square brackets are well-formed, etc. + +Furthermore, you may assume that the original data does not contain any digits and that digits are only for those repeat numbers, k. For example, there won't be input like 3a or 2[4]. + +Examples: + +```text +s = "3[a]2[bc]", return "aaabcbc". +s = "3[a2[c]]", return "accaccacc". +s = "2[abc]3[cd]ef", return "abcabccdcdcdef". +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0394.decode-string/decode-string.go b/Algorithms/0394.decode-string/decode-string.go new file mode 100755 index 000000000..487516fb9 --- /dev/null +++ b/Algorithms/0394.decode-string/decode-string.go @@ -0,0 +1,59 @@ +package Problem0394 + +import ( + "strconv" +) + +func decodeString(s string) string { + n := len(s) + + // i 是第一个数字的位置 + i := 0 + for i < n && (s[i] < '0' || '9' < s[i]) { + i++ + } + if i == n { + // 没有数字,直接返回 s + return s + } + + // j 是第一个 '[' 的位置 + j := i + 1 + // 由题意可知,s 很规范 + // 存在数字的话,必定存在 '[' 和 ']' + for s[j] != '[' { + j++ + } + + // k 是与 j 的 '[' 对应的 ']' 的位置 + k := j + count := 1 + for count > 0 { + k++ + + if s[k] == '[' { + count++ + } else if s[k] == ']' { + count-- + } + } + + // i:第一个数字的位置 + // | j:第一个 '[' 的位置 + // | | k:与 j 的 '[' 对应的 ']' 的位置 + // ↓ ↓ ↓ + // "abcd234[*******]efg" + + // 题目说了, s 很规范 + num, _ := strconv.Atoi(s[i:j]) + + return s[:i] + times(num, decodeString(s[j+1:k])) + decodeString(s[k+1:]) +} + +func times(n int, s string) string { + res := "" + for i := 0; i < n; i++ { + res += s + } + return res +} diff --git a/Algorithms/0394.decode-string/decode-string_test.go b/Algorithms/0394.decode-string/decode-string_test.go new file mode 100755 index 000000000..c015c9fea --- /dev/null +++ b/Algorithms/0394.decode-string/decode-string_test.go @@ -0,0 +1,59 @@ +package Problem0394 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + ans string +}{ + + { + "aaabcbc", + "aaabcbc", + }, + + { + "10[a]2[bc]", + "aaaaaaaaaabcbc", + }, + + { + "3[a]2[bc]", + "aaabcbc", + }, + + { + "3[a2[c]]", + "accaccacc", + }, + + { + "2[abc]3[cd]ef", + "abcabccdcdcdef", + }, + + // 可以有多个 testcase +} + +func Test_decodeString(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, decodeString(tc.s), "输入:%v", tc) + } +} + +func Benchmark_decodeString(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + decodeString(tc.s) + } + } +} diff --git a/Algorithms/0395.longest-substring-with-at-least-k-repeating-characters/README.md b/Algorithms/0395.longest-substring-with-at-least-k-repeating-characters/README.md new file mode 100755 index 000000000..058069ff2 --- /dev/null +++ b/Algorithms/0395.longest-substring-with-at-least-k-repeating-characters/README.md @@ -0,0 +1,33 @@ +# [395. Longest Substring with At Least K Repeating Characters](https://leetcode.com/problems/longest-substring-with-at-least-k-repeating-characters/) + +## 题目 + +Find the length of the longest substring T of a given string (consists of lowercase letters only) such that every character in T appears no less than k times. + +Example 1: + +```text +Input: +s = "aaabb", k = 3 + +Output: +3 + +The longest substring is "aaa", as 'a' is repeated 3 times. +``` + +Example 2: + +```text +Input: +s = "ababbc", k = 2 + +Output: +5 + +The longest substring is "ababb", as 'a' is repeated 2 times and 'b' is repeated 3 times. +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0395.longest-substring-with-at-least-k-repeating-characters/longest-substring-with-at-least-k-repeating-characters.go b/Algorithms/0395.longest-substring-with-at-least-k-repeating-characters/longest-substring-with-at-least-k-repeating-characters.go new file mode 100755 index 000000000..1886a20b2 --- /dev/null +++ b/Algorithms/0395.longest-substring-with-at-least-k-repeating-characters/longest-substring-with-at-least-k-repeating-characters.go @@ -0,0 +1,62 @@ +package Problem0395 + +import ( + "strings" +) + +func longestSubstring(s string, k int) int { + if len(s) < k { + return 0 + } + + // count 中,记录了每个字母出现的次数 + count := make(map[byte]int, len(s)) + // maxCount 出现最多字母的出现次数 + maxCount := 0 + for i := range s { + count[s[i]]++ + maxCount = max(maxCount, count[s[i]]) + } + if maxCount < k { + // 没有字母达到 k 次 + return 0 + } + + var b byte + var c int + + // useless 收集了没有达到 k 次的字母 + useless := make([]string, 0, len(count)) + for b, c = range count { + if c < k { + useless = append(useless, string(b)) + } + } + + if len(useless) == 0 { + // 所有的字母都达到了 k 次 + return len(s) + } + + var u string + for _, u = range useless { + s = strings.Replace(s, u, ",", -1) + } + + ss := strings.Split(s, ",") + + // 递归求解 + maxLen := 0 + for _, s = range ss { + maxLen = max(maxLen, longestSubstring(s, k)) + } + + return maxLen +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} diff --git a/Algorithms/0395.longest-substring-with-at-least-k-repeating-characters/longest-substring-with-at-least-k-repeating-characters_test.go b/Algorithms/0395.longest-substring-with-at-least-k-repeating-characters/longest-substring-with-at-least-k-repeating-characters_test.go new file mode 100755 index 000000000..1f372dd3a --- /dev/null +++ b/Algorithms/0395.longest-substring-with-at-least-k-repeating-characters/longest-substring-with-at-least-k-repeating-characters_test.go @@ -0,0 +1,65 @@ +package Problem0395 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + k int + ans int +}{ + + { + "abcdedghijklmnopqrstuvwxyz", + 2, + 0, + }, + + { + "aaabb", + 4, + 0, + }, + + { + "acabb", + 2, + 2, + }, + + { + "aaabb", + 3, + 3, + }, + + { + "ababbc", + 2, + 5, + }, + + // 可以有多个 testcase +} + +func Test_longestSubstring(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, longestSubstring(tc.s, tc.k), "输入:%v", tc) + } +} + +func Benchmark_longestSubstring(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + longestSubstring(tc.s, tc.k) + } + } +} diff --git a/Algorithms/0396.rotate-function/README.md b/Algorithms/0396.rotate-function/README.md new file mode 100755 index 000000000..6c51e347d --- /dev/null +++ b/Algorithms/0396.rotate-function/README.md @@ -0,0 +1,55 @@ +# [396. Rotate Function](https://leetcode.com/problems/rotate-function/) + +## 题目 + +Given an array of integers A and let n to be its length. + +Assume Bk to be an array obtained by rotating the array A k positions clock-wise, we define a "rotation function" F on A as follow: + +```text +F(k) = 0 * Bk[0] + 1 * Bk[1] + ... + (n-1) * Bk[n-1]. +``` + +Calculate the maximum value of F(0), F(1), ..., F(n-1). + +Note: +n is guaranteed to be less than 105. + +Example: + +```text +A = [4, 3, 2, 6] + +F(0) = (0 * 4) + (1 * 3) + (2 * 2) + (3 * 6) = 0 + 3 + 4 + 18 = 25 +F(1) = (0 * 6) + (1 * 4) + (2 * 3) + (3 * 2) = 0 + 4 + 6 + 6 = 16 +F(2) = (0 * 2) + (1 * 6) + (2 * 4) + (3 * 3) = 0 + 6 + 8 + 9 = 23 +F(3) = (0 * 3) + (1 * 2) + (2 * 6) + (3 * 4) = 0 + 2 + 12 + 12 = 26 + +So the maximum value of F(0), F(1), F(2), F(3) is F(3) = 26. +``` + +## 解题思路 + +见程序注释 + +```text +F(k) = 0 * Bk[0] + 1 * Bk[1] + ... + (n-1) * Bk[n-1] +F(k-1) = 0 * Bk-1[0] + 1 * Bk-1[1] + ... + (n-1) * Bk-1[n-1] + = 0 * Bk[1] + 1 * Bk[2] + ... + (n-2) * Bk[n-1] + (n-1) * Bk[0] + +Then, + +F(k) - F(k-1) = Bk[1] + Bk[2] + ... + Bk[n-1] + (1-n)Bk[0] + = (Bk[0] + ... + Bk[n-1]) - nBk[0] + = sum - nBk[0] +Thus, + +F(k) = F(k-1) + sum - nBk[0] + +What is Bk[0]? + +k = 0; B[0] = A[0]; +k = 1; B[0] = A[len-1]; +k = 2; B[0] = A[len-2]; +... +``` \ No newline at end of file diff --git a/Algorithms/0396.rotate-function/rotate-function.go b/Algorithms/0396.rotate-function/rotate-function.go new file mode 100755 index 000000000..7ec0deb04 --- /dev/null +++ b/Algorithms/0396.rotate-function/rotate-function.go @@ -0,0 +1,26 @@ +package Problem0396 + +func maxRotateFunction(a []int) int { + n := len(a) + + var F, sum int + for i := 0; i < n; i++ { + F += i * a[i] + sum += a[i] + } + + maxF := F + for i := n - 1; 1 <= i; i-- { + F += sum - n*a[i] + maxF = max(F, maxF) + } + + return maxF +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} diff --git a/Algorithms/0396.rotate-function/rotate-function_test.go b/Algorithms/0396.rotate-function/rotate-function_test.go new file mode 100755 index 000000000..7521e55fb --- /dev/null +++ b/Algorithms/0396.rotate-function/rotate-function_test.go @@ -0,0 +1,36 @@ +package Problem0396 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + A []int + ans int +}{ + + {[]int{4, 3, 2, 6}, 26}, + + // 可以有多个 testcase +} + +func Test_maxRotateFunction(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, maxRotateFunction(tc.A), "输入:%v", tc) + } +} + +func Benchmark_maxRotateFunction(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + maxRotateFunction(tc.A) + } + } +} diff --git a/Algorithms/0397.integer-replacement/README.md b/Algorithms/0397.integer-replacement/README.md new file mode 100755 index 000000000..6e941631e --- /dev/null +++ b/Algorithms/0397.integer-replacement/README.md @@ -0,0 +1,42 @@ +# [397. Integer Replacement](https://leetcode.com/problems/integer-replacement/) + +## 题目 + +Given a positive integer n and you can do operations as follow: + +1. If n is even, replace n with n/2. +1. If n is odd, you can replace n with either n + 1 or n - 1. + +What is the minimum number of replacements needed for n to become 1? + +Example 1: + +```text +Input: +8 + +Output: +3 + +Explanation: +8 -> 4 -> 2 -> 1 +``` + +Example 2: + +```text +Input: +7 + +Output: +4 + +Explanation: +7 -> 8 -> 4 -> 2 -> 1 +or +7 -> 6 -> 3 -> 2 -> 1 +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0397.integer-replacement/integer-replacement.go b/Algorithms/0397.integer-replacement/integer-replacement.go new file mode 100755 index 000000000..0acd3b5a5 --- /dev/null +++ b/Algorithms/0397.integer-replacement/integer-replacement.go @@ -0,0 +1,32 @@ +package Problem0397 + +func integerReplacement(n int) int { + // rec[i] == integerReplacement(i) + rec := make(map[int]int) + rec[1] = 0 + + var ir func(int) int + ir = func(i int) int { + // 已经计算过的 i,可以直接从 rec 中读取出来 + if n, ok := rec[i]; ok { + return n + } + + if i%2 == 0 { + rec[i] = ir(i/2) + 1 + return rec[i] + } + + rec[i] = min(ir(i+1), ir(i-1)) + 1 + return rec[i] + } + + return ir(n) +} + +func min(a, b int) int { + if a < b { + return a + } + return b +} diff --git a/Algorithms/0397.integer-replacement/integer-replacement_test.go b/Algorithms/0397.integer-replacement/integer-replacement_test.go new file mode 100755 index 000000000..20a27453c --- /dev/null +++ b/Algorithms/0397.integer-replacement/integer-replacement_test.go @@ -0,0 +1,40 @@ +package Problem0397 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + n int + ans int +}{ + + {8, 3}, + + {1234567891, 42}, + + {7, 4}, + + // 可以有多个 testcase +} + +func Test_integerReplacement(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, integerReplacement(tc.n), "输入:%v", tc) + } +} + +func Benchmark_integerReplacement(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + integerReplacement(tc.n) + } + } +} diff --git a/Algorithms/0398.random-pick-index/README.md b/Algorithms/0398.random-pick-index/README.md new file mode 100755 index 000000000..5de3424ef --- /dev/null +++ b/Algorithms/0398.random-pick-index/README.md @@ -0,0 +1,25 @@ +# [398. Random Pick Index](https://leetcode.com/problems/random-pick-index/) + +## 题目 + +Given an array of integers with possible duplicates, randomly output the index of a given target number. You can assume that the given target number must exist in the array. + +Note: +The array size can be very large. Solution that uses too much extra space will not pass the judge. + +Example: + +```text +int[] nums = new int[] {1,2,3,3,3}; +Solution solution = new Solution(nums); + +// pick(3) should return either index 2, 3, or 4 randomly. Each index should have equal probability of returning. +solution.pick(3); + +// pick(1) should return 0. Since in the array only nums[0] is equal to 1. +solution.pick(1); +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0398.random-pick-index/random-pick-index.go b/Algorithms/0398.random-pick-index/random-pick-index.go new file mode 100755 index 000000000..cca01e302 --- /dev/null +++ b/Algorithms/0398.random-pick-index/random-pick-index.go @@ -0,0 +1,28 @@ +package Problem0398 + +import "math/rand" + +// Solution 是答案所需的数据结构 +type Solution struct { + m map[int][]int +} + +// Constructor 构建了 Solution +func Constructor(nums []int) Solution { + m := make(map[int][]int, len(nums)) + for i, v := range nums { + m[v] = append(m[v], i) + } + return Solution{m: m} +} + +// Pick 随机出现 target 在 nums 中的索引号 +func (s *Solution) Pick(target int) int { + return s.m[target][rand.Intn(len(s.m[target]))] +} + +/** + * Your Solution object will be instantiated and called as such: + * obj := Constructor(nums); + * param_1 := obj.Pick(target); + */ diff --git a/Algorithms/0398.random-pick-index/random-pick-index_test.go b/Algorithms/0398.random-pick-index/random-pick-index_test.go new file mode 100755 index 000000000..62353b82e --- /dev/null +++ b/Algorithms/0398.random-pick-index/random-pick-index_test.go @@ -0,0 +1,28 @@ +package Problem0398 + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_Constructor(t *testing.T) { + ast := assert.New(t) + + nums := []int{1, 2, 2, 3, 3, 3} + // all index of 1 + is1 := []int{0} + // all index of 2 + is2 := []int{1, 2} + // all index of 3 + is3 := []int{3, 4, 5} + + s := Constructor(nums) + + ast.Contains(is1, s.Pick(1), "无法正确第返回 1 的索引号") + + ast.Contains(is2, s.Pick(2), "无法正确第返回 2 的索引号") + + ast.Contains(is3, s.Pick(3), "无法正确第返回 3 的索引号") + +} diff --git a/Algorithms/0399.evaluate-division/README.md b/Algorithms/0399.evaluate-division/README.md new file mode 100755 index 000000000..e5ff4cd9f --- /dev/null +++ b/Algorithms/0399.evaluate-division/README.md @@ -0,0 +1,24 @@ +# [399. Evaluate Division](https://leetcode.com/problems/evaluate-division/) + +## 题目 + +Equations are given in the format A / B = k, where A and B are variables represented as strings, and k is a real number (floating point number). Given some queries, return the answers. If the answer does not exist, return -1.0. + +Example: + +```text +Given a / b = 2.0, b / c = 3.0. queries are: a / c = ?, b / a = ?, a / e = ?, a / a = ?, x / x = ? . return [6.0, 0.5, -1.0, 1.0, -1.0 ]. + +The input is: vector> equations, vector& values, vector> queries , where equations.size() == values.size(), and the values are positive. This represents the equations. Return vector. + +According to the example above: +equations = [ ["a", "b"], ["b", "c"] ], +values = [2.0, 3.0], +queries = [ ["a", "c"], ["b", "a"], ["a", "e"], ["a", "a"], ["x", "x"] ]. + +The input is always valid. You may assume that evaluating the queries will result in no division by zero and there is no contradiction. +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0399.evaluate-division/evaluate-division.go b/Algorithms/0399.evaluate-division/evaluate-division.go new file mode 100755 index 000000000..48c94eca5 --- /dev/null +++ b/Algorithms/0399.evaluate-division/evaluate-division.go @@ -0,0 +1,72 @@ +package Problem0399 + +func calcEquation(equations [][]string, values []float64, queries [][]string) []float64 { + // 建立变量之间的转换关系 + m := make(map[string]map[string]float64) + for i, e := range equations { + a, b := e[0], e[1] + v := values[i] + // 添加 a / b 的记录 + if _, ok := m[a]; !ok { + m[a] = make(map[string]float64) + } + m[a][b] = 1.0 / v + // 添加 b / a 的记录 + if _, ok := m[b]; !ok { + m[b] = make(map[string]float64) + } + m[b][a] = v + } + + // 逐个搜索 queries 的结果 + res := make([]float64, len(queries)) + for i, q := range queries { + res[i] = bfs(m, q[0], q[1]) + } + + return res +} + +type entry struct { + s string + f float64 +} + +func bfs(m map[string]map[string]float64, a, b string) float64 { + _, ok := m[a] + if !ok { + return -1.0 + } + _, ok = m[b] + if !ok { + return -1.0 + } + + if a == b { + return 1.0 + } + + isVisited := make(map[string]bool) + queue := []entry{{a, 1.0}} + + for len(queue) > 0 { + e := queue[0] + queue = queue[1:] + if e.s == b { + // 找到了 b + return 1.0 / e.f + } + + if isVisited[e.s] { + continue + } + + isVisited[e.s] = true + + for k, v := range m[e.s] { + queue = append(queue, entry{k, v * e.f}) + } + } + //没有找到 b + return -1.0 +} diff --git a/Algorithms/0399.evaluate-division/evaluate-division_test.go b/Algorithms/0399.evaluate-division/evaluate-division_test.go new file mode 100755 index 000000000..17be44c18 --- /dev/null +++ b/Algorithms/0399.evaluate-division/evaluate-division_test.go @@ -0,0 +1,67 @@ +package Problem0399 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + equations [][]string + values []float64 + queries [][]string + ans []float64 +}{ + + { + [][]string{[]string{"x1", "x2"}, []string{"x2", "x3"}, []string{"x1", "x4"}, []string{"x2", "x5"}}, + []float64{3.0, 0.5, 3.4, 5.6}, + [][]string{[]string{"x2", "x4"}, []string{"x1", "x5"}, []string{"x1", "x3"}, []string{"x5", "x5"}, []string{"x5", "x1"}, []string{"x3", "x4"}, []string{"x4", "x3"}, []string{"x6", "x6"}, []string{"x0", "x0"}}, + []float64{1.13333, 16.80000, 1.50000, 1.00000, 0.05952, 2.26667, 0.44118, -1.00000, -1.00000}, + }, + + { + [][]string{[]string{"a", "b"}, []string{"b", "c"}}, + []float64{2.0, 3.0}, + [][]string{[]string{"a", "c"}, []string{"b", "a"}, []string{"a", "e"}, []string{"a", "a"}, []string{"x", "x"}}, + []float64{6.0, 0.5, -1.0, 1.0, -1.0}, + }, + + { + [][]string{[]string{"a", "b"}, []string{"e", "f"}, []string{"b", "e"}}, + []float64{3.4, 1.4, 2.3}, + [][]string{[]string{"b", "a"}, []string{"a", "f"}, []string{"f", "f"}, []string{"e", "e"}, []string{"c", "c"}, []string{"a", "c"}, []string{"f", "e"}}, + []float64{0.29412, 10.94800, 1.00000, 1.00000, -1.00000, -1.00000, 0.71429}, + }, + + { + [][]string{[]string{"a", "b"}, []string{"c", "d"}}, + []float64{1.0, 1.0}, + [][]string{[]string{"a", "c"}, []string{"b", "d"}, []string{"b", "a"}, []string{"d", "c"}}, + []float64{-1.00000, -1.00000, 1.00000, 1.00000}, + }, + + // 可以有多个 testcase +} + +func Test_calcEquation(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ans := calcEquation(tc.equations, tc.values, tc.queries) + for i := range ans { + ast.InDelta(tc.ans[i], ans[i], 0.0001) + } + } +} + +func Benchmark_calcEquation(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + calcEquation(tc.equations, tc.values, tc.queries) + } + } +} diff --git a/Algorithms/0400.nth-digit/README.md b/Algorithms/0400.nth-digit/README.md new file mode 100755 index 000000000..403a6268d --- /dev/null +++ b/Algorithms/0400.nth-digit/README.md @@ -0,0 +1,35 @@ +# [400. Nth Digit](https://leetcode.com/problems/nth-digit/) + +## 题目 + +Find the nth digit of the infinite integer sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ... + +Note: +n is positive and will fit within the range of a 32-bit signed integer (n < 231). + +Example 1: + +```text +Input: +3 + +Output: +3 +``` + +Example 2: + +```text +Input: +11 + +Output: +0 + +Explanation: +The 11th digit of the sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ... is a 0, which is part of the number 10. +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0400.nth-digit/nth-digit.go b/Algorithms/0400.nth-digit/nth-digit.go new file mode 100755 index 000000000..d29c191f4 --- /dev/null +++ b/Algorithms/0400.nth-digit/nth-digit.go @@ -0,0 +1,33 @@ +package Problem0400 + +func findNthDigit(n int) int { + // step 1: 寻找拥有 NthDigit 的数的位数 digits + // 有 count 个数 是 digits 位数 + count, digits := 9, 1 + // num 是最小的 digits 位数 + num := 1 + for n-count*digits > 0 { + n -= count * digits + count *= 10 + digits++ + num *= 10 + } + + // step 2: 找到拥有 NthDigit 的数 + // index 是 NthDigit 是目标数中的 索引号 + index := n % digits + if index == 0 { + index = digits + } + // 让 num 成为拥有 NthDigit 的数 + num += n / digits + if index == digits { + num-- + } + + // step 3: 找到 NthDigit + for i := index; i < digits; i++ { + num /= 10 + } + return num % 10 +} diff --git a/Algorithms/0400.nth-digit/nth-digit_test.go b/Algorithms/0400.nth-digit/nth-digit_test.go new file mode 100755 index 000000000..5da187906 --- /dev/null +++ b/Algorithms/0400.nth-digit/nth-digit_test.go @@ -0,0 +1,49 @@ +package Problem0400 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + n int + ans int +}{ + + { + 2147483647, + 2, + }, + + { + 3, + 3, + }, + + { + 11, + 0, + }, + + // 可以有多个 testcase +} + +func Test_findNthDigit(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findNthDigit(tc.n), "输入:%v", tc) + } +} + +func Benchmark_findNthDigit(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findNthDigit(tc.n) + } + } +} diff --git a/Algorithms/0401.binary-watch/README.md b/Algorithms/0401.binary-watch/README.md new file mode 100755 index 000000000..de340b495 --- /dev/null +++ b/Algorithms/0401.binary-watch/README.md @@ -0,0 +1,28 @@ +# [401. Binary Watch](https://leetcode.com/problems/binary-watch/) + +## 题目 + +A binary watch has 4 LEDs on the top which represent the hours (0-11), and the 6 LEDs on the bottom represent the minutes (0-59). + +Each LED represents a zero or one, with the least significant bit on the right. + +![p](https://upload.wikimedia.org/wikipedia/commons/8/8b/Binary_clock_samui_moon.jpg) +For example, the above binary watch reads "3:25". + +Given a non-negative integer n which represents the number of LEDs that are currently on, return all possible times the watch could represent. + +Example: + +```text +Input: n = 1Return: ["1:00", "2:00", "4:00", "8:00", "0:01", "0:02", "0:04", "0:08", "0:16", "0:32"] +``` + +Note: + +- The order of output does not matter. +- The hour must not contain a leading zero, for example "01:00" is not valid, it should be "1:00". +- The minute must be consist of two digits and may contain a leading zero, for example "10:2" is not valid, it should be "10:02". + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0401.binary-watch/binary-watch.go b/Algorithms/0401.binary-watch/binary-watch.go new file mode 100755 index 000000000..7c4a1e5fc --- /dev/null +++ b/Algorithms/0401.binary-watch/binary-watch.go @@ -0,0 +1,49 @@ +package Problem0401 + +import ( + "fmt" + "sort" +) + +func readBinaryWatch(n int) []string { + res := make([]string, 0, 8) + leds := make([]bool, 10) + + var dfs func(int, int) + dfs = func(idx, n int) { + var h, m int + if n == 0 { + m, h = get(leds[:6]), get(leds[6:]) + if h < 12 && m < 60 { + res = append(res, fmt.Sprintf("%d:%02d", h, m)) + } + return + } + + for i := idx; i < len(leds)-n+1; i++ { + leds[i] = true + dfs(i+1, n-1) + leds[i] = false + } + } + + dfs(0, n) + + sort.Strings(res) + + return res +} + +var bs = []int{1, 2, 4, 8, 16, 32} + +func get(leds []bool) int { + var sum int + size := len(leds) + for i := 0; i < size; i++ { + if leds[i] { + sum += bs[i] + } + } + + return sum +} diff --git a/Algorithms/0401.binary-watch/binary-watch_test.go b/Algorithms/0401.binary-watch/binary-watch_test.go new file mode 100755 index 000000000..e84b47e7a --- /dev/null +++ b/Algorithms/0401.binary-watch/binary-watch_test.go @@ -0,0 +1,46 @@ +package Problem0401 + +import ( + "fmt" + "sort" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + num int + ans []string +}{ + + { + 1, + []string{"0:01", "0:02", "0:04", "0:08", "0:16", "0:32", "1:00", "2:00", "4:00", "8:00"}, + }, + + { + 2, + []string{"0:03", "0:05", "0:06", "0:09", "0:10", "0:12", "0:17", "0:18", "0:20", "0:24", "0:33", "0:34", "0:36", "0:40", "0:48", "1:01", "1:02", "1:04", "1:08", "1:16", "1:32", "2:01", "2:02", "2:04", "2:08", "2:16", "2:32", "3:00", "4:01", "4:02", "4:04", "4:08", "4:16", "4:32", "5:00", "6:00", "8:01", "8:02", "8:04", "8:08", "8:16", "8:32", "9:00", "10:00"}, + }, + // 可以有多个 testcase +} + +func Test_readBinaryWatch(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ans := readBinaryWatch(tc.num) + sort.Strings(tc.ans) + ast.Equal(tc.ans, ans, "输入:%v", tc) + } +} + +func Benchmark_readBinaryWatch(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + readBinaryWatch(tc.num) + } + } +} diff --git a/Algorithms/0402.remove-k-digits/README.md b/Algorithms/0402.remove-k-digits/README.md new file mode 100755 index 000000000..ac295cbff --- /dev/null +++ b/Algorithms/0402.remove-k-digits/README.md @@ -0,0 +1,38 @@ +# [402. Remove K Digits](https://leetcode.com/problems/remove-k-digits/) + +## 题目 + +Given a non-negative integer num represented as a string, remove k digits from the number so that the new number is the smallest possible. + +Note: + +- The length of num is less than 10002 and will be ≥ k. +- The given num does not contain any leading zero. + +Example 1: + +```text +Input: num = "1432219", k = 3 +Output: "1219" +Explanation: Remove the three digits 4, 3, and 2 to form the new number 1219 which is the smallest. +``` + +Example 2: + +```text +Input: num = "10200", k = 1 +Output: "200" +Explanation: Remove the leading 1 and the number is 200. Note that the output must not contain leading zeroes. +``` + +Example 3: + +```text +Input: num = "10", k = 2 +Output: "0" +Explanation: Remove all the digits from the number and it is left with nothing which is 0. +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0402.remove-k-digits/remove-k-digits.go b/Algorithms/0402.remove-k-digits/remove-k-digits.go new file mode 100755 index 000000000..8814eba4a --- /dev/null +++ b/Algorithms/0402.remove-k-digits/remove-k-digits.go @@ -0,0 +1,30 @@ +package Problem0402 + +func removeKdigits(num string, k int) string { + // 返回值的长度 + digits := len(num) - k + stack := make([]byte, len(num)) + top := 0 + + for i := range num { + // 在还能删除的前提下 + // 从上往下,删除 stack 中所有比 num[i] 大的数 + for top > 0 && stack[top-1] > num[i] && k > 0 { + top-- + k-- + } + stack[top] = num[i] + top++ + } + + // 处理开头的 '0' + i := 0 + for i < digits && stack[i] == '0' { + i++ + } + + if i == digits { + return "0" + } + return string(stack[i:digits]) +} diff --git a/Algorithms/0402.remove-k-digits/remove-k-digits_test.go b/Algorithms/0402.remove-k-digits/remove-k-digits_test.go new file mode 100755 index 000000000..4c01ca1d3 --- /dev/null +++ b/Algorithms/0402.remove-k-digits/remove-k-digits_test.go @@ -0,0 +1,71 @@ +package Problem0402 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + num string + k int + ans string +}{ + + { + "10200", + 1, + "200", + }, + + { + "1234567890", + 9, + "0", + }, + + { + "1111111", + 3, + "1111", + }, + + { + "102030", + 3, + "0", + }, + + { + "1432219", + 3, + "1219", + }, + + { + "10", + 2, + "0", + }, + + // 可以有多个 testcase +} + +func Test_removeKdigits(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, removeKdigits(tc.num, tc.k), "输入:%v", tc) + } +} + +func Benchmark_removeKdigits(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + removeKdigits(tc.num, tc.k) + } + } +} diff --git a/Algorithms/0403.frog-jump/README.md b/Algorithms/0403.frog-jump/README.md new file mode 100755 index 000000000..838774cf0 --- /dev/null +++ b/Algorithms/0403.frog-jump/README.md @@ -0,0 +1,44 @@ +# [403. Frog Jump](https://leetcode.com/problems/frog-jump/) + +## 题目 + +A frog is crossing a river. The river is divided into x units and at each unit there may or may not exist a stone. The frog can jump on a stone, but it must not jump into the water. + +Given a list of stones' positions (in units) in sorted ascending order, determine if the frog is able to cross the river by landing on the last stone. Initially, the frog is on the first stone and assume the first jump must be 1 unit. + +If the frog's last jump was k units, then its next jump must be either k - 1, k, or k + 1 units. Note that the frog can only jump in the forward direction. + +Note: + +1. The number of stones is ≥ 2 and is < 1,100. +1. Each stone's position will be a non-negative integer < 231. +1. The first stone's position is always 0. + +Example 1: + +```text +[0,1,3,5,6,8,12,17] + +There are a total of 8 stones. +The first stone at the 0th unit, second stone at the 1st unit, +third stone at the 3rd unit, and so on... +The last stone at the 17th unit. + +Return true. The frog can jump to the last stone by jumping +1 unit to the 2nd stone, then 2 units to the 3rd stone, then +2 units to the 4th stone, then 3 units to the 6th stone, +4 units to the 7th stone, and 5 units to the 8th stone. +``` + +Example 2: + +```text +[0,1,2,3,4,8,9,11] + +Return false. There is no way to jump to the last stone as +the gap between the 5th and 6th stone is too large. +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0403.frog-jump/frog-jump.go b/Algorithms/0403.frog-jump/frog-jump.go new file mode 100755 index 000000000..da83cfbf5 --- /dev/null +++ b/Algorithms/0403.frog-jump/frog-jump.go @@ -0,0 +1,43 @@ +package Problem0403 + +func canCross(stones []int) bool { + n := len(stones) + if n == 0 || stones[1] != 1 { + return false + } + + if n == 1 || n == 2 { + return true + } + + last := stones[n-1] + + hs := make(map[int]bool, n) + + for i := 0; i < n; i++ { + if i > 3 && stones[i] > stones[i-1]*2 { + return false + } + hs[stones[i]] = true + } + + var dfs func(map[int]bool, int, int) bool + dfs = func(hs map[int]bool, pos, jump int) bool { + if pos+jump-1 == last || pos+jump == last || pos+jump+1 == last { + return true + } + // i-- + // 先跨大步 + for i := 1; -1 <= i; i-- { + if jump+i > 0 && hs[pos+jump+i] { + if dfs(hs, pos+jump+i, jump+i) { + return true + } + } + } + + return false + } + + return dfs(hs, 1, 1) +} diff --git a/Algorithms/0403.frog-jump/frog-jump_test.go b/Algorithms/0403.frog-jump/frog-jump_test.go new file mode 100755 index 000000000..62d405037 --- /dev/null +++ b/Algorithms/0403.frog-jump/frog-jump_test.go @@ -0,0 +1,44 @@ +package Problem0403 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + stones []int + ans bool +}{ + + // 这个 test case 很耗时 + {[]int{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 1035}, true}, + {[]int{0, 1, 3, 5, 6, 8, 12, 17}, true}, + {[]int{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15}, true}, + {[]int{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 16}, false}, + {[]int{0, 1}, true}, + {[]int{0, 1, 2, 3, 4, 8, 9, 11}, false}, + {[]int{0, 1, 2, 3, 4, 18, 9, 11}, false}, + {[]int{0, 2, 2, 3, 4, 8, 9, 11}, false}, + + // 可以有多个 testcase +} + +func Test_canCross(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, canCross(tc.stones), "输入:%v", tc) + } +} + +func Benchmark_canCross(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + canCross(tc.stones) + } + } +} diff --git a/Algorithms/0404.sum-of-left-leaves/README.md b/Algorithms/0404.sum-of-left-leaves/README.md new file mode 100755 index 000000000..d2a6dc302 --- /dev/null +++ b/Algorithms/0404.sum-of-left-leaves/README.md @@ -0,0 +1,20 @@ +# [404. Sum of Left Leaves](https://leetcode.com/problems/sum-of-left-leaves/) + +## 题目 + +Find the sum of all left leaves in a given binary tree. + +Example: + +```text + 3 + / \ + 9 20 + / \ + 15 7 +There are two left leaves in the binary tree, with values 9 and 15 respectively. Return 24. +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0404.sum-of-left-leaves/sum-of-left-leaves.go b/Algorithms/0404.sum-of-left-leaves/sum-of-left-leaves.go new file mode 100755 index 000000000..a361fa63a --- /dev/null +++ b/Algorithms/0404.sum-of-left-leaves/sum-of-left-leaves.go @@ -0,0 +1,23 @@ +package Problem0404 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" +) + +type TreeNode = kit.TreeNode + +func sumOfLeftLeaves(root *TreeNode) int { + if root==nil { + return 0 + } + + if root.Left == nil{ + return sumOfLeftLeaves(root.Right) + } + + if root.Left.Left == nil && root.Left.Right==nil { + return root.Left.Val + sumOfLeftLeaves(root.Right) + } + + return sumOfLeftLeaves(root.Left)+ sumOfLeftLeaves(root.Right) +} diff --git a/Algorithms/0404.sum-of-left-leaves/sum-of-left-leaves_test.go b/Algorithms/0404.sum-of-left-leaves/sum-of-left-leaves_test.go new file mode 100755 index 000000000..0d4e28f6a --- /dev/null +++ b/Algorithms/0404.sum-of-left-leaves/sum-of-left-leaves_test.go @@ -0,0 +1,50 @@ +package Problem0404 + +import ( + "fmt" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + pre, in []int + ans int +}{ + + { + []int{3, 7, 9, 8, 20, 15, 7}, + []int{9, 7, 8, 3, 15, 20, 7}, + 24, + }, + + { + []int{3, 9, 20, 15, 7}, + []int{9, 3, 15, 20, 7}, + 24, + }, + + // 可以有多个 testcase +} + +func Test_sumOfLeftLeaves(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + root := kit.PreIn2Tree(tc.pre, tc.in) + ast.Equal(tc.ans, sumOfLeftLeaves(root), "输入:%v", tc) + } +} + +func Benchmark_sumOfLeftLeaves(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + root := kit.PreIn2Tree(tc.pre, tc.in) + sumOfLeftLeaves(root) + } + } +} diff --git a/Algorithms/0405.convert-a-number-to-hexadecimal/README.md b/Algorithms/0405.convert-a-number-to-hexadecimal/README.md new file mode 100755 index 000000000..ecbc3c291 --- /dev/null +++ b/Algorithms/0405.convert-a-number-to-hexadecimal/README.md @@ -0,0 +1,36 @@ +# [405. Convert a Number to Hexadecimal](https://leetcode.com/problems/convert-a-number-to-hexadecimal/) + +## 题目 + +Given an integer, write an algorithm to convert it to hexadecimal. For negative integer, two’s complement method is used. + +Note: + +1. All letters in hexadecimal (a-f) must be in lowercase. +1. The hexadecimal string must not contain extra leading 0s. If the number is zero, it is represented by a single zero character '0'; otherwise, the first character in the hexadecimal string will not be the zero character. +1. The given number is guaranteed to fit within the range of a 32-bit signed integer. +1. You must not use any method provided by the library which converts/formats the number to hex directly. + +Example 1: + +```text +Input: +26 + +Output: +"1a" +``` + +Example 2: + +```text +Input: +-1 + +Output: +"ffffffff" +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0405.convert-a-number-to-hexadecimal/convert-a-number-to-hexadecimal.go b/Algorithms/0405.convert-a-number-to-hexadecimal/convert-a-number-to-hexadecimal.go new file mode 100755 index 000000000..c28ec8fdc --- /dev/null +++ b/Algorithms/0405.convert-a-number-to-hexadecimal/convert-a-number-to-hexadecimal.go @@ -0,0 +1,34 @@ +package Problem0405 + +var h = []string{ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "a", + "b", + "c", + "d", + "e", + "f", +} + +func toHex(num int) string { + if num == 0 { + return "0" + } + + hex := "" + for i := 0; i < 8 && num != 0; i++ { + hex = h[num&15] + hex + num >>= 4 + } + + return hex +} diff --git a/Algorithms/0405.convert-a-number-to-hexadecimal/convert-a-number-to-hexadecimal_test.go b/Algorithms/0405.convert-a-number-to-hexadecimal/convert-a-number-to-hexadecimal_test.go new file mode 100755 index 000000000..bffeca1a1 --- /dev/null +++ b/Algorithms/0405.convert-a-number-to-hexadecimal/convert-a-number-to-hexadecimal_test.go @@ -0,0 +1,49 @@ +package Problem0405 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + num int + ans string +}{ + + { + 0, + "0", + }, + + { + 26, + "1a", + }, + + { + -1, + "ffffffff", + }, + + // 可以有多个 testcase +} + +func Test_toHex(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, toHex(tc.num), "输入:%v", tc) + } +} + +func Benchmark_toHex(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + toHex(tc.num) + } + } +} diff --git a/Algorithms/0406.queue-reconstruction-by-height/README.md b/Algorithms/0406.queue-reconstruction-by-height/README.md new file mode 100755 index 000000000..95b08bb17 --- /dev/null +++ b/Algorithms/0406.queue-reconstruction-by-height/README.md @@ -0,0 +1,22 @@ +# [406. Queue Reconstruction by Height](https://leetcode.com/problems/queue-reconstruction-by-height/) + +## 题目 + +Suppose you have a random list of people standing in a queue. Each person is described by a pair of integers (h, k), where h is the height of the person and k is the number of people in front of this person who have a height greater than or equal to h. Write an algorithm to reconstruct the queue. + +Note: +The number of people is less than 1,100. + +Example + +```text +Input: +[[7,0], [4,4], [7,1], [5,0], [6,1], [5,2]] + +Output: +[[5,0], [7,0], [5,2], [6,1], [4,4], [7,1]] +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0406.queue-reconstruction-by-height/queue-reconstruction-by-height.go b/Algorithms/0406.queue-reconstruction-by-height/queue-reconstruction-by-height.go new file mode 100755 index 000000000..b86adb18f --- /dev/null +++ b/Algorithms/0406.queue-reconstruction-by-height/queue-reconstruction-by-height.go @@ -0,0 +1,54 @@ +package Problem0406 + +import "sort" + +func reconstructQueue(people [][]int) [][]int { + res := make([][]int, 0, len(people)) + + // 按照 persons 的排序方式,对 people 进行排序 + sort.Sort(persons(people)) + + // 把 person 插入到 res[idx] 上 + insert := func(idx int, person []int) { + res = append(res, person) + // 插入到末尾 + if len(res)-1 == idx { + return + } + // 插入到中间位置 + copy(res[idx+1:], res[idx:]) + res[idx] = person + } + + // 对于 res[i] 来说, + // 如果把 res[:i] 中所有 h < res[i] 的元素全部删除后,得到的 res' + // len(res') == res[i][1] + // + // 0 1 2 3 4 5 + // [4,k] 的 k 在 [[5,0], [7,0], [5,2], [6,1], [4,4], [7,1]] 中与其索引号一致 + // [5,k] 的 k 在 [[5,0], [7,0], [5,2], [6,1], [7,1]] 中与其索引号一致 + // [6,k] 的 k 在 [[7,0], [6,1], [7,1]] 中与其索引号一致 + // [7,k] 的 k 在 [[7,0], [7,1]] 中与其索引号一致 + // 下面的 for 循环,就是上面的删除的逆过程 + for _, p := range people { + insert(p[1], p) + } + + return res +} + +// persons 实现了 sort.Interface 接口 +type persons [][]int + +func (p persons) Len() int { return len(p) } + +// 以 h 的降序为主 +// 以 k 的升序为辅 +func (p persons) Less(i, j int) bool { + if p[i][0] == p[j][0] { + return p[i][1] < p[j][1] + } + return p[i][0] > p[j][0] +} + +func (p persons) Swap(i, j int) { p[i], p[j] = p[j], p[i] } diff --git a/Algorithms/0406.queue-reconstruction-by-height/queue-reconstruction-by-height_test.go b/Algorithms/0406.queue-reconstruction-by-height/queue-reconstruction-by-height_test.go new file mode 100755 index 000000000..92fac4d68 --- /dev/null +++ b/Algorithms/0406.queue-reconstruction-by-height/queue-reconstruction-by-height_test.go @@ -0,0 +1,39 @@ +package Problem0406 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + people [][]int + ans [][]int +}{ + + { + [][]int{{7, 0}, {4, 4}, {7, 1}, {5, 0}, {6, 1}, {5, 2}}, + [][]int{{5, 0}, {7, 0}, {5, 2}, {6, 1}, {4, 4}, {7, 1}}, + }, + + // 可以有多个 testcase +} + +func Test_reconstructQueue(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, reconstructQueue(tc.people), "输入:%v", tc) + } +} + +func Benchmark_reconstructQueue(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + reconstructQueue(tc.people) + } + } +} diff --git a/Algorithms/0407.trapping-rain-water-ii/README.md b/Algorithms/0407.trapping-rain-water-ii/README.md new file mode 100755 index 000000000..915be05ee --- /dev/null +++ b/Algorithms/0407.trapping-rain-water-ii/README.md @@ -0,0 +1,33 @@ +# [407. Trapping Rain Water II](https://leetcode.com/problems/trapping-rain-water-ii/) + +## 题目 + +Given an m x n matrix of positive integers representing the height of each unit cell in a 2D elevation map, compute the volume of water it is able to trap after raining. + +Note: +Both m and n are less than 110. The height of each unit cell is greater than 0 and is less than 20,000. + +Example: + +```text +Given the following 3x6 height map: +[ + [1,4,3,1,3,2], + [3,2,1,3,2,4], + [2,3,3,2,3,1] +] + +Return 4. +``` + +![p1](https://leetcode.com/static/images/problemset/rainwater_empty.png) + +The above image represents the elevation map [[1,4,3,1,3,2],[3,2,1,3,2,4],[2,3,3,2,3,1]] before the rain. + +![p2](https://leetcode.com/static/images/problemset/rainwater_fill.png) + +After the rain, water are trapped between the blocks. The total volume of water trapped is 4. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0407.trapping-rain-water-ii/trapping-rain-water-ii.go b/Algorithms/0407.trapping-rain-water-ii/trapping-rain-water-ii.go new file mode 100755 index 000000000..41d19f063 --- /dev/null +++ b/Algorithms/0407.trapping-rain-water-ii/trapping-rain-water-ii.go @@ -0,0 +1,101 @@ +package Problem0407 + +import ( + "container/heap" +) + +func trapRainWater(hs [][]int) int { + if len(hs) < 3 || len(hs[0]) < 3 { + return 0 + } + m, n := len(hs), len(hs[0]) + + pq := make(priorityQueue, 0, m*2+n*2) + + isVisited := make([][]bool, m) + for i := range isVisited { + isVisited[i] = make([]bool, n) + } + + // 把四周的格子先放入 pq + for i := 0; i < m; i++ { + isVisited[i][0] = true + isVisited[i][n-1] = true + pq = append(pq, cell{row: i, col: 0, height: hs[i][0]}) + pq = append(pq, cell{row: i, col: n - 1, height: hs[i][n-1]}) + } + for j := 0; j < n; j++ { + isVisited[0][j] = true + isVisited[m-1][j] = true + pq = append(pq, cell{row: 0, col: j, height: hs[0][j]}) + pq = append(pq, cell{row: m - 1, col: j, height: hs[m-1][j]}) + } + // 放入后,再初始化 pq,更节约时间 + heap.Init(&pq) + + dirs := [][]int{{-1, 0}, {1, 0}, {0, -1}, {0, 1}} + vol := 0 + + // 此刻,pq 中的 cell 实际上把整个区域围了起来 + // 从围墙 pq 中,挑选最矮的木板 c + // 统计 c 周围的 cell 能装多少水 + // 然后把 c 周围的 cell 更新高度后,放入 pq,变成新的木板 + // 不断重复上述过程,围墙不断变小,直到统计完成所有的 cell + for len(pq) > 0 { + // 最矮的木板是 c + c := heap.Pop(&pq).(cell) + // 依次检查 c 周围的 4 个方向的 cell + for _, d := range dirs { + i := c.row + d[0] + j := c.col + d[1] + + if 0 <= i && i < m && 0 <= j && j < n && !isVisited[i][j] { + isVisited[i][j] = true + // 统计容量 + vol += max(0, c.height-hs[i][j]) + // 给 pq 添加新的木板 + heap.Push(&pq, cell{row: i, col: j, height: max(hs[i][j], c.height)}) + } + } + } + + return vol +} + +type cell struct { + row, col, height int +} + +type priorityQueue []cell + +func (pq priorityQueue) Len() int { return len(pq) } + +func (pq priorityQueue) Less(i, j int) bool { + return pq[i].height < pq[j].height +} + +func (pq priorityQueue) Swap(i, j int) { + pq[i], pq[j] = pq[j], pq[i] +} + +// Push 往 pq 中放 item +func (pq *priorityQueue) Push(x interface{}) { + item := x.(cell) + *pq = append(*pq, item) +} + +// Pop 从 pq 中取出最优先的 item +func (pq *priorityQueue) Pop() interface{} { + old := *pq + n := len(old) + item := old[n-1] + *pq = old[0 : n-1] + return item +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} diff --git a/Algorithms/0407.trapping-rain-water-ii/trapping-rain-water-ii_test.go b/Algorithms/0407.trapping-rain-water-ii/trapping-rain-water-ii_test.go new file mode 100755 index 000000000..d912517fb --- /dev/null +++ b/Algorithms/0407.trapping-rain-water-ii/trapping-rain-water-ii_test.go @@ -0,0 +1,83 @@ +package Problem0407 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + heightMap [][]int + ans int +}{ + + { + [][]int{ + []int{5, 5, 5, 1}, + []int{5, 1, 1, 5}, + }, + 0, + }, + + { + [][]int{ + []int{5, 5, 5, 1}, + []int{5, 1, 1, 5}, + []int{5, 1, 5, 5}, + []int{5, 2, 5, 8}, + }, + 3, + }, + + { + [][]int{ + []int{1, 4, 3, 1, 3, 2}, + []int{3, 2, 1, 3, 2, 4}, + []int{2, 3, 3, 2, 3, 1}, + }, + 4, + }, + + { + [][]int{ + []int{12, 13, 1, 12}, + []int{13, 4, 13, 12}, + []int{13, 8, 10, 12}, + []int{12, 13, 12, 12}, + []int{13, 13, 13, 13}, + }, + 14, + }, + + { + [][]int{ + []int{5, 5, 5, 5, 5}, + []int{5, 1, 1, 1, 5}, + []int{5, 1, 5, 5, 5}, + []int{5, 1, 1, 1, 5}, + // 水会从这一行的 1 这里全部流出去,现有方法无法克服这种情况 + []int{5, 5, 5, 1, 5}, + }, + 0, + }, + // 可以有多个 testcase +} + +func Test_trapRainWater(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, trapRainWater(tc.heightMap), "输入:%v", tc) + } +} + +func Benchmark_trapRainWater(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + trapRainWater(tc.heightMap) + } + } +} diff --git a/Algorithms/0409.longest-palindrome/README.md b/Algorithms/0409.longest-palindrome/README.md new file mode 100755 index 000000000..2c3c518aa --- /dev/null +++ b/Algorithms/0409.longest-palindrome/README.md @@ -0,0 +1,25 @@ +# [409. Longest Palindrome](https://leetcode.com/problems/longest-palindrome/) + +## 题目 + +Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those letters. + +This is case sensitive, for example "Aa" is not considered a palindrome here. + +Note: +Assume the length of given string will not exceed 1,010. + +Example: + +```text +Input:"abccccdd" + +Output:7 + +Explanation: +One longest palindrome that can be built is "dccaccd", whose length is 7. +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0409.longest-palindrome/longest-palindrome.go b/Algorithms/0409.longest-palindrome/longest-palindrome.go new file mode 100755 index 000000000..912223a36 --- /dev/null +++ b/Algorithms/0409.longest-palindrome/longest-palindrome.go @@ -0,0 +1,25 @@ +package Problem0409 + +func longestPalindrome(s string) int { + res := 0 + a := [123]int{} // 'z' 的 ASCII 码为 122 + for i := range s { + a[s[i]]++ + } + + // hasOdd 表示存在数目为奇数的元素,可以放在中间 + hasOdd := 0 + for i := range a { + if a[i] == 0 { + continue + } + if a[i]&1 == 0 { + res += a[i] + } else { + res += a[i] - 1 + hasOdd = 1 + } + } + + return res + hasOdd +} diff --git a/Algorithms/0409.longest-palindrome/longest-palindrome_test.go b/Algorithms/0409.longest-palindrome/longest-palindrome_test.go new file mode 100755 index 000000000..14021e1c9 --- /dev/null +++ b/Algorithms/0409.longest-palindrome/longest-palindrome_test.go @@ -0,0 +1,49 @@ +package Problem0409 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + ans int +}{ + + { + "zzzzzz", + 6, + }, + + { + "AAAAAA", + 6, + }, + + { + "abccccdd", + 7, + }, + + // 可以有多个 testcase +} + +func Test_longestPalindrome(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, longestPalindrome(tc.s), "输入:%v", tc) + } +} + +func Benchmark_longestPalindrome(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + longestPalindrome(tc.s) + } + } +} diff --git a/Algorithms/0410.split-array-largest-sum/README.md b/Algorithms/0410.split-array-largest-sum/README.md new file mode 100755 index 000000000..7ac7df23e --- /dev/null +++ b/Algorithms/0410.split-array-largest-sum/README.md @@ -0,0 +1,31 @@ +# [410. Split Array Largest Sum](https://leetcode.com/problems/split-array-largest-sum/) + +## 题目 + +Given an array which consists of non-negative integers and an integer m, you can split the array into m non-empty continuous subarrays. Write an algorithm to minimize the largest sum among these m subarrays. + +Note: +If n is the length of array, assume the following constraints are satisfied: + +1. 1 ≤ n ≤ 1000 +1. 1 ≤ m ≤ min(50, n) + +Examples: + +```text +Input: +nums = [7,2,5,10,8] +m = 2 + +Output: +18 + +Explanation: +There are four ways to split nums into two subarrays. +The best way is to split it into [7,2,5] and [10,8], +where the largest sum among the two subarrays is only 18. +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0410.split-array-largest-sum/split-array-largest-sum.go b/Algorithms/0410.split-array-largest-sum/split-array-largest-sum.go new file mode 100755 index 000000000..92d2d0719 --- /dev/null +++ b/Algorithms/0410.split-array-largest-sum/split-array-largest-sum.go @@ -0,0 +1,56 @@ +package Problem0410 + +func splitArray(nums []int, m int) int { + var max, n, sum int + for _, n = range nums { + sum += n + if max < n { + max = n + } + } + + if m == 1 { + return sum + } + + // guess 是我们猜想的答案 + // isBigger 用来判断是否 guess >= 实际结果 + isBigger := func(guess int) bool { + // nums 会被切分成连续的 子数组 + // 切分标准是,这段连续子数组的和是 不超过 guess 的最大值 + count, subSum := 1, 0 + for _, n = range nums { + subSum += n + if subSum > guess { + subSum = n + // n 已经是第 count+1 个子数组的成员了 + // 所以,count++ + count++ + if count > m { + // 导致 nums 被切分的段数超过了 m + // 可知 guess < 实际结果 + return false + } + } + } + // guess >= 实际结果 + // 才能导致 nums 被切分的段数,不超过 m + return true + } + + // 二分查找 + // 可知, max<= res <= sum + // 那就在 max 和 sum 之间,进行二分查找 + l, r := max, sum + var mid int + for l <= r { + mid = l + (r-l)>>1 + if isBigger(mid) { + r = mid - 1 + } else { + l = mid + 1 + } + } + + return l +} diff --git a/Algorithms/0410.split-array-largest-sum/split-array-largest-sum_test.go b/Algorithms/0410.split-array-largest-sum/split-array-largest-sum_test.go new file mode 100755 index 000000000..2c99f5b1b --- /dev/null +++ b/Algorithms/0410.split-array-largest-sum/split-array-largest-sum_test.go @@ -0,0 +1,65 @@ +package Problem0410 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + m int + ans int +}{ + + { + []int{1, 3, 5, 7, 9, 11}, + 3, + 16, + }, + + { + []int{1, 2, 2, 2}, + 3, + 3, + }, + + { + []int{1, 2, 2, 2}, + 1, + 7, + }, + + { + []int{7, 2, 5, 10, 8}, + 2, + 18, + }, + + { + []int{10, 5, 13, 4, 8, 4, 5, 11, 14, 9, 16, 10, 20, 8}, + 8, + 25, + }, + + // 可以有多个 testcase +} + +func Test_splitArray(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, splitArray(tc.nums, tc.m), "输入:%v", tc) + } +} + +func Benchmark_splitArray(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + splitArray(tc.nums, tc.m) + } + } +} diff --git a/Algorithms/0412.fizz-buzz/README.md b/Algorithms/0412.fizz-buzz/README.md new file mode 100755 index 000000000..cb1c26ea9 --- /dev/null +++ b/Algorithms/0412.fizz-buzz/README.md @@ -0,0 +1,36 @@ +# [412. Fizz Buzz](https://leetcode.com/problems/fizz-buzz/) + +## 题目 + +Write a program that outputs the string representation of numbers from 1 to n. + +But for multiples of three it should output “Fizz” instead of the number and for the multiples of five output “Buzz”. For numbers which are multiples of both three and five output “FizzBuzz”. + +Example: + +```text +n = 15, + +Return: +[ + "1", + "2", + "Fizz", + "4", + "Buzz", + "Fizz", + "7", + "8", + "Fizz", + "Buzz", + "11", + "Fizz", + "13", + "14", + "FizzBuzz" +] +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0412.fizz-buzz/fizz-buzz.go b/Algorithms/0412.fizz-buzz/fizz-buzz.go new file mode 100755 index 000000000..c7d002e12 --- /dev/null +++ b/Algorithms/0412.fizz-buzz/fizz-buzz.go @@ -0,0 +1,23 @@ +package Problem0412 + +import "strconv" + +func fizzBuzz(n int) []string { + res := make([]string, n) + + for i := range res { + x := i + 1 + switch { + case x%15 == 0: + res[i] = "FizzBuzz" + case x%5 == 0: + res[i] = "Buzz" + case x%3 == 0: + res[i] = "Fizz" + default: + res[i] = strconv.Itoa(x) + } + } + + return res +} diff --git a/Algorithms/0412.fizz-buzz/fizz-buzz_test.go b/Algorithms/0412.fizz-buzz/fizz-buzz_test.go new file mode 100755 index 000000000..c73c2d572 --- /dev/null +++ b/Algorithms/0412.fizz-buzz/fizz-buzz_test.go @@ -0,0 +1,55 @@ +package Problem0412 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + n int + ans []string +}{ + + { + 15, + []string{ + "1", + "2", + "Fizz", + "4", + "Buzz", + "Fizz", + "7", + "8", + "Fizz", + "Buzz", + "11", + "Fizz", + "13", + "14", + "FizzBuzz", + }, + }, + + // 可以有多个 testcase +} + +func Test_fizzBuzz(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, fizzBuzz(tc.n), "输入:%v", tc) + } +} + +func Benchmark_fizzBuzz(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + fizzBuzz(tc.n) + } + } +} diff --git a/Algorithms/0413.arithmetic-slices/README.md b/Algorithms/0413.arithmetic-slices/README.md new file mode 100755 index 000000000..262ec1dce --- /dev/null +++ b/Algorithms/0413.arithmetic-slices/README.md @@ -0,0 +1,39 @@ +# [413. Arithmetic Slices](https://leetcode.com/problems/arithmetic-slices/) + +## 题目 + +A sequence of number is called arithmetic if it consists of at least three elements and if the difference between any two consecutive elements is the same. + +For example, these are arithmetic sequence: + +```text +1, 3, 5, 7, 9 +7, 7, 7, 7 +3, -1, -5, -9 +``` + +The following sequence is not arithmetic. + +```text +1, 1, 2, 5, 7 +``` + +A zero-indexed array A consisting of N numbers is given. A slice of that array is any pair of integers (P, Q) such that 0 <= P < Q < N. + +A slice (P, Q) of array A is called arithmetic if the sequence: + +A[P], A[p + 1], ..., A[Q - 1], A[Q] is arithmetic. In particular, this means that P + 1 < Q. + +The function should return the number of arithmetic slices in the array A. + +Example: + +```text +A = [1, 2, 3, 4] + +return: 3, for 3 arithmetic slices in A: [1, 2, 3], [2, 3, 4] and [1, 2, 3, 4] itself. +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0413.arithmetic-slices/arithmetic-slices.go b/Algorithms/0413.arithmetic-slices/arithmetic-slices.go new file mode 100755 index 000000000..238a3ddcd --- /dev/null +++ b/Algorithms/0413.arithmetic-slices/arithmetic-slices.go @@ -0,0 +1,21 @@ +package Problem0413 + +func numberOfArithmeticSlices(a []int) int { + if len(a) < 3 { + return 0 + } + res := 0 + + var i, j = 0, 0 + for i < len(a) { + j = i + 2 + for j < len(a) && a[j]-a[j-1] == a[j-1]-a[j-2] { + j++ + } + j-- + res += (j - i - 1) * (j - i) / 2 + i = j + } + + return res +} diff --git a/Algorithms/0413.arithmetic-slices/arithmetic-slices_test.go b/Algorithms/0413.arithmetic-slices/arithmetic-slices_test.go new file mode 100755 index 000000000..5948d3357 --- /dev/null +++ b/Algorithms/0413.arithmetic-slices/arithmetic-slices_test.go @@ -0,0 +1,40 @@ +package Problem0413 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + A []int + ans int +}{ + + {[]int{}, 0}, + {[]int{1, 2, 3, 4}, 3}, + {[]int{2, 1, 2, 3, 4}, 3}, + {[]int{1, 2, 3, 4, 4}, 3}, + {[]int{1, 1, 1, 2, 2, 2}, 2}, + + // 可以有多个 testcase +} + +func Test_numberOfArithmeticSlices(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, numberOfArithmeticSlices(tc.A), "输入:%v", tc) + } +} + +func Benchmark_numberOfArithmeticSlices(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + numberOfArithmeticSlices(tc.A) + } + } +} diff --git a/Algorithms/0415.add-strings/README.md b/Algorithms/0415.add-strings/README.md new file mode 100755 index 000000000..baef3047c --- /dev/null +++ b/Algorithms/0415.add-strings/README.md @@ -0,0 +1,16 @@ +# [415. Add Strings](https://leetcode.com/problems/add-strings/) + +## 题目 + +Given two non-negative integers `num1` and `num2` represented as string, return the sum of `num1` and `num2`. + +Note: + +1. The length of both `num1` and `num2` is < 5100. +1. Both `num1` and `num2` contains only digits 0-9. +1. Both `num1` and `num2` does not contain any leading zero. +1. You must not use any built-in BigInteger library or convert the inputs to integer directly. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0415.add-strings/add-strings.go b/Algorithms/0415.add-strings/add-strings.go new file mode 100755 index 000000000..aa0caee05 --- /dev/null +++ b/Algorithms/0415.add-strings/add-strings.go @@ -0,0 +1,41 @@ +package Problem0415 + +func addStrings(s1, s2 string) string { + // 确保 n1 <= n2 + if len(s1) > len(s2) { + s1, s2 = s2, s1 + } + + n1, n2 := len(s1), len(s2) + a1, a2 := []byte(s1), []byte(s2) + + carry := byte(0) + + // buf 保存 []byte 格式的答案 + buf := make([]byte, n2+1) + buf[0] = '1' + + i := 1 + for i <= n2 { + // a1 和 a2 相加 + if i <= n1 { + buf[n2+1-i] = a1[n1-i] - '0' + } + buf[n2+1-i] += a2[n2-i] + carry + + // 处理进位问题 + if buf[n2+1-i] > '9' { + buf[n2+1-i] -= 10 + carry = byte(1) + } else { + carry = byte(0) + } + + i++ + } + + if carry == 1 { + return string(buf) + } + return string(buf[1:]) +} diff --git a/Algorithms/0415.add-strings/add-strings_test.go b/Algorithms/0415.add-strings/add-strings_test.go new file mode 100755 index 000000000..5f5f086bd --- /dev/null +++ b/Algorithms/0415.add-strings/add-strings_test.go @@ -0,0 +1,53 @@ +package Problem0415 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + num1 string + num2 string + ans string +}{ + + { + "12", + "3", + "15", + }, + + { + "2", + "3", + "5", + }, + + { + "7", + "8", + "15", + }, + + // 可以有多个 testcase +} + +func Test_addStrings(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, addStrings(tc.num1, tc.num2), "输入:%v", tc) + } +} + +func Benchmark_addStrings(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + addStrings(tc.num1, tc.num2) + } + } +} diff --git a/Algorithms/0416.partition-equal-subset-sum/README.md b/Algorithms/0416.partition-equal-subset-sum/README.md new file mode 100755 index 000000000..5befb8099 --- /dev/null +++ b/Algorithms/0416.partition-equal-subset-sum/README.md @@ -0,0 +1,34 @@ +# [416. Partition Equal Subset Sum](https://leetcode.com/problems/partition-equal-subset-sum/) + +## 题目 + +Given a `non-empty` array containing `only positive integers`, find if the array can be partitioned into two subsets such that the sum of elements in both subsets is equal. + +Note: + +1. Each of the array element will not exceed 100. +1. The array size will not exceed 200. + +Example 1: + +```text +Input: [1, 5, 11, 5] + +Output: true + +Explanation: The array can be partitioned as [1, 5, 5] and [11]. +``` + +Example 2: + +```text +Input: [1, 2, 3, 5] + +Output: false + +Explanation: The array cannot be partitioned into equal sum subsets. +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0416.partition-equal-subset-sum/partition-equal-subset-sum.go b/Algorithms/0416.partition-equal-subset-sum/partition-equal-subset-sum.go new file mode 100755 index 000000000..24591ded2 --- /dev/null +++ b/Algorithms/0416.partition-equal-subset-sum/partition-equal-subset-sum.go @@ -0,0 +1,47 @@ +package Problem0416 + +// 01背包问题 +func canPartition(nums []int) bool { + sum := 0 + for _, n := range nums { + sum += n + } + + if sum&1 == 1 { + return false + } + + sum = sum >> 1 + n := len(nums) + + // dp[i][j] 表示 nums[:i] 中的元素,可以找出一些,他们的和为 j + dp := make([][]bool, n+1) + for i := range dp { + dp[i] = make([]bool, sum+1) + } + + for i := 0; i < n+1; i++ { + // 从任意多个元素中,挑选 0 个元素出来,其和是 0 + dp[i][0] = true + } + + for j := 1; j < sum+1; j++ { + // 从包含 0 个元素的 nums 中,挑不出来元素,使得其和为 j + dp[0][j] = false + } + + for i := 1; i < n+1; i++ { + for j := 1; j < sum+1; j++ { + dp[i][j] = dp[i-1][j] + if j >= nums[i-1] { + // nums[:i] 比 nums[:i-1] 多了 nums[i-1],所以 + // 要么,nums[:i-1] 中有元素可以合成 j-nums[i-1] + // 要么,nums[:i-1] 中有元素可以合成 j + // nums[:i] 中才可能有元素合成 j + dp[i][j] = dp[i][j] || dp[i-1][j-nums[i-1]] + } + } + } + + return dp[n][sum] +} diff --git a/Algorithms/0416.partition-equal-subset-sum/partition-equal-subset-sum_test.go b/Algorithms/0416.partition-equal-subset-sum/partition-equal-subset-sum_test.go new file mode 100755 index 000000000..e76e2b853 --- /dev/null +++ b/Algorithms/0416.partition-equal-subset-sum/partition-equal-subset-sum_test.go @@ -0,0 +1,43 @@ +package Problem0416 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans bool +}{ + {[]int{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 100}, false}, + + {[]int{1, 2, 5}, false}, + + {[]int{1, 5, 11, 5}, true}, + + {[]int{1, 3, 5, 7, 9, 11}, true}, + + {[]int{1, 2, 3, 5}, false}, + + // 可以有多个 testcase +} + +func Test_canPartition(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, canPartition(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_canPartition(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + canPartition(tc.nums) + } + } +} diff --git a/Algorithms/0417.pacific-atlantic-water-flow/README.md b/Algorithms/0417.pacific-atlantic-water-flow/README.md new file mode 100755 index 000000000..6faf00908 --- /dev/null +++ b/Algorithms/0417.pacific-atlantic-water-flow/README.md @@ -0,0 +1,38 @@ +# [417. Pacific Atlantic Water Flow](https://leetcode.com/problems/pacific-atlantic-water-flow/) + +## 题目 + +Given an m x n matrix of non-negative integers representing the height of each unit cell in a continent, the "Pacific ocean" touches the left and top edges of the matrix and the "Atlantic ocean" touches the right and bottom edges. + +Water can only flow in four directions (up, down, left, or right) from a cell to another one with height equal or lower. + +Find the list of grid coordinates where water can flow to both the Pacific and Atlantic ocean. + +Note: + +1. The order of returned grid coordinates does not matter. +1. Both m and n are less than 150. + +Example: + +```text +Given the following 5x5 matrix: + + Pacific ~ ~ ~ ~ ~ + ~ 1 2 2 3 (5) * + ~ 3 2 3 (4) (4) * + ~ 2 4 (5) 3 1 * + ~ (6) (7) 1 4 5 * + ~ (5) 1 1 2 4 * + * * * * * Atlantic + +Return: + +[[0, 4], [1, 3], [1, 4], [2, 2], [3, 0], [3, 1], [4, 0]] (positions with parentheses in above matrix). +``` + +## 解题思路 + +见程序注释 + +![100](417.100.png) \ No newline at end of file diff --git a/Algorithms/0417.pacific-atlantic-water-flow/pacific-atlantic-water-flow.go b/Algorithms/0417.pacific-atlantic-water-flow/pacific-atlantic-water-flow.go new file mode 100755 index 000000000..5b3b20b93 --- /dev/null +++ b/Algorithms/0417.pacific-atlantic-water-flow/pacific-atlantic-water-flow.go @@ -0,0 +1,68 @@ +package Problem0417 + +func pacificAtlantic(mat [][]int) [][]int { + res := [][]int{} + if len(mat) == 0 || len(mat[0]) == 0 { + return res + } + + m, n := len(mat), len(mat[0]) + + // p[i][j] 表示,[i][j] 可以让水流到 Pacific 的点 + // a[i][j] 表示,[i][j] 可以让水流到 Atlantic 的点 + p, a := make([][]bool, m), make([][]bool, m) + for i := 0; i < m; i++ { + p[i] = make([]bool, n) + a[i] = make([]bool, n) + } + + // pQueue 是所有能够让水流到 Pacific 的点的队列 + // aQueue 是所有能够让水流到 Atlantic 的点的队列 + // 初始化 pQueue 和 aQueue + pQueue := [][]int{} + aQueue := [][]int{} + for i := 0; i < m; i++ { + p[i][0] = true + pQueue = append(pQueue, []int{i, 0}) + a[i][n-1] = true + aQueue = append(aQueue, []int{i, n - 1}) + } + for j := 0; j < n; j++ { + p[0][j] = true + pQueue = append(pQueue, []int{0, j}) + a[m-1][j] = true + aQueue = append(aQueue, []int{m - 1, j}) + } + + ds := [][]int{{-1, 0}, {1, 0}, {0, -1}, {0, 1}} + + bfs := func(queue [][]int, rec [][]bool) { + for len(queue) > 0 { + c := queue[0] + queue = queue[1:] + for _, d := range ds { + i, j := c[0]+d[0], c[1]+d[1] + if 0 <= i && i < m && + 0 <= j && j < n && + !rec[i][j] && + mat[c[0]][c[1]] <= mat[i][j] { + rec[i][j] = true + queue = append(queue, []int{i, j}) + } + } + } + } + + bfs(pQueue, p) + bfs(aQueue, a) + + for i := 0; i < m; i++ { + for j := 0; j < n; j++ { + if p[i][j] && a[i][j] { + res = append(res, []int{i, j}) + } + } + } + + return res +} diff --git a/Algorithms/0417.pacific-atlantic-water-flow/pacific-atlantic-water-flow_test.go b/Algorithms/0417.pacific-atlantic-water-flow/pacific-atlantic-water-flow_test.go new file mode 100755 index 000000000..1d69f0558 --- /dev/null +++ b/Algorithms/0417.pacific-atlantic-water-flow/pacific-atlantic-water-flow_test.go @@ -0,0 +1,58 @@ +package Problem0417 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + matrix [][]int + ans [][]int +}{ + + { + [][]int{}, + [][]int{}, + }, + + { + [][]int{ + {1, 2, 2, 3, 5}, + {3, 2, 3, 4, 4}, + {2, 4, 5, 3, 1}, + {6, 7, 1, 4, 5}, + {5, 1, 1, 2, 4}, + }, + [][]int{ + {0, 4}, + {1, 3}, + {1, 4}, + {2, 2}, + {3, 0}, + {3, 1}, + {4, 0}, + }, + }, + + // 可以有多个 testcase +} + +func Test_pacificAtlantic(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, pacificAtlantic(tc.matrix), "输入:%v", tc) + } +} + +func Benchmark_pacificAtlantic(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + pacificAtlantic(tc.matrix) + } + } +} diff --git a/Algorithms/0419.battleships-in-a-board/README.md b/Algorithms/0419.battleships-in-a-board/README.md new file mode 100755 index 000000000..fd208d43d --- /dev/null +++ b/Algorithms/0419.battleships-in-a-board/README.md @@ -0,0 +1,35 @@ +# [419. Battleships in a Board](https://leetcode.com/problems/battleships-in-a-board/) + +## 题目 + +Given an 2D board, count how many battleships are in it. The battleships are represented with 'X's, empty slots are represented with '.'s. You may assume the following rules: + +1. You receive a valid board, made of only battleships or empty slots. +1. Battleships can only be placed horizontally or vertically. In other words, they can only be made of the shape 1xN (1 row, N columns) or Nx1 (N rows, 1 column), where N can be of any size. +1. At least one horizontal or vertical cell separates between two battleships - there are no adjacent battleships. + +Example: + +```text +X..X +...X +...X +``` + +In the above board there are 2 battleships. + +Invalid Example: + +```text +...X +XXXX +...X +``` + +This is an invalid board that you will not receive - as battleships will always have a cell separating between them. + +Follow up:Could you do it in one-pass, using only O(1) extra memory and without modifying the value of the board? + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0419.battleships-in-a-board/battleships-in-a-board.go b/Algorithms/0419.battleships-in-a-board/battleships-in-a-board.go new file mode 100755 index 000000000..53417a14b --- /dev/null +++ b/Algorithms/0419.battleships-in-a-board/battleships-in-a-board.go @@ -0,0 +1,21 @@ +package Problem0419 + +func countBattleships(board [][]byte) int { + if len(board) == 0 { + return 0 + } + + m, n := len(board), len(board[0]) + + count := 0 + for i := 0; i < m; i++ { + for j := 0; j < n; j++ { + if board[i][j] == 'X' && (i == 0 || board[i-1][j] == '.') && (j == 0 || board[i][j-1] == '.') { + // count 只有在遇到的 battleship 的左上角的 'X' 后,才会 ++ + count++ + } + } + } + + return count +} diff --git a/Algorithms/0419.battleships-in-a-board/battleships-in-a-board_test.go b/Algorithms/0419.battleships-in-a-board/battleships-in-a-board_test.go new file mode 100755 index 000000000..9f30f3f5f --- /dev/null +++ b/Algorithms/0419.battleships-in-a-board/battleships-in-a-board_test.go @@ -0,0 +1,64 @@ +package Problem0419 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + board [][]byte + ans int +}{ + + { + [][]byte{}, + 0, + }, + + { + [][]byte{ + []byte("X.X.X"), + }, + 3, + }, + + { + [][]byte{ + []byte("X..X"), + []byte("...X"), + []byte("X..X"), + }, + 3, + }, + + { + [][]byte{ + []byte("X..X"), + []byte("...X"), + []byte("...X"), + }, + 2, + }, + + // 可以有多个 testcase +} + +func Test_countBattleships(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, countBattleships(tc.board), "输入:%v", tc) + } +} + +func Benchmark_countBattleships(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + countBattleships(tc.board) + } + } +} diff --git a/Algorithms/0420.strong-password-checker/README.md b/Algorithms/0420.strong-password-checker/README.md new file mode 100755 index 000000000..8a28965ba --- /dev/null +++ b/Algorithms/0420.strong-password-checker/README.md @@ -0,0 +1,17 @@ +# [420. Strong Password Checker](https://leetcode.com/problems/strong-password-checker/) + +## 题目 + +A password is considered strong if below conditions are all met: + + 1. It has at least 6 characters and at most 20 characters. + 1. It must contain at least one lowercase letter, at least one uppercase letter, and at least one digit. + 1. It must NOT contain three repeating characters in a row ("...aaa..." is weak, but "...aa...a..." is strong, assuming other conditions are met). + +Write a function strongPasswordChecker(s), that takes a string s as input, and return the MINIMUM change required to make s a strong password. If s is already strong, return 0. + +Insertion, deletion or replace of any one character are all considered as one change. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0420.strong-password-checker/strong-password-checker.go b/Algorithms/0420.strong-password-checker/strong-password-checker.go new file mode 100755 index 000000000..54aff8ab8 --- /dev/null +++ b/Algorithms/0420.strong-password-checker/strong-password-checker.go @@ -0,0 +1,100 @@ +package Problem0420 + +func strongPasswordChecker(s string) int { + // 统计缺少的字符类型 + l, u, d, missingType := 1, 1, 1, 3 + for i := range s { + if 0 < l && 'a' <= s[i] && s[i] <= 'z' { + l-- + missingType-- + } + if 0 < u && 'A' <= s[i] && s[i] <= 'Z' { + u-- + missingType-- + } + if 0 < d && '0' <= s[i] && s[i] <= '9' { + d-- + missingType-- + } + + if missingType == 0 { + break + } + } + + var replace, ones, twos int + + for p := 0; p+2 < len(s); p++ { + if s[p] != s[p+1] || s[p+1] != s[p+2] { + continue + } + + // 出现连续重复的情况 + // 统计连续重复的长度 + repeatingLen := 2 + for p+2 < len(s) && s[p] == s[p+2] { + repeatingLen++ + p++ + } + + // 对于重复的字符串 + // 每3个字符,都需要替换为另外的字符 + replace += repeatingLen / 3 + if repeatingLen%3 == 0 { + // 但是,如果字符串的长度超过了 20 的话 + // 对于 此种情况 + // 也可以通过 删除 1 个重复的字符,来减少替换的次数 + ones++ + } else if repeatingLen%3 == 1 { + // 但是,如果字符串的长度超过了 20 的话 + // 对于 此种情况 + // 也可以通过 删除 2 个连续的重复的字符,来减少替换的次数 + twos++ + } + } + + // 长度不够 + // 使用缺失的类型来凑 + if len(s) < 6 { + return max(missingType, 6-len(s)) + } + + // 长度足够 + // 替换的时候,优先替换为缺失的类型 + if len(s) <= 20 { + return max(missingType, replace) + } + + // 长度太长了 + // + // 需要删除的数量 + delete := len(s) - 20 + + // 删除工作一定是要完成的,要不然长度要求就不能被满足了 + // 但是,删除那些连续重复的字符,可以减少 replace 的次数 + // 所以 + // 删除的时候,优先删除那些可以减少替换的连续重复字符 + + // 通过删除 1 个重复的字符,可以减少 1 个 replace 的个数 + replace -= min(delete, ones) + // 通过删除 2 个重复的字符,可以减少 1 个 replace 的个数 + replace -= min(max(delete-ones, 0), twos*2) / 2 + // 通过删除 3 个连续重复的字符,可以减少 1 个 replace 的个数 + replace -= max(delete-ones-2*twos, 0) / 3 + + return delete + max(missingType, replace) +} + +func min(a, b int) int { + if a < b { + return a + } + return b +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} diff --git a/Algorithms/0420.strong-password-checker/strong-password-checker_test.go b/Algorithms/0420.strong-password-checker/strong-password-checker_test.go new file mode 100755 index 000000000..d825cf738 --- /dev/null +++ b/Algorithms/0420.strong-password-checker/strong-password-checker_test.go @@ -0,0 +1,46 @@ +package Problem0420 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + ans int +}{ + + {"", 6}, + + {"aB3aB3", 0}, + + {"aaaaaaaaaaaaaaaaaaaaa", 7}, + + {"aaaaaaaaaaaaaaaaaaaaaa", 8}, + + {"aaaAaaaAaaaAaaaAaaaAa", 5}, + + {"aadssfasfASDaaaaaaaaaaASDfA235234ADFadfASDFa234324", 30}, + + // 可以有多个 testcase +} + +func Test_strongPasswordChecker(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, strongPasswordChecker(tc.s), "输入:%v", tc) + } +} + +func Benchmark_strongPasswordChecker(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + strongPasswordChecker(tc.s) + } + } +} diff --git a/Algorithms/0421.maximum-xor-of-two-numbers-in-an-array/README.md b/Algorithms/0421.maximum-xor-of-two-numbers-in-an-array/README.md new file mode 100755 index 000000000..57c69e2be --- /dev/null +++ b/Algorithms/0421.maximum-xor-of-two-numbers-in-an-array/README.md @@ -0,0 +1,23 @@ +# [421. Maximum XOR of Two Numbers in an Array](https://leetcode.com/problems/maximum-xor-of-two-numbers-in-an-array/) + +## 题目 + +Given a non-empty array of numbers, a0, a1, a2, … , an-1, where 0 ≤ ai < 231. + +Find the maximum result of ai XOR aj, where 0 ≤ i, j < n. + +Could you do this in O(n) runtime? + +Example: + +```text +Input: [3, 10, 5, 25, 2, 8] + +Output: 28 + +Explanation: The maximum result is 5 ^ 25 = 28. +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0421.maximum-xor-of-two-numbers-in-an-array/maximum-xor-of-two-numbers-in-an-array.go b/Algorithms/0421.maximum-xor-of-two-numbers-in-an-array/maximum-xor-of-two-numbers-in-an-array.go new file mode 100755 index 000000000..96d35d817 --- /dev/null +++ b/Algorithms/0421.maximum-xor-of-two-numbers-in-an-array/maximum-xor-of-two-numbers-in-an-array.go @@ -0,0 +1,29 @@ +package Problem0421 + +func findMaximumXOR(nums []int) int { + var max, mask int + + // Basically we use the fact that Num1 ^ Num2 = Result ==> Num1 ^ Result = Num2 + // We start with the highest bit since we try to find the max to build the possible + // result. All numbers with higher bits (have been processd or to be processed) are + // hashed, then we use Num1 ^ Result to look up hash, if Num2 exists, then it is a + // valid result, save it and go on to the next bit. + for i := 31; i >= 0; i-- { + mask |= 1 << uint(i) + + nMap := make(map[int]bool) + for _, num := range nums { + nMap[num&mask] = true + } + + tmp := max | (1 << uint32(i)) + for key := range nMap { + if nMap[tmp^key] { + max = tmp + break + } + } + } + + return max +} diff --git a/Algorithms/0421.maximum-xor-of-two-numbers-in-an-array/maximum-xor-of-two-numbers-in-an-array_test.go b/Algorithms/0421.maximum-xor-of-two-numbers-in-an-array/maximum-xor-of-two-numbers-in-an-array_test.go new file mode 100755 index 000000000..392f663b2 --- /dev/null +++ b/Algorithms/0421.maximum-xor-of-two-numbers-in-an-array/maximum-xor-of-two-numbers-in-an-array_test.go @@ -0,0 +1,44 @@ +package Problem0421 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans int +}{ + + { + []int{0}, + 0, + }, + + { + []int{3, 10, 5, 25, 2, 8}, + 28, + }, + + // 可以有多个 testcase +} + +func Test_findMaximumXOR(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findMaximumXOR(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_findMaximumXOR(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findMaximumXOR(tc.nums) + } + } +} diff --git a/Algorithms/0423.reconstruct-original-digits-from-english/423.100.png b/Algorithms/0423.reconstruct-original-digits-from-english/423.100.png new file mode 100644 index 000000000..6f11a0d15 Binary files /dev/null and b/Algorithms/0423.reconstruct-original-digits-from-english/423.100.png differ diff --git a/Algorithms/0423.reconstruct-original-digits-from-english/README.md b/Algorithms/0423.reconstruct-original-digits-from-english/README.md new file mode 100755 index 000000000..604757d83 --- /dev/null +++ b/Algorithms/0423.reconstruct-original-digits-from-english/README.md @@ -0,0 +1,33 @@ +# [423. Reconstruct Original Digits from English](https://leetcode.com/problems/reconstruct-original-digits-from-english/) + +## 题目 + +Given a non-empty string containing an out-of-order English representation of digits 0-9, output the digits in ascending order. + +Note: + +1. Input contains only lowercase English letters. +1. Input is guaranteed to be valid and can be transformed to its original digits. That means invalid inputs such as "abc" or "zerone" are not permitted. +1. Input length is less than 50,000. + +Example 1: + +```text +Input: "owoztneoer" + +Output: "012" +``` + +Example 2: + +```text +Input: "fviefuro" + +Output: "45" +``` + +## 解题思路 + +见程序注释 + +![100](423.100.png) \ No newline at end of file diff --git a/Algorithms/0423.reconstruct-original-digits-from-english/reconstruct-original-digits-from-english.go b/Algorithms/0423.reconstruct-original-digits-from-english/reconstruct-original-digits-from-english.go new file mode 100755 index 000000000..b1d3dd6a6 --- /dev/null +++ b/Algorithms/0423.reconstruct-original-digits-from-english/reconstruct-original-digits-from-english.go @@ -0,0 +1,52 @@ +package Problem0423 + +func originalDigits(s string) string { + if len(s) == 0 { + return "" + } + + var counts [10]int + + for i := 0; i < len(s); i++ { + c := s[i] + switch c { + case 'z': + counts[0]++ // 0 + case 'w': + counts[2]++ // 2 + case 'x': + counts[6]++ // 6 + case 'u': + counts[4]++ // 4 + case 'g': + counts[8]++ // 8 + case 's': + counts[7]++ // 7 & 6 + case 'v': + counts[5]++ // 5 & 7 + case 'h': + counts[3]++ // 3 & 8 + case 'i': + counts[9]++ // 5 & 6 & 8 & 9 + case 'o': + counts[1]++ // 1 & 2 & 4 & 0 + } + } + + counts[3] -= counts[8] + counts[7] -= counts[6] + counts[5] -= counts[7] + counts[1] -= counts[2] + counts[0] + counts[4] + counts[9] -= counts[5] + counts[6] + counts[8] + + res := make([]byte, 0, len(s)/3) + + for b := byte(0); b < 10; b++ { + for counts[b] > 0 { + res = append(res, b+'0') + counts[b]-- + } + } + + return string(res) +} diff --git a/Algorithms/0423.reconstruct-original-digits-from-english/reconstruct-original-digits-from-english_test.go b/Algorithms/0423.reconstruct-original-digits-from-english/reconstruct-original-digits-from-english_test.go new file mode 100755 index 000000000..68b16cf00 --- /dev/null +++ b/Algorithms/0423.reconstruct-original-digits-from-english/reconstruct-original-digits-from-english_test.go @@ -0,0 +1,52 @@ +package Problem0423 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + ans string +}{ + + { + "", + "", + }, + + { + "owoztneoer", + "012", + }, + + { + "zeroonetwothreefourfivesixseveneightnien", + "0123456789", + }, + + { + "fviefuro", + "45", + }, + + // 可以有多个 testcase +} + +func Test_originalDigits(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, originalDigits(tc.s), "输入:%v", tc) + } +} + +func Benchmark_originalDigits(b *testing.B) { + for i := 0; i < b.N; i++ { + originalDigits("zeroonetwothreefourfivesixseveneightnienzeroonetwothreefourfivesixseveneightnienzeroonetwothreefourfivesixseveneightnienzeroonetwothreefourfivesixseveneightnienzeroonetwothreefourfivesixseveneightnienzeroonetwothreefourfivesixseveneightnienzeroonetwothreefourfivesixseveneightnienzeroonetwothreefourfivesixseveneightnien") + } +} diff --git a/Algorithms/0424.longest-repeating-character-replacement/README.md b/Algorithms/0424.longest-repeating-character-replacement/README.md new file mode 100755 index 000000000..c704fa69a --- /dev/null +++ b/Algorithms/0424.longest-repeating-character-replacement/README.md @@ -0,0 +1,39 @@ +# [424. Longest Repeating Character Replacement](https://leetcode.com/problems/longest-repeating-character-replacement/) + +## 题目 + +Given a string that consists of only uppercase English letters, you can replace any letter in the string with another letter at most k times. Find the length of a longest substring containing all repeating letters you can get after performing the above operations. + +Note: +Both the string's length and k will not exceed 104. + +Example 1: + +```text +Input: +s = "ABAB", k = 2 + +Output: +4 + +Explanation: +Replace the two 'A's with two 'B's or vice versa. +``` + +Example 2: + +```text +Input: +s = "AABABBA", k = 1 + +Output: +4 + +Explanation: +Replace the one 'A' in the middle with 'B' and form "AABBBBA". +The substring "BBBB" has the longest repeating letters, which is 4. +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0424.longest-repeating-character-replacement/longest-repeating-character-replacement.go b/Algorithms/0424.longest-repeating-character-replacement/longest-repeating-character-replacement.go new file mode 100755 index 000000000..799cd80d8 --- /dev/null +++ b/Algorithms/0424.longest-repeating-character-replacement/longest-repeating-character-replacement.go @@ -0,0 +1,51 @@ +package Problem0424 + +func characterReplacement(s string, k int) int { + // count 在 for 循环中,记录了 + // s[left:right+1] 中的各个字母出现的次数 + // max 保存着整个 for 循环中, count 中每次创下的新高 + var max, left int + count := [128]int{} + + // 在 for 循环中, s[left:right+1] + // 要么,由于 max 变大, 向右 扩张 一格 + // 要么,由于 max 不变, 向右 移动 一格 + // 但是,s[left:right+1] 的长度,始终是 characterReplacement(s[:right+1], k) 的解 + // 虽然,s[left:right+1] 不一定是那个符合题意的 subString + for right := 0; right < len(s); right++ { + count[s[right]]++ + max = Max(max, count[s[right]]) + + // right - left + 1 - max == k 的含义是 + // 在 s[left:right+1] 中有 max 个相同的字母 X 和 k 个不同于 X 的字母 + // 通过 k 次修改后, s[left:right+1] 就全是 X 了 + // 此时 s[left:right+1] 就是满足 characterReplacement(s[:right+1], k) 的解的那个 subString + + // right - left + 1 - max > k 的含义是 + // s[left:right+1] 中,不同于 X 的字母,多于 k 个 + // 无法通过 k 次修改,把 s[left:right+1] 中的字母全部变成 X + // 只好把 s[left:right+1] 向右移动一格 + // 以便让 len(s[left:right+1]) 始终是 characterReplacement(s[:right+1], k) 的解 + if right-left+1-max > k { + // 减去 s[left] 的统计值 + count[s[left]]-- + left++ + } + } + + // len(s) == right + 1 + // 所以,最终解是 len(s) - left + return len(s) - left + + // 其实,这个答案更直观 + // return min(len(s), max + k) + // 使用 min 是因为有可能不用修改 k 次,s 就变成全部一样的字母了 +} + +// Max 返回 a 和 b 中的较大值 +func Max(a, b int) int { + if a > b { + return a + } + return b +} diff --git a/Algorithms/0424.longest-repeating-character-replacement/longest-repeating-character-replacement_test.go b/Algorithms/0424.longest-repeating-character-replacement/longest-repeating-character-replacement_test.go new file mode 100755 index 000000000..25c6b3c4a --- /dev/null +++ b/Algorithms/0424.longest-repeating-character-replacement/longest-repeating-character-replacement_test.go @@ -0,0 +1,65 @@ +package Problem0424 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + k int + ans int +}{ + + { + "BBBABBBCDEFGHIJKLMNOPQ", + 1, + 7, + }, + + { + "AABABBA", + 1, + 4, + }, + + { + "AAAA", + 2, + 4, + }, + + { + "ABAA", + 0, + 2, + }, + + { + "ABAB", + 2, + 4, + }, + + // 可以有多个 testcase +} + +func Test_characterReplacement(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, characterReplacement(tc.s, tc.k), "输入:%v", tc) + } +} + +func Benchmark_characterReplacement(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + characterReplacement(tc.s, tc.k) + } + } +} diff --git a/Algorithms/0432.all-oone-data-structure/432.100.png b/Algorithms/0432.all-oone-data-structure/432.100.png new file mode 100644 index 000000000..9f5e679d5 Binary files /dev/null and b/Algorithms/0432.all-oone-data-structure/432.100.png differ diff --git a/Algorithms/0432.all-oone-data-structure/README.md b/Algorithms/0432.all-oone-data-structure/README.md new file mode 100755 index 000000000..cabeb17ad --- /dev/null +++ b/Algorithms/0432.all-oone-data-structure/README.md @@ -0,0 +1,17 @@ +# [432. All O`one Data Structure](https://leetcode.com/problems/all-oone-data-structure/) + +## 题目 + +Implement a data structure supporting the following operations: + +1. Inc(Key) - Inserts a new key with value 1. Or increments an existing key by 1. Key is guaranteed to be a non-empty string. +1. Dec(Key) - If Key's value is 1, remove it from the data structure. Otherwise decrements an existing key by 1. If the key does not exist, this function does nothing. Key is guaranteed to be a non-empty string. +1. GetMaxKey() - Returns one of the keys with maximal value. If no element exists, return an empty string "". +1. GetMinKey() - Returns one of the keys with minimal value. If no element exists, return an empty string "". + +Challenge: Perform all these in O(1) time complexity. + +## 解题思路 + +见程序注释 +![100](432.100.png) \ No newline at end of file diff --git a/Algorithms/0432.all-oone-data-structure/all-oone-data-structure.go b/Algorithms/0432.all-oone-data-structure/all-oone-data-structure.go new file mode 100755 index 000000000..3883cb8e5 --- /dev/null +++ b/Algorithms/0432.all-oone-data-structure/all-oone-data-structure.go @@ -0,0 +1,146 @@ +package Problem0432 + +import "container/heap" + +// AllOne 是解题所需的结构 +type AllOne struct { + m map[string]*entry + // 利用优先队列来维护 拥有极值的 key + max maxPQ + min minPQ +} + +// Constructor initialize your data structure here. +func Constructor() AllOne { + return AllOne{m: make(map[string]*entry), + max: maxPQ{}, + min: minPQ{}, + } +} + +// Inc inserts a new key with value 1. Or increments an existing key by 1. +func (a *AllOne) Inc(key string) { + if ep, ok := a.m[key]; ok { + ep.value++ + heap.Fix(&a.max, ep.maxIndex) + heap.Fix(&a.min, ep.maxIndex) + } else { + ep = &entry{key: key, value: 1} + a.m[key] = ep + heap.Push(&a.max, ep) + heap.Push(&a.min, ep) + } +} + +// Dec decrements an existing key by 1. If Key's value is 1, remove it from the data structure. +func (a *AllOne) Dec(key string) { + if ep, ok := a.m[key]; !ok { + return + } else if ep.value == 1 { + heap.Remove(&a.max, ep.maxIndex) + heap.Remove(&a.min, ep.minIndex) + } else { + ep.value-- + heap.Fix(&a.max, ep.maxIndex) + heap.Fix(&a.min, ep.minIndex) + } +} + +// GetMaxKey returns one of the keys with maximal value. +func (a *AllOne) GetMaxKey() string { + if len(a.max) == 0 { + return "" + } + return a.max[0].key +} + +// GetMinKey returns one of the keys with Minimal value. +func (a *AllOne) GetMinKey() string { + if len(a.min) == 0 { + return "" + } + return a.min[0].key +} + +/** + * Your AllOne object will be instantiated and called as such: + * obj := Constructor(); + * obj.Inc(key); + * obj.Dec(key); + * param_3 := obj.GetMaxKey(); + * param_4 := obj.GetMinKey(); + */ + +// entry 是 priorityQueue 中的元素 +type entry struct { + key string + value int + maxIndex int + minIndex int +} + +// priorityQueue implements heap.Interface and holds entrys. +type minPQ []*entry + +func (pq minPQ) Len() int { return len(pq) } + +func (pq minPQ) Less(i, j int) bool { + return pq[i].value < pq[j].value +} + +func (pq minPQ) Swap(i, j int) { + pq[i], pq[j] = pq[j], pq[i] + pq[i].minIndex = i + pq[j].minIndex = j +} + +// Push 往 pq 中放 entry +func (pq *minPQ) Push(x interface{}) { + n := len(*pq) + entry := x.(*entry) + entry.minIndex = n + *pq = append(*pq, entry) +} + +// Pop 从 pq 中取出最优先的 entry +func (pq *minPQ) Pop() interface{} { + old := *pq + n := len(old) + entry := old[n-1] + entry.minIndex = -1 // for safety + *pq = old[0 : n-1] + return entry +} + +// priorityQueue implements heap.Interface and holds entrys. +type maxPQ []*entry + +func (pq maxPQ) Len() int { return len(pq) } + +func (pq maxPQ) Less(i, j int) bool { + return pq[i].value > pq[j].value +} + +func (pq maxPQ) Swap(i, j int) { + pq[i], pq[j] = pq[j], pq[i] + pq[i].maxIndex = i + pq[j].maxIndex = j +} + +// Push 往 pq 中放 entry +func (pq *maxPQ) Push(x interface{}) { + n := len(*pq) + entry := x.(*entry) + entry.maxIndex = n + *pq = append(*pq, entry) +} + +// Pop 从 pq 中取出最优先的 entry +func (pq *maxPQ) Pop() interface{} { + old := *pq + n := len(old) + entry := old[n-1] + entry.maxIndex = -1 // for safety + *pq = old[0 : n-1] + return entry +} diff --git a/Algorithms/0432.all-oone-data-structure/all-oone-data-structure_test.go b/Algorithms/0432.all-oone-data-structure/all-oone-data-structure_test.go new file mode 100755 index 000000000..643c017b3 --- /dev/null +++ b/Algorithms/0432.all-oone-data-structure/all-oone-data-structure_test.go @@ -0,0 +1,53 @@ +package Problem0432 + +import ( + "strconv" + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_AllOne(t *testing.T) { + ast := assert.New(t) + + a := Constructor() + + ast.Equal("", a.GetMaxKey()) + ast.Equal("", a.GetMinKey()) + + a.Inc("6") + + ast.Equal("6", a.GetMaxKey()) + ast.Equal("6", a.GetMinKey()) + + a.Dec("6") + + ast.Equal("", a.GetMaxKey()) + ast.Equal("", a.GetMinKey()) + + maxKeys := []string{"7", "8", "9"} + minKeys := []string{"1", "2", "3"} + + for i := 0; i < 3; i++ { + for j := 1; j < 10; j++ { + a.Inc(strconv.Itoa(j)) + } + } + + for _, key := range maxKeys { + a.Inc(key) + a.Inc(key) + } + + for _, key := range minKeys { + a.Dec(key) + a.Dec(key) + } + + ast.Contains(maxKeys, a.GetMaxKey(), "无法获取正确的 max key") + + ast.Contains(minKeys, a.GetMinKey(), "无法获取正确的 min key") + + // 以下是为了单元覆盖率 + a.Dec("100") +} diff --git a/Algorithms/0434.number-of-segments-in-a-string/README.md b/Algorithms/0434.number-of-segments-in-a-string/README.md new file mode 100755 index 000000000..63fb121fb --- /dev/null +++ b/Algorithms/0434.number-of-segments-in-a-string/README.md @@ -0,0 +1,18 @@ +# [434. Number of Segments in a String](https://leetcode.com/problems/number-of-segments-in-a-string/) + +## 题目 + +Count the number of segments in a string, where a segment is defined to be a contiguous sequence of non-space characters. + +Please note that the string does not contain any non-printable characters. + +Example: + +```test +Input: "Hello, my name is John" +Output: 5 +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0434.number-of-segments-in-a-string/number-of-segments-in-a-string.go b/Algorithms/0434.number-of-segments-in-a-string/number-of-segments-in-a-string.go new file mode 100755 index 000000000..38b6df009 --- /dev/null +++ b/Algorithms/0434.number-of-segments-in-a-string/number-of-segments-in-a-string.go @@ -0,0 +1,14 @@ +package Problem0434 + +import ( + "strings" +) + +func countSegments(s string) int { + if len(s) == 0 { + return 0 + } + + strs := strings.Fields(s) + return len(strs) +} diff --git a/Algorithms/0434.number-of-segments-in-a-string/number-of-segments-in-a-string_test.go b/Algorithms/0434.number-of-segments-in-a-string/number-of-segments-in-a-string_test.go new file mode 100755 index 000000000..bd200d426 --- /dev/null +++ b/Algorithms/0434.number-of-segments-in-a-string/number-of-segments-in-a-string_test.go @@ -0,0 +1,40 @@ +package Problem0434 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + ans int +}{ + + {"", 0}, + + {" Hello, my name is John", 5}, + + {"Hello, my name is John", 5}, + + // 可以有多个 testcase +} + +func Test_countSegments(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, countSegments(tc.s), "输入:%v", tc) + } +} + +func Benchmark_countSegments(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + countSegments(tc.s) + } + } +} diff --git a/Algorithms/0435.non-overlapping-intervals/README.md b/Algorithms/0435.non-overlapping-intervals/README.md new file mode 100755 index 000000000..1bd73b949 --- /dev/null +++ b/Algorithms/0435.non-overlapping-intervals/README.md @@ -0,0 +1,44 @@ +# [435. Non-overlapping Intervals](https://leetcode.com/problems/non-overlapping-intervals/) + +## 题目 + +Given a collection of intervals, find the minimum number of intervals you need to remove to make the rest of the intervals non-overlapping. + +Note: + +1. You may assume the interval's end point is always bigger than its start point. +1. Intervals like [1,2] and [2,3] have borders "touching" but they don't overlap each other. + +Example 1: + +```text +Input: [ [1,2], [2,3], [3,4], [1,3] ] + +Output: 1 + +Explanation: [1,3] can be removed and the rest of intervals are non-overlapping. +``` + +Example 2: + +```text +Input: [ [1,2], [1,2], [1,2] ] + +Output: 2 + +Explanation: You need to remove two [1,2] to make the rest of intervals non-overlapping. +``` + +Example 3: + +```text +Input: [ [1,2], [2,3] ] + +Output: 0 + +Explanation: You don't need to remove any of the intervals since they're already non-overlapping. +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0435.non-overlapping-intervals/non-overlapping-intervals.go b/Algorithms/0435.non-overlapping-intervals/non-overlapping-intervals.go new file mode 100755 index 000000000..37431e984 --- /dev/null +++ b/Algorithms/0435.non-overlapping-intervals/non-overlapping-intervals.go @@ -0,0 +1,35 @@ +package Problem0435 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" + "sort" +) + +type Interval = kit.Interval + +func eraseOverlapIntervals(intervals []Interval) int { + end := -1 << 31 + res:=0 + if len(intervals) == 1 { + return 0 + } + + sort.Sort(B(intervals)) + + for _,v := range intervals { + if end <= v.Start { + end = v.End + } else { + res++ + } + } + + return res +} + +// B 经过排序后, End 小的排在前面 +type B []Interval + +func (a B) Len() int { return len(a) } +func (a B) Swap(i, j int) { a[i], a[j] = a[j], a[i] } +func (a B) Less(i, j int) bool { return a[i].End < a[j].End } \ No newline at end of file diff --git a/Algorithms/0435.non-overlapping-intervals/non-overlapping-intervals_test.go b/Algorithms/0435.non-overlapping-intervals/non-overlapping-intervals_test.go new file mode 100755 index 000000000..e2d778ef5 --- /dev/null +++ b/Algorithms/0435.non-overlapping-intervals/non-overlapping-intervals_test.go @@ -0,0 +1,51 @@ +package Problem0435 + +import ( + "fmt" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + intervals [][]int + ans int +}{ + + { + [][]int{{1, 2}, {2, 3}, {3, 4}, {1, 3}}, + 1, + }, + + { + [][]int{{1, 2}, {1, 2}, {1, 2}}, + 2, + }, + + { + [][]int{{2, 3}}, + 0, + }, + + // 可以有多个 testcase +} + +func Test_eraseOverlapIntervals(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, eraseOverlapIntervals(kit.Intss2IntervalSlice(tc.intervals)), "输入:%v", tc) + } +} + +func Benchmark_eraseOverlapIntervals(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + eraseOverlapIntervals(kit.Intss2IntervalSlice(tc.intervals)) + } + } +} diff --git a/Algorithms/0436.find-right-interval/README.md b/Algorithms/0436.find-right-interval/README.md new file mode 100755 index 000000000..de15e11ff --- /dev/null +++ b/Algorithms/0436.find-right-interval/README.md @@ -0,0 +1,49 @@ +# [436. Find Right Interval](https://leetcode.com/problems/find-right-interval/) + +## 题目 + +Given a set of intervals, for each of the interval i, check if there exists an interval j whose start point is bigger than or equal to the end point of the interval i, which can be called that j is on the "right" of i. + +For any interval i, you need to store the minimum interval j's index, which means that the interval j has the minimum start point to build the "right" relationship for interval i. If the interval j doesn't exist, store -1 for the interval i. Finally, you need output the stored value of each interval as an array. + +Note: + +1. You may assume the interval's end point is always bigger than its start point. +1. You may assume none of these intervals have the same start point. + +Example 1: + +```text +Input: [ [1,2] ] + +Output: [-1] + +Explanation: There is only one interval in the collection, so it outputs -1. +``` + +Example 2: + +```text +Input: [ [3,4], [2,3], [1,2] ] + +Output: [-1, 0, 1] + +Explanation: There is no satisfied "right" interval for [3,4]. +For [2,3], the interval [3,4] has minimum-"right" start point; +For [1,2], the interval [2,3] has minimum-"right" start point. +``` + +Example 3: + +```text +Input: [ [1,4], [2,3], [3,4] ] + +Output: [-1, 2, -1] + +Explanation: There is no satisfied "right" interval for [1,4] and [3,4]. +For [2,3], the interval [3,4] has minimum-"right" start point. +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0436.find-right-interval/find-right-interval.go b/Algorithms/0436.find-right-interval/find-right-interval.go new file mode 100755 index 000000000..6628689ce --- /dev/null +++ b/Algorithms/0436.find-right-interval/find-right-interval.go @@ -0,0 +1,34 @@ +package Problem0436 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" + "sort" +) + +type Interval = kit.Interval + +func findRightInterval(intervals []Interval) []int { + size := len(intervals) + + starts := make([]int, size) + idxs := make(map[int]int, size) + res := make([]int, size) + + for i, v := range intervals { + starts[i] = v.Start + idxs[v.Start] = i + } + + sort.Ints(starts) + + for i, v := range intervals { + idx := sort.SearchInts(starts, v.End) + if idx < size { + res[i] = idxs[starts[idx]] + } else { + res[i] = -1 + } + } + + return res +} diff --git a/Algorithms/0436.find-right-interval/find-right-interval_test.go b/Algorithms/0436.find-right-interval/find-right-interval_test.go new file mode 100755 index 000000000..2de70a6fa --- /dev/null +++ b/Algorithms/0436.find-right-interval/find-right-interval_test.go @@ -0,0 +1,61 @@ +package Problem0436 + +import ( + "fmt" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + intervals []Interval + ans []int +}{ + + { + kit.Intss2IntervalSlice([][]int{ + {3, 4}, + {2, 3}, + {1, 2}, + }), + []int{-1, 0, 1}, + }, + + { + kit.Intss2IntervalSlice([][]int{ + {1, 2}, + }), + []int{-1}, + }, + + { + kit.Intss2IntervalSlice([][]int{ + {1, 4}, + {2, 3}, + {3, 4}, + }), + []int{-1, 2, -1}, + }, + + // 可以有多个 testcase +} + +func Test_findRightInterval(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findRightInterval(tc.intervals), "输入:%v", tc) + } +} + +func Benchmark_findRightInterval(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findRightInterval(tc.intervals) + } + } +} diff --git a/Algorithms/0437.path-sum-iii/path-sum-iii.go b/Algorithms/0437.path-sum-iii/path-sum-iii.go index 7033f939f..443347db0 100755 --- a/Algorithms/0437.path-sum-iii/path-sum-iii.go +++ b/Algorithms/0437.path-sum-iii/path-sum-iii.go @@ -1,7 +1,7 @@ package Problem0437 import ( - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" ) type TreeNode = kit.TreeNode diff --git a/Algorithms/0437.path-sum-iii/path-sum-iii_test.go b/Algorithms/0437.path-sum-iii/path-sum-iii_test.go index 708168b1f..de24663bb 100755 --- a/Algorithms/0437.path-sum-iii/path-sum-iii_test.go +++ b/Algorithms/0437.path-sum-iii/path-sum-iii_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/aQuaYi/LeetCode-in-Golang/kit" + "github.com/aQuaYi/LeetCode-in-Go/kit" "github.com/stretchr/testify/assert" ) diff --git a/Algorithms/0438.find-all-anagrams-in-a-string/README.md b/Algorithms/0438.find-all-anagrams-in-a-string/README.md new file mode 100755 index 000000000..8ae948522 --- /dev/null +++ b/Algorithms/0438.find-all-anagrams-in-a-string/README.md @@ -0,0 +1,42 @@ +# [438. Find All Anagrams in a String](https://leetcode.com/problems/find-all-anagrams-in-a-string/) + +## 题目 + +Given a string s and a non-empty string p, find all the start indices of p's anagrams in s. + +Strings consists of lowercase English letters only and the length of both strings s and p will not be larger than 20,100. + +The order of output does not matter. + +Example 1: + +```text +Input: +s: "cbaebabacd" p: "abc" + +Output: +[0, 6] + +Explanation: +The substring with start index = 0 is "cba", which is an anagram of "abc". +The substring with start index = 6 is "bac", which is an anagram of "abc". +``` + +Example 2: + +```text +Input: +s: "abab" p: "ab" + +Output: +[0, 1, 2] + +Explanation: +The substring with start index = 0 is "ab", which is an anagram of "ab". +The substring with start index = 1 is "ba", which is an anagram of "ab". +The substring with start index = 2 is "ab", which is an anagram of "ab". +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0438.find-all-anagrams-in-a-string/find-all-anagrams-in-a-string.go b/Algorithms/0438.find-all-anagrams-in-a-string/find-all-anagrams-in-a-string.go new file mode 100755 index 000000000..1b4b680c6 --- /dev/null +++ b/Algorithms/0438.find-all-anagrams-in-a-string/find-all-anagrams-in-a-string.go @@ -0,0 +1,28 @@ +package Problem0438 + +func findAnagrams(s string, p string) []int { + var res = []int{} + + var target, window [26]int + for i := 0; i < len(p); i++ { + target[p[i]-'a']++ + } + + check := func(i int) { + if window == target { + res = append(res, i) + } + } + + for i := 0; i < len(s); i++ { + window[s[i]-'a']++ + if i == len(p)-1 { + check(0) + } else if len(p) <= i { + window[s[i-len(p)]-'a']-- + check(i - len(p) + 1) + } + } + + return res +} diff --git a/Algorithms/0438.find-all-anagrams-in-a-string/find-all-anagrams-in-a-string_test.go b/Algorithms/0438.find-all-anagrams-in-a-string/find-all-anagrams-in-a-string_test.go new file mode 100755 index 000000000..305699f99 --- /dev/null +++ b/Algorithms/0438.find-all-anagrams-in-a-string/find-all-anagrams-in-a-string_test.go @@ -0,0 +1,53 @@ +package Problem0438 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + p string + ans []int +}{ + + { + "abc", + "cbaebabacd", + []int{}, + }, + + { + "cbaebabacd", + "abc", + []int{0, 6}, + }, + + { + "abab", + "ab", + []int{0, 1, 2}, + }, + + // 可以有多个 testcase +} + +func Test_findAnagrams(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findAnagrams(tc.s, tc.p), "输入:%v", tc) + } +} + +func Benchmark_findAnagrams(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findAnagrams(tc.s, tc.p) + } + } +} diff --git a/Algorithms/0440.k-th-smallest-in-lexicographical-order/README.md b/Algorithms/0440.k-th-smallest-in-lexicographical-order/README.md new file mode 100755 index 000000000..377c6909a --- /dev/null +++ b/Algorithms/0440.k-th-smallest-in-lexicographical-order/README.md @@ -0,0 +1,24 @@ +# [440. K-th Smallest in Lexicographical Order](https://leetcode.com/problems/k-th-smallest-in-lexicographical-order/) + +## 题目 + +Given integers n and k, find the lexicographically k-th smallest integer in the range from 1 to n. + +Note: 1 ≤ k ≤ n ≤ 109. + +Example: + +```text +Input: +n: 13 k: 2 + +Output: +10 + +Explanation: +The lexicographical order is [1, 10, 11, 12, 13, 2, 3, 4, 5, 6, 7, 8, 9], so the second smallest number is 10. +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0440.k-th-smallest-in-lexicographical-order/k-th-smallest-in-lexicographical-order.go b/Algorithms/0440.k-th-smallest-in-lexicographical-order/k-th-smallest-in-lexicographical-order.go new file mode 100755 index 000000000..18d80cf21 --- /dev/null +++ b/Algorithms/0440.k-th-smallest-in-lexicographical-order/k-th-smallest-in-lexicographical-order.go @@ -0,0 +1,56 @@ +package Problem0440 + +func findKthNumber(n int, k int) int { + /* + [1,n] 经过 lexicographical 排序后,其顺序集合 s + for res:=1; res<=9; res++ { + s += [res, res+1) + + [res*10, (res+1)*10 ) + + [res*100, (res+1)*100 ) + + ... + } + */ + res := 1 + // k 与 res 总是同时更新 + // 当 k == 0 时, res 就是所求的答案 + k-- + for k > 0 { + // count 统计了在 [1, n] 内,以 res 开头的数的个数 + count := 0 + begin, end := res, res+1 + for begin <= n { + count += min(n+1, end) - begin + begin *= 10 + end *= 10 + } + + if count <= k { + // 答案不在以 res 开头的数中 + // 排除以 res 开头的 count 个数 + k -= count + // 去下一个开头中查找 + res++ + } else { + // 答案在以 res 开头的数中 + // 但是不在 [res, res+1) 中, + // 因为在的话,k 在上一个 for 循环结束时,就是 0 了 + // 排除了 [res, res+1) 中只有一个数字 + k-- + // 在 res*10 + [0, 9] 这些开头中,重新开始查找 + res *= 10 + } + + // 每个 for 循环都可以 + // 在 if 中排除一部分范围 + // 在 else 中获取 res 的前缀的更多细节 + } + + return res +} + +func min(a, b int) int { + if a < b { + return a + } + return b +} diff --git a/Algorithms/0440.k-th-smallest-in-lexicographical-order/k-th-smallest-in-lexicographical-order_test.go b/Algorithms/0440.k-th-smallest-in-lexicographical-order/k-th-smallest-in-lexicographical-order_test.go new file mode 100755 index 000000000..f9b868be6 --- /dev/null +++ b/Algorithms/0440.k-th-smallest-in-lexicographical-order/k-th-smallest-in-lexicographical-order_test.go @@ -0,0 +1,43 @@ +package Problem0440 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + n int + k int + ans int +}{ + + {13, 2, 10}, + + {987654321, 987654321, 99999999}, + + {100, 10, 17}, + + {1000000000, 1000000000, 999999999}, + + // 可以有多个 testcase +} + +func Test_findKthNumber(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findKthNumber(tc.n, tc.k), "输入:%v", tc) + } +} + +func Benchmark_findKthNumber(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findKthNumber(tc.n, tc.k) + } + } +} diff --git a/Algorithms/0441.arranging-coins/README.md b/Algorithms/0441.arranging-coins/README.md new file mode 100755 index 000000000..c616af613 --- /dev/null +++ b/Algorithms/0441.arranging-coins/README.md @@ -0,0 +1,40 @@ +# [441. Arranging Coins](https://leetcode.com/problems/arranging-coins/) + +## 题目 + +You have a total of n coins that you want to form in a staircase shape, where every k-th row must have exactly k coins. + +Given n, find the total number of full staircase rows that can be formed. + +n is a non-negative integer and fits within the range of a 32-bit signed integer. + +Example 1: + +```text +n = 5 + +The coins can form the following rows: +¤ +¤ ¤ +¤ ¤ + +Because the 3rd row is incomplete, we return 2. +``` + +Example 2: + +```text +n = 8 + +The coins can form the following rows: +¤ +¤ ¤ +¤ ¤ ¤ +¤ ¤ + +Because the 4th row is incomplete, we return 3. +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0441.arranging-coins/arranging-coins.go b/Algorithms/0441.arranging-coins/arranging-coins.go new file mode 100755 index 000000000..6e71a773f --- /dev/null +++ b/Algorithms/0441.arranging-coins/arranging-coins.go @@ -0,0 +1,10 @@ +package Problem0441 + +func arrangeCoins(n int) int { + n *= 2 + x := n + for !(x*(x+1) <= n && n < (x+1)*(x+2)) { + x = (x + n/(x+1)) / 2 + } + return x +} diff --git a/Algorithms/0441.arranging-coins/arranging-coins_test.go b/Algorithms/0441.arranging-coins/arranging-coins_test.go new file mode 100755 index 000000000..3fe093482 --- /dev/null +++ b/Algorithms/0441.arranging-coins/arranging-coins_test.go @@ -0,0 +1,54 @@ +package Problem0441 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + n int + ans int +}{ + + { + 1804289383, + 60070, + }, + + { + 10, + 4, + }, + + { + 5, + 2, + }, + + { + 8, + 3, + }, + + // 可以有多个 testcase +} + +func Test_arrangeCoins(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, arrangeCoins(tc.n), "输入:%v", tc) + } +} + +func Benchmark_arrangeCoins(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + arrangeCoins(tc.n) + } + } +} diff --git a/Algorithms/0443.string-compression/README.md b/Algorithms/0443.string-compression/README.md new file mode 100755 index 000000000..ffb0e547c --- /dev/null +++ b/Algorithms/0443.string-compression/README.md @@ -0,0 +1,63 @@ +# [443. String Compression](https://leetcode.com/problems/string-compression/) + +## 题目 + +Given an array of characters, compress it in-place. + +The length after compression must always be smaller than or equal to the original array. + +Every element of the array should be a character (not int) of length 1. + +After you are done modifying the input array in-place, return the new length of the array. + +Follow up: +Could you solve it using only O(1) extra space? + +Example 1: + +```text +Input: +["a","a","b","b","c","c","c"] + +Output: +Return 6, and the first 6 characters of the input array should be: ["a","2","b","2","c","3"] + +Explanation: +"aa" is replaced by "a2". "bb" is replaced by "b2". "ccc" is replaced by "c3". +``` + +Example 2: + +```text +Input: +["a"] + +Output: +Return 1, and the first 1 characters of the input array should be: ["a"] + +Explanation: +Nothing is replaced. +``` + +Example 3: + +```text +Input: +["a","b","b","b","b","b","b","b","b","b","b","b","b"] + +Output: +Return 4, and the first 4 characters of the input array should be: ["a","b","1","2"]. + +Explanation: +Since the character "a" does not repeat, it is not compressed. "bbbbbbbbbbbb" is replaced by "b12". +Notice each digit has it's own entry in the array. +``` + +Note: + +1. All characters have an ASCII value in [35, 126]. +1. 1 <= len(chars) <= 1000. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0443.string-compression/string-compression.go b/Algorithms/0443.string-compression/string-compression.go new file mode 100755 index 000000000..ede406a0f --- /dev/null +++ b/Algorithms/0443.string-compression/string-compression.go @@ -0,0 +1,31 @@ +package Problem0443 + +import "strconv" + +func compress(chars []byte) int { + end, count := 0, 1 + + for i, char := range chars { + if i+1 < len(chars) && char == chars[i+1] { + // 统计相同字符的个数 + count++ + } else { // 出现不同的字符 + // 在 end 处填写被压缩的字符 + chars[end] = char + end++ + + // 从 end 处填写被压缩字符的个数 + if count > 1 { + for _, num := range strconv.Itoa(count) { + chars[end] = byte(num) + end++ + } + } + + // 把 count 重置为 1 + count = 1 + } + } + + return end +} diff --git a/Algorithms/0443.string-compression/string-compression_test.go b/Algorithms/0443.string-compression/string-compression_test.go new file mode 100755 index 000000000..122e854d2 --- /dev/null +++ b/Algorithms/0443.string-compression/string-compression_test.go @@ -0,0 +1,62 @@ +package Problem0443 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + chars []byte + ans int + ansInPlace []byte +}{ + + { + []byte("abaa2"), + 5, + []byte("aba22"), + }, + + { + []byte("a"), + 1, + []byte("a"), + }, + + { + []byte("abbbbbbbbbbbb"), + 4, + []byte("ab12"), + }, + + { + []byte("aabbccc"), + 6, + []byte("a2b2c3"), + }, + + // 可以有多个 testcase +} + +func Test_compress(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, compress(tc.chars)) + + // 检查 inPlace 修改的情况 + ast.Equal(string(tc.ansInPlace), string(tc.chars)[:len(tc.ansInPlace)]) + } +} + +func Benchmark_compress(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + compress(tc.chars) + } + } +} diff --git a/Algorithms/0445.add-two-numbers-ii/README.md b/Algorithms/0445.add-two-numbers-ii/README.md new file mode 100755 index 000000000..0c71c745b --- /dev/null +++ b/Algorithms/0445.add-two-numbers-ii/README.md @@ -0,0 +1,21 @@ +# [445. Add Two Numbers II](https://leetcode.com/problems/add-two-numbers-ii/) + +## 题目 + +You are given two non-empty linked lists representing two non-negative integers. The most significant digit comes first and each of their nodes contain a single digit. Add the two numbers and return it as a linked list. + +You may assume the two numbers do not contain any leading zero, except the number 0 itself. + +Follow up: +What if you cannot modify the input lists? In other words, reversing the lists is not allowed. + +Example: + +```text +Input: (7 -> 2 -> 4 -> 3) + (5 -> 6 -> 4) +Output: 7 -> 8 -> 0 -> 7 +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0445.add-two-numbers-ii/add-two-numbers-ii.go b/Algorithms/0445.add-two-numbers-ii/add-two-numbers-ii.go new file mode 100755 index 000000000..8734fe39c --- /dev/null +++ b/Algorithms/0445.add-two-numbers-ii/add-two-numbers-ii.go @@ -0,0 +1,52 @@ +package Problem0445 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" +) + +type ListNode = kit.ListNode + +func addTwoNumbers(l1 *ListNode, l2 *ListNode) *ListNode { + // 把 l1 中的值,放入 stack s1 + s1 := make([]int, 0, 128) + for l1 != nil { + s1 = append(s1, l1.Val) + l1 = l1.Next + } + + // 把 l2 中的值,放入 stack s2 + s2 := make([]int, 0, 128) + for l2 != nil { + s2 = append(s2, l2.Val) + l2 = l2.Next + } + + sum := 0 + head := &ListNode{Val: 0} + + for len(s1) > 0 || len(s2) > 0 { + // s1.pop() + if len(s1) > 0 { + sum += s1[len(s1)-1] + s1 = s1[:len(s1)-1] + } + + // s2.pop() + if len(s2) > 0 { + sum += s2[len(s2)-1] + s2 = s2[:len(s2)-1] + } + + head.Val = sum % 10 + ln := &ListNode{Val: sum / 10} + ln.Next = head + head = ln + + sum /= 10 + } + + if head.Val == 0 { + return head.Next + } + return head +} diff --git a/Algorithms/0445.add-two-numbers-ii/add-two-numbers-ii_test.go b/Algorithms/0445.add-two-numbers-ii/add-two-numbers-ii_test.go new file mode 100755 index 000000000..6d8009821 --- /dev/null +++ b/Algorithms/0445.add-two-numbers-ii/add-two-numbers-ii_test.go @@ -0,0 +1,59 @@ +package Problem0445 + +import ( + "fmt" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + l1 []int + l2 []int + ans []int +}{ + + { + []int{7, 2, 4, 3}, + []int{4, 5, 6, 4}, + []int{1, 1, 8, 0, 7}, + }, + + { + []int{7, 2, 4, 3}, + []int{1, 5, 6, 4}, + []int{8, 8, 0, 7}, + }, + + { + []int{7, 2, 4, 3}, + []int{5, 6, 4}, + []int{7, 8, 0, 7}, + }, + + // 可以有多个 testcase +} + +func Test_addTwoNumbers(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + l1 := kit.Ints2List(tc.l1) + l2 := kit.Ints2List(tc.l2) + ast.Equal(tc.ans, kit.List2Ints(addTwoNumbers(l1, l2)), "输入:%v", tc) + } +} + +func Benchmark_addTwoNumbers(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + l1 := kit.Ints2List(tc.l1) + l2 := kit.Ints2List(tc.l2) + addTwoNumbers(l1, l2) + } + } +} diff --git a/Algorithms/0446.arithmetic-slices-ii-subsequence/README.md b/Algorithms/0446.arithmetic-slices-ii-subsequence/README.md new file mode 100755 index 000000000..de3777ba4 --- /dev/null +++ b/Algorithms/0446.arithmetic-slices-ii-subsequence/README.md @@ -0,0 +1,48 @@ +# [446. Arithmetic Slices II - Subsequence](https://leetcode.com/problems/arithmetic-slices-ii-subsequence/) + +## 题目 + +A sequence of numbers is called arithmetic if it consists of at least three elements and if the difference between any two consecutive elements is the same. + +For example, these are arithmetic sequences: + +```text +1, 3, 5, 7, 9 +7, 7, 7, 7 +3, -1, -5, -9 +``` + +The following sequence is not arithmetic. + +```text +1, 1, 2, 5, 7 +``` + +A zero-indexed array A consisting of N numbers is given. A subsequence slice of that array is any sequence of integers (P0, P1, ..., Pk) such that 0 ≤ P0 < P1 < ... < Pk < N. + +A subsequence slice (P0, P1, ..., Pk) of array A is called arithmetic if the sequence A[P0], A[P1], ..., A[Pk-1], A[Pk] is arithmetic. In particular, this means that k ≥ 2. + +The function should return the number of arithmetic subsequence slices in the array A. +The input contains N integers. Every integer is in the range of -2^31 and 2^31-1 and 0 ≤ N ≤ 1000. The output is guaranteed to be less than 2^31-1. + +Example: + +```text +Input: [2, 4, 6, 8, 10] + +Output: 7 + +Explanation: +All arithmetic subsequence slices are: +[2,4,6] +[4,6,8] +[6,8,10] +[2,4,6,8] +[4,6,8,10] +[2,4,6,8,10] +[2,6,10] +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0446.arithmetic-slices-ii-subsequence/arithmetic-slices-ii-subsequence.go b/Algorithms/0446.arithmetic-slices-ii-subsequence/arithmetic-slices-ii-subsequence.go new file mode 100755 index 000000000..e4b88502a --- /dev/null +++ b/Algorithms/0446.arithmetic-slices-ii-subsequence/arithmetic-slices-ii-subsequence.go @@ -0,0 +1,41 @@ +package Problem0446 + +func numberOfArithmeticSlices(a []int) int { + n := len(a) + if n < 3 { + return 0 + } + + min, max := -1<<31, 1<<31-1 + + // dp[j][d] == x 表示 + // 如果存在 a[i] - a[j] == d, j < i < n, 那么, {a[:j+1]..., a[i]} 中 + // 可以构成形如 [..., a[j], a[i]] 的差值为 d 的等差数组的个数 + dp := make([]map[int]int, n) + + res := 0 + for i := 1; i < n; i++ { + dp[i] = make(map[int]int) + for j := 0; j < i; j++ { + d := a[i] - a[j] + + // 存在一个特殊的 test case,用于加速 + if d <= min || max <= d { + continue + } + + // + 1 是因为 [a[j], a[i]] 无法构成等差数列 + // 但是如果存在 a[k] == a[i] + d 的话, + // [a[j], a[i], a[k]] 就能构成 **1** 个等差数列了 + // 这里再次强调一下,d[i][d] 的含义是 + // 再加一个 a[i] + d 可以构成形如 + // [..., a[i], a[i]+d] 的等差数列子数组的个数 + dp[i][d] += dp[j][d] + 1 + // a[j] 已经遇到了 a[j] + d == a[i] + // 所以,res 加上的是 dp[j][d] + res += dp[j][d] + } + } + + return res +} diff --git a/Algorithms/0446.arithmetic-slices-ii-subsequence/arithmetic-slices-ii-subsequence_test.go b/Algorithms/0446.arithmetic-slices-ii-subsequence/arithmetic-slices-ii-subsequence_test.go new file mode 100755 index 000000000..1d92d10e3 --- /dev/null +++ b/Algorithms/0446.arithmetic-slices-ii-subsequence/arithmetic-slices-ii-subsequence_test.go @@ -0,0 +1,59 @@ +package Problem0446 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + A []int + ans int +}{ + + { + []int{2, 4, 6, 8, 10}, + 7, + }, + + { + []int{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, + 134217349, + }, + + { + []int{2, 4, 4, 6}, + 2, + }, + + { + []int{2147483638, 2147483639, 2147483640, 2147483641, 2147483642, 2147483643, 2147483644, 2147483645, 2147483646, 2147483647, -2147483648, -2147483647, -2147483646, -2147483645, -2147483644, -2147483643, -2147483642, -2147483641, -2147483640, -2147483639}, + 110, + }, + + { + []int{8, 10}, + 0, + }, + + // 可以有多个 testcase +} + +func Test_numberOfArithmeticSlices(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, numberOfArithmeticSlices(tc.A), "输入:%v", tc) + } +} + +func Benchmark_numberOfArithmeticSlices(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + numberOfArithmeticSlices(tc.A) + } + } +} diff --git a/Algorithms/0447.number-of-boomerangs/447.100.png b/Algorithms/0447.number-of-boomerangs/447.100.png new file mode 100644 index 000000000..301940e70 Binary files /dev/null and b/Algorithms/0447.number-of-boomerangs/447.100.png differ diff --git a/Algorithms/0447.number-of-boomerangs/README.md b/Algorithms/0447.number-of-boomerangs/README.md new file mode 100755 index 000000000..89d2b5480 --- /dev/null +++ b/Algorithms/0447.number-of-boomerangs/README.md @@ -0,0 +1,27 @@ +# [447. Number of Boomerangs](https://leetcode.com/problems/number-of-boomerangs/) + +## 题目 + +Given n points in the plane that are all pairwise distinct, a "boomerang" is a tuple of points (i, j, k) such that the distance between i and j equals the distance between i and k (the order of the tuple matters). + +Find the number of boomerangs. You may assume that n will be at most 500 and coordinates of points are all in the range [-10000, 10000] (inclusive). + +Example: + +```text +Input: +[[0,0],[1,0],[2,0]] + +Output: +2 + +Explanation: +The two boomerangs are [[1,0],[0,0],[2,0]] and [[1,0],[2,0],[0,0]] +``` + +## 解题思路 + +见程序注释 + +只是预先指定了 map 的 cap 而已。 +![100](447.100.png) \ No newline at end of file diff --git a/Algorithms/0447.number-of-boomerangs/number-of-boomerangs.go b/Algorithms/0447.number-of-boomerangs/number-of-boomerangs.go new file mode 100755 index 000000000..db67b1c53 --- /dev/null +++ b/Algorithms/0447.number-of-boomerangs/number-of-boomerangs.go @@ -0,0 +1,43 @@ +package Problem0447 + +func numberOfBoomerangs(points [][]int) int { + res := 0 + + size := len(points) + if size < 3 { + return 0 + } + + for i := 0; i < size; i++ { + // dMap[9]6 表示, points 中与 points[i] 距离为 3 的点,共有 6 个。 + dMap := make(map[int]int, size) + + for j := 0; j < size; j++ { + if i == j { + continue + } + + d := dSquare(points[i], points[j]) + + if _, ok := dMap[d]; ok { + dMap[d]++ + } else { + dMap[d] = 1 + } + } + + for _, v := range dMap { + // 相同距离的 v 个点 + // 总共有 v * (v - 1) 种排列 + res += v * (v - 1) + } + } + + return res +} + +func dSquare(p1, p2 []int) int { + x := p2[0] - p1[0] + y := p2[1] - p1[1] + return x*x + y*y +} diff --git a/Algorithms/0447.number-of-boomerangs/number-of-boomerangs_test.go b/Algorithms/0447.number-of-boomerangs/number-of-boomerangs_test.go new file mode 100755 index 000000000..b7987685c --- /dev/null +++ b/Algorithms/0447.number-of-boomerangs/number-of-boomerangs_test.go @@ -0,0 +1,44 @@ +package Problem0447 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + points [][]int + ans int +}{ + + { + [][]int{{1, 0}, {2, 0}}, + 0, + }, + + { + [][]int{{0, 0}, {1, 0}, {2, 0}}, + 2, + }, + + // 可以有多个 testcase +} + +func Test_numberOfBoomerangs(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, numberOfBoomerangs(tc.points), "输入:%v", tc) + } +} + +func Benchmark_numberOfBoomerangs(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + numberOfBoomerangs(tc.points) + } + } +} diff --git a/Algorithms/0450.delete-node-in-a-bst/README.md b/Algorithms/0450.delete-node-in-a-bst/README.md new file mode 100755 index 000000000..8bff7960f --- /dev/null +++ b/Algorithms/0450.delete-node-in-a-bst/README.md @@ -0,0 +1,47 @@ +# [450. Delete Node in a BST](https://leetcode.com/problems/delete-node-in-a-bst/) + +## 题目 + +Given a root node reference of a BST and a key, delete the node with the given key in the BST. Return the root node reference (possibly updated) of the BST. + +Basically, the deletion can be divided into two stages: + +1. Search for a node to remove. +1. If the node is found, delete the node. + +Note: Time complexity should be O(height of tree). + +Example: + +```text +root = [5,3,6,2,4,null,7] +key = 3 + + 5 + / \ + 3 6 + / \ \ +2 4 7 + +Given key to delete is 3. So we find the node with value 3 and delete it. + +One valid answer is [5,4,6,2,null,null,7], shown in the following BST. + + 5 + / \ + 4 6 + / \ +2 7 + +Another valid answer is [5,2,6,null,4,null,7]. + + 5 + / \ + 2 6 + \ \ + 4 7 +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0450.delete-node-in-a-bst/delete-node-in-a-bst.go b/Algorithms/0450.delete-node-in-a-bst/delete-node-in-a-bst.go new file mode 100755 index 000000000..7b05eca58 --- /dev/null +++ b/Algorithms/0450.delete-node-in-a-bst/delete-node-in-a-bst.go @@ -0,0 +1,40 @@ +package Problem0450 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" +) + +type TreeNode = kit.TreeNode +func deleteNode(root *TreeNode, key int) *TreeNode { + if root == nil { + return root + } + + if root.Val == key { + if root.Left == nil && root.Right == nil { + return nil + } else if root.Left == nil { + return root.Right + } else if root.Right == nil { + return root.Left + } else { + max := findMax(root.Left) + root.Val = max + root.Left = deleteNode(root.Left, max) + } + } else if root.Val > key { + root.Left = deleteNode(root.Left, key) + } else { + root.Right = deleteNode(root.Right, key) + } + + return root +} + +func findMax(node *TreeNode)int { + if node.Right == nil { + return node.Val + } + return findMax(node.Right) +} + diff --git a/Algorithms/0450.delete-node-in-a-bst/delete-node-in-a-bst_test.go b/Algorithms/0450.delete-node-in-a-bst/delete-node-in-a-bst_test.go new file mode 100755 index 000000000..656521cb6 --- /dev/null +++ b/Algorithms/0450.delete-node-in-a-bst/delete-node-in-a-bst_test.go @@ -0,0 +1,81 @@ +package Problem0450 + +import ( + "fmt" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + pre, in []int + key int + ans []int +}{ + + { + []int{2, 0, 1, 33, 25, 11, 10, 4, 3, 9, 18, 12, 14, 24, 22, 31, 29, 26, 27, 30, 32, 40, 34, 36, 35, 39, 45, 43, 42, 44, 46, 48}, + []int{0, 1, 2, 3, 4, 9, 10, 11, 12, 14, 18, 22, 24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, 39, 40, 42, 43, 44, 45, 46, 48}, + 33, + []int{0, 1, 2, 3, 4, 9, 10, 11, 12, 14, 18, 22, 24, 25, 26, 27, 29, 30, 31, 32, 34, 35, 36, 39, 40, 42, 43, 44, 45, 46, 48}, + }, + + { + []int{1, 2}, + []int{2, 1}, + 1, + []int{2}, + }, + + { + []int{1, 2}, + []int{1, 2}, + 1, + []int{2}, + }, + + { + []int{}, + []int{}, + 0, + nil, + }, + + { + []int{0}, + []int{0}, + 0, + nil, + }, + + { + []int{5, 3, 2, 4, 6, 7}, + []int{2, 3, 4, 5, 6, 7}, + 3, + []int{2, 4, 5, 6, 7}, + }, + + // 可以有多个 testcase +} + +func Test_deleteNode(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + root := kit.PreIn2Tree(tc.pre, tc.in) + ast.Equal(tc.ans, kit.Tree2Inorder(deleteNode(root, tc.key)), "输入:%v", tc) + } +} + +func Benchmark_deleteNode(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + root := kit.PreIn2Tree(tc.pre, tc.in) + deleteNode(root, tc.key) + } + } +} diff --git a/Algorithms/0451.sort-characters-by-frequency/451.100.png b/Algorithms/0451.sort-characters-by-frequency/451.100.png new file mode 100644 index 000000000..8dd0f8fd8 Binary files /dev/null and b/Algorithms/0451.sort-characters-by-frequency/451.100.png differ diff --git a/Algorithms/0451.sort-characters-by-frequency/README.md b/Algorithms/0451.sort-characters-by-frequency/README.md new file mode 100755 index 000000000..4cf5ab1b3 --- /dev/null +++ b/Algorithms/0451.sort-characters-by-frequency/README.md @@ -0,0 +1,53 @@ +# [451. Sort Characters By Frequency](https://leetcode.com/problems/sort-characters-by-frequency/) + +## 题目 + +Given a string, sort it in decreasing order based on the frequency of characters. + +Example 1: + +```text +Input: +"tree" + +Output: +"eert" + +Explanation: +'e' appears twice while 'r' and 't' both appear once. +So 'e' must appear before both 'r' and 't'. Therefore "eetr" is also a valid answer. +``` + +Example 2: + +```text +Input: +"cccaaa" + +Output: +"cccaaa" + +Explanation: +Both 'c' and 'a' appear three times, so "aaaccc" is also a valid answer. +Note that "cacaca" is incorrect, as the same characters must be together. +``` + +Example 3: + +```text +Input: +"Aabb" + +Output: +"bbAa" + +Explanation: +"bbaA" is also a valid answer, but "Aabb" is incorrect. +Note that 'A' and 'a' are treated as two different characters. +``` + +## 解题思路 + +见程序注释 + +![100](451.100.png) \ No newline at end of file diff --git a/Algorithms/0451.sort-characters-by-frequency/sort-characters-by-frequency.go b/Algorithms/0451.sort-characters-by-frequency/sort-characters-by-frequency.go new file mode 100755 index 000000000..6b85a0425 --- /dev/null +++ b/Algorithms/0451.sort-characters-by-frequency/sort-characters-by-frequency.go @@ -0,0 +1,56 @@ +package Problem0451 + +import "sort" + +func frequencySort(s string) string { + // r 记录了各个字符出现的次数 + r := ['z' + 1]int{} + for i := range s { + r[s[i]]++ + } + + // ss 中是由相同字符组成的 string 片段 + ss := make([]string, 0, len(s)) + for i := range r { + if r[i] == 0 { + continue + } + ss = append(ss, makeString(byte(i), r[i])) + } + + // 按照题目中的规则,对 ss 进行排序 + sort.Sort(segments(ss)) + + // 按顺序把 ss 中的片段拼接成 答案 + res := "" + for _, s := range ss { + res += s + } + + return res +} + +// 返回由 n 个 b 组成的字符串 +func makeString(b byte, n int) string { + bytes := make([]byte, n) + for i := range bytes { + bytes[i] = b + } + return string(bytes) +} + +// segments 实现了 sort.Interface 接口 +type segments []string + +func (s segments) Len() int { return len(s) } + +func (s segments) Less(i, j int) bool { + // 按照题意,这个 if 不是必须的 + // 但是,添加以后,可以保证答案的唯一性 + if len(s[i]) == len(s[j]) { + return s[i] < s[j] + } + return len(s[i]) > len(s[j]) +} + +func (s segments) Swap(i, j int) { s[i], s[j] = s[j], s[i] } diff --git a/Algorithms/0451.sort-characters-by-frequency/sort-characters-by-frequency_test.go b/Algorithms/0451.sort-characters-by-frequency/sort-characters-by-frequency_test.go new file mode 100755 index 000000000..b5095a0e8 --- /dev/null +++ b/Algorithms/0451.sort-characters-by-frequency/sort-characters-by-frequency_test.go @@ -0,0 +1,49 @@ +package Problem0451 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + ans string +}{ + + { + "tree", + "eert", + }, + + { + "cccaaa", + "aaaccc", + }, + + { + "Aabb", + "bbAa", + }, + + // 可以有多个 testcase +} + +func Test_frequencySort(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, frequencySort(tc.s), "输入:%v", tc) + } +} + +func Benchmark_frequencySort(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + frequencySort(tc.s) + } + } +} diff --git a/Algorithms/0452.minimum-number-of-arrows-to-burst-balloons/452.100.png b/Algorithms/0452.minimum-number-of-arrows-to-burst-balloons/452.100.png new file mode 100644 index 000000000..f13fccde5 Binary files /dev/null and b/Algorithms/0452.minimum-number-of-arrows-to-burst-balloons/452.100.png differ diff --git a/Algorithms/0452.minimum-number-of-arrows-to-burst-balloons/README.md b/Algorithms/0452.minimum-number-of-arrows-to-burst-balloons/README.md new file mode 100755 index 000000000..64a069763 --- /dev/null +++ b/Algorithms/0452.minimum-number-of-arrows-to-burst-balloons/README.md @@ -0,0 +1,26 @@ +# [452. Minimum Number of Arrows to Burst Balloons](https://leetcode.com/problems/minimum-number-of-arrows-to-burst-balloons/) + +## 题目 + +There are a number of spherical balloons spread in two-dimensional space. For each balloon, provided input is the start and end coordinates of the horizontal diameter. Since it's horizontal, y-coordinates don't matter and hence the x-coordinates of start and end of the diameter suffice. Start is always smaller than end. There will be at most 104 balloons. + +An arrow can be shot up exactly vertically from different points along the x-axis. A balloon with xstart and xend bursts by an arrow shot at x if xstart ≤ x ≤ xend. There is no limit to the number of arrows that can be shot. An arrow once shot keeps travelling up infinitely. The problem is to find the minimum number of arrows that must be shot to burst all balloons. + +Example: + +```text +Input: +[[10,16], [2,8], [1,6], [7,12]] + +Output: +2 + +Explanation: +One way is to shoot one arrow for example at x = 6 (bursting the balloons [2,8] and [1,6]) and another arrow at x = 11 (bursting the other two balloons). +``` + +## 解题思路 + +见程序注释 + +![100](452.100.png) \ No newline at end of file diff --git a/Algorithms/0452.minimum-number-of-arrows-to-burst-balloons/minimum-number-of-arrows-to-burst-balloons.go b/Algorithms/0452.minimum-number-of-arrows-to-burst-balloons/minimum-number-of-arrows-to-burst-balloons.go new file mode 100755 index 000000000..9a3df1384 --- /dev/null +++ b/Algorithms/0452.minimum-number-of-arrows-to-burst-balloons/minimum-number-of-arrows-to-burst-balloons.go @@ -0,0 +1,37 @@ +package Problem0452 + +import "sort" + +func findMinArrowShots(bs [][]int) int { + size := len(bs) + if size == 0 { + return 0 + } + + sort.Sort(balloons(bs)) + + res := 0 + end := bs[0][1] + + for i := 1; i < size; i++ { + if bs[i][0] <= end { + continue + } + res++ + end = bs[i][1] + } + + res++ + + return res +} + +// balloons 实现了 sort.Interface 接口 +type balloons [][]int + +func (b balloons) Len() int { return len(b) } + +// 以 end 的大小来排序 +func (b balloons) Less(i, j int) bool { return b[i][1] < b[j][1] } + +func (b balloons) Swap(i, j int) { b[i], b[j] = b[j], b[i] } diff --git a/Algorithms/0452.minimum-number-of-arrows-to-burst-balloons/minimum-number-of-arrows-to-burst-balloons_test.go b/Algorithms/0452.minimum-number-of-arrows-to-burst-balloons/minimum-number-of-arrows-to-burst-balloons_test.go new file mode 100755 index 000000000..891fc9f88 --- /dev/null +++ b/Algorithms/0452.minimum-number-of-arrows-to-burst-balloons/minimum-number-of-arrows-to-burst-balloons_test.go @@ -0,0 +1,44 @@ +package Problem0452 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + points [][]int + ans int +}{ + + { + [][]int{}, + 0, + }, + + { + [][]int{{10, 16}, {2, 8}, {1, 6}, {7, 12}}, + 2, + }, + + // 可以有多个 testcase +} + +func Test_findMinArrowShots(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findMinArrowShots(tc.points), "输入:%v", tc) + } +} + +func Benchmark_findMinArrowShots(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findMinArrowShots(tc.points) + } + } +} diff --git a/Algorithms/0453.minimum-moves-to-equal-array-elements/README.md b/Algorithms/0453.minimum-moves-to-equal-array-elements/README.md new file mode 100755 index 000000000..0c3b823f9 --- /dev/null +++ b/Algorithms/0453.minimum-moves-to-equal-array-elements/README.md @@ -0,0 +1,42 @@ +# [453. Minimum Moves to Equal Array Elements](https://leetcode.com/problems/minimum-moves-to-equal-array-elements/) + +## 题目 + +Given a non-empty integer array of size n, find the minimum number of moves required to make all array elements equal, where a move is incrementing n - 1 elements by 1. + +Example: + +```text +Input: +[1,2,3] + +Output: +3 + +Explanation: +Only three moves are needed (remember each move increments two elements): + +[1,2,3] => [2,3,3] => [3,4,3] => [4,4,4] +``` + +## 解题思路 + +n = len(nums) + +经过 m 次移动后,每个数字都是 x,可得 + +```text +sum + m * (n - 1) = x * n +``` + +实际上,每次移动都会往最小的数字 min 上加一,所以 + +```text +x = min + m +``` + +通过以上两个等式,可得 + +```text +m = sum - min * n +``` \ No newline at end of file diff --git a/Algorithms/0453.minimum-moves-to-equal-array-elements/minimum-moves-to-equal-array-elements.go b/Algorithms/0453.minimum-moves-to-equal-array-elements/minimum-moves-to-equal-array-elements.go new file mode 100755 index 000000000..b4853edba --- /dev/null +++ b/Algorithms/0453.minimum-moves-to-equal-array-elements/minimum-moves-to-equal-array-elements.go @@ -0,0 +1,13 @@ +package Problem0453 + +func minMoves(nums []int) int { + sum, min := 0, nums[0] + for _, n := range nums { + sum += n + if min > n { + min = n + } + } + + return sum - min*len(nums) +} diff --git a/Algorithms/0453.minimum-moves-to-equal-array-elements/minimum-moves-to-equal-array-elements_test.go b/Algorithms/0453.minimum-moves-to-equal-array-elements/minimum-moves-to-equal-array-elements_test.go new file mode 100755 index 000000000..83eaef3a8 --- /dev/null +++ b/Algorithms/0453.minimum-moves-to-equal-array-elements/minimum-moves-to-equal-array-elements_test.go @@ -0,0 +1,49 @@ +package Problem0453 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans int +}{ + + { + []int{1, 2, 3, 4}, + 6, + }, + + { + []int{10, 0, 0, 0}, + 10, + }, + + { + []int{1, 2, 3}, + 3, + }, + + // 可以有多个 testcase +} + +func Test_minMoves(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, minMoves(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_minMoves(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + minMoves(tc.nums) + } + } +} diff --git a/Algorithms/0454.4sum-ii/454.100 b/Algorithms/0454.4sum-ii/454.100 new file mode 100644 index 000000000..6da49d9d4 Binary files /dev/null and b/Algorithms/0454.4sum-ii/454.100 differ diff --git a/Algorithms/0454.4sum-ii/4sum-ii.go b/Algorithms/0454.4sum-ii/4sum-ii.go new file mode 100755 index 000000000..acf5013ca --- /dev/null +++ b/Algorithms/0454.4sum-ii/4sum-ii.go @@ -0,0 +1,20 @@ +package Problem0454 + +func fourSumCount(A []int, B []int, C []int, D []int) int { + res := 0 + n := len(A) + sum := make(map[int]int, n*n) + for i := 0; i < n; i++ { + for j := 0; j < n; j++ { + sum[C[i]+D[j]]++ + } + } + + for i := 0; i < n; i++ { + for j := 0; j < n; j++ { + res += sum[-(A[i] + B[j])] + } + } + + return res +} diff --git a/Algorithms/0454.4sum-ii/4sum-ii_test.go b/Algorithms/0454.4sum-ii/4sum-ii_test.go new file mode 100755 index 000000000..e1cb90bf1 --- /dev/null +++ b/Algorithms/0454.4sum-ii/4sum-ii_test.go @@ -0,0 +1,61 @@ +package Problem0454 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + A []int + B []int + C []int + D []int + ans int +}{ + + { + []int{-71978474, -28407390, 6487156, -5835667, -11819338, 10343068, 10768673, -245171709, 19738959, -46339242, 181229419, -176760610, -10337980, -207358751, -185412148, 102500358, 107833574, 250545333, -58873985, 106821619, 268124880, 55520158, 256155403, 200249464, 256954749, -41670481, -172102420, -161776521, 176941695, -53603760, -67111857, -27713855, -55333948, -215813542, -107067147, 98930659, 253393156, -196098380, -33056959, 174630496, -29395310, 105695498, -222391169, -139701651, -123000784, 38165534, -98009887, 82676096, -209663935, 91254707, 243440023, 96495216, -186156509, 192203188, 217929656, 222248651, 162150902, 95296092, 182504655, 964973, 223447285, 16336100, -202534131, 198076772, -218094374, 43698098, 176419657, -148324200, -143785502, -157834380, 265043122, 122589079, -184038991, -162395984, -246936037, -77713118, 241047628, 215897753, 112046993, -134358912, -195563478, 210843289, 205546356, 258601177, 214037482, -88343952, -252950129, 56615227, -206466635, 121363993, -234468310, 125536942, -76584060, 16648767, -81242925, -119529825, 70623988, -61229934, 129414837, -5096734, -40036154, 99473856, -81540983, 227618848, -63177608, -153233801, -254525992, -108570246, -218677661, 77101181, -10142928, -23455146, 100846160, -173243052, 195294601, 179435745, -106211022, -256863196, 185126002, 100063761, -211947235, 198846854, -224442102, 214832407, -235152963, -114218832, -225653215, 203844095, -28374131, -131535960, 207302351, 198551632, 12362543, -42252426, -5110144, -1789655, 203227705, 185485671, 104327543, 93708391, 101223013, -51029034, -207913967, -250224501, -228013159, -219084267, -192101482, -178470730, 84930559, -15283080, -166920501, 92936679, 80915963, -132773370, -133859950, -36263212, 267807924, 73630132, 15867083, -83446998, -87419351, -202169796, 249183800, -65641424, 221675154, -175181347, 149568254, 179970382, 8015104, -241178848, 49545775, 136594625, -93384496, -38634998, -208655366, -135319651, 50195804, 228747965, -83675970, -96147725, 50665760, -153907495, -200217502, 16274063, -79716485, 190120424, 108481017, -239673713, 231901658, -245547888, 188374954, -189583147, -161627305, 245629491, 84335290, 65342172, -138397675, 160380509, -139787131, -158188197, 153383613, -220425884, 265449800, 235879513, 227390973, -180258075, -157783358, 200421237, 5682905, 155361188, 139927984, -249721376, 81964010, 182928983, 73667135, 236833082, -7416994, 42913702, -84934068, 135699857, -171589203, -24517849, -153423339, 190200187, 35125846, 267263376, 7607854, -114818353, -143022046, 179542204, 55480768, 139176926, 4631172, 113365477, -159102158, -118792670, 86128035, 167355185, -188646772, -134765529, 217231322, 115685324, 117085598, 75612768, -189686865, -148646852, -122676312, -168795673, -188332159, -54052978, -204498215, -183024514, 233929464, -29242844, -30931217, 215016680, 208749496, -222588396, 173035066, -111620399, -251216657, 156383227, 120258522, 45251368, 184645641, 61014150, -18884643, 251838243, -216782609, 234246156, -114830713, 28272783, -70332034, 98318871, -41710077, 88812694, -7789083, 61765530, -36942919, 193942083, -119950274, -55040628, 101532610, -29739951, 105619704, 11194244, 262307985, 239168852, -29135197, -67190368, -107324830, 10327279, 183279704, 118119599, -204831134, 89274172, -13070967, 93154980, -140484935, 221452698, -177427697, 255348621, 12414766, 74289242, -143266337, 50477067, -263039481, 20530117, -178891218, -118880010, 11322215, 158847538, 176069352, 31547720, 164037790, -89074299, -197851703, -220012320, 131375916, 90414199, 36534830, 158741256, 98382412, -160839664, 4229156, 136064408, 33815093, 48992247, -35601728, -80793679, -166798858, -116719762, 217032017, -196304518, 48472, -190969983, 86320098, -135207520, 101506102, -951898, 94677427, 204431686, 111374413, 25984981, -173631664, 38809665, 147513898, 197698679, -60025105, 6839710, 209521930, 180150863, -95373339, 103651204, 235365610, 158822217, 48959157, -70488557, -222864214, 149263390, -17611706, -112935290, 55407761, -120478586, -20814580, -105294046, 245777863, 122519018, -75137248, 125259002, -4727500, -48612560, -40872923, -57918776, 137751972, 31668941, -53277529, -5992164, 12164456, 191655983, 109329293, 214082292, 69402972, -126962488, 88665691, -224411577, 106563677, -56350640, -224368618, -97218676, -5075836, 5479942, 97924441, -137524642, -236052868, -7425213, -258058308, -139479528, -54233917, 148657069, 226304313, 198846866, -51420353, -209286358, -244166187, -15174806, 158879379, 32219592, -70958555, -188643686, -21796585, -11255939, 211190902, -166480907, -71303129, -77842441, -252170083, -54623637, -152463366, 237990638, 142622889, -131257085, 34628835, -210654417, -251871806, 187775081, 185944120, 220538189, -175287939, 103168192, 56470314, -142901453, -172686551, -75780769, -15583119, 212971291, -19186971, -141006980, -109128195, -167889285, 55823372, 263092680, 127279051, 243913001, 21920020, 210028266, 239101125, 57884442, -72707532, -7185886, 75958947, 72074049, 49647288, -53465877, -4099345, 180748212, 16745602, -25658487, 234928676, -192758764, -226603250, 16426570, -109741689, 138282536, 180669336, -227834299, 81387163, -85728455, 266691672, 102161048, 32459504, -156181377, -196224757, 46743100, -173383827, 69940363, 157293941, 93796662, -131557188, 182464799, 207279738, -52250959, 170970028, -204517521, 153368453, 19096102, 154853650, -252096392, -9453068, 145651704, -121374777, 31516469, -245369030, -15984516, 112390793, 125003184, 127939456, 106765930, -198822613, -153099924}, + []int{-30451425, -70958332, 210992111, 205315439, -40697451, 249064743, 136919380, 141811620, 217809708, 84862193, 124181888, 190073003, 217255261, -146099934, -98347381, -188970320, -189520835, -196693669, -127181028, -37092694, 23240047, 165035085, -234215571, -68334211, -154429032, -97395972, -33804361, -133637989, 211888049, -30348379, 147378248, -35110616, -66967243, -63716249, 235688198, 194876519, 8766406, -101004212, -119560841, 161953247, 235889818, -69837369, 120219758, 54359594, -230930108, -94345364, -176514522, -177207433, -239072452, -175277854, -257945724, 42134263, 139262048, 192910401, -251072472, -93121657, 14338273, -135463675, 22787668, 202112183, 85360562, -233308782, -141664407, 123027502, -167152407, 237952051, -245273877, 200776728, 28170793, -7854067, 250290131, 56039764, 35303236, 3451395, -171190144, 126658080, 216820051, 195727076, 218034224, -54821190, -181431716, 67427047, 200230427, 184601460, 263219567, -197804478, 29571019, -178614705, -253928825, -32169910, 69544559, -130814412, -251036718, 53157593, 149486805, 9340434, -108565593, 1418302, 57992949, -111315079, -176909156, 104420276, 45614511, 59331062, 132365569, 232949255, 175578196, -115767402, 246317266, 71725944, 223166677, 50970983, -162127345, 121084648, 115236452, -257622251, 146066129, -15280743, -144450156, 79843044, -256194873, -124418950, 61773304, -49031784, -253396422, -188153248, 50462170, 47677294, -148742635, 183124152, -210159290, 73276704, 124806669, 180494883, 199918344, 255045227, -96500088, -31180300, -107195086, -49398457, 261665424, -193237237, -24904944, 235561863, 212219644, -102096038, 263189676, 218079117, 264914873, 52993357, -187302189, -219945042, -225212214, -191236848, 241668903, -202710145, 105387298, -210371115, -235813098, -76906406, -91699487, -10050149, 158820510, -43333539, 25338076, 11192914, 36701770, -67163999, -182841306, 249047762, 13571745, -102886503, 175667591, -10773602, 165132507, -79257461, 56544, 40631171, -217091370, 133876298, -151275187, 101049112, 28233468, 93705613, -135040534, -233525880, 209310642, -194008823, -266236147, 66000076, 52044668, -152794016, 254167487, -162250538, 191278397, 102915355, 110651913, 257060775, -75325508, 226370899, 169296998, 81292377, 2557680, 57415693, 120811175, -92167563, -69263413, -217921181, -215555766, 164576085, -224390071, 197131082, 181646324, 248077551, -244041961, -231521812, -125937358, -91931721, 250021613, -88867984, 46634085, -180213094, 192226644, 57629116, 5065104, 120608203, 197253481, -159497563, 146974152, 19544027, 19292064, 133328694, -148468341, 113802884, 186273091, -154393012, -203041589, -48038925, -125003749, 49115370, -256703681, -164229110, -197537865, -211431360, 167988568, -131687295, 158096089, -201591825, -26700045, -234274651, -70224787, 53182290, 75679069, 148310273, -241645636, -241250566, 365430, 63381941, -70658955, -21247397, -114924681, 115306674, -113340140, -13254917, -33707798, -146361368, -15873105, 55831951, 110534116, -134644064, -255146142, -206519430, 101723373, 146586720, -204084621, 227813322, 67977916, -66046128, -180855702, 255120451, -194480400, -233164602, 193669200, -246812697, 20116150, -1421651, -109827628, -224149912, 140676465, 122599270, -154274125, 41675729, 164587592, -32772115, 11020721, 246003484, 136208186, -120762214, -176174343, -154389843, 17824726, -55259089, -185523922, -50324009, 133355345, 70137398, -165607040, 19583668, 31327086, -126844213, -188561381, 252147803, -38619528, 114497569, -99196393, -12644807, 207539172, 248233133, 221445456, 22990223, 66186562, 212899743, -232437359, 106746400, -229228106, 131868633, 178240275, 148198410, 102974520, -32194377, -11295581, -211101505, -8317382, -21317664, -201220231, -129751454, -28852740, 70921956, 97587813, -264635837, 107165299, 28601534, 57314207, 257900815, 61080815, -10054077, 78384672, -170413569, 38894877, 246827167, -147575253, 202463359, 74429581, -146820842, -106734676, 136182356, -68033918, -112531275, 66306445, 117298766, -39829863, -24992654, 243343844, 209715486, -198146058, -172138761, -181717201, 209315469, -245633438, 116838408, -219094956, 49475010, -240872751, 97033580, 226123610, 255048115, 157533443, -102483971, 6434696, 32208271, -169591865, -59173976, -119688864, 57042718, 44909198, 187893548, 53853134, -233243389, 148381709, 154793157, 201666422, -248683684, 142947651, 185474272, 76318393, 224198501, -6973945, 158841981, -6681155, 7318011, -161135137, -12995329, -167416609, 266104273, 118717328, -32268271, 22037913, 123282950, 65960040, 53580139, 63571186, 41710206, -268425574, 54509459, -117809970, 53536329, -168306954, -5725650, 54225688, 91869843, -185888817, -95209429, -260979469, -262221754, 249407018, 144025279, -232720568, -13765995, 117553741, -145074483, -247635080, -264222388, -162640717, -239131606, -262100058, 110799953, -17794563, 168946223, -82146032, 40517936, -47440652, 38638915, 64223762, 167890580, 48329207, 252787568, -198528041, -5487646, -31395708, 225031422, 126427701, -166826170, -135199429, 212159976, -217062047, 33293856, 199564451, 37566001, 106753211, 66518914, 159050413, 11833256, 15246463, 197865196, 167954014, -245541241, -159678290, 25538325, 116468048, 144570090, 171328698, -137520520, 199346673, 23540399, -85340050, -223242047, 223727765, 225686457, 218723093, 231048021, -50284858, 237644762, -190776495, -135093982, 64484007, -48799159, -154532055, 136850661, -10280042, 148645472, -61103802, -68335508, 224037836, 4909000, -43173144, -112751199, 124662709, -117688301, -201806416, -654482}, + []int{221669372, -198001620, 15244180, -85651914, 187512073, 183505647, -240495316, 33170893, 131048656, -184341503, -110422027, -116580036, 83528072, -44275735, -245936274, -190744927, -174915154, 139891567, -211574228, 233659572, 131414598, 124377872, -245383956, -196554724, 212256846, 157139407, -232406115, -50504444, 84387077, 256372616, -204508328, 235560486, 163405342, -219350391, -151874466, -221399919, -90022570, -63892624, -80441153, 143952693, 22150513, -17877846, 208084922, 209533876, 199282852, 28946431, 46895507, -109841246, 208817335, 254839546, -54788427, 138210737, -94182109, -160046898, -243841335, 97943949, 106437630, 32443000, -32273081, -115665080, -257611236, -89503963, 6858125, -91171476, -157980323, -106139384, -150994306, 175237808, 164280223, -127483402, 173787699, -94584308, -116134557, -210457779, -33000660, -109983682, 136658341, 89750297, -165637581, 104488287, -159182529, 47355696, -104681840, -148765655, 12703836, 210946062, 226838746, -11560240, 153753586, 30612560, -171344239, 158232960, -35044863, -10186681, 232338329, 75475309, 37740825, 11228185, 214982269, -32284475, -225050622, 62137910, 54306519, -161991699, 168994569, -36866088, 203279711, -172862596, 80903027, -233280519, 12026443, 11422825, -189187142, 82263523, -238573131, 176583387, -51488018, -51450707, -233094742, 123672453, -173518850, 233686254, -155274811, -251303749, -892420, 179534093, -17944084, -202090547, -133644271, -93833713, -100693677, -20694153, 105044126, 157421899, 36866654, -85670870, 254210531, -176743174, 27316992, -26703029, 207534002, -160884471, -13122417, 168156929, 78313276, 136625629, 52372217, -210148564, 166615958, -181785163, -159870059, 263188892, -67992616, -247149664, 225105347, -74322183, -210625022, 247857120, 221045263, -154900286, -125185375, 85880297, -239919076, 212790757, 185113358, 201667436, 165765082, 34275491, -256567158, 25243601, 215621158, -232884132, 86394229, -64531264, -182723134, -153400015, -264382050, -141629726, -146900939, -185884301, 193251325, -151956563, 85202519, -16068920, 181089617, 62436083, 60440272, -165243795, 222533663, 209114403, 89720897, 175728941, 13779904, -244786127, 138586888, -196924214, -45259073, 127306014, 80717567, 50166089, -61470373, -45450175, -44729827, -184000601, 161923069, -80593594, -182980300, -13590319, -229206348, 184479234, -143779158, 144100230, 1342408, 238446627, -5145335, 253577528, 81101868, 247252369, -205768945, 179094444, 160203477, 35038008, -152252784, 115112023, -165190199, -267002764, -199232771, -30241881, 140042559, 215754142, 46294663, -197513772, 125471385, -115638628, -83744931, -116240781, 267370000, -128321304, -43871568, 220144787, 216528954, 445123, -253232621, -125566344, -185812074, -21764766, 92534859, -40262974, 246756537, -227431258, 193661963, 90992628, 45820279, 260152393, -250828276, -83148257, -3005878, 138655731, -16558697, -65468202, -83527016, 255379775, 146977521, 245276519, 160537713, -120477764, -207457664, 149740721, 41457501, 165774690, -24084874, -124643368, -19332118, 48580230, 108236652, 117992657, -173991930, 58087819, -168723250, 240285917, -86244832, -256846973, -63475278, -76112833, 124776283, -23844807, -116555825, -10406229, 229770025, -172837101, 147646415, -237943558, 150034578, 202842918, 104677142, -158558140, -255552348, 146165742, -140218784, -233012494, 239990650, -21022269, -78922249, 44866796, 115575522, 155307217, -116537894, -18560995, -195957344, -203714106, -247328094, -12154432, 118994200, -204323063, 124462593, 123732606, 231537108, -50939482, -5227291, 19074077, -86032517, -204182772, 160510162, 99175573, 111604151, -112292900, -184524068, -138326884, -37792063, -132864024, 91333570, 219790087, 36935079, 209785739, -263045323, 223825784, 118649884, 185006767, 82113430, 159733379, 165769118, 238143375, -227919079, 244573309, -13652678, -149367440, -135162752, -131148257, -174611766, -179563101, -243916504, 236388979, -28313506, -190638280, 51249159, 172647597, 228345519, 7708245, -191595229, 237371355, -182414099, 136120002, 135033083, 17929913, -47018671, -104742732, 252703376, 263987708, 10363790, -198035899, -112274788, -156194191, 210773650, 15924424, -11332211, 201291167, -127798303, 200110171, 47667091, -116679265, -251051562, 245418091, 87243182, 243365228, -100823208, 232974260, 1492806, -61781783, -107623787, -8062336, 51148075, 262607595, 186735124, 103880595, -62679594, 242596408, 45020163, -140377462, -215808343, -107791913, 82616657, -265927240, -254875266, -4314957, -154747839, 203820486, -197128691, 137943698, 200925393, 265318871, 267580496, -267050038, 50792788, -126766506, -47675391, 22792125, -39284840, -92203735, -85996567, 102243375, -22442292, 165867206, -121069865, -87037879, 14018735, -212794937, -7724372, -63636460, -35676956, -63072566, 212517102, -219844562, -242573336, 70319461, -146081225, 58120660, 233338033, 138831839, 112550296, 207235860, 231654548, -173064259, -186475501, -68652286, 14473444, 243139933, 68551319, -10921957, 178351987, 88132890, -250924296, 135194388, -37560504, 242450499, 252410035, 138116604, -36066615, 147455700, -168152674, -129998708, 43352483, 83655691, 19737357, -123458139, -163176150, 124742912, 238247489, 130077719, 235670866, -213295050, 96486380, -41571261, 257355669, 265070603, 85013326, -151952866, 123096459, -226757040, 17553415, 67495052, -102603546, -178808789, -245714555, -240487063, -169017755, -108206082, 228001852, 110848884, -39844662, -39766857, 39152151, -203957629, 150476211, 266783243, -139428382, 200605399, -58436094, -14310842, -203232885, -130405719}, + []int{-17546607, 214071333, -93657289, -165621387, -11839282, 198176602, -64912029, -192474743, -2493976, 99990929, 167486438, -106329152, 184859425, -264773630, 169472755, 41413055, -251096373, -80110364, 30069861, 75320581, 185695928, 195317818, -115725122, -7487907, -158784107, -196023923, -66900235, 161414843, -25937463, 145835332, -202898499, 259829266, -74026668, -157319850, 149881225, 43799905, -123466453, 147330916, -152436728, 221835577, -248543497, 20714983, -12614768, 239832417, -110657465, 43561912, 165071752, -7463783, 78065931, 155976364, 213922644, -217800666, 117615362, 24707363, -185565434, -2496567, 234450588, 210298310, 4529768, -113829319, 147184434, 19829806, -65480417, -223367800, -236359076, 163678294, 125913316, -188623095, 59555496, -111797935, 58175523, -259346726, -33248128, -229144880, -160843897, 27494232, -104453818, 89063257, 249059089, 69323436, 247770901, 1155380, -148019049, -160968762, -52326738, 82325533, -150756244, -104804188, -46356628, 94794403, -261182860, -10420423, 233904773, -80564795, -217303247, 248709484, -217368590, 203569371, 266588872, -160038154, 174084116, -63090368, 130359158, 249120753, 211923649, 64898419, -16491279, -89473178, -179116762, -148644676, -123831028, -78479822, -117028195, -205007240, 147474634, -124632210, 122766610, -31483259, 177986551, 212416299, -173880456, -26259615, 65689126, 262056512, -201886928, -114707242, 177214697, 183136502, 169681484, 89300445, 52105394, -12498419, 127903356, -6374306, 36194910, 255462688, 109178711, 155722896, 74164781, 19458415, 43518348, 29768689, 198946521, 140845308, -265036965, -165240223, -3153151, 151242831, 41276761, -237471486, 37519318, 107074694, -215030646, -3464147, -58802258, 99020863, 213032313, 31235751, -218555771, -37863554, 231126167, -89091450, 17873457, -22810759, 152036250, -258089843, -249909549, -105830340, -121030135, 56984466, 229745302, -43266151, 16449460, 84946278, 78838144, 47264065, -522967, -221520615, -66270632, -253257746, 124993931, 71698073, -179800345, -9879068, -181841274, -216733333, -83486022, 39389160, 92493349, 172404528, 5487456, -196500341, 25118152, -63318215, -71012827, -191687271, 258789989, -47316455, -213910836, -183284934, 96759535, -19262915, -52873957, 106041491, -224910509, -26592332, -152873756, -28605706, 108877934, 42922751, 38500181, 56118455, -242432922, -261959354, -11426682, 132493451, -258308301, -241520608, -235879247, -258549261, 160320330, 204144168, -229333790, -230664067, -254209559, 245681349, -179049065, 261790654, -193316272, 72210889, -229236212, 74540895, 221674964, -40018913, -32341342, -69965461, 123731637, 233836230, 119726263, 246933358, -94021658, -52097607, -10406239, 125734260, -115737123, 5941163, 139255932, -145105600, -193829821, 167740251, -108769677, -42292263, 131405275, -94488790, -182243652, -219764992, 206682974, 43057961, -251186524, -24177736, 30807576, 123925822, -977312, -161625270, 163423897, -118946809, 19676996, 16864825, -247513003, -263782933, 91126968, -197930072, -244550529, -2232143, -231713709, -230791141, -76840135, 22234414, 116549448, 40267838, 166826417, -162653607, 168746048, 146221577, 216339796, -57845269, 13985766, 174960381, 244713552, 132250866, 194165912, 56375268, -192391098, 217736317, -23138312, -40837897, 148109686, -81886357, -213245628, 161819698, 174481764, 200320434, 160713218, 28837628, -36336967, 117182586, -248569392, 253775604, 221105316, 213851844, -150058155, 214073046, 7350551, -120571007, -80617979, -189898994, 51227111, -13466954, 114952286, 132672517, -179105217, 70138185, 88385738, 114926708, -85116697, -95296319, -168266889, 195999185, -84003749, -249418120, -235726658, -207886816, -11693793, 105923530, -90358551, 205189091, 181805713, -5135867, 69330620, -94613491, 10345172, 177136406, 223881958, 205791751, -97769871, -236909138, -1162165, -37959289, 236831358, 135801885, 45942224, 159536698, 160991221, -196495165, -112683826, 234114694, 246786698, -32832684, 85453732, 237587729, 210417625, 97701187, -171891608, -33268255, -71278052, 33950735, 113434539, -163579667, 16482549, 139208106, -133924314, -174985148, 147699372, 242136973, -51223728, 99706118, -249667889, -119022096, 191440014, -124643812, -65369045, -243195741, 101199849, -215324961, -5495160, -102313901, 106679578, 67972208, 150048782, 192562611, -23641643, -196714110, -59965162, -51256959, 145536405, -19500260, 124767517, 95632286, 79251420, -224446048, 85667827, -201627018, 30475498, -260024174, 165039410, -188173717, 161585950, 113560906, -60572913, 54902978, 135580726, -166465510, 147514020, 122455481, 221939011, 49788676, -161920213, -198705087, 56824728, 53677114, -21824892, 211734581, 150254300, 22269437, 15062651, 15872581, 50474197, -103200689, -211868690, 229323751, 134820280, 45454789, -151927405, 224375201, -53443176, -249438829, 49785112, 34597275, 21695084, -103764484, -87614995, -26960575, 92718417, 203227761, 191816676, 57188734, -94058815, 232706170, 230018388, 36657423, 35382336, 233232562, 226830557, 197380490, -51987969, 92219691, -47334803, 131019592, -200679779, -93026917, -265656762, 1901277, -266155336, -43263344, 192736280, 239702174, 228229959, -231427435, 227698144, 145615607, -184131263, -266440106, 149770275, -249784065, 252301281, -174830881, 226987272, 162903342, 239228597, 112318589, -245478676, 121457133, -102744522, 21392804, 80376678, -231685657, 180250745, -264247701, -123596852, -215638565, -252775380, -233211704, -48529937, -120976856, 195556696, 118389478, -6534319, -18057851, 241975837, -187149680}, + 80, + }, + + { + []int{-1, -1}, + []int{-1, 1}, + []int{-1, 1}, + []int{-1, 1}, + 6, + }, + + { + []int{1, 2}, + []int{-2, -1}, + []int{-1, 2}, + []int{0, 2}, + 2, + }, + + // 可以有多个 testcase +} + +func Test_fourSumCount(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, fourSumCount(tc.A, tc.B, tc.C, tc.D), "输入:%v", tc) + } +} + +func Benchmark_fourSumCount(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + fourSumCount(tc.A, tc.B, tc.C, tc.D) + } + } +} diff --git a/Algorithms/0454.4sum-ii/README.md b/Algorithms/0454.4sum-ii/README.md new file mode 100755 index 000000000..c611099b5 --- /dev/null +++ b/Algorithms/0454.4sum-ii/README.md @@ -0,0 +1,31 @@ +# [454. 4Sum II](https://leetcode.com/problems/4sum-ii/) + +## 题目 + +Given four lists A, B, C, D of integer values, compute how many tuples (i, j, k, l) there are such that A[i] + B[j] + C[k] + D[l] is zero. + +To make problem a bit easier, all A, B, C, D have same length of N where 0 ≤ N ≤ 500. All integers are in the range of -228 to 228 - 1 and the result is guaranteed to be at most 231 - 1. + +Example: + +```text +Input: +A = [ 1, 2] +B = [-2,-1] +C = [-1, 2] +D = [ 0, 2] + +Output: +2 + +Explanation: +The two tuples are: +1. (0, 0, 0, 1) -> A[0] + B[0] + C[0] + D[1] = 1 + (-2) + (-1) + 2 = 0 +2. (1, 1, 0, 0) -> A[1] + B[1] + C[0] + D[0] = 2 + (-1) + (-1) + 0 = 0 +``` + +## 解题思路 + +见程序注释 + +![100](454.100.png) \ No newline at end of file diff --git a/Algorithms/0455.assign-cookies/README.md b/Algorithms/0455.assign-cookies/README.md new file mode 100755 index 000000000..5f2a08fde --- /dev/null +++ b/Algorithms/0455.assign-cookies/README.md @@ -0,0 +1,38 @@ +# [455. Assign Cookies](https://leetcode.com/problems/assign-cookies/) + +## 题目 + +Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie. Each child i has a greed factor gi, which is the minimum size of a cookie that the child will be content with; and each cookie j has a size sj. If sj >= gi, we can assign the cookie j to the child i, and the child i will be content. Your goal is to maximize the number of your content children and output the maximum number. + +Note: + +1. You may assume the greed factor is always positive. +1. You cannot assign more than one cookie to one child. + +Example 1: + +```text +Input: [1,2,3], [1,1] + +Output: 1 + +Explanation: You have 3 children and 2 cookies. The greed factors of 3 children are 1, 2, 3. +And even though you have 2 cookies, since their size is both 1, you could only make the child whose greed factor is 1 content. +You need to output 1. +``` + +Example 2: + +```text +Input: [1,2], [1,2,3] + +Output: 2 + +Explanation: You have 2 children and 3 cookies. The greed factors of 2 children are 1, 2. +You have 3 cookies and their sizes are big enough to gratify all of the children, +You need to output 2. +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0455.assign-cookies/assign-cookies.go b/Algorithms/0455.assign-cookies/assign-cookies.go new file mode 100755 index 000000000..fa0e7a4fb --- /dev/null +++ b/Algorithms/0455.assign-cookies/assign-cookies.go @@ -0,0 +1,21 @@ +package Problem0455 + +import ( + "sort" +) + +func findContentChildren(g []int, s []int) int { + sort.Ints(g) + sort.Ints(s) + + var i, j, res int + for i < len(g) && j < len(s) { + if g[i] <= s[j] { + res++ + i++ + } + j++ + } + + return res +} diff --git a/Algorithms/0455.assign-cookies/assign-cookies_test.go b/Algorithms/0455.assign-cookies/assign-cookies_test.go new file mode 100755 index 000000000..818941df7 --- /dev/null +++ b/Algorithms/0455.assign-cookies/assign-cookies_test.go @@ -0,0 +1,53 @@ +package Problem0455 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + g []int + s []int + ans int +}{ + + { + []int{1, 2, 3}, + []int{3}, + 1, + }, + + { + []int{1, 2, 3}, + []int{1, 1}, + 1, + }, + + { + []int{1, 2}, + []int{1, 2, 3}, + 2, + }, + + // 可以有多个 testcase +} + +func Test_findContentChildren(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findContentChildren(tc.g, tc.s), "输入:%v", tc) + } +} + +func Benchmark_findContentChildren(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findContentChildren(tc.g, tc.s) + } + } +} diff --git a/Algorithms/0456.132-pattern/132-pattern.go b/Algorithms/0456.132-pattern/132-pattern.go new file mode 100755 index 000000000..a9b67f77f --- /dev/null +++ b/Algorithms/0456.132-pattern/132-pattern.go @@ -0,0 +1,35 @@ +package Problem0456 + +func find132pattern(a []int) bool { + // 题目要求找到 i < j < k + // 使得 ai < ak < aj + ak := -1 << 31 + // ajStack 存放了所有符合 ai < ak < aj 的 aj + ajStack := make([]int, 0, len(a)) + + for i := len(a) - 1; 0 <= i; i-- { + + if a[i] < ak { + // 找到了题目要求的 ai < aj < ak + return true + } + + // ajStack 中的数字的 index 都比 i 大 + // 从 ajStack 中挑选一个仅次于 a[i] 的数字作为新的 ak + // 然后,把 a[i] 当做下一轮 for 的 aj 放入 ajStack + for len(ajStack) > 0 && + ajStack[len(ajStack)-1] < a[i] { + ak = ajStack[len(ajStack)-1] + ajStack = ajStack[:len(ajStack)-1] + + // 根据 stack 的进出栈规则 + // ajStack 中的 ax 及其 ax 在 a 中的索引号 x,都是递减的 + // 理解这一点很关键 + // 始终维持了 ak < ax ∈ ajStack 且 ak 尽可能地大 这样的关系 + } + + ajStack = append(ajStack, a[i]) + } + + return false +} diff --git a/Algorithms/0456.132-pattern/132-pattern_test.go b/Algorithms/0456.132-pattern/132-pattern_test.go new file mode 100755 index 000000000..f8f857fac --- /dev/null +++ b/Algorithms/0456.132-pattern/132-pattern_test.go @@ -0,0 +1,74 @@ +package Problem0456 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans bool +}{ + + { + []int{9, 8, 7, 6, 5, 4, 3, 2, 1}, + false, + }, + + { + []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}, + false, + }, + + { + []int{9, 11, 8, 9, 10, 7, 9}, + true, + }, + + { + []int{1, 0, 1, -4, -3}, + false, + }, + + { + []int{3, 4}, + false, + }, + + { + []int{1, 2, 3, 4}, + false, + }, + + { + []int{3, 1, 4, 2}, + true, + }, + + { + []int{-1, 3, 2, 0}, + true, + }, + + // 可以有多个 testcase +} + +func Test_find132pattern(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, find132pattern(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_find132pattern(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + find132pattern(tc.nums) + } + } +} diff --git a/Algorithms/0456.132-pattern/README.md b/Algorithms/0456.132-pattern/README.md new file mode 100755 index 000000000..b5c05be7c --- /dev/null +++ b/Algorithms/0456.132-pattern/README.md @@ -0,0 +1,42 @@ +# [456. 132 Pattern](https://leetcode.com/problems/132-pattern/) + +## 题目 + +Given a sequence of n integers a1, a2, ..., an, a 132 pattern is a subsequence ai, aj, ak such +that i < j < k and ai < ak < aj. Design an algorithm that takes a list of n numbers as input and checks whether there is a 132 pattern in the list. + +Note: n will be less than 15,000. + +Example 1: + +```text +Input: [1, 2, 3, 4] + +Output: False + +Explanation: There is no 132 pattern in the sequence. +``` + +Example 2: + +```text +Input: [3, 1, 4, 2] + +Output: True + +Explanation: There is a 132 pattern in the sequence: [1, 4, 2]. +``` + +Example 3: + +```text +Input: [-1, 3, 2, 0] + +Output: True + +Explanation: There are three 132 patterns in the sequence: [-1, 3, 2], [-1, 3, 0] and [-1, 2, 0]. +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0459.repeated-substring-pattern/README.md b/Algorithms/0459.repeated-substring-pattern/README.md new file mode 100755 index 000000000..5ab15b354 --- /dev/null +++ b/Algorithms/0459.repeated-substring-pattern/README.md @@ -0,0 +1,36 @@ +# [459. Repeated Substring Pattern](https://leetcode.com/problems/repeated-substring-pattern/) + +## 题目 + +Given a non-empty string check if it can be constructed by taking a substring of it and appending multiple copies of the substring together. You may assume the given string consists of lowercase English letters only and its length will not exceed 10000. + +Example 1: + +```text +Input: "abab" + +Output: Tru +Explanation: It's the substring "ab" twice. +``` + +Example 2: + +```text +Input: "aba" + +Output: False +``` + +Example 3: + +```text +Input: "abcabcabcabc" + +Output: True + +Explanation: It's the substring "abc" four times. (And the substring "abcabc" twice.) +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0459.repeated-substring-pattern/repeated-substring-pattern.go b/Algorithms/0459.repeated-substring-pattern/repeated-substring-pattern.go new file mode 100755 index 000000000..4fc684ed6 --- /dev/null +++ b/Algorithms/0459.repeated-substring-pattern/repeated-substring-pattern.go @@ -0,0 +1,17 @@ +package Problem0459 + +import ( + "strings" +) + +func repeatedSubstringPattern(s string) bool { + if len(s) == 0 { + return false + } + + size := len(s) + + ss := (s + s)[1 : size*2-1] + + return strings.Contains(ss, s) +} diff --git a/Algorithms/0459.repeated-substring-pattern/repeated-substring-pattern_test.go b/Algorithms/0459.repeated-substring-pattern/repeated-substring-pattern_test.go new file mode 100755 index 000000000..53bade134 --- /dev/null +++ b/Algorithms/0459.repeated-substring-pattern/repeated-substring-pattern_test.go @@ -0,0 +1,59 @@ +package Problem0459 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + ans bool +}{ + + { + "bb", + true, + }, + + { + "abab", + true, + }, + + { + "", + false, + }, + + { + "aba", + false, + }, + + { + "abcabcabcabc", + true, + }, + + // 可以有多个 testcase +} + +func Test_repeatedSubstringPattern(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, repeatedSubstringPattern(tc.s), "输入:%v", tc) + } +} + +func Benchmark_repeatedSubstringPattern(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + repeatedSubstringPattern(tc.s) + } + } +} diff --git a/Algorithms/0460.lfu-cache/460.100.png b/Algorithms/0460.lfu-cache/460.100.png new file mode 100644 index 000000000..e824e6bf0 Binary files /dev/null and b/Algorithms/0460.lfu-cache/460.100.png differ diff --git a/Algorithms/0460.lfu-cache/README.md b/Algorithms/0460.lfu-cache/README.md new file mode 100755 index 000000000..e8a8e5929 --- /dev/null +++ b/Algorithms/0460.lfu-cache/README.md @@ -0,0 +1,37 @@ +# [460. LFU Cache](https://leetcode.com/problems/lfu-cache/) + +## 题目 + +Design and implement a data structure for [Least Frequently Used (LFU)](https://en.wikipedia.org/wiki/Least_frequently_used) cache. + +It should support the following operations: `get` and `put`. + +- `get(key)` - Get the value (will always be positive) of the key if the key exists in the cache, otherwise return -1. + +- `put(key, value)` - Set or insert the value if the key is not already present. When the cache reaches its capacity, it should invalidate the least frequently used item before inserting a new item. For the purpose of this problem, when there is a tie (i.e., two or more keys that have the same frequency), the least recently used key would be evicted. + +Follow up: +Could you do both operations in O(1) time complexity? + +Example: + +```text +LFUCache cache = new LFUCache( 2 /* capacity */ ); + +cache.put(1, 1); +cache.put(2, 2); +cache.get(1); // returns 1 +cache.put(3, 3); // evicts key 2 +cache.get(2); // returns -1 (not found) +cache.get(3); // returns 3. +cache.put(4, 4); // evicts key 1. +cache.get(1); // returns -1 (not found) +cache.get(3); // returns 3 +cache.get(4); // returns 4 +``` + +## 解题思路 + +见程序注释 + +![100](460.100.png) \ No newline at end of file diff --git a/Algorithms/0460.lfu-cache/lfu-cache.go b/Algorithms/0460.lfu-cache/lfu-cache.go new file mode 100755 index 000000000..60aaba3c0 --- /dev/null +++ b/Algorithms/0460.lfu-cache/lfu-cache.go @@ -0,0 +1,115 @@ +package Problem0460 + +import "container/heap" +import "time" + +// LFUCache 实现了 Least Frequently Used (LFU) cache +type LFUCache struct { + // 用于检查 key 的存在性 + m map[int]*entry + pq PQ + cap int +} + +// Constructor 构建了 LFUCache +func Constructor(capacity int) LFUCache { + return LFUCache{ + m: make(map[int]*entry, capacity), + pq: make(PQ, 0, capacity), + cap: capacity, + } +} + +// Get 获取 key 的值 +func (c *LFUCache) Get(key int) int { + ep, ok := c.m[key] + if ok { + c.pq.update(ep) + return ep.value + } + return -1 +} + +// Put 把 key, value 成对地放入 LFUCache +// 如果 LFUCache 已满的话,会删除掉 LFUCache 中使用最少的 key +func (c *LFUCache) Put(key int, value int) { + if c.cap <= 0 { + return + } + ep, ok := c.m[key] + // key 已存在,就更新 value + if ok { + c.m[key].value = value + c.pq.update(ep) + return + } + + ep = &entry{key: key, value: value} + // pq 已满的话,需要先删除,再插入 + if len(c.pq) == c.cap { + temp := heap.Pop(&c.pq).(*entry) + delete(c.m, temp.key) + } + c.m[key] = ep + heap.Push(&c.pq, ep) +} + +/** + * Your LFUCache object will be instantiated and called as such: + * obj := Constructor(capacity); + * param_1 := obj.Get(key); + * obj.Put(key,value); + */ + +// entry 是 priorityQueue 中的元素 +type entry struct { + key, value int + // 以下是辅助参数,由 heap.Interface 实现的函数自动处理 + frequence, index int + date time.Time +} + +// PQ implements heap.Interface and holds entries. +type PQ []*entry + +func (pq PQ) Len() int { return len(pq) } + +func (pq PQ) Less(i, j int) bool { + if pq[i].frequence == pq[j].frequence { + return pq[i].date.Before(pq[j].date) + } + + return pq[i].frequence < pq[j].frequence +} + +func (pq PQ) Swap(i, j int) { + pq[i], pq[j] = pq[j], pq[i] + pq[i].index = i + pq[j].index = j +} + +// Push 往 pq 中放 entry +func (pq *PQ) Push(x interface{}) { + n := len(*pq) + entry := x.(*entry) + entry.index = n + entry.date = time.Now() + *pq = append(*pq, entry) +} + +// Pop 从 pq 中取出最优先的 entry +func (pq *PQ) Pop() interface{} { + old := *pq + n := len(old) + entry := old[n-1] + entry.index = -1 // for safety + *pq = old[0 : n-1] + return entry +} + +// update modifies the priority of an entry in the queue. +func (pq *PQ) update(entry *entry) { + entry.frequence++ + entry.date = time.Now() + heap.Fix(pq, entry.index) +} diff --git a/Algorithms/0460.lfu-cache/lfu-cache_test.go b/Algorithms/0460.lfu-cache/lfu-cache_test.go new file mode 100755 index 000000000..a198c45ac --- /dev/null +++ b/Algorithms/0460.lfu-cache/lfu-cache_test.go @@ -0,0 +1,56 @@ +package Problem0460 + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_LFUCache(t *testing.T) { + ast := assert.New(t) + + cache := Constructor(2) + + cache.Put(1, 1) + cache.Put(2, 2) + + ast.Equal(1, cache.Get(1)) + + cache.Put(3, 3) + + ast.Equal(-1, cache.Get(2)) + + ast.Equal(3, cache.Get(3)) + + cache.Put(4, 4) + + ast.Equal(-1, cache.Get(1)) + + ast.Equal(3, cache.Get(3)) + + ast.Equal(4, cache.Get(4)) + +} + +func Test_LFUCache2(t *testing.T) { + ast := assert.New(t) + + cache := Constructor(0) + + cache.Put(0, 0) + + ast.Equal(-1, cache.Get(0), "没能正确处理好, cap <= 0 的情况") +} + +func Test_LFUCache3(t *testing.T) { + ast := assert.New(t) + + cache := Constructor(2) + + cache.Put(3, 1) + cache.Put(2, 1) + cache.Put(2, 2) + cache.Put(4, 4) + + ast.Equal(2, cache.Get(2), "更新 2 的值后,其 frequence 没有增加") +} diff --git a/Algorithms/0461.hamming-distance/README.md b/Algorithms/0461.hamming-distance/README.md new file mode 100755 index 000000000..fc3b53cc9 --- /dev/null +++ b/Algorithms/0461.hamming-distance/README.md @@ -0,0 +1,29 @@ +# [461. Hamming Distance](https://leetcode.com/problems/hamming-distance/) + +## 题目 + +The Hamming distance between two integers is the number of positions at which the corresponding bits are different. + +Given two integers x and y, calculate the Hamming distance. + +Note: +0 ≤ x, y < 231. + +Example: + +```text +Input: x = 1, y = 4 + +Output: 2 + +Explanation: +1 (0 0 0 1) +4 (0 1 0 0) + ↑ ↑ + +The above arrows point to positions where the corresponding bits are different. +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0461.hamming-distance/hamming-distance.go b/Algorithms/0461.hamming-distance/hamming-distance.go new file mode 100755 index 000000000..82200c97e --- /dev/null +++ b/Algorithms/0461.hamming-distance/hamming-distance.go @@ -0,0 +1,13 @@ +package Problem0461 + +func hammingDistance(x int, y int) int { + x ^= y + + res := 0 + for x > 0 { + res += x & 1 + x >>= 1 + } + + return res +} diff --git a/Algorithms/0461.hamming-distance/hamming-distance_test.go b/Algorithms/0461.hamming-distance/hamming-distance_test.go new file mode 100755 index 000000000..9ca870a32 --- /dev/null +++ b/Algorithms/0461.hamming-distance/hamming-distance_test.go @@ -0,0 +1,47 @@ +package Problem0461 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + x int + y int + ans int +}{ + + { + 3, + 1, + 1, + }, + + { + 1, + 4, + 2, + }, + + // 可以有多个 testcase +} + +func Test_hammingDistance(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, hammingDistance(tc.x, tc.y), "输入:%v", tc) + } +} + +func Benchmark_hammingDistance(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + hammingDistance(tc.x, tc.y) + } + } +} diff --git a/Algorithms/0462.minimum-moves-to-equal-array-elements-ii/README.md b/Algorithms/0462.minimum-moves-to-equal-array-elements-ii/README.md new file mode 100755 index 000000000..9a541c968 --- /dev/null +++ b/Algorithms/0462.minimum-moves-to-equal-array-elements-ii/README.md @@ -0,0 +1,26 @@ +# [462. Minimum Moves to Equal Array Elements II](https://leetcode.com/problems/minimum-moves-to-equal-array-elements-ii/) + +## 题目 + +Given a non-empty integer array, find the minimum number of moves required to make all array elements equal, where a move is incrementing a selected element by 1 or decrementing a selected element by 1. + +You may assume the array's length is at most 10,000. + +Example: + +```text +Input: +[1,2,3] + +Output: +2 + +Explanation: +Only two moves are needed (remember each move increments or decrements one element): + +[1,2,3] => [2,2,3] => [2,2,2] +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0462.minimum-moves-to-equal-array-elements-ii/minimum-moves-to-equal-array-elements-ii.go b/Algorithms/0462.minimum-moves-to-equal-array-elements-ii/minimum-moves-to-equal-array-elements-ii.go new file mode 100755 index 000000000..7995fa4dc --- /dev/null +++ b/Algorithms/0462.minimum-moves-to-equal-array-elements-ii/minimum-moves-to-equal-array-elements-ii.go @@ -0,0 +1,28 @@ +package Problem0462 + +import "sort" + +func minMoves2(nums []int) int { + sort.Ints(nums) + size := len(nums) + + median := nums[size/2] + if size&1 == 0 { + median += (nums[size/2-1] - median) / 2 + } + + res := 0 + for _, n := range nums { + // 把所有的元素都调整到 中位数 才是最优解 + res += diff(median, n) + } + + return res +} + +func diff(a, b int) int { + if a > b { + return a - b + } + return b - a +} diff --git a/Algorithms/0462.minimum-moves-to-equal-array-elements-ii/minimum-moves-to-equal-array-elements-ii_test.go b/Algorithms/0462.minimum-moves-to-equal-array-elements-ii/minimum-moves-to-equal-array-elements-ii_test.go new file mode 100755 index 000000000..f1ae94390 --- /dev/null +++ b/Algorithms/0462.minimum-moves-to-equal-array-elements-ii/minimum-moves-to-equal-array-elements-ii_test.go @@ -0,0 +1,64 @@ +package Problem0462 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans int +}{ + + { + []int{1334, 1500, 4169, 724, -3522, 4358, 1962, -536, 705, 3145, -1719, 1827, 4961, -4509, -2005, -3058, -173, 436, -2609, -396, -1098, -4847, -4708, -2618, 2421, 3716, 4718, 4895, 447, -3274, -229, -3462, -3131, 4912, 667, 1299, 2035, 4894, 3703, -1189, -3678, -4667, 2673, -336, 141, 2711, 3253, 1868, 547, 2644, -2338, -2243, -4963, -2141, 3723, 4741, 2529, -4222, -2684, -1965, -2810, -3158, -4712, -4894, 4040, 3942, 4264, -2352, 2446, -1195, 890, 1729, -630, 350, 6, -3899, -607, -1452, 4629, -2377, -916, 4954, 3756, -3160, -34, 2376, -1069, 1308, 1944, -2561, -374, -3677, 537, -3462, 1118, -2918, -2071, 1541, -167, -3885, -361, 4658, -2296, 4930, -1023, -2694, -3327, -2614, 21, 3745, 1924, 4072, 1270, 829, 1777, 573, 97, 1512, -1014, -1710, 4161, 3636, -2645, -233, -1345, 574, -969, -2948, 2350, -3850, 1941, -3276, -1034, -1570, -3893, -4809, 3007, -3663, 457, -2713, 2753, -4617, -55, 3909, -2791, 4758, -779, 3588, 1422, -54, 2506, -1970, 1413, 4168, -4100, -2409, 3762, -3345, 2410, 1359, 2624, -4463, -3452, 1483, 2595, -959, -1398, -650, -4709, -4164, 4374, -3980, -404, -979, 2348, -1801, 4668, -516, 3281, -266, -4947, -3001, 1418, 2938, 1900, -1212, 3127, -4533, -1272, -107, -352, -2517, 2807, -2579, -690, 1617, -2187, 4514, -691, 2616, 3935, 2451, -4400, 249, 1519, -3444, -2202, -4697, 1224, -3992, 844, -2391, -11, -2298, -1805, -4515, -1907, -657, -4477, -3413, 4314, 4503, 2448, 200, -1542, 1618, -4420, 4796, -202, 281, 4589, -4202, 3009, 2157, -4528, -1378, 3538, -2708, 1038, -821, 3190, 4657, 2958, 1191, 4815, -2112, 4156, -3489, 1202, -2366, -728, -4945, -4672, -2354, 1362, -114, 3875, 3433, 4869, -4858, -1156, -3584, -3119, -3002, -4678, 3651, -4979, 699, -1443, 3476, 2892, -611, 75, -4288, -2400, -2490, -3997, 1869, 2861, -312, -1599, 4789, 255, 1423, 2, -4415, -818, -4715, 2088, -3574, 3617, -1243, 4832, -4068, -831, -2846, 721, 2189, 4976, -3671, -2632, 3692, -3575, -4445, -1566, 1549, 2441, 4512, -4855, 3060, -3282, -1247, 1139, -2577, 1279, 996, 1687, -2471, -2451, 2437, 4866, -2051, -4807, -1805, -1703, -4584, 3286, 1105, -512, 1282, -2545, 734, 3114, -3299, -3684, -4329, 786, -2737, -687, -645, -3815, -4947, -4088, -4192, -3168, -4055, -687, 2756, 3321, 4558, -1354, 2982, -4519, -856, -1804, -4778, 2129, -2839, 535, -4550, -3827, -4534, -2956, -3341, 1292, 1439, 2253, -4976, 1154, 4510, -255, -4351, -1814, 3313, -526, 3022, -2832, -982, 3787, 4905, 2958, 2391, -4798, -1375, 1477, -586, 4314, 824, 4334, 874, -628, -4841, -3167, 3070, 2487, 3297, 2518, 3177, 2773, -2730, -3237, -2332, 2192, -1015, -1898, 3480, 4213, 2627, -198, -901, -4473, -2375, -3457, -3076, -3977, 4972, -1939, -819, -3997, 2432, 2505, 2593, -2275, -1969, 3492, -4858, 2222, -3714, -1936, 2900, 4187, 3360, -2587, -4026, -730, 4170, -4765, -4167, 4711, 760, 3896, -333, 2285, -2450, -4860, -1306, -2305, -3376, 3019, -2875, 1576, -3306, -2342, 1302, 2371, -2534, -322, -2407, -1149, 484, -3982, 3464, -3881, -1848, -2200, 3087, -3940, -3074, 4010, -243, -2830, -4685, 4576, -4773, -2957, -2242, 2164, 109, 2882, 2086, 4565, -1513, 4577, -526, -2375, 627, 629, -3072, 423, 3520, 1902, -38, -4877, -404, -1263, -1739, -4805, -2475, -3736, 3260, 1202, 3116, 30, -4674, 4011, -4229, 1411, 547, -3847, -3480, 4790, -76, -4812, -3237, -60, -4149, 3662, -1171, -4100, 2713, 3958, 2578, 3365, -1993, -3523, -3800, 1058, 1439, -2697, -2240, 4357, -2676, 1477, 108, -3887, -113, 4801, -2150, -540, -2572, -2007, 2384, 4405, 1540, -3889, 3704, -2165, -2644, 1072, 4350, 3823, -515, -4444, -1784, -3374, 4357, 3526, -1643, 4337, -1729, -1131, 4361, -2104, -1978, 4617, -4888, -2283, 3696, -3415, -959, -577, -871, -771, -435, 1559, 3932, -2704, 4855, -2947, 1962, -1416, 4734, 1654, 1972, -3543, -631, -2468, -2037, -2393, -2517, -4089, -3365, -4933, -2152, -325, -2062, -2777, -2858, -1246, 1511, -2259, -4825, -3541, 2825, -1779, 2870, -3374, -3066, 205, -3217, -1150, 2398, -2721, -2299, -2807, -2266, -3363, 1534, 556, -3007, -4824, 705, 1962, -4452, 881, -4700, -587, 1641, 4855, -145, -1858, -3538, 2611, -4123, -4576, -2322, -3248, 3443, 3296, -2327, -4960, 4313, -4125, -4928, -2182, -4390, -3983, -68, 3112, -4305, -1831, -1169, -4960, 1488, 3685, 4090, 4497, -2411, 990, 145, 4353, 4314, 3651, 1740, -2956, -3742, -4665, 3759, -3808, 2605, 264, -2819, 3503, -1171, -1225, -4392, 4292, 997, 2549, 4556, 561, -3373, 1467, 4541, 1129, -3760, 2813, 4174, -4399, 1077, -4785, 3683, 3213, -1008, 824, 601, -1608, 759, -2330, 1428, 3027, -916, -4925, 3786, 498, -30, 1287, -1153, -2396, -4497, -3779, -2337, 706, -2637, 4010, -2829, 2489, 3240, -2836, 542, 2619, -4087, 2591, 1704, -3182, 4232, -4250, 205, -25, -3461, -4697, -3578, -3902, -3753, -1416, -1352, -2029, 2864, -2087, -3925, -3455, 3712, 2546, 3678, -3231, 262, 3519, -1015, 3289, 944, -2135, 3540, -1755, 508, 3318, 2870, 4601, 3323, -3868, -528, 2152, 87, 3570, 4763, 4901, 2103, -577, -1473, -3400, 1969, -985, 565, -4972, -3457, 347, -2912, -2057, -2363, -2591, 1463, 49, -319, -3412, -3658, -4392, -2940, -3779, -3242, 4954, -4112, -854, -4310, 2949, -2157, -3570, 620, -4252, 2067, -464, -4217, 3035, -2774, 185, 2038, 4853, 629, -3776, 748, 4923, -1641, -2743, -234, -56, -45, -1682, -2274, 411, -3975, -4645, -3999, -2451, 4496, 3584, 4515, 2964, -1658, 3075, 2913, 1142, -3804, -3052, 72, -4574, -394, 1173, -571, -2596, 1705, -4374, 4812, 4375, -4907, 1565, 1036, -264, 4141, -4186, 994, 3256, 1652, -1064, -4162, -4518, -3645, -3985, -3869, 3230, 2841, -375, -2989, -2363, -814, 4690, -3350, 662, -3366, -4107, -4647, -3584, -1548, -992, 2262, -2767, 454, 1303, 1634, 1303, -744, -4852, -3876, -2683, -787, 2109, -972, 4200, -3920, -3682, 1858, -950, -845, -3639, 264, -3097, -1324, 4643, 1909, -98, -1439, 3489, -52, -3718, -1347, -4326, -2780, 402, 1923, -1169, 4369, -1122, -4741, 4008, -2381, -1029, -4997, -3055, 4781, 1504, -2608, -2315, 313, 1698, 589, -2278, 938, 4037, 1410, -3539, 1234, -2492, 4961, -1041, 1493, -3485, 269, -63, 3869, -4942, -300, -1029, 1264, 117, 1215, -445, 2815, 3330, -1961, -4788, 4288, 3082, -3046, 1085, -4290, -516, -226, 3380, 4815, 951, 1541, 3115, -3321, 2110, 898, -1927, -4212, -1023, 3132, 4956, 3689, 1113, -4992, -2059, 790, -3277, -3637, -4972, 184, -222, 2200, 71, -3115, -3026, -3929, -3667, -2133, 1153, -705, -2832, -4175, 4676, 629, 3650, -2402, -1691, -307, -314, -4920, -4884, -2751, 1667, -3472, 1679, 2864, 4421, 3405, 3826, 1816, 2516, 2726, 3666, 4087, 2681, 4964, -3660, 686, 1021, -3338, -279, 1064, 4309, -4585, 2902, 4873, 2124, -1059, -2255, -3238, 3423, 2531, -194, -2732, 4318, 602, -3093, -693, -1519, -3988, -3864, 1630, -886, 1809, -916, -1444, -2710, -3707, 4996, 4152, -3946, 345, -292, -4752, 2491, -1288, 131, -4886, 1439, 2958, -278, 4704, 1995, -3948, 269, 2479, 3238, 1423, 2918, -4134, 2659, -2502, 3486, -3804, 2462, 1633, -2842, -2978, -3854, 3392, -1963, -1075, -4353, 4458, 1602, -4193, -902, 2830, 4292, -400, 2278, -4201, 3352, -4552, -1118, -4460, 3315, -425, 3762, 4567, -2664, 3397, -3582, 4897, 828, -1149, 1816, -770, -551, 1925, -4342, -4771, -480, -4060, 4560, 147, 162, -3345, -4325, -4208, -2639, -3246, 1398, -1854, 3714, 1946, -3812, 4569, 3638, 2663, 75, -485, -3479, -4525, 615, -4472, -1766, -2430, -4095, 4464, 4557, 3962, -839, -4476, -2451, 2469, -4670, -3077, 3350, -667, -2075, -4090, 4737, 1336, 3337, -3722, -2607, 2636, -4286, 3164, -3409, 4949, 4135, -2495, -1663, -4996, 1337, -2377, 3664, 4970, 608, -4432, 4281, 2085, 4152, 3373, 3652, 3194, 4876, -1174, 3396, 2572, 1249, -360, 4174, 3819, -4057, -2389, -3059, -4711, 3419, 565, -1195, 2585, 1216, -3550, -3385, -2391, -3936, 4166, 1893, 1074, -1491, -4700, 4695, 4573, 589, -1839, -3828, 2968, 2358, 1031, 1268, 4426, 3510, -4578, -4226, 3779, -4090, -1448, -818, 391, 495, 764, -4126, -3636, -98, 3255, -540, -4526, 1972, 1821, 1122, 547, -3423, 4789, 605, -4805, 2594, 2950, 1343, -4246, -2519, -3988, -3328, -1561, -1572, 912, 4762, 967, -592, -585, -3092, 2223, -3241, 1434, 204, 4486, -681, -4042, 945, 1806, 3166, 3700, -3633, 2692, -3213, 3532, -4444, -4026, -1553, 21, 3283, 1222, 4331, -2624, 3583, 1948, -2277, 2982, -2982, -224, 4220, -3889, -2818, -1144, 4490, 3925, -676, 1486, 4677, 969, -3357, 2534, 677, -2332, -3932, -3009, -2804, 2783, 1828, 2727, 4426, 871, -4303, 2612, 3703, -3973, -3592, 545, 4508, 2185, -4762, -763, 1443, -3687, -2499, 3850, 128, -2889, -1350, 3149, -3808, -3546, 869, -4319, 2465, -4733, 2713, 4793, 3634, 472, -4028, -2170, -99, 3442, 177, -1123, 770, -4298, -636, -3619, 1590, 3823, -2763, 3023, -2821, 1595, -4831, -2673, -2958, -3690, 3182, -3942, 2926, 4487, -3330, -2472, 651, -2742, 2213, 4860, 783, -3714, -2258, 3610, -528, 2128, 3434, 841, -4282, -1497, -133, -135, -4062, -3119, 4257, -2250, 3614, 3598, 3458, -2339, 1063, -2244, -4193, -4722, 4489, 4435, 1365, -2925, 2586, -3614, 2833, 3360, -1670, 1048, 3928, 4492, -2567, -1160, 1766, -3265, 4810, -3401, -3163, -3108, -3018, 2328, 4352, -3631, -3756, -3206, 1608, 4252, -3353, 2432, 4535, 2208, -1736, -1503, -1757, 2649, -2985, 1841, -4811, 1100, 4812, -4352, 4523, 4851, -526, 3633, 4891, 2200, 4854, 4990, 697, -81, 2780, -2422, -2069, -2456, -1660, -1513, -4101, -2475, 3483, 538, 2492, 1193, 3252, 11, -3440, 834, -3160, -3503, -2215, 3529, -3460, 3805, 3791, -1608, -1790, -1451, -3422, 1979, -4029, 4277, -4927, -4807, -3380, -3503, -1174, -3724, 4790, 1582, -1422, -3841, -4582, 1489, -4841, -1551, -2076, 4072, -4620, 2008, 2967, -4792, 1477, 3503, 370, -2393, -804, -2926, -1278, -2389, 4019, 3761, -3944, -2110, -3837, 1683, -1284, 4932, 452, -2259, -46, 1813, -2138, -4604, 460, -4385, -4096, -2401, -4864, -320, 4198, 2032, -613, -2416, 2240, -1483, 2006, 3670, -4759, 3882, 249, -1477, -3242, -2895, 4621, 2095, 2296, 4916, 678, -4822, -1421, 58, 2577, -2250, -993, -1271, -919, -2005, -2322, -324, 2753, -4101, -3216, 565, -1907, -1392, 1172, -3757, 4929, 2514, -4832, 55, -3809, 973, 3922, 1748, 651, -4014, -2856, 1446, -3423, 1517, -371, 4916, 874, 791, 469, -2088, 3146, -4307, 4091, 4815, 1949, 1857, -4360, 1052, -4764, 3551, 4487, -3774, 3162, 1955, -1817, 3394, -4820, 1097, -1935, 2065, -2487, 4261, -2422, -3922, 1878, -860, -389, -3053, -2555, -4830, 4975, -1511, -250, 1149, -1667, -1135, -2786, 2282, 2007, 2432, 3896, 1367, 3522, -118, -3190, 2641, 2231, -2813, 1705, 1479, 1321, 1538, -3649, 4447, -792, 4646, -2724, 759, -4811, -4578, 2666, 3486, -1545, -2972, 4614, -140, 4253, -3223, -3652, -2497, -4139, -2569, 4082, -2545, -803, -2894, 3752, 821, 2296, 1281, 1021, -545, 947, 2124, 3318, 4135, -3624, -3226, 4859, -2, -2926, 4253, 1922, -4365, -3357, 3888, 3153, -1768, -253, 3680, 4926, 678, 1450, -199, -39, -801, -4145, 1363, 716, -4427, -3439, -1755, 1473, 3274, -3450, -647, -3819, -713, -2301, 3110, 3643, 2465, 2172, -2471, 4981, -2888, -1524, -619, 3247, 1890, 1671, 3805, -2628, -4968, -1011, 4320, -1835, 431, 4658, -3707, 2206, 1578, 1948, -2794, 2171, 3166, -1604, 1697, -3980, -1306, 529, -212, -4891, 2984, -3031, 3978, -3383, -985, 1626, -1316, 4168, 2906, 928, -2903, 3118, -610, 199, -3215, -514, 4199, -2580, -4290, 3271, 813, 2415, 1085, -4682, -1420, -3669, 2267, 3387, -1556, -1814, -493, -640, 2827, 3074, 1431, 2152, -4729, -4732, -307, 4885, -4663, -3689, 2604, -2323, -4594, 2768, 4022, 4413, 0, -4458, 2537, -4962, -3612, 2355, -1711, -3353, -1819, -1907, 1584, -4013, -4239, -4507, 3217, 4501, 2482, 4447, 665, -4247, -2896, 84, 4095, -1475, -4779, -1036, -3219, -128, 3106, -1344, -1657, -2407, 2080, 1080, -132, -3589, -1287, -4032, -1749, 2216, -2921, 3768, 2040, -3469, -2067, -1221, -4337, -2741, 1653, 2936, -2905, -635, -3126, 2720, 1835, 680, 3976, 3455, 725, -929, -192, -1441, 4156, 602, 2832, 2905, -4560, 2375, -3438, -2115, -3038, -3920, -3164, -4203, -3798, -4492, -4920, 340, -2924, 4058, -3507, 2740, 3546, -4526, -227, 4097, 3880, -1665, -3928, -1600, -4293, -2045, -4334, -859, -1412, -2519, 2168, 3315, 4396, 1225, -3991, -2988, 3136, -3545, 3762, 43, -4258, -4979, 2922, -488, 4248, 1018, 2368, -1283, 4714, 2650, -1710, -1665, -2241, -1831, -3105, 303, -2360, -3021, -801, 4105, -209, 3661, 3681, -1348, 3753, -967, -2971, 987, 2042, 1253, -4917, -3580, 814, -2282, -2756, -3937, 2229, -4348, 3864, -231, -4530, 5, -3953, -3406, -3513, -674, -1724, -3677, 1540, 2679, -1010, -2412, -290, 4271, 2945, 4221, 3470, -4817, -1411, -1045, -22, -221, 6, -1738, -4865, -1513, 2196, 4033, -2912, -2065, 4779, 993, -210, -38, 3965, -3999, 4105, -3193, -433, -2331, -1866, -2329, -3543, -2002, -1455, -1403, -782, 3838, -156, 2372, 3563, -3972, 4264, 3801, -277, -1510, 2604, -3399, -773, -3803, -1308, 4771, -4637, 4301, -2637, 2721, -1435, 2421, -1555, 3610, -4505, 1741, 22, -3188, 4151, -1985, 3055, -1607, 3738, 279, 4882, -3392, -2346, -1178, -2293, -755, -3662, -4856, -2710, -3661, -1846, -396, -377, -2775, -4922, -3276, -3019, -2670, 4733, 3223, -4406, 4130, 3846, -13, 4445, 3805, 3616, 750, -4511, 2338, -3037, 3135, -303, -2791, -3370, -1776, -3092, 1737, -526, -3080, 2372, -4707, -1145, 1734, 4561, -3944, 2606, 3184, 2075, 3382, -881, 1741, -4568, -316, -2221, -2721, 3283, -4333, -4164, -875, -882, -2263, 3028, -2881, -4423, -4263, -909, -4444, -2205, 1060, -3099, 3793, -1568, -2864, -420, -125, 907, -3816, 3074, 3719, 1790, -4524, -4959, -1649, 3329, 1290, -2026, -1928, -1409, -2811, 787, -3510, -1761, -107, -1947, 2063, -4319, 903, 2005, -824, 3479, -3305, 1139, -2532, -1002, -3917, -1361, 4515, 2621, 4993, 826, 722, -1162, -172, -2419, -601, 3978, -3109, -3977, 1943, -166, -757, 2349, -2298, 3707, -4498, 141, -4313, 3346, 891, -363, 3413, -3600, -2184, -3310, -1838, 3935, 4126, 4410, 4877, -3618, 1260, 2189, 1705, -1126, -2337, -4278, -2805, -2434, 1360, 1038, 3588, 2811, 3245, 4467, -2575, 1867, -1811, -4458, -1937, -3453, -4498, 4617, 4099, 23, 2226, -3797, -4952, -3949, -3430, 3636, 4458, 967, 3456, 4405, -3469, 4962, 1819, 2975, -4444, 2531, -3505, 3044, -4409, 1803, -1612, 3915, 2450, -2681, 1272, 791, 4383, -4867, -3225, -358, -1431, 3300, 2954, -2922, -1415, -2743, 333, -4107, -4510, -4897, -250, 2233, -4278, -729, 4611, 3990, -4662, -3359, -1742, 4047, -2648, 4658, -4521, 302, -2317, 3990, -4998, 568, -578, 1895, 1135, 3008, -2639, 1742, -2806, -1301, -1812, -4822, -958, -3643, -1059, -3153, 2469, 1345, -620, -3087, -36, 710, -4939, 385, -4927, 2504, 4462, -2297, 3102, -3931, 154, -1471, -3448, -2926, 4149, -1270, -2756, -4156, -1951, -882, -935, 1363, 4552, 3773, 3470, 4731, 1747, 2511, 869, -602, -4502, 2103, 2352, 679, 3053, -1957, -478, -3912, -3437, 834, 4850, 2022, 2240, -3089, 4492, 651, 3580, 477, 2616, 4876, 4178, 220, -385, -2652, 1798, -2821, -3365, 1857, -2117, -3338, 3902, 3262, 4420, 4770, 4022, 4273, 841, -2314, 3888, -1083, -3283, -3108, -1302, -3733, -3251, -4935, -4611, 1932, 619, 1081, -2997, 4130, -1972, 3631, -411, -1848, 3630, 4172, 4864, 1407, -2705, 428, 4681, 3490, 1610, 1177, -3929, 236, 1459, -4357, 1840, 2633, 2037, -1107, -2370, -4726, -2007, 3782, -2797, 2461, 3290, 4662, -2693, -4003, -3849, 3423, 3890, 1717, 1640, 3703, 566, -117, -1339, -2341, 3245, -4614, -2349, -2235, 4601, 1840, 2209, -3503, 2283, 4250, 3058, 3421, -4825, -4419, 1787, -1729, -713, 2999, -2496, -21, -2862, -4300, -4470, -2539, -2882, -4795, 2540, 3828, -541, -3378, -602, -1240, 2098, -2065, -4519, -4386, 4567, 3493, 3596, 4161, 2746, -4462, 2670, -4462, -3524, -3445, -83, 1371, 1760, 752, -1242, 433, -2745, 4065, -4274, -2599, -1966, -2241, -4607, -4452, 2273, 3792, 1193, -2067, -4863, 2103, -1310, 3211, -1306, -332, -2373, 2498, -4011, 248, -1121, -3353, -3851, -4069, -4331, -4125, 598, 449, 436, -401, -4877, -3557, -3269, 3154, -2139, -566, 4385, -1033, -4184, -3607, 1704, 4866, -4047, -4692, 3223, 3684, -4208, -2333, -4952, -2531, -1070, -4189, 4814, 1090, 427, -1257, -3396, -4401, 1474, 2195, -4494, 158, 2589, 4858, 2809, 2889, -3553, -4960, -1182, 4364, 2975, -4974, 89, -2497, -4934, 1412, 1840, -2430, -324, 395, 3641, 4986, 2651, -3891, 3187, -4917, -3915, -1610, -3750, 3686, -245, -3619, 3128, 502, -723, -4138, 1424, -1435, -1128, -4168, -4115, -572, 1646, -4111, 1478, -4117, -75, -3735, -3740, 45, -4222, 821, -1145, -2480, -2073, -227, 134, 2251, -2325, -1664, 1334, -3999, -2263, 4310, 974, 2590, -4644, -3929, -2920, -4065, -2855, 2282, -3175, 3718, -1427, -288, -1963, -2, 4905, 2162, -3283, 3692, 4539, 3047, -4054, 4103, -4769, -885, -4161, 858, -4171, -2355, -1606, 2199, 4645, -728, -4325, -3138, -2928, -1227, -2520, -3762, 1897, -1458, 4608, 4203, -1723, 1125, -4866, -3599, 4078, 3382, -4831, -4264, 2478, 2939, -3862, 3721, -3574, -4337, -3323, -3425, 1724, 981, 2700, 2961, 3862, 1002, 3448, 95, -4316, -984, 137, 4507, -1007, -3716, -2056, -4741, -4179, 2058, -357, 2668, -4323, -4881, 4857, -1959, 3891, 264, -3377, 1915, 3072, 2929, -4159, -285, 2615, -2464, -43, 2759, -4300, -1548, 93, -759, -3171, -2552, 227, -3202, 1224, -4676, -2726, 3133, -2115, 38, -2830, 1862, -2371, 84, -3091, -122, 1923, 2085, 4400, -1976, -807, -1895, 4412, 765, 767, 407, -4323, -1216, -4296, -210, 4834, -4109, -4379, 3085, 2734, 190, -4458, 2998, -2914, -2982, 621, -4576, -2403, -3624, -746, 4669, 3108, -2073, -2507, 1068, 1366, 4102, -2562, -2400, -4181, -682, -2710, -16, 1339, -2444, 808, -368, -3522, 1814, -1213, 2239, 3074, 20, -4173, -2446, -3012, 2441, 1798, -1358, 4002, 1321, -4896, -1054, 2056, 3509, 4833, 2708, 4761, 1533, -4314, -196, 1385, -4858, 3842, 2260, -2839, -3380, -657, 4578, -3813, -4887, -1937, -409, 934, -4585, -4344, 4761, 12, 3411, -3041, 1251, 3738, -1630, 1124, 507, 3007, 2584, -4049, -1899, -511, -42, 441, -3210, 2013, -4588, -145, -3940, 2093, 3472, 402, -2324, -1457, 2373, 1266, 2651, 275, -3472, -4468, -4239, 469, -2497, -2271, 2107, 2892, -2549, 2953, 3392, -2430, -1481, 4472, -1593, -2506, 4505, 3440, -4617, -738, -3591, 3607, 3038, -640, 471, -3829, -4346, 4947, -3486, -477, -3771, -4511, 1766, 2887, 4756, 1632, 2470, 739, -4334, 3522, 2283, 3160, 2553, -295, 2091, -3741, 386, -3313, -371, -4958, 3317, -2955, -2644, -1612, 452, -1846, -4534, -3167, 2760, 1919, 631, 1738, -3733, 776, -3902, -686, 1320, -1947, -993, 1469, -784, 4722, 4842, 4007, 463, 1260, -4053, -1207, 3630, 3717, -1957, -3624, 314, 1626, 2117, -3666, -4380, -829, 1792, 3964, 4154, 3866, -307, -4336, -1225, -2000, -2788, -3900, 2551, 476, 1379, -4057, 2877, -1211, -4639, -3615, 3272, -3566, 144, 4561, 563, -496, -2054, -1112, -4692, -2843, -3570, 123, 1464, -926, -654, -1163, -3019, 318, 1611, 1292, 2591, -1168, 2123, 1461, 1991, -3539, 2330, 3498, 2369, 2291, 3400, -821, -883, -2683, 4914, -3405, -3559, 936, -3133, 2028, -3547, 2909, -1027, 2981, -3497, 1569, 1816, -3117, 367, 385, 3402, 230, 2157, 3681, 567, 3310, -3134, -1313, -1829, -1523, -3755, -2236, 1238, 2671, -2953, 1115, -408, 2311, -2343, -3595, -4947, 2171, -4420, -2260, -2470, -1325, -680, 790, -1623, -4002, 1586, -3396, -511, 4631, 4744, 3388, 1610, 3718, 1919, 3259, 927, -391, 3119, -3521, -2284, 1300, -3604, 1853, -3542, -4170, -407, -4194, 4849, -146, -728, 1160, -2706, -2946, 1333, -4854, -771, -4529, -4572, -4441, -2759, 4421, -2312, 1366, -2967, 1685, -2730, 329, -2739, -2140, -2792, 3982, -2838, -2494, 1878, -3021, -3103, 2887, 1538, -531, -4217, 2540, -2205, 2266, 3633, -1491, -443, -2683, 1134, -2947, 3135, -2742, -2407, 2843, -3307, 1466, -2049, 3140, -3906, -2063, 174, -2488, 1097, 4551, -2305, -3183, -1508, -3708, -4763, 2530, -4387, 296, -3290, -2611, 628, 809, 3786, -3256, 3840, 3182, 3569, 1120, 2393, 1292, -38, -786, -2473, 1807, -1806, 3705, -287, 2011, 3913, 1693, 4664, 1203, 3995, 2762, -619, 1946, 4909, -3952, -3232, 1624, -2489, 2954, -765, -3873, -367, 3240, -3138, 127, 2577, -1183, -2660, -4858, 100, 3400, 1558, -3524, -1846, -4065, 1430, 831, -3705, -1463, 623, 2922, -2073, 3029, -4789, 1211, -3246, 1880, -2747, -1707, -3679, -4215, 1528, -4557, -4000, -4445, -329, 4270, 2452, 4375, -369, -1360, 3934, 3040, 2986, 3834, -752, -3461, 3765, -2204, -4688, 2262, 52, -4269, -1013, -536, -2443, -752, 4556, -4830, 450, 2182, 2301, -1707, -901, -1668, 4044, -2669, -4925, -3996, 4050, 26, -934, -3262, 4801, 4623, -1157, -4559, -1620, 4695, 2918, -1341, -3637, -2372, 1329, -3912, 3854, 3613, -21, 3569, -4334, 2679, 2577, 2837, -1598, -1885, -1708, -3277, -2128, 4448, -4677, -3847, 948, -605, 197, -492, -2092, 2411, -1007, 2665, 1781, -1798, 2610, -172, 2256, 2705, 3965, 3023, -4231, -3285, -4747, -3195, -1316, 4478, -2855, -3160, -4167, 4285, 1900, -4032, -1006, 1633, -1115, -4652, 3281, 3032, 1256, 4910, -4128, 3982, -1099, -2694, -4365, 2860, -2529, 4527, 2137, 3343, 4768, 3233, -1005, 4171, 2603, 3942, 3011, 2879, -3966, -488, -407, -4470, -839, -1766, -4742, -3074, 906, 191, -557, 1188, -4773, -2281, 1484, 224, 4093, -4565, -1776, 3094, -1418, 3867, 3627, -2995, -3854, -2314, 1589, -4460, 3237, -2150, 3759, 4578, 3956, -2323, -2597, 3042, 1300, 811, 225, -3857, -3405, -3984, 1615, 3804, -3994, 3368, -3359, -4665, -4302, -3675, 3313, 3023, -2688, -382, 3457, 3396, 3339, -3914, -2906, 2846, 2043, -3478, -2089, 1280, -1545, 1358, 1847, 3870, -4010, -1127, -673, -1587, -1546, -3104, -2528, -550, 2241, -359, 646, -1475, 3213, 1824, 2929, 3695, 403, -2406, 2993, 1067, -2813, -360, 79, -4959, 3125, -2466, -140, -2000, -93, -2379, 2692, 293, 117, 2717, -4597, -1057, 2893, -4361, 4011, 1925, -972, 4978, -4252, -2150, -2108, 1444, -4346, -1377, -647, -2964, -3453, -3654, -4174, 1061, -1096, -4762, 2571, 1886, 1405, 299, -2944, -3272, -3733, -1249, -2981, 4991, 3166, 717, 846, 2093, -1813, -3579, -2088, 1867, 3299, -2556, 4897, -3799, -1672, -58, 2104, -3232, 4768, 1641, 1296, -3738, -4280, -3756, 2918, 4625, -3781, 2584, 3174, -4016, -4541, -1851, 2014, 695, -2497, 32, -1149, -3463, 1814, 3363, -349, -3781, -710, 917, -3317, -3082, 1584, 2252, -1414, -3731, 1248, -2863, -2603, -4576, -1832, -4973, 3148, -3007, -4618, 4271, 2669, -4107, -4123, -3986, 4104, -4516, -2057, -3505, 1811, -3707, 3892, 1798, -3010, -3701, -110, 3493, 4074, -3451, -1226, 4314, -4827, -931, 4218, 1865, 1833, 238, 4911, -1748, 1463, 1508, 149, -1912, -2755, 1231, -3080, -4894, 4271, -2632, 1421, 258, -843, 4647, -18, 3238, -878, 2723, -4094, 3706, -4811, -3844, -4655, -2649, 1923, 2118, -3450, -2903, -3164, -4409, -1594, -490, 813, -349, 880, 2844, -257, 2741, -3755, -422, -51, -3295, -486, 4785, 4227, 3624, 2204, 3356, -1083, 1227, -4445, -4898, -714, 4468, -3302, 3979, -3589, -2511, -4242, -1510, -4225, 3410, 2132, 2089, 2296, -3050, -1888, -4878, -2471, 2672, 836, 3277, 553, -1024, -4330, 4085, -2348, -3249, -4603, 4751, 4001, -4565, 1693, 72, 2916, 1716, 328, -3489, -2875, -3162, 2296, 3939, -3456, -3944, -2174, -2098, 1758, -412, -2979, -2414, -892, 4777, -2372, -3021, 1947, -2451, -3720, -1755, 128, -938, -4574, -281, -4323, 4091, -953, -1215, -1769, 2406, 3684, -3046, 1769, -291, 2956, -2579, 945, -1535, 1016, -3140, 1497, 3335, 190, 677, 3049, -3995, 2886, -1612, 3675, -1857, 2377, -4870, 3487, 1555, -2518, 253, 0, 2754, -4711, -2512, 215, -2992, -3690, -4060, 2799, -2003, 4707, 3454, -4696, 3237, -4515, -2501, -4208, 4613, -2388, 3682, -2017, 351, 1129, 2137, 33, 1600, -3136, -1317, -3143, 3968, -3290, -3032, -3292, -2359, 2732, -2563, -3316, -2501, -2299, 4869, 3583, 4256, 4692, 2640, -2913, 12, -1190, 820, -165, -3337, -4385, 897, 3677, -2226, -4866, 2553, 4533, 3878, -2714, 624, -2266, 3075, 349, -4288, 1984, -4376, 2792, 1504, 3822, -945, 3913, -4538, -527, -4916, -840, -3878, 1053, 4397, -3178, 4750, -3663, -1083, -994, -69, -2803, 2505, 4236, -4643, 1599, 3290, -3102, -4015, -3553, -3916, -4408, 3725, 3996, 4855, -172, 338, 2342, -572, 4795, -4258, -4963, 506, 1767, 53, 4793, 3505, -854, -1391, -1076, 4854, 4465, -2761, 1206, -791, 492, 1499, 3175, -3964, -1939, -1353, 618, 13, 1727, 712, 2896, -3091, 2841, -4870, 4090, 4034, 2915, 1286, -1477, -4334, -3656, -2264, -2963, 416, 893, -3051, -4029, -4156, -2223, 4285, 1200, -410, -4715, 3325, 2118, 668, -4994, 4729, -992, -459, -4775, 536, -3020, -4284, -4530, 384, 3747, -4672, 2936, 1204, -4300, 2523, 1364, -3589, 1040, -4750, -3496, -1517, -3234, 1141, -2330, -4155, -4494, 4088, -1744, 107, 3266, 857, -2322, -801, -2326, -845, 191, 3990, 4832, -4142, -4004, 3917, 3290, -1033, -3293, 3234, 3246, -3538, 4402, 3239, -1574, 4095, -4094, 3314, -4650, -414, 279, 2776, 822, 1879, -2699, 812, 676, -1836, 2357, -2430, 1038, -688, -4856, 1561, 3180, 3200, -4357, -3144, 3061, -2353, 939, 4808, 4290, 2452, -4021, -2382, -3581, -993, -2716, -453, 4977, 675, 3613, 3709, -1629, 3642, 1339, 1336, -2379, -3499, 1034, 3129, -3642, -3564, 3469, -2103, 3504, -202, -798, -1895, -3762, 32, -4935, -2484, -519, 579, 4023, -3273, -3229, -3687, -4618, 1140, -184, 3488, 319, 589, 513, 3259, -4149, -2729, -1717, -636, 2038, -1988, -1816, -3241, -1499, 4574, 3733, 59, 2714, 2649, 1595, 3522, -459, -4584, 377, -3948, -4435, 4891, -4862, -1690, -4033, 55, -1213, 2224, 3222, 1439, 2441, 1648, 1804, 2834, 4368, -3559, 3872, -2332, 4974, 4176, 137, -4367, -1759, 745, 3018, -3985, -2026, 4252, -4154, 3956, 524, 1966, 581, 3144, -2760, 4334, 296, -3124, 27, -3795, -2982, -709, -3359, -1535, 1191, -2529, 1259, -1300, -4783, -2984, -3057, -376, 2064, -3495, -3843, -3498, 2666, 4275, -2954, 2632, 4789, 1046, -2855, 1003, -1848, -3099, 3326, 4153, -3816, 4649, -4650, -4595, -654, -3975, 3970, -664, -205, 4793, -3677, 532, 3856, 896, -1790, 2776, 692, -450, 290, -1205, -1148, 2350, 3315, -4964, 4361, -1240, 4984, 3729, -2466, 1050, 3082, 1806, -3064, 584, -4210, -3383, 4182, 4066, -1884, 1388, 4425, -1899, 610, 1450, 4982, 3621, 193, 2038, 1754, -407, -105, -4720, 638, 167, 2420, -655, 1883, -1135, -304, -4167, -4610, -2368, -4811, 2839, -4817, -1183, -2871, 1753, -4321, 3613, -4400, 3252, 145, 4861, -2849, 3318, 3963, 2813, -93, 4554, -3524, -4383, -3789, 429, -2736, 966, 4531, 4942, -4302, 4522, -3845, 2587, 257, -1842, -536, -1238, 3510, -4054, -3935, 3380, -1835, 946, -1460, 2297, 3042, -536, -1806, -2416, -4730, -2285, -2800, -3794, -2894, -3698, -304, 3833, 2611, 4067, -4585, 1645, -4825, 1354, -1552, -81, -1921, 2988, 1321, 2592, -3403, -2803, -1491, 3652, -4929, -4342, -878, 1859, 2997, -4001, -3101, -880, -3680, -2964, 1984, -88, -3085, -1047, 4485, -4259, -4801, -3433, -792, 1844, -4831, 4681, -121, -3892, 2207, 259, 706, -1151, -925, 3026, -4876, 2607, 2774, -2116, -4872, -454, -1855, -4519, -3286, -4851, -832, -1662, -4693, 1793, -1496, -3895, -3303, 3217, 955, 1641, -2657, 1133, -2903, -4321, -4264, 4555, 633, -3046, -4070, -4748, 4904, -4721, -2512, -130, -3246, 1072, -2824, 1701, 415, 3086, -769, 2480, 4975, -4740, -4486, 3938, 1657, -10, 4438, 3981, 447, 242, -382, 1070, 631, -939, 2219, 3781, -4010, -2167, 3672, -3437, -3698, -4498, 1928, -4279, -102, -3553, -4055, 3406, -2778, 3686, 794, -1423, -2156, 3683, -3453, -1760, -4515, 1464, -3277, -4663, 1653, 2168, 3130, 255, -3534, -142, -2488, 4656, -1682, -1799, -4858, -3724, -3494, -2298, -4316, 23, -4730, 1312, 3250, -1525, -4689, 1850, 4195, 488, -3480, 1101, -4817, -202, 2892, 3848, 1784, -4755, -2813, -538, 3343, 3258, 1859, 3871, -984, 3172, -2168, -559, 2683, 1088, -2985, -1024, 3516, 3298, -4961, -3717, -1795, 4997, 4146, 769, -1325, -4083, 4387, 20, 1030, 2442, -3265, -2611, -4627, -1520, -2927, -4223, -4214, 3381, -3215, -4478, 3345, -4021, 1085, 713, -4065, 4735, -4117, -2814, 1096, -4352, -2915, -248, -4479, 4260, -3018, 1636, 2688, 4919, 2236, 1792, 2065, 4278, -802, -3504, 1386, -3989, -4024, 2547, -2879, -1798, 2245, 1702, 3564, -3461, -2428, -2743, -2630, -3080, -3346, 4359, -3920, 2298, -1609, -1040, -4490, 4591, 867, -2967, -3325, -2864, -4501, 2775, 790, -624, -3744, -4728, -4297, 86, -4033, 4515, -1458, -1505, -1434, 3456, -814, 3437, 4198, -2374, 3364, -3915, -3335, 3908, -4660, -3640, -2186, -3846, 3012, 4752, -1662, 3706, -2475, -4370, 4249, -1821, -1921, 3313, 3838, -2483, 3421, -855, 991, -3031, -3161, -692, 1565, -1238, 4473, -1319, -3030, -1853, 2053, -2292, 1508, 1715, -571, -3934, 2689, -337, -3229, 541, 1259, 3631, -1428, -2486, -4034, 988, 3170, 3168, -2801, -4345, -1150, -1556, -2064, 1278, 4406, 4427, -4687, 2523, -2629, -1673, 2073, -1539, -2827, 4934, -3898, 587, -3583, -3537, 1153, 1126, -4405, -3505, 4213, -2594, 2370, -1141, -1695, -2504, -167, -777, -148, 2879, -4481, 1126, 2793, -3415, -3535, -3629, 444, 2107, 2271, -913, 3099, 1519, 3596, 715, 2552, -2508, -247, 3257, 2590, -41, -1643, -4114, 2809, 865, 686, -2981, -4741, -2687, -2565, -3972, -899, -4532, -2131, -4544, 1731, 2578, 1074, -3605, -4157, -3726, -1684, 24, -4489, 3585, 722, 3971, -4943, -905, 3174, 38, -2817, 1658, 2295, 722, 1983, 1231, 4503, -2768, -700, 590, -3520, 2408, 505, -2298, -2142, 4818, -4443, 561, -880, 28, -1344, 713, -1668, -1908, 2182, 1467, -3680, 2358, -3926, -1013, 4094, -17, -3636, 2264, 4714, 1746, -610, -4575, 1255, -1837, -3533, 792, -769, -2381, -2120, -282, 1128, 4948, -280, 4079, -2909, -1234, 2587, 808, -2874, -175, -3841, 2518, -1780, -4965, -3686, 456, -853, 4156, -4866, -1640, -4249, 1208, -3522, -2706, -2411, 2524, 2976, 4694, -910, -4811, 4372, 2419, -4699, -3298, -156, -4477, 1539, -4391, -3173, 1637, 3186, 2416, -3173, 169, 2623, -101, -2486, -4585, -1356, 436, -1331, -4622, -3324, 2858, 2952, 4846, 2137, 915, -2012, -384, 2288, -2618, 3074, -4667, -1085, -3944, 656, -4938, 4616, -476, -2871, 2442, -3016, -128, 2049, -1604, 3026, 3582, -4798, 3775, 416, -4335, -448, 3759, -2245, -3583, -2156, -1446, 4443, 1824, -3001, 3422, -4879, 733, -3587, 4917, 793, -3127, -2940, -3825, 4074, 985, -2499, -3378, -1792, 2395, -3974, 1720, 1291, -3012, -4071, 4072, -4023, -4807, -4992, -2746, -4078, -4124, 137, -4184, -1197, -3910, 2912, -2711, 2253, 4979, 2299, -2678, -2098, 2602, 1369, -4346, -2271, 4734, -2562, -2726, 226, 1463, 3134, -2028, -652, 1453, 4503, -2693, 518, 3333, 2437, -4305, -1821, -4339, -1856, 2659, -4039, -3093, 1576, -1528, -4355, -1408, -2028, -4372, -804, 1811, 535, 835, -3771, -1284, -1468, -44, 1158, 4749, -380, -1704, 4724, -1880, -474, 1406, 3983, -1555, -4426, -3309, 1588, -4462, -4336, 3104, -4123, -4647, -2058, 2004, -4377, -148, 625, 2611, 2842, 3724, -3851, -4865, -1410, -4854, 2328, -1145, 2804, -3259, 1909, 4381, -2221, 4102, -4917, -4308, -4468, 2312, 1099, 1161, -3953, -2595, 290, 2569, 4959, -2372, -2861, -3772, 2580, -2529, -3222, 2440, 3456, -2852, 4444, -255, 1125, 2210, -302, 616, -3820, -185, 1064, 1226, 4472, 2479, 4593, -2518, -1995, 3536, 333, -3895, 2587, -4268, 638, -3835, -3936, -482, 3399, 32, 2508, -1104, -1562, -1022, -2362, 3245, -941, -831, -4256, 2362, -231, -3951, 1518, 1467, -4442, -2857, -1939, 603, 4190, -2814, -3774, -1397, 2004, -3700, -3232, -4577, -3653, 396, -434, 230, -3335, 1152, -3000, -1383, 4173, -4214, -4332, -3403, -3421, 1224, 2728, 1260, -2842, -1575, -1733, 4312, -4266, -4548, 169, 4562, -3430, 3211, 4235, 1890, -3289, -2936, -250, 3960, 2545, -233, -3246, -4213, 3217, -435, 4942, -2912, -4727, -2185, 2579, -4163, 4388, 4269, -3114, -1170, -4191, -360, 2321, 3319, 4881, -3374, -1980, -3589, -4546, 893, -3016, -2643, -2001, -4664, 3829, 950, -3543, -2595, -4635, -2666, -4951, 4094, 3592, -3730, -4881, -1983, 4313, 253, 1117, -23, 4160, -3495, -4847, -409, 1562, -1424, -146, -4928, -3866, -1984, 50, 4193, -3055, -3148, -4253, -2479, 3061, 1344, -4741, 3366, -2115, -561, -2282, 4107, 268, -1446, -2950, 2432, -1201, -2980, 1735, -3902, -2208, -1084, 1182, 4029, 316, -1941, -1242, -417, -2601, -3865, 3357, -4930, 271, -2658, 2780, -1123, -4594, 3295, 2686, -2597, 3252, 718, -1965, 2285, 3428, 1678, 960, -4899, -4051, -2636, 1385, 2626, 2157, -2263, -159, 3938, -3407, 2096, -3967, -507, 4768, 2873, 4935, 4109, -4904, -4619, -3439, 739, 584, 923, 3499, 1731, -3151, 442, 3606, 1850, 3287, 1040, -2231, 4223, -3412, 1467, -2917, -1600, -3842, 606, 1938, 4463, -4080, 3366, 758, 4685, 4023, -4771, 4298, 4356, 470, -1825, -804, -3317, 4988, 2619, -2054, -2810, 3275, -2531, 519, -659, 1197}, + 12987535, + }, + + { + []int{1, 0, 0, 8, 6}, + 14, + }, + + { + []int{3, 2, 2, 2, 2, 3, 3, 3, 3}, + 4, + }, + + { + []int{2, 2, 2, 2, 2, 3, 3, 3, 3}, + 4, + }, + + { + []int{1, 1, 2, 3}, + 3, + }, + + { + []int{1, 2, 3}, + 2, + }, + + // 可以有多个 testcase +} + +func Test_minMoves2(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, minMoves2(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_minMoves2(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + minMoves2(tc.nums) + } + } +} diff --git a/Algorithms/0463.island-perimeter/README.md b/Algorithms/0463.island-perimeter/README.md new file mode 100755 index 000000000..f043f55e3 --- /dev/null +++ b/Algorithms/0463.island-perimeter/README.md @@ -0,0 +1,23 @@ +# [463. Island Perimeter](https://leetcode.com/problems/island-perimeter/) + +## 题目 + +You are given a map in form of a two-dimensional integer grid where 1 represents land and 0 represents water. Grid cells are connected horizontally/vertically (not diagonally). The grid is completely surrounded by water, and there is exactly one island (i.e., one or more connected land cells). The island doesn't have "lakes" (water inside that isn't connected to the water around the island). One cell is a square with side length 1. The grid is rectangular, width and height don't exceed 100. Determine the perimeter of the island. + +Example: + +```text +[[0,1,0,0], + [1,1,1,0], + [0,1,0,0], + [1,1,0,0]] + +Answer: 16 +Explanation: The perimeter is the 16 yellow stripes in the image below: +``` + +![pic](https://leetcode.com/static/images/problemset/island.png) + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0463.island-perimeter/island-perimeter.go b/Algorithms/0463.island-perimeter/island-perimeter.go new file mode 100755 index 000000000..bce07b27b --- /dev/null +++ b/Algorithms/0463.island-perimeter/island-perimeter.go @@ -0,0 +1,27 @@ +package Problem0463 + +var dx = []int{-1, 1, 0, 0} +var dy = []int{0, 0, -1, 1} + +func islandPerimeter(grid [][]int) int { + m, n := len(grid), len(grid[0]) + + res := 0 + for i := 0; i < m; i++ { + for j := 0; j < n; j++ { + if grid[i][j] == 0 { + continue + } + res += 4 + for k := 0; k < 4; k++ { + x := i + dx[k] + y := j + dy[k] + if 0 <= x && x < m && 0 <= y && y < n && grid[x][y] == 1 { + res-- + } + } + } + } + + return res +} diff --git a/Algorithms/0463.island-perimeter/island-perimeter_test.go b/Algorithms/0463.island-perimeter/island-perimeter_test.go new file mode 100755 index 000000000..fe57746ef --- /dev/null +++ b/Algorithms/0463.island-perimeter/island-perimeter_test.go @@ -0,0 +1,44 @@ +package Problem0463 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + grid [][]int + ans int +}{ + + { + [][]int{ + {0, 1, 0, 0}, + {1, 1, 1, 0}, + {0, 1, 0, 0}, + {1, 1, 0, 0}, + }, + 16, + }, + + // 可以有多个 testcase +} + +func Test_islandPerimeter(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, islandPerimeter(tc.grid), "输入:%v", tc) + } +} + +func Benchmark_islandPerimeter(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + islandPerimeter(tc.grid) + } + } +} diff --git a/Algorithms/0464.can-i-win/464.100.png b/Algorithms/0464.can-i-win/464.100.png new file mode 100644 index 000000000..23b22ea01 Binary files /dev/null and b/Algorithms/0464.can-i-win/464.100.png differ diff --git a/Algorithms/0464.can-i-win/README.md b/Algorithms/0464.can-i-win/README.md new file mode 100755 index 000000000..1dfbda216 --- /dev/null +++ b/Algorithms/0464.can-i-win/README.md @@ -0,0 +1,37 @@ +# [464. Can I Win](https://leetcode.com/problems/can-i-win/) + +## 题目 + +In the "100 game," two players take turns adding, to a running total, any integer from 1..10. The player who first causes the running total to reach or exceed 100 wins. + +What if we change the game so that players cannot re-use integers? + +For example, two players might take turns drawing from a common pool of numbers of 1..15 without replacement until they reach a total >= 100. + +Given an integer maxChoosableInteger and another integer desiredTotal, determine if the first player to move can force a win, assuming both players play optimally. + +You can always assume that maxChoosableInteger will not be larger than 20 and desiredTotal will not be larger than 300. + +Example + +```text +Input: +maxChoosableInteger = 10 +desiredTotal = 11 + +Output: +false + +Explanation: +No matter which integer the first player choose, the first player will lose. +The first player can choose an integer from 1 up to 10. +If the first player choose 1, the second player can only choose integers from 2 up to 10. +The second player will win by choosing 10 and get a total = 11, which is >= desiredTotal. +Same with other integers chosen by the first player, the second player will always win. +``` + +## 解题思路 + +见程序注释 + +![100](464.100.png) \ No newline at end of file diff --git a/Algorithms/0464.can-i-win/can-i-win.go b/Algorithms/0464.can-i-win/can-i-win.go new file mode 100755 index 000000000..33bada54f --- /dev/null +++ b/Algorithms/0464.can-i-win/can-i-win.go @@ -0,0 +1,81 @@ +package Problem0464 + +// 影响成败的关键因素有两个 +// 1. 还能选择的数字 +// 2. 还需要累加的值 +// 这两个又其实只是一个因素 -- 已经使用过的数,因为 +// 1. 还能选择的数字 == 全部可选的数 - 已经使用过的数 +// 2. 还需要累加的值 == desiredTotal - sum(已经使用过的数) +// 题目想要求解的是 "已经使用过的数" == nil 时,能不能赢 +// +// 相同的 “已经使用过的数” 会导致相同的结果 +// 利用暴力算法 dfs 计算结果的时候,会多次遇到同样的 "已经使用过的数" 状态 +// 把各个 “已经使用过的数” 状态导致的结果,保存起来,就可以加快程序速度了 +// +// 使用 int 这个可比较的变量 表征 “已经使用过的数” 的状态 +// 42 表示 数字 1,3,5 都被使用过了,因为 42 = 2^1 + 2^3 + 2^5 +// 42 的第 1,3,5 个 bit 位上的数字为 1 + +func canIWin(maxChoosableInteger int, desiredTotal int) bool { + // sum 是所有能选数之和 + sum := (1 + maxChoosableInteger) * maxChoosableInteger / 2 + // 这种情况下,双方都不能赢 + if sum < desiredTotal { + return false + } + + // bit[i] 等于,仅在第 i 个 bit 位为 1 的整数值 + bit := make([]int, maxChoosableInteger+1) + for i := maxChoosableInteger; i > 0; i-- { + bit[i] = 1 << uint8(i) + } + + // dp[42] == true 表示 + // 面临 1,3,5 被选择的人,有机会赢 + dp := make(map[int]bool, maxChoosableInteger*maxChoosableInteger) + + return dfs(0, desiredTotal, maxChoosableInteger, dp, bit) +} + +func dfs(usedBit, remains, max int, dp map[int]bool, bit []int) bool { + // 已经计算过 usedBit 这种状态了,直接返回结果 + if res, ok := dp[usedBit]; ok { + return res + } + + if remains <= max { + for i := max; i >= remains; i-- { + if usedBit&bit[i] == 0 { + dp[usedBit] = true + return true + } + } + } + + for i := max; i > 0; i-- { + if usedBit&bit[i] > 0 { + // i 已经被使用过了 + continue + } + + old := usedBit + // 暂时选择 i ,往 usedBit 中添加 i + usedBit |= bit[i] + isOpponentWin := dfs(usedBit, remains-i, max, dp, bit) + // 在 usedBit 中删除 i + usedBit = old + // usedBit &= (^bit[i]) + + if isOpponentWin == false { // 对手输了 + // 所以,是我赢了 + // 请注意,下面的 usedBit 是删除了 i 的 + // 此时的 dp[usedBit] = true 表示 + // 我在面临 usedBit 这种状态下能赢,因为可以选择 i + dp[usedBit] = true + return true + } + } + + dp[usedBit] = false + return false +} diff --git a/Algorithms/0464.can-i-win/can-i-win_test.go b/Algorithms/0464.can-i-win/can-i-win_test.go new file mode 100755 index 000000000..d42d86af1 --- /dev/null +++ b/Algorithms/0464.can-i-win/can-i-win_test.go @@ -0,0 +1,77 @@ +package Problem0464 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + maxChoosableInteger int + desiredTotal int + ans bool +}{ + + { + 11, + 25, + true, + }, + + { + 10, + 0, + true, + }, + + { + 20, + 160, + true, + }, + + { + 20, + 300, + false, + }, + + { + 20, + 209, + false, + }, + + { + 10, + 20, + true, + }, + + { + 10, + 11, + false, + }, + + // 可以有多个 testcase +} + +func Test_canIWin(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, canIWin(tc.maxChoosableInteger, tc.desiredTotal), "输入:%v", tc) + } +} + +func Benchmark_canIWin(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + canIWin(tc.maxChoosableInteger, tc.desiredTotal) + } + } +} diff --git a/Algorithms/0466.count-the-repetitions/466.100.png b/Algorithms/0466.count-the-repetitions/466.100.png new file mode 100644 index 000000000..04e2edffd Binary files /dev/null and b/Algorithms/0466.count-the-repetitions/466.100.png differ diff --git a/Algorithms/0466.count-the-repetitions/README.md b/Algorithms/0466.count-the-repetitions/README.md new file mode 100755 index 000000000..b2e95ed12 --- /dev/null +++ b/Algorithms/0466.count-the-repetitions/README.md @@ -0,0 +1,26 @@ +# [466. Count The Repetitions](https://leetcode.com/problems/count-the-repetitions/) + +## 题目 + +Define `S = [s,n]` as the string S which consists of n connected strings s. For example, `["abc", 3]` ="abcabcabc". + +On the other hand, we define that string s1 can be obtained from string s2 if we can remove some characters from s2 such that it becomes s1. For example, “abc” can be obtained from “abdbec” based on our definition, but it can not be obtained from “acbbe”. + +You are given two non-empty strings s1 and s2 (each at most 100 characters long) and two integers 0 ≤ n1 ≤ 106 and 1 ≤ n2 ≤ 106. Now consider the strings S1 and S2, where S1=[s1,n1] and S2=[s2,n2]. Find the maximum integer M such that [S2,M] can be obtained from S1. + +Example: + +```text +Input: +s1="acb", n1=4 +s2="ab", n2=2 + +Return: +2 +``` + +## 解题思路 + +见程序注释 + +![100](466.100.png) \ No newline at end of file diff --git a/Algorithms/0466.count-the-repetitions/count-the-repetitions.go b/Algorithms/0466.count-the-repetitions/count-the-repetitions.go new file mode 100755 index 000000000..47230bd31 --- /dev/null +++ b/Algorithms/0466.count-the-repetitions/count-the-repetitions.go @@ -0,0 +1,50 @@ +package Problem0466 + +func getMaxRepetitions(s1 string, n1 int, s2 string, n2 int) int { + // count[k] == cnt 表示 k 个 s1 可以得到 cnt 个 s2 + count := make([]int, n1+1) + // last[j] == k (k ∈ [1,2,...n1] ) 表示在第 k + 1 个 s1 中,首先需要匹配的是 s2[j] + last := make([]int, len(s2)) + + // j 是 s2 中下一个需要被匹配的字符在 s2 中的索引号 + // cnt 是 已经完整匹配了的 s2 的个数 + j, cnt := 0, 0 + for k := 1; k <= n1; k++ { + for i := 0; i < len(s1); i++ { + if s1[i] == s2[j] { + j++ + if j == len(s2) { + j = 0 + cnt++ + } + } + } + + if last[j] == 0 { + // 还没有出现重复 + // 更新各项记录 + count[k] = cnt + last[j] = k + } else { // 出现重复的模式了 + // 第 start 个和第 k 个 s1 都需要首先匹配 s[j] + // p := k - start 的话,以此类推 + // 第 start + p, start + p * 2, start + p * 3,... 个 s1 都需要首先匹配 s[j] + // 所以 s[start:k] 构成了一个重复块, 每个重复块中需要 p 个 s1 + start := last[j] + p := k - start + // 每个重复块可以匹配 t 个 s2 + // 此时的 cnt 相当于 count[k] + t := cnt - count[start] + + // (n1-start)/p 是 n1 个 s1 可以组成的重复块的个数 + // (n1-start)/p*t 是所有完整的重复块可以匹配 s2 的个数 + // count[start+(n1-start)%p] 是剩下的,不能构成完整重复块的 s1 能够匹配的 s2 的个数 + ans := (n1-start)/p*t + count[start+(n1-start)%p] + // 题目所求的 S2 的匹配数 = s2 的匹配数 / n2 + return ans / n2 + } + } + + // 由于重复块不是一定存在 + return cnt / n2 +} diff --git a/Algorithms/0466.count-the-repetitions/count-the-repetitions_test.go b/Algorithms/0466.count-the-repetitions/count-the-repetitions_test.go new file mode 100755 index 000000000..3caed5fa1 --- /dev/null +++ b/Algorithms/0466.count-the-repetitions/count-the-repetitions_test.go @@ -0,0 +1,149 @@ +package Problem0466 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s1 string + n1 int + s2 string + n2 int + ans int +}{ + + { + "abc", + 1, + "abc", + 1, + 1, + }, + + { + "ba", + 2, + "bababa", + 1, + 0, + }, + + { + "dcba", + 5, + "eabcd", + 1, + 0, + }, + + { + "dcba", + 5, + "abcde", + 1, + 0, + }, + + { + "aaa", + 3, + "aa", + 1, + 4, + }, + + { + "phqghumeaylnlfdxfircvscxggbwkfnqduxwfnfozvsrtkjprepggxrpnrvystmwcysyycqpevikeffmznimkkasvwsrenzkycxf", + 1000000, + "xtlsgypsfadpooefxzbcoejuvpvaboygpoeylfpbnpljvrvipyamyehwqnqrqpmxujjloovaowuxwhmsncbxcoksfzkvatxdknly", + 100, + 303, + }, + + { + "phqghumeaylnlfdxfircvscxggbwkfnqduxwfnfozvsrtkjprepggxrpnrvystmwcysyycqpevikeffmznimkkasvwsrenzkycxf", + 100, + "xtlsgypsfa", + 1, + 49, + }, + + { + "lovelive", + 100000, + "lovelive", + 100000, + 1, + }, + + { + "aaa", + 20, + "aaaaa", + 1, + 12, + }, + + { + "aaaaa", + 8, + "ab", + 2, + 0, + }, + + { + "aaaaa", + 8, + "aa", + 2, + 10, + }, + + { + "acb", + 6, + "abc", + 1, + 3, + }, + + { + "acb", + 6, + "ab", + 2, + 3, + }, + + { + "acb", + 4, + "ab", + 2, + 2, + }, + + // 可以有多个 testcase +} + +func Test_getMaxRepetitions(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, getMaxRepetitions(tc.s1, tc.n1, tc.s2, tc.n2), "输入:%v", tc) + } +} + +func Benchmark_getMaxRepetitions(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + getMaxRepetitions(tc.s1, tc.n1, tc.s2, tc.n2) + } + } +} diff --git a/Algorithms/0467.unique-substrings-in-wraparound-string/467.100.png b/Algorithms/0467.unique-substrings-in-wraparound-string/467.100.png new file mode 100644 index 000000000..8940781e9 Binary files /dev/null and b/Algorithms/0467.unique-substrings-in-wraparound-string/467.100.png differ diff --git a/Algorithms/0467.unique-substrings-in-wraparound-string/README.md b/Algorithms/0467.unique-substrings-in-wraparound-string/README.md new file mode 100755 index 000000000..e8cecfb01 --- /dev/null +++ b/Algorithms/0467.unique-substrings-in-wraparound-string/README.md @@ -0,0 +1,40 @@ +# [467. Unique Substrings in Wraparound String](https://leetcode.com/problems/unique-substrings-in-wraparound-string/) + +## 题目 + +Consider the string s to be the infinite wraparound string of "abcdefghijklmnopqrstuvwxyz", so s will look like this: "...zabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd....". + +Now we have another string p. Your job is to find out how many unique non-empty substrings of p are present in s. In particular, your input is the string p and you need to output the number of different non-empty substrings of p in the string s. + +Note: p consists of only lowercase English letters and the size of p might be over 10000. + +Example 1: + +```text +Input: "a" +Output: 1 + +Explanation: Only the substring "a" of string "a" is in the string s. +``` + +Example 2: + +```text +Input: "cac" +Output: 2 +Explanation: There are two substrings "a", "c" of string "cac" in the string s. +``` + +Example 3: + +```text +Input: "zab" +Output: 6 +Explanation: There are six substrings "z", "a", "b", "za", "ab", "zab" of string "zab" in the string s. +``` + +## 解题思路 + +见程序注释 + +![100](467.100.png) \ No newline at end of file diff --git a/Algorithms/0467.unique-substrings-in-wraparound-string/unique-substrings-in-wraparound-string.go b/Algorithms/0467.unique-substrings-in-wraparound-string/unique-substrings-in-wraparound-string.go new file mode 100755 index 000000000..e2a0da7bb --- /dev/null +++ b/Algorithms/0467.unique-substrings-in-wraparound-string/unique-substrings-in-wraparound-string.go @@ -0,0 +1,37 @@ +package Problem0467 + +func findSubstringInWraproundString(p string) int { + // count[0] = 4 表示,以 'a' 结尾的连续字符串的最大长度为 4 + // 那么,在符合题意的 subString 中以 'a' 结尾的个数为 4 + // 这样统计起来,既不会遗漏也不会重复 + // + count := [26]int{} + + length := 0 + + for i := 0; i < len(p); i++ { + if 0 < i && + (p[i-1]+1 == p[i] || p[i-1] == p[i]+25) { + length++ + } else { + length = 1 + } + + b := p[i] - 'a' + count[b] = max(count[b], length) + } + + res := 0 + for i := 0; i < 26; i++ { + res += count[i] + } + + return res +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} diff --git a/Algorithms/0467.unique-substrings-in-wraparound-string/unique-substrings-in-wraparound-string_test.go b/Algorithms/0467.unique-substrings-in-wraparound-string/unique-substrings-in-wraparound-string_test.go new file mode 100755 index 000000000..1d52e0d68 --- /dev/null +++ b/Algorithms/0467.unique-substrings-in-wraparound-string/unique-substrings-in-wraparound-string_test.go @@ -0,0 +1,89 @@ +package Problem0467 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + p string + ans int +}{ + + { + "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz", + 259259, + }, + + { + "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz", + 33475, + }, + + { + "abce", + 7, + }, + + { + "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz", + 2379, + }, + + { + "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz", + 1027, + }, + + { + "abcdcde", + 13, + }, + + { + "abcdabc", + 10, + }, + + { + "abcd", + 10, + }, + + { + "a", + 1, + }, + + { + "cac", + 2, + }, + + { + "zab", + 6, + }, + + // 可以有多个 testcase +} + +func Test_findSubstringInWraproundString(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findSubstringInWraproundString(tc.p), "输入:%v", tc) + } +} + +func Benchmark_findSubstringInWraproundString(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findSubstringInWraproundString(tc.p) + } + } +} diff --git a/Algorithms/0468.validate-ip-address/README.md b/Algorithms/0468.validate-ip-address/README.md new file mode 100755 index 000000000..cbc4591ee --- /dev/null +++ b/Algorithms/0468.validate-ip-address/README.md @@ -0,0 +1,52 @@ +# [468. Validate IP Address](https://leetcode.com/problems/validate-ip-address/) + +## 题目 + +Write a function to check whether an input string is a valid IPv4 address or IPv6 address or neither. + +IPv4 addresses are canonically represented in dot-decimal notation, which consists of four decimal numbers, each ranging from 0 to 255, separated by dots ("."), e.g.,172.16.254.1; + +Besides, leading zeros in the IPv4 is invalid. For example, the address 172.16.254.01 is invalid. + +IPv6 addresses are represented as eight groups of four hexadecimal digits, each group representing 16 bits. The groups are separated by colons (":"). For example, the address 2001:0db8:85a3:0000:0000:8a2e:0370:7334 is a valid one. Also, we could omit some leading zeros among four hexadecimal digits and some low-case characters in the address to upper-case ones, so 2001:db8:85a3:0:0:8A2E:0370:7334 is also a valid IPv6 address(Omit leading zeros and using upper cases). + +However, we don't replace a consecutive group of zero value with a single empty group using two consecutive colons (::) to pursue simplicity. For example, 2001:0db8:85a3::8A2E:0370:7334 is an invalid IPv6 address. + +Besides, extra leading zeros in the IPv6 is also invalid. For example, the address 02001:0db8:85a3:0000:0000:8a2e:0370:7334 is invalid. + +Note: +You may assume there is no extra space or special characters in the input string. + +Example 1: + +```text +Input: "172.16.254.1" + +Output: "IPv4" + +Explanation: This is a valid IPv4 address, return "IPv4". +``` + +Example 2: + +```text +Input: "2001:0db8:85a3:0:0:8A2E:0370:7334" + +Output: "IPv6" + +Explanation: This is a valid IPv6 address, return "IPv6". +``` + +Example 3: + +```text +Input: "256.256.256.256" + +Output: "Neither" + +Explanation: This is neither a IPv4 address nor a IPv6 address. +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0468.validate-ip-address/validate-ip-address.go b/Algorithms/0468.validate-ip-address/validate-ip-address.go new file mode 100755 index 000000000..deb554741 --- /dev/null +++ b/Algorithms/0468.validate-ip-address/validate-ip-address.go @@ -0,0 +1,88 @@ +package Problem0468 + +import ( + "strconv" + "strings" +) + +func validIPAddress(IP string) string { + switch { + case isIPv4(IP): + return "IPv4" + case isIPv6(IP): + return "IPv6" + default: + return "Neither" + } +} + +func isIPv4(IP string) bool { + if !strings.Contains(IP, ".") { + return false + } + + ss := strings.Split(IP, ".") + + if len(ss) != 4 { + return false + } + + for _, s := range ss { + if !isV4Num(s) { + return false + } + } + + return true +} + +func isV4Num(s string) bool { + if len(s) == 0 { + return false + } + + if len(s) > 1 && + (s[0] < '1' || '9' < s[0]) { + return false + } + + n, err := strconv.Atoi(s) + + return err == nil && 0 <= n && n < 256 +} + +func isIPv6(IP string) bool { + if !strings.Contains(IP, ":") { + return false + } + + ss := strings.Split(IP, ":") + + if len(ss) != 8 { + return false + } + + for _, s := range ss { + if !isV6Num(s) { + return false + } + } + + return true +} + +func isV6Num(s string) bool { + if len(s) == 0 || len(s) > 4 { + return false + } + + if !('0' <= s[0] && s[0] <= '9') && + !('a' <= s[0] && s[0] <= 'z') && + !('A' <= s[0] && s[0] <= 'Z') { + return false + } + + n, err := strconv.ParseInt(s, 16, 64) + + return err == nil && 0 <= n && n < 1<<16 +} diff --git a/Algorithms/0468.validate-ip-address/validate-ip-address_test.go b/Algorithms/0468.validate-ip-address/validate-ip-address_test.go new file mode 100755 index 000000000..d6c37da72 --- /dev/null +++ b/Algorithms/0468.validate-ip-address/validate-ip-address_test.go @@ -0,0 +1,84 @@ +package Problem0468 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + IP string + ans string +}{ + + { + "1081:db8:85a3:01:-0:8A2E:0370:7334", + "Neither", + }, + + { + "2001:0db8:85a3:0000:0:8A2E:0370:733a", + "IPv6", + }, + + { + "0.0.0.-0", + "Neither", + }, + + { + "2001:0db8:85a3:0:0:8A2E:0370:7334", + "IPv6", + }, + + { + "172.16.254.1", + "IPv4", + }, + + { + "0db8:85a3:00000:0:8A2E:0370:7334", + "Neither", + }, + + { + "2001:0db8:85a3:00000:0:8A2E:0370:7334", + "Neither", + }, + + { + "56.256.256", + "Neither", + }, + + { + "25.25..25", + "Neither", + }, + + { + "256.256.256.256", + "Neither", + }, + + // 可以有多个 testcase +} + +func Test_validIPAddress(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, validIPAddress(tc.IP), "输入:%v", tc) + } +} + +func Benchmark_validIPAddress(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + validIPAddress(tc.IP) + } + } +} diff --git a/Algorithms/0472.concatenated-words/472.100.png b/Algorithms/0472.concatenated-words/472.100.png new file mode 100644 index 000000000..841e791ee Binary files /dev/null and b/Algorithms/0472.concatenated-words/472.100.png differ diff --git a/Algorithms/0472.concatenated-words/README.md b/Algorithms/0472.concatenated-words/README.md new file mode 100755 index 000000000..1da9997d2 --- /dev/null +++ b/Algorithms/0472.concatenated-words/README.md @@ -0,0 +1,30 @@ +# [472. Concatenated Words](https://leetcode.com/problems/concatenated-words/) + +## 题目 + +Given a list of words (without duplicates), please write a program that returns all concatenated words in the given list of words. + +A concatenated word is defined as a string that is comprised entirely of at least two shorter words in the given array. + +Example: + +```text +Input: ["cat","cats","catsdogcats","dog","dogcatsdog","hippopotamuses","rat","ratcatdogcat"] + +Output: ["catsdogcats","dogcatsdog","ratcatdogcat"] + +Explanation: "catsdogcats" can be concatenated by "cats", "dog" and "cats"; "dogcatsdog" can be concatenated by "dog", "cats" and "dog"; "ratcatdogcat" can be concatenated by "rat", "cat", "dog" and "cat". +``` + +Note: + +1. The number of elements of the given array will not exceed 10,000 +1. The length sum of elements in the given array will not exceed 600,000. +1. All the input string will only include lower case letters. +1. The returned elements order does not matter. + +## 解题思路 + +见程序注释 + +![100](472.100.png) \ No newline at end of file diff --git a/Algorithms/0472.concatenated-words/concatenated-words.go b/Algorithms/0472.concatenated-words/concatenated-words.go new file mode 100755 index 000000000..97724d01a --- /dev/null +++ b/Algorithms/0472.concatenated-words/concatenated-words.go @@ -0,0 +1,40 @@ +package Problem0472 + +func findAllConcatenatedWordsInADict(words []string) []string { + // hasLen[3] == true 表示,words 中存在长度为 3 的单词 + hasLen := make(map[int]bool, len(words)) + // hasWord["dog"] == true 表示, words 中存在单词 "dog" + hasWord := make(map[string]bool, len(words)) + for _, word := range words { + hasLen[len(word)] = true + hasWord[word] = true + } + + res := make([]string, 0, len(words)) + for _, word := range words { + if isConcatenated(word, hasLen, hasWord, false) { + res = append(res, word) + } + } + + return res +} + +func isConcatenated(word string, hasLen map[int]bool, hasWord map[string]bool, isCutted bool) bool { + for wLen := 1; wLen < len(word); wLen++ { + if hasLen[wLen] && + // word[:wLen] 非常耗时, + // 只有当 wrods 存在长度为 wLen 的单词时 + // 才检查 word[:wLen] 是否存在 + hasWord[word[:wLen]] && + isConcatenated(word[wLen:], hasLen, hasWord, true) { + return true + } + } + + // 单词是完整的时候,会匹配到自己, 需要剔除这种情况 + // 只能对被切除过的部分,进行全单词匹配 + return isCutted && + hasLen[len(word)] && + hasWord[word] +} diff --git a/Algorithms/0472.concatenated-words/concatenated-words_test.go b/Algorithms/0472.concatenated-words/concatenated-words_test.go new file mode 100755 index 000000000..525a66865 --- /dev/null +++ b/Algorithms/0472.concatenated-words/concatenated-words_test.go @@ -0,0 +1,63 @@ +package Problem0472 + +import ( + "fmt" + "sort" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + words []string + ans []string +}{ + + { + []string{"a", "abc", "e"}, + []string{}, + }, + + { + []string{"rfkqyuqfjkx", "", "vnrtysfrzrmzl", "gfve", "qfpd", "lqdqrrcrwdnxeuo", "q", "klaitgdphcspij", "hbsfyfv", "adzpbfudkklrw", "aozmixr", "ife", "feclhbvfuk", "yeqfqojwtw", "sileeztxwjl", "ngbqqmbxqcqp", "khhqr", "dwfcayssyoqc", "omwufbdfxu", "zhift", "kczvhsybloet", "crfhpxprbsshsjxd", "ilebxwbcto", "yaxzfbjbkrxi", "imqpzwmshlpj", "ta", "hbuxhwadlpto", "eziwkmg", "ovqzgdixrpddzp", "c", "wnqwqecyjyib", "jy", "mjfqwltvzk", "tpvo", "phckcyufdqml", "lim", "lfz", "tgygdt", "nhcvpf", "fbrpzlk", "shwywshtdgmb", "bkkxcvg", "monmwvytby", "nuqhmfj", "qtg", "cwkuzyamnerp", "fmwevhwlezo", "ye", "hbrcewjxvcezi", "tiq", "tfsrptug", "iznorvonzjfea", "gama", "apwlmbzit", "s", "hzkosvn", "nberblt", "kggdgpljfisylt", "mf", "h", "bljvkypcflsaqe", "cijcyrgmqirz", "iaxakholawoydvch", "e", "gttxwpuk", "jf", "xbrtspfttota", "sngqvoijxuv", "bztvaal", "zxbshnrvbykjql", "zz", "mlvyoshiktodnsjj", "qplci", "lzqrxl", "qxru", "ygjtyzleizme", "inx", "lwhhjwsl", "endjvxjyghrveu", "phknqtsdtwxcktmw", "wsdthzmlmbhjkm", "u", "pbqurqfxgqlojmws", "mowsjvpvhznbsi", "hdkbdxqg", "ge", "pzchrgef", "ukmcowoe", "nwhpiid", "xdnnl", "n", "yjyssbsoc", "cdzcuunkrf", "uvouaghhcyvmlk", "aajpfpyljt", "jpyntsefxi", "wjute", "y", "pbcnmhf", "qmmidmvkn", "xmywegmtuno", "vuzygv", "uxtrdsdfzfssmel", "odjgdgzfmrazvnd", "a", "rdkugsbdpawxi", "ivd", "bbqeonycaegxfj", "lrfkraoheucsvpi", "eqrswgkaaaohxx", "hqjtkqaqh", "berbpmglbjipnuj", "wogwczlkyrde", "aqufowbig", "snjniegvdvotu", "ocedkt", "bbufnxorixibbd", "rzuqsyr", "qghoy", "evcuanuujszitaoa", "wsx", "glafbwzdd", "znrvjqeyqi", "npitruijvyllsi", "objltu", "ryp", "nvybsfrxtlfmp", "id", "zoolzslgd", "owijatklvjzscizr", "upmsoxftumyxifyu", "xucubv", "fctkqlroq", "zjv", "wzi", "ppvs", "mflvioemycnphfjt", "nwedtubynsb", "repgcx", "gsfomhvpmy", "kdohe", "tyycsibbeaxn", "wjkfvabn", "llkmagl", "thkglauzgkeuly", "paeurdvexqlw", "akdt", "ihmfrj", "janxk", "rqdll", "cyhbsuxnlftmjc", "yybwsjmajbwtuhkk", "ovytgaufpjl", "iwbnzhybsx", "mumbh", "jqmdabmyu", "br", "lwstjkoxbczkj", "vhsgzvwiixxaob", "fso", "qnebmfl", "ooetjiz", "lq", "msxphqdgz", "mqhoggvrvjqrp", "xbhkkfg", "zxjegsyovdrmw", "jav", "mshoj", "ax", "biztkfomz", "hujdmcyxdqteqja", "gqgsomonv", "reqqzzpw", "lihdnvud", "lznfhbaokxvce", "fhxbldylqqewdnj", "rlbskqgfvn", "lfvobeyolyy", "v", "iwh", "fpbuiujlolnjl", "gvwxljbo", "ypaotdzjxxrsc", "mwrvel", "umzpnoiei", "ogwilaswn", "yw", "egdgye", "hsrznlzrf", "mwdgxaigmxpy", "yaqgault", "dtlg", "cyvfiykmkllf", "zxqyhvizqmamj", "lvvgoifltzywueyp", "abinmy", "ppzaecvmx", "qsmzc", "iddymnl", "uskihek", "evxtehxtbthq", "jvtfzddlgch", "czohpyewf", "ufzazyxtqxcu", "brxpfymuvfvs", "xrrcfuusicc", "aqhlswbzievij", "rv", "udvmara", "upityz", "fecd", "suxteeitxtg", "dfuydrtbfypbn", "cypqodxr", "wikfuxwjht", "jrliuaifpp", "vkmxys", "wvpfyfpkvgthq", "rmajxis", "jncxgviyu", "av", "nmhskodmidaj", "lkfrimprrhen", "uip", "hstyopbvuiqc", "p", "vwduwmjpblqo", "fnxwgqtvwztje", "xwnbcuggl", "iehimvoymyjasin", "spsqiu", "flhyfac", "mqrbq", "pstsxhplrrmbeddv", "hnegtuxx", "alsyxezjwtlwmxv", "jtxytykkcku", "bhhlovgcx", "xhhivxnutkx", "had", "aysulvk", "m", "anhsyxli", "jdkgfc", "potn", "lcibpxkidmwexp", "gwoxjicdkv", "tltienw", "ngiutnuqbzi", "o", "tzlyb", "vumnwehj", "os", "np", "lhv", "uzvgyeette", "ipfvr", "lpprjjalchhhcmh", "k", "pciulccqssaqgd", "tp", "dmzdzveslyjad", "wtsbhgkd", "eouxbldsxzm", "vhtonlampljgzyve", "xhnlcrldtfthul", "xhflc", "upgei", "rlaks", "yfqvnvtnqspyjbxr", "phouoyhvls", "voibuvbhhjcdflvl", "rgorfbjrofokggaf", "dqhqats", "zchpicyuawpovm", "yzwfor", "koat", "pybf", "fhdzsbiyjld", "gznfnqydisn", "xz", "po", "tcjup", "wygsnxk", "kqlima", "fgxnuohrnhg", "publurhztntgmimc", "zuufzphd", "iucrmmmjqtcey", "wnnbq", "rghzyz", "ukjqsjbmp", "mdtrgv", "vyeikgjdnml", "kxwldnmi", "apzuhsbssaxj", "tkbkoljyodlipof", "nkq", "ktwtj", "vgmkgjwle", "t", "agylw", "vomtuy", "jbtvitkqn", "vtdxwrclpspcn", "rdrls", "yxfeoh", "upj", "myctacn", "fdnor", "ahqghzhoqprgkym", "phiuvdv", "jp", "fdgpouzjwbq", "hqoyefmugjvewhxu", "qfzwuwe", "fnsbijkeepyxry", "oja", "qthkcij", "zpmqfbmnr", "ybaibmzonzqlnmd", "svo", "gjftyfehik", "jfrfgznuaytvaegm", "aljhrx", "odjq", "ogwaxrssjxgvnka", "zaqswwofedxj", "lugpktauixp", "dc", "odknlbvxrs", "jeobu", "vqythyvzxbcgrlbg", "hwc", "erpbaxq", "ujxcxck", "rrklkb", "wlrwyuy", "zmg", "yyhga", "xwdbycdu", "htedgvsrhchox", "wr", "suhesetv", "jonqwhkwezjvjgg", "sqqyrxtjkcalswq", "hvyimhe", "pjzdkmoue", "zbphmgoxq", "lbdlcumdgixjbcq", "ztzdjqmadthtdmv", "qcagsyqggcf", "if", "jpjxcjyi", "chyicqibxdgkqtg", "iwpdklhum", "wljmg", "micmun", "npdbamofynykqv", "ijsnfkpfy", "lmq", "oyjmeqvhcrvgm", "mqopusqktdthpvz", "fz", "r", "qbsqtipq", "nxtsnason", "xbpipyhh", "topsuqomfjrd", "islif", "gbndakaq", "bwnkxnwpzeoohlx", "hrtbfnq", "fguvomeepxoffg", "mat", "dzfpfnwbfuj", "onlvy", "cwcchvsasdylb", "rxfcztzqopdi", "ybrhodjn", "oqkijy", "ncvrjo", "dphbfaal", "xgtpdtkz", "sebevsopjvciwljf", "rcumyacqdapwczen", "mabkapuoud", "pbozezeygljfftvy", "bvazmzbndl", "vl", "qiaixdtbhqvlzd", "ffjfb", "svthrfmkoxbho", "cvet", "ucgqyvopafyttrh", "lbgihet", "naiqyufxffdw", "vruh", "uz", "ukffmudygjavem", "dccamymhp", "wofwgjkykm", "fbuujzxhln", "kmm", "lzandlltowjpwsal", "fapfvrmezbsjxs", "wiw", "sc", "soqlh", "hzaplclkwl", "gcdqbcdwbwa", "gadgt", "pgowefka", "juffuguqepwnfh", "nbuinl", "cpdxf", "sox", "fq", "lfnrhgsxkhx", "xrcorfygjxpi", "mwtqjwbhgh", "loc", "fkglorkkvx", "nlzdhucvayrz", "azefobxutitrf", "rlrstkcbtikklmh", "ggk", "sbphcejuylh", "nraoenhd", "zngyodiqlchxyycx", "rrbhfwohfv", "krzolrglgn", "cpjesdzy", "yoifoyg", "hqqevqjugi", "ahmv", "xgaujnyclcjq", "evhyfnlohavrj", "byyvhgh", "hyw", "kedhvwy", "ysljsqminajfipds", "rglnpxfqwu", "cibpynkxg", "su", "mbntqrlwyampdg", "nig", "ldhlhqdyjcfhu", "jfymrbafmyoc", "tyjmnhlfnrtz", "dlazixtlxyvm", "fbiguhsfuqo", "rhymsno", "rkbdlchs", "ocbbwwd", "astaiamnepwkya", "mplirup", "edkxjq", "g", "exlwulswtvot", "tlnc", "vnrrzerz", "ygeraoozbtt", "yyifkin", "eo", "ua", "qgztvqdolf", "rlzddjzcshvd", "khxkdxflwxme", "kk", "zylbhoaac", "cw", "iizic", "gcdxstpz", "kjwdqeg", "earjrncmmkdel", "kbesuhquepj", "nrzbllldgdmyrpgl", "hllwnqozf", "djpchowhwevbqvjj", "zsmhylnjpktb", "pxnktxkm", "fxwiaqqb", "qjwufmwresfsfaok", "aa", "d", "iobioqm", "svjgzk", "khbzp", "euexyudhrioi", "yqsj", "ngrwqpoh", "rwuvd", "eruffmlg", "bxzovyew", "faz", "pmvfvyguqdi", "jlxnoixsy", "hyfrdngjf", "ly", "eibcapetpmeaid", "tpnwwiif", "pfgsp", "kvhhwkzvtvlhhb", "pjxurgqbtldims", "rncplkeweoirje", "akyprzzphew", "wyvfpjyglzrmhfqp", "ubheeqt", "rmbxlcmn", "taqakgim", "apsbu", "khwnykughmwrlk", "vtdlzwpbhcsbvjno", "tffmjggrmyil", "schgwrrzt", "mvndmua", "nlwpw", "glvbtkegzjs", "piwllpgnlpcnezqs", "xkelind", "urtxsezrwz", "zechoc", "vfaimxrqnyiq", "ybugjsblhzfravzn", "btgcpqwovwp", "zgxgodlhmix", "sfzdknoxzassc", "wgzvqkxuqrsqxs", "dwneyqisozq", "fg", "vhfsf", "uspujvqhydw", "eadosqafyxbmzgr", "tyff", "blolplosqnfcwx", "uwkl", "puenodlvotb", "iizudxqjvfnky", "cjcywjkfvukvveq", "jrxd", "igwb", "dftdyelydzyummmt", "uvfmaicednym", "oai", "higfkfavgeemcgo", "naefganqo", "iqebfibigljbc", "ulicojzjfrc", "igxprunj", "cymbrl", "fqmwciqtynca", "zjyagi", "mzuejrttefhdwqc", "zyiurxvf", "wrjxffzbjexsh", "wrxw", "mhrbdxjwi", "htknfa", "wfrvxqdkhbwwef", "vqsghhhutdget", "cwupzrts", "hbjnb", "wpccoa", "nx", "howbzhaoscgyk", "bilt", "wqqatye", "zceuuwg", "jxzon", "kkfj", "bwsezd", "ifdegsyjtswselk", "xweimxlnzoh", "tqthlftjblnpht", "ww", "ss", "b", "jmruuqscwjp", "nxbk", "wd", "cqkrtbxgzg", "xhppcjnq", "cfq", "tkkolzcfi", "wblxki", "ijeglxsvc", "kcqjjwcwuhvzydm", "gubqavlqffhrzz", "hiwxrgftittd", "caybc", "ncsyjlzlxyyklc", "poxcgnexmaajzuha", "dhaccuualacyl", "mtkewbprs", "oncggqvr", "sqqoffmwkplsgbrp", "ioajuppvqluhbdet", "dzwwzaelmo", "afumtqugec", "wglucmugwqi", "zveswrjevfz", "nxlbkak", "pzcejvxzeoybb", "fd", "vewj", "ivws", "zjhudtpqsfc", "zcmukotirrxx", "zksmx", "umofzhhowyftz", "zbotrokaxaryxlk", "ueolqk", "dxmzhoq", "zvu", "cjl", "esfmqgvxwfy", "npbep", "vbgjtbv", "poeugoqynkbfiv", "fewjjscjrei", "yqssxzsydgllfzmo", "urxkwcypctjkabi", "wqtldwhjouas", "tovdtkr", "onzgeyddkqwuhnim", "ffxviyvsktqrfa", "qujhd", "pvcz", "hiyjlkxmeplnrvxg", "hdykehkefp", "vepcxhozpjxtreyn", "liguhuxudbnh", "f", "ordxzm", "klgohcmmbukz", "yrmooliaobbnlap", "dutnbetocxylcey", "ywdsjegd", "cr", "blbxhjsgcuoxmqft", "ngzdc", "srfyjjumcbxole", "dazwzwtdjoyuqeqj", "xazjarqgfm", "fxyfqbeoktcc", "qrsjchxp", "iltaqzawhgu", "sgenjcfxr", "yfikp", "dvwhbyumthkiktb", "walsx", "jyajrkcvysicisab", "brdeumb", "tviihjwxdcz", "dnrrgmem", "ydgxlrjzucxyid", "cdvdpvjlagwmg", "ngnpxjkxims", "gvyhnchlimsxc", "w", "jtizpezjl", "qe", "rjzv", "vhnqvi", "qm", "iedzqswrsnfmnn", "lt", "utqfcqyrrwm", "wtelvsqrru", "fjwrhjcrtbcytn", "qmqxceuohpiffaq", "rmoybqjjgdyo", "pmxttqftypfexlv", "tg", "qa", "iqbqjlnpbf", "kgaynkddbzllecd", "tccvslp", "curkxfoimnw", "fvnyqkzlheruxr", "iiygnzfov", "coqs", "oa", "eiu", "vzemmxtklis", "lxu", "nrwsjaxzwmh", "tdayz", "oxbbemejgosgcynf", "ykbcn", "hesvnctfvdsp", "ku", "rjhykpadahbhj", "at", "sxlngbtxmqr", "wqrom", "qzyabzrco", "rbbyklndcqdj", "cnsmgmwmpbgjq", "krvnaf", "qrwfajnfahyqocdb", "fnlaozmff", "vmoymbmytjvfcgt", "cijyy", "jdgwjbztl", "swmalgbgpaplqgz", "hfl", "typttkrpfvx", "tkzpzrscwbx", "bwfqqvjcukjbsg", "nxqmxr", "x", "eyavnz", "il", "dhthp", "eyelg", "npsoqsw", "reogbmveofvusdsx", "jvdrjkhxkq", "qzjbrpljwuzpl", "czqeevvbvcwh", "vzuszqvhlmapty", "yu", "yldwwgezlqur", "vorxwgdtgjilgydq", "pknt", "bgihl", "ckorgrm", "ixylxjmlfv", "bpoaboylced", "zea", "igfagitkrext", "ipvqq", "dmoerc", "oqxbypihdv", "dtjrrkxro", "rexuhucxpi", "bvmuyarjwqpcoywa", "qwdmfpwvamisns", "bhopoqdsref", "tmnm", "cre", "ktrniqwoofoeenbz", "vlrfcsftapyujmw", "updqikocrdyex", "bcxw", "eaum", "oklsqebuzeziisw", "fzgyhvnwjcns", "dybjywyaodsyw", "lmu", "eocfru", "ztlbggsuzctoc", "ilfzpszgrgj", "imqypqo", "fump", "sjvmsbrcfwretbie", "oxpmplpcg", "wmqigymr", "qevdyd", "gmuyytguexnyc", "hwialkbjgzc", "lmg", "gijjy", "lplrsxznfkoklxlv", "xrbasbznvxas", "twn", "bhqultkyfq", "saeq", "xbuw", "zd", "kng", "uoay", "kfykd", "armuwp", "gtghfxf", "gpucqwbihemixqmy", "jedyedimaa", "pbdrx", "toxmxzimgfao", "zlteob", "adoshnx", "ufgmypupei", "rqyex", "ljhqsaneicvaerqx", "ng", "sid", "zagpiuiia", "re", "oadojxmvgqgdodw", "jszyeruwnupqgmy", "jxigaskpj", "zpsbhgokwtfcisj", "vep", "ebwrcpafxzhb", "gjykhz", "mfomgxjphcscuxj", "iwbdvusywqlsc", "opvrnx", "mkgiwfvqfkotpdz", "inpobubzbvstk", "vubuucilxyh", "bci", "dibmye", "rlcnvnuuqfvhw", "oorbyyiigppuft", "swpksfdxicemjbf", "goabwrqdoudf", "yjutkeqakoarru", "wuznnlyd", "vfelxvtggkkk", "mxlwbkbklbwfsvr", "advraqovan", "smkln", "jxxvzdjlpyurxpj", "ssebtpznwoytjefo", "dynaiukctgrzjx", "irzosjuncvh", "hcnhhrajahitn", "vwtifcoqepqyzwya", "kddxywvgqxo", "syxngevs", "batvzmziq", "mjewiyo", "pzsupxoflq", "byzhtvvpj", "cqnlvlzr", "akvmxzbaei", "mwo", "vg", "ekfkuajjogbxhjii", "isdbplotyak", "jvkmxhtmyznha", "lqjnqzrwrmgt", "mbbhfli", "bpeohsufree", "ajrcsfogh", "lucidbnlysamvy", "tutjdfnvhahxy", "urbrmmadea", "hghv", "acnjx", "athltizloasimp", "gu", "rjfozvgmdakdhao", "iephs", "uztnpqhdl", "rfuyp", "crcszmgplszwfn", "zihegt", "xbspa", "cjbmsamjyqqrasz", "ghzlgnfoas", "ljxl", "cnumquohlcgt", "jm", "mfccj", "hfedli", "vtpieworwhyiucs", "tdtuquartspkotm", "pnkeluekvelj", "ugrloq", "zljmwt", "fkyvqguqq", "tpjidglpxqfxv", "l", "tvvimvroz", "yy", "opwyfovdz", "pwlumocnyuoume", "vjqpzkcfc", "ihicd", "dtttiixlhpikbv", "goblttgvmndkqgg", "gwsibcqahmyyeagk", "prtvoju", "lcblwidhjpu", "kbu", "pey", "gkzrpc", "bqajopjjlfthe", "bc", "lqs", "zkndgojnjnxqsoqi", "zyesldujjlp", "drswybwlfyzph", "xzluwbtmoxokk", "bedrqfui", "opajzeahv", "lehdfnr", "mnlpimduzgmwszc", "velbhj", "miwdn", "wruqc", "kscfodjxg", "wcbm"}, + []string{"gfve", "qfpd", "lqdqrrcrwdnxeuo", "hbsfyfv", "ife", "feclhbvfuk", "ngbqqmbxqcqp", "khhqr", "dwfcayssyoqc", "omwufbdfxu", "ilebxwbcto", "ta", "hbuxhwadlpto", "tpvo", "phckcyufdqml", "lfz", "tgygdt", "nhcvpf", "shwywshtdgmb", "bkkxcvg", "monmwvytby", "qtg", "cwkuzyamnerp", "ye", "tfsrptug", "gama", "nberblt", "mf", "gttxwpuk", "xbrtspfttota", "qxru", "phknqtsdtwxcktmw", "pbqurqfxgqlojmws", "hdkbdxqg", "ge", "ukmcowoe", "xdnnl", "yjyssbsoc", "uvouaghhcyvmlk", "pbcnmhf", "qmmidmvkn", "xmywegmtuno", "vuzygv", "uxtrdsdfzfssmel", "eqrswgkaaaohxx", "ocedkt", "qghoy", "wsx", "glafbwzdd", "ryp", "nvybsfrxtlfmp", "upmsoxftumyxifyu", "xucubv", "fctkqlroq", "ppvs", "nwedtubynsb", "repgcx", "gsfomhvpmy", "kdohe", "llkmagl", "thkglauzgkeuly", "paeurdvexqlw", "akdt", "rqdll", "mumbh", "br", "fso", "qnebmfl", "lq", "xbhkkfg", "ax", "gqgsomonv", "reqqzzpw", "rlbskqgfvn", "lfvobeyolyy", "mwrvel", "ogwilaswn", "yw", "egdgye", "yaqgault", "dtlg", "iddymnl", "evxtehxtbthq", "brxpfymuvfvs", "rv", "udvmara", "fecd", "dfuydrtbfypbn", "cypqodxr", "vkmxys", "wvpfyfpkvgthq", "av", "vwduwmjpblqo", "xwnbcuggl", "flhyfac", "mqrbq", "pstsxhplrrmbeddv", "hnegtuxx", "bhhlovgcx", "had", "aysulvk", "potn", "os", "np", "lhv", "uzvgyeette", "tp", "wtsbhgkd", "eouxbldsxzm", "xhnlcrldtfthul", "xhflc", "rlaks", "phouoyhvls", "dqhqats", "koat", "pybf", "po", "wygsnxk", "kqlima", "fgxnuohrnhg", "wnnbq", "mdtrgv", "nkq", "agylw", "vomtuy", "vtdxwrclpspcn", "rdrls", "yxfeoh", "myctacn", "fdnor", "qfzwuwe", "svo", "dc", "odknlbvxrs", "hwc", "erpbaxq", "rrklkb", "wlrwyuy", "yyhga", "xwdbycdu", "htedgvsrhchox", "wr", "suhesetv", "qcagsyqggcf", "wljmg", "npdbamofynykqv", "lmq", "oyjmeqvhcrvgm", "nxtsnason", "gbndakaq", "hrtbfnq", "fguvomeepxoffg", "mat", "onlvy", "cwcchvsasdylb", "dphbfaal", "mabkapuoud", "vl", "ffjfb", "svthrfmkoxbho", "cvet", "ucgqyvopafyttrh", "vruh", "ukffmudygjavem", "dccamymhp", "kmm", "sc", "soqlh", "gcdqbcdwbwa", "gadgt", "pgowefka", "cpdxf", "sox", "fq", "lfnrhgsxkhx", "loc", "fkglorkkvx", "ggk", "nraoenhd", "rrbhfwohfv", "yoifoyg", "ahmv", "byyvhgh", "hyw", "kedhvwy", "rglnpxfqwu", "su", "mbntqrlwyampdg", "jfymrbafmyoc", "rhymsno", "rkbdlchs", "ocbbwwd", "exlwulswtvot", "tlnc", "eo", "ua", "khxkdxflwxme", "kk", "cw", "pxnktxkm", "aa", "ngrwqpoh", "rwuvd", "eruffmlg", "bxzovyew", "hyfrdngjf", "ly", "pfgsp", "akyprzzphew", "ubheeqt", "rmbxlcmn", "apsbu", "khwnykughmwrlk", "mvndmua", "nlwpw", "btgcpqwovwp", "sfzdknoxzassc", "fg", "vhfsf", "tyff", "blolplosqnfcwx", "uwkl", "puenodlvotb", "naefganqo", "cymbrl", "wrxw", "htknfa", "wfrvxqdkhbwwef", "vqsghhhutdget", "wpccoa", "nx", "bilt", "wqqatye", "bwsezd", "ww", "ss", "jmruuqscwjp", "nxbk", "wd", "cfq", "gubqavlqffhrzz", "caybc", "dhaccuualacyl", "mtkewbprs", "oncggqvr", "sqqoffmwkplsgbrp", "afumtqugec", "nxlbkak", "fd", "ueolqk", "esfmqgvxwfy", "npbep", "yqssxzsydgllfzmo", "tovdtkr", "hdykehkefp", "ordxzm", "dutnbetocxylcey", "cr", "ngzdc", "fxyfqbeoktcc", "walsx", "brdeumb", "dnrrgmem", "gvyhnchlimsxc", "qe", "qm", "lt", "utqfcqyrrwm", "wtelvsqrru", "qmqxceuohpiffaq", "pmxttqftypfexlv", "tg", "qa", "tccvslp", "coqs", "oa", "lxu", "ykbcn", "hesvnctfvdsp", "ku", "at", "sxlngbtxmqr", "wqrom", "krvnaf", "hfl", "typttkrpfvx", "nxqmxr", "dhthp", "eyelg", "npsoqsw", "reogbmveofvusdsx", "yu", "pknt", "ckorgrm", "bpoaboylced", "dmoerc", "bhopoqdsref", "tmnm", "cre", "vlrfcsftapyujmw", "bcxw", "eaum", "dybjywyaodsyw", "lmu", "eocfru", "fump", "oxpmplpcg", "qevdyd", "gmuyytguexnyc", "lmg", "lplrsxznfkoklxlv", "twn", "bhqultkyfq", "saeq", "xbuw", "kng", "uoay", "kfykd", "armuwp", "gtghfxf", "pbdrx", "adoshnx", "rqyex", "ng", "sid", "re", "vep", "ebwrcpafxzhb", "opvrnx", "vubuucilxyh", "rlcnvnuuqfvhw", "goabwrqdoudf", "wuznnlyd", "vfelxvtggkkk", "mxlwbkbklbwfsvr", "advraqovan", "smkln", "kddxywvgqxo", "syxngevs", "mwo", "vg", "bpeohsufree", "lucidbnlysamvy", "urbrmmadea", "hghv", "gu", "uztnpqhdl", "rfuyp", "xbspa", "cnumquohlcgt", "tdtuquartspkotm", "ugrloq", "fkyvqguqq", "yy", "pwlumocnyuoume", "goblttgvmndkqgg", "lcblwidhjpu", "kbu", "pey", "bc", "lqs", "xzluwbtmoxokk", "lehdfnr", "wruqc", "wcbm"}, + }, + + { + []string{"a", "b", "ab", "abc"}, + []string{"ab"}, + }, + + { + []string{}, + []string{}, + }, + + { + []string{"cat", "cats", "catsdogcats", "dog", "dogcatsdog", "hippopotamuses", "rat", "ratcatdogcat"}, + []string{"catsdogcats", "dogcatsdog", "ratcatdogcat"}, + }, + + // 可以有多个 testcase +} + +func Test_findAllConcatenatedWordsInADict(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ans := findAllConcatenatedWordsInADict(tc.words) + sort.Strings(ans) + sort.Strings(tc.ans) + ast.Equal(tc.ans, ans, "输入:%v", tc) + } +} + +func Benchmark_findAllConcatenatedWordsInADict(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findAllConcatenatedWordsInADict(tc.words) + } + } +} diff --git a/Algorithms/0473.matchsticks-to-square/README.md b/Algorithms/0473.matchsticks-to-square/README.md new file mode 100755 index 000000000..0b7e93ae1 --- /dev/null +++ b/Algorithms/0473.matchsticks-to-square/README.md @@ -0,0 +1,34 @@ +# [473. Matchsticks to Square](https://leetcode.com/problems/matchsticks-to-square/) + +## 题目 + +Remember the story of Little Match Girl? By now, you know exactly what matchsticks the little match girl has, please find out a way you can make one square by using up all those matchsticks. You should not break any stick, but you can link them up, and each matchstick must be used exactly one time. + +Your input will be several matchsticks the girl has, represented with their stick length. Your output will either be true or false, to represent whether you could make one square using all the matchsticks the little match girl has. + +Example 1: + +```text +Input: [1,1,2,2,2] +Output: true + +Explanation: You can form a square with length 2, one side of the square came two sticks with length 1. +``` + +Example 2: + +```text +Input: [3,3,3,3,4] +Output: false +``` + +Explanation: You cannot find a way to form a square with all the matchsticks. + +Note: + +1. The length sum of the given matchsticks is in the range of 0 to 10^9. +1. The length of the given matchstick array will not exceed 15. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0473.matchsticks-to-square/matchsticks-to-square.go b/Algorithms/0473.matchsticks-to-square/matchsticks-to-square.go new file mode 100755 index 000000000..e6257747c --- /dev/null +++ b/Algorithms/0473.matchsticks-to-square/matchsticks-to-square.go @@ -0,0 +1,58 @@ +package Problem0473 + +import "sort" + +func makesquare(nums []int) bool { + if len(nums) < 4 { + return false + } + + // 先对nums中的数做一个基本的分析 + ok, avg := analyze(nums) + if !ok { + return false + } + + // 降序排列可以加快 dfs 的速度 + sort.Sort(sort.Reverse(sort.IntSlice(nums))) + + edges := make([]int, 4) + return dfs(nums, edges, 0, avg) +} + +func dfs(nums, edges []int, index, target int) bool { + if index == len(nums) { + if edges[0] == target && + edges[1] == target && + edges[2] == target { + return true + } + // TODO: 重新组织程序,达到完整的覆盖率 + return false + } + + for i := 0; i < 4; i++ { + if edges[i]+nums[index] > target { + continue + } + edges[i] += nums[index] + if dfs(nums, edges, index+1, target) { + return true + } + edges[i] -= nums[index] + } + + return false +} + +// analyze 统计了 nums 中数的总和,能否被 4 整除 +func analyze(nums []int) (ok bool, avg int) { + sum := 0 + for _, n := range nums { + sum += n + } + if sum%4 != 0 { + return false, 0 + } + return true, sum / 4 +} diff --git a/Algorithms/0473.matchsticks-to-square/matchsticks-to-square_test.go b/Algorithms/0473.matchsticks-to-square/matchsticks-to-square_test.go new file mode 100755 index 000000000..7c0487f0a --- /dev/null +++ b/Algorithms/0473.matchsticks-to-square/matchsticks-to-square_test.go @@ -0,0 +1,85 @@ +package Problem0473 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans bool +}{ + + { + []int{2, 2, 2, 3, 4, 4, 4, 5, 6}, + true, + }, + + { + []int{10, 6, 5, 5, 5, 3, 3, 3, 2, 2, 2, 2}, + true, + }, + + { + []int{2, 4, 4, 4}, + false, + }, + + { + []int{1, 1, 2, 2, 2}, + true, + }, + + { + []int{}, + false, + }, + + { + []int{3, 3, 3, 5, 4}, + false, + }, + + { + []int{3, 3, 3, 3, 4}, + false, + }, + + // 可以有多个 testcase +} + +func Test_makesquare(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, makesquare(tc.nums), "输入:%v", tc) + } +} + +// 由于 analyze 提前了处理了一些情况 +// 导致 dfs 中的一处 return false 无法覆盖 +// 只好添加以下单元测试覆盖掉 +// 这样是不对滴 +func Test_dfs(t *testing.T) { + ast := assert.New(t) + + nums := []int{1, 1, 1, 1} + edges := []int{2, 2, 2, 2} + + actual := dfs(nums, edges, 4, 1) + expected := false + ast.Equal(expected, actual) + +} + +func Benchmark_makesquare(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + makesquare(tc.nums) + } + } +} diff --git a/Algorithms/0474.ones-and-zeroes/README.md b/Algorithms/0474.ones-and-zeroes/README.md new file mode 100755 index 000000000..4ecade5b5 --- /dev/null +++ b/Algorithms/0474.ones-and-zeroes/README.md @@ -0,0 +1,35 @@ +# [474. Ones and Zeroes](https://leetcode.com/problems/ones-and-zeroes/) + +## 题目 + +In the computer world, use restricted resource you have to generate maximum benefit is what we always want to pursue. +For now, suppose you are a dominator of m 0s and n 1s respectively. On the other hand, there is an array with strings consisting of only 0s and 1s. + +Now your task is to find the maximum number of strings that you can form with given m 0s and n 1s. Each 0 and 1 can be used at most once. + +Note: + +1. The given numbers of 0s and 1s will both not exceed 100 +1. The size of given string array won't exceed 600. + +Example 1: + +```text +Input: Array = {"10", "0001", "111001", "1", "0"}, m = 5, n = 3 +Output: 4 + +Explanation: This are totally 4 strings can be formed by the using of 5 0s and 3 1s, which are “10,”0001”,”1”,”0” +``` + +Example 2: + +```text +Input: Array = {"10", "0", "1"}, m = 1, n = 1 +Output: 2 + +Explanation: You could form "10", but then you'd have nothing left. Better form "0" and "1". +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0474.ones-and-zeroes/ones-and-zeroes.go b/Algorithms/0474.ones-and-zeroes/ones-and-zeroes.go new file mode 100755 index 000000000..0d815aa13 --- /dev/null +++ b/Algorithms/0474.ones-and-zeroes/ones-and-zeroes.go @@ -0,0 +1,33 @@ +package Problem0474 + +import ( + "strings" +) + +func findMaxForm(strs []string, m int, n int) int { + // dp[i][j] 为 i 个 '0' 和 j 个 '1' 所能形成的最多的 s 的个数 + dp := make([][]int, m+1) + for i := range dp { + dp[i] = make([]int, n+1) + } + + for _, s := range strs { + zeros := strings.Count(s, "0") + ones := len(s) - zeros + for i := m; i-zeros >= 0; i-- { + for j := n; j-ones >= 0; j-- { + // 更新 dp[i][j] + dp[i][j] = max(dp[i][j], dp[i-zeros][j-ones]+1) + } + } + } + + return dp[m][n] +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} diff --git a/Algorithms/0474.ones-and-zeroes/ones-and-zeroes_test.go b/Algorithms/0474.ones-and-zeroes/ones-and-zeroes_test.go new file mode 100755 index 000000000..d80f2b41d --- /dev/null +++ b/Algorithms/0474.ones-and-zeroes/ones-and-zeroes_test.go @@ -0,0 +1,64 @@ +package Problem0474 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + strs []string + m int + n int + ans int +}{ + + { + []string{"111001", "10", "0001"}, + 5, + 3, + 2, + }, + + { + []string{"1", "0", "10", "0001", "111001"}, + 5, + 3, + 4, + }, + + { + []string{"10", "0001", "111001", "1", "0"}, + 5, + 3, + 4, + }, + + { + []string{"10", "0", "1"}, + 1, + 1, + 2, + }, + + // 可以有多个 testcase +} + +func Test_findMaxForm(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findMaxForm(tc.strs, tc.m, tc.n), "输入:%v", tc) + } +} + +func Benchmark_findMaxForm(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findMaxForm(tc.strs, tc.m, tc.n) + } + } +} diff --git a/Algorithms/0475.heaters/README.md b/Algorithms/0475.heaters/README.md new file mode 100755 index 000000000..210403741 --- /dev/null +++ b/Algorithms/0475.heaters/README.md @@ -0,0 +1,36 @@ +# [475. Heaters](https://leetcode.com/problems/heaters/) + +## 题目 + +Winter is coming! Your first job during the contest is to design a standard heater with fixed warm radius to warm all the houses. + +Now, you are given positions of houses and heaters on a horizontal line, find out minimum radius of heaters so that all houses could be covered by those heaters. + +So, your input will be the positions of houses and heaters seperately, and your expected output will be the minimum radius standard of heaters. + +Note: + +1. Numbers of houses and heaters you are given are non-negative and will not exceed 25000. +1. Positions of houses and heaters you are given are non-negative and will not exceed 10^9. +1. As long as a house is in the heaters' warm radius range, it can be warmed. +1. All the heaters follow your radius standard and the warm radius will the same. + +Example 1: + +```text +Input: [1,2,3],[2] +Output: 1 +Explanation: The only heater was placed in the position 2, and if we use the radius 1 standard, then all the houses can be warmed. +``` + +Example 2: + +```text +Input: [1,2,3,4],[1,4] +Output: 1 +Explanation: The two heater was placed in the position 1 and 4. We need to use radius 1 standard, then all the houses can be warmed. +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0475.heaters/heaters.go b/Algorithms/0475.heaters/heaters.go new file mode 100755 index 000000000..c02bb5579 --- /dev/null +++ b/Algorithms/0475.heaters/heaters.go @@ -0,0 +1,53 @@ +package Problem0475 + +import ( + "sort" +) + +func findRadius(houses []int, heaters []int) int { + if len(houses) == 0 { + return 0 + } + + res := 0 + + sort.Ints(houses) + sort.Ints(heaters) + + iHeater := sort.SearchInts(heaters, houses[0]) + + for iHouse := 0; iHouse < len(houses); iHouse++ { + for iHeater < len(heaters) && houses[iHouse] > heaters[iHeater] { + iHeater++ + } + + if iHeater == len(heaters) { + return max(res, houses[len(houses)-1]-heaters[iHeater-1]) + } + + left := 1<<31 - 1 + if 0 <= iHeater-1 { + left = houses[iHouse] - heaters[iHeater-1] + } + + right := heaters[iHeater] - houses[iHouse] + + res = max(res, min(left, right)) + } + + return res +} + +func min(a, b int) int { + if a < b { + return a + } + return b +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} diff --git a/Algorithms/0475.heaters/heaters_test.go b/Algorithms/0475.heaters/heaters_test.go new file mode 100755 index 000000000..6164ea843 --- /dev/null +++ b/Algorithms/0475.heaters/heaters_test.go @@ -0,0 +1,83 @@ +package Problem0475 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + houses []int + heaters []int + ans int +}{ + + { + []int{1, 2, 3, 5, 15}, + []int{2, 30}, + 13, + }, + + { + []int{}, + []int{3}, + 0, + }, + + { + []int{3}, + []int{3}, + 0, + }, + + { + []int{1, 2, 3}, + []int{2}, + 1, + }, + + { + []int{3, 2, 4}, + []int{3}, + 1, + }, + + { + []int{3, 5, 7, 9}, + []int{8, 4}, + 1, + }, + + { + []int{3, 5, 6, 7, 9}, + []int{8, 4}, + 2, + }, + + { + []int{1, 2, 3, 4}, + []int{1, 4}, + 1, + }, + + // 可以有多个 testcase +} + +func Test_findRadius(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findRadius(tc.houses, tc.heaters), "输入:%v", tc) + } +} + +func Benchmark_findRadius(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findRadius(tc.houses, tc.heaters) + } + } +} diff --git a/Algorithms/0476.number-complement/README.md b/Algorithms/0476.number-complement/README.md new file mode 100755 index 000000000..c2aa35564 --- /dev/null +++ b/Algorithms/0476.number-complement/README.md @@ -0,0 +1,30 @@ +# [476. Number Complement](https://leetcode.com/problems/number-complement/) + +## 题目 + +Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation. + +Note: + +The given integer is guaranteed to fit within the range of a 32-bit signed integer. +You could assume no leading zero bit in the integer’s binary representation. + +Example 1: + +```text +Input: 5 +Output: 2 +Explanation: The binary representation of 5 is 101 (no leading zero bits), and its complement is 010. So you need to output 2. +``` + +Example 2: + +```text +Input: 1 +Output: 0 +Explanation: The binary representation of 1 is 1 (no leading zero bits), and its complement is 0. So you need to output 0. +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0476.number-complement/number-complement.go b/Algorithms/0476.number-complement/number-complement.go new file mode 100755 index 000000000..01e44931a --- /dev/null +++ b/Algorithms/0476.number-complement/number-complement.go @@ -0,0 +1,13 @@ +package Problem0476 + +func findComplement(num int) int { + temp := num + res := 0 + for temp > 0 { + temp >>= 1 + res <<= 1 + res++ + } + + return res ^ num +} diff --git a/Algorithms/0476.number-complement/number-complement_test.go b/Algorithms/0476.number-complement/number-complement_test.go new file mode 100755 index 000000000..64e09cbd0 --- /dev/null +++ b/Algorithms/0476.number-complement/number-complement_test.go @@ -0,0 +1,44 @@ +package Problem0476 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + num int + ans int +}{ + + { + 1, + 0, + }, + + { + 5, + 2, + }, + + // 可以有多个 testcase +} + +func Test_findComplement(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findComplement(tc.num), "输入:%v", tc) + } +} + +func Benchmark_findComplement(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findComplement(tc.num) + } + } +} diff --git a/Algorithms/0477.total-hamming-distance/README.md b/Algorithms/0477.total-hamming-distance/README.md new file mode 100755 index 000000000..abbf67c39 --- /dev/null +++ b/Algorithms/0477.total-hamming-distance/README.md @@ -0,0 +1,28 @@ +# [477. Total Hamming Distance](https://leetcode.com/problems/total-hamming-distance/) + +## 题目 + +The Hamming distance between two integers is the number of positions at which the corresponding bits are different. + +Now your job is to find the total Hamming distance between all pairs of the given numbers. + +Example: + +```text +Input: 4, 14, 2 + +Output: 6 + +Explanation: In binary representation, the 4 is 0100, 14 is 1110, and 2 is 0010 (just +showing the four bits relevant in this case). So the answer will be: +HammingDistance(4, 14) + HammingDistance(4, 2) + HammingDistance(14, 2) = 2 + 2 + 2 = 6. +``` + +Note: + +1. Elements of the given array are in the range of 0 to 10^9 +1. Length of the array will not exceed 10^4. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0477.total-hamming-distance/total-hamming-distance.go b/Algorithms/0477.total-hamming-distance/total-hamming-distance.go new file mode 100755 index 000000000..2da7082c8 --- /dev/null +++ b/Algorithms/0477.total-hamming-distance/total-hamming-distance.go @@ -0,0 +1,19 @@ +package Problem0477 + +func totalHammingDistance(nums []int) int { + res := 0 + n := len(nums) + + for j := 0; j < 32; j++ { + k := 0 + for i := 0; i < n; i++ { + k += (nums[i] >> uint(j)) & 1 + } + // 在第 j 个 bit 位上, + // 共有 k 个数是 1 , (n-k) 个位是 0 + // 那么,在第 j 个 bit 位上,会产生 k*(n-k) 个 hamming distance + res += k * (n - k) + } + + return res +} diff --git a/Algorithms/0477.total-hamming-distance/total-hamming-distance_test.go b/Algorithms/0477.total-hamming-distance/total-hamming-distance_test.go new file mode 100755 index 000000000..e0d2f4fe3 --- /dev/null +++ b/Algorithms/0477.total-hamming-distance/total-hamming-distance_test.go @@ -0,0 +1,44 @@ +package Problem0477 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans int +}{ + +{ + []int{346450570,966562973,457581303,222998192,364627507,169160189,954431542,221061882,240341464,2245441,231904888,735611889,365662644,741343641,855432971,6410579,954376059,436042748,1757003,612662010,619293283,756454019,412485671,362438559,34216799,142080553,739017385,767259094,477271201,645653662,266228943,301408300,648353405,543652957,779813961,33523464,581122512,963411206,25440862,235321881,537459840,564290176,530181458,643091781,951346494,264772743,242353595,253371384,100262534,923703199,520381430,497283426,629165236,170643624,116719823,850474028,58812742,416255752,301680516,135541845,719123095,56870927,992425752,194127615,675165512,203169436,169712122,493351238,319895999,340486752,309900187,844598934,307377068,388210841,397263679,76973008,693168540,777845383,514392792,423470900,514610142,136010125,792549045,323715552,111204613,498136379,79844425,353928756,743878480,863304173,946695057,190460954,119598426,632009346,519938738,292388501,523930549,810762921,501651610,30789726,732344533,285785174,63479657,750706287,447118062,460965759,123491715,56051003,96864966,216879136,807889793,812134617,933426165,725513820,298625074,322335679,541999219,548221737,257888129,496763035,472888287,143945709,667418150,989758769,467300921,578882168,171676666,92166119,138726055,549049390,928845149,41789200,916910409,170593191,269092392,35271762,107017362,196990595,194125069,632374890,428207227,661163092,87697666,553869198,330979619,791810803,8005562,405494420,972083587,546238911,144786252,323565313,733621387,271033882,246618065,59358323,995901031,414061877,83929037,284525936,374303061,931944164,587326777,11794358,659279382,640438401,453145421,831057063,135396331,66447875,97938685,83005193,144370426,363185828,708665000,381327316,669975942,821874551,423739731,530864043,230395994,352455617,961656493,598750529,91771061,502963681,814951975,247143259,503380715,381591472,814678540,739467086,735449213,926534406,652815823,174563216,214288088,2797575,567181369,84843397,619788927,142303070,538398379,158445973,121745931,779430373,29010889,900202132,674939409,698023609,127116549,287567434,100636066,759204582,751062847,997371041,705221252,484313149,681051691,140910705,404734872,298283655,819536065,775511175,938064582,373977047,540572738,550180756,616360688,860453735,284023825,525258072,854626934,137227180,565734538,35769828,35561683,123225824,882188260,710986932,958354216,931955812,783094713,338547506,283752439,259040864,750448779,621169822,83190287,960277990,52570725,733374736,66032750,710867398,889808503,728370791,71096437,709887505,453132381,818915205,285156812,594522827,696722476,733810688,950627073,58365878,141242023,678229204,948011930,55330417,870877946,744584117,631021928,104273588,765494720,888208441,960437590,587484278,511430018,374757232,768240151,140532093,483853929,759897161,299314796,970053676,789263086,138198883,278804174,845413242,108549742,974876069,234843651,89782818,884775441,244065059,100659421,358753489,583292494,927076681,383918582,124227017,529369835,94067324,441550276,579488347,415287462,207499662,726355084,552847240,334800689,588024883,214465087,37157543,382062502,348366584,956755566,980732673,30022964,523256059,212027726,667599087,528778212,888077798,912204336,532519219,486156684,453089731,102096655,99046632,376917599,924811390,611373322,789655606,85810160,42810561,696034138,695310735,274494749,638372687,301449997,556176306,806343198,233811147,916357266,256831956,132554022,894905815,854052764,77086578,454455883,233671780,721499744,199021377,320244860,554321216,485595204,753713606,451520967,653167518,643050140,605991276,173416589,477302344,169074063,299890438,907450535,92280751,479388923,878468964,270783401,331751192,667714910,327931726,105480680,932758563,35523819,841350645,547958667,924416511,417092910,693914562,785840324,386874996,420553234,869521561,422657892,882770215,547464960,423638972,984891177,55039341,273730908,685398882,396727266,5919374,141144565,394757667,908102264,101450397,767785239,84760697,229850027,913806483,335495015,520143730,442721751,941115849,909992566,659501406,77028475,477918762,791793154,858862466,309369506,515377955,155741334,555013423,589121440,109924341,662462767,456498921,211273094,76422367,28479841,564812984,934102348,352703266,621904520,339336269,301085229,867971471,140099026,2252870,2259022,460160755,626175016,99118543,585525776,954625256,329329433,767400690,709591526,128085691,750572921,353119347,25043299,143415128,339877871,20876877,837837278,480857967,798887708,837947312,182715758,2129496,430700920,415966981,97778682,334296997,505386605,527824928,691597717,501332055,102479782,681768336,300661338,186086375,817514593,367391045,725808190,951134370,994571969,551353313,203194786,595769572,530434290,597471911,869853383,704622952,18619637,555110244,861886918,749210389,75364140,215706406,218148084,453240937,288910828,56738907,921049259,12768437,643734537,223749773,318568914,511005627,684468636,941951920,929452334,509329260,427055878,637793272,300640327,625933076,682305326,735917680,210124687,895477319,514880835,36075013,722355037,896050368,763202212,12732131,33539595,59257651,303906727,44248123,441839977,799020691,925508946,804800201,424969401,723091263,384898868,774529712,622485117,360011813,257107492,261498858,52743222,130543099,102556237,380790365,235375073,76952715,352104089,141471269,443220854,739605382,705285016,408511050,339997891,38053017,192887069,93123938,204404459,244885791,216821685,635289414,20488214,748029178,757125108,161081681,115912278,369988517,431847154,353368996,280431817,283921732,163886090,359479176,687990599,799020523,715663948,901045767,969010972,444406134,185769872,940499613,142848702,118900815,644679504,73424613,37352244,713939984,198175299,778092374,370603235,818972923,48201816,112543749,175653592,212884697,245346577,371317399,144046811,780682308,949951033,79074764,864664702,190785843,137556908,19527162,213970899,114252993,985630089,589031443,99333478,341444536,582011768,83772691,365828852,32812781,374091566,672314993,332115415,553781352,209056966,337181070,940382704,325442786,76055393,510220186,368463631,572891916,70737642,329092303,76924074,663713380,793693720,234915454,149092192,472033473,661988693,78671791,972821941,425357776,808058947,360138601,240549761,1104404,381848852,845496906,160185521,86536687,575669390,861607995,563340244,951564932,434071493,230612570,490459733,114495345,970894281,239430861,523104927,26457271,138238768,949151369,671507445,792041708,386837181,139501598,344193640,689046109,211624270,536186458,844416794,541117382,759572807,497369481,75491621,210795926,292089310,144899775,670019883,412907291,213176380,645674042,401734181,50772477,574991658,1363084,80011249,424298921,546257207,245265702,952513499,196767886,100527269,78137050,929869611,873031436,76563479,459687000,460730741,468511483,597444879,415526559,138057069,42819923,60402694,221291605,953812278,550510069,63178407,775543409,125316351,657937197,350150154,661424076,972067038,268099868,533790070,370512971,301905875,775666911,53530818,44293680,853011407,109373724,584134592,47832238,757540088,693199600,299870803,577445090,641026837,960076107,599985369,518374118,765623925,119294651,382956706,137846261,440232092,899606329,398696623,538142699,156199507,20097515,416980604,746849845,56406778,781408097,56363452,846206593,202993048,500126300,164708320,939291835,525581748,852198525,332167832,80248802,121884898,967565095,913355159,340027135,175051856,836925980,197058010,534190396,656341112,294553323,607893326,283421303,136089053,971608294,354945470,6426571,75669956,474631468,376817718,39090001,648629403,887384049,137266775,83724056,548420407,301967525,664334814,707738145,43082282,381924535,177038862,227302539,693343538,778574544,884499837,906955925,369305069,682554853,989255744,395872912,324672156,801957443,891375929,509317231,224884475,62152605,921779793,405951493,271196332,36452990,425542113,758727259,964124705,279800320,407769888,768190039,298299709,296377065,987732640,566867748,901761122,900059153,212353581,701793131,56963393,399018167,854386835,249366934,369464441,6614988,94910828,378915053,136282416,73976588,517440059,99279841,1493968,486800059,528875121,369343714,332061368,438392001,37967950,324692491,350749210,199361455,593484865,786069387,941769543,366230811,346086753,87320173,297290219,509747811,812170172,530999050,351974996,473793934,978264240,552280248,749805802,552073618,571942686,296898208,9164806,561555505,665722548,409063366,32838315,803241504,997752686,677077826,924154707,666425445,130729941,302347506,608224540,407684060,473162490,103003167,95386865,937217971,822866430,121402330,299495660,69372699,449288928,439488622,81986499,848544475,48091598,821636314,921679188,862566905,647355085,737736471,359268897,655820162,128881261,443837451,10827857,595166251,773331409,809959419,89116800,989955641,628644978,809580584,164487896,736614383,34710126,405019345,429949003,17904913,866119367,17020381,32175572,194916716,845662715,799453737,406757058,925425405,548210261,857989575,671075998,190184342,972569258,473481889,28691219,176980805,44517118,667871648,814743645,40708243,76618933,830175887,564878250,31028010,235195005,198033486,896629999,560620772,135534193,28989440,539708789,62175442,744074761,867231646,590762133,122269250,630413149,816964592,506437404,215755967,51119811,763161833,334082278,398593088,945513601,661082785,885461564,683811016,626750815,186637748,140000947,501322764,946325945,429246511,741518682,649863411,945498613,763684538,529250625,237988501,258185593,53789542,97700654,815858979,458773958,147619376,488218725,750074466,772542172,430155042,185835092,682147084,223828033,633884734,827330149,128683565,854601582,711136116,111184635,955344711,536307736,735252493,767745013,408682315,863943677,957420550,65195457,316364407,760057055,46191029,884006414,996908730,170589794,4977591,699488282,974071896,958514991,486617590,757085932,295629227,156237609,660477829,100879238,905734161,102932569,701824857,590182275,759509010,425133302,537313145,453292380,360534751,101686801,800565042,904591017,69980537,489330450,107483718,445101299,131989792,794805371,945586057,85872199,938016387,563963682,692269163,694401673,382780313,320692757,846696576,995686388,101524270,654863681,440195692,287831529,451334859,465712587,446534972,605411786,171346394,836251909,752848595,945666619,292394086,824819066,727100877,202488309,252407446,931742097,338670355,200991935,872653392,519733981,146004896,916435707,782211265,877327568,414693652,964753227,898929917,560636952,259987806,633317444,30305354,974417495,117525021,351051285,981368686,189096642,664443112,380418984,643046969,552696279,92566456,424739073,353957283,430353191,221158041,856485777,166546776,773450769,461537870,149026704,518860304,347017439,903995668,801368129,724193766,380292544,665453536,182745976,510003422,20278377,161760944,1888706,678710684,450311702,656403486,549894563,455787300,135960829,964031173,855291643,424089461,173346634,449052306,757549962,504646849,186669140,667606291,4360909,865310721,311008941,945053167,719524557,568813242,594445497,544520813,126462802,37459840,167800887,376457876,433676448,33542196,895951236,890069266,23068660,167912160,99139540,583917286,45042659,556199578,49992055,550362408,728923627,772676501,333317476,74962687,472463267,88580441,565304516,605346084,421597949,41155968,804576998,614058805,827411800,146486853,426752418,979991993,318832439,645103008,748805400,711164958,448448482,553519651,898594131,566554013,923784271,882958534,565058746,562635566,638438599,54727912,689016068,61230252,245157029,126046388,42767174,173850251,323408637,40830080,976849745,194161478,37279531,77809749,723888998,907529131,413243723,218116641,924778436,412020513,134462641,199284152,441736991,215618636,890481341,299340822,259989011,653569879,963080526,910153043,416176120,317810561,650268638,520719283,733127856,566192953,297899792,810401565,870792259,97421286,769993366,335024118,841207370,287419389,759927398,807508055,484209923,300637378,576369233,886451061,134417919,9167989,615052186,136275669,606074690,782377109,369700382,884129503,125203328,551338214,96909540,404507863,777910686,257435244,327575781,565564006,464605798,172085072,366311173,903752309,6200710,929096492,764122285,444013513,822418244,178674816,598472584,508295318,229461860,832334655,133048605,410406286,773953216,523251433,341299966,299707425,333539760,663406228,926357350,31540700,823567738,963846229,687400060,463766138,299326403,17648878,271949260,806012004,316905952,478890704,94836819,75508015,486329884,216578484,842777501,906807342,812532813,390476818,33854894,63520650,878149147,190586376,287103755,750034054,93337688,63459906,64246161,748437133,964152430,391269326,468634968,525373627,294771103,120638139,926596561,549971261,597366939,460094048,859535536,884238761,814018887,744602419,938623642,825658810,955776403,349304239,329032553,279727246,534120239,477212413,805087393,602332982,172516516,382160962,3183804,409059809,766034394,368574771,86316827,613923173,695328423,571776965,13614077,616999066,852254546,919207710,126625452,37677587,887012491,980437341,568366756,532806236,15084109,701506773,332090359,925643738,922765698,943671299,909767776,176423170,262280261,507902983,870917034,254052486,662641966,173329220,156375208,471115506,266102853,329697317,507976137,100416312,360766398,847494283,370362408,273382250,60933395,343827302,619949215,43284908,78449579,740093573,527397987,312956340,462733455,915870976,673690514,182681814,224611266,912779883,261297991,31276622,680176086,457002999,93377452,731773454,70573587,512282143,457015156,297700151,957023994,842729706,103516777,137695547,54665541,788230318,753314861,546769762,269842999,558800307,810771418,851482111,28815969,126170408,772666245,160944884,111732393,424095182,269499481,434765644,366811614,370224539,103701614,96767359,162355443,403698811,858054182,756925847,752564279,816639970,492966391,87201989,812960447,928249093,406789174,465199017,404898570,902072294,687476016,947380052,172775106,226294376,929017173,785512921,179180069,707346589,52135178,648565826,611823988,774064480,245781834,244230857,739742760,866713415,263766882,516716944,830787918,113865032,321663347,979533530,410400808,36389539,152099734,627667986,569145216,524460152,121865954,87646796,698897108,775628713,559020679,12574906,686026314,997537233,203442902,470887890,735528035,103812113,806440405,867569196,614492620,528605917,139799380,261069842,491743673,218838455,171404452,19054137,60795734,384663944,121129338,799264988,736441331,421192456,668486058,403714280,325063087,929883819,318846714,678001511,416142973,553687510,779338119,833002980,835190067,86339277,198261745,438011718,881981088,524014422,72932785,361133636,784233830,510839171,827304869,703802605,263433137,202432023,660913713,191352107,64821368,116996456,411898987,91975159,785755120,102335015,396153014,737379176,796662773,98170413,121163904,587237172,7791839,546892762,189620352,876502494,787081885,778954253,823818059,83045404,672713056,934414384,947619955,909857533,891990491,893821108,803251391,163923495,633639942,215099721,966032946,139352102,126581662,887656213,269076182,910313939,765850123,419015721,798344334,295395082,870434957,534697513,235016874,706174485,679936073,718071802,567658652,516604190,83215087,377091590,347089411,759124003,189750172,910903587,145667246,98045942,738189945,745376896,277378121,500060588,414791805,466927051,530678597,408572366,16030834,994771163,958744646,51461881,276902804,308363779,791993442,930135588,255361003,973029293,408334124,306864834,369028591,123734979,642600335,281548160,866429357,784571370,741423010,396409176,747726616,759911446,746424213,699765764,135723154,57373320,639188893,927500935,717399550,361042592,47035900,258389204,535417394,803660028,589434613,78455658,842263326,855002705,10359436,750822601,254523813,787278845,148798748,982571106,716311690,257248748,695126225,675423895,250845223,445263900,717341152,172525984,334268216,21664338,980771001,526718013,622051557,870124903,973092298,319775512,462945390,182895227,663959910,642156136,258346508,965309369,508590276,891853672,96292891,777906355,391665549,685503988,15760161,740537346,543439857,138704486,979517785,938753171,62190488,558479374,504796359,552000063,128682379,41689902,395492570,374715103,60178048,95138646,705863463,747556613,404659741,828535516,912450264,370863821,110695953,539022347,55541561,917586438,795194359,40856432,272264162,803602624,417624163,825727723,759492125,934325685,811360931,22008867,535840385,470418824,87365292,617131743,580168169,310659003,506096142,568111405,536089273,358512146,467502918,826362100,684048129,109920290,32851119,225459754,140932170,765497127,135684312,966082317,614625430,613259940,285789627,138321228,187572942,825420976,105984012,9346321,110289394,148436175,183773989,607948737,67230333,363808409,641987054,918574050,214120067,680857344,22004323,459469377,98108274,224277378,389070139,807099636,416867800,998436664,80772768,131225450,833411259,254684279,336747260,884767553,904470021,183884412,316344451,779161632,807248196,766232073,395998430,493790957,267802291,620359303,345699336,225475017,42952342,345506602,133678326,463730320,697333277,262124860,836540601,955422676,53686913,165793629,211022,837636616,403299027,581335435,247040773,928382160,850267665,885437095,272560533,342259080,387150894,762603626,896736886,416608356,139950072,439245217,138562311,944487629,951945626,389944610,471948204,376356257,873249562,595123514,55050650,818306340,582359570,279808542,900462111,542417746,139954085,506691708,987854579,468812874,13451053,379043414,939140674,925481046,335884901,630506791,36300617,805071327,332311720,705595840,337562724,557885472,467525102,51724941,757689999,710765061,524335613,28738981,979716739,135089402,143321691,916965859,102541341,923411871,711977606,428742958,75259421,810199242,972338314,532468306,630461893,488721353,962313743,700711622,852889384,58533163,219360215,705195253,47347956,1125680,177908093,597061005,406207182,273594061,532895000,359457010,315446637,367482194,110265786,106161588,284856015,626973520,634673389,404374274,680164010,254041667,273785611,250287134,802880312,15144614,132457152,59790303,20759372,448887899,348866582,770287364,188302632,204418924,842504115,252471065,986630,988378390,889591185,577895881,775020233,69715554,769201972,125988464,69238506,902917315,4842081,362433937,956534845,211537051,10758950,23003458,658019302,582605242,468355621,918334470,275444879,220316999,605994765,586561281,31004968,409454602,958869404,793764518,424817440,316566383,214205462,761586040,767016738,698961203,705389731,375477477,135979631,73014965,387827827,609419744,168124865,379105181,36796418,109590637,934824089,598102371,83081437,71298265,600021985,779274161,905544521,63136736,75178912,604568126,24338303,470439100,782649093,438946754,564745611,594742915,455279267,187384786,958050378,913296418,707272217,595143552,391829316,290452310,194623117,206111616,19786079,477643046,452801636,702534931,432472689,129317506,185872578,519195708,689185173,401389271,903342470,914992647,944000540,207891744,80647739,384368116,444115436,742459527,282776150,237442239,667094747,996775489,78691954,518722904,539724355,969288135,14738803,754442616,173595224,125115720,19372783,766806693,670723604,709949325,699162543,941827464,985203989,224524753,251734470,151431278,130346229,88729441,715042447,192896695,107424473,596854231,225923858,144172088,531707778,526148257,429075631,224043591,961800746,875727053,639146880,221388444,79396635,831899658,619010036,83867562,251315611,908624075,281593286,477378392,299729152,698705449,494878125,5460622,227855711,607592176,516960547,984561314,953482841,456113351,173449045,22790336,578066564,141700698,797245341,151972554,637637373,620908059,771685418,856054671,363399175,206442157,487242794,527471325,191043037,165249172,439456811,547339022,99977584,991042334,565341406,225356314,195394668,495688813,952813378,148888367,548335414,20973821,112670017,357377643,81768889,486140499,181068436,232876053,232617937,982408197,125783774,923980970,893911333,172179319,157341924,686325789,735846264,802814553,264438170,268657547,109745013,381937874,194206013,638295629,153819838,472684856,872364539,959948904,964073264,208210011,927772492,986490755,376364445,10865278,662574507,980008032,588399912,75126549,79008254,185304641,563813137,309542995,76702509,87354072,428557203,893737361,543199209,389100844,323158571,132938112,700834082,763590957,310939827,137959238,191552884,351334535,446984142,357655966,110071187,775998420,330235287,959703339,777324534,350418237,872127763,68400544,142665372,185157152,25427739,807742198,478989099,246572868,654237413,444906229,793910527,938328478,514309825,176528178,27149717,477233964,19811403,110284936,280531991,174567572,287499380,956852488,462217080,827090939,48743320,830688311,380232408,447726362,154267046,753480193,30537392,140839358,146068068,978167511,867018170,90816873,84268650,904455755,91599397,351247636,779451227,586525489,783953893,100905306,196375390,946297938,958532862,786975487,138206714,55914722,308378915,839362772,143010439,335225858,84367903,70612210,368440326,974183359,477368563,927511727,105802116,99703896,686135412,38168741,990376690,115280933,496391337,22716011,121864867,276399009,431015802,620242883,536512043,21556595,962912978,241657454,645252901,120573404,838595416,337981451,360000642,69356495,383969722,190758419,31146809,84366151,395671415,85595724,940773425,449839692,313266004,224805362,879984061,172236338,115660257,15196020,434911303,312913711,100772921,911842920,900651448,784142480,768498299,184258235,949715249,765725439,470935380,533692465,523044314,155218227,353088662,863825573,326951691,459396542,873970429,32854723,286032182,274480888,198389438,82159253,18580150,891452235,791792173,487869730,533987864,399869435,129262582,55743488,577932724,246756887,452077452,268592678,226513152,665523180,146231262,426001775,101353327,490834818,976097999,651489760,716763914,60821506,24835370,796236072,369057647,612079171,560936445,998599363,874792636,966785890,909180028,242582191,947900709,126501295,684411691,777855883,336361223,46116057,623952010,598783769,650435741,181735757,504100443,386136664,896309192,818289886,305817192,734157251,332860473,191069276,813269467,34002361,832988381,382803252,706228530,440786741,631657484,48645045,971958964,953688866,623808232,329790570,134817083,275466396,936458287,939759324,940218430,859456962,711129190,994779353,889372554,991310536,571023704,883953263,310621295,79359208,202864069,479859894,997122551,469312047,20138498,312803307,38191471,579421222,641622656,29566383,291950133,953235583,595415439,666466831,33325865,762064835,224189715,63201745,813280106,65328387,610056692,135891666,949092279,678381815,572482782,991378514,920551372,27694794,48408515,498587970,286821196,650537304,534200029,463737874,824293355,481410688,498534967,188978353,30864958,203790179,658100066,147027212,125652965,872957754,192695174,222449742,91268014,76660849,96184590,105175095,91758762,89232966,587852534,258257669,472192296,183843207,416790594,55340491,833170242,144373785,981167032,740360089,711765105,152205945,265272616,53784518,658757217,454345834,531561884,428612868,36320438,345224296,476907256,971280988,296364469,776031668,889034423,603310113,562771704,779026318,680509445,971821840,442024376,957752459,555644148,97793211,785507322,439582745,516428113,271372595,851421584,952000905,171535116,67640338,605290081,273334106,251777187,869375897,914945269,502223563,53669209,661221079,707780106,748320809,363600031,80240233,125349362,651226583,234010300,968554443,568479241,275857984,75426862,122391413,890628112,618637372,115471008,543498215,119527392,438140908,112815193,4372097,53347437,548166369,327318153,530577504,856985962,983221483,116801116,276303254,969145164,906792500,563083319,928393751,690572533,450933743,166606916,636740102,779881313,372529950,989017223,682017759,197746405,366626926,561140617,135150873,590507632,932816815,14565183,569852079,519804711,394301781,42982272,287013621,589656985,875399637,224212040,290934373,61226439,974050516,392159909,197256498,368189496,260472265,978663847,619002734,961142848,348832180,985071528,145736373,52842009,643372561,582470082,344205148,527955996,101479015,41746543,992952788,462087079,996669201,646814607,450878735,596592529,122465638,783622618,621112253,115628104,36327040,101679041,670142722,329978717,149520065,220844043,667067263,180346832,989779507,815844487,215206914,620142050,989295459,270384339,67167099,94013149,678514698,451342294,590672632,411004521,445575695,308207354,103420692,670278599,466179809,63705607,46259221,675604289,928222112,100803154,419968951,432390346,99883774,561861311,510436696,505358485,262233510,722158926,894980085,747803585,53529429,459422266,99292275,796429362,115693961,788680570,878249284,873588935,856514584,857727447,914963065,446815866,31429950,548149644,839199656,903508543,204192842,983206166,6851944,782463026,813707401,597403089,860645676,215008918,587390572,83996923,632507360,300125448,562296311,586052177,64428628,520192708,472916419,469276586,571629118,321728126,68274183,166399692,655915050,930685299,904419192,477085056,457576872,355547797,392318225,710589863,520245052,145640605,236247811,712674752,408257545,167285228,299711651,50061073,710347934,749111643,415740118,579859535,211393237,741160699,75694071,318405782,64213397,636246094,67023445,974587665,830088564,37702814,749476189,100213799,666140545,991888004,893615214,283253158,812064754,906722371,531908863,610816558,22057646,1163969,235474160,949329346,367799590,149773064,178030942,514300501,19819710,42879263,57730074,192702430,137379912,192239037,939068349,857398418,472918534,297801969,166290404,966595281,581859,627843134,572395427,316181607,189726171,507518780,63089576,637065861,605440463,860342155,763203834,247014507,486929498,911377816,319078039,477934914,63259818,996334439,462920614,766484995,706396259,905302975,298440408,159116442,652900179,799355930,910398456,245865117,496484591,442552342,34321011,746087990,343833097,71850849,149883038,85901735,641449361,471502387,325960879,193709856,96340940,146992389,333361382,19912251,805237272,973865688,787744429,176913026,52839112,594682682,442943236,368646950,151945633,185176126,344323757,373933812,168427162,164843566,64887710,439027872,135117259,464030643,449894644,882339199,100335058,349635489,601384009,48491412,98859271,168403497,121610980,97266072,308795315,247862984,862380555,455832860,901687749,666879142,520585901,638860229,53117450,977742154,367515434,668930466,637450017,974004483,618483278,27601866,841072688,171302662,101248185,871196871,662305651,963333956,874583759,751157445,439795980,12322886,952314890,360735139,529145692,621863217,999661817,197082769,950314909,106792824,363642654,3626416,819631596,588122114,494121435,379695096,361563235,207548213,749373163,870644533,762074051,586104449,149985554,808888147,57096050,835605788,276406114,550429537,857160730,773063612,397041112,631256733,755673929,186414923,689948466,699657909,323004169,39892414,42861390,402833494,554078314,698108584,53302658,357092207,579413331,154493550,265365627,824041817,341757394,190743811,785630153,2014646,647900617,169074560,515264939,403765069,824168741,534506837,532314058,185499404,689711231,652911489,989443100,249797910,22943485,211579582,578093820,806813712,906310426,257821611,733300078,958739391,963141096,928153033,939792401,348659922,591920038,48804340,501746382,476139083,945499259,774541860,472151484,497915923,876629149,413783754,911504492,655142993,632603760,772836601,83655951,196758250,938575017,8418435,902199990,686179041,623957697,694365178,769408848,455469749,93848466,58171164,370672541,836315218,669399311,74876991,618127751,140205449,643420584,389592643,998889776,460796633,575958327,68299791,158319839,942274018,255007548,327478402,76398800,425367850,977372665,599964752,171864199,949065956,590476223,404925752,4415099,983103473,73869271,68268309,422180443,93714391,745234864,830708522,719918685,543450175,312119112,276344341,659694373,818236128,756811555,979142282,277146613,111094348,999417593,741882364,319815844,786300245,881337724,93908840,72876982,216231193,655330027,835621973,548427409,419650139,723589425,167573014,48585081,318649085,503934555,100045764,575417103,709366258,282468640,511572610,269312260,583109591,509607,122513908,240391439,635153844,682425449,961846363,287906903,570662030,454770708,436989683,91529441,737023635,470557549,625937789,407011648,909352241,989482435,910901255,106473322,643244903,584405723,664268730,390042935,331517901,41760367,225292756,274659009,44585438,461620819,395666900,364217188,862863344,980132995,895674475,533514433,32849206,986286541,91623394,168608059,264717220,309178534,600678845,81701946,715534567,874022947,915524749,504125688,17450801,30814993,949985580,659706193,223916290,969736486,107723119,966725190,36478775,504405539,425939264,991193175,746021024,11314113,177736255,856463386,144726308,902043661,560746254,97026520,223107076,254178670,635932807,96576130,804863425,133070100,771672751,643160402,104659641,811436550,85915978,319304971,144497391,349602936,54265738,156687169,626298161,375837980,752502611,573164472,356619040,69346503,570539247,331619052,594321577,609281020,777052822,871700525,330262419,268227216,526644259,529951726,76953351,8288272,862034096,75347388,934155542,99251177,667221767,629611913,235493022,911837911,816465185,57343612,139886537,371412472,741938722,119541103,230108176,603044363,391278748,419969100,434894589,386506582,671070077,90670095,326380942,604236334,742877453,71428913,62382118,484237490,763955947,795854394,396646442,440488984,715201457,717894118,876290958,172258558,134606728,827975783,887930899,590756490,27427349,55449116,72873461,157053746,344906859,791215960,747897496,691429381,819592550,931875992,441559973,742465826,388643443,432575974,865228501,76621048,865722692,999576019,109580852,331894085,921833914,108541718,485511632,703624071,410295846,272293205,144244678,958749330,923164447,848489732,275509644,308822354,702307457,111305887,52764850,701066317,726302377,459979269,723423461,673183360,41857702,713718454,769887883,709654984,840119228,178885971,59408797,51238971,618400306,426070040,248683182,408041390,829335437,117315560,332628974,595232877,100136013,151769821,732292558,205219927,65554585,909777762,551279294,106641100,108584680,207573966,975182412,88583158,403947713,746382802,796749665,56575541,677345613,129883522,901947480,737210765,468167812,909312254,317420926,337102712,416398376,551278437,92237501,545464751,18381014,839540777,987256827,12329598,65123474,106546126,866861731,609030247,857278305,601662990,442357785,118906581,303115157,418211593,961245498,133608505,437732420,482786896,6142706,954223264,222522252,162459937,805424400,971442337,506168396,989505805,510702267,28348057,290381521,4872394,285947372,996562865,800087680,324018824,913329823,914204983,945138643,801614620,572000709,124607122,475343629,461205763,216776718,27012692,321738436,94070706,498391550,280557550,249632616,539814521,337224450,521986717,560054624,417240767,31463514,319281214,390708423,778956482,654259440,815114018,616094891,333665781,840978950,743331743,57208580,17887360,778127518,961268443,312223698,34121243,683554508,256083084,431164200,966884422,417723705,558267892,452407101,514036127,871453186,675224562,195622786,827679323,554800042,943289198,137268632,469439724,811500768,224765679,213031880,571567611,642485046,698391006,859506987,404415718,229229671,77417779,933005218,886087110,814449472,184488504,524879038,926653437,505886193,334465856,48432524,109128655,174270047,936469068,120955591,26582806,100621866,82071673,487085315,28205419,247569724,228527029,945994145,147651205,230190150,980781381,701174673,399958022,263639222,518618971,585901002,25619119,876782211,838813141,849801879,499422734,431797862,672401999,794425257,792439578,631387330,10155483,824973246,963899068,427981486,162101399,74443528,336892542,31554833,61101069,14440573,623015456,683484798,438972183,199152236,17603357,654361460,382280511,510455131,22216952,885641333,557704952,373987687,73904287,302277152,573268509,105168899,780601168,379209631,437782499,531486071,301907424,447195885,975958342,244736786,652956875,397740533,501523598,233797111,680454214,836533001,827689476,725441513,23823550,408920017,771055319,210420435,423663014,595986493,674236821,420023906,563040453,207944889,766834332,928230855,100263108,494876908,985006503,52861198,527408575,136403787,173396760,937014919,912160182,937906588,659034114,458681350,738640367,518663440,540312907,478168433,486024935,386267935,162118664,719121452,29257026,742059397,354747250,615405256,627872218,706705146,8820912,662653497,160109315,953226092,642921624,593506511,795368640,822513552,426011303,54469001,425444763,122565809,526734390,897299796,287502138,3206194,992389961,740071925,956538629,482156161,142797796,56302251,817601386,826120996,926780495,493866352,180460987,553877523,470897894,903665263,897723657,968883024,441467745,192389830,532984075,502035466,39806577,954704000,505296194,362792320,537426985,12096191,82714250,756480141,58539547,119634681,448368553,3131526,884928532,315076780,948251605,581559426,864173863,531189358,402997905,815345275,414885418,99818517,465086912,22738551,500694647,126981761,169669165,564351517,768161067,604345883,791088918,553164827,377518104,73059268,132428348,723165122,271742012,617762162,438202067,140714506,402185573,47383233,801047641,425697822,80761128,142613392,311529292,307679258,24667230,117790739,876511486,583705360,630686024,108207423,309466508,791185500,235956276,462318370,381988322,42085549,248175689,675562549,433719354,961684760,73833998,475434998,996844546,91849306,818027396,189115056,973927210,674261036,34026833,658332129,752342759,241036977,954314197,750833183,432375487,643127139,752629822,770737524,164207164,313318953,321740627,130894843,926371773,273948061,40122059,21580455,925454489,682519980,403145233,144003324,842774877,862705774,479337652,16757267,112007290,103826836,699384797,382283148,554775190,880106703,878975363,398918228,174712062,775480585,423938452,930305665,611856426,319249946,12670794,943110861,80420898,659797301,400663377,588143894,860177895,149969661,541774496,66269570,41628775,722636150,118727843,32506394,312591129,974104541,507179506,596340977,189598468,508698106,556668835,494343513,610171326,915061657,310873032,808314251,356065635,505686903,132482473,839865419,1063980,495421262,544029593,312979203,54013318,209231523,123476922,600403630,751130735,345386079,48510490,64998148,502180760,334279188,206070742,332816761,603885339,286155429,991388148,727964941,692426428,397092303,698645292,483819426,180005240,336588635,573262247,206944887,139669894,818239443,458021691,389169789,334433539,859785774,2042955,123689980,679280720,440972166,246106743,55504057,641761779,72839350,145276660,123401628,127915950,45219581,589265407,736599132,571365147,534639892,414064374,125896116,103102826,977377100,467482375,126590830,603269280,669470051,909299102,889353840,676784338,286469185,29255721,74631331,784287425,57105267,636010838,408043147,858865336,357605596,618007666,269420501,254832431,679254277,996544665,701221702,42890778,458284101,150022296,278927294,121712504,656096293,829352753,408345572,853776439,727859597,69393467,5358126,652689086,398999526,541087548,258152769,856621643,509584413,420445055,198840755,224993131,533828928,23599377,936211700,297360331,540636548,475151779,531750107,90088113,134944056,262017960,394377370,958901526,186155325,976357243,506614952,697816487,793500742,493522924,57938954,762886365,146742543,429166954,758909252,875397409,186766044,148788172,11841696,100384079,380552858,538562218,764604399,163990345,964209314,554340136,10605066,791180139,145853949,88479616,811200966,273939337,40981438,18734935,138418661,116119235,700831169,714632166,94259938,969803636,88829522,456641589,816115592,269679933,113117339,78562487,844759751,655723318,648707800,57518781,350511117,492699698,106881454,60268486,113141396,44414977,98671508,100616628,432510116,112858164,17575556,187110053,635580141,404748187,167563791,893574120,947091369,615847219,820514840,45913424,720287895,513333126,148038683,93060533,138756624,62822573,882987243,254592331,938860871,517799319,49416789,264779912,569864400,81388827,540889406,222947469,512126046,187997946,733033685,130944603,201161602,576763014,707772318,617427893,469615347,822734304,48244295,240531146,835725746,145056573,571883066,649369937,241615683,736186282,429551207,420093413,731244602,772092611,464317903,628401101,212728561,916136119,834981621,877954649,216625784,637748601,342833408,95441933,715262200,945823141,568554271,182382125,837210606,685799898,694152237,485476755,910424910,483456073,161077241,395794267,2885641,254328053,792107819,497964758,342893925,112551152,300075813,875564513,847799325,202236008,306951833,683737137,385066462,443798423,502367908,184708330,279032395,386156295,433268831,979679287,505633638,384741265,66158316,319266444,496974102,872807709,611351084,415901540,790890373,718207728,704683287,239691404,961588903,255743977,174243792,140696214,301773351,695819690,238566846,241011773,530710569,152947192,838509063,34130227,41570018,528085829,781593530,84990011,350489622,131433233,385157915,626343925,790488459,405690071,965422650,619525465,9264530,90133126,684456125,377174474,947142221,116011714,41209369,554603958,149694126,998803623,805801740,77966198,205843694,811788319,762668042,979376598,713306909,295502009,165568330,715599445,964427493,719285873,852218548,668694393,757716978,164201114,4615181,50914353,812017943,119969894,639842503,382327392,298384098,360197919,883002318,507957856,793167545,128910464,373125781,265730605,161271053,358225257,295231858,67591414,576002991,818967639,166415050,707015534,576039665,435347557,202583748,856450719,577326970,803267644,437087666,383824653,47551030,912201682,280892019,576085805,63338890,532318965,60949931,828769276,546287290,957892105,755190823,656786969,345620981,701541110,116213740,934671635,976270218,398490846,227132307,334243030,598363236,24988551,223265492,562171313,278189369,456825264,608174023,706128488,699843072,287555063,892716669,213792872,476658273,81591001,998365599,33866960,704787421,635366473,315618827,113995877,166270193,419887582,212305210,36305381,885139875,719634934,69414412,357380741,779331906,728581089,310607629,997158393,71708541,260101198,37108072,905108474,531450817,502372024,253885942,11020605,539714593,12239623,700397296,12463243,602284851,511062446,284920500,917794337,787364136,434800938,959997872,432573371,821479880,232955175,207916322,286708763,553854451,437631859,940141816,926310533,37665959,691580695,8221879,184640454,138240463,977639234,578201219,257363636,271543772,226404707,635866643,132041429,662668430,411088246,498236701,618472632,641653122,394124798,215912638,389322014,99900536,282053754,774013127,175670541,852251609,869845551,572990528,728109526,767961454,544417486,389845913,167652794,241963894,500622687,917550041,183469980,940920415,772816975,753801769,140297930,843243682,151976821,709352842,56985928,132268981,985146178,45873854,848213483,927559995,917042392,241347825,883769239,158192152,150743678,665776333,106006439,824750419,720834395,901402616,169616105,27077166,612374376,434501008,7020234,463429409,727867972,210152092,208589507,70532245,817447149,381343384,940030818,853745725,566154468,651082397,312664914,859703967,774596353,595036757,98914467,889061247,54141081,209060617,398543427,317882596,860960883,217725673,796230201,270383750,57267776,219815954,567844616,140112422,20378020,481955776,69894395,627499012,876682845,523273848,718028871,200622404,104396816,896125491,878310826,114946751,760718913,432620200,461051236,767125076,726819391,559498979,461428418,663972009,52525451,972454618,694211056,119542619,48566166,793723258,731360620,929028559,622372354,966792788,818093292,149145481,574683118,465203667,483051120,151988180,900263555,352770701,962305987,570356530,408178080,186222042,743164793,398763577,515954930,115541924,587899780,259342613,526976928,471647246,406101023,429841973,12030281,122448527,496038041,172816011,913784711,117056658,862187510,358809192,372009168,33190159,274232671,528595035,104389253,561992728,571678568,152834276,88213498,633523034,190689190,660593584,898889876,94689287,157464182,800653770,455380288,92266155,820031107,505747481,357638341,20869234,709381377,891078742,602441194,991235600,311574352,65002678,223811401,354350710,393208417,639661278,276941042,744008423,545267458,997444857,798363117,611080963,170945187,535616801,7609830,635351146,58017938,942886806,816717229,998479826,806196502,63258769,771682474,806574863,979921155,275741820,916037092,525139901,16010584,92902922,198798685,872427710,667158832,926368437,217879909,448012428,667211014,803391311,13570219,441404151,271049119,502706324,577498748,188351774,237369940,599449101,888231008,132699737,634927682,383309431,978149464,563702241,238692501,205411711,348406048,265521945,156311149,748980962,721373267,220806085,236128579,63247597,145441161,31676150,952592241,520184680,130968401,808156010,991476442,64438552,686985376,291128160,816215832,806929966,712707757,962972580,36366846,770698483,655528724,673133736,207827134,935209694,429493243,593376112,751236294,972032545,42881086,88369235,749006077,143481072,448198679,295542855,59088474,962537604,375197577,933689047,848804300,120003079,404604220,249899138,369777412,31289066,889322394,148271416,709636770,533996530,545518897,928412836,218355550,999659774,162746068,526482245,747444653,315926599,198774009,103193109,347279834,664596070,803700443,121205871,292576541,389351535,448576336,554878182,109104531,916301626,469174123,642512055,152331269,224109437,713969399,692553204,173311466,650962308,87307669,648661982,434939302,783492904,942997771,327200915,353137016,676511251,139146917,618499592,94769842,949825576,472507681,835046539,821547828,581978633,319851324,589634027,489544531,558059438,36866595,580045338,393722033,682070802,89240106,707854514,644390996,519437951,672617402,326757606,699398663,615329010,346405696,212365655,111742271,151641219,363857322,464067845,720643589,49031243,581864300,545740240,353557343,151012552,889774357,154478969,20302760,926071094,308381980,97897649,186291719,766742485,739063395,186044095,899893211,925355103,159623125,371765350,23286905,126945737,564213797,600984674,926802655,866309472,917147822,13309835,946054713,165617581,188855933,913814243,820422404,639825219,91835204,226510013,612766007,219687215,758633312,739662545,873044979,304180680,353608900,810509629,539540260,22687117,197769900,407002322,752610159,440261483,393580866,456960680,529605666,555690225,79230772,191723864,77511748,10353485,64846988,109118287,792993649,560745461,290719991,398570390,564028315,424050925,318650660,884910649,14517199,324911482,529342231,777610543,507899137,13298734,173523050,119108724,405565264,222296470,662709157,95586935,797805745,626242925,447486528,418344302,251223436,359438850,217252939,647945873,136713574,85019575,285845279,280685814,612387086,293612909,982224404,331742117,515191385,960521569,851435684,396001027,330417314,724063834,698514136,426964181,244125440,115482888,181638884,23439579,397970361,423780569,69744662,819946619,233241312,722053587,917526090,928409170,949719666,839961958,476111306,478651220,217312878,655340646,659590437,425888845,350822464,430541433,30436266,27171832,848920769,77497562,564907961,382897140,491225568,893960886,797995168,662391639,54029203,476210718,1985057,150598294,15286023,361634568,406441944,717250279,999728542,525551266,339887551,183568637,451564967,38170449,226104468,239222133,309980725,843696031,164671876,681282596,726763746,978778533,399046689,979251020,104706179,446117069,24167006,93439137,414008180,181443558,888079144,934826558,639598854,582285943,189843200,326941536,643226526,68522062,392039820,326404322,997183994,501984548,184027751,577959377,694713858,187222667,587821414,89728898,333047070,972699986,168638669,779179490,107387602,770141912,684153093,726566591,605656673,992194909,609316608,582201760,922463166,946961847,379433190,47654965,511553580,96958697,230689562,784464277,881973184,36666825,79004733,126127194,253389969,265136982,128688949,359133314,524560328,658040339,936174101,812917585,207867459,465468322,990645480,130845747,894193879,625962647,31821476,100119029,220824802,343683776,355191380,844468647,58105684,270150181,633662309,591021890,193037855,332416946,326645575,756955871,257177647,293110296,124742301,38286944,391057355,993984243,410860666,968266935,824278157,225977902,259511018,855371047,965653911,211361798,212765426,181221105,444278867,987255628,346683074,372268985,897945762,52329396,179346949,10110033,268116518,813626620,594221891,81342065,754960472,287266428,336595518,481923406,171346736,49021325,415172474,422379993,152583947,382922711,920997365,933564557,903984517,968458341,893755152,487707477,101968987,686771359,634606666,430444460,400611055,708768040,172658371,618834300,484777679,105494235,367598870,716734249,916746920,717800862,308937366,842335563,714584895,92754819,443072367,36962951,613543474,756178271,72956329,756837644,624641527,450077753,812368515,569582557,639420820,530530730,70855344,952804748,796822535,488323053,710536584,624784899,712247310,459669370,957401909,751896170,325150242,247214257,696644101,209540641,669350785,259300509,612313578,205647600,811003755,254381354,540454079,703362590,310551973,61748001,357029884,324929248,827935393,563601238,688618727,825571006,480054575,181180246,112066723,748212198,331153532,567282947,290076127,521587799,297890739,865269216,967939475,763108878,591551240,145383648,774065297,52491731,405722578,718789221,94922972,583019261,984322013,79034581,189309021,86413318,88163763,4648311,814751685,175836523,139922367,973607282,739682081,846881462,15119518,710668680,51943793,579441778,987107348,795003339,770845517,979245515,657678575,505478916,138833680,210419118,401528195,90754491,390319445,329349108,305099837,414990001,857544998,789004947,887602582,515183612,829880758,47096088,708442429,142565235,295133171,763464074,118879471,640455965,748343569,391622282,105799166,636080402,222700226,651680239,623177173,461000192,56712215,265415393,305953910,884493030,585529254,13080002,230735129,757330268,107217085,51746340,762837923,539599271,221506416,269173461,43293376,782297746,976308666,690181313,318150144,708167756,821103418,555230704,945995913,531871050,122777114,369127387,636715704,369824127,816428071,433568614,368659805,367999618,9654944,2348861,261074690,573224009,564278821,546359395,22277193,750628173,488761133,276391134,91639255,228162464,113717484,136791405,684115054,294266540,82898739,709703117,649090559,841076931,242614763,347854666,942884328,775069483,104481726,968702792,914297237,348167974,559179521,741770175,788760390,279321799,162223451,332792914,996067388,62540329,434279629,788292097,791634514,133062211,284577259,443910144,439600530,22362030,821978563,231407190,167757613,3656827,769222782,475742134,716428357,70587370,950954446,118072948,970125786,208237278,238565314,215263449,570325795,39098582,585828848,605905419,84923059,372711005,737041314,767688502,458901938,151095589,930872147,542784812,866781406,613513041,37669418,188189617,452459466,246651035,820506535,260836358,655523957,593014767,120561820,998408197,602327899,87086535,227030138,410067225,724827352,646059280,433978306,811902308,323976096,988178905,477309015,281193560,201634451,141022991,498947096,673179515,184256209,915664267,701521067,779351039,50149420,840690894,989920423,829714630,47961370,780377965,129825526,927208708,455412724,282912938,181933086,525641652,859005053,558345568,757907633,73572405,728313810,906395348,685105665,556575019,65061648,7898769,196581625,910500867,612581725,624448357,350953210,480505808,115580914,681678219,140569988,327776616,646030557,158252267,161096483,364689492,417963506,293636005,222915229,324773435,356669949,924974066,405006629,570736260,347849249,851840809,762485961,859603456,25770201,914028669,129312892,901303658,8417715,328572459,929840554,384670437,23235767,267469371,467423804,289671680,959476589,468326000,627515745,364935798,262661154,467120693,490252397,924766487,4172248,841968941,202241304,395961705,24037529,857781423,467632628,504409354,490057969,597477316,960695218,622470780,119049854,563620821,17750208,620497501,520909475,782201153,352870115,485673438,921108797,13423603,710669842,716968458,558130289,287197127,526358680,818171345,460982252,400689566,28302417,523310041,326324622,657666094,295710749,733399285,833132862,663611772,85968064,756240864,124956880,497232550,921575951,67924871,737963849,240348718,917141997,915409060,500202890,304472803,968352867,121053634,881412929,564900697,260811092,437899717,354085350,435291613,616838009,85831772,51538376,562554269,272079920,854530977,878982950,319411515,433193683,716666851,931472381,893499415,839008081,624169743,756233584,209623342,59306492,917755992,142899721,828893501,486653218,562907150,907983593,254430547,367240830,141606910,368434072,869072381,108719151,881670907,398748227,257967480,37436714,572100783,806550840,576166594,421159613,116493757,198466413,582899500,118982533,18113930,84100792,230749996,652694868,496177600,577921899,64821112,674220355,497784913,467722657,224548179,645455252,19497945,722920780,814558381,867438420,918529104,251691223,779084018,650273345,392808410,359194570,199584851,846112721,127275060,804178164,353306708,233557401,946615538,1468768,501737168,675784454,661287973,39088986,631570298,937815012,119916282,93290688,66509484,926379726,200592710,605329758,147206867,997630903,777754592,781447033,917782226,583814559,318509970,667817466,51590418,82719094,630871827,729009728,865270939,642392867,296622200,812749291,526833848,421406755,182263479,990610931,904685773,662544629,477848486,403643000,127060127,900809371,143387047,429446995,23107398,818981726,48670190,956097470,303026367,280423132,137952937,440157046,431286785,879686870,619798142,297179575,797637750,97718254,111662179,598513553,403882723,8600941,113084547,88953834,398469726,226673536,859108352,501513283,853411484,243533275,107405390,714599759,549595489,517196454,299977900,584445791,983186537,676947341,878576959,145393141,933614148,382955385,322665636,645135577,148708936,827605891,113606996,72798167,246092557,24101377,344917603,764768946,575026705,590398013,90450282,926951145,67013608,16278628,657456205,856052198,321835464,724820302,173064861,8260789,45622246,121426543,706443551,907161041,314700965,74379841,852462289,115777017,244140537,576239589,500502931,259316018,79994763,940197297,711296053,858783569,130831274,650946168,170547758,298478539,7005581,778682929,351621463,619910675,395543128,76959762,677564440,867246686,636517991,134807608,702177227,862992502,3407854,86722287,547564943,749548184,310233764,801555210,573496839,854765337,522904176,740381086,857640262,242623348,492142761,483859530,499528099,55183770,553665464,408810997,86239826,674272435,225609826,515708627,63873275,569288003,983819036,569939799,994114751,456824975,396295378,982607277,324237687,89771548,695360551,318773683,805074563,386699172,967467982,635682037,969830612,542215154,236979057,117824392,294633810,960638335,459416777,7038652,772980735,4127373,649281307,106516342,11776974,367106494,238326827,501979734,457623922,939295725,383939556,476737035,257860288,235860770,4632675,137914589,234115719,592847929,818504270,614001786,869093467,817616622,727687379,322409188,629981335,1917635,810415318,308960352,874156196,7557045,102698720,273513430,325213430,309214973,858604049,615627350,65638782,177393094,738428822,465215341,33761107,73199697,345134904,121979559,56543806,143975468,374599085,612252238,174706220,677294091,618458337,401397057,827180350,403990350,670004283,150718091,235735624,694282431,526163666,688054694,83286610,224673582,605619826,372907380,97053714,34661703,29647493,69208747,402757802,74901448,236197972,22514326,27112366,996959354,21427362,938377594,192318790,339014795,547544074,605824323,869426234,967980650,662158525,431049499,979566940,764901256,651277228,85200815,391483734,924706577,997264878,68423358,526100270,977063191,841086175,43473602,516388834,965715511,99189351,628112185,799368290,118132976,979016382,101607538,261370379,40880316,466661128,356278030,573420952,372311106,812894831,825440981,442208047,897227309,862191707,783853240,202208913,206071237,341136226,842696539,339057586,59710989,126202483,518772192,13602702,780324510,24385919,477742634,126577152,811856643,910989510,235270038,666134539,890945162,859350850,75188453,410418644,188675544,384005036,577259395,460513197,314238191,738988164,276141747,195159240,626796289,950919266,319781266,205147799,207804358,552413462,634228431,161394687,288658248,313615563,11897603,40013028,129558663,737009561,234015831,61513960,718470091,819250934,632786821,702059181,26477027,56235016,835066388,948128549,660840881,760243261,28271624,5772090,374752515,43466601,984680183,803830477,952182240,278770236,629522345,523102224,128511597,111819053,87611224,101038504,642055598,716087989,792473335,405762651,392296132,339272812,382047077,882097187,327806668,944093099,409025788,401264869,960001703,703982410,344953547,221396107,562693745,468769405,637372639,466491015,644672486,955473087,900944590,61507711,613443148,862977767,110261778,477272641,462834320,463625384,874136150,463622501,825681569,983781847,944904276,364597167,13740878,955164895,809107518,596580800,925336335,51210771,705969397,173484282,260513526,879158896,129052290,609311716,145476847,192977243,461194709,823970718,146796501,897565551,104574060,934603174,180151260,643263128,890713298,109896249,190320523,113879678,360797247,218489779,108162930,561672657,841717634,66470427,62927305,495734320,717649527,60417315,260005330,573338243,336726012,734673839,779725470,693738874,773514333,382374371,294981573,8535066,714933560,510316533,633262591,315412405,146650039,228957295,942045288,351204663,411709085,195259539,165037935,36680199,156297904,526372247,253213336,236928376,620533894,132566626,899719821,951651598,743183308,916966604,115062556,914074970,552988730,919844541,885404412,77762421,75930949,4647034,793289146,232196246,337498501,625973158,1458431,682508278,999448297,903419423,60858071,432361903,414820851,162124595,464298700,660161349,76767172,735671604,14787580,574237655,213736545,322948962,112028365,310550714,40587988,55493148,665435638,29417937,91985505,398113851,333428283,144317358,825777021,440559964,115183739,448808935,169202281,307366717,7220162,528652011,914501238,481845487,216267172,260029080,972504493,384976534,79862174,652236199,22757236,228776286,47310672,374493492,630529265,621042557,884709657,931411949,232323860,334823352,761900502,609728631,64621380,50765434,456619957,98041499,663516444,985779084,945706761,967060680,232608264,819834086,489382828,987800764,918849238,337216067,174072214,551952062,321929572,159009811,801215187,94159797,434217496,537001344,300798845,349682877,604855547,412572109,22223447,433276307,750823350,474133678,600395776,619128557,135387784,70282093,701088357,742223588,966821740,157205909,754826753,187334842,118641570,937021152,809896791,976990229,407792419,939847134,61536031,734912319,492891536,976597651,252184914,132108998,5322035,839086227,144590987,775187261,936492925,521920190,234913913,123192605,116855105,976674955,403949595,985034998,531776663,890919874,79830365,679148827,371730162,431882189,942202241,48651509,642125903,897704124,286086824,45365335,98490660,770114430,222263119,895157478,434280442,801956188,663261722,645128655,32370882,744051083,469275500,553376716,643769233,806885445,111926957,546648683,382351893,710172405,946479387,67683980,191297528,354533537,525519581,600336334,974591932,108825455,166333519,691229086,393696710,463488563,929090672,873326967,103090771,213242224,604830503,346162670,215773545,199069610,130896891,399266018,725051298,907930986,370264698,778653927,864184849,922852482,254766340,568462840,206377,321094592,803381411,201685988,800183928,941658960,300640908,990203012,136737012,331458394,248647640,17708418,272638040,290414160,907941136,540855748,11762532,710336956,564604397,368842864,504210006,80078358,197694815,499553796,487073249,825412157,105246726,941155910,790319215,501668388,312777572,605663326,311033302,561509916,254013294,796920600,136501508,106783469,560918238,692594314,71268658,309438558,675934919,42669581,681088347,964009519,491352865,885957918,436098106,139180331,594131534,917217035,822067657,374304979,964179990,61491668,550829869,143089713,313078907,375233377,180874578,269671941,978795795,689169123,131636921,513574837,915508166,225415207,392230741,594751344,242440401,919341248,223514971,667218994,937511171,455711536,10078928,331291939,391500680,62034352,81785269,968460581,138424254,564625855,729487470,511767567,605492334,732138052,755921232,254890572,863451486,127617354,676188972,17571058,904490745,532192680,292983005,132846111,947551853,912750866,921092919,392056988,821968320,59253089,581738262,574903221,869507494,186233823,148189482,332572032,785692330,47023485,842708877,753443774,565926906,121415157,308057627,734442650,41615594,501103083,401631025,671534654,456364793,104467445,290208516,392144653,940848906,925470281,154957546,621295458,840249470,13358196,965879462,500208739,402776946,603676078,271094518,118243670,898988215,747472860,790001648,813792182,874833709,657099801,160937464,194045875,94339910,727935884,204065429,196280944,358944016,490512489,1165437,846103992,626061688,696403563,461785769,20497903,703850779,73093555,708689957,800779615,215952134,53131286,417305228,114859541,442464090,551069647,878071265,29107249,372241005,634707324,974719819,110738617,108592548,901337933,229972571,471414775,949642,721226143,43060311,598615094,755977241,196233835,360161631,627614971,678122111,502604948,228177385,364494731,439582673,515218009,407991137,984733266,903017880,547554389,572167106,773757854,534769593,446465434,229665198,747847705,647570622,272320958,610689349,31539630,451079179,670487543,37439392,824131351,53576754,107329894,7264978,843401014,294267029,91117362,253662823,556026866,442188765,218649666,500416445,953229463,699578021,334831622,107915814,57866408,336584321,293735427,539395714,95291211,329561193,574645138,826873807,901394512,387917246,757779808,427206346,812203879,97512599,950185888,878799102,376961826,520650932,731836246,125918731,483193131,391283410,498323334,927029816,596258527,158366387,724606254,870527419,148244122,457927934,960879537,218331497,240895934,731288143,710907620,772841079,951896275,560502353,499771129,637800264,63649802,315366008,366855660,317527083,180821186,372312597,837954068,89242428,746880368,569406839,626590619,641707223,510421727,608279571,125568655,41916740,912991542,878188579,60341422,545998170,393619559,314295353,345204829,504230456,423781508,85526435,776233202,188270489,18696592,493987860,75162296,325303014,667369614,174014217,931701552,450209118,79757845,253283765,420628579,781339907,117315544,332360062,370596187,907538609,572540469,606418854,124290516,596597528,206483831,833152643,203092461,816455522,540432502,340717951,48178133,714503568,725891930,211068903,939551524,388186055,980685377,442140514,762200178,558437291,152012447,160635377,411836960,403992439,705114106,830993974,75059508,952250167,420419325,559375223,528944973,543346278,713405880,604402537,388767627,17747746,933623736,544100901,718474181,95012986,302905981,50074208,931107879,209765242,149252498,225834190,991627081,803249647,927590665,78008013,115649821,46819590,710812906,973961459,249883979,115000099,71381593,414558525,841157385,240300072,99548675,224819712,121164511,390417599,979023386,219323766,885575488,451048037,147083949,286253146,693255542,447109419,315702858,378821247,707168621,1489227,845591581,958409668,509432507,14844560,384416868,263490300,163170564,864030507,476310135,672886576,348776308,46030824,545946048,665088752,287250807,74053371,14953362,651525591,964470462,648487278,646172821,401799668,358433908,300040499,282042115,578396454,243710987,799243680,378317775,835249305,727447274,581931747,886343391,826796945,402553456,142446942,454466367,764381437,504613883,425588156,385088313,811048180,1032329,756441483,201793119,453250998,458006055,919354115,232749218,41364317,11331347,112883024,996924067,635380175,545908341,824325781,819373048,183168103,162240970,272729678,37595448,299480896,466729082,705402330,232723801,821202220,68312271,368071199,65233164,157127378,227934814,937076297,589235159,228220996,97464808,353983973,878932021,817952881,84225098,965455869,823332129,505954482,334715432,302594131,251262199,803907169,93661037,55535608,379060858,84838335,96238384,9290853,971017296,159460319,782968555,720198716,954963898,578434586,91616933,60018032,553233381,382221535,873750568,632618190,222383033,970089851,604277733,645691868,908357185,297961772,59120847,945104124,575958856,77190694,263871270,330703835,451676409,118197565,710058636,181847451,233857854,346856746,143690642,675474375,99262583,504417340,624278671,439502833,527852198,149924607,577530496,721940410,369865320,508758822,222617578,617120372,743560841,612691372,112780417,65386796,591736755,115850606,126445791,313082454,434847806,393203279,553306912,618057052,99451003,523708633,228504356,771950456,222602465,156094759,52576457,36733882,851526663,570580011,16739600,608056599,525561898,518579575,278277499,583521105,828879533,44871620,183535821,693005033,177266881,764650578,940120798,573061007,765166432,20144388,57291468,825028820,104952708,294562678,765122811,287006241,465621325,267199607,435488972,638883428,295539396,953061,985710698,150848328,70123814,188376851,451817657,990163985,835315292,43512205,958168033,743240356,875772340,45780420,425351892,709166559,428116263,279814791,650983985,806138077,81309794,567086844,289140300,618507517,434986739,580766563,423427304,574870748,323733783,417613030,638615392,878604216,603501540,485117999,530285181,238880595,12202500,514944544,313853598,717584554,175437526,83452151,273480366,769506782,953962840,140543378,28025993,172419167,893499966,848268738,501725711,483226655,600216209,103134704,158645577,121985290,945843301,114404813,596806604,425456869,680536420,70685596,247333759,203125499,578746610,833815585,253235351,961439550,40535400,112108857,308874689,788923224,868589190,932167671,841820210,642981612,247219758,434594339,635172126,196712445,168730382,966094812,824628895,825864174,905340435,928030628,30015213,600006424,872245503,899773077,699241543,122096817,27299012,838951382,25734719,317682695,648708423,67989542,238932190,86381087,693940993,875561072,996987860,707549126,954185821,386196329,106120269,944912651,298334370,524419423,644355073,63163737,174479650,164299395,508940301,332272906,53248942,247265973,418351266,368267384,422052234,293410797,732811667,546971724,723756108,614509126,599000837,796708901,725960062,356163427,794771978,177328484,445507130,510340468,35538136,81976464,34391299,927418406,477818294,43689703,439388203,394244366,78008367,914578077,418773491,22152018,587274173,275162577,918118226,935999265,814911158,354110518,858290189,635549624,98870390,709785599,887881886,914478646,895120321,164287812,314264820,186541767,674331927,225491870,326200713,77116247,598597697,818090931,109464154,518034446,499207562,755864283,445232376,980495862,197424134,245185523,959450115,816356060,223279737,8608450,593793379,321791822,784307786,399312594,153349061,150270405,946906541,804410317,107618532,1910059,37590555,10222823,602251557,744468766,839801318,71202120,131596617,422142665,458779545,241520085,276954343,967558330,799655804,655413480,883711475,334836251,978693995,125700170,104805698,325754324,810085843,859419899,295232771,289957627,470420524,115937192,788718115,716289521,677632943,871092960,63357121,484222313,508876108,46359733,778952317,584258285,126740489,409577955,884579628,893498193,818469927,36798985,5250559,199315586,970048229,697715357,241292479,746547595,271458322,144751626,534584709,841108762,423093311,610922760,659511013,238493324,945789744,7250892,252152543,942554670,676958418,64748098,240052635,590347379,386928291,316282299,527551546,391833737,364756057,182216392,199219722,358861981,259233891,492664852,668708379,992779680,493123148,781354663,365319636,271375479,899892972,566833161,527478835,524285029,533078762,152977650,557438091,538327223,110010728,759864007,96600587,654385733,790236822,116889237,757352901,487609916,255239838,84092785,889154925,481103580,631938105,677096320,234983365,935967300,484696825,894064704,602402069,333661725,565788336,939952814,897237566,241602528,869595266,306912758,27003612,730657367,846873623,30853092,442831826,643662727,957301328,208914950,890780383,237393844,646698560,647960453,381759634,700515049,844054267,536071965,67616590,206157445,790034082,4405351,819268837,579177473,839900507,590787996,202443622,855858106,561719936,488852140,12967205,482439597,611539354,78166714,280948812,737627178,669865093,313340477,476473073,909396826,591338883,78288265,530877891,463139330,501982582,150985189,429884416,725369782,818240633,832527090,72336356,281391090,581058936,249394443,477303135,182368400,399513109,228437372,793634015,378937166,153430538,726675766,293077251,214849917,62544412,857407679,628568161,666000912,585538398,19279563,909068291,157597010,885610319,243474076,112447797,917493397,378937919,166086209,829657210,230387077,995566176,435626255,591693740,392897501,63568429,533687153,788270599,430317628,416429278,277669773,313909880,663516128,625963003,37804768,877059911,211149747,943791563,783561177,735957013,516689349,721503822,267560323,55591843,176718856,143928991,947965215,270191412,326631726,524195728,972659080,628615174,308664756,555546587,605569131,875381584,127816691,731478637,765056631,115181206,406236804,771451015,418432166,373448615,603655771,722773347,129630528,151866038,994906608,880663692,650354898,615986034,6094898,943692786,477921207,625864847,328559101,705332648,209062074,216009804,22390976,101452563,597167779,53274153,25492319,538633189,164435418,647595215,685655509,414889961,176172718,702405860,410660039,743812593,755941364,593249096,118467098,945132473,697915430,308952096,89902673,751694779,87855352,263635575,457323842,190818459,685734020,379919269,834271552,681243201,419157050,819155768,826310437,22769510,435065404,109910640,18147216,643538594,18481644,821819049,845422686,60253628,656401568,517658737,834138762,596925318,627704489,35167490,502001505,823529119,314776696,992685689,60900058,138037412,150918233,304554924,201076867,152621869,20277765,151475060,73211725,754310922,107697813,541407248,543404797,903956135,136936998,545139449,786459819,61309226,424989400,266235878,417964845,109119156,807598932,218601084,476877349,468634039,509759924,15753363,64756869,741971901,677180556,857759239,94786140,430767484,741729551,105992822,157415991,783686211,896941226,703467089,66866666,132581590,358241191,208529527,62448385,597986959,936330531,147069301,40064210,196795959,217845111,656141020,433595795,32512294,766257498,823316405,241681214,837565799,6056286,649245971,305602768,277816730,636332532,372303264,681094337,857662027,608427703,320255885,946639813,616480115,365674608,942422589,250051629,139715071,430045635,494515290,349743718,272905165,485016741,975925622,694811746,832426283,525556754,432124367,72025662,940481482,192626054,1212127,483339175,698361271,5245773,118877284,810720478,142817178,27550456,124508465,403172586,810746617,434651704,599305681,625254715,811488812,816799765,238178731,953392487,292038742,87981977,682811812,12998363,6112103,439878643,401639927,614129146,655127918,379238235,918529927,620028453,20532905,937624324,417011782,477879913,931836589,926797399,777971880,138439155,22088384,517777535,683293101,512087998,341503788,577860132,967165368,637594411,898845725,500127077,177767359,379228314,751787680,649242459,246576584,362187156,310875294,846331685,512435714,890599306,134494930,96470444,614555979,238975561,667833837,533759237,645281318,243672854,951320927,835068174,185167273,195531386,439003170,365445676,242246112,948893319,629428389,91467379,486926179,855595383,234080347,791329303,505369650,449883665,52320215,463515391,379988868,649516876,770757231,495422713,775437972,855225408,458361463,450245430,335548560,272590898,852603635,698400661,667273503,706160287,441310287,486455449,386487214,700057170,590932855,844110257,477095895,639747945,940574733,405390542,226206041,798875897,639439835,57137257,173666768,180072081,459985322,825156232,98882545,352548193,163076256,426479598,335168478,327003665,539944982,736903899,398616822,196927292,484696617,890568848,977092393,977379120,708453937,335980191,877540752,702709846,431806869,823782648,280871305,227945607,763969179,225266040,32664619,385921548,575821874,69901514,747148045,773286884,854606322,997822718,706622003,611436511,704189482,530245357,924063696,929782146,757512250,18304912,146451619,982058227,686288925,323294438,475992556,630303617,123543915,371849912,297036792,190862447,632061758,253343575,632876671,64684484,318375784,205531942,221644818,93307159,550359003,671695792,17127512,685242642,711263811,316892275,41999943,163900716,605298358,412445645,689721577,33818133,445678523,888953903,604515542,347580437,628884819,900126046,189140585,610014535,427358967,436842801,563345892,46490868,273928124,498019478,469594387,263438162,286887198,612349271,12561273,456896483,450646687,991529087,949243067,272213506,952227232,34950780,947702407,941123228,241032841,677779023,971754451,456901100,528244606,509696344,154185725,534201793,493385422,894426487,240438009,624877256,909986340,554861024,175235094,769123399,745874278,839921385,941684542,730597582,989550775,59491635,734487099,788669937,906561875,188957660,830561354,393949756,214443969,475205895,86772650,39510815,278799360,764504344,629849607,935448786,359966615,497464706,735475971,228772465,983091125,73357857,269889221,542674883,373709772,697954176,753134696,459198832,491520684,766029626,288438995,716576264,201955250,30703068,68862105,19196649,101489849,76349934,165603479,951843619,30018030,647351743,888588899,912344255,736654205,703998480,615042037,965701426,655441334,558875075,712892125,766678262,659667434,719977424,383192901,19629754,352277487,908287808,279426180,562049849,738732637,69445330,522514498,840535303,729407555,316119809,944065763,304094705,701605653,53504294,598504812,49951314,658606999,77115555,941472322,458783336,98214000,853730613,312167084,82609745,940526831,600301628,391288190,785682216,84058909,881327484,69288807,39316084,507944159,562962066,683473158,243338703,984717433,636912649,177890026,500430358,187065254,882643348,917200007,535878061,749134287,3339248,288166314,635615413,204586113,150460922,1442113,53746583,375688741,391726385,353469571,823312195,170923744,175224300,794730063,827368148,412827689,668284144,512134398,328370010,29268927,735058082,440741561,872317224,164725699,438402110,207869913,861217769,240241381,260612685,43735493,623023577,26995867,600487152,361906411,680339951,63598407,37527399,155781353,434634178,304746199,913847076,224762988,167804243,639883590,72876601,209827726,406442508,81234496,94531936,453328150,961721141,330784396,805665136,722524995,250545758,854606586,795238344,425607258,60640696,719402503,664935311,62872989,144371799,947788330,237747442,501674274,411703574,102636162,369584771,881517651,970458282,354046609,931655273,819881612,140668663,986207341,700971219,920968869,809137354,98034452,131034671,567450831,171240290,407467050,120842714,69921292,286578313,508864948,213298682,553720109,120208090,141213959,206557556,72248718,394416380,821564018,499578894,908895335,545692812,349413525,372823777,484916671,294049132,723889777,920621784,270647053,394655425,544226039,467163478,209339892,590329636,88721690,584771390,13077989,758429129,602926158,197585891,816351775,151261742,782943393,90279560,643583647,982708837,883672960,42019715,289187298,408402903,462833487,449625153,647971256,563325655,706367609,423782425,100938454,107998895,99703706,121415591,522373287,614685673,625764041,781796306,138541174,27711579,892040501,734339178,243023915,782021389,833565283,695882000,285811016,497806151,31691145,57129559,251307904,779092526,793267301,658025909,693649091,619036521,381517310,922742875,205580069,30515307,208130272,587599119,648584127,919408895,360458100,960897091,720382997,111712440,88745111,185429559,308804894,408857237,863395506,334245141,633842813,477268971,401152630,14063055,720521371,935375542,276438354,885265795,688488727,581123231,975495439,261682075,837104047,42346432,692374045,309669800,267451919,174108040,6595997,337255582,838200819,941419191,920315688,214037453,292363846,316575386,365518883,118131092,154373416,186735714,786515509,997291056,153891935,684419135,902967191,695624366,457745094,35371304,425514687,504799899,611496843,363684337,704192597,582599162,366169061,308254503,102875357,94767842,123232998,2761678,111344137,341127531,696559674,938059699,84887044,205880409,635878746,335456550,666641053,606969950,589604978,794296566,777013588,212294687,859445320,515462096,215394052,263381700,692435433,548439338,620140842,968992603,490183420,558448626,135498370,426912279,371808526,955967359,263734437,178435251,74092345,522505733,693221948,882495061,572424045,797164333,937954745,320925166,457827345,63258792,979090457,553607485,227336522,471517241,575612057,45495911,731555001,694001310,889308891,921326495,377306595,665711152,217530794,22887564,64693913,476848987,784932483,368198260,407768813,543101092,887532072,123100620,718346857,895540743,787869425,130237151,402939142,975199181,370419741,882472912,200165802,20221590,320413,90213997,896171375,649483214,997978575,178626955,794072757,517444441,172928115,857454414,621064728,109854007,627842876,213554152,759458527,724149168,778217605,120855583,286210575,770743323,261670957,4748890,943656447,660150212,37071260,872366346,783297731,603187385,293060786,292627731,249701865,349177395,344649092,753893285,530923695,439988580,101867439,334559192,617130676,562235100,557278900,10287733,900215349,690056106,6774673,45295820,77635702,93648363,428480846,757888909,906361784,913974095,5066252,42130062,557832171,364673773,153774273,61378970,597176808,205024556,283942904,312702472,490941273,410782115,648060278,59518409,184477717,343581929,145437567,118755439,348828719,133923923,296511805,311845595,121795063,43665406,31028524,450855225,201459959,148798172,179911696,911878274,494846126,467653429,61033183,435007062,922335224,944124300,933420995,638621630,190467704,440067098,67014396,822501122,217100293,22886776,51449997,77168416,36928571,621675970,793063713,383806040,734722339,240359901,105094678,887673890,359152099,485774754,830948231,453740554,96039159,15421347,488541389,878121020,865339534,795269032,941380474,269599069,754036091,783580490,267572026,45262742,314672334,238673555,34469936,101586818,913129339,46659111,161126000,860781711,708370585,728061705,171255329,660227523,395975012,100204631,512053969,124083454,56968719,488532249,931526462,9460204,876837328,972185982,474213098,580702647,349191092,929359640,891883427,241880107,885393156,888582829,810325765,951326728,725544159,601511225,39127077,478787157,354522390,338171952,59762233,548986882,25756840,689470342,106278782,668578417,955991993,677758075,826702837,175385369,354333099,97220340,540177591,351396068,126664204,481961029,803676497,866229096,713752037,979812295,800636869,171325181,834230087,777319524,266215167,862853646,817138709,492359598,833271695,56515778,465887450,237973766,803513026,59234224,703147716,201153371,645446019,71340336,514130704,313525178,640280555,947711346,298382423,539067616,23399066,864552017,444372695,416739177,191174972,235197070,232739941,92467200,111048550,229690607,381918190,863377025,230656396,434064737,324085900,893192508,975789426,907754290,695502320,346980197,71047952,687978688,598832346,112364311,868849264,8264095,894164766,136660456,192265349,233810486,905247839,371769656,302679269,534692918,512293778,652564601,247242356,814398925,689450144,559789574,257512711,836585072,909868195,71186725,872852852,370069485,438171261,415936642,380849687,84916280,258776352,392741467,234083569,52502879,947592083,234391407,724347429,815422938,720167459,429627499,702333057,187060018,1663318,38098215,366572699,4252497,43230237,721120573,623250390,337053242,939461155,16837919,113020385,951045325,290971232,326210583,888496268,502978685,860102781,827990888,141800634,329386046,925916803,10180437,889870055,969896677,652569609,331411812,258722544,842895480,387691679,468663955,12558136,49667855,543983949,693324142,245564550,532800894,925301115,252246809,379399685,691557852,831321000,483439618,239023125,112736916,688770558,229910976,583671257,850495481,626394735,851473551,32431696,204625490,812270161,64030526,64721913,947444987,909632582,258722681,845198039,432095146,580908315,658369521,26285034,538418803,501712141,255155665,669397174,38960432,411425445,723089353,352797498,265199519,179748308,313299805,147403838,806133784,216178765,921656278,270497113,815076070,185324277,893835389,43272158,71181751,203297678,177591769,930075900,45163365,791926742,602087266,337734998,512832365,321683144,105240287,832935637,850839913,765790996,779773301,704655913,572595164,732699141,803230889,819346381,89480903,459962399,439889371,581945423,909174501,942668480,87774372,50088362,607467666,364783202,638442407,473234037,158009949,383425151,421066788,910889051,48844341,26559542,857107465,877838757,623334009,949459197,757226769,515193039,988320347,61546131,904663019,487139573,147141047,38877810,22797491,905342071,162548302,143091308,546907494,644242498,171115712,461168251,586312534,499786502,896174275,343718445,144894685,145998744,813039043,308749840,838069728,92677823,710527086,819657082,661960247,600579869,565695961,534889836,319905888,152186106,138859965,652191113,412480481,275210229,571521743,19065217,39995872,634196349,769676160,298710170,752544151,123843605,527815292,884150534,124166276,655979495,659307345,110412542,863679542,813070899,637132210,720568106,720850687,27738613,198917292,718371912,316640128,99132608,467411162,284219008,865236528,418552259,244368019,104562269,529410415,569073962,326894174,847213392,298899734,436557583,64654260,17422438,761139474,58537986,886377532,46099663,348418052,821778242,952558015,944948298,104474921,61352579,360644693,156503417,478440522,971078886,47119802,668530118,144230700,369316015,866524275,586879618,86327633,2561037,93675919,305657382,402735650,57097853,304382318,240550050,5961627,412817227,492449310,193577632,21535819,175257237,141280800,975449174,484106220,705184704,870050913,729542368,434438253,952296949,59200752,702110303,92705903,620941155,534951312,205649373,47823988,411860916,599599509,121170970,705995434,818109563,777117247,807007853,21754566,142727928,675009353,519067348,886343722,832360062,560064054,368709355,53302821,359831748,378238684,505966868,897392003,482720118,676783438,625847954,44638450,559614925,262649193,266092166,943059486,216961273,40882705,68339542,264888405,38801182,89415764,719676295,764568739,357631303,50065215,218436037,997899714,646188706,668778863,236942043,850235163,546197403,594644943,601642441,451495811,23349204,26521383,8747730,432683623,734023019,578811965,784753423,653704134,72020664,63501518,118124114,475567679,79330466,305754431,679333124,528747616,166829404,81128624,24151370,623623463,164840212,215538454,897367536,71503249,104725848,776693952,489644798,95763260,820837795,178850815,261520483,623216019,906863492,756245863,61491426,546762575,356072512,621268642,389552958,331903981,295177408,152450264,76574755,442181310,93353481,328892857,872318799,191196724,807804356,376194958,516802338,473026298,961507870,248327415,78137784,942205949,903950443,395776623,853826580,570579384,6201611,589734530,31214805,434196345,181516487,113796847,761635208,800404736,357811722,580378632,345921928,464590045,907324401,119830260,795002581,758105811,463887826,197052972,242495308,487658128,272560344,132061135,993867172,590732016,409071409,960995594,21417849,132997672,347353933,909977963,414068785,407053215,253463741,505022986,858931336,466867596,531418412,164762611,58782094,901154816,654313868,582401767,196034943,519372503,720116513,573378077,6216050,39432225,312442299,413180956,163191672,425814085,241814791,935110791,914714169,558588088,538973979,242620585,445705020,541310404,63231336,517637465,476620258,442672896,120009864,311618293,449013996,320695214,887991375,252671553,75621152,447361218,459742779,250724747,567907415,402596637,513684940,618525640,739580000,278689742,69638265,824710818,55260388,841384190,757244413,18757169,364621852,428621673,977284651,61175679,120927196,696831688,67348056,194895223,691451286,187749885,651818330,589567541,165092907,960594603,78918122,817939764,70789101,839458647,961402986,426004252,935962844,409804833,609772302,651116230,881296145,542574234,622564254,690067372,196122335,988169847,325071209,273411695,762836932,315922112,916339578,107033387,904796279,579356746,557974524,964222066,561641578,112351459,91319209,498621705,646783919,728084097,547597673,506662716,500586035,301539877,66789466,982564837,965453676,786474378,513023761,243508422,689701019,481278405,422738233,878556333,591710537,29709749,554018848,53168591,837268941,311731174,553226385,264639763,361863804,171265524,831574888,455567940,951166025,379113907,183454300,677386655,819676416,986906785,926129714,293608320,550592012,292910761,918641203,342760538,18199490,374624065,32091098,922645845,722280506,790891498,382610534,969205820,778754245,757250897,920712335,438032641,440655371,571205541,792604075,248604762,90036450,414127662,42093885,742783910,439713937,573888410,786426771,505871490,294373957,888256258,409592840,341773245,457151568,797398057,216681650,783709885,87808722,65882321,768564351,146910552,666937061,139525465,99831378,119715248,9479544,994863286,152550838,619438326,46708073,629525265,926683733,15071065,482276265,806880655,676916358,712350747,50651382,687231640,928098492,23121814,61271438,582865062,540183067,88926131,80349052,245260157,859318684,534574491,314869767,616467761,512545999,596675654,372063866,952499445,108045955,743157479,482858601,63804994,776194305,682012257,105274291,965967356,829959550,223869585,977744129,400709259,211799021,325742868,617544851,80823384,981928562,654492917,651216085,412075483,910859784,556953872,635488009,210790732,204793752,699787370,351371549,69078440,798645209,57233913,650680513,651467,4766212,441808723,273734713,749349517,473226211,26478367,492799240,779883848,60630626,111682504,940115828,489530217,317484040,250376063,150026368,140343976,617138804,698842396,856084129,65521203,703231557,255763989,510585476,858420298,674807940,635907773,823313339,983129530,511809270,99373233,9606821,193545600,276152573,584133244,379681471,925546438,80423176,905105069,474222982,746823035,605811108,647321729,384143601,965659125,298993496,864931870,593132547,159628055,661645282,601930408,996389886,40313274,880825891,81466197,255289840,776992752,69125457,2902772,542248770,447458100,88038553,633684644,759384813,278216548,706601295,56375733,259634782,787988948,198597987,646780071,17915830,49601386,12796622,910418410,374210573,170476926,462510184,665343995,282152614,288069500,948924740,10037489,196353157,218122838,235952837,404519097,612215455,910999408,756130793,274993583,432341137,420311758,898980301,259957193,118804753,384670539,231971503,855210194,202659765,986584791,809343850,480666852,881785197,172136610,232510339,174008611,837481510,736894710,244177299,839593454,79620588,886867591,692586688,943098476,79287625,147252235,760130879,932445928,430539737,1931594,838002809,908432415,207847313,481379569,768496512,947202704,132549495,611799104,148817670,153109513,626175885,468228895,935934235,721951948,563784486,828005638,596725306,413586452,890417072,219171739,684962768,656893856,994587143,13404153,945300183,369133753,743709066,163446722,210450719,932646202,501577561,140753252,53389595,256715875,122042880,120779853,367921534,844780803,9544282,935431205,64482748,429787548,97309306,242450575,883314244,101025775,73614226,283715710,996241630,50563398,1463130,761484371,58265855,21681953,483847728,301171885,176915216,296667864,432740492,689820302,338584139,899443270,598626235,943224028,41956442,787284478,243472579,880266296,413771267,494614061,862304268,528182320,255834120,541793546,593464342,441139326,908081216,747696661,610962830,125946081,942864581,443181654,80770982,101208148,991273590,157093704,16480965,763166870,773244206,137317176,492340154,299454965,30906765,906440428,88260156,270220393,813715393,731724633,250039040,928131748,582055406,817196557,464610934,258405824,607728312,450493230,205355866,409819133,850112402,630436923,69050563,891642961,702356761,939958215,780990751,484480171,193223151,506224593,934008784,573151696,496397877,778128722,981504071,110007268,494690365,144745596,226217077,777336527,197479519,176041218,285263938,247505862,948176973,681724471,710905930,389932180,617542263,37326868,80424130,714117525,680118170,838113856,627315697,90674934,846183524,169777434,236544953,618794474,962905744,913054194,931180743,286906843,942522786,141084030,170324500,841148627,300125788,922515760,683425558,590809150,557978900,37769498,722750530,100650278,205087088,187434581,1976365,442985359,76608211,649971233,964684389,741969651,993869875,636161337,435491124,675052092,444403143,135500135,18103125,109522579,352499774,703803192,273298846,659162367,821250943,680178310,494381767,253106304,585525199,151949039,242420768,382347995,644658719,517069696,317039841,581679480,941459216,445532216,931960870,513599450,329178857,384153505,925094231,70114715,242471380,440005301,28392217,446621485,911952130,588660271,156012968,32420189,572753832,44927148,762289848,65520981,137973912,438178802,749699651,915477408,855949148,737357761,791245937,44699513,231395697,767573340,670857851,818755007,887676320,399993109,853346431,90649729,422563089,289416194,167512103,24853904,107737010,200191227,300055918,748210670,659977505,281868358,805546202,78106326,413491343,84898687,756069379,390292132,17783164,967367571,741052938,619060013,776347354,106823153,666360735,190632618,709787980,134920775,18217840,683032515,427386390,543236093,216031654,242140279,170158088,546250859,138574866,948478092,93159141,3082702,64343564,30984285,500308930,293708505,86917660,536231660,604126808,49557618,484209268,289628793,238674780,55058511,388899676,89611642,716830547,387743759,343972515,913060459,36476598,467816700,657645233,92583569,712357264,367204023,877496730,110315739,236711521,270819203,933475406,198602238,718226628,229357009,70103898,415175130,467019385,935052488,141837070,148787320,997522132,97124042,862159330,32671579,941371777,123428590,788087706,858423693,524846283,21635083,696103638,70418657,848835858,443376963,861340629,364687176,379038494,63471656,261728411,822894621,595208467,689877143,500932248,32395896,957439959,391402520,352721457,927640657,918223557,765835157,521987228,361621579,188135821,695793741,949925650,799946330,95833021,52848697,317304268,523915353,555363749,827578159,647515272,489537155,434091006,558567561,986955268,386478426,197852185,996987739,705515479,134419044,614033020,39538236,946685529,237345280,184988481,338057889,644694108,111852619,297249917,832392097,305497721,659775448,387885075,217081811,66764871,569196672,596302566,544024791,586777058,510085360,42905274,347413304,114847782,244830577,81818565,528066453,455941098,780381590,190750901,550286714,604218216,438368227,785881979,86970581,864148416,310523051,575655947,635671494,147139480,658036172,73160754,252146394,632187005,210886257,17303849,708476376,358607395,275374283,181293674,516462403,54706047,321531013,902879639,578642971,446459981,138016627,156089807,116831840,231155031,224688594,64947932,451179026,994111003,600853761,81052933,544991311,444188100,609218306,723018624,311538842,261164686,731281712,602821803,945680122,312317585,464596405,14216921,366085008,43059379,789972392,322086590,296022621,680064695,732338109,970795584,373608960,3606892,491491728,279366134,700340374,55775189,903710009,295264610,825075700,538359799,657515560,706148036,235407730,625818914,556563170,865915505,738195394,836958239,739235023,130133666,811150394,571459380,763908854,4362343,303454803,38696043,262806816,413273211,920742879,158407071,615403664,601115474,977674608,25248390,295412271,804825411,848673871,868345101,124731142,998221278,755747560,276447493,245886390,646998480,39243530,288529081,290189441,278572550,454497390,138301351,853500203,734633508,894860931,892665954,508909514,607814375,103975493,50379349,410140303,598544229,919454255,122823620,3270082,273176999,758763485,779996509,161145475,188098036,60741246,616367775,625059875,38801648,890226404,516603379,276606032,762967716,366525153,998125453,145216785,117082503,503585847,327256280,283656571,795271035,182066317,971876491,360543733,252647275,667580806,576034514,348774700,19005168,592278820,636402473,193296582,740379410,829471730,260508364,792401162,133213265,675858190,107590347,882709833,887129755,10831164,650747000,763593407,352116977,712584954,692001137,839161054,47703307,176553927,666934582,97860912,923358029,954538759,23058001,427239856,582427871,427743449,101875765,681515696,704013221,508288955,122518919,886137807,312008882,571192378,778394956,13647968,748131594,123925751,553938045,695112570,445924310,79433787,894786831,1772323,308618759,575453586,175052392,52955954,972489020,124921823,469556042,618973747,680979761,286488264,142895052,543400196,472122059,3369948,804141214,86793127,383667754,203528115,903062781,154721849,954903273,706993858,211731133,977727830,126771966,352654738,13315846,461124434,997363862,230058730,126510510,46309618,729648090,856802838,52940062,705392176,416570592,298229102,902663794,245903350,932045200,930933760,430830856,806822755,851274705,630889199,20980932,25163172,449110501,588149680,164444619,9257844,977761524,693067024,426171040,798706535,87939995,124703985,541793579,386997551,332851472,39789469,874191266,596978535,167617539,442411687,24837495,624929525,640987776,303577880,605262466,16230223,50934792,362557638,888093905,975893263,150954033,906245524,314497344,592583919,321750425,295569829,512440492,177924574,874057172,136239255,555591083,560434825,364828033,598938446,102608433,903543468,998198739,583956009,548376473,711052434,704741261,214060422,471382407,249919244,707698954,531882792,172641261,331266530,318956686,378817268,285788499,473868001,75624662,860858857,650458338,207018467,435866729,545394386,983240106,429797877,625413878,191574059,707222760,118424822,234599741,930849673,372085716,172248748,176751480,692240559,568159314,134274414,330720257,520659541,522022640,163812485,915378519,193921725,509739576,673764527,72113236,619359122,508505023,251985079,275470869,11635998,731163665,559268099,875995552,856842279,715824949,666527349,50451891,481870050,629097513,179906810,829759272,5280886,709021475,137173122,218708223,130078875,97299479,77288186,547914245,384837379,888567736,349636292,614880030,390333424,564294161,804178775,718080854,719795616,829534561,523530403,734981462,507494290,798969793,863044838,90040428,126480839,902134190,727762088,223538282,59006971,385695261,274604981,136536842,55147076,729927984,473035424,114888552,137073389,335474270,171482515,976553909,871518189,413224914,109015200,414915509,605557954,687529745,850403355,18495278,50965687,527304834,894817516,162990049,125082196,455934915,469442487,857938509,167314805,796812290,109113916,719530252,664529107,825736949,914553507,5825501,272431192,108887118,202703560,722647356,159583438,59251010,985270018,186790509,914476496,858985271,580374563,277534245,976553009,856391889,736054807,12829460,876369520,699671514,551663404,119926929,65213395,263343304,47113861,568679731,143504698,259323705,209190172,221469243,437385428,93343293,950641719,950016131,380198272,228507679,620778695,744948317,309680387,90882559,602296096,700057161,590781592,449316663,905630767,365189611,233528951,468456388,464441792,563119877,395340410,171867052,204037749,878546831,432010423,156968854,65610662,852263901,76437195,277694037,514693506,182603804,60980843,348307260,752675676,541405702,310399753,443848686,199654502,223758500,258222181,668724058,463318055,3824941,654252555,906419245,86742544,326497851,421642250,638239228,205888231,767343100,96181465,259674642,664937390,97814742,147378839,740480660,383696833,692258868,875878677,685502732,142134216,286426357,456929172,50710,645261548,911398464,20614044,153843850,83275962,607239137,818863593,210692506,55898086,467251172,890234372,443500133,783975172,458541459,180470908,927641192,134236724,258790918,637552229,189892851,368447315,298668904,851965067,348901451,356330647,310271224,638166852,136948446,383040916,760185153,844629046,606448030,407630126,359672330,639362583,906246540,124551834,132075369,85614363,106555451,23587006,728292303,899432268,413715621,559371739,824894454,639641924,158679786,903957375,157777678,774613748,680373100,473250003,780855580,360144821,138067879,662977102,510992678,259813371,642050624,632489971,214889947,735328622,692740047,373119542,160871732,882266729,29815415,182463663,60136125,390538785,868312841,228032253,427249923,397118871,145173668,978372240,12931179,231455684,775774849,867644784,884900136,985308855,632502546,219216550,83596176,546624894,189551592,75358243,323616949,601467639,454060822,36332494,754870910,929481541,793189887,356928811,980700406,694732917,507547280,542089076,265469758,72182818,995845218,476012786,970309227,143846518,147798660,206477619,83252628,653538108,783610398,415730713,421789700,968947731,736019716,777560092,14474249,396029410,807450395,662601950,293758886,140692549,240175696,511149959,755751491,342515810,407044710,110520206,87231234,949976093,854763253,133373319,779928612,812979174,450015204,761107472,520680372,872129257,300531624,946445402,496498085,669346000,971857592,42908240,397262866,270330339,514094168,846948273,930990573,385686947,927850161,144389991,106057627,99109979,441590628,903179342,320783998,25678994,528596267,770590408,986595846,788123813,110768973,618785840,817794106,563177320,6279842,318605791,130797366,81054412,776870286,158323042,203128261,625167544,346405815,214365688,514042197,973471676,608035686,174077107,841210135,333890744,119943375,194137670,844159897,518416797,482929878,54736111,265290170,555836018,382090076,811802802,6083823,112060330,640765047,500633802,311381268,114807184,562499991,714334643,388758171,6304401,169842413,535668428,727821172,423584492,276267239,363841059,190735604,293190035,317432027,523677219,848012905,496907774,112538082,80408323,448449276,212359340,5606066,879354441,120609811,657509287,955222794,634732364,395567099,479840359,875819228,40848458,138245144,56312801,994915236,232695910,145416761,976090419,524092700,595572553,159598182,952548349,136996905,990469907,327473983,2128667,855241426,934597411,83292519,531007567,849625284,826357863,612836870,410681656,107129512,727390576,421987039,345162079,578709784,214881003,230501745,129812674,504183722,638323170,616701425,937748131,143330962,279804978,840561963,970460753,188555284,155773794,307590065,673084126,728536933,361456315,912532489,398314327,762366190,201117328,832649896,343358220,326022629,24520684,388232920,768345432,555484791,714447406,929460843,445318601,282195790,13728532,393160604,43089609,505069424,846436224,914917618,830471784,36030413,558719993,253912598,459027997,122285555,904451284,223476722,817346629,839387391,556781972,41332003,468229949,160670235,790673944,21147750,888411073,864084898,390459672,538660650,625972445,989475040,141118559,396148334,865743838,354976841,179173899,396625977,96533729,885208396,723783734,285840730,997209349,135147455,178556237,960020400,18222889,122396127,408329819,234510699,788825848,379474405,592871823,72607081,536498871,800174791,788093401,599634489,63584899,810498443,558558580,43033023,347007100,730228095,867528638,287339383,415266556,63153942,571381576,810762095,487769028,781951575,453179963,618625879,69791804,50735722,750228951,14466498,58736931,935078853,584953625,135439409,144964890,616924041,591309371,729763728,652847057,699513054,35909831,93624810,594152066,907793290,557996742,983134923,809470843,467554556,546758319,284541920,997451218,698251022,299774477,312999077,388035636,600076891,909100725,57220317,215151119,475374063,972710001,691465843,77904315,520281182,605393868,77219990,756249142,471106648,910205025,289837594,600509540,383676458,704321312,391407098,429663903,166691438,264322778,122242781,540053735,62726854,983248148,357938349,561114974,851652619,540038856,960139148,659515456,106145403,12834720,757752918,768244694,9864872,28620041,566649315,378041338,484139940,917411675,5436265,172992681,588110107,646824855,416095449,902435289,345882040,1213851,73840934,592008350,592601899,978445354,94274530,776577871,331650009,321637298,334706565,946545040,816608882,177491797,249846496,839528387,986039519,234891934,753791552,968580811,11646217,109935820,648368898,597022386,904621296,578879690,130028920,50684372,448715992,400087858,505330649,941877505,826243076,831095408,779860746,819838959,571283339,952671414,57866713,341710456,549340492,526429169,855396321,390434029,107678749,575503669,16797373,786068832,932441658,358773847,570944331,904436321,971993581,388013138,576458074,25096679,331562650,878232,314016851,106872656,350874009,149374601,130535664,332101261,108873652,976380498,104483159,199808645,666956254,462102216,251076760,834717543,734562997,709782554,43725993,463357077,866689117,62411818,983405390,60242418,822500167,201049608,841963503,903823416,53812412,334593097,393993433,948523308,853104453,171209130,31244577,580069280,796115227,130994310,450629995,710986643,746475571,208434601,407489328,140763991,86396321,364021675,78865069,73761640,52292670,562093067,317613916,640223417,134876627,714695913,18172120,269121544,318208004,680620776,340973241,250891291,12507354,343658428,76651191,372336093,878346271,563187219,527157404,209940084,147359767,626958978,744771064,478072863,234285014,83683925,459895846,468816747,78544564,189022821,778238634,681311408,211007030,692630591,326471128,179530211,149732242,846440657,989423049,60284400,173586572,979701556,879908721,846459183,153305884,779099635,912748264,877361105,978350011,639328376,331329491,22637144,150852267,136326587,461853516,11638085,180282718,59699156,74808899,473705507,846576720,335771665,520327917,597890435,668556732,798553620,665381237,908078908,708906105,345633179,113574318,878084090,244657024,312396941,5354119,378322015,552005916,434075172,499466945,27368492,420744586,938090978,463109550,1470122,878998915,587735270,434885268,229848535,534225370,96665483,159135649,768690806,917734668,139012322,710866496,81670011,178803022,605747179,365845604,521385067,185541309,39503497,155805734,637384223,661183303,72878874,809556528,907662351,150283547,374805557,787459848,43432522}, + 748425216, +}, + +{ + []int{4,14,2}, + 6, +}, + + // 可以有多个 testcase +} + +func Test_totalHammingDistance(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, totalHammingDistance(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_totalHammingDistance(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + totalHammingDistance(tc.nums) + } + } +} diff --git a/Algorithms/0479.largest-palindrome-product/README.md b/Algorithms/0479.largest-palindrome-product/README.md new file mode 100755 index 000000000..93e88f1c5 --- /dev/null +++ b/Algorithms/0479.largest-palindrome-product/README.md @@ -0,0 +1,20 @@ +# [479. Largest Palindrome Product](https://leetcode.com/problems/largest-palindrome-product/) + +## 题目 + +Find the largest palindrome made from the product of two n-digit numbers. Since the result could be very large, you should return the largest palindrome mod 1337. + +Example: + +```text +Input: 2 +Output: 987 +Explanation: 99 x 91 = 9009, 9009 % 1337 = 987 +``` + +Note: +The range of n is [1,8]. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0479.largest-palindrome-product/largest-palindrome-product.go b/Algorithms/0479.largest-palindrome-product/largest-palindrome-product.go new file mode 100755 index 000000000..fade61c73 --- /dev/null +++ b/Algorithms/0479.largest-palindrome-product/largest-palindrome-product.go @@ -0,0 +1,9 @@ +package Problem0479 + +// 题目说了 1 <= n <=8 +// 利用题目的 run 功能,把这 8 个答案都找出来,直接返回就好了 +var res = []int{9, 987, 123, 597, 677, 1218, 877, 475} + +func largestPalindrome(n int) int { + return res[n-1] +} diff --git a/Algorithms/0479.largest-palindrome-product/largest-palindrome-product_test.go b/Algorithms/0479.largest-palindrome-product/largest-palindrome-product_test.go new file mode 100755 index 000000000..c2d05d899 --- /dev/null +++ b/Algorithms/0479.largest-palindrome-product/largest-palindrome-product_test.go @@ -0,0 +1,74 @@ +package Problem0479 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + n int + ans int +}{ + + { + 1, + 9, + }, + + { + 2, + 987, + }, + + { + 3, + 123, + }, + + { + 4, + 597, + }, + + { + 5, + 677, + }, + + { + 6, + 1218, + }, + + { + 7, + 877, + }, + + { + 8, + 475, + }, + + // 可以有多个 testcase +} + +func Test_largestPalindrome(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, largestPalindrome(tc.n), "输入:%v", tc) + } +} + +func Benchmark_largestPalindrome(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + largestPalindrome(tc.n) + } + } +} diff --git a/Algorithms/0480.sliding-window-median/README.md b/Algorithms/0480.sliding-window-median/README.md new file mode 100755 index 000000000..e46870da8 --- /dev/null +++ b/Algorithms/0480.sliding-window-median/README.md @@ -0,0 +1,37 @@ +# [480. Sliding Window Median](https://leetcode.com/problems/sliding-window-median/) + +## 题目 + +Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two middle value. + +Examples: + +[2,3,4] , the median is 3 + +[2,3], the median is (2 + 3) / 2 = 2.5 + +Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sliding window moves right by one position. Your job is to output the median array for each window in the original array. + +For example, + +Given nums = [1,3,-1,-3,5,3,6,7], and k = 3. + +```text +Window position Median +--------------- ----- +[1 3 -1] -3 5 3 6 7 1 + 1 [3 -1 -3] 5 3 6 7 -1 + 1 3 [-1 -3 5] 3 6 7 -1 + 1 3 -1 [-3 5 3] 6 7 3 + 1 3 -1 -3 [5 3 6] 7 5 + 1 3 -1 -3 5 [3 6 7] 6 +``` + +Therefore, return the median sliding window as [1,-1,-1,3,5,6]. + +Note: +You may assume k is always valid, ie: k is always smaller than input array's size for non-empty array. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0480.sliding-window-median/sliding-window-median.go b/Algorithms/0480.sliding-window-median/sliding-window-median.go new file mode 100755 index 000000000..5c9a3e576 --- /dev/null +++ b/Algorithms/0480.sliding-window-median/sliding-window-median.go @@ -0,0 +1,166 @@ +package Problem0480 + +import "container/heap" +import "time" + +func medianSlidingWindow(nums []int, k int) []float64 { + res := make([]float64, len(nums)-k+1) + w := newWindow(nums, k) + + for i := 0; i+k < len(nums); i++ { + res[i] = w.median() + w.update(i, i+k, nums) + } + + res[len(nums)-k] = w.median() + + return res +} + +type window struct { + k int + medX2 int + m map[int]*entry + max maxPQ + min minPQ +} + +func newWindow(nums []int, k int) window { + max := make(maxPQ, 0, k) + min := make(minPQ, 0, k) + m := make(map[int]*entry, len(nums)) + + for i := 0; i < k; i++ { + ep := &entry{ + idx: i, + val: nums[i], + } + + m[i] = ep + + if min.Len() == max.Len() { + heap.Push(&min, ep) + } else { + heap.Push(&max, ep) + } + } + + for len(max) > 0 && max[0].val > min[0].val { + max[0], min[0] = min[0], max[0] + heap.Fix(&max, 0) + heap.Fix(&min, 0) + } + + return window{ + k: k, + m: m, + max: max, + min: min, + } +} + +func (w window) median() float64 { + if w.k&1 == 1 { + return float64(w.min[0].val) + } + return float64(w.max[0].val+w.min[0].val) / 2 +} + +func (w *window) update(popIdx, pushIdx int, nums []int) { + ep := w.m[popIdx] + + ep.idx = pushIdx + ep.val = nums[pushIdx] + w.m[pushIdx] = ep + + if ep.index < len(w.max) { + heap.Fix(&w.max, ep.index) + } + + if ep.index < len(w.min) { + heap.Fix(&w.min, ep.index) + } + + time.Sleep(time.Millisecond * 10) + if len(w.max) > 0 && w.max[0].val > w.min[0].val { + w.max[0], w.min[0] = w.min[0], w.max[0] + heap.Fix(&w.max, 0) + heap.Fix(&w.min, 0) + } +} + +// entry 是 priorityQueue 中的元素 +type entry struct { + idx int + val int + // index 是 entry 在 heap 中的索引号 + // entry 加入 Priority Queue 后, Priority 会变化时,很有用 + // 如果 entry.priority 一直不变的话,可以删除 index + index int +} + +// minPQ implements heap.Interface and holds entries. +type minPQ []*entry + +func (pq minPQ) Len() int { return len(pq) } + +func (pq minPQ) Less(i, j int) bool { + return pq[i].val < pq[j].val +} + +func (pq minPQ) Swap(i, j int) { + pq[i], pq[j] = pq[j], pq[i] + pq[i].index = i + pq[j].index = j +} + +// Push 往 pq 中放 entry +func (pq *minPQ) Push(x interface{}) { + n := len(*pq) + entry := x.(*entry) + entry.index = n + *pq = append(*pq, entry) +} + +// Pop 从 pq 中取出最优先的 entry +func (pq *minPQ) Pop() interface{} { + old := *pq + n := len(old) + entry := old[n-1] + entry.index = -1 // for safety + *pq = old[0 : n-1] + return entry +} + +// maxPQ implements heap.Interface and holds entries. +type maxPQ []*entry + +func (pq maxPQ) Len() int { return len(pq) } + +func (pq maxPQ) Less(i, j int) bool { + return pq[i].val > pq[j].val +} + +func (pq maxPQ) Swap(i, j int) { + pq[i], pq[j] = pq[j], pq[i] + pq[i].index = i + pq[j].index = j +} + +// Push 往 pq 中放 entry +func (pq *maxPQ) Push(x interface{}) { + n := len(*pq) + entry := x.(*entry) + entry.index = n + *pq = append(*pq, entry) +} + +// Pop 从 pq 中取出最优先的 entry +func (pq *maxPQ) Pop() interface{} { + old := *pq + n := len(old) + entry := old[n-1] + entry.index = -1 // for safety + *pq = old[0 : n-1] + return entry +} diff --git a/Algorithms/0480.sliding-window-median/sliding-window-median_test.go b/Algorithms/0480.sliding-window-median/sliding-window-median_test.go new file mode 100755 index 000000000..5a7d39366 --- /dev/null +++ b/Algorithms/0480.sliding-window-median/sliding-window-median_test.go @@ -0,0 +1,74 @@ +package Problem0480 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + k int + ans []float64 +}{ + + { + []int{1, 2}, + 1, + []float64{1, 2}, + }, + + { + []int{1, 2}, + 2, + []float64{1.5}, + }, + + { + []int{1, 3, -1, -3, 5, 3, 6, 7}, + 3, + []float64{1, -1, -1, 3, 5, 6}, + }, + + { + []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}, + 14, + []float64{7.5}, + }, + + { + []int{9, 8, 7, 6, 5, 4, 3, 2, 1}, + 3, + []float64{8, 7, 6, 5, 4, 3, 2}, + }, + + // 可以有多个 testcase +} + +func Test_medianSlidingWindow(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, medianSlidingWindow(tc.nums, tc.k), "输入:%v", tc) + } +} + +func Benchmark_medianSlidingWindow(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + medianSlidingWindow(tc.nums, tc.k) + } + } +} + +// 这个是为了覆盖率 +func Test_pop(t *testing.T) { + nums := []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14} + k := 14 + w := newWindow(nums, k) + w.min.Pop() + w.max.Pop() +} diff --git a/Algorithms/0481.magical-string/README.md b/Algorithms/0481.magical-string/README.md new file mode 100755 index 000000000..b3d75ca5c --- /dev/null +++ b/Algorithms/0481.magical-string/README.md @@ -0,0 +1,37 @@ +# [481. Magical String](https://leetcode.com/problems/magical-string/) + +## 题目 + +A magical string S consists of only '1' and '2' and obeys the following rules: + +The string S is magical because concatenating the number of contiguous occurrences of characters '1' and '2' generates the string S itself. + +The first few elements of string S is the following: +S = "1221121221221121122……" + +If we group the consecutive '1's and '2's in S, it will be: + +1 22 11 2 1 22 1 22 11 2 11 22 ...... + +and the occurrences of '1's or '2's in each group are: + +1 2 2 1 1 2 1 2 2 1 2 2 ...... + +You can see that the occurrence sequence above is the S itself. + +Given an integer N as input, return the number of '1's in the first N number in the magical string S. + +Note: +N will not exceed 100,000. + +Example 1: + +```text +Input: 6 +Output: 3 +Explanation: The first 6 elements of magical string S is "12211" and it contains three 1's, so return 3. +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0481.magical-string/magical-string.go b/Algorithms/0481.magical-string/magical-string.go new file mode 100755 index 000000000..dbe48da1d --- /dev/null +++ b/Algorithms/0481.magical-string/magical-string.go @@ -0,0 +1,35 @@ +package Problem0481 + +import ( + "strings" +) + +// 解题思路 +// 1. 构造出完美字符串 s +// 2. 统计 s 中 1 的个数 +func magicalString(n int) int { + // n+2 是为了防止添加字符时溢出 + bytes := make([]byte, n+2) + + copy(bytes, "122") + + // i 指向下一个要添加字符的数量 + // j 始终指向 bytes 中最后一个字符,以便确定下一个需要添加的字符 + i, j := 2, 2 + for j < n { + // b 是下一个要填写的字符 + b := (bytes[j] - '0') ^ 3 + '0' + // c 是下一个要填写字符的数量 + c := bytes[i] - '0' + i++ + + // 在bytes中添加 c 个字符 b + for c > 0 { + j++ + bytes[j] = b + c-- + } + } + + return strings.Count(string(bytes[:n]), "1") +} diff --git a/Algorithms/0481.magical-string/magical-string_test.go b/Algorithms/0481.magical-string/magical-string_test.go new file mode 100755 index 000000000..09cfd58b9 --- /dev/null +++ b/Algorithms/0481.magical-string/magical-string_test.go @@ -0,0 +1,46 @@ +package Problem0481 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + n int + ans int +}{ + + // {100000, 49972}, + + // {10000, 4996}, + + // {1000, 502}, + + // {100, 49}, + + {10, 5}, + + {1, 1}, + + // 可以有多个 testcase +} + +func Test_magicalString(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, magicalString(tc.n), "输入:%v", tc) + } +} + +func Benchmark_magicalString(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + magicalString(tc.n) + } + } +} diff --git a/Algorithms/0482.license-key-formatting/482.100.png b/Algorithms/0482.license-key-formatting/482.100.png new file mode 100644 index 000000000..9534675b0 Binary files /dev/null and b/Algorithms/0482.license-key-formatting/482.100.png differ diff --git a/Algorithms/0482.license-key-formatting/README.md b/Algorithms/0482.license-key-formatting/README.md new file mode 100755 index 000000000..d99f04e60 --- /dev/null +++ b/Algorithms/0482.license-key-formatting/README.md @@ -0,0 +1,41 @@ +# [482. License Key Formatting](https://leetcode.com/problems/license-key-formatting/) + +## 题目 + +Now you are given a string S, which represents a software license key which we would like to format. The string S is composed of alphanumerical characters and dashes. The dashes split the alphanumerical characters within the string into groups. (i.e. if there are M dashes, the string is split into M+1 groups). The dashes in the given string are possibly misplaced. + +We want each group of characters to be of length K (except for possibly the first group, which could be shorter, but still must contain at least one character). To satisfy this requirement, we will reinsert dashes. Additionally, all the lower case letters in the string must be converted to upper case. + +So, you are given a non-empty string S, representing a license key to format, and an integer K. And you need to return the license key formatted according to the description above. + +Example 1: + +```text +Input: S = "2-4A0r7-4k", K = 4 + +Output: "24A0-R74K" + +Explanation: The string S has been split into two parts, each part has 4 characters. +``` + +Example 2: + +```text +Input: S = "2-4A0r7-4k", K = 3 + +Output: "24-A0R-74K" + +Explanation: The string S has been split into three parts, each part has 3 characters except the first part as it could be shorter as said above. +``` + +Note: + +1. The length of string S will not exceed 12,000, and K is a positive integer. +1. String S consists only of alphanumerical characters (a-z and/or A-Z and/or 0-9) and dashes(-). +1. String S is non-empty. + +## 解题思路 + +见程序注释 + +![100](482.100.png) \ No newline at end of file diff --git a/Algorithms/0482.license-key-formatting/license-key-formatting.go b/Algorithms/0482.license-key-formatting/license-key-formatting.go new file mode 100755 index 000000000..71046db54 --- /dev/null +++ b/Algorithms/0482.license-key-formatting/license-key-formatting.go @@ -0,0 +1,42 @@ +package Problem0482 + +import ( + "strings" +) + +func licenseKeyFormatting(s string, k int) string { + // 统计 s 中的 "-" 的个数 + countDashs := strings.Count(s, "-") + // 统计 s 中字母和数字的个数 + countAN := len(s) - countDashs + + if countAN == 0 { + return "" + } + + // 删除 '-' ,并把所有的字母改成大写 + s = strings.Replace(s, "-", "", -1) + s = strings.ToUpper(s) + + // (countAN+k-1)/k-1 是 res 中 '-' 的个数 + res := make([]byte, (countAN+k-1)/k-1+countAN) + + i, j := len(res), len(s) + for 0 <= j-k { + copy(res[i-k:i], s[j-k:j]) + + if 0 <= i-k-1 { + res[i-k-1] = '-' + } + + i -= k + 1 + j -= k + } + + // 处理头部不完整的字符 + if j > 0 { + copy(res[:j], s[:j]) + } + + return string(res) +} diff --git a/Algorithms/0482.license-key-formatting/license-key-formatting_test.go b/Algorithms/0482.license-key-formatting/license-key-formatting_test.go new file mode 100755 index 000000000..2c84e7b89 --- /dev/null +++ b/Algorithms/0482.license-key-formatting/license-key-formatting_test.go @@ -0,0 +1,59 @@ +package Problem0482 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + S string + K int + ans string +}{ + + { + "---", + 3, + "", + }, + + { + "24A0r7-4k", + 3, + "24-A0R-74K", + }, + + { + "2-4A0r7-4k", + 4, + "24A0-R74K", + }, + + { + "2-4A0r7-4k", + 3, + "24-A0R-74K", + }, + + // 可以有多个 testcase +} + +func Test_licenseKeyFormatting(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, licenseKeyFormatting(tc.S, tc.K), "输入:%v", tc) + } +} + +func Benchmark_licenseKeyFormatting(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + licenseKeyFormatting(tc.S, tc.K) + } + } +} diff --git a/Algorithms/0483.smallest-good-base/README.md b/Algorithms/0483.smallest-good-base/README.md new file mode 100755 index 000000000..3b293eca9 --- /dev/null +++ b/Algorithms/0483.smallest-good-base/README.md @@ -0,0 +1,64 @@ +# [483. Smallest Good Base](https://leetcode.com/problems/smallest-good-base/) + +## 题目 + +For an integer n, we call k>=2 a good base of n, if all digits of n base k are 1. +Now given a string representing n, you should return the smallest good base of n in string format. + +把 n 转换成 k 进制后,新的数全是 1 + +Example 1: + +```text +Input: "13" +Output: "3" +Explanation: 13 base 3 is 111. +``` + +Example 2: + +```text +Input: "4681" +Output: "8" +Explanation: 4681 base 8 is 11111. +``` + +Example 3: + +```text +Input: "1000000000000000000" +Output: "999999999999999999" +Explanation: 1000000000000000000 base 999999999999999999 is 11. +``` + +Note: + +1. The range of n is [3, 10^18]. +1. The string representing n is always valid and will not have leading zeros. + +## 解题思路 + +见程序注释 + +```golang +func smallestGoodBase(n string) string { + num, _ := strconv.Atoi(n) + + mMax := int(math.Log2(float64(num))) + + for m := mMax; 1 < m; m-- { + k := int(math.Pow(float64(num), 1.0/float64(m))) + + tmp := int(math.Pow(float64(k), float64(m)+1)-1) / (k - 1) + + if tmp == num { + return strconv.Itoa(k) + } + } + + return strconv.Itoa(num - 1) +} +``` + +以上程序在逻辑和数学上都是完全正确的,但是无法得出正确的解。 +例如,当输入"16035713712910627",其解为"502",但是当 for 循环中的 k == 502 时,temp == 16035713712910626 与 num 不相等。这是由于精度不够引起的错误。 diff --git a/Algorithms/0483.smallest-good-base/smallest-good-base.go b/Algorithms/0483.smallest-good-base/smallest-good-base.go new file mode 100755 index 000000000..d22824ed0 --- /dev/null +++ b/Algorithms/0483.smallest-good-base/smallest-good-base.go @@ -0,0 +1,47 @@ +package Problem0483 + +import ( + "math" + "strconv" +) + +func smallestGoodBase(n string) string { + num, _ := strconv.ParseUint(n, 10, 64) + // num = k^m + k^(m-1) + ... + k + 1 + // 想要找到最小的 k + // 可知 k 变小的时候,m 会变大 + // k 最小可以是 2,即是 二进制 + // k == 2 时,m == mMax + mMax := int(math.Log2(float64(num))) + + // 从 mMax 开始往下检查,对应的 k 能否满足题意 + for m := mMax; m >= 1; m-- { + // k^m < num = k^m + k^(m-1) + ... + k + 1 + // 展开 (k+1)^m 后,可知 + // (k+1)^m > num = k^m + k^(m-1) + ... + k + 1 + // 综上所示 + // k^m < num < (k+1)^m,即 + // k < num^(1/m) < k+1,即 + // k == int(num^(1/m)) + k := uint64(math.Pow(float64(num), 1.0/float64(m))) + // 这样就确定了 k 的取值,只需要验证 k 是否满足题意即可 + if isFound(num, k, m) { + return strconv.FormatUint(k, 10) + } + } + + return strconv.FormatUint(num-1, 10) +} + +// 返回 num == k^m + k^(m-1) + ... + k + 1 +func isFound(num, k uint64, m int) bool { + sum := uint64(1) + a := uint64(1) + + for i := 1; i <= m; i++ { + a *= k + sum += a + } + + return sum == num +} diff --git a/Algorithms/0483.smallest-good-base/smallest-good-base_test.go b/Algorithms/0483.smallest-good-base/smallest-good-base_test.go new file mode 100755 index 000000000..44f170df1 --- /dev/null +++ b/Algorithms/0483.smallest-good-base/smallest-good-base_test.go @@ -0,0 +1,64 @@ +package Problem0483 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + n string + ans string +}{ + + { + "2251799813685247", + "2", + }, + + { + "4681", + "8", + }, + + { + "16035713712910627", + "502", + }, + + { + "14919921443713777", + "496", + }, + + { + "13", + "3", + }, + + { + "1000000000000000000", + "999999999999999999", + }, + + // 可以有多个 testcase +} + +func Test_smallestGoodBase(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, smallestGoodBase(tc.n), "输入:%v", tc) + } +} + +func Benchmark_smallestGoodBase(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + smallestGoodBase(tc.n) + } + } +} diff --git a/Algorithms/0486.predict-the-winner/README.md b/Algorithms/0486.predict-the-winner/README.md new file mode 100755 index 000000000..e14361c3f --- /dev/null +++ b/Algorithms/0486.predict-the-winner/README.md @@ -0,0 +1,33 @@ +# [486. Predict the Winner](https://leetcode.com/problems/predict-the-winner/) + +## 题目 + +Given an array of scores that are non-negative integers. Player 1 picks one of the numbers from either end of the array followed by the player 2 and then player 1 and so on. Each time a player picks a number, that number will not be available for the next player. This continues until all the scores have been chosen. The player with the maximum score wins. + +Given an array of scores, predict whether player 1 is the winner. You can assume each player plays to maximize his score. + +Example 1: + +```text +Input: [1, 5, 2] +Output: False +Explanation: Initially, player 1 can choose between 1 and 2. If he chooses 2 (or 1), then player 2 can choose from 1 (or 2) and 5. If player 2 chooses 5, then player 1 will be left with 1 (or 2). So, final score of player 1 is 1 + 2 = 3, and player 2 is 5. Hence, player 1 will never be the winner and you need to return False. +``` + +Example 2: + +```text +Input: [1, 5, 233, 7] +Output: True +Explanation: Player 1 first chooses 1. Then player 2 have to choose between 5 and 7. No matter which number player 2 choose, player 1 can choose 233.Finally, player 1 has more score (234) than player 2 (12), so you need to return True representing player1 can win. +``` + +Note: + +1. 1 <= length of the array <= 20. +1. Any scores in the given array are non-negative integers and will not exceed 10,000,000. +1. If the scores of both players are equal, then player 1 is still the winner. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0486.predict-the-winner/predict-the-winner.go b/Algorithms/0486.predict-the-winner/predict-the-winner.go new file mode 100755 index 000000000..0a66bd789 --- /dev/null +++ b/Algorithms/0486.predict-the-winner/predict-the-winner.go @@ -0,0 +1,41 @@ +package Problem0486 + +// PredictTheWinner 在 play1 能赢的时候,返回 true +func PredictTheWinner(nums []int) bool { + n := len(nums) + + // dp[i][j] 表示 nums[i:j+1] 中 play1 比 play2 多的得分 + // dp[0][n-1] >=0 表示 play1 获胜 + dp := make([][]int, n) + for i := range dp { + dp[i] = make([]int, n) + // 只有 nums[i] 时,play1 比 play2 多 nums[i] 分 + // 因为 play1 选了 nums[i],而 play2 无数可选了 + dp[i][i] = nums[i] + } + + for Len := 2; Len <= n; Len++ { + for i := 0; i <= n-Len; i++ { + // Len == j - i + 1 + j := i + Len - 1 + + // dp[i][j] 表示 nums[i:j+1] 中 play1 比 play2 多的得分 + // 那么 -dp[i][j] 表示什么呢? + // -dp[i][j] 表示 nums[i:j+1] 中 play2 比 play1 多的得分 + // 所以, + // nums[i]-dp[i+1][j] 等于 play1 选择 左端 的数后比 play2 多的得分 + // nums[j]-dp[i][j-1] 等于 play1 选择 右端 的数后比 play2 多的得分 + // 从以上两者之间,选择一个大的,作为 dp[i][j] + dp[i][j] = max(nums[i]-dp[i+1][j], nums[j]-dp[i][j-1]) + } + } + + return dp[0][n-1] >= 0 +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} diff --git a/Algorithms/0486.predict-the-winner/predict-the-winner_test.go b/Algorithms/0486.predict-the-winner/predict-the-winner_test.go new file mode 100755 index 000000000..7b3158dd3 --- /dev/null +++ b/Algorithms/0486.predict-the-winner/predict-the-winner_test.go @@ -0,0 +1,59 @@ +package Problem0486 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans bool +}{ + + { + []int{0}, + true, + }, + + { + []int{2}, + true, + }, + + { + []int{1, 1}, + true, + }, + + { + []int{1, 5, 2}, + false, + }, + + { + []int{1, 5, 233, 7}, + true, + }, + + // 可以有多个 testcase +} + +func Test_PredictTheWinner(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, PredictTheWinner(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_PredictTheWinner(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + PredictTheWinner(tc.nums) + } + } +} diff --git a/Algorithms/0488.zuma-game/README.md b/Algorithms/0488.zuma-game/README.md new file mode 100755 index 000000000..f0153fbaf --- /dev/null +++ b/Algorithms/0488.zuma-game/README.md @@ -0,0 +1,40 @@ +# [488. Zuma Game](https://leetcode.com/problems/zuma-game/) + +## 题目 + +Think about Zuma Game. You have a row of balls on the table, colored red(R), yellow(Y), blue(B), green(G), and white(W). You also have several balls in your hand. + +Each time, you may choose a ball in your hand, and insert it into the row (including the leftmost place and rightmost place). Then, if there is a group of 3 or more balls in the same color touching, remove these balls. Keep doing this until no more balls can be removed. + +Find the minimal balls you have to insert to remove all the balls on the table. If you cannot remove all the balls, output -1. + +Examples: + +```text +Input: "WRRBBW", "RB" +Output: -1 +Explanation: WRRBBW -> WRR[R]BBW -> WBBW -> WBB[B]W -> WW + +Input: "WWRRBBWW", "WRBRW" +Output: 2 +Explanation: WWRRBBWW -> WWRR[R]BBWW -> WWBBWW -> WWBB[B]WW -> WWWW -> empty + +Input:"G", "GGGGG" +Output: 2 +Explanation: G -> G[G] -> GG[G] -> empty + +Input: "RBYYBBRRB", "YRBGB" +Output: 3 +Explanation: RBYYBBRRB -> RBYY[Y]BBRRB -> RBBBRRB -> RRRB -> B -> B[B] -> BB[B] -> empty +``` + +Note: + +1. You may assume that the initial row of balls on the table won’t have any 3 or more consecutive balls with the same color. +1. The number of balls on the table won't exceed 20, and the string represents these balls is called "board" in the input. +1. The number of balls in your hand won't exceed 5, and the string represents these balls is called "hand" in the input. +1. Both input strings will be non-empty and only contain characters 'R','Y','B','G','W'. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0488.zuma-game/zuma-game.go b/Algorithms/0488.zuma-game/zuma-game.go new file mode 100755 index 000000000..299cc8e4c --- /dev/null +++ b/Algorithms/0488.zuma-game/zuma-game.go @@ -0,0 +1,61 @@ +package Problem0488 + +var maxCount = 6 + +func findMinStep(board, hand string) int { + // ball[i] = j 表示, 手上拥有 i+'A' 颜色的球的个数 + ball := make([]int, 26) + for i := 0; i < len(hand); i++ { + ball[hand[i]-'A']++ + } + + res := dfs(board+"#", ball) + if res == maxCount { + return -1 + } + return res +} + +func dfs(s string, ball []int) int { + s = removeBalls(s) + if s == "#" { + return 0 + } + res, need := maxCount, 0 + + for i, j := 0, 0; j < len(s); j++ { + if s[j] == s[i] { + continue + } + need = 3 - (j - i) + if ball[s[i]-'A'] >= need { + ball[s[i]-'A'] -= need + res = min(res, need+dfs(s[:i]+s[j:], ball)) + ball[s[i]-'A'] += need + } + i = j + } + + return res +} + +// 删除 board 中 3 个及以上同色的球 +func removeBalls(board string) string { + for i, j := 0, 0; j < len(board); j++ { + if board[i] == board[j] { + continue + } + if i+3 <= j { + return removeBalls(board[:i] + board[j:]) + } + i = j + } + return board +} + +func min(a, b int) int { + if a < b { + return a + } + return b +} diff --git a/Algorithms/0488.zuma-game/zuma-game_test.go b/Algorithms/0488.zuma-game/zuma-game_test.go new file mode 100755 index 000000000..9885c64a6 --- /dev/null +++ b/Algorithms/0488.zuma-game/zuma-game_test.go @@ -0,0 +1,70 @@ +package Problem0488 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + board string + hand string + ans int +}{ + + { + // TODO: 这个 test case 官方程序会返回 -1 + // 实际上正确答案是 2 + // RRWWRRBBRR -> RRWWRRBBR[W]R -> RRWWRRBB[B]RWR -> RRWWRRRWR -> RRWWWR -> RRR -> + // 这也是我暂时没有做这个题目的原因 + + "RRWWRRBBRR", + "WB", + -1, + }, + + { + "WRRBBW", + "RB", + -1, + }, + + { + "WWRRBBWW", + "WRBRW", + 2, + }, + + { + "G", + "GGGGG", + 2, + }, + + { + "RBYYBBRRB", + "YRBGB", + 3, + }, + + // 可以有多个 testcase +} + +func Test_findMinStep(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findMinStep(tc.board, tc.hand), "输入:%v", tc) + } +} + +func Benchmark_findMinStep(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findMinStep(tc.board, tc.hand) + } + } +} diff --git a/Algorithms/0491.increasing-subsequences/README.md b/Algorithms/0491.increasing-subsequences/README.md new file mode 100755 index 000000000..58a8d3819 --- /dev/null +++ b/Algorithms/0491.increasing-subsequences/README.md @@ -0,0 +1,22 @@ +# [491. Increasing Subsequences](https://leetcode.com/problems/increasing-subsequences/) + +## 题目 + +Given an integer array, your task is to find all the different possible increasing subsequences of the given array, and the length of an increasing subsequence should be at least 2 . + +Example: + +```text +Input: [4, 6, 7, 7] +Output: [[4, 6], [4, 7], [4, 6, 7], [4, 6, 7, 7], [6, 7], [6, 7, 7], [7,7], [4,7,7]] +``` + +Note: + +1. The length of the given array will not exceed 15. +1. The range of integer in the given array is [-100,100]. +1. The given array may contain duplicates, and two equal integers should also be considered as a special case of increasing sequence. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0491.increasing-subsequences/increasing-subsequences.go b/Algorithms/0491.increasing-subsequences/increasing-subsequences.go new file mode 100755 index 000000000..d021f2c2b --- /dev/null +++ b/Algorithms/0491.increasing-subsequences/increasing-subsequences.go @@ -0,0 +1,33 @@ +package Problem0491 + +// TODO: 让这个题目 accepted +func findSubsequences(nums []int) [][]int { + size := len(nums) + res := [][]int{} + list := make([]int, 0, size) + helper(nums, 0, &res, list) + return res +} + +func helper(nums []int, index int, res *[][]int, list []int) { + if index == len(nums) { + if len(list) > 1 { + temp := make([]int, len(list)) + copy(temp, list) + *res = append(*res, temp) + } + return + } + + if len(list) == 0 || + list[len(list)-1] <= nums[index] { + list = append(list, nums[index]) + helper(nums, index+1, res, list) + list = list[:len(list)-1] + } + + if len(list) == 0 || + list[len(list)-1] != nums[index] { + helper(nums, index+1, res, list) + } +} diff --git a/Algorithms/0491.increasing-subsequences/increasing-subsequences_test.go b/Algorithms/0491.increasing-subsequences/increasing-subsequences_test.go new file mode 100755 index 000000000..4e4a7b280 --- /dev/null +++ b/Algorithms/0491.increasing-subsequences/increasing-subsequences_test.go @@ -0,0 +1,76 @@ +package Problem0491 + +import ( + "sort" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans [][]int +}{ + + { + []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}, + [][]int{{1,2},{1,2,3},{1,2,3,4},{1,2,3,4,5},{1,2,3,4,5,6},{1,2,3,4,5,6,7},{1,2,3,4,5,6,7,8},{1,2,3,4,5,6,7,8,9},{1,2,3,4,5,6,7,8,9,10},{1,2,3,4,5,6,7,8,9,10,11},{1,2,3,4,5,6,7,8,9,10,11,12},{1,2,3,4,5,6,7,8,9,10,11,12,13},{1,2,3,4,5,6,7,8,9,10,11,12,13,14},{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15},{1,2,3,4,5,6,7,8,9,10,11,12,13,15},{1,2,3,4,5,6,7,8,9,10,11,12,14},{1,2,3,4,5,6,7,8,9,10,11,12,14,15},{1,2,3,4,5,6,7,8,9,10,11,12,15},{1,2,3,4,5,6,7,8,9,10,11,13},{1,2,3,4,5,6,7,8,9,10,11,13,14},{1,2,3,4,5,6,7,8,9,10,11,13,14,15},{1,2,3,4,5,6,7,8,9,10,11,13,15},{1,2,3,4,5,6,7,8,9,10,11,14},{1,2,3,4,5,6,7,8,9,10,11,14,15},{1,2,3,4,5,6,7,8,9,10,11,15},{1,2,3,4,5,6,7,8,9,10,12},{1,2,3,4,5,6,7,8,9,10,12,13},{1,2,3,4,5,6,7,8,9,10,12,13,14},{1,2,3,4,5,6,7,8,9,10,12,13,14,15},{1,2,3,4,5,6,7,8,9,10,12,13,15},{1,2,3,4,5,6,7,8,9,10,12,14},{1,2,3,4,5,6,7,8,9,10,12,14,15},{1,2,3,4,5,6,7,8,9,10,12,15},{1,2,3,4,5,6,7,8,9,10,13},{1,2,3,4,5,6,7,8,9,10,13,14},{1,2,3,4,5,6,7,8,9,10,13,14,15},{1,2,3,4,5,6,7,8,9,10,13,15},{1,2,3,4,5,6,7,8,9,10,14},{1,2,3,4,5,6,7,8,9,10,14,15},{1,2,3,4,5,6,7,8,9,10,15},{1,2,3,4,5,6,7,8,9,11},{1,2,3,4,5,6,7,8,9,11,12},{1,2,3,4,5,6,7,8,9,11,12,13},{1,2,3,4,5,6,7,8,9,11,12,13,14},{1,2,3,4,5,6,7,8,9,11,12,13,14,15},{1,2,3,4,5,6,7,8,9,11,12,13,15},{1,2,3,4,5,6,7,8,9,11,12,14},{1,2,3,4,5,6,7,8,9,11,12,14,15},{1,2,3,4,5,6,7,8,9,11,12,15},{1,2,3,4,5,6,7,8,9,11,13},{1,2,3,4,5,6,7,8,9,11,13,14},{1,2,3,4,5,6,7,8,9,11,13,14,15},{1,2,3,4,5,6,7,8,9,11,13,15},{1,2,3,4,5,6,7,8,9,11,14},{1,2,3,4,5,6,7,8,9,11,14,15},{1,2,3,4,5,6,7,8,9,11,15},{1,2,3,4,5,6,7,8,9,12},{1,2,3,4,5,6,7,8,9,12,13},{1,2,3,4,5,6,7,8,9,12,13,14},{1,2,3,4,5,6,7,8,9,12,13,14,15},{1,2,3,4,5,6,7,8,9,12,13,15},{1,2,3,4,5,6,7,8,9,12,14},{1,2,3,4,5,6,7,8,9,12,14,15},{1,2,3,4,5,6,7,8,9,12,15},{1,2,3,4,5,6,7,8,9,13},{1,2,3,4,5,6,7,8,9,13,14},{1,2,3,4,5,6,7,8,9,13,14,15},{1,2,3,4,5,6,7,8,9,13,15},{1,2,3,4,5,6,7,8,9,14},{1,2,3,4,5,6,7,8,9,14,15},{1,2,3,4,5,6,7,8,9,15},{1,2,3,4,5,6,7,8,10},{1,2,3,4,5,6,7,8,10,11},{1,2,3,4,5,6,7,8,10,11,12},{1,2,3,4,5,6,7,8,10,11,12,13},{1,2,3,4,5,6,7,8,10,11,12,13,14},{1,2,3,4,5,6,7,8,10,11,12,13,14,15},{1,2,3,4,5,6,7,8,10,11,12,13,15},{1,2,3,4,5,6,7,8,10,11,12,14},{1,2,3,4,5,6,7,8,10,11,12,14,15},{1,2,3,4,5,6,7,8,10,11,12,15},{1,2,3,4,5,6,7,8,10,11,13},{1,2,3,4,5,6,7,8,10,11,13,14},{1,2,3,4,5,6,7,8,10,11,13,14,15},{1,2,3,4,5,6,7,8,10,11,13,15},{1,2,3,4,5,6,7,8,10,11,14},{1,2,3,4,5,6,7,8,10,11,14,15},{1,2,3,4,5,6,7,8,10,11,15},{1,2,3,4,5,6,7,8,10,12},{1,2,3,4,5,6,7,8,10,12,13},{1,2,3,4,5,6,7,8,10,12,13,14},{1,2,3,4,5,6,7,8,10,12,13,14,15},{1,2,3,4,5,6,7,8,10,12,13,15},{1,2,3,4,5,6,7,8,10,12,14},{1,2,3,4,5,6,7,8,10,12,14,15},{1,2,3,4,5,6,7,8,10,12,15},{1,2,3,4,5,6,7,8,10,13},{1,2,3,4,5,6,7,8,10,13,14},{1,2,3,4,5,6,7,8,10,13,14,15},{1,2,3,4,5,6,7,8,10,13,15},{1,2,3,4,5,6,7,8,10,14},{1,2,3,4,5,6,7,8,10,14,15},{1,2,3,4,5,6,7,8,10,15},{1,2,3,4,5,6,7,8,11},{1,2,3,4,5,6,7,8,11,12},{1,2,3,4,5,6,7,8,11,12,13},{1,2,3,4,5,6,7,8,11,12,13,14},{1,2,3,4,5,6,7,8,11,12,13,14,15},{1,2,3,4,5,6,7,8,11,12,13,15},{1,2,3,4,5,6,7,8,11,12,14},{1,2,3,4,5,6,7,8,11,12,14,15},{1,2,3,4,5,6,7,8,11,12,15},{1,2,3,4,5,6,7,8,11,13},{1,2,3,4,5,6,7,8,11,13,14},{1,2,3,4,5,6,7,8,11,13,14,15},{1,2,3,4,5,6,7,8,11,13,15},{1,2,3,4,5,6,7,8,11,14},{1,2,3,4,5,6,7,8,11,14,15},{1,2,3,4,5,6,7,8,11,15},{1,2,3,4,5,6,7,8,12},{1,2,3,4,5,6,7,8,12,13},{1,2,3,4,5,6,7,8,12,13,14},{1,2,3,4,5,6,7,8,12,13,14,15},{1,2,3,4,5,6,7,8,12,13,15},{1,2,3,4,5,6,7,8,12,14},{1,2,3,4,5,6,7,8,12,14,15},{1,2,3,4,5,6,7,8,12,15},{1,2,3,4,5,6,7,8,13},{1,2,3,4,5,6,7,8,13,14},{1,2,3,4,5,6,7,8,13,14,15},{1,2,3,4,5,6,7,8,13,15},{1,2,3,4,5,6,7,8,14},{1,2,3,4,5,6,7,8,14,15},{1,2,3,4,5,6,7,8,15},{1,2,3,4,5,6,7,9},{1,2,3,4,5,6,7,9,10},{1,2,3,4,5,6,7,9,10,11},{1,2,3,4,5,6,7,9,10,11,12},{1,2,3,4,5,6,7,9,10,11,12,13},{1,2,3,4,5,6,7,9,10,11,12,13,14},{1,2,3,4,5,6,7,9,10,11,12,13,14,15},{1,2,3,4,5,6,7,9,10,11,12,13,15},{1,2,3,4,5,6,7,9,10,11,12,14},{1,2,3,4,5,6,7,9,10,11,12,14,15},{1,2,3,4,5,6,7,9,10,11,12,15},{1,2,3,4,5,6,7,9,10,11,13},{1,2,3,4,5,6,7,9,10,11,13,14},{1,2,3,4,5,6,7,9,10,11,13,14,15},{1,2,3,4,5,6,7,9,10,11,13,15},{1,2,3,4,5,6,7,9,10,11,14},{1,2,3,4,5,6,7,9,10,11,14,15},{1,2,3,4,5,6,7,9,10,11,15},{1,2,3,4,5,6,7,9,10,12},{1,2,3,4,5,6,7,9,10,12,13},{1,2,3,4,5,6,7,9,10,12,13,14},{1,2,3,4,5,6,7,9,10,12,13,14,15},{1,2,3,4,5,6,7,9,10,12,13,15},{1,2,3,4,5,6,7,9,10,12,14},{1,2,3,4,5,6,7,9,10,12,14,15},{1,2,3,4,5,6,7,9,10,12,15},{1,2,3,4,5,6,7,9,10,13},{1,2,3,4,5,6,7,9,10,13,14},{1,2,3,4,5,6,7,9,10,13,14,15},{1,2,3,4,5,6,7,9,10,13,15},{1,2,3,4,5,6,7,9,10,14},{1,2,3,4,5,6,7,9,10,14,15},{1,2,3,4,5,6,7,9,10,15},{1,2,3,4,5,6,7,9,11},{1,2,3,4,5,6,7,9,11,12},{1,2,3,4,5,6,7,9,11,12,13},{1,2,3,4,5,6,7,9,11,12,13,14},{1,2,3,4,5,6,7,9,11,12,13,14,15},{1,2,3,4,5,6,7,9,11,12,13,15},{1,2,3,4,5,6,7,9,11,12,14},{1,2,3,4,5,6,7,9,11,12,14,15},{1,2,3,4,5,6,7,9,11,12,15},{1,2,3,4,5,6,7,9,11,13},{1,2,3,4,5,6,7,9,11,13,14},{1,2,3,4,5,6,7,9,11,13,14,15},{1,2,3,4,5,6,7,9,11,13,15},{1,2,3,4,5,6,7,9,11,14},{1,2,3,4,5,6,7,9,11,14,15},{1,2,3,4,5,6,7,9,11,15},{1,2,3,4,5,6,7,9,12},{1,2,3,4,5,6,7,9,12,13},{1,2,3,4,5,6,7,9,12,13,14},{1,2,3,4,5,6,7,9,12,13,14,15},{1,2,3,4,5,6,7,9,12,13,15},{1,2,3,4,5,6,7,9,12,14},{1,2,3,4,5,6,7,9,12,14,15},{1,2,3,4,5,6,7,9,12,15},{1,2,3,4,5,6,7,9,13},{1,2,3,4,5,6,7,9,13,14},{1,2,3,4,5,6,7,9,13,14,15},{1,2,3,4,5,6,7,9,13,15},{1,2,3,4,5,6,7,9,14},{1,2,3,4,5,6,7,9,14,15},{1,2,3,4,5,6,7,9,15},{1,2,3,4,5,6,7,10},{1,2,3,4,5,6,7,10,11},{1,2,3,4,5,6,7,10,11,12},{1,2,3,4,5,6,7,10,11,12,13},{1,2,3,4,5,6,7,10,11,12,13,14},{1,2,3,4,5,6,7,10,11,12,13,14,15},{1,2,3,4,5,6,7,10,11,12,13,15},{1,2,3,4,5,6,7,10,11,12,14},{1,2,3,4,5,6,7,10,11,12,14,15},{1,2,3,4,5,6,7,10,11,12,15},{1,2,3,4,5,6,7,10,11,13},{1,2,3,4,5,6,7,10,11,13,14},{1,2,3,4,5,6,7,10,11,13,14,15},{1,2,3,4,5,6,7,10,11,13,15},{1,2,3,4,5,6,7,10,11,14},{1,2,3,4,5,6,7,10,11,14,15},{1,2,3,4,5,6,7,10,11,15},{1,2,3,4,5,6,7,10,12},{1,2,3,4,5,6,7,10,12,13},{1,2,3,4,5,6,7,10,12,13,14},{1,2,3,4,5,6,7,10,12,13,14,15},{1,2,3,4,5,6,7,10,12,13,15},{1,2,3,4,5,6,7,10,12,14},{1,2,3,4,5,6,7,10,12,14,15},{1,2,3,4,5,6,7,10,12,15},{1,2,3,4,5,6,7,10,13},{1,2,3,4,5,6,7,10,13,14},{1,2,3,4,5,6,7,10,13,14,15},{1,2,3,4,5,6,7,10,13,15},{1,2,3,4,5,6,7,10,14},{1,2,3,4,5,6,7,10,14,15},{1,2,3,4,5,6,7,10,15},{1,2,3,4,5,6,7,11},{1,2,3,4,5,6,7,11,12},{1,2,3,4,5,6,7,11,12,13},{1,2,3,4,5,6,7,11,12,13,14},{1,2,3,4,5,6,7,11,12,13,14,15},{1,2,3,4,5,6,7,11,12,13,15},{1,2,3,4,5,6,7,11,12,14},{1,2,3,4,5,6,7,11,12,14,15},{1,2,3,4,5,6,7,11,12,15},{1,2,3,4,5,6,7,11,13},{1,2,3,4,5,6,7,11,13,14},{1,2,3,4,5,6,7,11,13,14,15},{1,2,3,4,5,6,7,11,13,15},{1,2,3,4,5,6,7,11,14},{1,2,3,4,5,6,7,11,14,15},{1,2,3,4,5,6,7,11,15},{1,2,3,4,5,6,7,12},{1,2,3,4,5,6,7,12,13},{1,2,3,4,5,6,7,12,13,14},{1,2,3,4,5,6,7,12,13,14,15},{1,2,3,4,5,6,7,12,13,15},{1,2,3,4,5,6,7,12,14},{1,2,3,4,5,6,7,12,14,15},{1,2,3,4,5,6,7,12,15},{1,2,3,4,5,6,7,13},{1,2,3,4,5,6,7,13,14},{1,2,3,4,5,6,7,13,14,15},{1,2,3,4,5,6,7,13,15},{1,2,3,4,5,6,7,14},{1,2,3,4,5,6,7,14,15},{1,2,3,4,5,6,7,15},{1,2,3,4,5,6,8},{1,2,3,4,5,6,8,9},{1,2,3,4,5,6,8,9,10},{1,2,3,4,5,6,8,9,10,11},{1,2,3,4,5,6,8,9,10,11,12},{1,2,3,4,5,6,8,9,10,11,12,13},{1,2,3,4,5,6,8,9,10,11,12,13,14},{1,2,3,4,5,6,8,9,10,11,12,13,14,15},{1,2,3,4,5,6,8,9,10,11,12,13,15},{1,2,3,4,5,6,8,9,10,11,12,14},{1,2,3,4,5,6,8,9,10,11,12,14,15},{1,2,3,4,5,6,8,9,10,11,12,15},{1,2,3,4,5,6,8,9,10,11,13},{1,2,3,4,5,6,8,9,10,11,13,14},{1,2,3,4,5,6,8,9,10,11,13,14,15},{1,2,3,4,5,6,8,9,10,11,13,15},{1,2,3,4,5,6,8,9,10,11,14},{1,2,3,4,5,6,8,9,10,11,14,15},{1,2,3,4,5,6,8,9,10,11,15},{1,2,3,4,5,6,8,9,10,12},{1,2,3,4,5,6,8,9,10,12,13},{1,2,3,4,5,6,8,9,10,12,13,14},{1,2,3,4,5,6,8,9,10,12,13,14,15},{1,2,3,4,5,6,8,9,10,12,13,15},{1,2,3,4,5,6,8,9,10,12,14},{1,2,3,4,5,6,8,9,10,12,14,15},{1,2,3,4,5,6,8,9,10,12,15},{1,2,3,4,5,6,8,9,10,13},{1,2,3,4,5,6,8,9,10,13,14},{1,2,3,4,5,6,8,9,10,13,14,15},{1,2,3,4,5,6,8,9,10,13,15},{1,2,3,4,5,6,8,9,10,14},{1,2,3,4,5,6,8,9,10,14,15},{1,2,3,4,5,6,8,9,10,15},{1,2,3,4,5,6,8,9,11},{1,2,3,4,5,6,8,9,11,12},{1,2,3,4,5,6,8,9,11,12,13},{1,2,3,4,5,6,8,9,11,12,13,14},{1,2,3,4,5,6,8,9,11,12,13,14,15},{1,2,3,4,5,6,8,9,11,12,13,15},{1,2,3,4,5,6,8,9,11,12,14},{1,2,3,4,5,6,8,9,11,12,14,15},{1,2,3,4,5,6,8,9,11,12,15},{1,2,3,4,5,6,8,9,11,13},{1,2,3,4,5,6,8,9,11,13,14},{1,2,3,4,5,6,8,9,11,13,14,15},{1,2,3,4,5,6,8,9,11,13,15},{1,2,3,4,5,6,8,9,11,14},{1,2,3,4,5,6,8,9,11,14,15},{1,2,3,4,5,6,8,9,11,15},{1,2,3,4,5,6,8,9,12},{1,2,3,4,5,6,8,9,12,13},{1,2,3,4,5,6,8,9,12,13,14},{1,2,3,4,5,6,8,9,12,13,14,15},{1,2,3,4,5,6,8,9,12,13,15},{1,2,3,4,5,6,8,9,12,14},{1,2,3,4,5,6,8,9,12,14,15},{1,2,3,4,5,6,8,9,12,15},{1,2,3,4,5,6,8,9,13},{1,2,3,4,5,6,8,9,13,14},{1,2,3,4,5,6,8,9,13,14,15},{1,2,3,4,5,6,8,9,13,15},{1,2,3,4,5,6,8,9,14},{1,2,3,4,5,6,8,9,14,15},{1,2,3,4,5,6,8,9,15},{1,2,3,4,5,6,8,10},{1,2,3,4,5,6,8,10,11},{1,2,3,4,5,6,8,10,11,12},{1,2,3,4,5,6,8,10,11,12,13},{1,2,3,4,5,6,8,10,11,12,13,14},{1,2,3,4,5,6,8,10,11,12,13,14,15},{1,2,3,4,5,6,8,10,11,12,13,15},{1,2,3,4,5,6,8,10,11,12,14},{1,2,3,4,5,6,8,10,11,12,14,15},{1,2,3,4,5,6,8,10,11,12,15},{1,2,3,4,5,6,8,10,11,13},{1,2,3,4,5,6,8,10,11,13,14},{1,2,3,4,5,6,8,10,11,13,14,15},{1,2,3,4,5,6,8,10,11,13,15},{1,2,3,4,5,6,8,10,11,14},{1,2,3,4,5,6,8,10,11,14,15},{1,2,3,4,5,6,8,10,11,15},{1,2,3,4,5,6,8,10,12},{1,2,3,4,5,6,8,10,12,13},{1,2,3,4,5,6,8,10,12,13,14},{1,2,3,4,5,6,8,10,12,13,14,15},{1,2,3,4,5,6,8,10,12,13,15},{1,2,3,4,5,6,8,10,12,14},{1,2,3,4,5,6,8,10,12,14,15},{1,2,3,4,5,6,8,10,12,15},{1,2,3,4,5,6,8,10,13},{1,2,3,4,5,6,8,10,13,14},{1,2,3,4,5,6,8,10,13,14,15},{1,2,3,4,5,6,8,10,13,15},{1,2,3,4,5,6,8,10,14},{1,2,3,4,5,6,8,10,14,15},{1,2,3,4,5,6,8,10,15},{1,2,3,4,5,6,8,11},{1,2,3,4,5,6,8,11,12},{1,2,3,4,5,6,8,11,12,13},{1,2,3,4,5,6,8,11,12,13,14},{1,2,3,4,5,6,8,11,12,13,14,15},{1,2,3,4,5,6,8,11,12,13,15},{1,2,3,4,5,6,8,11,12,14},{1,2,3,4,5,6,8,11,12,14,15},{1,2,3,4,5,6,8,11,12,15},{1,2,3,4,5,6,8,11,13},{1,2,3,4,5,6,8,11,13,14},{1,2,3,4,5,6,8,11,13,14,15},{1,2,3,4,5,6,8,11,13,15},{1,2,3,4,5,6,8,11,14},{1,2,3,4,5,6,8,11,14,15},{1,2,3,4,5,6,8,11,15},{1,2,3,4,5,6,8,12},{1,2,3,4,5,6,8,12,13},{1,2,3,4,5,6,8,12,13,14},{1,2,3,4,5,6,8,12,13,14,15},{1,2,3,4,5,6,8,12,13,15},{1,2,3,4,5,6,8,12,14},{1,2,3,4,5,6,8,12,14,15},{1,2,3,4,5,6,8,12,15},{1,2,3,4,5,6,8,13},{1,2,3,4,5,6,8,13,14},{1,2,3,4,5,6,8,13,14,15},{1,2,3,4,5,6,8,13,15},{1,2,3,4,5,6,8,14},{1,2,3,4,5,6,8,14,15},{1,2,3,4,5,6,8,15},{1,2,3,4,5,6,9},{1,2,3,4,5,6,9,10},{1,2,3,4,5,6,9,10,11},{1,2,3,4,5,6,9,10,11,12},{1,2,3,4,5,6,9,10,11,12,13},{1,2,3,4,5,6,9,10,11,12,13,14},{1,2,3,4,5,6,9,10,11,12,13,14,15},{1,2,3,4,5,6,9,10,11,12,13,15},{1,2,3,4,5,6,9,10,11,12,14},{1,2,3,4,5,6,9,10,11,12,14,15},{1,2,3,4,5,6,9,10,11,12,15},{1,2,3,4,5,6,9,10,11,13},{1,2,3,4,5,6,9,10,11,13,14},{1,2,3,4,5,6,9,10,11,13,14,15},{1,2,3,4,5,6,9,10,11,13,15},{1,2,3,4,5,6,9,10,11,14},{1,2,3,4,5,6,9,10,11,14,15},{1,2,3,4,5,6,9,10,11,15},{1,2,3,4,5,6,9,10,12},{1,2,3,4,5,6,9,10,12,13},{1,2,3,4,5,6,9,10,12,13,14},{1,2,3,4,5,6,9,10,12,13,14,15},{1,2,3,4,5,6,9,10,12,13,15},{1,2,3,4,5,6,9,10,12,14},{1,2,3,4,5,6,9,10,12,14,15},{1,2,3,4,5,6,9,10,12,15},{1,2,3,4,5,6,9,10,13},{1,2,3,4,5,6,9,10,13,14},{1,2,3,4,5,6,9,10,13,14,15},{1,2,3,4,5,6,9,10,13,15},{1,2,3,4,5,6,9,10,14},{1,2,3,4,5,6,9,10,14,15},{1,2,3,4,5,6,9,10,15},{1,2,3,4,5,6,9,11},{1,2,3,4,5,6,9,11,12},{1,2,3,4,5,6,9,11,12,13},{1,2,3,4,5,6,9,11,12,13,14},{1,2,3,4,5,6,9,11,12,13,14,15},{1,2,3,4,5,6,9,11,12,13,15},{1,2,3,4,5,6,9,11,12,14},{1,2,3,4,5,6,9,11,12,14,15},{1,2,3,4,5,6,9,11,12,15},{1,2,3,4,5,6,9,11,13},{1,2,3,4,5,6,9,11,13,14},{1,2,3,4,5,6,9,11,13,14,15},{1,2,3,4,5,6,9,11,13,15},{1,2,3,4,5,6,9,11,14},{1,2,3,4,5,6,9,11,14,15},{1,2,3,4,5,6,9,11,15},{1,2,3,4,5,6,9,12},{1,2,3,4,5,6,9,12,13},{1,2,3,4,5,6,9,12,13,14},{1,2,3,4,5,6,9,12,13,14,15},{1,2,3,4,5,6,9,12,13,15},{1,2,3,4,5,6,9,12,14},{1,2,3,4,5,6,9,12,14,15},{1,2,3,4,5,6,9,12,15},{1,2,3,4,5,6,9,13},{1,2,3,4,5,6,9,13,14},{1,2,3,4,5,6,9,13,14,15},{1,2,3,4,5,6,9,13,15},{1,2,3,4,5,6,9,14},{1,2,3,4,5,6,9,14,15},{1,2,3,4,5,6,9,15},{1,2,3,4,5,6,10},{1,2,3,4,5,6,10,11},{1,2,3,4,5,6,10,11,12},{1,2,3,4,5,6,10,11,12,13},{1,2,3,4,5,6,10,11,12,13,14},{1,2,3,4,5,6,10,11,12,13,14,15},{1,2,3,4,5,6,10,11,12,13,15},{1,2,3,4,5,6,10,11,12,14},{1,2,3,4,5,6,10,11,12,14,15},{1,2,3,4,5,6,10,11,12,15},{1,2,3,4,5,6,10,11,13},{1,2,3,4,5,6,10,11,13,14},{1,2,3,4,5,6,10,11,13,14,15},{1,2,3,4,5,6,10,11,13,15},{1,2,3,4,5,6,10,11,14},{1,2,3,4,5,6,10,11,14,15},{1,2,3,4,5,6,10,11,15},{1,2,3,4,5,6,10,12},{1,2,3,4,5,6,10,12,13},{1,2,3,4,5,6,10,12,13,14},{1,2,3,4,5,6,10,12,13,14,15},{1,2,3,4,5,6,10,12,13,15},{1,2,3,4,5,6,10,12,14},{1,2,3,4,5,6,10,12,14,15},{1,2,3,4,5,6,10,12,15},{1,2,3,4,5,6,10,13},{1,2,3,4,5,6,10,13,14},{1,2,3,4,5,6,10,13,14,15},{1,2,3,4,5,6,10,13,15},{1,2,3,4,5,6,10,14},{1,2,3,4,5,6,10,14,15},{1,2,3,4,5,6,10,15},{1,2,3,4,5,6,11},{1,2,3,4,5,6,11,12},{1,2,3,4,5,6,11,12,13},{1,2,3,4,5,6,11,12,13,14},{1,2,3,4,5,6,11,12,13,14,15},{1,2,3,4,5,6,11,12,13,15},{1,2,3,4,5,6,11,12,14},{1,2,3,4,5,6,11,12,14,15},{1,2,3,4,5,6,11,12,15},{1,2,3,4,5,6,11,13},{1,2,3,4,5,6,11,13,14},{1,2,3,4,5,6,11,13,14,15},{1,2,3,4,5,6,11,13,15},{1,2,3,4,5,6,11,14},{1,2,3,4,5,6,11,14,15},{1,2,3,4,5,6,11,15},{1,2,3,4,5,6,12},{1,2,3,4,5,6,12,13},{1,2,3,4,5,6,12,13,14},{1,2,3,4,5,6,12,13,14,15},{1,2,3,4,5,6,12,13,15},{1,2,3,4,5,6,12,14},{1,2,3,4,5,6,12,14,15},{1,2,3,4,5,6,12,15},{1,2,3,4,5,6,13},{1,2,3,4,5,6,13,14},{1,2,3,4,5,6,13,14,15},{1,2,3,4,5,6,13,15},{1,2,3,4,5,6,14},{1,2,3,4,5,6,14,15},{1,2,3,4,5,6,15},{1,2,3,4,5,7},{1,2,3,4,5,7,8},{1,2,3,4,5,7,8,9},{1,2,3,4,5,7,8,9,10},{1,2,3,4,5,7,8,9,10,11},{1,2,3,4,5,7,8,9,10,11,12},{1,2,3,4,5,7,8,9,10,11,12,13},{1,2,3,4,5,7,8,9,10,11,12,13,14},{1,2,3,4,5,7,8,9,10,11,12,13,14,15},{1,2,3,4,5,7,8,9,10,11,12,13,15},{1,2,3,4,5,7,8,9,10,11,12,14},{1,2,3,4,5,7,8,9,10,11,12,14,15},{1,2,3,4,5,7,8,9,10,11,12,15},{1,2,3,4,5,7,8,9,10,11,13},{1,2,3,4,5,7,8,9,10,11,13,14},{1,2,3,4,5,7,8,9,10,11,13,14,15},{1,2,3,4,5,7,8,9,10,11,13,15},{1,2,3,4,5,7,8,9,10,11,14},{1,2,3,4,5,7,8,9,10,11,14,15},{1,2,3,4,5,7,8,9,10,11,15},{1,2,3,4,5,7,8,9,10,12},{1,2,3,4,5,7,8,9,10,12,13},{1,2,3,4,5,7,8,9,10,12,13,14},{1,2,3,4,5,7,8,9,10,12,13,14,15},{1,2,3,4,5,7,8,9,10,12,13,15},{1,2,3,4,5,7,8,9,10,12,14},{1,2,3,4,5,7,8,9,10,12,14,15},{1,2,3,4,5,7,8,9,10,12,15},{1,2,3,4,5,7,8,9,10,13},{1,2,3,4,5,7,8,9,10,13,14},{1,2,3,4,5,7,8,9,10,13,14,15},{1,2,3,4,5,7,8,9,10,13,15},{1,2,3,4,5,7,8,9,10,14},{1,2,3,4,5,7,8,9,10,14,15},{1,2,3,4,5,7,8,9,10,15},{1,2,3,4,5,7,8,9,11},{1,2,3,4,5,7,8,9,11,12},{1,2,3,4,5,7,8,9,11,12,13},{1,2,3,4,5,7,8,9,11,12,13,14},{1,2,3,4,5,7,8,9,11,12,13,14,15},{1,2,3,4,5,7,8,9,11,12,13,15},{1,2,3,4,5,7,8,9,11,12,14},{1,2,3,4,5,7,8,9,11,12,14,15},{1,2,3,4,5,7,8,9,11,12,15},{1,2,3,4,5,7,8,9,11,13},{1,2,3,4,5,7,8,9,11,13,14},{1,2,3,4,5,7,8,9,11,13,14,15},{1,2,3,4,5,7,8,9,11,13,15},{1,2,3,4,5,7,8,9,11,14},{1,2,3,4,5,7,8,9,11,14,15},{1,2,3,4,5,7,8,9,11,15},{1,2,3,4,5,7,8,9,12},{1,2,3,4,5,7,8,9,12,13},{1,2,3,4,5,7,8,9,12,13,14},{1,2,3,4,5,7,8,9,12,13,14,15},{1,2,3,4,5,7,8,9,12,13,15},{1,2,3,4,5,7,8,9,12,14},{1,2,3,4,5,7,8,9,12,14,15},{1,2,3,4,5,7,8,9,12,15},{1,2,3,4,5,7,8,9,13},{1,2,3,4,5,7,8,9,13,14},{1,2,3,4,5,7,8,9,13,14,15},{1,2,3,4,5,7,8,9,13,15},{1,2,3,4,5,7,8,9,14},{1,2,3,4,5,7,8,9,14,15},{1,2,3,4,5,7,8,9,15},{1,2,3,4,5,7,8,10},{1,2,3,4,5,7,8,10,11},{1,2,3,4,5,7,8,10,11,12},{1,2,3,4,5,7,8,10,11,12,13},{1,2,3,4,5,7,8,10,11,12,13,14},{1,2,3,4,5,7,8,10,11,12,13,14,15},{1,2,3,4,5,7,8,10,11,12,13,15},{1,2,3,4,5,7,8,10,11,12,14},{1,2,3,4,5,7,8,10,11,12,14,15},{1,2,3,4,5,7,8,10,11,12,15},{1,2,3,4,5,7,8,10,11,13},{1,2,3,4,5,7,8,10,11,13,14},{1,2,3,4,5,7,8,10,11,13,14,15},{1,2,3,4,5,7,8,10,11,13,15},{1,2,3,4,5,7,8,10,11,14},{1,2,3,4,5,7,8,10,11,14,15},{1,2,3,4,5,7,8,10,11,15},{1,2,3,4,5,7,8,10,12},{1,2,3,4,5,7,8,10,12,13},{1,2,3,4,5,7,8,10,12,13,14},{1,2,3,4,5,7,8,10,12,13,14,15},{1,2,3,4,5,7,8,10,12,13,15},{1,2,3,4,5,7,8,10,12,14},{1,2,3,4,5,7,8,10,12,14,15},{1,2,3,4,5,7,8,10,12,15},{1,2,3,4,5,7,8,10,13},{1,2,3,4,5,7,8,10,13,14},{1,2,3,4,5,7,8,10,13,14,15},{1,2,3,4,5,7,8,10,13,15},{1,2,3,4,5,7,8,10,14},{1,2,3,4,5,7,8,10,14,15},{1,2,3,4,5,7,8,10,15},{1,2,3,4,5,7,8,11},{1,2,3,4,5,7,8,11,12},{1,2,3,4,5,7,8,11,12,13},{1,2,3,4,5,7,8,11,12,13,14},{1,2,3,4,5,7,8,11,12,13,14,15},{1,2,3,4,5,7,8,11,12,13,15},{1,2,3,4,5,7,8,11,12,14},{1,2,3,4,5,7,8,11,12,14,15},{1,2,3,4,5,7,8,11,12,15},{1,2,3,4,5,7,8,11,13},{1,2,3,4,5,7,8,11,13,14},{1,2,3,4,5,7,8,11,13,14,15},{1,2,3,4,5,7,8,11,13,15},{1,2,3,4,5,7,8,11,14},{1,2,3,4,5,7,8,11,14,15},{1,2,3,4,5,7,8,11,15},{1,2,3,4,5,7,8,12},{1,2,3,4,5,7,8,12,13},{1,2,3,4,5,7,8,12,13,14},{1,2,3,4,5,7,8,12,13,14,15},{1,2,3,4,5,7,8,12,13,15},{1,2,3,4,5,7,8,12,14},{1,2,3,4,5,7,8,12,14,15},{1,2,3,4,5,7,8,12,15},{1,2,3,4,5,7,8,13},{1,2,3,4,5,7,8,13,14},{1,2,3,4,5,7,8,13,14,15},{1,2,3,4,5,7,8,13,15},{1,2,3,4,5,7,8,14},{1,2,3,4,5,7,8,14,15},{1,2,3,4,5,7,8,15},{1,2,3,4,5,7,9},{1,2,3,4,5,7,9,10},{1,2,3,4,5,7,9,10,11},{1,2,3,4,5,7,9,10,11,12},{1,2,3,4,5,7,9,10,11,12,13},{1,2,3,4,5,7,9,10,11,12,13,14},{1,2,3,4,5,7,9,10,11,12,13,14,15},{1,2,3,4,5,7,9,10,11,12,13,15},{1,2,3,4,5,7,9,10,11,12,14},{1,2,3,4,5,7,9,10,11,12,14,15},{1,2,3,4,5,7,9,10,11,12,15},{1,2,3,4,5,7,9,10,11,13},{1,2,3,4,5,7,9,10,11,13,14},{1,2,3,4,5,7,9,10,11,13,14,15},{1,2,3,4,5,7,9,10,11,13,15},{1,2,3,4,5,7,9,10,11,14},{1,2,3,4,5,7,9,10,11,14,15},{1,2,3,4,5,7,9,10,11,15},{1,2,3,4,5,7,9,10,12},{1,2,3,4,5,7,9,10,12,13},{1,2,3,4,5,7,9,10,12,13,14},{1,2,3,4,5,7,9,10,12,13,14,15},{1,2,3,4,5,7,9,10,12,13,15},{1,2,3,4,5,7,9,10,12,14},{1,2,3,4,5,7,9,10,12,14,15},{1,2,3,4,5,7,9,10,12,15},{1,2,3,4,5,7,9,10,13},{1,2,3,4,5,7,9,10,13,14},{1,2,3,4,5,7,9,10,13,14,15},{1,2,3,4,5,7,9,10,13,15},{1,2,3,4,5,7,9,10,14},{1,2,3,4,5,7,9,10,14,15},{1,2,3,4,5,7,9,10,15},{1,2,3,4,5,7,9,11},{1,2,3,4,5,7,9,11,12},{1,2,3,4,5,7,9,11,12,13},{1,2,3,4,5,7,9,11,12,13,14},{1,2,3,4,5,7,9,11,12,13,14,15},{1,2,3,4,5,7,9,11,12,13,15},{1,2,3,4,5,7,9,11,12,14},{1,2,3,4,5,7,9,11,12,14,15},{1,2,3,4,5,7,9,11,12,15},{1,2,3,4,5,7,9,11,13},{1,2,3,4,5,7,9,11,13,14},{1,2,3,4,5,7,9,11,13,14,15},{1,2,3,4,5,7,9,11,13,15},{1,2,3,4,5,7,9,11,14},{1,2,3,4,5,7,9,11,14,15},{1,2,3,4,5,7,9,11,15},{1,2,3,4,5,7,9,12},{1,2,3,4,5,7,9,12,13},{1,2,3,4,5,7,9,12,13,14},{1,2,3,4,5,7,9,12,13,14,15},{1,2,3,4,5,7,9,12,13,15},{1,2,3,4,5,7,9,12,14},{1,2,3,4,5,7,9,12,14,15},{1,2,3,4,5,7,9,12,15},{1,2,3,4,5,7,9,13},{1,2,3,4,5,7,9,13,14},{1,2,3,4,5,7,9,13,14,15},{1,2,3,4,5,7,9,13,15},{1,2,3,4,5,7,9,14},{1,2,3,4,5,7,9,14,15},{1,2,3,4,5,7,9,15},{1,2,3,4,5,7,10},{1,2,3,4,5,7,10,11},{1,2,3,4,5,7,10,11,12},{1,2,3,4,5,7,10,11,12,13},{1,2,3,4,5,7,10,11,12,13,14},{1,2,3,4,5,7,10,11,12,13,14,15},{1,2,3,4,5,7,10,11,12,13,15},{1,2,3,4,5,7,10,11,12,14},{1,2,3,4,5,7,10,11,12,14,15},{1,2,3,4,5,7,10,11,12,15},{1,2,3,4,5,7,10,11,13},{1,2,3,4,5,7,10,11,13,14},{1,2,3,4,5,7,10,11,13,14,15},{1,2,3,4,5,7,10,11,13,15},{1,2,3,4,5,7,10,11,14},{1,2,3,4,5,7,10,11,14,15},{1,2,3,4,5,7,10,11,15},{1,2,3,4,5,7,10,12},{1,2,3,4,5,7,10,12,13},{1,2,3,4,5,7,10,12,13,14},{1,2,3,4,5,7,10,12,13,14,15},{1,2,3,4,5,7,10,12,13,15},{1,2,3,4,5,7,10,12,14},{1,2,3,4,5,7,10,12,14,15},{1,2,3,4,5,7,10,12,15},{1,2,3,4,5,7,10,13},{1,2,3,4,5,7,10,13,14},{1,2,3,4,5,7,10,13,14,15},{1,2,3,4,5,7,10,13,15},{1,2,3,4,5,7,10,14},{1,2,3,4,5,7,10,14,15},{1,2,3,4,5,7,10,15},{1,2,3,4,5,7,11},{1,2,3,4,5,7,11,12},{1,2,3,4,5,7,11,12,13},{1,2,3,4,5,7,11,12,13,14},{1,2,3,4,5,7,11,12,13,14,15},{1,2,3,4,5,7,11,12,13,15},{1,2,3,4,5,7,11,12,14},{1,2,3,4,5,7,11,12,14,15},{1,2,3,4,5,7,11,12,15},{1,2,3,4,5,7,11,13},{1,2,3,4,5,7,11,13,14},{1,2,3,4,5,7,11,13,14,15},{1,2,3,4,5,7,11,13,15},{1,2,3,4,5,7,11,14},{1,2,3,4,5,7,11,14,15},{1,2,3,4,5,7,11,15},{1,2,3,4,5,7,12},{1,2,3,4,5,7,12,13},{1,2,3,4,5,7,12,13,14},{1,2,3,4,5,7,12,13,14,15},{1,2,3,4,5,7,12,13,15},{1,2,3,4,5,7,12,14},{1,2,3,4,5,7,12,14,15},{1,2,3,4,5,7,12,15},{1,2,3,4,5,7,13},{1,2,3,4,5,7,13,14},{1,2,3,4,5,7,13,14,15},{1,2,3,4,5,7,13,15},{1,2,3,4,5,7,14},{1,2,3,4,5,7,14,15},{1,2,3,4,5,7,15},{1,2,3,4,5,8},{1,2,3,4,5,8,9},{1,2,3,4,5,8,9,10},{1,2,3,4,5,8,9,10,11},{1,2,3,4,5,8,9,10,11,12},{1,2,3,4,5,8,9,10,11,12,13},{1,2,3,4,5,8,9,10,11,12,13,14},{1,2,3,4,5,8,9,10,11,12,13,14,15},{1,2,3,4,5,8,9,10,11,12,13,15},{1,2,3,4,5,8,9,10,11,12,14},{1,2,3,4,5,8,9,10,11,12,14,15},{1,2,3,4,5,8,9,10,11,12,15},{1,2,3,4,5,8,9,10,11,13},{1,2,3,4,5,8,9,10,11,13,14},{1,2,3,4,5,8,9,10,11,13,14,15},{1,2,3,4,5,8,9,10,11,13,15},{1,2,3,4,5,8,9,10,11,14},{1,2,3,4,5,8,9,10,11,14,15},{1,2,3,4,5,8,9,10,11,15},{1,2,3,4,5,8,9,10,12},{1,2,3,4,5,8,9,10,12,13},{1,2,3,4,5,8,9,10,12,13,14},{1,2,3,4,5,8,9,10,12,13,14,15},{1,2,3,4,5,8,9,10,12,13,15},{1,2,3,4,5,8,9,10,12,14},{1,2,3,4,5,8,9,10,12,14,15},{1,2,3,4,5,8,9,10,12,15},{1,2,3,4,5,8,9,10,13},{1,2,3,4,5,8,9,10,13,14},{1,2,3,4,5,8,9,10,13,14,15},{1,2,3,4,5,8,9,10,13,15},{1,2,3,4,5,8,9,10,14},{1,2,3,4,5,8,9,10,14,15},{1,2,3,4,5,8,9,10,15},{1,2,3,4,5,8,9,11},{1,2,3,4,5,8,9,11,12},{1,2,3,4,5,8,9,11,12,13},{1,2,3,4,5,8,9,11,12,13,14},{1,2,3,4,5,8,9,11,12,13,14,15},{1,2,3,4,5,8,9,11,12,13,15},{1,2,3,4,5,8,9,11,12,14},{1,2,3,4,5,8,9,11,12,14,15},{1,2,3,4,5,8,9,11,12,15},{1,2,3,4,5,8,9,11,13},{1,2,3,4,5,8,9,11,13,14},{1,2,3,4,5,8,9,11,13,14,15},{1,2,3,4,5,8,9,11,13,15},{1,2,3,4,5,8,9,11,14},{1,2,3,4,5,8,9,11,14,15},{1,2,3,4,5,8,9,11,15},{1,2,3,4,5,8,9,12},{1,2,3,4,5,8,9,12,13},{1,2,3,4,5,8,9,12,13,14},{1,2,3,4,5,8,9,12,13,14,15},{1,2,3,4,5,8,9,12,13,15},{1,2,3,4,5,8,9,12,14},{1,2,3,4,5,8,9,12,14,15},{1,2,3,4,5,8,9,12,15},{1,2,3,4,5,8,9,13},{1,2,3,4,5,8,9,13,14},{1,2,3,4,5,8,9,13,14,15},{1,2,3,4,5,8,9,13,15},{1,2,3,4,5,8,9,14},{1,2,3,4,5,8,9,14,15},{1,2,3,4,5,8,9,15},{1,2,3,4,5,8,10},{1,2,3,4,5,8,10,11},{1,2,3,4,5,8,10,11,12},{1,2,3,4,5,8,10,11,12,13},{1,2,3,4,5,8,10,11,12,13,14},{1,2,3,4,5,8,10,11,12,13,14,15},{1,2,3,4,5,8,10,11,12,13,15},{1,2,3,4,5,8,10,11,12,14},{1,2,3,4,5,8,10,11,12,14,15},{1,2,3,4,5,8,10,11,12,15},{1,2,3,4,5,8,10,11,13},{1,2,3,4,5,8,10,11,13,14},{1,2,3,4,5,8,10,11,13,14,15},{1,2,3,4,5,8,10,11,13,15},{1,2,3,4,5,8,10,11,14},{1,2,3,4,5,8,10,11,14,15},{1,2,3,4,5,8,10,11,15},{1,2,3,4,5,8,10,12},{1,2,3,4,5,8,10,12,13},{1,2,3,4,5,8,10,12,13,14},{1,2,3,4,5,8,10,12,13,14,15},{1,2,3,4,5,8,10,12,13,15},{1,2,3,4,5,8,10,12,14},{1,2,3,4,5,8,10,12,14,15},{1,2,3,4,5,8,10,12,15},{1,2,3,4,5,8,10,13},{1,2,3,4,5,8,10,13,14},{1,2,3,4,5,8,10,13,14,15},{1,2,3,4,5,8,10,13,15},{1,2,3,4,5,8,10,14},{1,2,3,4,5,8,10,14,15},{1,2,3,4,5,8,10,15},{1,2,3,4,5,8,11},{1,2,3,4,5,8,11,12},{1,2,3,4,5,8,11,12,13},{1,2,3,4,5,8,11,12,13,14},{1,2,3,4,5,8,11,12,13,14,15},{1,2,3,4,5,8,11,12,13,15},{1,2,3,4,5,8,11,12,14},{1,2,3,4,5,8,11,12,14,15},{1,2,3,4,5,8,11,12,15},{1,2,3,4,5,8,11,13},{1,2,3,4,5,8,11,13,14},{1,2,3,4,5,8,11,13,14,15},{1,2,3,4,5,8,11,13,15},{1,2,3,4,5,8,11,14},{1,2,3,4,5,8,11,14,15},{1,2,3,4,5,8,11,15},{1,2,3,4,5,8,12},{1,2,3,4,5,8,12,13},{1,2,3,4,5,8,12,13,14},{1,2,3,4,5,8,12,13,14,15},{1,2,3,4,5,8,12,13,15},{1,2,3,4,5,8,12,14},{1,2,3,4,5,8,12,14,15},{1,2,3,4,5,8,12,15},{1,2,3,4,5,8,13},{1,2,3,4,5,8,13,14},{1,2,3,4,5,8,13,14,15},{1,2,3,4,5,8,13,15},{1,2,3,4,5,8,14},{1,2,3,4,5,8,14,15},{1,2,3,4,5,8,15},{1,2,3,4,5,9},{1,2,3,4,5,9,10},{1,2,3,4,5,9,10,11},{1,2,3,4,5,9,10,11,12},{1,2,3,4,5,9,10,11,12,13},{1,2,3,4,5,9,10,11,12,13,14},{1,2,3,4,5,9,10,11,12,13,14,15},{1,2,3,4,5,9,10,11,12,13,15},{1,2,3,4,5,9,10,11,12,14},{1,2,3,4,5,9,10,11,12,14,15},{1,2,3,4,5,9,10,11,12,15},{1,2,3,4,5,9,10,11,13},{1,2,3,4,5,9,10,11,13,14},{1,2,3,4,5,9,10,11,13,14,15},{1,2,3,4,5,9,10,11,13,15},{1,2,3,4,5,9,10,11,14},{1,2,3,4,5,9,10,11,14,15},{1,2,3,4,5,9,10,11,15},{1,2,3,4,5,9,10,12},{1,2,3,4,5,9,10,12,13},{1,2,3,4,5,9,10,12,13,14},{1,2,3,4,5,9,10,12,13,14,15},{1,2,3,4,5,9,10,12,13,15},{1,2,3,4,5,9,10,12,14},{1,2,3,4,5,9,10,12,14,15},{1,2,3,4,5,9,10,12,15},{1,2,3,4,5,9,10,13},{1,2,3,4,5,9,10,13,14},{1,2,3,4,5,9,10,13,14,15},{1,2,3,4,5,9,10,13,15},{1,2,3,4,5,9,10,14},{1,2,3,4,5,9,10,14,15},{1,2,3,4,5,9,10,15},{1,2,3,4,5,9,11},{1,2,3,4,5,9,11,12},{1,2,3,4,5,9,11,12,13},{1,2,3,4,5,9,11,12,13,14},{1,2,3,4,5,9,11,12,13,14,15},{1,2,3,4,5,9,11,12,13,15},{1,2,3,4,5,9,11,12,14},{1,2,3,4,5,9,11,12,14,15},{1,2,3,4,5,9,11,12,15},{1,2,3,4,5,9,11,13},{1,2,3,4,5,9,11,13,14},{1,2,3,4,5,9,11,13,14,15},{1,2,3,4,5,9,11,13,15},{1,2,3,4,5,9,11,14},{1,2,3,4,5,9,11,14,15},{1,2,3,4,5,9,11,15},{1,2,3,4,5,9,12},{1,2,3,4,5,9,12,13},{1,2,3,4,5,9,12,13,14},{1,2,3,4,5,9,12,13,14,15},{1,2,3,4,5,9,12,13,15},{1,2,3,4,5,9,12,14},{1,2,3,4,5,9,12,14,15},{1,2,3,4,5,9,12,15},{1,2,3,4,5,9,13},{1,2,3,4,5,9,13,14},{1,2,3,4,5,9,13,14,15},{1,2,3,4,5,9,13,15},{1,2,3,4,5,9,14},{1,2,3,4,5,9,14,15},{1,2,3,4,5,9,15},{1,2,3,4,5,10},{1,2,3,4,5,10,11},{1,2,3,4,5,10,11,12},{1,2,3,4,5,10,11,12,13},{1,2,3,4,5,10,11,12,13,14},{1,2,3,4,5,10,11,12,13,14,15},{1,2,3,4,5,10,11,12,13,15},{1,2,3,4,5,10,11,12,14},{1,2,3,4,5,10,11,12,14,15},{1,2,3,4,5,10,11,12,15},{1,2,3,4,5,10,11,13},{1,2,3,4,5,10,11,13,14},{1,2,3,4,5,10,11,13,14,15},{1,2,3,4,5,10,11,13,15},{1,2,3,4,5,10,11,14},{1,2,3,4,5,10,11,14,15},{1,2,3,4,5,10,11,15},{1,2,3,4,5,10,12},{1,2,3,4,5,10,12,13},{1,2,3,4,5,10,12,13,14},{1,2,3,4,5,10,12,13,14,15},{1,2,3,4,5,10,12,13,15},{1,2,3,4,5,10,12,14},{1,2,3,4,5,10,12,14,15},{1,2,3,4,5,10,12,15},{1,2,3,4,5,10,13},{1,2,3,4,5,10,13,14},{1,2,3,4,5,10,13,14,15},{1,2,3,4,5,10,13,15},{1,2,3,4,5,10,14},{1,2,3,4,5,10,14,15},{1,2,3,4,5,10,15},{1,2,3,4,5,11},{1,2,3,4,5,11,12},{1,2,3,4,5,11,12,13},{1,2,3,4,5,11,12,13,14},{1,2,3,4,5,11,12,13,14,15},{1,2,3,4,5,11,12,13,15},{1,2,3,4,5,11,12,14},{1,2,3,4,5,11,12,14,15},{1,2,3,4,5,11,12,15},{1,2,3,4,5,11,13},{1,2,3,4,5,11,13,14},{1,2,3,4,5,11,13,14,15},{1,2,3,4,5,11,13,15},{1,2,3,4,5,11,14},{1,2,3,4,5,11,14,15},{1,2,3,4,5,11,15},{1,2,3,4,5,12},{1,2,3,4,5,12,13},{1,2,3,4,5,12,13,14},{1,2,3,4,5,12,13,14,15},{1,2,3,4,5,12,13,15},{1,2,3,4,5,12,14},{1,2,3,4,5,12,14,15},{1,2,3,4,5,12,15},{1,2,3,4,5,13},{1,2,3,4,5,13,14},{1,2,3,4,5,13,14,15},{1,2,3,4,5,13,15},{1,2,3,4,5,14},{1,2,3,4,5,14,15},{1,2,3,4,5,15},{1,2,3,4,6},{1,2,3,4,6,7},{1,2,3,4,6,7,8},{1,2,3,4,6,7,8,9},{1,2,3,4,6,7,8,9,10},{1,2,3,4,6,7,8,9,10,11},{1,2,3,4,6,7,8,9,10,11,12},{1,2,3,4,6,7,8,9,10,11,12,13},{1,2,3,4,6,7,8,9,10,11,12,13,14},{1,2,3,4,6,7,8,9,10,11,12,13,14,15},{1,2,3,4,6,7,8,9,10,11,12,13,15},{1,2,3,4,6,7,8,9,10,11,12,14},{1,2,3,4,6,7,8,9,10,11,12,14,15},{1,2,3,4,6,7,8,9,10,11,12,15},{1,2,3,4,6,7,8,9,10,11,13},{1,2,3,4,6,7,8,9,10,11,13,14},{1,2,3,4,6,7,8,9,10,11,13,14,15},{1,2,3,4,6,7,8,9,10,11,13,15},{1,2,3,4,6,7,8,9,10,11,14},{1,2,3,4,6,7,8,9,10,11,14,15},{1,2,3,4,6,7,8,9,10,11,15},{1,2,3,4,6,7,8,9,10,12},{1,2,3,4,6,7,8,9,10,12,13},{1,2,3,4,6,7,8,9,10,12,13,14},{1,2,3,4,6,7,8,9,10,12,13,14,15},{1,2,3,4,6,7,8,9,10,12,13,15},{1,2,3,4,6,7,8,9,10,12,14},{1,2,3,4,6,7,8,9,10,12,14,15},{1,2,3,4,6,7,8,9,10,12,15},{1,2,3,4,6,7,8,9,10,13},{1,2,3,4,6,7,8,9,10,13,14},{1,2,3,4,6,7,8,9,10,13,14,15},{1,2,3,4,6,7,8,9,10,13,15},{1,2,3,4,6,7,8,9,10,14},{1,2,3,4,6,7,8,9,10,14,15},{1,2,3,4,6,7,8,9,10,15},{1,2,3,4,6,7,8,9,11},{1,2,3,4,6,7,8,9,11,12},{1,2,3,4,6,7,8,9,11,12,13},{1,2,3,4,6,7,8,9,11,12,13,14},{1,2,3,4,6,7,8,9,11,12,13,14,15},{1,2,3,4,6,7,8,9,11,12,13,15},{1,2,3,4,6,7,8,9,11,12,14},{1,2,3,4,6,7,8,9,11,12,14,15},{1,2,3,4,6,7,8,9,11,12,15},{1,2,3,4,6,7,8,9,11,13},{1,2,3,4,6,7,8,9,11,13,14},{1,2,3,4,6,7,8,9,11,13,14,15},{1,2,3,4,6,7,8,9,11,13,15},{1,2,3,4,6,7,8,9,11,14},{1,2,3,4,6,7,8,9,11,14,15},{1,2,3,4,6,7,8,9,11,15},{1,2,3,4,6,7,8,9,12},{1,2,3,4,6,7,8,9,12,13},{1,2,3,4,6,7,8,9,12,13,14},{1,2,3,4,6,7,8,9,12,13,14,15},{1,2,3,4,6,7,8,9,12,13,15},{1,2,3,4,6,7,8,9,12,14},{1,2,3,4,6,7,8,9,12,14,15},{1,2,3,4,6,7,8,9,12,15},{1,2,3,4,6,7,8,9,13},{1,2,3,4,6,7,8,9,13,14},{1,2,3,4,6,7,8,9,13,14,15},{1,2,3,4,6,7,8,9,13,15},{1,2,3,4,6,7,8,9,14},{1,2,3,4,6,7,8,9,14,15},{1,2,3,4,6,7,8,9,15},{1,2,3,4,6,7,8,10},{1,2,3,4,6,7,8,10,11},{1,2,3,4,6,7,8,10,11,12},{1,2,3,4,6,7,8,10,11,12,13},{1,2,3,4,6,7,8,10,11,12,13,14},{1,2,3,4,6,7,8,10,11,12,13,14,15},{1,2,3,4,6,7,8,10,11,12,13,15},{1,2,3,4,6,7,8,10,11,12,14},{1,2,3,4,6,7,8,10,11,12,14,15},{1,2,3,4,6,7,8,10,11,12,15},{1,2,3,4,6,7,8,10,11,13},{1,2,3,4,6,7,8,10,11,13,14},{1,2,3,4,6,7,8,10,11,13,14,15},{1,2,3,4,6,7,8,10,11,13,15},{1,2,3,4,6,7,8,10,11,14},{1,2,3,4,6,7,8,10,11,14,15},{1,2,3,4,6,7,8,10,11,15},{1,2,3,4,6,7,8,10,12},{1,2,3,4,6,7,8,10,12,13},{1,2,3,4,6,7,8,10,12,13,14},{1,2,3,4,6,7,8,10,12,13,14,15},{1,2,3,4,6,7,8,10,12,13,15},{1,2,3,4,6,7,8,10,12,14},{1,2,3,4,6,7,8,10,12,14,15},{1,2,3,4,6,7,8,10,12,15},{1,2,3,4,6,7,8,10,13},{1,2,3,4,6,7,8,10,13,14},{1,2,3,4,6,7,8,10,13,14,15},{1,2,3,4,6,7,8,10,13,15},{1,2,3,4,6,7,8,10,14},{1,2,3,4,6,7,8,10,14,15},{1,2,3,4,6,7,8,10,15},{1,2,3,4,6,7,8,11},{1,2,3,4,6,7,8,11,12},{1,2,3,4,6,7,8,11,12,13},{1,2,3,4,6,7,8,11,12,13,14},{1,2,3,4,6,7,8,11,12,13,14,15},{1,2,3,4,6,7,8,11,12,13,15},{1,2,3,4,6,7,8,11,12,14},{1,2,3,4,6,7,8,11,12,14,15},{1,2,3,4,6,7,8,11,12,15},{1,2,3,4,6,7,8,11,13},{1,2,3,4,6,7,8,11,13,14},{1,2,3,4,6,7,8,11,13,14,15},{1,2,3,4,6,7,8,11,13,15},{1,2,3,4,6,7,8,11,14},{1,2,3,4,6,7,8,11,14,15},{1,2,3,4,6,7,8,11,15},{1,2,3,4,6,7,8,12},{1,2,3,4,6,7,8,12,13},{1,2,3,4,6,7,8,12,13,14},{1,2,3,4,6,7,8,12,13,14,15},{1,2,3,4,6,7,8,12,13,15},{1,2,3,4,6,7,8,12,14},{1,2,3,4,6,7,8,12,14,15},{1,2,3,4,6,7,8,12,15},{1,2,3,4,6,7,8,13},{1,2,3,4,6,7,8,13,14},{1,2,3,4,6,7,8,13,14,15},{1,2,3,4,6,7,8,13,15},{1,2,3,4,6,7,8,14},{1,2,3,4,6,7,8,14,15},{1,2,3,4,6,7,8,15},{1,2,3,4,6,7,9},{1,2,3,4,6,7,9,10},{1,2,3,4,6,7,9,10,11},{1,2,3,4,6,7,9,10,11,12},{1,2,3,4,6,7,9,10,11,12,13},{1,2,3,4,6,7,9,10,11,12,13,14},{1,2,3,4,6,7,9,10,11,12,13,14,15},{1,2,3,4,6,7,9,10,11,12,13,15},{1,2,3,4,6,7,9,10,11,12,14},{1,2,3,4,6,7,9,10,11,12,14,15},{1,2,3,4,6,7,9,10,11,12,15},{1,2,3,4,6,7,9,10,11,13},{1,2,3,4,6,7,9,10,11,13,14},{1,2,3,4,6,7,9,10,11,13,14,15},{1,2,3,4,6,7,9,10,11,13,15},{1,2,3,4,6,7,9,10,11,14},{1,2,3,4,6,7,9,10,11,14,15},{1,2,3,4,6,7,9,10,11,15},{1,2,3,4,6,7,9,10,12},{1,2,3,4,6,7,9,10,12,13},{1,2,3,4,6,7,9,10,12,13,14},{1,2,3,4,6,7,9,10,12,13,14,15},{1,2,3,4,6,7,9,10,12,13,15},{1,2,3,4,6,7,9,10,12,14},{1,2,3,4,6,7,9,10,12,14,15},{1,2,3,4,6,7,9,10,12,15},{1,2,3,4,6,7,9,10,13},{1,2,3,4,6,7,9,10,13,14},{1,2,3,4,6,7,9,10,13,14,15},{1,2,3,4,6,7,9,10,13,15},{1,2,3,4,6,7,9,10,14},{1,2,3,4,6,7,9,10,14,15},{1,2,3,4,6,7,9,10,15},{1,2,3,4,6,7,9,11},{1,2,3,4,6,7,9,11,12},{1,2,3,4,6,7,9,11,12,13},{1,2,3,4,6,7,9,11,12,13,14},{1,2,3,4,6,7,9,11,12,13,14,15},{1,2,3,4,6,7,9,11,12,13,15},{1,2,3,4,6,7,9,11,12,14},{1,2,3,4,6,7,9,11,12,14,15},{1,2,3,4,6,7,9,11,12,15},{1,2,3,4,6,7,9,11,13},{1,2,3,4,6,7,9,11,13,14},{1,2,3,4,6,7,9,11,13,14,15},{1,2,3,4,6,7,9,11,13,15},{1,2,3,4,6,7,9,11,14},{1,2,3,4,6,7,9,11,14,15},{1,2,3,4,6,7,9,11,15},{1,2,3,4,6,7,9,12},{1,2,3,4,6,7,9,12,13},{1,2,3,4,6,7,9,12,13,14},{1,2,3,4,6,7,9,12,13,14,15},{1,2,3,4,6,7,9,12,13,15},{1,2,3,4,6,7,9,12,14},{1,2,3,4,6,7,9,12,14,15},{1,2,3,4,6,7,9,12,15},{1,2,3,4,6,7,9,13},{1,2,3,4,6,7,9,13,14},{1,2,3,4,6,7,9,13,14,15},{1,2,3,4,6,7,9,13,15},{1,2,3,4,6,7,9,14},{1,2,3,4,6,7,9,14,15},{1,2,3,4,6,7,9,15},{1,2,3,4,6,7,10},{1,2,3,4,6,7,10,11},{1,2,3,4,6,7,10,11,12},{1,2,3,4,6,7,10,11,12,13},{1,2,3,4,6,7,10,11,12,13,14},{1,2,3,4,6,7,10,11,12,13,14,15},{1,2,3,4,6,7,10,11,12,13,15},{1,2,3,4,6,7,10,11,12,14},{1,2,3,4,6,7,10,11,12,14,15},{1,2,3,4,6,7,10,11,12,15},{1,2,3,4,6,7,10,11,13},{1,2,3,4,6,7,10,11,13,14},{1,2,3,4,6,7,10,11,13,14,15},{1,2,3,4,6,7,10,11,13,15},{1,2,3,4,6,7,10,11,14},{1,2,3,4,6,7,10,11,14,15},{1,2,3,4,6,7,10,11,15},{1,2,3,4,6,7,10,12},{1,2,3,4,6,7,10,12,13},{1,2,3,4,6,7,10,12,13,14},{1,2,3,4,6,7,10,12,13,14,15},{1,2,3,4,6,7,10,12,13,15},{1,2,3,4,6,7,10,12,14},{1,2,3,4,6,7,10,12,14,15},{1,2,3,4,6,7,10,12,15},{1,2,3,4,6,7,10,13},{1,2,3,4,6,7,10,13,14},{1,2,3,4,6,7,10,13,14,15},{1,2,3,4,6,7,10,13,15},{1,2,3,4,6,7,10,14},{1,2,3,4,6,7,10,14,15},{1,2,3,4,6,7,10,15},{1,2,3,4,6,7,11},{1,2,3,4,6,7,11,12},{1,2,3,4,6,7,11,12,13},{1,2,3,4,6,7,11,12,13,14},{1,2,3,4,6,7,11,12,13,14,15},{1,2,3,4,6,7,11,12,13,15},{1,2,3,4,6,7,11,12,14},{1,2,3,4,6,7,11,12,14,15},{1,2,3,4,6,7,11,12,15},{1,2,3,4,6,7,11,13},{1,2,3,4,6,7,11,13,14},{1,2,3,4,6,7,11,13,14,15},{1,2,3,4,6,7,11,13,15},{1,2,3,4,6,7,11,14},{1,2,3,4,6,7,11,14,15},{1,2,3,4,6,7,11,15},{1,2,3,4,6,7,12},{1,2,3,4,6,7,12,13},{1,2,3,4,6,7,12,13,14},{1,2,3,4,6,7,12,13,14,15},{1,2,3,4,6,7,12,13,15},{1,2,3,4,6,7,12,14},{1,2,3,4,6,7,12,14,15},{1,2,3,4,6,7,12,15},{1,2,3,4,6,7,13},{1,2,3,4,6,7,13,14},{1,2,3,4,6,7,13,14,15},{1,2,3,4,6,7,13,15},{1,2,3,4,6,7,14},{1,2,3,4,6,7,14,15},{1,2,3,4,6,7,15},{1,2,3,4,6,8},{1,2,3,4,6,8,9},{1,2,3,4,6,8,9,10},{1,2,3,4,6,8,9,10,11},{1,2,3,4,6,8,9,10,11,12},{1,2,3,4,6,8,9,10,11,12,13},{1,2,3,4,6,8,9,10,11,12,13,14},{1,2,3,4,6,8,9,10,11,12,13,14,15},{1,2,3,4,6,8,9,10,11,12,13,15},{1,2,3,4,6,8,9,10,11,12,14},{1,2,3,4,6,8,9,10,11,12,14,15},{1,2,3,4,6,8,9,10,11,12,15},{1,2,3,4,6,8,9,10,11,13},{1,2,3,4,6,8,9,10,11,13,14},{1,2,3,4,6,8,9,10,11,13,14,15},{1,2,3,4,6,8,9,10,11,13,15},{1,2,3,4,6,8,9,10,11,14},{1,2,3,4,6,8,9,10,11,14,15},{1,2,3,4,6,8,9,10,11,15},{1,2,3,4,6,8,9,10,12},{1,2,3,4,6,8,9,10,12,13},{1,2,3,4,6,8,9,10,12,13,14},{1,2,3,4,6,8,9,10,12,13,14,15},{1,2,3,4,6,8,9,10,12,13,15},{1,2,3,4,6,8,9,10,12,14},{1,2,3,4,6,8,9,10,12,14,15},{1,2,3,4,6,8,9,10,12,15},{1,2,3,4,6,8,9,10,13},{1,2,3,4,6,8,9,10,13,14},{1,2,3,4,6,8,9,10,13,14,15},{1,2,3,4,6,8,9,10,13,15},{1,2,3,4,6,8,9,10,14},{1,2,3,4,6,8,9,10,14,15},{1,2,3,4,6,8,9,10,15},{1,2,3,4,6,8,9,11},{1,2,3,4,6,8,9,11,12},{1,2,3,4,6,8,9,11,12,13},{1,2,3,4,6,8,9,11,12,13,14},{1,2,3,4,6,8,9,11,12,13,14,15},{1,2,3,4,6,8,9,11,12,13,15},{1,2,3,4,6,8,9,11,12,14},{1,2,3,4,6,8,9,11,12,14,15},{1,2,3,4,6,8,9,11,12,15},{1,2,3,4,6,8,9,11,13},{1,2,3,4,6,8,9,11,13,14},{1,2,3,4,6,8,9,11,13,14,15},{1,2,3,4,6,8,9,11,13,15},{1,2,3,4,6,8,9,11,14},{1,2,3,4,6,8,9,11,14,15},{1,2,3,4,6,8,9,11,15},{1,2,3,4,6,8,9,12},{1,2,3,4,6,8,9,12,13},{1,2,3,4,6,8,9,12,13,14},{1,2,3,4,6,8,9,12,13,14,15},{1,2,3,4,6,8,9,12,13,15},{1,2,3,4,6,8,9,12,14},{1,2,3,4,6,8,9,12,14,15},{1,2,3,4,6,8,9,12,15},{1,2,3,4,6,8,9,13},{1,2,3,4,6,8,9,13,14},{1,2,3,4,6,8,9,13,14,15},{1,2,3,4,6,8,9,13,15},{1,2,3,4,6,8,9,14},{1,2,3,4,6,8,9,14,15},{1,2,3,4,6,8,9,15},{1,2,3,4,6,8,10},{1,2,3,4,6,8,10,11},{1,2,3,4,6,8,10,11,12},{1,2,3,4,6,8,10,11,12,13},{1,2,3,4,6,8,10,11,12,13,14},{1,2,3,4,6,8,10,11,12,13,14,15},{1,2,3,4,6,8,10,11,12,13,15},{1,2,3,4,6,8,10,11,12,14},{1,2,3,4,6,8,10,11,12,14,15},{1,2,3,4,6,8,10,11,12,15},{1,2,3,4,6,8,10,11,13},{1,2,3,4,6,8,10,11,13,14},{1,2,3,4,6,8,10,11,13,14,15},{1,2,3,4,6,8,10,11,13,15},{1,2,3,4,6,8,10,11,14},{1,2,3,4,6,8,10,11,14,15},{1,2,3,4,6,8,10,11,15},{1,2,3,4,6,8,10,12},{1,2,3,4,6,8,10,12,13},{1,2,3,4,6,8,10,12,13,14},{1,2,3,4,6,8,10,12,13,14,15},{1,2,3,4,6,8,10,12,13,15},{1,2,3,4,6,8,10,12,14},{1,2,3,4,6,8,10,12,14,15},{1,2,3,4,6,8,10,12,15},{1,2,3,4,6,8,10,13},{1,2,3,4,6,8,10,13,14},{1,2,3,4,6,8,10,13,14,15},{1,2,3,4,6,8,10,13,15},{1,2,3,4,6,8,10,14},{1,2,3,4,6,8,10,14,15},{1,2,3,4,6,8,10,15},{1,2,3,4,6,8,11},{1,2,3,4,6,8,11,12},{1,2,3,4,6,8,11,12,13},{1,2,3,4,6,8,11,12,13,14},{1,2,3,4,6,8,11,12,13,14,15},{1,2,3,4,6,8,11,12,13,15},{1,2,3,4,6,8,11,12,14},{1,2,3,4,6,8,11,12,14,15},{1,2,3,4,6,8,11,12,15},{1,2,3,4,6,8,11,13},{1,2,3,4,6,8,11,13,14},{1,2,3,4,6,8,11,13,14,15},{1,2,3,4,6,8,11,13,15},{1,2,3,4,6,8,11,14},{1,2,3,4,6,8,11,14,15},{1,2,3,4,6,8,11,15},{1,2,3,4,6,8,12},{1,2,3,4,6,8,12,13},{1,2,3,4,6,8,12,13,14},{1,2,3,4,6,8,12,13,14,15},{1,2,3,4,6,8,12,13,15},{1,2,3,4,6,8,12,14},{1,2,3,4,6,8,12,14,15},{1,2,3,4,6,8,12,15},{1,2,3,4,6,8,13},{1,2,3,4,6,8,13,14},{1,2,3,4,6,8,13,14,15},{1,2,3,4,6,8,13,15},{1,2,3,4,6,8,14},{1,2,3,4,6,8,14,15},{1,2,3,4,6,8,15},{1,2,3,4,6,9},{1,2,3,4,6,9,10},{1,2,3,4,6,9,10,11},{1,2,3,4,6,9,10,11,12},{1,2,3,4,6,9,10,11,12,13},{1,2,3,4,6,9,10,11,12,13,14},{1,2,3,4,6,9,10,11,12,13,14,15},{1,2,3,4,6,9,10,11,12,13,15},{1,2,3,4,6,9,10,11,12,14},{1,2,3,4,6,9,10,11,12,14,15},{1,2,3,4,6,9,10,11,12,15},{1,2,3,4,6,9,10,11,13},{1,2,3,4,6,9,10,11,13,14},{1,2,3,4,6,9,10,11,13,14,15},{1,2,3,4,6,9,10,11,13,15},{1,2,3,4,6,9,10,11,14},{1,2,3,4,6,9,10,11,14,15},{1,2,3,4,6,9,10,11,15},{1,2,3,4,6,9,10,12},{1,2,3,4,6,9,10,12,13},{1,2,3,4,6,9,10,12,13,14},{1,2,3,4,6,9,10,12,13,14,15},{1,2,3,4,6,9,10,12,13,15},{1,2,3,4,6,9,10,12,14},{1,2,3,4,6,9,10,12,14,15},{1,2,3,4,6,9,10,12,15},{1,2,3,4,6,9,10,13},{1,2,3,4,6,9,10,13,14},{1,2,3,4,6,9,10,13,14,15},{1,2,3,4,6,9,10,13,15},{1,2,3,4,6,9,10,14},{1,2,3,4,6,9,10,14,15},{1,2,3,4,6,9,10,15},{1,2,3,4,6,9,11},{1,2,3,4,6,9,11,12},{1,2,3,4,6,9,11,12,13},{1,2,3,4,6,9,11,12,13,14},{1,2,3,4,6,9,11,12,13,14,15},{1,2,3,4,6,9,11,12,13,15},{1,2,3,4,6,9,11,12,14},{1,2,3,4,6,9,11,12,14,15},{1,2,3,4,6,9,11,12,15},{1,2,3,4,6,9,11,13},{1,2,3,4,6,9,11,13,14},{1,2,3,4,6,9,11,13,14,15},{1,2,3,4,6,9,11,13,15},{1,2,3,4,6,9,11,14},{1,2,3,4,6,9,11,14,15},{1,2,3,4,6,9,11,15},{1,2,3,4,6,9,12},{1,2,3,4,6,9,12,13},{1,2,3,4,6,9,12,13,14},{1,2,3,4,6,9,12,13,14,15},{1,2,3,4,6,9,12,13,15},{1,2,3,4,6,9,12,14},{1,2,3,4,6,9,12,14,15},{1,2,3,4,6,9,12,15},{1,2,3,4,6,9,13},{1,2,3,4,6,9,13,14},{1,2,3,4,6,9,13,14,15},{1,2,3,4,6,9,13,15},{1,2,3,4,6,9,14},{1,2,3,4,6,9,14,15},{1,2,3,4,6,9,15},{1,2,3,4,6,10},{1,2,3,4,6,10,11},{1,2,3,4,6,10,11,12},{1,2,3,4,6,10,11,12,13},{1,2,3,4,6,10,11,12,13,14},{1,2,3,4,6,10,11,12,13,14,15},{1,2,3,4,6,10,11,12,13,15},{1,2,3,4,6,10,11,12,14},{1,2,3,4,6,10,11,12,14,15},{1,2,3,4,6,10,11,12,15},{1,2,3,4,6,10,11,13},{1,2,3,4,6,10,11,13,14},{1,2,3,4,6,10,11,13,14,15},{1,2,3,4,6,10,11,13,15},{1,2,3,4,6,10,11,14},{1,2,3,4,6,10,11,14,15},{1,2,3,4,6,10,11,15},{1,2,3,4,6,10,12},{1,2,3,4,6,10,12,13},{1,2,3,4,6,10,12,13,14},{1,2,3,4,6,10,12,13,14,15},{1,2,3,4,6,10,12,13,15},{1,2,3,4,6,10,12,14},{1,2,3,4,6,10,12,14,15},{1,2,3,4,6,10,12,15},{1,2,3,4,6,10,13},{1,2,3,4,6,10,13,14},{1,2,3,4,6,10,13,14,15},{1,2,3,4,6,10,13,15},{1,2,3,4,6,10,14},{1,2,3,4,6,10,14,15},{1,2,3,4,6,10,15},{1,2,3,4,6,11},{1,2,3,4,6,11,12},{1,2,3,4,6,11,12,13},{1,2,3,4,6,11,12,13,14},{1,2,3,4,6,11,12,13,14,15},{1,2,3,4,6,11,12,13,15},{1,2,3,4,6,11,12,14},{1,2,3,4,6,11,12,14,15},{1,2,3,4,6,11,12,15},{1,2,3,4,6,11,13},{1,2,3,4,6,11,13,14},{1,2,3,4,6,11,13,14,15},{1,2,3,4,6,11,13,15},{1,2,3,4,6,11,14},{1,2,3,4,6,11,14,15},{1,2,3,4,6,11,15},{1,2,3,4,6,12},{1,2,3,4,6,12,13},{1,2,3,4,6,12,13,14},{1,2,3,4,6,12,13,14,15},{1,2,3,4,6,12,13,15},{1,2,3,4,6,12,14},{1,2,3,4,6,12,14,15},{1,2,3,4,6,12,15},{1,2,3,4,6,13},{1,2,3,4,6,13,14},{1,2,3,4,6,13,14,15},{1,2,3,4,6,13,15},{1,2,3,4,6,14},{1,2,3,4,6,14,15},{1,2,3,4,6,15},{1,2,3,4,7},{1,2,3,4,7,8},{1,2,3,4,7,8,9},{1,2,3,4,7,8,9,10},{1,2,3,4,7,8,9,10,11},{1,2,3,4,7,8,9,10,11,12},{1,2,3,4,7,8,9,10,11,12,13},{1,2,3,4,7,8,9,10,11,12,13,14},{1,2,3,4,7,8,9,10,11,12,13,14,15},{1,2,3,4,7,8,9,10,11,12,13,15},{1,2,3,4,7,8,9,10,11,12,14},{1,2,3,4,7,8,9,10,11,12,14,15},{1,2,3,4,7,8,9,10,11,12,15},{1,2,3,4,7,8,9,10,11,13},{1,2,3,4,7,8,9,10,11,13,14},{1,2,3,4,7,8,9,10,11,13,14,15},{1,2,3,4,7,8,9,10,11,13,15},{1,2,3,4,7,8,9,10,11,14},{1,2,3,4,7,8,9,10,11,14,15},{1,2,3,4,7,8,9,10,11,15},{1,2,3,4,7,8,9,10,12},{1,2,3,4,7,8,9,10,12,13},{1,2,3,4,7,8,9,10,12,13,14},{1,2,3,4,7,8,9,10,12,13,14,15},{1,2,3,4,7,8,9,10,12,13,15},{1,2,3,4,7,8,9,10,12,14},{1,2,3,4,7,8,9,10,12,14,15},{1,2,3,4,7,8,9,10,12,15},{1,2,3,4,7,8,9,10,13},{1,2,3,4,7,8,9,10,13,14},{1,2,3,4,7,8,9,10,13,14,15},{1,2,3,4,7,8,9,10,13,15},{1,2,3,4,7,8,9,10,14},{1,2,3,4,7,8,9,10,14,15},{1,2,3,4,7,8,9,10,15},{1,2,3,4,7,8,9,11},{1,2,3,4,7,8,9,11,12},{1,2,3,4,7,8,9,11,12,13},{1,2,3,4,7,8,9,11,12,13,14},{1,2,3,4,7,8,9,11,12,13,14,15},{1,2,3,4,7,8,9,11,12,13,15},{1,2,3,4,7,8,9,11,12,14},{1,2,3,4,7,8,9,11,12,14,15},{1,2,3,4,7,8,9,11,12,15},{1,2,3,4,7,8,9,11,13},{1,2,3,4,7,8,9,11,13,14},{1,2,3,4,7,8,9,11,13,14,15},{1,2,3,4,7,8,9,11,13,15},{1,2,3,4,7,8,9,11,14},{1,2,3,4,7,8,9,11,14,15},{1,2,3,4,7,8,9,11,15},{1,2,3,4,7,8,9,12},{1,2,3,4,7,8,9,12,13},{1,2,3,4,7,8,9,12,13,14},{1,2,3,4,7,8,9,12,13,14,15},{1,2,3,4,7,8,9,12,13,15},{1,2,3,4,7,8,9,12,14},{1,2,3,4,7,8,9,12,14,15},{1,2,3,4,7,8,9,12,15},{1,2,3,4,7,8,9,13},{1,2,3,4,7,8,9,13,14},{1,2,3,4,7,8,9,13,14,15},{1,2,3,4,7,8,9,13,15},{1,2,3,4,7,8,9,14},{1,2,3,4,7,8,9,14,15},{1,2,3,4,7,8,9,15},{1,2,3,4,7,8,10},{1,2,3,4,7,8,10,11},{1,2,3,4,7,8,10,11,12},{1,2,3,4,7,8,10,11,12,13},{1,2,3,4,7,8,10,11,12,13,14},{1,2,3,4,7,8,10,11,12,13,14,15},{1,2,3,4,7,8,10,11,12,13,15},{1,2,3,4,7,8,10,11,12,14},{1,2,3,4,7,8,10,11,12,14,15},{1,2,3,4,7,8,10,11,12,15},{1,2,3,4,7,8,10,11,13},{1,2,3,4,7,8,10,11,13,14},{1,2,3,4,7,8,10,11,13,14,15},{1,2,3,4,7,8,10,11,13,15},{1,2,3,4,7,8,10,11,14},{1,2,3,4,7,8,10,11,14,15},{1,2,3,4,7,8,10,11,15},{1,2,3,4,7,8,10,12},{1,2,3,4,7,8,10,12,13},{1,2,3,4,7,8,10,12,13,14},{1,2,3,4,7,8,10,12,13,14,15},{1,2,3,4,7,8,10,12,13,15},{1,2,3,4,7,8,10,12,14},{1,2,3,4,7,8,10,12,14,15},{1,2,3,4,7,8,10,12,15},{1,2,3,4,7,8,10,13},{1,2,3,4,7,8,10,13,14},{1,2,3,4,7,8,10,13,14,15},{1,2,3,4,7,8,10,13,15},{1,2,3,4,7,8,10,14},{1,2,3,4,7,8,10,14,15},{1,2,3,4,7,8,10,15},{1,2,3,4,7,8,11},{1,2,3,4,7,8,11,12},{1,2,3,4,7,8,11,12,13},{1,2,3,4,7,8,11,12,13,14},{1,2,3,4,7,8,11,12,13,14,15},{1,2,3,4,7,8,11,12,13,15},{1,2,3,4,7,8,11,12,14},{1,2,3,4,7,8,11,12,14,15},{1,2,3,4,7,8,11,12,15},{1,2,3,4,7,8,11,13},{1,2,3,4,7,8,11,13,14},{1,2,3,4,7,8,11,13,14,15},{1,2,3,4,7,8,11,13,15},{1,2,3,4,7,8,11,14},{1,2,3,4,7,8,11,14,15},{1,2,3,4,7,8,11,15},{1,2,3,4,7,8,12},{1,2,3,4,7,8,12,13},{1,2,3,4,7,8,12,13,14},{1,2,3,4,7,8,12,13,14,15},{1,2,3,4,7,8,12,13,15},{1,2,3,4,7,8,12,14},{1,2,3,4,7,8,12,14,15},{1,2,3,4,7,8,12,15},{1,2,3,4,7,8,13},{1,2,3,4,7,8,13,14},{1,2,3,4,7,8,13,14,15},{1,2,3,4,7,8,13,15},{1,2,3,4,7,8,14},{1,2,3,4,7,8,14,15},{1,2,3,4,7,8,15},{1,2,3,4,7,9},{1,2,3,4,7,9,10},{1,2,3,4,7,9,10,11},{1,2,3,4,7,9,10,11,12},{1,2,3,4,7,9,10,11,12,13},{1,2,3,4,7,9,10,11,12,13,14},{1,2,3,4,7,9,10,11,12,13,14,15},{1,2,3,4,7,9,10,11,12,13,15},{1,2,3,4,7,9,10,11,12,14},{1,2,3,4,7,9,10,11,12,14,15},{1,2,3,4,7,9,10,11,12,15},{1,2,3,4,7,9,10,11,13},{1,2,3,4,7,9,10,11,13,14},{1,2,3,4,7,9,10,11,13,14,15},{1,2,3,4,7,9,10,11,13,15},{1,2,3,4,7,9,10,11,14},{1,2,3,4,7,9,10,11,14,15},{1,2,3,4,7,9,10,11,15},{1,2,3,4,7,9,10,12},{1,2,3,4,7,9,10,12,13},{1,2,3,4,7,9,10,12,13,14},{1,2,3,4,7,9,10,12,13,14,15},{1,2,3,4,7,9,10,12,13,15},{1,2,3,4,7,9,10,12,14},{1,2,3,4,7,9,10,12,14,15},{1,2,3,4,7,9,10,12,15},{1,2,3,4,7,9,10,13},{1,2,3,4,7,9,10,13,14},{1,2,3,4,7,9,10,13,14,15},{1,2,3,4,7,9,10,13,15},{1,2,3,4,7,9,10,14},{1,2,3,4,7,9,10,14,15},{1,2,3,4,7,9,10,15},{1,2,3,4,7,9,11},{1,2,3,4,7,9,11,12},{1,2,3,4,7,9,11,12,13},{1,2,3,4,7,9,11,12,13,14},{1,2,3,4,7,9,11,12,13,14,15},{1,2,3,4,7,9,11,12,13,15},{1,2,3,4,7,9,11,12,14},{1,2,3,4,7,9,11,12,14,15},{1,2,3,4,7,9,11,12,15},{1,2,3,4,7,9,11,13},{1,2,3,4,7,9,11,13,14},{1,2,3,4,7,9,11,13,14,15},{1,2,3,4,7,9,11,13,15},{1,2,3,4,7,9,11,14},{1,2,3,4,7,9,11,14,15},{1,2,3,4,7,9,11,15},{1,2,3,4,7,9,12},{1,2,3,4,7,9,12,13},{1,2,3,4,7,9,12,13,14},{1,2,3,4,7,9,12,13,14,15},{1,2,3,4,7,9,12,13,15},{1,2,3,4,7,9,12,14},{1,2,3,4,7,9,12,14,15},{1,2,3,4,7,9,12,15},{1,2,3,4,7,9,13},{1,2,3,4,7,9,13,14},{1,2,3,4,7,9,13,14,15},{1,2,3,4,7,9,13,15},{1,2,3,4,7,9,14},{1,2,3,4,7,9,14,15},{1,2,3,4,7,9,15},{1,2,3,4,7,10},{1,2,3,4,7,10,11},{1,2,3,4,7,10,11,12},{1,2,3,4,7,10,11,12,13},{1,2,3,4,7,10,11,12,13,14},{1,2,3,4,7,10,11,12,13,14,15},{1,2,3,4,7,10,11,12,13,15},{1,2,3,4,7,10,11,12,14},{1,2,3,4,7,10,11,12,14,15},{1,2,3,4,7,10,11,12,15},{1,2,3,4,7,10,11,13},{1,2,3,4,7,10,11,13,14},{1,2,3,4,7,10,11,13,14,15},{1,2,3,4,7,10,11,13,15},{1,2,3,4,7,10,11,14},{1,2,3,4,7,10,11,14,15},{1,2,3,4,7,10,11,15},{1,2,3,4,7,10,12},{1,2,3,4,7,10,12,13},{1,2,3,4,7,10,12,13,14},{1,2,3,4,7,10,12,13,14,15},{1,2,3,4,7,10,12,13,15},{1,2,3,4,7,10,12,14},{1,2,3,4,7,10,12,14,15},{1,2,3,4,7,10,12,15},{1,2,3,4,7,10,13},{1,2,3,4,7,10,13,14},{1,2,3,4,7,10,13,14,15},{1,2,3,4,7,10,13,15},{1,2,3,4,7,10,14},{1,2,3,4,7,10,14,15},{1,2,3,4,7,10,15},{1,2,3,4,7,11},{1,2,3,4,7,11,12},{1,2,3,4,7,11,12,13},{1,2,3,4,7,11,12,13,14},{1,2,3,4,7,11,12,13,14,15},{1,2,3,4,7,11,12,13,15},{1,2,3,4,7,11,12,14},{1,2,3,4,7,11,12,14,15},{1,2,3,4,7,11,12,15},{1,2,3,4,7,11,13},{1,2,3,4,7,11,13,14},{1,2,3,4,7,11,13,14,15},{1,2,3,4,7,11,13,15},{1,2,3,4,7,11,14},{1,2,3,4,7,11,14,15},{1,2,3,4,7,11,15},{1,2,3,4,7,12},{1,2,3,4,7,12,13},{1,2,3,4,7,12,13,14},{1,2,3,4,7,12,13,14,15},{1,2,3,4,7,12,13,15},{1,2,3,4,7,12,14},{1,2,3,4,7,12,14,15},{1,2,3,4,7,12,15},{1,2,3,4,7,13},{1,2,3,4,7,13,14},{1,2,3,4,7,13,14,15},{1,2,3,4,7,13,15},{1,2,3,4,7,14},{1,2,3,4,7,14,15},{1,2,3,4,7,15},{1,2,3,4,8},{1,2,3,4,8,9},{1,2,3,4,8,9,10},{1,2,3,4,8,9,10,11},{1,2,3,4,8,9,10,11,12},{1,2,3,4,8,9,10,11,12,13},{1,2,3,4,8,9,10,11,12,13,14},{1,2,3,4,8,9,10,11,12,13,14,15},{1,2,3,4,8,9,10,11,12,13,15},{1,2,3,4,8,9,10,11,12,14},{1,2,3,4,8,9,10,11,12,14,15},{1,2,3,4,8,9,10,11,12,15},{1,2,3,4,8,9,10,11,13},{1,2,3,4,8,9,10,11,13,14},{1,2,3,4,8,9,10,11,13,14,15},{1,2,3,4,8,9,10,11,13,15},{1,2,3,4,8,9,10,11,14},{1,2,3,4,8,9,10,11,14,15},{1,2,3,4,8,9,10,11,15},{1,2,3,4,8,9,10,12},{1,2,3,4,8,9,10,12,13},{1,2,3,4,8,9,10,12,13,14},{1,2,3,4,8,9,10,12,13,14,15},{1,2,3,4,8,9,10,12,13,15},{1,2,3,4,8,9,10,12,14},{1,2,3,4,8,9,10,12,14,15},{1,2,3,4,8,9,10,12,15},{1,2,3,4,8,9,10,13},{1,2,3,4,8,9,10,13,14},{1,2,3,4,8,9,10,13,14,15},{1,2,3,4,8,9,10,13,15},{1,2,3,4,8,9,10,14},{1,2,3,4,8,9,10,14,15},{1,2,3,4,8,9,10,15},{1,2,3,4,8,9,11},{1,2,3,4,8,9,11,12},{1,2,3,4,8,9,11,12,13},{1,2,3,4,8,9,11,12,13,14},{1,2,3,4,8,9,11,12,13,14,15},{1,2,3,4,8,9,11,12,13,15},{1,2,3,4,8,9,11,12,14},{1,2,3,4,8,9,11,12,14,15},{1,2,3,4,8,9,11,12,15},{1,2,3,4,8,9,11,13},{1,2,3,4,8,9,11,13,14},{1,2,3,4,8,9,11,13,14,15},{1,2,3,4,8,9,11,13,15},{1,2,3,4,8,9,11,14},{1,2,3,4,8,9,11,14,15},{1,2,3,4,8,9,11,15},{1,2,3,4,8,9,12},{1,2,3,4,8,9,12,13},{1,2,3,4,8,9,12,13,14},{1,2,3,4,8,9,12,13,14,15},{1,2,3,4,8,9,12,13,15},{1,2,3,4,8,9,12,14},{1,2,3,4,8,9,12,14,15},{1,2,3,4,8,9,12,15},{1,2,3,4,8,9,13},{1,2,3,4,8,9,13,14},{1,2,3,4,8,9,13,14,15},{1,2,3,4,8,9,13,15},{1,2,3,4,8,9,14},{1,2,3,4,8,9,14,15},{1,2,3,4,8,9,15},{1,2,3,4,8,10},{1,2,3,4,8,10,11},{1,2,3,4,8,10,11,12},{1,2,3,4,8,10,11,12,13},{1,2,3,4,8,10,11,12,13,14},{1,2,3,4,8,10,11,12,13,14,15},{1,2,3,4,8,10,11,12,13,15},{1,2,3,4,8,10,11,12,14},{1,2,3,4,8,10,11,12,14,15},{1,2,3,4,8,10,11,12,15},{1,2,3,4,8,10,11,13},{1,2,3,4,8,10,11,13,14},{1,2,3,4,8,10,11,13,14,15},{1,2,3,4,8,10,11,13,15},{1,2,3,4,8,10,11,14},{1,2,3,4,8,10,11,14,15},{1,2,3,4,8,10,11,15},{1,2,3,4,8,10,12},{1,2,3,4,8,10,12,13},{1,2,3,4,8,10,12,13,14},{1,2,3,4,8,10,12,13,14,15},{1,2,3,4,8,10,12,13,15},{1,2,3,4,8,10,12,14},{1,2,3,4,8,10,12,14,15},{1,2,3,4,8,10,12,15},{1,2,3,4,8,10,13},{1,2,3,4,8,10,13,14},{1,2,3,4,8,10,13,14,15},{1,2,3,4,8,10,13,15},{1,2,3,4,8,10,14},{1,2,3,4,8,10,14,15},{1,2,3,4,8,10,15},{1,2,3,4,8,11},{1,2,3,4,8,11,12},{1,2,3,4,8,11,12,13},{1,2,3,4,8,11,12,13,14},{1,2,3,4,8,11,12,13,14,15},{1,2,3,4,8,11,12,13,15},{1,2,3,4,8,11,12,14},{1,2,3,4,8,11,12,14,15},{1,2,3,4,8,11,12,15},{1,2,3,4,8,11,13},{1,2,3,4,8,11,13,14},{1,2,3,4,8,11,13,14,15},{1,2,3,4,8,11,13,15},{1,2,3,4,8,11,14},{1,2,3,4,8,11,14,15},{1,2,3,4,8,11,15},{1,2,3,4,8,12},{1,2,3,4,8,12,13},{1,2,3,4,8,12,13,14},{1,2,3,4,8,12,13,14,15},{1,2,3,4,8,12,13,15},{1,2,3,4,8,12,14},{1,2,3,4,8,12,14,15},{1,2,3,4,8,12,15},{1,2,3,4,8,13},{1,2,3,4,8,13,14},{1,2,3,4,8,13,14,15},{1,2,3,4,8,13,15},{1,2,3,4,8,14},{1,2,3,4,8,14,15},{1,2,3,4,8,15},{1,2,3,4,9},{1,2,3,4,9,10},{1,2,3,4,9,10,11},{1,2,3,4,9,10,11,12},{1,2,3,4,9,10,11,12,13},{1,2,3,4,9,10,11,12,13,14},{1,2,3,4,9,10,11,12,13,14,15},{1,2,3,4,9,10,11,12,13,15},{1,2,3,4,9,10,11,12,14},{1,2,3,4,9,10,11,12,14,15},{1,2,3,4,9,10,11,12,15},{1,2,3,4,9,10,11,13},{1,2,3,4,9,10,11,13,14},{1,2,3,4,9,10,11,13,14,15},{1,2,3,4,9,10,11,13,15},{1,2,3,4,9,10,11,14},{1,2,3,4,9,10,11,14,15},{1,2,3,4,9,10,11,15},{1,2,3,4,9,10,12},{1,2,3,4,9,10,12,13},{1,2,3,4,9,10,12,13,14},{1,2,3,4,9,10,12,13,14,15},{1,2,3,4,9,10,12,13,15},{1,2,3,4,9,10,12,14},{1,2,3,4,9,10,12,14,15},{1,2,3,4,9,10,12,15},{1,2,3,4,9,10,13},{1,2,3,4,9,10,13,14},{1,2,3,4,9,10,13,14,15},{1,2,3,4,9,10,13,15},{1,2,3,4,9,10,14},{1,2,3,4,9,10,14,15},{1,2,3,4,9,10,15},{1,2,3,4,9,11},{1,2,3,4,9,11,12},{1,2,3,4,9,11,12,13},{1,2,3,4,9,11,12,13,14},{1,2,3,4,9,11,12,13,14,15},{1,2,3,4,9,11,12,13,15},{1,2,3,4,9,11,12,14},{1,2,3,4,9,11,12,14,15},{1,2,3,4,9,11,12,15},{1,2,3,4,9,11,13},{1,2,3,4,9,11,13,14},{1,2,3,4,9,11,13,14,15},{1,2,3,4,9,11,13,15},{1,2,3,4,9,11,14},{1,2,3,4,9,11,14,15},{1,2,3,4,9,11,15},{1,2,3,4,9,12},{1,2,3,4,9,12,13},{1,2,3,4,9,12,13,14},{1,2,3,4,9,12,13,14,15},{1,2,3,4,9,12,13,15},{1,2,3,4,9,12,14},{1,2,3,4,9,12,14,15},{1,2,3,4,9,12,15},{1,2,3,4,9,13},{1,2,3,4,9,13,14},{1,2,3,4,9,13,14,15},{1,2,3,4,9,13,15},{1,2,3,4,9,14},{1,2,3,4,9,14,15},{1,2,3,4,9,15},{1,2,3,4,10},{1,2,3,4,10,11},{1,2,3,4,10,11,12},{1,2,3,4,10,11,12,13},{1,2,3,4,10,11,12,13,14},{1,2,3,4,10,11,12,13,14,15},{1,2,3,4,10,11,12,13,15},{1,2,3,4,10,11,12,14},{1,2,3,4,10,11,12,14,15},{1,2,3,4,10,11,12,15},{1,2,3,4,10,11,13},{1,2,3,4,10,11,13,14},{1,2,3,4,10,11,13,14,15},{1,2,3,4,10,11,13,15},{1,2,3,4,10,11,14},{1,2,3,4,10,11,14,15},{1,2,3,4,10,11,15},{1,2,3,4,10,12},{1,2,3,4,10,12,13},{1,2,3,4,10,12,13,14},{1,2,3,4,10,12,13,14,15},{1,2,3,4,10,12,13,15},{1,2,3,4,10,12,14},{1,2,3,4,10,12,14,15},{1,2,3,4,10,12,15},{1,2,3,4,10,13},{1,2,3,4,10,13,14},{1,2,3,4,10,13,14,15},{1,2,3,4,10,13,15},{1,2,3,4,10,14},{1,2,3,4,10,14,15},{1,2,3,4,10,15},{1,2,3,4,11},{1,2,3,4,11,12},{1,2,3,4,11,12,13},{1,2,3,4,11,12,13,14},{1,2,3,4,11,12,13,14,15},{1,2,3,4,11,12,13,15},{1,2,3,4,11,12,14},{1,2,3,4,11,12,14,15},{1,2,3,4,11,12,15},{1,2,3,4,11,13},{1,2,3,4,11,13,14},{1,2,3,4,11,13,14,15},{1,2,3,4,11,13,15},{1,2,3,4,11,14},{1,2,3,4,11,14,15},{1,2,3,4,11,15},{1,2,3,4,12},{1,2,3,4,12,13},{1,2,3,4,12,13,14},{1,2,3,4,12,13,14,15},{1,2,3,4,12,13,15},{1,2,3,4,12,14},{1,2,3,4,12,14,15},{1,2,3,4,12,15},{1,2,3,4,13},{1,2,3,4,13,14},{1,2,3,4,13,14,15},{1,2,3,4,13,15},{1,2,3,4,14},{1,2,3,4,14,15},{1,2,3,4,15},{1,2,3,5},{1,2,3,5,6},{1,2,3,5,6,7},{1,2,3,5,6,7,8},{1,2,3,5,6,7,8,9},{1,2,3,5,6,7,8,9,10},{1,2,3,5,6,7,8,9,10,11},{1,2,3,5,6,7,8,9,10,11,12},{1,2,3,5,6,7,8,9,10,11,12,13},{1,2,3,5,6,7,8,9,10,11,12,13,14},{1,2,3,5,6,7,8,9,10,11,12,13,14,15},{1,2,3,5,6,7,8,9,10,11,12,13,15},{1,2,3,5,6,7,8,9,10,11,12,14},{1,2,3,5,6,7,8,9,10,11,12,14,15},{1,2,3,5,6,7,8,9,10,11,12,15},{1,2,3,5,6,7,8,9,10,11,13},{1,2,3,5,6,7,8,9,10,11,13,14},{1,2,3,5,6,7,8,9,10,11,13,14,15},{1,2,3,5,6,7,8,9,10,11,13,15},{1,2,3,5,6,7,8,9,10,11,14},{1,2,3,5,6,7,8,9,10,11,14,15},{1,2,3,5,6,7,8,9,10,11,15},{1,2,3,5,6,7,8,9,10,12},{1,2,3,5,6,7,8,9,10,12,13},{1,2,3,5,6,7,8,9,10,12,13,14},{1,2,3,5,6,7,8,9,10,12,13,14,15},{1,2,3,5,6,7,8,9,10,12,13,15},{1,2,3,5,6,7,8,9,10,12,14},{1,2,3,5,6,7,8,9,10,12,14,15},{1,2,3,5,6,7,8,9,10,12,15},{1,2,3,5,6,7,8,9,10,13},{1,2,3,5,6,7,8,9,10,13,14},{1,2,3,5,6,7,8,9,10,13,14,15},{1,2,3,5,6,7,8,9,10,13,15},{1,2,3,5,6,7,8,9,10,14},{1,2,3,5,6,7,8,9,10,14,15},{1,2,3,5,6,7,8,9,10,15},{1,2,3,5,6,7,8,9,11},{1,2,3,5,6,7,8,9,11,12},{1,2,3,5,6,7,8,9,11,12,13},{1,2,3,5,6,7,8,9,11,12,13,14},{1,2,3,5,6,7,8,9,11,12,13,14,15},{1,2,3,5,6,7,8,9,11,12,13,15},{1,2,3,5,6,7,8,9,11,12,14},{1,2,3,5,6,7,8,9,11,12,14,15},{1,2,3,5,6,7,8,9,11,12,15},{1,2,3,5,6,7,8,9,11,13},{1,2,3,5,6,7,8,9,11,13,14},{1,2,3,5,6,7,8,9,11,13,14,15},{1,2,3,5,6,7,8,9,11,13,15},{1,2,3,5,6,7,8,9,11,14},{1,2,3,5,6,7,8,9,11,14,15},{1,2,3,5,6,7,8,9,11,15},{1,2,3,5,6,7,8,9,12},{1,2,3,5,6,7,8,9,12,13},{1,2,3,5,6,7,8,9,12,13,14},{1,2,3,5,6,7,8,9,12,13,14,15},{1,2,3,5,6,7,8,9,12,13,15},{1,2,3,5,6,7,8,9,12,14},{1,2,3,5,6,7,8,9,12,14,15},{1,2,3,5,6,7,8,9,12,15},{1,2,3,5,6,7,8,9,13},{1,2,3,5,6,7,8,9,13,14},{1,2,3,5,6,7,8,9,13,14,15},{1,2,3,5,6,7,8,9,13,15},{1,2,3,5,6,7,8,9,14},{1,2,3,5,6,7,8,9,14,15},{1,2,3,5,6,7,8,9,15},{1,2,3,5,6,7,8,10},{1,2,3,5,6,7,8,10,11},{1,2,3,5,6,7,8,10,11,12},{1,2,3,5,6,7,8,10,11,12,13},{1,2,3,5,6,7,8,10,11,12,13,14},{1,2,3,5,6,7,8,10,11,12,13,14,15},{1,2,3,5,6,7,8,10,11,12,13,15},{1,2,3,5,6,7,8,10,11,12,14},{1,2,3,5,6,7,8,10,11,12,14,15},{1,2,3,5,6,7,8,10,11,12,15},{1,2,3,5,6,7,8,10,11,13},{1,2,3,5,6,7,8,10,11,13,14},{1,2,3,5,6,7,8,10,11,13,14,15},{1,2,3,5,6,7,8,10,11,13,15},{1,2,3,5,6,7,8,10,11,14},{1,2,3,5,6,7,8,10,11,14,15},{1,2,3,5,6,7,8,10,11,15},{1,2,3,5,6,7,8,10,12},{1,2,3,5,6,7,8,10,12,13},{1,2,3,5,6,7,8,10,12,13,14},{1,2,3,5,6,7,8,10,12,13,14,15},{1,2,3,5,6,7,8,10,12,13,15},{1,2,3,5,6,7,8,10,12,14},{1,2,3,5,6,7,8,10,12,14,15},{1,2,3,5,6,7,8,10,12,15},{1,2,3,5,6,7,8,10,13},{1,2,3,5,6,7,8,10,13,14},{1,2,3,5,6,7,8,10,13,14,15},{1,2,3,5,6,7,8,10,13,15},{1,2,3,5,6,7,8,10,14},{1,2,3,5,6,7,8,10,14,15},{1,2,3,5,6,7,8,10,15},{1,2,3,5,6,7,8,11},{1,2,3,5,6,7,8,11,12},{1,2,3,5,6,7,8,11,12,13},{1,2,3,5,6,7,8,11,12,13,14},{1,2,3,5,6,7,8,11,12,13,14,15},{1,2,3,5,6,7,8,11,12,13,15},{1,2,3,5,6,7,8,11,12,14},{1,2,3,5,6,7,8,11,12,14,15},{1,2,3,5,6,7,8,11,12,15},{1,2,3,5,6,7,8,11,13},{1,2,3,5,6,7,8,11,13,14},{1,2,3,5,6,7,8,11,13,14,15},{1,2,3,5,6,7,8,11,13,15},{1,2,3,5,6,7,8,11,14},{1,2,3,5,6,7,8,11,14,15},{1,2,3,5,6,7,8,11,15},{1,2,3,5,6,7,8,12},{1,2,3,5,6,7,8,12,13},{1,2,3,5,6,7,8,12,13,14},{1,2,3,5,6,7,8,12,13,14,15},{1,2,3,5,6,7,8,12,13,15},{1,2,3,5,6,7,8,12,14},{1,2,3,5,6,7,8,12,14,15},{1,2,3,5,6,7,8,12,15},{1,2,3,5,6,7,8,13},{1,2,3,5,6,7,8,13,14},{1,2,3,5,6,7,8,13,14,15},{1,2,3,5,6,7,8,13,15},{1,2,3,5,6,7,8,14},{1,2,3,5,6,7,8,14,15},{1,2,3,5,6,7,8,15},{1,2,3,5,6,7,9},{1,2,3,5,6,7,9,10},{1,2,3,5,6,7,9,10,11},{1,2,3,5,6,7,9,10,11,12},{1,2,3,5,6,7,9,10,11,12,13},{1,2,3,5,6,7,9,10,11,12,13,14},{1,2,3,5,6,7,9,10,11,12,13,14,15},{1,2,3,5,6,7,9,10,11,12,13,15},{1,2,3,5,6,7,9,10,11,12,14},{1,2,3,5,6,7,9,10,11,12,14,15},{1,2,3,5,6,7,9,10,11,12,15},{1,2,3,5,6,7,9,10,11,13},{1,2,3,5,6,7,9,10,11,13,14},{1,2,3,5,6,7,9,10,11,13,14,15},{1,2,3,5,6,7,9,10,11,13,15},{1,2,3,5,6,7,9,10,11,14},{1,2,3,5,6,7,9,10,11,14,15},{1,2,3,5,6,7,9,10,11,15},{1,2,3,5,6,7,9,10,12},{1,2,3,5,6,7,9,10,12,13},{1,2,3,5,6,7,9,10,12,13,14},{1,2,3,5,6,7,9,10,12,13,14,15},{1,2,3,5,6,7,9,10,12,13,15},{1,2,3,5,6,7,9,10,12,14},{1,2,3,5,6,7,9,10,12,14,15},{1,2,3,5,6,7,9,10,12,15},{1,2,3,5,6,7,9,10,13},{1,2,3,5,6,7,9,10,13,14},{1,2,3,5,6,7,9,10,13,14,15},{1,2,3,5,6,7,9,10,13,15},{1,2,3,5,6,7,9,10,14},{1,2,3,5,6,7,9,10,14,15},{1,2,3,5,6,7,9,10,15},{1,2,3,5,6,7,9,11},{1,2,3,5,6,7,9,11,12},{1,2,3,5,6,7,9,11,12,13},{1,2,3,5,6,7,9,11,12,13,14},{1,2,3,5,6,7,9,11,12,13,14,15},{1,2,3,5,6,7,9,11,12,13,15},{1,2,3,5,6,7,9,11,12,14},{1,2,3,5,6,7,9,11,12,14,15},{1,2,3,5,6,7,9,11,12,15},{1,2,3,5,6,7,9,11,13},{1,2,3,5,6,7,9,11,13,14},{1,2,3,5,6,7,9,11,13,14,15},{1,2,3,5,6,7,9,11,13,15},{1,2,3,5,6,7,9,11,14},{1,2,3,5,6,7,9,11,14,15},{1,2,3,5,6,7,9,11,15},{1,2,3,5,6,7,9,12},{1,2,3,5,6,7,9,12,13},{1,2,3,5,6,7,9,12,13,14},{1,2,3,5,6,7,9,12,13,14,15},{1,2,3,5,6,7,9,12,13,15},{1,2,3,5,6,7,9,12,14},{1,2,3,5,6,7,9,12,14,15},{1,2,3,5,6,7,9,12,15},{1,2,3,5,6,7,9,13},{1,2,3,5,6,7,9,13,14},{1,2,3,5,6,7,9,13,14,15},{1,2,3,5,6,7,9,13,15},{1,2,3,5,6,7,9,14},{1,2,3,5,6,7,9,14,15},{1,2,3,5,6,7,9,15},{1,2,3,5,6,7,10},{1,2,3,5,6,7,10,11},{1,2,3,5,6,7,10,11,12},{1,2,3,5,6,7,10,11,12,13},{1,2,3,5,6,7,10,11,12,13,14},{1,2,3,5,6,7,10,11,12,13,14,15},{1,2,3,5,6,7,10,11,12,13,15},{1,2,3,5,6,7,10,11,12,14},{1,2,3,5,6,7,10,11,12,14,15},{1,2,3,5,6,7,10,11,12,15},{1,2,3,5,6,7,10,11,13},{1,2,3,5,6,7,10,11,13,14},{1,2,3,5,6,7,10,11,13,14,15},{1,2,3,5,6,7,10,11,13,15},{1,2,3,5,6,7,10,11,14},{1,2,3,5,6,7,10,11,14,15},{1,2,3,5,6,7,10,11,15},{1,2,3,5,6,7,10,12},{1,2,3,5,6,7,10,12,13},{1,2,3,5,6,7,10,12,13,14},{1,2,3,5,6,7,10,12,13,14,15},{1,2,3,5,6,7,10,12,13,15},{1,2,3,5,6,7,10,12,14},{1,2,3,5,6,7,10,12,14,15},{1,2,3,5,6,7,10,12,15},{1,2,3,5,6,7,10,13},{1,2,3,5,6,7,10,13,14},{1,2,3,5,6,7,10,13,14,15},{1,2,3,5,6,7,10,13,15},{1,2,3,5,6,7,10,14},{1,2,3,5,6,7,10,14,15},{1,2,3,5,6,7,10,15},{1,2,3,5,6,7,11},{1,2,3,5,6,7,11,12},{1,2,3,5,6,7,11,12,13},{1,2,3,5,6,7,11,12,13,14},{1,2,3,5,6,7,11,12,13,14,15},{1,2,3,5,6,7,11,12,13,15},{1,2,3,5,6,7,11,12,14},{1,2,3,5,6,7,11,12,14,15},{1,2,3,5,6,7,11,12,15},{1,2,3,5,6,7,11,13},{1,2,3,5,6,7,11,13,14},{1,2,3,5,6,7,11,13,14,15},{1,2,3,5,6,7,11,13,15},{1,2,3,5,6,7,11,14},{1,2,3,5,6,7,11,14,15},{1,2,3,5,6,7,11,15},{1,2,3,5,6,7,12},{1,2,3,5,6,7,12,13},{1,2,3,5,6,7,12,13,14},{1,2,3,5,6,7,12,13,14,15},{1,2,3,5,6,7,12,13,15},{1,2,3,5,6,7,12,14},{1,2,3,5,6,7,12,14,15},{1,2,3,5,6,7,12,15},{1,2,3,5,6,7,13},{1,2,3,5,6,7,13,14},{1,2,3,5,6,7,13,14,15},{1,2,3,5,6,7,13,15},{1,2,3,5,6,7,14},{1,2,3,5,6,7,14,15},{1,2,3,5,6,7,15},{1,2,3,5,6,8},{1,2,3,5,6,8,9},{1,2,3,5,6,8,9,10},{1,2,3,5,6,8,9,10,11},{1,2,3,5,6,8,9,10,11,12},{1,2,3,5,6,8,9,10,11,12,13},{1,2,3,5,6,8,9,10,11,12,13,14},{1,2,3,5,6,8,9,10,11,12,13,14,15},{1,2,3,5,6,8,9,10,11,12,13,15},{1,2,3,5,6,8,9,10,11,12,14},{1,2,3,5,6,8,9,10,11,12,14,15},{1,2,3,5,6,8,9,10,11,12,15},{1,2,3,5,6,8,9,10,11,13},{1,2,3,5,6,8,9,10,11,13,14},{1,2,3,5,6,8,9,10,11,13,14,15},{1,2,3,5,6,8,9,10,11,13,15},{1,2,3,5,6,8,9,10,11,14},{1,2,3,5,6,8,9,10,11,14,15},{1,2,3,5,6,8,9,10,11,15},{1,2,3,5,6,8,9,10,12},{1,2,3,5,6,8,9,10,12,13},{1,2,3,5,6,8,9,10,12,13,14},{1,2,3,5,6,8,9,10,12,13,14,15},{1,2,3,5,6,8,9,10,12,13,15},{1,2,3,5,6,8,9,10,12,14},{1,2,3,5,6,8,9,10,12,14,15},{1,2,3,5,6,8,9,10,12,15},{1,2,3,5,6,8,9,10,13},{1,2,3,5,6,8,9,10,13,14},{1,2,3,5,6,8,9,10,13,14,15},{1,2,3,5,6,8,9,10,13,15},{1,2,3,5,6,8,9,10,14},{1,2,3,5,6,8,9,10,14,15},{1,2,3,5,6,8,9,10,15},{1,2,3,5,6,8,9,11},{1,2,3,5,6,8,9,11,12},{1,2,3,5,6,8,9,11,12,13},{1,2,3,5,6,8,9,11,12,13,14},{1,2,3,5,6,8,9,11,12,13,14,15},{1,2,3,5,6,8,9,11,12,13,15},{1,2,3,5,6,8,9,11,12,14},{1,2,3,5,6,8,9,11,12,14,15},{1,2,3,5,6,8,9,11,12,15},{1,2,3,5,6,8,9,11,13},{1,2,3,5,6,8,9,11,13,14},{1,2,3,5,6,8,9,11,13,14,15},{1,2,3,5,6,8,9,11,13,15},{1,2,3,5,6,8,9,11,14},{1,2,3,5,6,8,9,11,14,15},{1,2,3,5,6,8,9,11,15},{1,2,3,5,6,8,9,12},{1,2,3,5,6,8,9,12,13},{1,2,3,5,6,8,9,12,13,14},{1,2,3,5,6,8,9,12,13,14,15},{1,2,3,5,6,8,9,12,13,15},{1,2,3,5,6,8,9,12,14},{1,2,3,5,6,8,9,12,14,15},{1,2,3,5,6,8,9,12,15},{1,2,3,5,6,8,9,13},{1,2,3,5,6,8,9,13,14},{1,2,3,5,6,8,9,13,14,15},{1,2,3,5,6,8,9,13,15},{1,2,3,5,6,8,9,14},{1,2,3,5,6,8,9,14,15},{1,2,3,5,6,8,9,15},{1,2,3,5,6,8,10},{1,2,3,5,6,8,10,11},{1,2,3,5,6,8,10,11,12},{1,2,3,5,6,8,10,11,12,13},{1,2,3,5,6,8,10,11,12,13,14},{1,2,3,5,6,8,10,11,12,13,14,15},{1,2,3,5,6,8,10,11,12,13,15},{1,2,3,5,6,8,10,11,12,14},{1,2,3,5,6,8,10,11,12,14,15},{1,2,3,5,6,8,10,11,12,15},{1,2,3,5,6,8,10,11,13},{1,2,3,5,6,8,10,11,13,14},{1,2,3,5,6,8,10,11,13,14,15},{1,2,3,5,6,8,10,11,13,15},{1,2,3,5,6,8,10,11,14},{1,2,3,5,6,8,10,11,14,15},{1,2,3,5,6,8,10,11,15},{1,2,3,5,6,8,10,12},{1,2,3,5,6,8,10,12,13},{1,2,3,5,6,8,10,12,13,14},{1,2,3,5,6,8,10,12,13,14,15},{1,2,3,5,6,8,10,12,13,15},{1,2,3,5,6,8,10,12,14},{1,2,3,5,6,8,10,12,14,15},{1,2,3,5,6,8,10,12,15},{1,2,3,5,6,8,10,13},{1,2,3,5,6,8,10,13,14},{1,2,3,5,6,8,10,13,14,15},{1,2,3,5,6,8,10,13,15},{1,2,3,5,6,8,10,14},{1,2,3,5,6,8,10,14,15},{1,2,3,5,6,8,10,15},{1,2,3,5,6,8,11},{1,2,3,5,6,8,11,12},{1,2,3,5,6,8,11,12,13},{1,2,3,5,6,8,11,12,13,14},{1,2,3,5,6,8,11,12,13,14,15},{1,2,3,5,6,8,11,12,13,15},{1,2,3,5,6,8,11,12,14},{1,2,3,5,6,8,11,12,14,15},{1,2,3,5,6,8,11,12,15},{1,2,3,5,6,8,11,13},{1,2,3,5,6,8,11,13,14},{1,2,3,5,6,8,11,13,14,15},{1,2,3,5,6,8,11,13,15},{1,2,3,5,6,8,11,14},{1,2,3,5,6,8,11,14,15},{1,2,3,5,6,8,11,15},{1,2,3,5,6,8,12},{1,2,3,5,6,8,12,13},{1,2,3,5,6,8,12,13,14},{1,2,3,5,6,8,12,13,14,15},{1,2,3,5,6,8,12,13,15},{1,2,3,5,6,8,12,14},{1,2,3,5,6,8,12,14,15},{1,2,3,5,6,8,12,15},{1,2,3,5,6,8,13},{1,2,3,5,6,8,13,14},{1,2,3,5,6,8,13,14,15},{1,2,3,5,6,8,13,15},{1,2,3,5,6,8,14},{1,2,3,5,6,8,14,15},{1,2,3,5,6,8,15},{1,2,3,5,6,9},{1,2,3,5,6,9,10},{1,2,3,5,6,9,10,11},{1,2,3,5,6,9,10,11,12},{1,2,3,5,6,9,10,11,12,13},{1,2,3,5,6,9,10,11,12,13,14},{1,2,3,5,6,9,10,11,12,13,14,15},{1,2,3,5,6,9,10,11,12,13,15},{1,2,3,5,6,9,10,11,12,14},{1,2,3,5,6,9,10,11,12,14,15},{1,2,3,5,6,9,10,11,12,15},{1,2,3,5,6,9,10,11,13},{1,2,3,5,6,9,10,11,13,14},{1,2,3,5,6,9,10,11,13,14,15},{1,2,3,5,6,9,10,11,13,15},{1,2,3,5,6,9,10,11,14},{1,2,3,5,6,9,10,11,14,15},{1,2,3,5,6,9,10,11,15},{1,2,3,5,6,9,10,12},{1,2,3,5,6,9,10,12,13},{1,2,3,5,6,9,10,12,13,14},{1,2,3,5,6,9,10,12,13,14,15},{1,2,3,5,6,9,10,12,13,15},{1,2,3,5,6,9,10,12,14},{1,2,3,5,6,9,10,12,14,15},{1,2,3,5,6,9,10,12,15},{1,2,3,5,6,9,10,13},{1,2,3,5,6,9,10,13,14},{1,2,3,5,6,9,10,13,14,15},{1,2,3,5,6,9,10,13,15},{1,2,3,5,6,9,10,14},{1,2,3,5,6,9,10,14,15},{1,2,3,5,6,9,10,15},{1,2,3,5,6,9,11},{1,2,3,5,6,9,11,12},{1,2,3,5,6,9,11,12,13},{1,2,3,5,6,9,11,12,13,14},{1,2,3,5,6,9,11,12,13,14,15},{1,2,3,5,6,9,11,12,13,15},{1,2,3,5,6,9,11,12,14},{1,2,3,5,6,9,11,12,14,15},{1,2,3,5,6,9,11,12,15},{1,2,3,5,6,9,11,13},{1,2,3,5,6,9,11,13,14},{1,2,3,5,6,9,11,13,14,15},{1,2,3,5,6,9,11,13,15},{1,2,3,5,6,9,11,14},{1,2,3,5,6,9,11,14,15},{1,2,3,5,6,9,11,15},{1,2,3,5,6,9,12},{1,2,3,5,6,9,12,13},{1,2,3,5,6,9,12,13,14},{1,2,3,5,6,9,12,13,14,15},{1,2,3,5,6,9,12,13,15},{1,2,3,5,6,9,12,14},{1,2,3,5,6,9,12,14,15},{1,2,3,5,6,9,12,15},{1,2,3,5,6,9,13},{1,2,3,5,6,9,13,14},{1,2,3,5,6,9,13,14,15},{1,2,3,5,6,9,13,15},{1,2,3,5,6,9,14},{1,2,3,5,6,9,14,15},{1,2,3,5,6,9,15},{1,2,3,5,6,10},{1,2,3,5,6,10,11},{1,2,3,5,6,10,11,12},{1,2,3,5,6,10,11,12,13},{1,2,3,5,6,10,11,12,13,14},{1,2,3,5,6,10,11,12,13,14,15},{1,2,3,5,6,10,11,12,13,15},{1,2,3,5,6,10,11,12,14},{1,2,3,5,6,10,11,12,14,15},{1,2,3,5,6,10,11,12,15},{1,2,3,5,6,10,11,13},{1,2,3,5,6,10,11,13,14},{1,2,3,5,6,10,11,13,14,15},{1,2,3,5,6,10,11,13,15},{1,2,3,5,6,10,11,14},{1,2,3,5,6,10,11,14,15},{1,2,3,5,6,10,11,15},{1,2,3,5,6,10,12},{1,2,3,5,6,10,12,13},{1,2,3,5,6,10,12,13,14},{1,2,3,5,6,10,12,13,14,15},{1,2,3,5,6,10,12,13,15},{1,2,3,5,6,10,12,14},{1,2,3,5,6,10,12,14,15},{1,2,3,5,6,10,12,15},{1,2,3,5,6,10,13},{1,2,3,5,6,10,13,14},{1,2,3,5,6,10,13,14,15},{1,2,3,5,6,10,13,15},{1,2,3,5,6,10,14},{1,2,3,5,6,10,14,15},{1,2,3,5,6,10,15},{1,2,3,5,6,11},{1,2,3,5,6,11,12},{1,2,3,5,6,11,12,13},{1,2,3,5,6,11,12,13,14},{1,2,3,5,6,11,12,13,14,15},{1,2,3,5,6,11,12,13,15},{1,2,3,5,6,11,12,14},{1,2,3,5,6,11,12,14,15},{1,2,3,5,6,11,12,15},{1,2,3,5,6,11,13},{1,2,3,5,6,11,13,14},{1,2,3,5,6,11,13,14,15},{1,2,3,5,6,11,13,15},{1,2,3,5,6,11,14},{1,2,3,5,6,11,14,15},{1,2,3,5,6,11,15},{1,2,3,5,6,12},{1,2,3,5,6,12,13},{1,2,3,5,6,12,13,14},{1,2,3,5,6,12,13,14,15},{1,2,3,5,6,12,13,15},{1,2,3,5,6,12,14},{1,2,3,5,6,12,14,15},{1,2,3,5,6,12,15},{1,2,3,5,6,13},{1,2,3,5,6,13,14},{1,2,3,5,6,13,14,15},{1,2,3,5,6,13,15},{1,2,3,5,6,14},{1,2,3,5,6,14,15},{1,2,3,5,6,15},{1,2,3,5,7},{1,2,3,5,7,8},{1,2,3,5,7,8,9},{1,2,3,5,7,8,9,10},{1,2,3,5,7,8,9,10,11},{1,2,3,5,7,8,9,10,11,12},{1,2,3,5,7,8,9,10,11,12,13},{1,2,3,5,7,8,9,10,11,12,13,14},{1,2,3,5,7,8,9,10,11,12,13,14,15},{1,2,3,5,7,8,9,10,11,12,13,15},{1,2,3,5,7,8,9,10,11,12,14},{1,2,3,5,7,8,9,10,11,12,14,15},{1,2,3,5,7,8,9,10,11,12,15},{1,2,3,5,7,8,9,10,11,13},{1,2,3,5,7,8,9,10,11,13,14},{1,2,3,5,7,8,9,10,11,13,14,15},{1,2,3,5,7,8,9,10,11,13,15},{1,2,3,5,7,8,9,10,11,14},{1,2,3,5,7,8,9,10,11,14,15},{1,2,3,5,7,8,9,10,11,15},{1,2,3,5,7,8,9,10,12},{1,2,3,5,7,8,9,10,12,13},{1,2,3,5,7,8,9,10,12,13,14},{1,2,3,5,7,8,9,10,12,13,14,15},{1,2,3,5,7,8,9,10,12,13,15},{1,2,3,5,7,8,9,10,12,14},{1,2,3,5,7,8,9,10,12,14,15},{1,2,3,5,7,8,9,10,12,15},{1,2,3,5,7,8,9,10,13},{1,2,3,5,7,8,9,10,13,14},{1,2,3,5,7,8,9,10,13,14,15},{1,2,3,5,7,8,9,10,13,15},{1,2,3,5,7,8,9,10,14},{1,2,3,5,7,8,9,10,14,15},{1,2,3,5,7,8,9,10,15},{1,2,3,5,7,8,9,11},{1,2,3,5,7,8,9,11,12},{1,2,3,5,7,8,9,11,12,13},{1,2,3,5,7,8,9,11,12,13,14},{1,2,3,5,7,8,9,11,12,13,14,15},{1,2,3,5,7,8,9,11,12,13,15},{1,2,3,5,7,8,9,11,12,14},{1,2,3,5,7,8,9,11,12,14,15},{1,2,3,5,7,8,9,11,12,15},{1,2,3,5,7,8,9,11,13},{1,2,3,5,7,8,9,11,13,14},{1,2,3,5,7,8,9,11,13,14,15},{1,2,3,5,7,8,9,11,13,15},{1,2,3,5,7,8,9,11,14},{1,2,3,5,7,8,9,11,14,15},{1,2,3,5,7,8,9,11,15},{1,2,3,5,7,8,9,12},{1,2,3,5,7,8,9,12,13},{1,2,3,5,7,8,9,12,13,14},{1,2,3,5,7,8,9,12,13,14,15},{1,2,3,5,7,8,9,12,13,15},{1,2,3,5,7,8,9,12,14},{1,2,3,5,7,8,9,12,14,15},{1,2,3,5,7,8,9,12,15},{1,2,3,5,7,8,9,13},{1,2,3,5,7,8,9,13,14},{1,2,3,5,7,8,9,13,14,15},{1,2,3,5,7,8,9,13,15},{1,2,3,5,7,8,9,14},{1,2,3,5,7,8,9,14,15},{1,2,3,5,7,8,9,15},{1,2,3,5,7,8,10},{1,2,3,5,7,8,10,11},{1,2,3,5,7,8,10,11,12},{1,2,3,5,7,8,10,11,12,13},{1,2,3,5,7,8,10,11,12,13,14},{1,2,3,5,7,8,10,11,12,13,14,15},{1,2,3,5,7,8,10,11,12,13,15},{1,2,3,5,7,8,10,11,12,14},{1,2,3,5,7,8,10,11,12,14,15},{1,2,3,5,7,8,10,11,12,15},{1,2,3,5,7,8,10,11,13},{1,2,3,5,7,8,10,11,13,14},{1,2,3,5,7,8,10,11,13,14,15},{1,2,3,5,7,8,10,11,13,15},{1,2,3,5,7,8,10,11,14},{1,2,3,5,7,8,10,11,14,15},{1,2,3,5,7,8,10,11,15},{1,2,3,5,7,8,10,12},{1,2,3,5,7,8,10,12,13},{1,2,3,5,7,8,10,12,13,14},{1,2,3,5,7,8,10,12,13,14,15},{1,2,3,5,7,8,10,12,13,15},{1,2,3,5,7,8,10,12,14},{1,2,3,5,7,8,10,12,14,15},{1,2,3,5,7,8,10,12,15},{1,2,3,5,7,8,10,13},{1,2,3,5,7,8,10,13,14},{1,2,3,5,7,8,10,13,14,15},{1,2,3,5,7,8,10,13,15},{1,2,3,5,7,8,10,14},{1,2,3,5,7,8,10,14,15},{1,2,3,5,7,8,10,15},{1,2,3,5,7,8,11},{1,2,3,5,7,8,11,12},{1,2,3,5,7,8,11,12,13},{1,2,3,5,7,8,11,12,13,14},{1,2,3,5,7,8,11,12,13,14,15},{1,2,3,5,7,8,11,12,13,15},{1,2,3,5,7,8,11,12,14},{1,2,3,5,7,8,11,12,14,15},{1,2,3,5,7,8,11,12,15},{1,2,3,5,7,8,11,13},{1,2,3,5,7,8,11,13,14},{1,2,3,5,7,8,11,13,14,15},{1,2,3,5,7,8,11,13,15},{1,2,3,5,7,8,11,14},{1,2,3,5,7,8,11,14,15},{1,2,3,5,7,8,11,15},{1,2,3,5,7,8,12},{1,2,3,5,7,8,12,13},{1,2,3,5,7,8,12,13,14},{1,2,3,5,7,8,12,13,14,15},{1,2,3,5,7,8,12,13,15},{1,2,3,5,7,8,12,14},{1,2,3,5,7,8,12,14,15},{1,2,3,5,7,8,12,15},{1,2,3,5,7,8,13},{1,2,3,5,7,8,13,14},{1,2,3,5,7,8,13,14,15},{1,2,3,5,7,8,13,15},{1,2,3,5,7,8,14},{1,2,3,5,7,8,14,15},{1,2,3,5,7,8,15},{1,2,3,5,7,9},{1,2,3,5,7,9,10},{1,2,3,5,7,9,10,11},{1,2,3,5,7,9,10,11,12},{1,2,3,5,7,9,10,11,12,13},{1,2,3,5,7,9,10,11,12,13,14},{1,2,3,5,7,9,10,11,12,13,14,15},{1,2,3,5,7,9,10,11,12,13,15},{1,2,3,5,7,9,10,11,12,14},{1,2,3,5,7,9,10,11,12,14,15},{1,2,3,5,7,9,10,11,12,15},{1,2,3,5,7,9,10,11,13},{1,2,3,5,7,9,10,11,13,14},{1,2,3,5,7,9,10,11,13,14,15},{1,2,3,5,7,9,10,11,13,15},{1,2,3,5,7,9,10,11,14},{1,2,3,5,7,9,10,11,14,15},{1,2,3,5,7,9,10,11,15},{1,2,3,5,7,9,10,12},{1,2,3,5,7,9,10,12,13},{1,2,3,5,7,9,10,12,13,14},{1,2,3,5,7,9,10,12,13,14,15},{1,2,3,5,7,9,10,12,13,15},{1,2,3,5,7,9,10,12,14},{1,2,3,5,7,9,10,12,14,15},{1,2,3,5,7,9,10,12,15},{1,2,3,5,7,9,10,13},{1,2,3,5,7,9,10,13,14},{1,2,3,5,7,9,10,13,14,15},{1,2,3,5,7,9,10,13,15},{1,2,3,5,7,9,10,14},{1,2,3,5,7,9,10,14,15},{1,2,3,5,7,9,10,15},{1,2,3,5,7,9,11},{1,2,3,5,7,9,11,12},{1,2,3,5,7,9,11,12,13},{1,2,3,5,7,9,11,12,13,14},{1,2,3,5,7,9,11,12,13,14,15},{1,2,3,5,7,9,11,12,13,15},{1,2,3,5,7,9,11,12,14},{1,2,3,5,7,9,11,12,14,15},{1,2,3,5,7,9,11,12,15},{1,2,3,5,7,9,11,13},{1,2,3,5,7,9,11,13,14},{1,2,3,5,7,9,11,13,14,15},{1,2,3,5,7,9,11,13,15},{1,2,3,5,7,9,11,14},{1,2,3,5,7,9,11,14,15},{1,2,3,5,7,9,11,15},{1,2,3,5,7,9,12},{1,2,3,5,7,9,12,13},{1,2,3,5,7,9,12,13,14},{1,2,3,5,7,9,12,13,14,15},{1,2,3,5,7,9,12,13,15},{1,2,3,5,7,9,12,14},{1,2,3,5,7,9,12,14,15},{1,2,3,5,7,9,12,15},{1,2,3,5,7,9,13},{1,2,3,5,7,9,13,14},{1,2,3,5,7,9,13,14,15},{1,2,3,5,7,9,13,15},{1,2,3,5,7,9,14},{1,2,3,5,7,9,14,15},{1,2,3,5,7,9,15},{1,2,3,5,7,10},{1,2,3,5,7,10,11},{1,2,3,5,7,10,11,12},{1,2,3,5,7,10,11,12,13},{1,2,3,5,7,10,11,12,13,14},{1,2,3,5,7,10,11,12,13,14,15},{1,2,3,5,7,10,11,12,13,15},{1,2,3,5,7,10,11,12,14},{1,2,3,5,7,10,11,12,14,15},{1,2,3,5,7,10,11,12,15},{1,2,3,5,7,10,11,13},{1,2,3,5,7,10,11,13,14},{1,2,3,5,7,10,11,13,14,15},{1,2,3,5,7,10,11,13,15},{1,2,3,5,7,10,11,14},{1,2,3,5,7,10,11,14,15},{1,2,3,5,7,10,11,15},{1,2,3,5,7,10,12},{1,2,3,5,7,10,12,13},{1,2,3,5,7,10,12,13,14},{1,2,3,5,7,10,12,13,14,15},{1,2,3,5,7,10,12,13,15},{1,2,3,5,7,10,12,14},{1,2,3,5,7,10,12,14,15},{1,2,3,5,7,10,12,15},{1,2,3,5,7,10,13},{1,2,3,5,7,10,13,14},{1,2,3,5,7,10,13,14,15},{1,2,3,5,7,10,13,15},{1,2,3,5,7,10,14},{1,2,3,5,7,10,14,15},{1,2,3,5,7,10,15},{1,2,3,5,7,11},{1,2,3,5,7,11,12},{1,2,3,5,7,11,12,13},{1,2,3,5,7,11,12,13,14},{1,2,3,5,7,11,12,13,14,15},{1,2,3,5,7,11,12,13,15},{1,2,3,5,7,11,12,14},{1,2,3,5,7,11,12,14,15},{1,2,3,5,7,11,12,15},{1,2,3,5,7,11,13},{1,2,3,5,7,11,13,14},{1,2,3,5,7,11,13,14,15},{1,2,3,5,7,11,13,15},{1,2,3,5,7,11,14},{1,2,3,5,7,11,14,15},{1,2,3,5,7,11,15},{1,2,3,5,7,12},{1,2,3,5,7,12,13},{1,2,3,5,7,12,13,14},{1,2,3,5,7,12,13,14,15},{1,2,3,5,7,12,13,15},{1,2,3,5,7,12,14},{1,2,3,5,7,12,14,15},{1,2,3,5,7,12,15},{1,2,3,5,7,13},{1,2,3,5,7,13,14},{1,2,3,5,7,13,14,15},{1,2,3,5,7,13,15},{1,2,3,5,7,14},{1,2,3,5,7,14,15},{1,2,3,5,7,15},{1,2,3,5,8},{1,2,3,5,8,9},{1,2,3,5,8,9,10},{1,2,3,5,8,9,10,11},{1,2,3,5,8,9,10,11,12},{1,2,3,5,8,9,10,11,12,13},{1,2,3,5,8,9,10,11,12,13,14},{1,2,3,5,8,9,10,11,12,13,14,15},{1,2,3,5,8,9,10,11,12,13,15},{1,2,3,5,8,9,10,11,12,14},{1,2,3,5,8,9,10,11,12,14,15},{1,2,3,5,8,9,10,11,12,15},{1,2,3,5,8,9,10,11,13},{1,2,3,5,8,9,10,11,13,14},{1,2,3,5,8,9,10,11,13,14,15},{1,2,3,5,8,9,10,11,13,15},{1,2,3,5,8,9,10,11,14},{1,2,3,5,8,9,10,11,14,15},{1,2,3,5,8,9,10,11,15},{1,2,3,5,8,9,10,12},{1,2,3,5,8,9,10,12,13},{1,2,3,5,8,9,10,12,13,14},{1,2,3,5,8,9,10,12,13,14,15},{1,2,3,5,8,9,10,12,13,15},{1,2,3,5,8,9,10,12,14},{1,2,3,5,8,9,10,12,14,15},{1,2,3,5,8,9,10,12,15},{1,2,3,5,8,9,10,13},{1,2,3,5,8,9,10,13,14},{1,2,3,5,8,9,10,13,14,15},{1,2,3,5,8,9,10,13,15},{1,2,3,5,8,9,10,14},{1,2,3,5,8,9,10,14,15},{1,2,3,5,8,9,10,15},{1,2,3,5,8,9,11},{1,2,3,5,8,9,11,12},{1,2,3,5,8,9,11,12,13},{1,2,3,5,8,9,11,12,13,14},{1,2,3,5,8,9,11,12,13,14,15},{1,2,3,5,8,9,11,12,13,15},{1,2,3,5,8,9,11,12,14},{1,2,3,5,8,9,11,12,14,15},{1,2,3,5,8,9,11,12,15},{1,2,3,5,8,9,11,13},{1,2,3,5,8,9,11,13,14},{1,2,3,5,8,9,11,13,14,15},{1,2,3,5,8,9,11,13,15},{1,2,3,5,8,9,11,14},{1,2,3,5,8,9,11,14,15},{1,2,3,5,8,9,11,15},{1,2,3,5,8,9,12},{1,2,3,5,8,9,12,13},{1,2,3,5,8,9,12,13,14},{1,2,3,5,8,9,12,13,14,15},{1,2,3,5,8,9,12,13,15},{1,2,3,5,8,9,12,14},{1,2,3,5,8,9,12,14,15},{1,2,3,5,8,9,12,15},{1,2,3,5,8,9,13},{1,2,3,5,8,9,13,14},{1,2,3,5,8,9,13,14,15},{1,2,3,5,8,9,13,15},{1,2,3,5,8,9,14},{1,2,3,5,8,9,14,15},{1,2,3,5,8,9,15},{1,2,3,5,8,10},{1,2,3,5,8,10,11},{1,2,3,5,8,10,11,12},{1,2,3,5,8,10,11,12,13},{1,2,3,5,8,10,11,12,13,14},{1,2,3,5,8,10,11,12,13,14,15},{1,2,3,5,8,10,11,12,13,15},{1,2,3,5,8,10,11,12,14},{1,2,3,5,8,10,11,12,14,15},{1,2,3,5,8,10,11,12,15},{1,2,3,5,8,10,11,13},{1,2,3,5,8,10,11,13,14},{1,2,3,5,8,10,11,13,14,15},{1,2,3,5,8,10,11,13,15},{1,2,3,5,8,10,11,14},{1,2,3,5,8,10,11,14,15},{1,2,3,5,8,10,11,15},{1,2,3,5,8,10,12},{1,2,3,5,8,10,12,13},{1,2,3,5,8,10,12,13,14},{1,2,3,5,8,10,12,13,14,15},{1,2,3,5,8,10,12,13,15},{1,2,3,5,8,10,12,14},{1,2,3,5,8,10,12,14,15},{1,2,3,5,8,10,12,15},{1,2,3,5,8,10,13},{1,2,3,5,8,10,13,14},{1,2,3,5,8,10,13,14,15},{1,2,3,5,8,10,13,15},{1,2,3,5,8,10,14},{1,2,3,5,8,10,14,15},{1,2,3,5,8,10,15},{1,2,3,5,8,11},{1,2,3,5,8,11,12},{1,2,3,5,8,11,12,13},{1,2,3,5,8,11,12,13,14},{1,2,3,5,8,11,12,13,14,15},{1,2,3,5,8,11,12,13,15},{1,2,3,5,8,11,12,14},{1,2,3,5,8,11,12,14,15},{1,2,3,5,8,11,12,15},{1,2,3,5,8,11,13},{1,2,3,5,8,11,13,14},{1,2,3,5,8,11,13,14,15},{1,2,3,5,8,11,13,15},{1,2,3,5,8,11,14},{1,2,3,5,8,11,14,15},{1,2,3,5,8,11,15},{1,2,3,5,8,12},{1,2,3,5,8,12,13},{1,2,3,5,8,12,13,14},{1,2,3,5,8,12,13,14,15},{1,2,3,5,8,12,13,15},{1,2,3,5,8,12,14},{1,2,3,5,8,12,14,15},{1,2,3,5,8,12,15},{1,2,3,5,8,13},{1,2,3,5,8,13,14},{1,2,3,5,8,13,14,15},{1,2,3,5,8,13,15},{1,2,3,5,8,14},{1,2,3,5,8,14,15},{1,2,3,5,8,15},{1,2,3,5,9},{1,2,3,5,9,10},{1,2,3,5,9,10,11},{1,2,3,5,9,10,11,12},{1,2,3,5,9,10,11,12,13},{1,2,3,5,9,10,11,12,13,14},{1,2,3,5,9,10,11,12,13,14,15},{1,2,3,5,9,10,11,12,13,15},{1,2,3,5,9,10,11,12,14},{1,2,3,5,9,10,11,12,14,15},{1,2,3,5,9,10,11,12,15},{1,2,3,5,9,10,11,13},{1,2,3,5,9,10,11,13,14},{1,2,3,5,9,10,11,13,14,15},{1,2,3,5,9,10,11,13,15},{1,2,3,5,9,10,11,14},{1,2,3,5,9,10,11,14,15},{1,2,3,5,9,10,11,15},{1,2,3,5,9,10,12},{1,2,3,5,9,10,12,13},{1,2,3,5,9,10,12,13,14},{1,2,3,5,9,10,12,13,14,15},{1,2,3,5,9,10,12,13,15},{1,2,3,5,9,10,12,14},{1,2,3,5,9,10,12,14,15},{1,2,3,5,9,10,12,15},{1,2,3,5,9,10,13},{1,2,3,5,9,10,13,14},{1,2,3,5,9,10,13,14,15},{1,2,3,5,9,10,13,15},{1,2,3,5,9,10,14},{1,2,3,5,9,10,14,15},{1,2,3,5,9,10,15},{1,2,3,5,9,11},{1,2,3,5,9,11,12},{1,2,3,5,9,11,12,13},{1,2,3,5,9,11,12,13,14},{1,2,3,5,9,11,12,13,14,15},{1,2,3,5,9,11,12,13,15},{1,2,3,5,9,11,12,14},{1,2,3,5,9,11,12,14,15},{1,2,3,5,9,11,12,15},{1,2,3,5,9,11,13},{1,2,3,5,9,11,13,14},{1,2,3,5,9,11,13,14,15},{1,2,3,5,9,11,13,15},{1,2,3,5,9,11,14},{1,2,3,5,9,11,14,15},{1,2,3,5,9,11,15},{1,2,3,5,9,12},{1,2,3,5,9,12,13},{1,2,3,5,9,12,13,14},{1,2,3,5,9,12,13,14,15},{1,2,3,5,9,12,13,15},{1,2,3,5,9,12,14},{1,2,3,5,9,12,14,15},{1,2,3,5,9,12,15},{1,2,3,5,9,13},{1,2,3,5,9,13,14},{1,2,3,5,9,13,14,15},{1,2,3,5,9,13,15},{1,2,3,5,9,14},{1,2,3,5,9,14,15},{1,2,3,5,9,15},{1,2,3,5,10},{1,2,3,5,10,11},{1,2,3,5,10,11,12},{1,2,3,5,10,11,12,13},{1,2,3,5,10,11,12,13,14},{1,2,3,5,10,11,12,13,14,15},{1,2,3,5,10,11,12,13,15},{1,2,3,5,10,11,12,14},{1,2,3,5,10,11,12,14,15},{1,2,3,5,10,11,12,15},{1,2,3,5,10,11,13},{1,2,3,5,10,11,13,14},{1,2,3,5,10,11,13,14,15},{1,2,3,5,10,11,13,15},{1,2,3,5,10,11,14},{1,2,3,5,10,11,14,15},{1,2,3,5,10,11,15},{1,2,3,5,10,12},{1,2,3,5,10,12,13},{1,2,3,5,10,12,13,14},{1,2,3,5,10,12,13,14,15},{1,2,3,5,10,12,13,15},{1,2,3,5,10,12,14},{1,2,3,5,10,12,14,15},{1,2,3,5,10,12,15},{1,2,3,5,10,13},{1,2,3,5,10,13,14},{1,2,3,5,10,13,14,15},{1,2,3,5,10,13,15},{1,2,3,5,10,14},{1,2,3,5,10,14,15},{1,2,3,5,10,15},{1,2,3,5,11},{1,2,3,5,11,12},{1,2,3,5,11,12,13},{1,2,3,5,11,12,13,14},{1,2,3,5,11,12,13,14,15},{1,2,3,5,11,12,13,15},{1,2,3,5,11,12,14},{1,2,3,5,11,12,14,15},{1,2,3,5,11,12,15},{1,2,3,5,11,13},{1,2,3,5,11,13,14},{1,2,3,5,11,13,14,15},{1,2,3,5,11,13,15},{1,2,3,5,11,14},{1,2,3,5,11,14,15},{1,2,3,5,11,15},{1,2,3,5,12},{1,2,3,5,12,13},{1,2,3,5,12,13,14},{1,2,3,5,12,13,14,15},{1,2,3,5,12,13,15},{1,2,3,5,12,14},{1,2,3,5,12,14,15},{1,2,3,5,12,15},{1,2,3,5,13},{1,2,3,5,13,14},{1,2,3,5,13,14,15},{1,2,3,5,13,15},{1,2,3,5,14},{1,2,3,5,14,15},{1,2,3,5,15},{1,2,3,6},{1,2,3,6,7},{1,2,3,6,7,8},{1,2,3,6,7,8,9},{1,2,3,6,7,8,9,10},{1,2,3,6,7,8,9,10,11},{1,2,3,6,7,8,9,10,11,12},{1,2,3,6,7,8,9,10,11,12,13},{1,2,3,6,7,8,9,10,11,12,13,14},{1,2,3,6,7,8,9,10,11,12,13,14,15},{1,2,3,6,7,8,9,10,11,12,13,15},{1,2,3,6,7,8,9,10,11,12,14},{1,2,3,6,7,8,9,10,11,12,14,15},{1,2,3,6,7,8,9,10,11,12,15},{1,2,3,6,7,8,9,10,11,13},{1,2,3,6,7,8,9,10,11,13,14},{1,2,3,6,7,8,9,10,11,13,14,15},{1,2,3,6,7,8,9,10,11,13,15},{1,2,3,6,7,8,9,10,11,14},{1,2,3,6,7,8,9,10,11,14,15},{1,2,3,6,7,8,9,10,11,15},{1,2,3,6,7,8,9,10,12},{1,2,3,6,7,8,9,10,12,13},{1,2,3,6,7,8,9,10,12,13,14},{1,2,3,6,7,8,9,10,12,13,14,15},{1,2,3,6,7,8,9,10,12,13,15},{1,2,3,6,7,8,9,10,12,14},{1,2,3,6,7,8,9,10,12,14,15},{1,2,3,6,7,8,9,10,12,15},{1,2,3,6,7,8,9,10,13},{1,2,3,6,7,8,9,10,13,14},{1,2,3,6,7,8,9,10,13,14,15},{1,2,3,6,7,8,9,10,13,15},{1,2,3,6,7,8,9,10,14},{1,2,3,6,7,8,9,10,14,15},{1,2,3,6,7,8,9,10,15},{1,2,3,6,7,8,9,11},{1,2,3,6,7,8,9,11,12},{1,2,3,6,7,8,9,11,12,13},{1,2,3,6,7,8,9,11,12,13,14},{1,2,3,6,7,8,9,11,12,13,14,15},{1,2,3,6,7,8,9,11,12,13,15},{1,2,3,6,7,8,9,11,12,14},{1,2,3,6,7,8,9,11,12,14,15},{1,2,3,6,7,8,9,11,12,15},{1,2,3,6,7,8,9,11,13},{1,2,3,6,7,8,9,11,13,14},{1,2,3,6,7,8,9,11,13,14,15},{1,2,3,6,7,8,9,11,13,15},{1,2,3,6,7,8,9,11,14},{1,2,3,6,7,8,9,11,14,15},{1,2,3,6,7,8,9,11,15},{1,2,3,6,7,8,9,12},{1,2,3,6,7,8,9,12,13},{1,2,3,6,7,8,9,12,13,14},{1,2,3,6,7,8,9,12,13,14,15},{1,2,3,6,7,8,9,12,13,15},{1,2,3,6,7,8,9,12,14},{1,2,3,6,7,8,9,12,14,15},{1,2,3,6,7,8,9,12,15},{1,2,3,6,7,8,9,13},{1,2,3,6,7,8,9,13,14},{1,2,3,6,7,8,9,13,14,15},{1,2,3,6,7,8,9,13,15},{1,2,3,6,7,8,9,14},{1,2,3,6,7,8,9,14,15},{1,2,3,6,7,8,9,15},{1,2,3,6,7,8,10},{1,2,3,6,7,8,10,11},{1,2,3,6,7,8,10,11,12},{1,2,3,6,7,8,10,11,12,13},{1,2,3,6,7,8,10,11,12,13,14},{1,2,3,6,7,8,10,11,12,13,14,15},{1,2,3,6,7,8,10,11,12,13,15},{1,2,3,6,7,8,10,11,12,14},{1,2,3,6,7,8,10,11,12,14,15},{1,2,3,6,7,8,10,11,12,15},{1,2,3,6,7,8,10,11,13},{1,2,3,6,7,8,10,11,13,14},{1,2,3,6,7,8,10,11,13,14,15},{1,2,3,6,7,8,10,11,13,15},{1,2,3,6,7,8,10,11,14},{1,2,3,6,7,8,10,11,14,15},{1,2,3,6,7,8,10,11,15},{1,2,3,6,7,8,10,12},{1,2,3,6,7,8,10,12,13},{1,2,3,6,7,8,10,12,13,14},{1,2,3,6,7,8,10,12,13,14,15},{1,2,3,6,7,8,10,12,13,15},{1,2,3,6,7,8,10,12,14},{1,2,3,6,7,8,10,12,14,15},{1,2,3,6,7,8,10,12,15},{1,2,3,6,7,8,10,13},{1,2,3,6,7,8,10,13,14},{1,2,3,6,7,8,10,13,14,15},{1,2,3,6,7,8,10,13,15},{1,2,3,6,7,8,10,14},{1,2,3,6,7,8,10,14,15},{1,2,3,6,7,8,10,15},{1,2,3,6,7,8,11},{1,2,3,6,7,8,11,12},{1,2,3,6,7,8,11,12,13},{1,2,3,6,7,8,11,12,13,14},{1,2,3,6,7,8,11,12,13,14,15},{1,2,3,6,7,8,11,12,13,15},{1,2,3,6,7,8,11,12,14},{1,2,3,6,7,8,11,12,14,15},{1,2,3,6,7,8,11,12,15},{1,2,3,6,7,8,11,13},{1,2,3,6,7,8,11,13,14},{1,2,3,6,7,8,11,13,14,15},{1,2,3,6,7,8,11,13,15},{1,2,3,6,7,8,11,14},{1,2,3,6,7,8,11,14,15},{1,2,3,6,7,8,11,15},{1,2,3,6,7,8,12},{1,2,3,6,7,8,12,13},{1,2,3,6,7,8,12,13,14},{1,2,3,6,7,8,12,13,14,15},{1,2,3,6,7,8,12,13,15},{1,2,3,6,7,8,12,14},{1,2,3,6,7,8,12,14,15},{1,2,3,6,7,8,12,15},{1,2,3,6,7,8,13},{1,2,3,6,7,8,13,14},{1,2,3,6,7,8,13,14,15},{1,2,3,6,7,8,13,15},{1,2,3,6,7,8,14},{1,2,3,6,7,8,14,15},{1,2,3,6,7,8,15},{1,2,3,6,7,9},{1,2,3,6,7,9,10},{1,2,3,6,7,9,10,11},{1,2,3,6,7,9,10,11,12},{1,2,3,6,7,9,10,11,12,13},{1,2,3,6,7,9,10,11,12,13,14},{1,2,3,6,7,9,10,11,12,13,14,15},{1,2,3,6,7,9,10,11,12,13,15},{1,2,3,6,7,9,10,11,12,14},{1,2,3,6,7,9,10,11,12,14,15},{1,2,3,6,7,9,10,11,12,15},{1,2,3,6,7,9,10,11,13},{1,2,3,6,7,9,10,11,13,14},{1,2,3,6,7,9,10,11,13,14,15},{1,2,3,6,7,9,10,11,13,15},{1,2,3,6,7,9,10,11,14},{1,2,3,6,7,9,10,11,14,15},{1,2,3,6,7,9,10,11,15},{1,2,3,6,7,9,10,12},{1,2,3,6,7,9,10,12,13},{1,2,3,6,7,9,10,12,13,14},{1,2,3,6,7,9,10,12,13,14,15},{1,2,3,6,7,9,10,12,13,15},{1,2,3,6,7,9,10,12,14},{1,2,3,6,7,9,10,12,14,15},{1,2,3,6,7,9,10,12,15},{1,2,3,6,7,9,10,13},{1,2,3,6,7,9,10,13,14},{1,2,3,6,7,9,10,13,14,15},{1,2,3,6,7,9,10,13,15},{1,2,3,6,7,9,10,14},{1,2,3,6,7,9,10,14,15},{1,2,3,6,7,9,10,15},{1,2,3,6,7,9,11},{1,2,3,6,7,9,11,12},{1,2,3,6,7,9,11,12,13},{1,2,3,6,7,9,11,12,13,14},{1,2,3,6,7,9,11,12,13,14,15},{1,2,3,6,7,9,11,12,13,15},{1,2,3,6,7,9,11,12,14},{1,2,3,6,7,9,11,12,14,15},{1,2,3,6,7,9,11,12,15},{1,2,3,6,7,9,11,13},{1,2,3,6,7,9,11,13,14},{1,2,3,6,7,9,11,13,14,15},{1,2,3,6,7,9,11,13,15},{1,2,3,6,7,9,11,14},{1,2,3,6,7,9,11,14,15},{1,2,3,6,7,9,11,15},{1,2,3,6,7,9,12},{1,2,3,6,7,9,12,13},{1,2,3,6,7,9,12,13,14},{1,2,3,6,7,9,12,13,14,15},{1,2,3,6,7,9,12,13,15},{1,2,3,6,7,9,12,14},{1,2,3,6,7,9,12,14,15},{1,2,3,6,7,9,12,15},{1,2,3,6,7,9,13},{1,2,3,6,7,9,13,14},{1,2,3,6,7,9,13,14,15},{1,2,3,6,7,9,13,15},{1,2,3,6,7,9,14},{1,2,3,6,7,9,14,15},{1,2,3,6,7,9,15},{1,2,3,6,7,10},{1,2,3,6,7,10,11},{1,2,3,6,7,10,11,12},{1,2,3,6,7,10,11,12,13},{1,2,3,6,7,10,11,12,13,14},{1,2,3,6,7,10,11,12,13,14,15},{1,2,3,6,7,10,11,12,13,15},{1,2,3,6,7,10,11,12,14},{1,2,3,6,7,10,11,12,14,15},{1,2,3,6,7,10,11,12,15},{1,2,3,6,7,10,11,13},{1,2,3,6,7,10,11,13,14},{1,2,3,6,7,10,11,13,14,15},{1,2,3,6,7,10,11,13,15},{1,2,3,6,7,10,11,14},{1,2,3,6,7,10,11,14,15},{1,2,3,6,7,10,11,15},{1,2,3,6,7,10,12},{1,2,3,6,7,10,12,13},{1,2,3,6,7,10,12,13,14},{1,2,3,6,7,10,12,13,14,15},{1,2,3,6,7,10,12,13,15},{1,2,3,6,7,10,12,14},{1,2,3,6,7,10,12,14,15},{1,2,3,6,7,10,12,15},{1,2,3,6,7,10,13},{1,2,3,6,7,10,13,14},{1,2,3,6,7,10,13,14,15},{1,2,3,6,7,10,13,15},{1,2,3,6,7,10,14},{1,2,3,6,7,10,14,15},{1,2,3,6,7,10,15},{1,2,3,6,7,11},{1,2,3,6,7,11,12},{1,2,3,6,7,11,12,13},{1,2,3,6,7,11,12,13,14},{1,2,3,6,7,11,12,13,14,15},{1,2,3,6,7,11,12,13,15},{1,2,3,6,7,11,12,14},{1,2,3,6,7,11,12,14,15},{1,2,3,6,7,11,12,15},{1,2,3,6,7,11,13},{1,2,3,6,7,11,13,14},{1,2,3,6,7,11,13,14,15},{1,2,3,6,7,11,13,15},{1,2,3,6,7,11,14},{1,2,3,6,7,11,14,15},{1,2,3,6,7,11,15},{1,2,3,6,7,12},{1,2,3,6,7,12,13},{1,2,3,6,7,12,13,14},{1,2,3,6,7,12,13,14,15},{1,2,3,6,7,12,13,15},{1,2,3,6,7,12,14},{1,2,3,6,7,12,14,15},{1,2,3,6,7,12,15},{1,2,3,6,7,13},{1,2,3,6,7,13,14},{1,2,3,6,7,13,14,15},{1,2,3,6,7,13,15},{1,2,3,6,7,14},{1,2,3,6,7,14,15},{1,2,3,6,7,15},{1,2,3,6,8},{1,2,3,6,8,9},{1,2,3,6,8,9,10},{1,2,3,6,8,9,10,11},{1,2,3,6,8,9,10,11,12},{1,2,3,6,8,9,10,11,12,13},{1,2,3,6,8,9,10,11,12,13,14},{1,2,3,6,8,9,10,11,12,13,14,15},{1,2,3,6,8,9,10,11,12,13,15},{1,2,3,6,8,9,10,11,12,14},{1,2,3,6,8,9,10,11,12,14,15},{1,2,3,6,8,9,10,11,12,15},{1,2,3,6,8,9,10,11,13},{1,2,3,6,8,9,10,11,13,14},{1,2,3,6,8,9,10,11,13,14,15},{1,2,3,6,8,9,10,11,13,15},{1,2,3,6,8,9,10,11,14},{1,2,3,6,8,9,10,11,14,15},{1,2,3,6,8,9,10,11,15},{1,2,3,6,8,9,10,12},{1,2,3,6,8,9,10,12,13},{1,2,3,6,8,9,10,12,13,14},{1,2,3,6,8,9,10,12,13,14,15},{1,2,3,6,8,9,10,12,13,15},{1,2,3,6,8,9,10,12,14},{1,2,3,6,8,9,10,12,14,15},{1,2,3,6,8,9,10,12,15},{1,2,3,6,8,9,10,13},{1,2,3,6,8,9,10,13,14},{1,2,3,6,8,9,10,13,14,15},{1,2,3,6,8,9,10,13,15},{1,2,3,6,8,9,10,14},{1,2,3,6,8,9,10,14,15},{1,2,3,6,8,9,10,15},{1,2,3,6,8,9,11},{1,2,3,6,8,9,11,12},{1,2,3,6,8,9,11,12,13},{1,2,3,6,8,9,11,12,13,14},{1,2,3,6,8,9,11,12,13,14,15},{1,2,3,6,8,9,11,12,13,15},{1,2,3,6,8,9,11,12,14},{1,2,3,6,8,9,11,12,14,15},{1,2,3,6,8,9,11,12,15},{1,2,3,6,8,9,11,13},{1,2,3,6,8,9,11,13,14},{1,2,3,6,8,9,11,13,14,15},{1,2,3,6,8,9,11,13,15},{1,2,3,6,8,9,11,14},{1,2,3,6,8,9,11,14,15},{1,2,3,6,8,9,11,15},{1,2,3,6,8,9,12},{1,2,3,6,8,9,12,13},{1,2,3,6,8,9,12,13,14},{1,2,3,6,8,9,12,13,14,15},{1,2,3,6,8,9,12,13,15},{1,2,3,6,8,9,12,14},{1,2,3,6,8,9,12,14,15},{1,2,3,6,8,9,12,15},{1,2,3,6,8,9,13},{1,2,3,6,8,9,13,14},{1,2,3,6,8,9,13,14,15},{1,2,3,6,8,9,13,15},{1,2,3,6,8,9,14},{1,2,3,6,8,9,14,15},{1,2,3,6,8,9,15},{1,2,3,6,8,10},{1,2,3,6,8,10,11},{1,2,3,6,8,10,11,12},{1,2,3,6,8,10,11,12,13},{1,2,3,6,8,10,11,12,13,14},{1,2,3,6,8,10,11,12,13,14,15},{1,2,3,6,8,10,11,12,13,15},{1,2,3,6,8,10,11,12,14},{1,2,3,6,8,10,11,12,14,15},{1,2,3,6,8,10,11,12,15},{1,2,3,6,8,10,11,13},{1,2,3,6,8,10,11,13,14},{1,2,3,6,8,10,11,13,14,15},{1,2,3,6,8,10,11,13,15},{1,2,3,6,8,10,11,14},{1,2,3,6,8,10,11,14,15},{1,2,3,6,8,10,11,15},{1,2,3,6,8,10,12},{1,2,3,6,8,10,12,13},{1,2,3,6,8,10,12,13,14},{1,2,3,6,8,10,12,13,14,15},{1,2,3,6,8,10,12,13,15},{1,2,3,6,8,10,12,14},{1,2,3,6,8,10,12,14,15},{1,2,3,6,8,10,12,15},{1,2,3,6,8,10,13},{1,2,3,6,8,10,13,14},{1,2,3,6,8,10,13,14,15},{1,2,3,6,8,10,13,15},{1,2,3,6,8,10,14},{1,2,3,6,8,10,14,15},{1,2,3,6,8,10,15},{1,2,3,6,8,11},{1,2,3,6,8,11,12},{1,2,3,6,8,11,12,13},{1,2,3,6,8,11,12,13,14},{1,2,3,6,8,11,12,13,14,15},{1,2,3,6,8,11,12,13,15},{1,2,3,6,8,11,12,14},{1,2,3,6,8,11,12,14,15},{1,2,3,6,8,11,12,15},{1,2,3,6,8,11,13},{1,2,3,6,8,11,13,14},{1,2,3,6,8,11,13,14,15},{1,2,3,6,8,11,13,15},{1,2,3,6,8,11,14},{1,2,3,6,8,11,14,15},{1,2,3,6,8,11,15},{1,2,3,6,8,12},{1,2,3,6,8,12,13},{1,2,3,6,8,12,13,14},{1,2,3,6,8,12,13,14,15},{1,2,3,6,8,12,13,15},{1,2,3,6,8,12,14},{1,2,3,6,8,12,14,15},{1,2,3,6,8,12,15},{1,2,3,6,8,13},{1,2,3,6,8,13,14},{1,2,3,6,8,13,14,15},{1,2,3,6,8,13,15},{1,2,3,6,8,14},{1,2,3,6,8,14,15},{1,2,3,6,8,15},{1,2,3,6,9},{1,2,3,6,9,10},{1,2,3,6,9,10,11},{1,2,3,6,9,10,11,12},{1,2,3,6,9,10,11,12,13},{1,2,3,6,9,10,11,12,13,14},{1,2,3,6,9,10,11,12,13,14,15},{1,2,3,6,9,10,11,12,13,15},{1,2,3,6,9,10,11,12,14},{1,2,3,6,9,10,11,12,14,15},{1,2,3,6,9,10,11,12,15},{1,2,3,6,9,10,11,13},{1,2,3,6,9,10,11,13,14},{1,2,3,6,9,10,11,13,14,15},{1,2,3,6,9,10,11,13,15},{1,2,3,6,9,10,11,14},{1,2,3,6,9,10,11,14,15},{1,2,3,6,9,10,11,15},{1,2,3,6,9,10,12},{1,2,3,6,9,10,12,13},{1,2,3,6,9,10,12,13,14},{1,2,3,6,9,10,12,13,14,15},{1,2,3,6,9,10,12,13,15},{1,2,3,6,9,10,12,14},{1,2,3,6,9,10,12,14,15},{1,2,3,6,9,10,12,15},{1,2,3,6,9,10,13},{1,2,3,6,9,10,13,14},{1,2,3,6,9,10,13,14,15},{1,2,3,6,9,10,13,15},{1,2,3,6,9,10,14},{1,2,3,6,9,10,14,15},{1,2,3,6,9,10,15},{1,2,3,6,9,11},{1,2,3,6,9,11,12},{1,2,3,6,9,11,12,13},{1,2,3,6,9,11,12,13,14},{1,2,3,6,9,11,12,13,14,15},{1,2,3,6,9,11,12,13,15},{1,2,3,6,9,11,12,14},{1,2,3,6,9,11,12,14,15},{1,2,3,6,9,11,12,15},{1,2,3,6,9,11,13},{1,2,3,6,9,11,13,14},{1,2,3,6,9,11,13,14,15},{1,2,3,6,9,11,13,15},{1,2,3,6,9,11,14},{1,2,3,6,9,11,14,15},{1,2,3,6,9,11,15},{1,2,3,6,9,12},{1,2,3,6,9,12,13},{1,2,3,6,9,12,13,14},{1,2,3,6,9,12,13,14,15},{1,2,3,6,9,12,13,15},{1,2,3,6,9,12,14},{1,2,3,6,9,12,14,15},{1,2,3,6,9,12,15},{1,2,3,6,9,13},{1,2,3,6,9,13,14},{1,2,3,6,9,13,14,15},{1,2,3,6,9,13,15},{1,2,3,6,9,14},{1,2,3,6,9,14,15},{1,2,3,6,9,15},{1,2,3,6,10},{1,2,3,6,10,11},{1,2,3,6,10,11,12},{1,2,3,6,10,11,12,13},{1,2,3,6,10,11,12,13,14},{1,2,3,6,10,11,12,13,14,15},{1,2,3,6,10,11,12,13,15},{1,2,3,6,10,11,12,14},{1,2,3,6,10,11,12,14,15},{1,2,3,6,10,11,12,15},{1,2,3,6,10,11,13},{1,2,3,6,10,11,13,14},{1,2,3,6,10,11,13,14,15},{1,2,3,6,10,11,13,15},{1,2,3,6,10,11,14},{1,2,3,6,10,11,14,15},{1,2,3,6,10,11,15},{1,2,3,6,10,12},{1,2,3,6,10,12,13},{1,2,3,6,10,12,13,14},{1,2,3,6,10,12,13,14,15},{1,2,3,6,10,12,13,15},{1,2,3,6,10,12,14},{1,2,3,6,10,12,14,15},{1,2,3,6,10,12,15},{1,2,3,6,10,13},{1,2,3,6,10,13,14},{1,2,3,6,10,13,14,15},{1,2,3,6,10,13,15},{1,2,3,6,10,14},{1,2,3,6,10,14,15},{1,2,3,6,10,15},{1,2,3,6,11},{1,2,3,6,11,12},{1,2,3,6,11,12,13},{1,2,3,6,11,12,13,14},{1,2,3,6,11,12,13,14,15},{1,2,3,6,11,12,13,15},{1,2,3,6,11,12,14},{1,2,3,6,11,12,14,15},{1,2,3,6,11,12,15},{1,2,3,6,11,13},{1,2,3,6,11,13,14},{1,2,3,6,11,13,14,15},{1,2,3,6,11,13,15},{1,2,3,6,11,14},{1,2,3,6,11,14,15},{1,2,3,6,11,15},{1,2,3,6,12},{1,2,3,6,12,13},{1,2,3,6,12,13,14},{1,2,3,6,12,13,14,15},{1,2,3,6,12,13,15},{1,2,3,6,12,14},{1,2,3,6,12,14,15},{1,2,3,6,12,15},{1,2,3,6,13},{1,2,3,6,13,14},{1,2,3,6,13,14,15},{1,2,3,6,13,15},{1,2,3,6,14},{1,2,3,6,14,15},{1,2,3,6,15},{1,2,3,7},{1,2,3,7,8},{1,2,3,7,8,9},{1,2,3,7,8,9,10},{1,2,3,7,8,9,10,11},{1,2,3,7,8,9,10,11,12},{1,2,3,7,8,9,10,11,12,13},{1,2,3,7,8,9,10,11,12,13,14},{1,2,3,7,8,9,10,11,12,13,14,15},{1,2,3,7,8,9,10,11,12,13,15},{1,2,3,7,8,9,10,11,12,14},{1,2,3,7,8,9,10,11,12,14,15},{1,2,3,7,8,9,10,11,12,15},{1,2,3,7,8,9,10,11,13},{1,2,3,7,8,9,10,11,13,14},{1,2,3,7,8,9,10,11,13,14,15},{1,2,3,7,8,9,10,11,13,15},{1,2,3,7,8,9,10,11,14},{1,2,3,7,8,9,10,11,14,15},{1,2,3,7,8,9,10,11,15},{1,2,3,7,8,9,10,12},{1,2,3,7,8,9,10,12,13},{1,2,3,7,8,9,10,12,13,14},{1,2,3,7,8,9,10,12,13,14,15},{1,2,3,7,8,9,10,12,13,15},{1,2,3,7,8,9,10,12,14},{1,2,3,7,8,9,10,12,14,15},{1,2,3,7,8,9,10,12,15},{1,2,3,7,8,9,10,13},{1,2,3,7,8,9,10,13,14},{1,2,3,7,8,9,10,13,14,15},{1,2,3,7,8,9,10,13,15},{1,2,3,7,8,9,10,14},{1,2,3,7,8,9,10,14,15},{1,2,3,7,8,9,10,15},{1,2,3,7,8,9,11},{1,2,3,7,8,9,11,12},{1,2,3,7,8,9,11,12,13},{1,2,3,7,8,9,11,12,13,14},{1,2,3,7,8,9,11,12,13,14,15},{1,2,3,7,8,9,11,12,13,15},{1,2,3,7,8,9,11,12,14},{1,2,3,7,8,9,11,12,14,15},{1,2,3,7,8,9,11,12,15},{1,2,3,7,8,9,11,13},{1,2,3,7,8,9,11,13,14},{1,2,3,7,8,9,11,13,14,15},{1,2,3,7,8,9,11,13,15},{1,2,3,7,8,9,11,14},{1,2,3,7,8,9,11,14,15},{1,2,3,7,8,9,11,15},{1,2,3,7,8,9,12},{1,2,3,7,8,9,12,13},{1,2,3,7,8,9,12,13,14},{1,2,3,7,8,9,12,13,14,15},{1,2,3,7,8,9,12,13,15},{1,2,3,7,8,9,12,14},{1,2,3,7,8,9,12,14,15},{1,2,3,7,8,9,12,15},{1,2,3,7,8,9,13},{1,2,3,7,8,9,13,14},{1,2,3,7,8,9,13,14,15},{1,2,3,7,8,9,13,15},{1,2,3,7,8,9,14},{1,2,3,7,8,9,14,15},{1,2,3,7,8,9,15},{1,2,3,7,8,10},{1,2,3,7,8,10,11},{1,2,3,7,8,10,11,12},{1,2,3,7,8,10,11,12,13},{1,2,3,7,8,10,11,12,13,14},{1,2,3,7,8,10,11,12,13,14,15},{1,2,3,7,8,10,11,12,13,15},{1,2,3,7,8,10,11,12,14},{1,2,3,7,8,10,11,12,14,15},{1,2,3,7,8,10,11,12,15},{1,2,3,7,8,10,11,13},{1,2,3,7,8,10,11,13,14},{1,2,3,7,8,10,11,13,14,15},{1,2,3,7,8,10,11,13,15},{1,2,3,7,8,10,11,14},{1,2,3,7,8,10,11,14,15},{1,2,3,7,8,10,11,15},{1,2,3,7,8,10,12},{1,2,3,7,8,10,12,13},{1,2,3,7,8,10,12,13,14},{1,2,3,7,8,10,12,13,14,15},{1,2,3,7,8,10,12,13,15},{1,2,3,7,8,10,12,14},{1,2,3,7,8,10,12,14,15},{1,2,3,7,8,10,12,15},{1,2,3,7,8,10,13},{1,2,3,7,8,10,13,14},{1,2,3,7,8,10,13,14,15},{1,2,3,7,8,10,13,15},{1,2,3,7,8,10,14},{1,2,3,7,8,10,14,15},{1,2,3,7,8,10,15},{1,2,3,7,8,11},{1,2,3,7,8,11,12},{1,2,3,7,8,11,12,13},{1,2,3,7,8,11,12,13,14},{1,2,3,7,8,11,12,13,14,15},{1,2,3,7,8,11,12,13,15},{1,2,3,7,8,11,12,14},{1,2,3,7,8,11,12,14,15},{1,2,3,7,8,11,12,15},{1,2,3,7,8,11,13},{1,2,3,7,8,11,13,14},{1,2,3,7,8,11,13,14,15},{1,2,3,7,8,11,13,15},{1,2,3,7,8,11,14},{1,2,3,7,8,11,14,15},{1,2,3,7,8,11,15},{1,2,3,7,8,12},{1,2,3,7,8,12,13},{1,2,3,7,8,12,13,14},{1,2,3,7,8,12,13,14,15},{1,2,3,7,8,12,13,15},{1,2,3,7,8,12,14},{1,2,3,7,8,12,14,15},{1,2,3,7,8,12,15},{1,2,3,7,8,13},{1,2,3,7,8,13,14},{1,2,3,7,8,13,14,15},{1,2,3,7,8,13,15},{1,2,3,7,8,14},{1,2,3,7,8,14,15},{1,2,3,7,8,15},{1,2,3,7,9},{1,2,3,7,9,10},{1,2,3,7,9,10,11},{1,2,3,7,9,10,11,12},{1,2,3,7,9,10,11,12,13},{1,2,3,7,9,10,11,12,13,14},{1,2,3,7,9,10,11,12,13,14,15},{1,2,3,7,9,10,11,12,13,15},{1,2,3,7,9,10,11,12,14},{1,2,3,7,9,10,11,12,14,15},{1,2,3,7,9,10,11,12,15},{1,2,3,7,9,10,11,13},{1,2,3,7,9,10,11,13,14},{1,2,3,7,9,10,11,13,14,15},{1,2,3,7,9,10,11,13,15},{1,2,3,7,9,10,11,14},{1,2,3,7,9,10,11,14,15},{1,2,3,7,9,10,11,15},{1,2,3,7,9,10,12},{1,2,3,7,9,10,12,13},{1,2,3,7,9,10,12,13,14},{1,2,3,7,9,10,12,13,14,15},{1,2,3,7,9,10,12,13,15},{1,2,3,7,9,10,12,14},{1,2,3,7,9,10,12,14,15},{1,2,3,7,9,10,12,15},{1,2,3,7,9,10,13},{1,2,3,7,9,10,13,14},{1,2,3,7,9,10,13,14,15},{1,2,3,7,9,10,13,15},{1,2,3,7,9,10,14},{1,2,3,7,9,10,14,15},{1,2,3,7,9,10,15},{1,2,3,7,9,11},{1,2,3,7,9,11,12},{1,2,3,7,9,11,12,13},{1,2,3,7,9,11,12,13,14},{1,2,3,7,9,11,12,13,14,15},{1,2,3,7,9,11,12,13,15},{1,2,3,7,9,11,12,14},{1,2,3,7,9,11,12,14,15},{1,2,3,7,9,11,12,15},{1,2,3,7,9,11,13},{1,2,3,7,9,11,13,14},{1,2,3,7,9,11,13,14,15},{1,2,3,7,9,11,13,15},{1,2,3,7,9,11,14},{1,2,3,7,9,11,14,15},{1,2,3,7,9,11,15},{1,2,3,7,9,12},{1,2,3,7,9,12,13},{1,2,3,7,9,12,13,14},{1,2,3,7,9,12,13,14,15},{1,2,3,7,9,12,13,15},{1,2,3,7,9,12,14},{1,2,3,7,9,12,14,15},{1,2,3,7,9,12,15},{1,2,3,7,9,13},{1,2,3,7,9,13,14},{1,2,3,7,9,13,14,15},{1,2,3,7,9,13,15},{1,2,3,7,9,14},{1,2,3,7,9,14,15},{1,2,3,7,9,15},{1,2,3,7,10},{1,2,3,7,10,11},{1,2,3,7,10,11,12},{1,2,3,7,10,11,12,13},{1,2,3,7,10,11,12,13,14},{1,2,3,7,10,11,12,13,14,15},{1,2,3,7,10,11,12,13,15},{1,2,3,7,10,11,12,14},{1,2,3,7,10,11,12,14,15},{1,2,3,7,10,11,12,15},{1,2,3,7,10,11,13},{1,2,3,7,10,11,13,14},{1,2,3,7,10,11,13,14,15},{1,2,3,7,10,11,13,15},{1,2,3,7,10,11,14},{1,2,3,7,10,11,14,15},{1,2,3,7,10,11,15},{1,2,3,7,10,12},{1,2,3,7,10,12,13},{1,2,3,7,10,12,13,14},{1,2,3,7,10,12,13,14,15},{1,2,3,7,10,12,13,15},{1,2,3,7,10,12,14},{1,2,3,7,10,12,14,15},{1,2,3,7,10,12,15},{1,2,3,7,10,13},{1,2,3,7,10,13,14},{1,2,3,7,10,13,14,15},{1,2,3,7,10,13,15},{1,2,3,7,10,14},{1,2,3,7,10,14,15},{1,2,3,7,10,15},{1,2,3,7,11},{1,2,3,7,11,12},{1,2,3,7,11,12,13},{1,2,3,7,11,12,13,14},{1,2,3,7,11,12,13,14,15},{1,2,3,7,11,12,13,15},{1,2,3,7,11,12,14},{1,2,3,7,11,12,14,15},{1,2,3,7,11,12,15},{1,2,3,7,11,13},{1,2,3,7,11,13,14},{1,2,3,7,11,13,14,15},{1,2,3,7,11,13,15},{1,2,3,7,11,14},{1,2,3,7,11,14,15},{1,2,3,7,11,15},{1,2,3,7,12},{1,2,3,7,12,13},{1,2,3,7,12,13,14},{1,2,3,7,12,13,14,15},{1,2,3,7,12,13,15},{1,2,3,7,12,14},{1,2,3,7,12,14,15},{1,2,3,7,12,15},{1,2,3,7,13},{1,2,3,7,13,14},{1,2,3,7,13,14,15},{1,2,3,7,13,15},{1,2,3,7,14},{1,2,3,7,14,15},{1,2,3,7,15},{1,2,3,8},{1,2,3,8,9},{1,2,3,8,9,10},{1,2,3,8,9,10,11},{1,2,3,8,9,10,11,12},{1,2,3,8,9,10,11,12,13},{1,2,3,8,9,10,11,12,13,14},{1,2,3,8,9,10,11,12,13,14,15},{1,2,3,8,9,10,11,12,13,15},{1,2,3,8,9,10,11,12,14},{1,2,3,8,9,10,11,12,14,15},{1,2,3,8,9,10,11,12,15},{1,2,3,8,9,10,11,13},{1,2,3,8,9,10,11,13,14},{1,2,3,8,9,10,11,13,14,15},{1,2,3,8,9,10,11,13,15},{1,2,3,8,9,10,11,14},{1,2,3,8,9,10,11,14,15},{1,2,3,8,9,10,11,15},{1,2,3,8,9,10,12},{1,2,3,8,9,10,12,13},{1,2,3,8,9,10,12,13,14},{1,2,3,8,9,10,12,13,14,15},{1,2,3,8,9,10,12,13,15},{1,2,3,8,9,10,12,14},{1,2,3,8,9,10,12,14,15},{1,2,3,8,9,10,12,15},{1,2,3,8,9,10,13},{1,2,3,8,9,10,13,14},{1,2,3,8,9,10,13,14,15},{1,2,3,8,9,10,13,15},{1,2,3,8,9,10,14},{1,2,3,8,9,10,14,15},{1,2,3,8,9,10,15},{1,2,3,8,9,11},{1,2,3,8,9,11,12},{1,2,3,8,9,11,12,13},{1,2,3,8,9,11,12,13,14},{1,2,3,8,9,11,12,13,14,15},{1,2,3,8,9,11,12,13,15},{1,2,3,8,9,11,12,14},{1,2,3,8,9,11,12,14,15},{1,2,3,8,9,11,12,15},{1,2,3,8,9,11,13},{1,2,3,8,9,11,13,14},{1,2,3,8,9,11,13,14,15},{1,2,3,8,9,11,13,15},{1,2,3,8,9,11,14},{1,2,3,8,9,11,14,15},{1,2,3,8,9,11,15},{1,2,3,8,9,12},{1,2,3,8,9,12,13},{1,2,3,8,9,12,13,14},{1,2,3,8,9,12,13,14,15},{1,2,3,8,9,12,13,15},{1,2,3,8,9,12,14},{1,2,3,8,9,12,14,15},{1,2,3,8,9,12,15},{1,2,3,8,9,13},{1,2,3,8,9,13,14},{1,2,3,8,9,13,14,15},{1,2,3,8,9,13,15},{1,2,3,8,9,14},{1,2,3,8,9,14,15},{1,2,3,8,9,15},{1,2,3,8,10},{1,2,3,8,10,11},{1,2,3,8,10,11,12},{1,2,3,8,10,11,12,13},{1,2,3,8,10,11,12,13,14},{1,2,3,8,10,11,12,13,14,15},{1,2,3,8,10,11,12,13,15},{1,2,3,8,10,11,12,14},{1,2,3,8,10,11,12,14,15},{1,2,3,8,10,11,12,15},{1,2,3,8,10,11,13},{1,2,3,8,10,11,13,14},{1,2,3,8,10,11,13,14,15},{1,2,3,8,10,11,13,15},{1,2,3,8,10,11,14},{1,2,3,8,10,11,14,15},{1,2,3,8,10,11,15},{1,2,3,8,10,12},{1,2,3,8,10,12,13},{1,2,3,8,10,12,13,14},{1,2,3,8,10,12,13,14,15},{1,2,3,8,10,12,13,15},{1,2,3,8,10,12,14},{1,2,3,8,10,12,14,15},{1,2,3,8,10,12,15},{1,2,3,8,10,13},{1,2,3,8,10,13,14},{1,2,3,8,10,13,14,15},{1,2,3,8,10,13,15},{1,2,3,8,10,14},{1,2,3,8,10,14,15},{1,2,3,8,10,15},{1,2,3,8,11},{1,2,3,8,11,12},{1,2,3,8,11,12,13},{1,2,3,8,11,12,13,14},{1,2,3,8,11,12,13,14,15},{1,2,3,8,11,12,13,15},{1,2,3,8,11,12,14},{1,2,3,8,11,12,14,15},{1,2,3,8,11,12,15},{1,2,3,8,11,13},{1,2,3,8,11,13,14},{1,2,3,8,11,13,14,15},{1,2,3,8,11,13,15},{1,2,3,8,11,14},{1,2,3,8,11,14,15},{1,2,3,8,11,15},{1,2,3,8,12},{1,2,3,8,12,13},{1,2,3,8,12,13,14},{1,2,3,8,12,13,14,15},{1,2,3,8,12,13,15},{1,2,3,8,12,14},{1,2,3,8,12,14,15},{1,2,3,8,12,15},{1,2,3,8,13},{1,2,3,8,13,14},{1,2,3,8,13,14,15},{1,2,3,8,13,15},{1,2,3,8,14},{1,2,3,8,14,15},{1,2,3,8,15},{1,2,3,9},{1,2,3,9,10},{1,2,3,9,10,11},{1,2,3,9,10,11,12},{1,2,3,9,10,11,12,13},{1,2,3,9,10,11,12,13,14},{1,2,3,9,10,11,12,13,14,15},{1,2,3,9,10,11,12,13,15},{1,2,3,9,10,11,12,14},{1,2,3,9,10,11,12,14,15},{1,2,3,9,10,11,12,15},{1,2,3,9,10,11,13},{1,2,3,9,10,11,13,14},{1,2,3,9,10,11,13,14,15},{1,2,3,9,10,11,13,15},{1,2,3,9,10,11,14},{1,2,3,9,10,11,14,15},{1,2,3,9,10,11,15},{1,2,3,9,10,12},{1,2,3,9,10,12,13},{1,2,3,9,10,12,13,14},{1,2,3,9,10,12,13,14,15},{1,2,3,9,10,12,13,15},{1,2,3,9,10,12,14},{1,2,3,9,10,12,14,15},{1,2,3,9,10,12,15},{1,2,3,9,10,13},{1,2,3,9,10,13,14},{1,2,3,9,10,13,14,15},{1,2,3,9,10,13,15},{1,2,3,9,10,14},{1,2,3,9,10,14,15},{1,2,3,9,10,15},{1,2,3,9,11},{1,2,3,9,11,12},{1,2,3,9,11,12,13},{1,2,3,9,11,12,13,14},{1,2,3,9,11,12,13,14,15},{1,2,3,9,11,12,13,15},{1,2,3,9,11,12,14},{1,2,3,9,11,12,14,15},{1,2,3,9,11,12,15},{1,2,3,9,11,13},{1,2,3,9,11,13,14},{1,2,3,9,11,13,14,15},{1,2,3,9,11,13,15},{1,2,3,9,11,14},{1,2,3,9,11,14,15},{1,2,3,9,11,15},{1,2,3,9,12},{1,2,3,9,12,13},{1,2,3,9,12,13,14},{1,2,3,9,12,13,14,15},{1,2,3,9,12,13,15},{1,2,3,9,12,14},{1,2,3,9,12,14,15},{1,2,3,9,12,15},{1,2,3,9,13},{1,2,3,9,13,14},{1,2,3,9,13,14,15},{1,2,3,9,13,15},{1,2,3,9,14},{1,2,3,9,14,15},{1,2,3,9,15},{1,2,3,10},{1,2,3,10,11},{1,2,3,10,11,12},{1,2,3,10,11,12,13},{1,2,3,10,11,12,13,14},{1,2,3,10,11,12,13,14,15},{1,2,3,10,11,12,13,15},{1,2,3,10,11,12,14},{1,2,3,10,11,12,14,15},{1,2,3,10,11,12,15},{1,2,3,10,11,13},{1,2,3,10,11,13,14},{1,2,3,10,11,13,14,15},{1,2,3,10,11,13,15},{1,2,3,10,11,14},{1,2,3,10,11,14,15},{1,2,3,10,11,15},{1,2,3,10,12},{1,2,3,10,12,13},{1,2,3,10,12,13,14},{1,2,3,10,12,13,14,15},{1,2,3,10,12,13,15},{1,2,3,10,12,14},{1,2,3,10,12,14,15},{1,2,3,10,12,15},{1,2,3,10,13},{1,2,3,10,13,14},{1,2,3,10,13,14,15},{1,2,3,10,13,15},{1,2,3,10,14},{1,2,3,10,14,15},{1,2,3,10,15},{1,2,3,11},{1,2,3,11,12},{1,2,3,11,12,13},{1,2,3,11,12,13,14},{1,2,3,11,12,13,14,15},{1,2,3,11,12,13,15},{1,2,3,11,12,14},{1,2,3,11,12,14,15},{1,2,3,11,12,15},{1,2,3,11,13},{1,2,3,11,13,14},{1,2,3,11,13,14,15},{1,2,3,11,13,15},{1,2,3,11,14},{1,2,3,11,14,15},{1,2,3,11,15},{1,2,3,12},{1,2,3,12,13},{1,2,3,12,13,14},{1,2,3,12,13,14,15},{1,2,3,12,13,15},{1,2,3,12,14},{1,2,3,12,14,15},{1,2,3,12,15},{1,2,3,13},{1,2,3,13,14},{1,2,3,13,14,15},{1,2,3,13,15},{1,2,3,14},{1,2,3,14,15},{1,2,3,15},{1,2,4},{1,2,4,5},{1,2,4,5,6},{1,2,4,5,6,7},{1,2,4,5,6,7,8},{1,2,4,5,6,7,8,9},{1,2,4,5,6,7,8,9,10},{1,2,4,5,6,7,8,9,10,11},{1,2,4,5,6,7,8,9,10,11,12},{1,2,4,5,6,7,8,9,10,11,12,13},{1,2,4,5,6,7,8,9,10,11,12,13,14},{1,2,4,5,6,7,8,9,10,11,12,13,14,15},{1,2,4,5,6,7,8,9,10,11,12,13,15},{1,2,4,5,6,7,8,9,10,11,12,14},{1,2,4,5,6,7,8,9,10,11,12,14,15},{1,2,4,5,6,7,8,9,10,11,12,15},{1,2,4,5,6,7,8,9,10,11,13},{1,2,4,5,6,7,8,9,10,11,13,14},{1,2,4,5,6,7,8,9,10,11,13,14,15},{1,2,4,5,6,7,8,9,10,11,13,15},{1,2,4,5,6,7,8,9,10,11,14},{1,2,4,5,6,7,8,9,10,11,14,15},{1,2,4,5,6,7,8,9,10,11,15},{1,2,4,5,6,7,8,9,10,12},{1,2,4,5,6,7,8,9,10,12,13},{1,2,4,5,6,7,8,9,10,12,13,14},{1,2,4,5,6,7,8,9,10,12,13,14,15},{1,2,4,5,6,7,8,9,10,12,13,15},{1,2,4,5,6,7,8,9,10,12,14},{1,2,4,5,6,7,8,9,10,12,14,15},{1,2,4,5,6,7,8,9,10,12,15},{1,2,4,5,6,7,8,9,10,13},{1,2,4,5,6,7,8,9,10,13,14},{1,2,4,5,6,7,8,9,10,13,14,15},{1,2,4,5,6,7,8,9,10,13,15},{1,2,4,5,6,7,8,9,10,14},{1,2,4,5,6,7,8,9,10,14,15},{1,2,4,5,6,7,8,9,10,15},{1,2,4,5,6,7,8,9,11},{1,2,4,5,6,7,8,9,11,12},{1,2,4,5,6,7,8,9,11,12,13},{1,2,4,5,6,7,8,9,11,12,13,14},{1,2,4,5,6,7,8,9,11,12,13,14,15},{1,2,4,5,6,7,8,9,11,12,13,15},{1,2,4,5,6,7,8,9,11,12,14},{1,2,4,5,6,7,8,9,11,12,14,15},{1,2,4,5,6,7,8,9,11,12,15},{1,2,4,5,6,7,8,9,11,13},{1,2,4,5,6,7,8,9,11,13,14},{1,2,4,5,6,7,8,9,11,13,14,15},{1,2,4,5,6,7,8,9,11,13,15},{1,2,4,5,6,7,8,9,11,14},{1,2,4,5,6,7,8,9,11,14,15},{1,2,4,5,6,7,8,9,11,15},{1,2,4,5,6,7,8,9,12},{1,2,4,5,6,7,8,9,12,13},{1,2,4,5,6,7,8,9,12,13,14},{1,2,4,5,6,7,8,9,12,13,14,15},{1,2,4,5,6,7,8,9,12,13,15},{1,2,4,5,6,7,8,9,12,14},{1,2,4,5,6,7,8,9,12,14,15},{1,2,4,5,6,7,8,9,12,15},{1,2,4,5,6,7,8,9,13},{1,2,4,5,6,7,8,9,13,14},{1,2,4,5,6,7,8,9,13,14,15},{1,2,4,5,6,7,8,9,13,15},{1,2,4,5,6,7,8,9,14},{1,2,4,5,6,7,8,9,14,15},{1,2,4,5,6,7,8,9,15},{1,2,4,5,6,7,8,10},{1,2,4,5,6,7,8,10,11},{1,2,4,5,6,7,8,10,11,12},{1,2,4,5,6,7,8,10,11,12,13},{1,2,4,5,6,7,8,10,11,12,13,14},{1,2,4,5,6,7,8,10,11,12,13,14,15},{1,2,4,5,6,7,8,10,11,12,13,15},{1,2,4,5,6,7,8,10,11,12,14},{1,2,4,5,6,7,8,10,11,12,14,15},{1,2,4,5,6,7,8,10,11,12,15},{1,2,4,5,6,7,8,10,11,13},{1,2,4,5,6,7,8,10,11,13,14},{1,2,4,5,6,7,8,10,11,13,14,15},{1,2,4,5,6,7,8,10,11,13,15},{1,2,4,5,6,7,8,10,11,14},{1,2,4,5,6,7,8,10,11,14,15},{1,2,4,5,6,7,8,10,11,15},{1,2,4,5,6,7,8,10,12},{1,2,4,5,6,7,8,10,12,13},{1,2,4,5,6,7,8,10,12,13,14},{1,2,4,5,6,7,8,10,12,13,14,15},{1,2,4,5,6,7,8,10,12,13,15},{1,2,4,5,6,7,8,10,12,14},{1,2,4,5,6,7,8,10,12,14,15},{1,2,4,5,6,7,8,10,12,15},{1,2,4,5,6,7,8,10,13},{1,2,4,5,6,7,8,10,13,14},{1,2,4,5,6,7,8,10,13,14,15},{1,2,4,5,6,7,8,10,13,15},{1,2,4,5,6,7,8,10,14},{1,2,4,5,6,7,8,10,14,15},{1,2,4,5,6,7,8,10,15},{1,2,4,5,6,7,8,11},{1,2,4,5,6,7,8,11,12},{1,2,4,5,6,7,8,11,12,13},{1,2,4,5,6,7,8,11,12,13,14},{1,2,4,5,6,7,8,11,12,13,14,15},{1,2,4,5,6,7,8,11,12,13,15},{1,2,4,5,6,7,8,11,12,14},{1,2,4,5,6,7,8,11,12,14,15},{1,2,4,5,6,7,8,11,12,15},{1,2,4,5,6,7,8,11,13},{1,2,4,5,6,7,8,11,13,14},{1,2,4,5,6,7,8,11,13,14,15},{1,2,4,5,6,7,8,11,13,15},{1,2,4,5,6,7,8,11,14},{1,2,4,5,6,7,8,11,14,15},{1,2,4,5,6,7,8,11,15},{1,2,4,5,6,7,8,12},{1,2,4,5,6,7,8,12,13},{1,2,4,5,6,7,8,12,13,14},{1,2,4,5,6,7,8,12,13,14,15},{1,2,4,5,6,7,8,12,13,15},{1,2,4,5,6,7,8,12,14},{1,2,4,5,6,7,8,12,14,15},{1,2,4,5,6,7,8,12,15},{1,2,4,5,6,7,8,13},{1,2,4,5,6,7,8,13,14},{1,2,4,5,6,7,8,13,14,15},{1,2,4,5,6,7,8,13,15},{1,2,4,5,6,7,8,14},{1,2,4,5,6,7,8,14,15},{1,2,4,5,6,7,8,15},{1,2,4,5,6,7,9},{1,2,4,5,6,7,9,10},{1,2,4,5,6,7,9,10,11},{1,2,4,5,6,7,9,10,11,12},{1,2,4,5,6,7,9,10,11,12,13},{1,2,4,5,6,7,9,10,11,12,13,14},{1,2,4,5,6,7,9,10,11,12,13,14,15},{1,2,4,5,6,7,9,10,11,12,13,15},{1,2,4,5,6,7,9,10,11,12,14},{1,2,4,5,6,7,9,10,11,12,14,15},{1,2,4,5,6,7,9,10,11,12,15},{1,2,4,5,6,7,9,10,11,13},{1,2,4,5,6,7,9,10,11,13,14},{1,2,4,5,6,7,9,10,11,13,14,15},{1,2,4,5,6,7,9,10,11,13,15},{1,2,4,5,6,7,9,10,11,14},{1,2,4,5,6,7,9,10,11,14,15},{1,2,4,5,6,7,9,10,11,15},{1,2,4,5,6,7,9,10,12},{1,2,4,5,6,7,9,10,12,13},{1,2,4,5,6,7,9,10,12,13,14},{1,2,4,5,6,7,9,10,12,13,14,15},{1,2,4,5,6,7,9,10,12,13,15},{1,2,4,5,6,7,9,10,12,14},{1,2,4,5,6,7,9,10,12,14,15},{1,2,4,5,6,7,9,10,12,15},{1,2,4,5,6,7,9,10,13},{1,2,4,5,6,7,9,10,13,14},{1,2,4,5,6,7,9,10,13,14,15},{1,2,4,5,6,7,9,10,13,15},{1,2,4,5,6,7,9,10,14},{1,2,4,5,6,7,9,10,14,15},{1,2,4,5,6,7,9,10,15},{1,2,4,5,6,7,9,11},{1,2,4,5,6,7,9,11,12},{1,2,4,5,6,7,9,11,12,13},{1,2,4,5,6,7,9,11,12,13,14},{1,2,4,5,6,7,9,11,12,13,14,15},{1,2,4,5,6,7,9,11,12,13,15},{1,2,4,5,6,7,9,11,12,14},{1,2,4,5,6,7,9,11,12,14,15},{1,2,4,5,6,7,9,11,12,15},{1,2,4,5,6,7,9,11,13},{1,2,4,5,6,7,9,11,13,14},{1,2,4,5,6,7,9,11,13,14,15},{1,2,4,5,6,7,9,11,13,15},{1,2,4,5,6,7,9,11,14},{1,2,4,5,6,7,9,11,14,15},{1,2,4,5,6,7,9,11,15},{1,2,4,5,6,7,9,12},{1,2,4,5,6,7,9,12,13},{1,2,4,5,6,7,9,12,13,14},{1,2,4,5,6,7,9,12,13,14,15},{1,2,4,5,6,7,9,12,13,15},{1,2,4,5,6,7,9,12,14},{1,2,4,5,6,7,9,12,14,15},{1,2,4,5,6,7,9,12,15},{1,2,4,5,6,7,9,13},{1,2,4,5,6,7,9,13,14},{1,2,4,5,6,7,9,13,14,15},{1,2,4,5,6,7,9,13,15},{1,2,4,5,6,7,9,14},{1,2,4,5,6,7,9,14,15},{1,2,4,5,6,7,9,15},{1,2,4,5,6,7,10},{1,2,4,5,6,7,10,11},{1,2,4,5,6,7,10,11,12},{1,2,4,5,6,7,10,11,12,13},{1,2,4,5,6,7,10,11,12,13,14},{1,2,4,5,6,7,10,11,12,13,14,15},{1,2,4,5,6,7,10,11,12,13,15},{1,2,4,5,6,7,10,11,12,14},{1,2,4,5,6,7,10,11,12,14,15},{1,2,4,5,6,7,10,11,12,15},{1,2,4,5,6,7,10,11,13},{1,2,4,5,6,7,10,11,13,14},{1,2,4,5,6,7,10,11,13,14,15},{1,2,4,5,6,7,10,11,13,15},{1,2,4,5,6,7,10,11,14},{1,2,4,5,6,7,10,11,14,15},{1,2,4,5,6,7,10,11,15},{1,2,4,5,6,7,10,12},{1,2,4,5,6,7,10,12,13},{1,2,4,5,6,7,10,12,13,14},{1,2,4,5,6,7,10,12,13,14,15},{1,2,4,5,6,7,10,12,13,15},{1,2,4,5,6,7,10,12,14},{1,2,4,5,6,7,10,12,14,15},{1,2,4,5,6,7,10,12,15},{1,2,4,5,6,7,10,13},{1,2,4,5,6,7,10,13,14},{1,2,4,5,6,7,10,13,14,15},{1,2,4,5,6,7,10,13,15},{1,2,4,5,6,7,10,14},{1,2,4,5,6,7,10,14,15},{1,2,4,5,6,7,10,15},{1,2,4,5,6,7,11},{1,2,4,5,6,7,11,12},{1,2,4,5,6,7,11,12,13},{1,2,4,5,6,7,11,12,13,14},{1,2,4,5,6,7,11,12,13,14,15},{1,2,4,5,6,7,11,12,13,15},{1,2,4,5,6,7,11,12,14},{1,2,4,5,6,7,11,12,14,15},{1,2,4,5,6,7,11,12,15},{1,2,4,5,6,7,11,13},{1,2,4,5,6,7,11,13,14},{1,2,4,5,6,7,11,13,14,15},{1,2,4,5,6,7,11,13,15},{1,2,4,5,6,7,11,14},{1,2,4,5,6,7,11,14,15},{1,2,4,5,6,7,11,15},{1,2,4,5,6,7,12},{1,2,4,5,6,7,12,13},{1,2,4,5,6,7,12,13,14},{1,2,4,5,6,7,12,13,14,15},{1,2,4,5,6,7,12,13,15},{1,2,4,5,6,7,12,14},{1,2,4,5,6,7,12,14,15},{1,2,4,5,6,7,12,15},{1,2,4,5,6,7,13},{1,2,4,5,6,7,13,14},{1,2,4,5,6,7,13,14,15},{1,2,4,5,6,7,13,15},{1,2,4,5,6,7,14},{1,2,4,5,6,7,14,15},{1,2,4,5,6,7,15},{1,2,4,5,6,8},{1,2,4,5,6,8,9},{1,2,4,5,6,8,9,10},{1,2,4,5,6,8,9,10,11},{1,2,4,5,6,8,9,10,11,12},{1,2,4,5,6,8,9,10,11,12,13},{1,2,4,5,6,8,9,10,11,12,13,14},{1,2,4,5,6,8,9,10,11,12,13,14,15},{1,2,4,5,6,8,9,10,11,12,13,15},{1,2,4,5,6,8,9,10,11,12,14},{1,2,4,5,6,8,9,10,11,12,14,15},{1,2,4,5,6,8,9,10,11,12,15},{1,2,4,5,6,8,9,10,11,13},{1,2,4,5,6,8,9,10,11,13,14},{1,2,4,5,6,8,9,10,11,13,14,15},{1,2,4,5,6,8,9,10,11,13,15},{1,2,4,5,6,8,9,10,11,14},{1,2,4,5,6,8,9,10,11,14,15},{1,2,4,5,6,8,9,10,11,15},{1,2,4,5,6,8,9,10,12},{1,2,4,5,6,8,9,10,12,13},{1,2,4,5,6,8,9,10,12,13,14},{1,2,4,5,6,8,9,10,12,13,14,15},{1,2,4,5,6,8,9,10,12,13,15},{1,2,4,5,6,8,9,10,12,14},{1,2,4,5,6,8,9,10,12,14,15},{1,2,4,5,6,8,9,10,12,15},{1,2,4,5,6,8,9,10,13},{1,2,4,5,6,8,9,10,13,14},{1,2,4,5,6,8,9,10,13,14,15},{1,2,4,5,6,8,9,10,13,15},{1,2,4,5,6,8,9,10,14},{1,2,4,5,6,8,9,10,14,15},{1,2,4,5,6,8,9,10,15},{1,2,4,5,6,8,9,11},{1,2,4,5,6,8,9,11,12},{1,2,4,5,6,8,9,11,12,13},{1,2,4,5,6,8,9,11,12,13,14},{1,2,4,5,6,8,9,11,12,13,14,15},{1,2,4,5,6,8,9,11,12,13,15},{1,2,4,5,6,8,9,11,12,14},{1,2,4,5,6,8,9,11,12,14,15},{1,2,4,5,6,8,9,11,12,15},{1,2,4,5,6,8,9,11,13},{1,2,4,5,6,8,9,11,13,14},{1,2,4,5,6,8,9,11,13,14,15},{1,2,4,5,6,8,9,11,13,15},{1,2,4,5,6,8,9,11,14},{1,2,4,5,6,8,9,11,14,15},{1,2,4,5,6,8,9,11,15},{1,2,4,5,6,8,9,12},{1,2,4,5,6,8,9,12,13},{1,2,4,5,6,8,9,12,13,14},{1,2,4,5,6,8,9,12,13,14,15},{1,2,4,5,6,8,9,12,13,15},{1,2,4,5,6,8,9,12,14},{1,2,4,5,6,8,9,12,14,15},{1,2,4,5,6,8,9,12,15},{1,2,4,5,6,8,9,13},{1,2,4,5,6,8,9,13,14},{1,2,4,5,6,8,9,13,14,15},{1,2,4,5,6,8,9,13,15},{1,2,4,5,6,8,9,14},{1,2,4,5,6,8,9,14,15},{1,2,4,5,6,8,9,15},{1,2,4,5,6,8,10},{1,2,4,5,6,8,10,11},{1,2,4,5,6,8,10,11,12},{1,2,4,5,6,8,10,11,12,13},{1,2,4,5,6,8,10,11,12,13,14},{1,2,4,5,6,8,10,11,12,13,14,15},{1,2,4,5,6,8,10,11,12,13,15},{1,2,4,5,6,8,10,11,12,14},{1,2,4,5,6,8,10,11,12,14,15},{1,2,4,5,6,8,10,11,12,15},{1,2,4,5,6,8,10,11,13},{1,2,4,5,6,8,10,11,13,14},{1,2,4,5,6,8,10,11,13,14,15},{1,2,4,5,6,8,10,11,13,15},{1,2,4,5,6,8,10,11,14},{1,2,4,5,6,8,10,11,14,15},{1,2,4,5,6,8,10,11,15},{1,2,4,5,6,8,10,12},{1,2,4,5,6,8,10,12,13},{1,2,4,5,6,8,10,12,13,14},{1,2,4,5,6,8,10,12,13,14,15},{1,2,4,5,6,8,10,12,13,15},{1,2,4,5,6,8,10,12,14},{1,2,4,5,6,8,10,12,14,15},{1,2,4,5,6,8,10,12,15},{1,2,4,5,6,8,10,13},{1,2,4,5,6,8,10,13,14},{1,2,4,5,6,8,10,13,14,15},{1,2,4,5,6,8,10,13,15},{1,2,4,5,6,8,10,14},{1,2,4,5,6,8,10,14,15},{1,2,4,5,6,8,10,15},{1,2,4,5,6,8,11},{1,2,4,5,6,8,11,12},{1,2,4,5,6,8,11,12,13},{1,2,4,5,6,8,11,12,13,14},{1,2,4,5,6,8,11,12,13,14,15},{1,2,4,5,6,8,11,12,13,15},{1,2,4,5,6,8,11,12,14},{1,2,4,5,6,8,11,12,14,15},{1,2,4,5,6,8,11,12,15},{1,2,4,5,6,8,11,13},{1,2,4,5,6,8,11,13,14},{1,2,4,5,6,8,11,13,14,15},{1,2,4,5,6,8,11,13,15},{1,2,4,5,6,8,11,14},{1,2,4,5,6,8,11,14,15},{1,2,4,5,6,8,11,15},{1,2,4,5,6,8,12},{1,2,4,5,6,8,12,13},{1,2,4,5,6,8,12,13,14},{1,2,4,5,6,8,12,13,14,15},{1,2,4,5,6,8,12,13,15},{1,2,4,5,6,8,12,14},{1,2,4,5,6,8,12,14,15},{1,2,4,5,6,8,12,15},{1,2,4,5,6,8,13},{1,2,4,5,6,8,13,14},{1,2,4,5,6,8,13,14,15},{1,2,4,5,6,8,13,15},{1,2,4,5,6,8,14},{1,2,4,5,6,8,14,15},{1,2,4,5,6,8,15},{1,2,4,5,6,9},{1,2,4,5,6,9,10},{1,2,4,5,6,9,10,11},{1,2,4,5,6,9,10,11,12},{1,2,4,5,6,9,10,11,12,13},{1,2,4,5,6,9,10,11,12,13,14},{1,2,4,5,6,9,10,11,12,13,14,15},{1,2,4,5,6,9,10,11,12,13,15},{1,2,4,5,6,9,10,11,12,14},{1,2,4,5,6,9,10,11,12,14,15},{1,2,4,5,6,9,10,11,12,15},{1,2,4,5,6,9,10,11,13},{1,2,4,5,6,9,10,11,13,14},{1,2,4,5,6,9,10,11,13,14,15},{1,2,4,5,6,9,10,11,13,15},{1,2,4,5,6,9,10,11,14},{1,2,4,5,6,9,10,11,14,15},{1,2,4,5,6,9,10,11,15},{1,2,4,5,6,9,10,12},{1,2,4,5,6,9,10,12,13},{1,2,4,5,6,9,10,12,13,14},{1,2,4,5,6,9,10,12,13,14,15},{1,2,4,5,6,9,10,12,13,15},{1,2,4,5,6,9,10,12,14},{1,2,4,5,6,9,10,12,14,15},{1,2,4,5,6,9,10,12,15},{1,2,4,5,6,9,10,13},{1,2,4,5,6,9,10,13,14},{1,2,4,5,6,9,10,13,14,15},{1,2,4,5,6,9,10,13,15},{1,2,4,5,6,9,10,14},{1,2,4,5,6,9,10,14,15},{1,2,4,5,6,9,10,15},{1,2,4,5,6,9,11},{1,2,4,5,6,9,11,12},{1,2,4,5,6,9,11,12,13},{1,2,4,5,6,9,11,12,13,14},{1,2,4,5,6,9,11,12,13,14,15},{1,2,4,5,6,9,11,12,13,15},{1,2,4,5,6,9,11,12,14},{1,2,4,5,6,9,11,12,14,15},{1,2,4,5,6,9,11,12,15},{1,2,4,5,6,9,11,13},{1,2,4,5,6,9,11,13,14},{1,2,4,5,6,9,11,13,14,15},{1,2,4,5,6,9,11,13,15},{1,2,4,5,6,9,11,14},{1,2,4,5,6,9,11,14,15},{1,2,4,5,6,9,11,15},{1,2,4,5,6,9,12},{1,2,4,5,6,9,12,13},{1,2,4,5,6,9,12,13,14},{1,2,4,5,6,9,12,13,14,15},{1,2,4,5,6,9,12,13,15},{1,2,4,5,6,9,12,14},{1,2,4,5,6,9,12,14,15},{1,2,4,5,6,9,12,15},{1,2,4,5,6,9,13},{1,2,4,5,6,9,13,14},{1,2,4,5,6,9,13,14,15},{1,2,4,5,6,9,13,15},{1,2,4,5,6,9,14},{1,2,4,5,6,9,14,15},{1,2,4,5,6,9,15},{1,2,4,5,6,10},{1,2,4,5,6,10,11},{1,2,4,5,6,10,11,12},{1,2,4,5,6,10,11,12,13},{1,2,4,5,6,10,11,12,13,14},{1,2,4,5,6,10,11,12,13,14,15},{1,2,4,5,6,10,11,12,13,15},{1,2,4,5,6,10,11,12,14},{1,2,4,5,6,10,11,12,14,15},{1,2,4,5,6,10,11,12,15},{1,2,4,5,6,10,11,13},{1,2,4,5,6,10,11,13,14},{1,2,4,5,6,10,11,13,14,15},{1,2,4,5,6,10,11,13,15},{1,2,4,5,6,10,11,14},{1,2,4,5,6,10,11,14,15},{1,2,4,5,6,10,11,15},{1,2,4,5,6,10,12},{1,2,4,5,6,10,12,13},{1,2,4,5,6,10,12,13,14},{1,2,4,5,6,10,12,13,14,15},{1,2,4,5,6,10,12,13,15},{1,2,4,5,6,10,12,14},{1,2,4,5,6,10,12,14,15},{1,2,4,5,6,10,12,15},{1,2,4,5,6,10,13},{1,2,4,5,6,10,13,14},{1,2,4,5,6,10,13,14,15},{1,2,4,5,6,10,13,15},{1,2,4,5,6,10,14},{1,2,4,5,6,10,14,15},{1,2,4,5,6,10,15},{1,2,4,5,6,11},{1,2,4,5,6,11,12},{1,2,4,5,6,11,12,13},{1,2,4,5,6,11,12,13,14},{1,2,4,5,6,11,12,13,14,15},{1,2,4,5,6,11,12,13,15},{1,2,4,5,6,11,12,14},{1,2,4,5,6,11,12,14,15},{1,2,4,5,6,11,12,15},{1,2,4,5,6,11,13},{1,2,4,5,6,11,13,14},{1,2,4,5,6,11,13,14,15},{1,2,4,5,6,11,13,15},{1,2,4,5,6,11,14},{1,2,4,5,6,11,14,15},{1,2,4,5,6,11,15},{1,2,4,5,6,12},{1,2,4,5,6,12,13},{1,2,4,5,6,12,13,14},{1,2,4,5,6,12,13,14,15},{1,2,4,5,6,12,13,15},{1,2,4,5,6,12,14},{1,2,4,5,6,12,14,15},{1,2,4,5,6,12,15},{1,2,4,5,6,13},{1,2,4,5,6,13,14},{1,2,4,5,6,13,14,15},{1,2,4,5,6,13,15},{1,2,4,5,6,14},{1,2,4,5,6,14,15},{1,2,4,5,6,15},{1,2,4,5,7},{1,2,4,5,7,8},{1,2,4,5,7,8,9},{1,2,4,5,7,8,9,10},{1,2,4,5,7,8,9,10,11},{1,2,4,5,7,8,9,10,11,12},{1,2,4,5,7,8,9,10,11,12,13},{1,2,4,5,7,8,9,10,11,12,13,14},{1,2,4,5,7,8,9,10,11,12,13,14,15},{1,2,4,5,7,8,9,10,11,12,13,15},{1,2,4,5,7,8,9,10,11,12,14},{1,2,4,5,7,8,9,10,11,12,14,15},{1,2,4,5,7,8,9,10,11,12,15},{1,2,4,5,7,8,9,10,11,13},{1,2,4,5,7,8,9,10,11,13,14},{1,2,4,5,7,8,9,10,11,13,14,15},{1,2,4,5,7,8,9,10,11,13,15},{1,2,4,5,7,8,9,10,11,14},{1,2,4,5,7,8,9,10,11,14,15},{1,2,4,5,7,8,9,10,11,15},{1,2,4,5,7,8,9,10,12},{1,2,4,5,7,8,9,10,12,13},{1,2,4,5,7,8,9,10,12,13,14},{1,2,4,5,7,8,9,10,12,13,14,15},{1,2,4,5,7,8,9,10,12,13,15},{1,2,4,5,7,8,9,10,12,14},{1,2,4,5,7,8,9,10,12,14,15},{1,2,4,5,7,8,9,10,12,15},{1,2,4,5,7,8,9,10,13},{1,2,4,5,7,8,9,10,13,14},{1,2,4,5,7,8,9,10,13,14,15},{1,2,4,5,7,8,9,10,13,15},{1,2,4,5,7,8,9,10,14},{1,2,4,5,7,8,9,10,14,15},{1,2,4,5,7,8,9,10,15},{1,2,4,5,7,8,9,11},{1,2,4,5,7,8,9,11,12},{1,2,4,5,7,8,9,11,12,13},{1,2,4,5,7,8,9,11,12,13,14},{1,2,4,5,7,8,9,11,12,13,14,15},{1,2,4,5,7,8,9,11,12,13,15},{1,2,4,5,7,8,9,11,12,14},{1,2,4,5,7,8,9,11,12,14,15},{1,2,4,5,7,8,9,11,12,15},{1,2,4,5,7,8,9,11,13},{1,2,4,5,7,8,9,11,13,14},{1,2,4,5,7,8,9,11,13,14,15},{1,2,4,5,7,8,9,11,13,15},{1,2,4,5,7,8,9,11,14},{1,2,4,5,7,8,9,11,14,15},{1,2,4,5,7,8,9,11,15},{1,2,4,5,7,8,9,12},{1,2,4,5,7,8,9,12,13},{1,2,4,5,7,8,9,12,13,14},{1,2,4,5,7,8,9,12,13,14,15},{1,2,4,5,7,8,9,12,13,15},{1,2,4,5,7,8,9,12,14},{1,2,4,5,7,8,9,12,14,15},{1,2,4,5,7,8,9,12,15},{1,2,4,5,7,8,9,13},{1,2,4,5,7,8,9,13,14},{1,2,4,5,7,8,9,13,14,15},{1,2,4,5,7,8,9,13,15},{1,2,4,5,7,8,9,14},{1,2,4,5,7,8,9,14,15},{1,2,4,5,7,8,9,15},{1,2,4,5,7,8,10},{1,2,4,5,7,8,10,11},{1,2,4,5,7,8,10,11,12},{1,2,4,5,7,8,10,11,12,13},{1,2,4,5,7,8,10,11,12,13,14},{1,2,4,5,7,8,10,11,12,13,14,15},{1,2,4,5,7,8,10,11,12,13,15},{1,2,4,5,7,8,10,11,12,14},{1,2,4,5,7,8,10,11,12,14,15},{1,2,4,5,7,8,10,11,12,15},{1,2,4,5,7,8,10,11,13},{1,2,4,5,7,8,10,11,13,14},{1,2,4,5,7,8,10,11,13,14,15},{1,2,4,5,7,8,10,11,13,15},{1,2,4,5,7,8,10,11,14},{1,2,4,5,7,8,10,11,14,15},{1,2,4,5,7,8,10,11,15},{1,2,4,5,7,8,10,12},{1,2,4,5,7,8,10,12,13},{1,2,4,5,7,8,10,12,13,14},{1,2,4,5,7,8,10,12,13,14,15},{1,2,4,5,7,8,10,12,13,15},{1,2,4,5,7,8,10,12,14},{1,2,4,5,7,8,10,12,14,15},{1,2,4,5,7,8,10,12,15},{1,2,4,5,7,8,10,13},{1,2,4,5,7,8,10,13,14},{1,2,4,5,7,8,10,13,14,15},{1,2,4,5,7,8,10,13,15},{1,2,4,5,7,8,10,14},{1,2,4,5,7,8,10,14,15},{1,2,4,5,7,8,10,15},{1,2,4,5,7,8,11},{1,2,4,5,7,8,11,12},{1,2,4,5,7,8,11,12,13},{1,2,4,5,7,8,11,12,13,14},{1,2,4,5,7,8,11,12,13,14,15},{1,2,4,5,7,8,11,12,13,15},{1,2,4,5,7,8,11,12,14},{1,2,4,5,7,8,11,12,14,15},{1,2,4,5,7,8,11,12,15},{1,2,4,5,7,8,11,13},{1,2,4,5,7,8,11,13,14},{1,2,4,5,7,8,11,13,14,15},{1,2,4,5,7,8,11,13,15},{1,2,4,5,7,8,11,14},{1,2,4,5,7,8,11,14,15},{1,2,4,5,7,8,11,15},{1,2,4,5,7,8,12},{1,2,4,5,7,8,12,13},{1,2,4,5,7,8,12,13,14},{1,2,4,5,7,8,12,13,14,15},{1,2,4,5,7,8,12,13,15},{1,2,4,5,7,8,12,14},{1,2,4,5,7,8,12,14,15},{1,2,4,5,7,8,12,15},{1,2,4,5,7,8,13},{1,2,4,5,7,8,13,14},{1,2,4,5,7,8,13,14,15},{1,2,4,5,7,8,13,15},{1,2,4,5,7,8,14},{1,2,4,5,7,8,14,15},{1,2,4,5,7,8,15},{1,2,4,5,7,9},{1,2,4,5,7,9,10},{1,2,4,5,7,9,10,11},{1,2,4,5,7,9,10,11,12},{1,2,4,5,7,9,10,11,12,13},{1,2,4,5,7,9,10,11,12,13,14},{1,2,4,5,7,9,10,11,12,13,14,15},{1,2,4,5,7,9,10,11,12,13,15},{1,2,4,5,7,9,10,11,12,14},{1,2,4,5,7,9,10,11,12,14,15},{1,2,4,5,7,9,10,11,12,15},{1,2,4,5,7,9,10,11,13},{1,2,4,5,7,9,10,11,13,14},{1,2,4,5,7,9,10,11,13,14,15},{1,2,4,5,7,9,10,11,13,15},{1,2,4,5,7,9,10,11,14},{1,2,4,5,7,9,10,11,14,15},{1,2,4,5,7,9,10,11,15},{1,2,4,5,7,9,10,12},{1,2,4,5,7,9,10,12,13},{1,2,4,5,7,9,10,12,13,14},{1,2,4,5,7,9,10,12,13,14,15},{1,2,4,5,7,9,10,12,13,15},{1,2,4,5,7,9,10,12,14},{1,2,4,5,7,9,10,12,14,15},{1,2,4,5,7,9,10,12,15},{1,2,4,5,7,9,10,13},{1,2,4,5,7,9,10,13,14},{1,2,4,5,7,9,10,13,14,15},{1,2,4,5,7,9,10,13,15},{1,2,4,5,7,9,10,14},{1,2,4,5,7,9,10,14,15},{1,2,4,5,7,9,10,15},{1,2,4,5,7,9,11},{1,2,4,5,7,9,11,12},{1,2,4,5,7,9,11,12,13},{1,2,4,5,7,9,11,12,13,14},{1,2,4,5,7,9,11,12,13,14,15},{1,2,4,5,7,9,11,12,13,15},{1,2,4,5,7,9,11,12,14},{1,2,4,5,7,9,11,12,14,15},{1,2,4,5,7,9,11,12,15},{1,2,4,5,7,9,11,13},{1,2,4,5,7,9,11,13,14},{1,2,4,5,7,9,11,13,14,15},{1,2,4,5,7,9,11,13,15},{1,2,4,5,7,9,11,14},{1,2,4,5,7,9,11,14,15},{1,2,4,5,7,9,11,15},{1,2,4,5,7,9,12},{1,2,4,5,7,9,12,13},{1,2,4,5,7,9,12,13,14},{1,2,4,5,7,9,12,13,14,15},{1,2,4,5,7,9,12,13,15},{1,2,4,5,7,9,12,14},{1,2,4,5,7,9,12,14,15},{1,2,4,5,7,9,12,15},{1,2,4,5,7,9,13},{1,2,4,5,7,9,13,14},{1,2,4,5,7,9,13,14,15},{1,2,4,5,7,9,13,15},{1,2,4,5,7,9,14},{1,2,4,5,7,9,14,15},{1,2,4,5,7,9,15},{1,2,4,5,7,10},{1,2,4,5,7,10,11},{1,2,4,5,7,10,11,12},{1,2,4,5,7,10,11,12,13},{1,2,4,5,7,10,11,12,13,14},{1,2,4,5,7,10,11,12,13,14,15},{1,2,4,5,7,10,11,12,13,15},{1,2,4,5,7,10,11,12,14},{1,2,4,5,7,10,11,12,14,15},{1,2,4,5,7,10,11,12,15},{1,2,4,5,7,10,11,13},{1,2,4,5,7,10,11,13,14},{1,2,4,5,7,10,11,13,14,15},{1,2,4,5,7,10,11,13,15},{1,2,4,5,7,10,11,14},{1,2,4,5,7,10,11,14,15},{1,2,4,5,7,10,11,15},{1,2,4,5,7,10,12},{1,2,4,5,7,10,12,13},{1,2,4,5,7,10,12,13,14},{1,2,4,5,7,10,12,13,14,15},{1,2,4,5,7,10,12,13,15},{1,2,4,5,7,10,12,14},{1,2,4,5,7,10,12,14,15},{1,2,4,5,7,10,12,15},{1,2,4,5,7,10,13},{1,2,4,5,7,10,13,14},{1,2,4,5,7,10,13,14,15},{1,2,4,5,7,10,13,15},{1,2,4,5,7,10,14},{1,2,4,5,7,10,14,15},{1,2,4,5,7,10,15},{1,2,4,5,7,11},{1,2,4,5,7,11,12},{1,2,4,5,7,11,12,13},{1,2,4,5,7,11,12,13,14},{1,2,4,5,7,11,12,13,14,15},{1,2,4,5,7,11,12,13,15},{1,2,4,5,7,11,12,14},{1,2,4,5,7,11,12,14,15},{1,2,4,5,7,11,12,15},{1,2,4,5,7,11,13},{1,2,4,5,7,11,13,14},{1,2,4,5,7,11,13,14,15},{1,2,4,5,7,11,13,15},{1,2,4,5,7,11,14},{1,2,4,5,7,11,14,15},{1,2,4,5,7,11,15},{1,2,4,5,7,12},{1,2,4,5,7,12,13},{1,2,4,5,7,12,13,14},{1,2,4,5,7,12,13,14,15},{1,2,4,5,7,12,13,15},{1,2,4,5,7,12,14},{1,2,4,5,7,12,14,15},{1,2,4,5,7,12,15},{1,2,4,5,7,13},{1,2,4,5,7,13,14},{1,2,4,5,7,13,14,15},{1,2,4,5,7,13,15},{1,2,4,5,7,14},{1,2,4,5,7,14,15},{1,2,4,5,7,15},{1,2,4,5,8},{1,2,4,5,8,9},{1,2,4,5,8,9,10},{1,2,4,5,8,9,10,11},{1,2,4,5,8,9,10,11,12},{1,2,4,5,8,9,10,11,12,13},{1,2,4,5,8,9,10,11,12,13,14},{1,2,4,5,8,9,10,11,12,13,14,15},{1,2,4,5,8,9,10,11,12,13,15},{1,2,4,5,8,9,10,11,12,14},{1,2,4,5,8,9,10,11,12,14,15},{1,2,4,5,8,9,10,11,12,15},{1,2,4,5,8,9,10,11,13},{1,2,4,5,8,9,10,11,13,14},{1,2,4,5,8,9,10,11,13,14,15},{1,2,4,5,8,9,10,11,13,15},{1,2,4,5,8,9,10,11,14},{1,2,4,5,8,9,10,11,14,15},{1,2,4,5,8,9,10,11,15},{1,2,4,5,8,9,10,12},{1,2,4,5,8,9,10,12,13},{1,2,4,5,8,9,10,12,13,14},{1,2,4,5,8,9,10,12,13,14,15},{1,2,4,5,8,9,10,12,13,15},{1,2,4,5,8,9,10,12,14},{1,2,4,5,8,9,10,12,14,15},{1,2,4,5,8,9,10,12,15},{1,2,4,5,8,9,10,13},{1,2,4,5,8,9,10,13,14},{1,2,4,5,8,9,10,13,14,15},{1,2,4,5,8,9,10,13,15},{1,2,4,5,8,9,10,14},{1,2,4,5,8,9,10,14,15},{1,2,4,5,8,9,10,15},{1,2,4,5,8,9,11},{1,2,4,5,8,9,11,12},{1,2,4,5,8,9,11,12,13},{1,2,4,5,8,9,11,12,13,14},{1,2,4,5,8,9,11,12,13,14,15},{1,2,4,5,8,9,11,12,13,15},{1,2,4,5,8,9,11,12,14},{1,2,4,5,8,9,11,12,14,15},{1,2,4,5,8,9,11,12,15},{1,2,4,5,8,9,11,13},{1,2,4,5,8,9,11,13,14},{1,2,4,5,8,9,11,13,14,15},{1,2,4,5,8,9,11,13,15},{1,2,4,5,8,9,11,14},{1,2,4,5,8,9,11,14,15},{1,2,4,5,8,9,11,15},{1,2,4,5,8,9,12},{1,2,4,5,8,9,12,13},{1,2,4,5,8,9,12,13,14},{1,2,4,5,8,9,12,13,14,15},{1,2,4,5,8,9,12,13,15},{1,2,4,5,8,9,12,14},{1,2,4,5,8,9,12,14,15},{1,2,4,5,8,9,12,15},{1,2,4,5,8,9,13},{1,2,4,5,8,9,13,14},{1,2,4,5,8,9,13,14,15},{1,2,4,5,8,9,13,15},{1,2,4,5,8,9,14},{1,2,4,5,8,9,14,15},{1,2,4,5,8,9,15},{1,2,4,5,8,10},{1,2,4,5,8,10,11},{1,2,4,5,8,10,11,12},{1,2,4,5,8,10,11,12,13},{1,2,4,5,8,10,11,12,13,14},{1,2,4,5,8,10,11,12,13,14,15},{1,2,4,5,8,10,11,12,13,15},{1,2,4,5,8,10,11,12,14},{1,2,4,5,8,10,11,12,14,15},{1,2,4,5,8,10,11,12,15},{1,2,4,5,8,10,11,13},{1,2,4,5,8,10,11,13,14},{1,2,4,5,8,10,11,13,14,15},{1,2,4,5,8,10,11,13,15},{1,2,4,5,8,10,11,14},{1,2,4,5,8,10,11,14,15},{1,2,4,5,8,10,11,15},{1,2,4,5,8,10,12},{1,2,4,5,8,10,12,13},{1,2,4,5,8,10,12,13,14},{1,2,4,5,8,10,12,13,14,15},{1,2,4,5,8,10,12,13,15},{1,2,4,5,8,10,12,14},{1,2,4,5,8,10,12,14,15},{1,2,4,5,8,10,12,15},{1,2,4,5,8,10,13},{1,2,4,5,8,10,13,14},{1,2,4,5,8,10,13,14,15},{1,2,4,5,8,10,13,15},{1,2,4,5,8,10,14},{1,2,4,5,8,10,14,15},{1,2,4,5,8,10,15},{1,2,4,5,8,11},{1,2,4,5,8,11,12},{1,2,4,5,8,11,12,13},{1,2,4,5,8,11,12,13,14},{1,2,4,5,8,11,12,13,14,15},{1,2,4,5,8,11,12,13,15},{1,2,4,5,8,11,12,14},{1,2,4,5,8,11,12,14,15},{1,2,4,5,8,11,12,15},{1,2,4,5,8,11,13},{1,2,4,5,8,11,13,14},{1,2,4,5,8,11,13,14,15},{1,2,4,5,8,11,13,15},{1,2,4,5,8,11,14},{1,2,4,5,8,11,14,15},{1,2,4,5,8,11,15},{1,2,4,5,8,12},{1,2,4,5,8,12,13},{1,2,4,5,8,12,13,14},{1,2,4,5,8,12,13,14,15},{1,2,4,5,8,12,13,15},{1,2,4,5,8,12,14},{1,2,4,5,8,12,14,15},{1,2,4,5,8,12,15},{1,2,4,5,8,13},{1,2,4,5,8,13,14},{1,2,4,5,8,13,14,15},{1,2,4,5,8,13,15},{1,2,4,5,8,14},{1,2,4,5,8,14,15},{1,2,4,5,8,15},{1,2,4,5,9},{1,2,4,5,9,10},{1,2,4,5,9,10,11},{1,2,4,5,9,10,11,12},{1,2,4,5,9,10,11,12,13},{1,2,4,5,9,10,11,12,13,14},{1,2,4,5,9,10,11,12,13,14,15},{1,2,4,5,9,10,11,12,13,15},{1,2,4,5,9,10,11,12,14},{1,2,4,5,9,10,11,12,14,15},{1,2,4,5,9,10,11,12,15},{1,2,4,5,9,10,11,13},{1,2,4,5,9,10,11,13,14},{1,2,4,5,9,10,11,13,14,15},{1,2,4,5,9,10,11,13,15},{1,2,4,5,9,10,11,14},{1,2,4,5,9,10,11,14,15},{1,2,4,5,9,10,11,15},{1,2,4,5,9,10,12},{1,2,4,5,9,10,12,13},{1,2,4,5,9,10,12,13,14},{1,2,4,5,9,10,12,13,14,15},{1,2,4,5,9,10,12,13,15},{1,2,4,5,9,10,12,14},{1,2,4,5,9,10,12,14,15},{1,2,4,5,9,10,12,15},{1,2,4,5,9,10,13},{1,2,4,5,9,10,13,14},{1,2,4,5,9,10,13,14,15},{1,2,4,5,9,10,13,15},{1,2,4,5,9,10,14},{1,2,4,5,9,10,14,15},{1,2,4,5,9,10,15},{1,2,4,5,9,11},{1,2,4,5,9,11,12},{1,2,4,5,9,11,12,13},{1,2,4,5,9,11,12,13,14},{1,2,4,5,9,11,12,13,14,15},{1,2,4,5,9,11,12,13,15},{1,2,4,5,9,11,12,14},{1,2,4,5,9,11,12,14,15},{1,2,4,5,9,11,12,15},{1,2,4,5,9,11,13},{1,2,4,5,9,11,13,14},{1,2,4,5,9,11,13,14,15},{1,2,4,5,9,11,13,15},{1,2,4,5,9,11,14},{1,2,4,5,9,11,14,15},{1,2,4,5,9,11,15},{1,2,4,5,9,12},{1,2,4,5,9,12,13},{1,2,4,5,9,12,13,14},{1,2,4,5,9,12,13,14,15},{1,2,4,5,9,12,13,15},{1,2,4,5,9,12,14},{1,2,4,5,9,12,14,15},{1,2,4,5,9,12,15},{1,2,4,5,9,13},{1,2,4,5,9,13,14},{1,2,4,5,9,13,14,15},{1,2,4,5,9,13,15},{1,2,4,5,9,14},{1,2,4,5,9,14,15},{1,2,4,5,9,15},{1,2,4,5,10},{1,2,4,5,10,11},{1,2,4,5,10,11,12},{1,2,4,5,10,11,12,13},{1,2,4,5,10,11,12,13,14},{1,2,4,5,10,11,12,13,14,15},{1,2,4,5,10,11,12,13,15},{1,2,4,5,10,11,12,14},{1,2,4,5,10,11,12,14,15},{1,2,4,5,10,11,12,15},{1,2,4,5,10,11,13},{1,2,4,5,10,11,13,14},{1,2,4,5,10,11,13,14,15},{1,2,4,5,10,11,13,15},{1,2,4,5,10,11,14},{1,2,4,5,10,11,14,15},{1,2,4,5,10,11,15},{1,2,4,5,10,12},{1,2,4,5,10,12,13},{1,2,4,5,10,12,13,14},{1,2,4,5,10,12,13,14,15},{1,2,4,5,10,12,13,15},{1,2,4,5,10,12,14},{1,2,4,5,10,12,14,15},{1,2,4,5,10,12,15},{1,2,4,5,10,13},{1,2,4,5,10,13,14},{1,2,4,5,10,13,14,15},{1,2,4,5,10,13,15},{1,2,4,5,10,14},{1,2,4,5,10,14,15},{1,2,4,5,10,15},{1,2,4,5,11},{1,2,4,5,11,12},{1,2,4,5,11,12,13},{1,2,4,5,11,12,13,14},{1,2,4,5,11,12,13,14,15},{1,2,4,5,11,12,13,15},{1,2,4,5,11,12,14},{1,2,4,5,11,12,14,15},{1,2,4,5,11,12,15},{1,2,4,5,11,13},{1,2,4,5,11,13,14},{1,2,4,5,11,13,14,15},{1,2,4,5,11,13,15},{1,2,4,5,11,14},{1,2,4,5,11,14,15},{1,2,4,5,11,15},{1,2,4,5,12},{1,2,4,5,12,13},{1,2,4,5,12,13,14},{1,2,4,5,12,13,14,15},{1,2,4,5,12,13,15},{1,2,4,5,12,14},{1,2,4,5,12,14,15},{1,2,4,5,12,15},{1,2,4,5,13},{1,2,4,5,13,14},{1,2,4,5,13,14,15},{1,2,4,5,13,15},{1,2,4,5,14},{1,2,4,5,14,15},{1,2,4,5,15},{1,2,4,6},{1,2,4,6,7},{1,2,4,6,7,8},{1,2,4,6,7,8,9},{1,2,4,6,7,8,9,10},{1,2,4,6,7,8,9,10,11},{1,2,4,6,7,8,9,10,11,12},{1,2,4,6,7,8,9,10,11,12,13},{1,2,4,6,7,8,9,10,11,12,13,14},{1,2,4,6,7,8,9,10,11,12,13,14,15},{1,2,4,6,7,8,9,10,11,12,13,15},{1,2,4,6,7,8,9,10,11,12,14},{1,2,4,6,7,8,9,10,11,12,14,15},{1,2,4,6,7,8,9,10,11,12,15},{1,2,4,6,7,8,9,10,11,13},{1,2,4,6,7,8,9,10,11,13,14},{1,2,4,6,7,8,9,10,11,13,14,15},{1,2,4,6,7,8,9,10,11,13,15},{1,2,4,6,7,8,9,10,11,14},{1,2,4,6,7,8,9,10,11,14,15},{1,2,4,6,7,8,9,10,11,15},{1,2,4,6,7,8,9,10,12},{1,2,4,6,7,8,9,10,12,13},{1,2,4,6,7,8,9,10,12,13,14},{1,2,4,6,7,8,9,10,12,13,14,15},{1,2,4,6,7,8,9,10,12,13,15},{1,2,4,6,7,8,9,10,12,14},{1,2,4,6,7,8,9,10,12,14,15},{1,2,4,6,7,8,9,10,12,15},{1,2,4,6,7,8,9,10,13},{1,2,4,6,7,8,9,10,13,14},{1,2,4,6,7,8,9,10,13,14,15},{1,2,4,6,7,8,9,10,13,15},{1,2,4,6,7,8,9,10,14},{1,2,4,6,7,8,9,10,14,15},{1,2,4,6,7,8,9,10,15},{1,2,4,6,7,8,9,11},{1,2,4,6,7,8,9,11,12},{1,2,4,6,7,8,9,11,12,13},{1,2,4,6,7,8,9,11,12,13,14},{1,2,4,6,7,8,9,11,12,13,14,15},{1,2,4,6,7,8,9,11,12,13,15},{1,2,4,6,7,8,9,11,12,14},{1,2,4,6,7,8,9,11,12,14,15},{1,2,4,6,7,8,9,11,12,15},{1,2,4,6,7,8,9,11,13},{1,2,4,6,7,8,9,11,13,14},{1,2,4,6,7,8,9,11,13,14,15},{1,2,4,6,7,8,9,11,13,15},{1,2,4,6,7,8,9,11,14},{1,2,4,6,7,8,9,11,14,15},{1,2,4,6,7,8,9,11,15},{1,2,4,6,7,8,9,12},{1,2,4,6,7,8,9,12,13},{1,2,4,6,7,8,9,12,13,14},{1,2,4,6,7,8,9,12,13,14,15},{1,2,4,6,7,8,9,12,13,15},{1,2,4,6,7,8,9,12,14},{1,2,4,6,7,8,9,12,14,15},{1,2,4,6,7,8,9,12,15},{1,2,4,6,7,8,9,13},{1,2,4,6,7,8,9,13,14},{1,2,4,6,7,8,9,13,14,15},{1,2,4,6,7,8,9,13,15},{1,2,4,6,7,8,9,14},{1,2,4,6,7,8,9,14,15},{1,2,4,6,7,8,9,15},{1,2,4,6,7,8,10},{1,2,4,6,7,8,10,11},{1,2,4,6,7,8,10,11,12},{1,2,4,6,7,8,10,11,12,13},{1,2,4,6,7,8,10,11,12,13,14},{1,2,4,6,7,8,10,11,12,13,14,15},{1,2,4,6,7,8,10,11,12,13,15},{1,2,4,6,7,8,10,11,12,14},{1,2,4,6,7,8,10,11,12,14,15},{1,2,4,6,7,8,10,11,12,15},{1,2,4,6,7,8,10,11,13},{1,2,4,6,7,8,10,11,13,14},{1,2,4,6,7,8,10,11,13,14,15},{1,2,4,6,7,8,10,11,13,15},{1,2,4,6,7,8,10,11,14},{1,2,4,6,7,8,10,11,14,15},{1,2,4,6,7,8,10,11,15},{1,2,4,6,7,8,10,12},{1,2,4,6,7,8,10,12,13},{1,2,4,6,7,8,10,12,13,14},{1,2,4,6,7,8,10,12,13,14,15},{1,2,4,6,7,8,10,12,13,15},{1,2,4,6,7,8,10,12,14},{1,2,4,6,7,8,10,12,14,15},{1,2,4,6,7,8,10,12,15},{1,2,4,6,7,8,10,13},{1,2,4,6,7,8,10,13,14},{1,2,4,6,7,8,10,13,14,15},{1,2,4,6,7,8,10,13,15},{1,2,4,6,7,8,10,14},{1,2,4,6,7,8,10,14,15},{1,2,4,6,7,8,10,15},{1,2,4,6,7,8,11},{1,2,4,6,7,8,11,12},{1,2,4,6,7,8,11,12,13},{1,2,4,6,7,8,11,12,13,14},{1,2,4,6,7,8,11,12,13,14,15},{1,2,4,6,7,8,11,12,13,15},{1,2,4,6,7,8,11,12,14},{1,2,4,6,7,8,11,12,14,15},{1,2,4,6,7,8,11,12,15},{1,2,4,6,7,8,11,13},{1,2,4,6,7,8,11,13,14},{1,2,4,6,7,8,11,13,14,15},{1,2,4,6,7,8,11,13,15},{1,2,4,6,7,8,11,14},{1,2,4,6,7,8,11,14,15},{1,2,4,6,7,8,11,15},{1,2,4,6,7,8,12},{1,2,4,6,7,8,12,13},{1,2,4,6,7,8,12,13,14},{1,2,4,6,7,8,12,13,14,15},{1,2,4,6,7,8,12,13,15},{1,2,4,6,7,8,12,14},{1,2,4,6,7,8,12,14,15},{1,2,4,6,7,8,12,15},{1,2,4,6,7,8,13},{1,2,4,6,7,8,13,14},{1,2,4,6,7,8,13,14,15},{1,2,4,6,7,8,13,15},{1,2,4,6,7,8,14},{1,2,4,6,7,8,14,15},{1,2,4,6,7,8,15},{1,2,4,6,7,9},{1,2,4,6,7,9,10},{1,2,4,6,7,9,10,11},{1,2,4,6,7,9,10,11,12},{1,2,4,6,7,9,10,11,12,13},{1,2,4,6,7,9,10,11,12,13,14},{1,2,4,6,7,9,10,11,12,13,14,15},{1,2,4,6,7,9,10,11,12,13,15},{1,2,4,6,7,9,10,11,12,14},{1,2,4,6,7,9,10,11,12,14,15},{1,2,4,6,7,9,10,11,12,15},{1,2,4,6,7,9,10,11,13},{1,2,4,6,7,9,10,11,13,14},{1,2,4,6,7,9,10,11,13,14,15},{1,2,4,6,7,9,10,11,13,15},{1,2,4,6,7,9,10,11,14},{1,2,4,6,7,9,10,11,14,15},{1,2,4,6,7,9,10,11,15},{1,2,4,6,7,9,10,12},{1,2,4,6,7,9,10,12,13},{1,2,4,6,7,9,10,12,13,14},{1,2,4,6,7,9,10,12,13,14,15},{1,2,4,6,7,9,10,12,13,15},{1,2,4,6,7,9,10,12,14},{1,2,4,6,7,9,10,12,14,15},{1,2,4,6,7,9,10,12,15},{1,2,4,6,7,9,10,13},{1,2,4,6,7,9,10,13,14},{1,2,4,6,7,9,10,13,14,15},{1,2,4,6,7,9,10,13,15},{1,2,4,6,7,9,10,14},{1,2,4,6,7,9,10,14,15},{1,2,4,6,7,9,10,15},{1,2,4,6,7,9,11},{1,2,4,6,7,9,11,12},{1,2,4,6,7,9,11,12,13},{1,2,4,6,7,9,11,12,13,14},{1,2,4,6,7,9,11,12,13,14,15},{1,2,4,6,7,9,11,12,13,15},{1,2,4,6,7,9,11,12,14},{1,2,4,6,7,9,11,12,14,15},{1,2,4,6,7,9,11,12,15},{1,2,4,6,7,9,11,13},{1,2,4,6,7,9,11,13,14},{1,2,4,6,7,9,11,13,14,15},{1,2,4,6,7,9,11,13,15},{1,2,4,6,7,9,11,14},{1,2,4,6,7,9,11,14,15},{1,2,4,6,7,9,11,15},{1,2,4,6,7,9,12},{1,2,4,6,7,9,12,13},{1,2,4,6,7,9,12,13,14},{1,2,4,6,7,9,12,13,14,15},{1,2,4,6,7,9,12,13,15},{1,2,4,6,7,9,12,14},{1,2,4,6,7,9,12,14,15},{1,2,4,6,7,9,12,15},{1,2,4,6,7,9,13},{1,2,4,6,7,9,13,14},{1,2,4,6,7,9,13,14,15},{1,2,4,6,7,9,13,15},{1,2,4,6,7,9,14},{1,2,4,6,7,9,14,15},{1,2,4,6,7,9,15},{1,2,4,6,7,10},{1,2,4,6,7,10,11},{1,2,4,6,7,10,11,12},{1,2,4,6,7,10,11,12,13},{1,2,4,6,7,10,11,12,13,14},{1,2,4,6,7,10,11,12,13,14,15},{1,2,4,6,7,10,11,12,13,15},{1,2,4,6,7,10,11,12,14},{1,2,4,6,7,10,11,12,14,15},{1,2,4,6,7,10,11,12,15},{1,2,4,6,7,10,11,13},{1,2,4,6,7,10,11,13,14},{1,2,4,6,7,10,11,13,14,15},{1,2,4,6,7,10,11,13,15},{1,2,4,6,7,10,11,14},{1,2,4,6,7,10,11,14,15},{1,2,4,6,7,10,11,15},{1,2,4,6,7,10,12},{1,2,4,6,7,10,12,13},{1,2,4,6,7,10,12,13,14},{1,2,4,6,7,10,12,13,14,15},{1,2,4,6,7,10,12,13,15},{1,2,4,6,7,10,12,14},{1,2,4,6,7,10,12,14,15},{1,2,4,6,7,10,12,15},{1,2,4,6,7,10,13},{1,2,4,6,7,10,13,14},{1,2,4,6,7,10,13,14,15},{1,2,4,6,7,10,13,15},{1,2,4,6,7,10,14},{1,2,4,6,7,10,14,15},{1,2,4,6,7,10,15},{1,2,4,6,7,11},{1,2,4,6,7,11,12},{1,2,4,6,7,11,12,13},{1,2,4,6,7,11,12,13,14},{1,2,4,6,7,11,12,13,14,15},{1,2,4,6,7,11,12,13,15},{1,2,4,6,7,11,12,14},{1,2,4,6,7,11,12,14,15},{1,2,4,6,7,11,12,15},{1,2,4,6,7,11,13},{1,2,4,6,7,11,13,14},{1,2,4,6,7,11,13,14,15},{1,2,4,6,7,11,13,15},{1,2,4,6,7,11,14},{1,2,4,6,7,11,14,15},{1,2,4,6,7,11,15},{1,2,4,6,7,12},{1,2,4,6,7,12,13},{1,2,4,6,7,12,13,14},{1,2,4,6,7,12,13,14,15},{1,2,4,6,7,12,13,15},{1,2,4,6,7,12,14},{1,2,4,6,7,12,14,15},{1,2,4,6,7,12,15},{1,2,4,6,7,13},{1,2,4,6,7,13,14},{1,2,4,6,7,13,14,15},{1,2,4,6,7,13,15},{1,2,4,6,7,14},{1,2,4,6,7,14,15},{1,2,4,6,7,15},{1,2,4,6,8},{1,2,4,6,8,9},{1,2,4,6,8,9,10},{1,2,4,6,8,9,10,11},{1,2,4,6,8,9,10,11,12},{1,2,4,6,8,9,10,11,12,13},{1,2,4,6,8,9,10,11,12,13,14},{1,2,4,6,8,9,10,11,12,13,14,15},{1,2,4,6,8,9,10,11,12,13,15},{1,2,4,6,8,9,10,11,12,14},{1,2,4,6,8,9,10,11,12,14,15},{1,2,4,6,8,9,10,11,12,15},{1,2,4,6,8,9,10,11,13},{1,2,4,6,8,9,10,11,13,14},{1,2,4,6,8,9,10,11,13,14,15},{1,2,4,6,8,9,10,11,13,15},{1,2,4,6,8,9,10,11,14},{1,2,4,6,8,9,10,11,14,15},{1,2,4,6,8,9,10,11,15},{1,2,4,6,8,9,10,12},{1,2,4,6,8,9,10,12,13},{1,2,4,6,8,9,10,12,13,14},{1,2,4,6,8,9,10,12,13,14,15},{1,2,4,6,8,9,10,12,13,15},{1,2,4,6,8,9,10,12,14},{1,2,4,6,8,9,10,12,14,15},{1,2,4,6,8,9,10,12,15},{1,2,4,6,8,9,10,13},{1,2,4,6,8,9,10,13,14},{1,2,4,6,8,9,10,13,14,15},{1,2,4,6,8,9,10,13,15},{1,2,4,6,8,9,10,14},{1,2,4,6,8,9,10,14,15},{1,2,4,6,8,9,10,15},{1,2,4,6,8,9,11},{1,2,4,6,8,9,11,12},{1,2,4,6,8,9,11,12,13},{1,2,4,6,8,9,11,12,13,14},{1,2,4,6,8,9,11,12,13,14,15},{1,2,4,6,8,9,11,12,13,15},{1,2,4,6,8,9,11,12,14},{1,2,4,6,8,9,11,12,14,15},{1,2,4,6,8,9,11,12,15},{1,2,4,6,8,9,11,13},{1,2,4,6,8,9,11,13,14},{1,2,4,6,8,9,11,13,14,15},{1,2,4,6,8,9,11,13,15},{1,2,4,6,8,9,11,14},{1,2,4,6,8,9,11,14,15},{1,2,4,6,8,9,11,15},{1,2,4,6,8,9,12},{1,2,4,6,8,9,12,13},{1,2,4,6,8,9,12,13,14},{1,2,4,6,8,9,12,13,14,15},{1,2,4,6,8,9,12,13,15},{1,2,4,6,8,9,12,14},{1,2,4,6,8,9,12,14,15},{1,2,4,6,8,9,12,15},{1,2,4,6,8,9,13},{1,2,4,6,8,9,13,14},{1,2,4,6,8,9,13,14,15},{1,2,4,6,8,9,13,15},{1,2,4,6,8,9,14},{1,2,4,6,8,9,14,15},{1,2,4,6,8,9,15},{1,2,4,6,8,10},{1,2,4,6,8,10,11},{1,2,4,6,8,10,11,12},{1,2,4,6,8,10,11,12,13},{1,2,4,6,8,10,11,12,13,14},{1,2,4,6,8,10,11,12,13,14,15},{1,2,4,6,8,10,11,12,13,15},{1,2,4,6,8,10,11,12,14},{1,2,4,6,8,10,11,12,14,15},{1,2,4,6,8,10,11,12,15},{1,2,4,6,8,10,11,13},{1,2,4,6,8,10,11,13,14},{1,2,4,6,8,10,11,13,14,15},{1,2,4,6,8,10,11,13,15},{1,2,4,6,8,10,11,14},{1,2,4,6,8,10,11,14,15},{1,2,4,6,8,10,11,15},{1,2,4,6,8,10,12},{1,2,4,6,8,10,12,13},{1,2,4,6,8,10,12,13,14},{1,2,4,6,8,10,12,13,14,15},{1,2,4,6,8,10,12,13,15},{1,2,4,6,8,10,12,14},{1,2,4,6,8,10,12,14,15},{1,2,4,6,8,10,12,15},{1,2,4,6,8,10,13},{1,2,4,6,8,10,13,14},{1,2,4,6,8,10,13,14,15},{1,2,4,6,8,10,13,15},{1,2,4,6,8,10,14},{1,2,4,6,8,10,14,15},{1,2,4,6,8,10,15},{1,2,4,6,8,11},{1,2,4,6,8,11,12},{1,2,4,6,8,11,12,13},{1,2,4,6,8,11,12,13,14},{1,2,4,6,8,11,12,13,14,15},{1,2,4,6,8,11,12,13,15},{1,2,4,6,8,11,12,14},{1,2,4,6,8,11,12,14,15},{1,2,4,6,8,11,12,15},{1,2,4,6,8,11,13},{1,2,4,6,8,11,13,14},{1,2,4,6,8,11,13,14,15},{1,2,4,6,8,11,13,15},{1,2,4,6,8,11,14},{1,2,4,6,8,11,14,15},{1,2,4,6,8,11,15},{1,2,4,6,8,12},{1,2,4,6,8,12,13},{1,2,4,6,8,12,13,14},{1,2,4,6,8,12,13,14,15},{1,2,4,6,8,12,13,15},{1,2,4,6,8,12,14},{1,2,4,6,8,12,14,15},{1,2,4,6,8,12,15},{1,2,4,6,8,13},{1,2,4,6,8,13,14},{1,2,4,6,8,13,14,15},{1,2,4,6,8,13,15},{1,2,4,6,8,14},{1,2,4,6,8,14,15},{1,2,4,6,8,15},{1,2,4,6,9},{1,2,4,6,9,10},{1,2,4,6,9,10,11},{1,2,4,6,9,10,11,12},{1,2,4,6,9,10,11,12,13},{1,2,4,6,9,10,11,12,13,14},{1,2,4,6,9,10,11,12,13,14,15},{1,2,4,6,9,10,11,12,13,15},{1,2,4,6,9,10,11,12,14},{1,2,4,6,9,10,11,12,14,15},{1,2,4,6,9,10,11,12,15},{1,2,4,6,9,10,11,13},{1,2,4,6,9,10,11,13,14},{1,2,4,6,9,10,11,13,14,15},{1,2,4,6,9,10,11,13,15},{1,2,4,6,9,10,11,14},{1,2,4,6,9,10,11,14,15},{1,2,4,6,9,10,11,15},{1,2,4,6,9,10,12},{1,2,4,6,9,10,12,13},{1,2,4,6,9,10,12,13,14},{1,2,4,6,9,10,12,13,14,15},{1,2,4,6,9,10,12,13,15},{1,2,4,6,9,10,12,14},{1,2,4,6,9,10,12,14,15},{1,2,4,6,9,10,12,15},{1,2,4,6,9,10,13},{1,2,4,6,9,10,13,14},{1,2,4,6,9,10,13,14,15},{1,2,4,6,9,10,13,15},{1,2,4,6,9,10,14},{1,2,4,6,9,10,14,15},{1,2,4,6,9,10,15},{1,2,4,6,9,11},{1,2,4,6,9,11,12},{1,2,4,6,9,11,12,13},{1,2,4,6,9,11,12,13,14},{1,2,4,6,9,11,12,13,14,15},{1,2,4,6,9,11,12,13,15},{1,2,4,6,9,11,12,14},{1,2,4,6,9,11,12,14,15},{1,2,4,6,9,11,12,15},{1,2,4,6,9,11,13},{1,2,4,6,9,11,13,14},{1,2,4,6,9,11,13,14,15},{1,2,4,6,9,11,13,15},{1,2,4,6,9,11,14},{1,2,4,6,9,11,14,15},{1,2,4,6,9,11,15},{1,2,4,6,9,12},{1,2,4,6,9,12,13},{1,2,4,6,9,12,13,14},{1,2,4,6,9,12,13,14,15},{1,2,4,6,9,12,13,15},{1,2,4,6,9,12,14},{1,2,4,6,9,12,14,15},{1,2,4,6,9,12,15},{1,2,4,6,9,13},{1,2,4,6,9,13,14},{1,2,4,6,9,13,14,15},{1,2,4,6,9,13,15},{1,2,4,6,9,14},{1,2,4,6,9,14,15},{1,2,4,6,9,15},{1,2,4,6,10},{1,2,4,6,10,11},{1,2,4,6,10,11,12},{1,2,4,6,10,11,12,13},{1,2,4,6,10,11,12,13,14},{1,2,4,6,10,11,12,13,14,15},{1,2,4,6,10,11,12,13,15},{1,2,4,6,10,11,12,14},{1,2,4,6,10,11,12,14,15},{1,2,4,6,10,11,12,15},{1,2,4,6,10,11,13},{1,2,4,6,10,11,13,14},{1,2,4,6,10,11,13,14,15},{1,2,4,6,10,11,13,15},{1,2,4,6,10,11,14},{1,2,4,6,10,11,14,15},{1,2,4,6,10,11,15},{1,2,4,6,10,12},{1,2,4,6,10,12,13},{1,2,4,6,10,12,13,14},{1,2,4,6,10,12,13,14,15},{1,2,4,6,10,12,13,15},{1,2,4,6,10,12,14},{1,2,4,6,10,12,14,15},{1,2,4,6,10,12,15},{1,2,4,6,10,13},{1,2,4,6,10,13,14},{1,2,4,6,10,13,14,15},{1,2,4,6,10,13,15},{1,2,4,6,10,14},{1,2,4,6,10,14,15},{1,2,4,6,10,15},{1,2,4,6,11},{1,2,4,6,11,12},{1,2,4,6,11,12,13},{1,2,4,6,11,12,13,14},{1,2,4,6,11,12,13,14,15},{1,2,4,6,11,12,13,15},{1,2,4,6,11,12,14},{1,2,4,6,11,12,14,15},{1,2,4,6,11,12,15},{1,2,4,6,11,13},{1,2,4,6,11,13,14},{1,2,4,6,11,13,14,15},{1,2,4,6,11,13,15},{1,2,4,6,11,14},{1,2,4,6,11,14,15},{1,2,4,6,11,15},{1,2,4,6,12},{1,2,4,6,12,13},{1,2,4,6,12,13,14},{1,2,4,6,12,13,14,15},{1,2,4,6,12,13,15},{1,2,4,6,12,14},{1,2,4,6,12,14,15},{1,2,4,6,12,15},{1,2,4,6,13},{1,2,4,6,13,14},{1,2,4,6,13,14,15},{1,2,4,6,13,15},{1,2,4,6,14},{1,2,4,6,14,15},{1,2,4,6,15},{1,2,4,7},{1,2,4,7,8},{1,2,4,7,8,9},{1,2,4,7,8,9,10},{1,2,4,7,8,9,10,11},{1,2,4,7,8,9,10,11,12},{1,2,4,7,8,9,10,11,12,13},{1,2,4,7,8,9,10,11,12,13,14},{1,2,4,7,8,9,10,11,12,13,14,15},{1,2,4,7,8,9,10,11,12,13,15},{1,2,4,7,8,9,10,11,12,14},{1,2,4,7,8,9,10,11,12,14,15},{1,2,4,7,8,9,10,11,12,15},{1,2,4,7,8,9,10,11,13},{1,2,4,7,8,9,10,11,13,14},{1,2,4,7,8,9,10,11,13,14,15},{1,2,4,7,8,9,10,11,13,15},{1,2,4,7,8,9,10,11,14},{1,2,4,7,8,9,10,11,14,15},{1,2,4,7,8,9,10,11,15},{1,2,4,7,8,9,10,12},{1,2,4,7,8,9,10,12,13},{1,2,4,7,8,9,10,12,13,14},{1,2,4,7,8,9,10,12,13,14,15},{1,2,4,7,8,9,10,12,13,15},{1,2,4,7,8,9,10,12,14},{1,2,4,7,8,9,10,12,14,15},{1,2,4,7,8,9,10,12,15},{1,2,4,7,8,9,10,13},{1,2,4,7,8,9,10,13,14},{1,2,4,7,8,9,10,13,14,15},{1,2,4,7,8,9,10,13,15},{1,2,4,7,8,9,10,14},{1,2,4,7,8,9,10,14,15},{1,2,4,7,8,9,10,15},{1,2,4,7,8,9,11},{1,2,4,7,8,9,11,12},{1,2,4,7,8,9,11,12,13},{1,2,4,7,8,9,11,12,13,14},{1,2,4,7,8,9,11,12,13,14,15},{1,2,4,7,8,9,11,12,13,15},{1,2,4,7,8,9,11,12,14},{1,2,4,7,8,9,11,12,14,15},{1,2,4,7,8,9,11,12,15},{1,2,4,7,8,9,11,13},{1,2,4,7,8,9,11,13,14},{1,2,4,7,8,9,11,13,14,15},{1,2,4,7,8,9,11,13,15},{1,2,4,7,8,9,11,14},{1,2,4,7,8,9,11,14,15},{1,2,4,7,8,9,11,15},{1,2,4,7,8,9,12},{1,2,4,7,8,9,12,13},{1,2,4,7,8,9,12,13,14},{1,2,4,7,8,9,12,13,14,15},{1,2,4,7,8,9,12,13,15},{1,2,4,7,8,9,12,14},{1,2,4,7,8,9,12,14,15},{1,2,4,7,8,9,12,15},{1,2,4,7,8,9,13},{1,2,4,7,8,9,13,14},{1,2,4,7,8,9,13,14,15},{1,2,4,7,8,9,13,15},{1,2,4,7,8,9,14},{1,2,4,7,8,9,14,15},{1,2,4,7,8,9,15},{1,2,4,7,8,10},{1,2,4,7,8,10,11},{1,2,4,7,8,10,11,12},{1,2,4,7,8,10,11,12,13},{1,2,4,7,8,10,11,12,13,14},{1,2,4,7,8,10,11,12,13,14,15},{1,2,4,7,8,10,11,12,13,15},{1,2,4,7,8,10,11,12,14},{1,2,4,7,8,10,11,12,14,15},{1,2,4,7,8,10,11,12,15},{1,2,4,7,8,10,11,13},{1,2,4,7,8,10,11,13,14},{1,2,4,7,8,10,11,13,14,15},{1,2,4,7,8,10,11,13,15},{1,2,4,7,8,10,11,14},{1,2,4,7,8,10,11,14,15},{1,2,4,7,8,10,11,15},{1,2,4,7,8,10,12},{1,2,4,7,8,10,12,13},{1,2,4,7,8,10,12,13,14},{1,2,4,7,8,10,12,13,14,15},{1,2,4,7,8,10,12,13,15},{1,2,4,7,8,10,12,14},{1,2,4,7,8,10,12,14,15},{1,2,4,7,8,10,12,15},{1,2,4,7,8,10,13},{1,2,4,7,8,10,13,14},{1,2,4,7,8,10,13,14,15},{1,2,4,7,8,10,13,15},{1,2,4,7,8,10,14},{1,2,4,7,8,10,14,15},{1,2,4,7,8,10,15},{1,2,4,7,8,11},{1,2,4,7,8,11,12},{1,2,4,7,8,11,12,13},{1,2,4,7,8,11,12,13,14},{1,2,4,7,8,11,12,13,14,15},{1,2,4,7,8,11,12,13,15},{1,2,4,7,8,11,12,14},{1,2,4,7,8,11,12,14,15},{1,2,4,7,8,11,12,15},{1,2,4,7,8,11,13},{1,2,4,7,8,11,13,14},{1,2,4,7,8,11,13,14,15},{1,2,4,7,8,11,13,15},{1,2,4,7,8,11,14},{1,2,4,7,8,11,14,15},{1,2,4,7,8,11,15},{1,2,4,7,8,12},{1,2,4,7,8,12,13},{1,2,4,7,8,12,13,14},{1,2,4,7,8,12,13,14,15},{1,2,4,7,8,12,13,15},{1,2,4,7,8,12,14},{1,2,4,7,8,12,14,15},{1,2,4,7,8,12,15},{1,2,4,7,8,13},{1,2,4,7,8,13,14},{1,2,4,7,8,13,14,15},{1,2,4,7,8,13,15},{1,2,4,7,8,14},{1,2,4,7,8,14,15},{1,2,4,7,8,15},{1,2,4,7,9},{1,2,4,7,9,10},{1,2,4,7,9,10,11},{1,2,4,7,9,10,11,12},{1,2,4,7,9,10,11,12,13},{1,2,4,7,9,10,11,12,13,14},{1,2,4,7,9,10,11,12,13,14,15},{1,2,4,7,9,10,11,12,13,15},{1,2,4,7,9,10,11,12,14},{1,2,4,7,9,10,11,12,14,15},{1,2,4,7,9,10,11,12,15},{1,2,4,7,9,10,11,13},{1,2,4,7,9,10,11,13,14},{1,2,4,7,9,10,11,13,14,15},{1,2,4,7,9,10,11,13,15},{1,2,4,7,9,10,11,14},{1,2,4,7,9,10,11,14,15},{1,2,4,7,9,10,11,15},{1,2,4,7,9,10,12},{1,2,4,7,9,10,12,13},{1,2,4,7,9,10,12,13,14},{1,2,4,7,9,10,12,13,14,15},{1,2,4,7,9,10,12,13,15},{1,2,4,7,9,10,12,14},{1,2,4,7,9,10,12,14,15},{1,2,4,7,9,10,12,15},{1,2,4,7,9,10,13},{1,2,4,7,9,10,13,14},{1,2,4,7,9,10,13,14,15},{1,2,4,7,9,10,13,15},{1,2,4,7,9,10,14},{1,2,4,7,9,10,14,15},{1,2,4,7,9,10,15},{1,2,4,7,9,11},{1,2,4,7,9,11,12},{1,2,4,7,9,11,12,13},{1,2,4,7,9,11,12,13,14},{1,2,4,7,9,11,12,13,14,15},{1,2,4,7,9,11,12,13,15},{1,2,4,7,9,11,12,14},{1,2,4,7,9,11,12,14,15},{1,2,4,7,9,11,12,15},{1,2,4,7,9,11,13},{1,2,4,7,9,11,13,14},{1,2,4,7,9,11,13,14,15},{1,2,4,7,9,11,13,15},{1,2,4,7,9,11,14},{1,2,4,7,9,11,14,15},{1,2,4,7,9,11,15},{1,2,4,7,9,12},{1,2,4,7,9,12,13},{1,2,4,7,9,12,13,14},{1,2,4,7,9,12,13,14,15},{1,2,4,7,9,12,13,15},{1,2,4,7,9,12,14},{1,2,4,7,9,12,14,15},{1,2,4,7,9,12,15},{1,2,4,7,9,13},{1,2,4,7,9,13,14},{1,2,4,7,9,13,14,15},{1,2,4,7,9,13,15},{1,2,4,7,9,14},{1,2,4,7,9,14,15},{1,2,4,7,9,15},{1,2,4,7,10},{1,2,4,7,10,11},{1,2,4,7,10,11,12},{1,2,4,7,10,11,12,13},{1,2,4,7,10,11,12,13,14},{1,2,4,7,10,11,12,13,14,15},{1,2,4,7,10,11,12,13,15},{1,2,4,7,10,11,12,14},{1,2,4,7,10,11,12,14,15},{1,2,4,7,10,11,12,15},{1,2,4,7,10,11,13},{1,2,4,7,10,11,13,14},{1,2,4,7,10,11,13,14,15},{1,2,4,7,10,11,13,15},{1,2,4,7,10,11,14},{1,2,4,7,10,11,14,15},{1,2,4,7,10,11,15},{1,2,4,7,10,12},{1,2,4,7,10,12,13},{1,2,4,7,10,12,13,14},{1,2,4,7,10,12,13,14,15},{1,2,4,7,10,12,13,15},{1,2,4,7,10,12,14},{1,2,4,7,10,12,14,15},{1,2,4,7,10,12,15},{1,2,4,7,10,13},{1,2,4,7,10,13,14},{1,2,4,7,10,13,14,15},{1,2,4,7,10,13,15},{1,2,4,7,10,14},{1,2,4,7,10,14,15},{1,2,4,7,10,15},{1,2,4,7,11},{1,2,4,7,11,12},{1,2,4,7,11,12,13},{1,2,4,7,11,12,13,14},{1,2,4,7,11,12,13,14,15},{1,2,4,7,11,12,13,15},{1,2,4,7,11,12,14},{1,2,4,7,11,12,14,15},{1,2,4,7,11,12,15},{1,2,4,7,11,13},{1,2,4,7,11,13,14},{1,2,4,7,11,13,14,15},{1,2,4,7,11,13,15},{1,2,4,7,11,14},{1,2,4,7,11,14,15},{1,2,4,7,11,15},{1,2,4,7,12},{1,2,4,7,12,13},{1,2,4,7,12,13,14},{1,2,4,7,12,13,14,15},{1,2,4,7,12,13,15},{1,2,4,7,12,14},{1,2,4,7,12,14,15},{1,2,4,7,12,15},{1,2,4,7,13},{1,2,4,7,13,14},{1,2,4,7,13,14,15},{1,2,4,7,13,15},{1,2,4,7,14},{1,2,4,7,14,15},{1,2,4,7,15},{1,2,4,8},{1,2,4,8,9},{1,2,4,8,9,10},{1,2,4,8,9,10,11},{1,2,4,8,9,10,11,12},{1,2,4,8,9,10,11,12,13},{1,2,4,8,9,10,11,12,13,14},{1,2,4,8,9,10,11,12,13,14,15},{1,2,4,8,9,10,11,12,13,15},{1,2,4,8,9,10,11,12,14},{1,2,4,8,9,10,11,12,14,15},{1,2,4,8,9,10,11,12,15},{1,2,4,8,9,10,11,13},{1,2,4,8,9,10,11,13,14},{1,2,4,8,9,10,11,13,14,15},{1,2,4,8,9,10,11,13,15},{1,2,4,8,9,10,11,14},{1,2,4,8,9,10,11,14,15},{1,2,4,8,9,10,11,15},{1,2,4,8,9,10,12},{1,2,4,8,9,10,12,13},{1,2,4,8,9,10,12,13,14},{1,2,4,8,9,10,12,13,14,15},{1,2,4,8,9,10,12,13,15},{1,2,4,8,9,10,12,14},{1,2,4,8,9,10,12,14,15},{1,2,4,8,9,10,12,15},{1,2,4,8,9,10,13},{1,2,4,8,9,10,13,14},{1,2,4,8,9,10,13,14,15},{1,2,4,8,9,10,13,15},{1,2,4,8,9,10,14},{1,2,4,8,9,10,14,15},{1,2,4,8,9,10,15},{1,2,4,8,9,11},{1,2,4,8,9,11,12},{1,2,4,8,9,11,12,13},{1,2,4,8,9,11,12,13,14},{1,2,4,8,9,11,12,13,14,15},{1,2,4,8,9,11,12,13,15},{1,2,4,8,9,11,12,14},{1,2,4,8,9,11,12,14,15},{1,2,4,8,9,11,12,15},{1,2,4,8,9,11,13},{1,2,4,8,9,11,13,14},{1,2,4,8,9,11,13,14,15},{1,2,4,8,9,11,13,15},{1,2,4,8,9,11,14},{1,2,4,8,9,11,14,15},{1,2,4,8,9,11,15},{1,2,4,8,9,12},{1,2,4,8,9,12,13},{1,2,4,8,9,12,13,14},{1,2,4,8,9,12,13,14,15},{1,2,4,8,9,12,13,15},{1,2,4,8,9,12,14},{1,2,4,8,9,12,14,15},{1,2,4,8,9,12,15},{1,2,4,8,9,13},{1,2,4,8,9,13,14},{1,2,4,8,9,13,14,15},{1,2,4,8,9,13,15},{1,2,4,8,9,14},{1,2,4,8,9,14,15},{1,2,4,8,9,15},{1,2,4,8,10},{1,2,4,8,10,11},{1,2,4,8,10,11,12},{1,2,4,8,10,11,12,13},{1,2,4,8,10,11,12,13,14},{1,2,4,8,10,11,12,13,14,15},{1,2,4,8,10,11,12,13,15},{1,2,4,8,10,11,12,14},{1,2,4,8,10,11,12,14,15},{1,2,4,8,10,11,12,15},{1,2,4,8,10,11,13},{1,2,4,8,10,11,13,14},{1,2,4,8,10,11,13,14,15},{1,2,4,8,10,11,13,15},{1,2,4,8,10,11,14},{1,2,4,8,10,11,14,15},{1,2,4,8,10,11,15},{1,2,4,8,10,12},{1,2,4,8,10,12,13},{1,2,4,8,10,12,13,14},{1,2,4,8,10,12,13,14,15},{1,2,4,8,10,12,13,15},{1,2,4,8,10,12,14},{1,2,4,8,10,12,14,15},{1,2,4,8,10,12,15},{1,2,4,8,10,13},{1,2,4,8,10,13,14},{1,2,4,8,10,13,14,15},{1,2,4,8,10,13,15},{1,2,4,8,10,14},{1,2,4,8,10,14,15},{1,2,4,8,10,15},{1,2,4,8,11},{1,2,4,8,11,12},{1,2,4,8,11,12,13},{1,2,4,8,11,12,13,14},{1,2,4,8,11,12,13,14,15},{1,2,4,8,11,12,13,15},{1,2,4,8,11,12,14},{1,2,4,8,11,12,14,15},{1,2,4,8,11,12,15},{1,2,4,8,11,13},{1,2,4,8,11,13,14},{1,2,4,8,11,13,14,15},{1,2,4,8,11,13,15},{1,2,4,8,11,14},{1,2,4,8,11,14,15},{1,2,4,8,11,15},{1,2,4,8,12},{1,2,4,8,12,13},{1,2,4,8,12,13,14},{1,2,4,8,12,13,14,15},{1,2,4,8,12,13,15},{1,2,4,8,12,14},{1,2,4,8,12,14,15},{1,2,4,8,12,15},{1,2,4,8,13},{1,2,4,8,13,14},{1,2,4,8,13,14,15},{1,2,4,8,13,15},{1,2,4,8,14},{1,2,4,8,14,15},{1,2,4,8,15},{1,2,4,9},{1,2,4,9,10},{1,2,4,9,10,11},{1,2,4,9,10,11,12},{1,2,4,9,10,11,12,13},{1,2,4,9,10,11,12,13,14},{1,2,4,9,10,11,12,13,14,15},{1,2,4,9,10,11,12,13,15},{1,2,4,9,10,11,12,14},{1,2,4,9,10,11,12,14,15},{1,2,4,9,10,11,12,15},{1,2,4,9,10,11,13},{1,2,4,9,10,11,13,14},{1,2,4,9,10,11,13,14,15},{1,2,4,9,10,11,13,15},{1,2,4,9,10,11,14},{1,2,4,9,10,11,14,15},{1,2,4,9,10,11,15},{1,2,4,9,10,12},{1,2,4,9,10,12,13},{1,2,4,9,10,12,13,14},{1,2,4,9,10,12,13,14,15},{1,2,4,9,10,12,13,15},{1,2,4,9,10,12,14},{1,2,4,9,10,12,14,15},{1,2,4,9,10,12,15},{1,2,4,9,10,13},{1,2,4,9,10,13,14},{1,2,4,9,10,13,14,15},{1,2,4,9,10,13,15},{1,2,4,9,10,14},{1,2,4,9,10,14,15},{1,2,4,9,10,15},{1,2,4,9,11},{1,2,4,9,11,12},{1,2,4,9,11,12,13},{1,2,4,9,11,12,13,14},{1,2,4,9,11,12,13,14,15},{1,2,4,9,11,12,13,15},{1,2,4,9,11,12,14},{1,2,4,9,11,12,14,15},{1,2,4,9,11,12,15},{1,2,4,9,11,13},{1,2,4,9,11,13,14},{1,2,4,9,11,13,14,15},{1,2,4,9,11,13,15},{1,2,4,9,11,14},{1,2,4,9,11,14,15},{1,2,4,9,11,15},{1,2,4,9,12},{1,2,4,9,12,13},{1,2,4,9,12,13,14},{1,2,4,9,12,13,14,15},{1,2,4,9,12,13,15},{1,2,4,9,12,14},{1,2,4,9,12,14,15},{1,2,4,9,12,15},{1,2,4,9,13},{1,2,4,9,13,14},{1,2,4,9,13,14,15},{1,2,4,9,13,15},{1,2,4,9,14},{1,2,4,9,14,15},{1,2,4,9,15},{1,2,4,10},{1,2,4,10,11},{1,2,4,10,11,12},{1,2,4,10,11,12,13},{1,2,4,10,11,12,13,14},{1,2,4,10,11,12,13,14,15},{1,2,4,10,11,12,13,15},{1,2,4,10,11,12,14},{1,2,4,10,11,12,14,15},{1,2,4,10,11,12,15},{1,2,4,10,11,13},{1,2,4,10,11,13,14},{1,2,4,10,11,13,14,15},{1,2,4,10,11,13,15},{1,2,4,10,11,14},{1,2,4,10,11,14,15},{1,2,4,10,11,15},{1,2,4,10,12},{1,2,4,10,12,13},{1,2,4,10,12,13,14},{1,2,4,10,12,13,14,15},{1,2,4,10,12,13,15},{1,2,4,10,12,14},{1,2,4,10,12,14,15},{1,2,4,10,12,15},{1,2,4,10,13},{1,2,4,10,13,14},{1,2,4,10,13,14,15},{1,2,4,10,13,15},{1,2,4,10,14},{1,2,4,10,14,15},{1,2,4,10,15},{1,2,4,11},{1,2,4,11,12},{1,2,4,11,12,13},{1,2,4,11,12,13,14},{1,2,4,11,12,13,14,15},{1,2,4,11,12,13,15},{1,2,4,11,12,14},{1,2,4,11,12,14,15},{1,2,4,11,12,15},{1,2,4,11,13},{1,2,4,11,13,14},{1,2,4,11,13,14,15},{1,2,4,11,13,15},{1,2,4,11,14},{1,2,4,11,14,15},{1,2,4,11,15},{1,2,4,12},{1,2,4,12,13},{1,2,4,12,13,14},{1,2,4,12,13,14,15},{1,2,4,12,13,15},{1,2,4,12,14},{1,2,4,12,14,15},{1,2,4,12,15},{1,2,4,13},{1,2,4,13,14},{1,2,4,13,14,15},{1,2,4,13,15},{1,2,4,14},{1,2,4,14,15},{1,2,4,15},{1,2,5},{1,2,5,6},{1,2,5,6,7},{1,2,5,6,7,8},{1,2,5,6,7,8,9},{1,2,5,6,7,8,9,10},{1,2,5,6,7,8,9,10,11},{1,2,5,6,7,8,9,10,11,12},{1,2,5,6,7,8,9,10,11,12,13},{1,2,5,6,7,8,9,10,11,12,13,14},{1,2,5,6,7,8,9,10,11,12,13,14,15},{1,2,5,6,7,8,9,10,11,12,13,15},{1,2,5,6,7,8,9,10,11,12,14},{1,2,5,6,7,8,9,10,11,12,14,15},{1,2,5,6,7,8,9,10,11,12,15},{1,2,5,6,7,8,9,10,11,13},{1,2,5,6,7,8,9,10,11,13,14},{1,2,5,6,7,8,9,10,11,13,14,15},{1,2,5,6,7,8,9,10,11,13,15},{1,2,5,6,7,8,9,10,11,14},{1,2,5,6,7,8,9,10,11,14,15},{1,2,5,6,7,8,9,10,11,15},{1,2,5,6,7,8,9,10,12},{1,2,5,6,7,8,9,10,12,13},{1,2,5,6,7,8,9,10,12,13,14},{1,2,5,6,7,8,9,10,12,13,14,15},{1,2,5,6,7,8,9,10,12,13,15},{1,2,5,6,7,8,9,10,12,14},{1,2,5,6,7,8,9,10,12,14,15},{1,2,5,6,7,8,9,10,12,15},{1,2,5,6,7,8,9,10,13},{1,2,5,6,7,8,9,10,13,14},{1,2,5,6,7,8,9,10,13,14,15},{1,2,5,6,7,8,9,10,13,15},{1,2,5,6,7,8,9,10,14},{1,2,5,6,7,8,9,10,14,15},{1,2,5,6,7,8,9,10,15},{1,2,5,6,7,8,9,11},{1,2,5,6,7,8,9,11,12},{1,2,5,6,7,8,9,11,12,13},{1,2,5,6,7,8,9,11,12,13,14},{1,2,5,6,7,8,9,11,12,13,14,15},{1,2,5,6,7,8,9,11,12,13,15},{1,2,5,6,7,8,9,11,12,14},{1,2,5,6,7,8,9,11,12,14,15},{1,2,5,6,7,8,9,11,12,15},{1,2,5,6,7,8,9,11,13},{1,2,5,6,7,8,9,11,13,14},{1,2,5,6,7,8,9,11,13,14,15},{1,2,5,6,7,8,9,11,13,15},{1,2,5,6,7,8,9,11,14},{1,2,5,6,7,8,9,11,14,15},{1,2,5,6,7,8,9,11,15},{1,2,5,6,7,8,9,12},{1,2,5,6,7,8,9,12,13},{1,2,5,6,7,8,9,12,13,14},{1,2,5,6,7,8,9,12,13,14,15},{1,2,5,6,7,8,9,12,13,15},{1,2,5,6,7,8,9,12,14},{1,2,5,6,7,8,9,12,14,15},{1,2,5,6,7,8,9,12,15},{1,2,5,6,7,8,9,13},{1,2,5,6,7,8,9,13,14},{1,2,5,6,7,8,9,13,14,15},{1,2,5,6,7,8,9,13,15},{1,2,5,6,7,8,9,14},{1,2,5,6,7,8,9,14,15},{1,2,5,6,7,8,9,15},{1,2,5,6,7,8,10},{1,2,5,6,7,8,10,11},{1,2,5,6,7,8,10,11,12},{1,2,5,6,7,8,10,11,12,13},{1,2,5,6,7,8,10,11,12,13,14},{1,2,5,6,7,8,10,11,12,13,14,15},{1,2,5,6,7,8,10,11,12,13,15},{1,2,5,6,7,8,10,11,12,14},{1,2,5,6,7,8,10,11,12,14,15},{1,2,5,6,7,8,10,11,12,15},{1,2,5,6,7,8,10,11,13},{1,2,5,6,7,8,10,11,13,14},{1,2,5,6,7,8,10,11,13,14,15},{1,2,5,6,7,8,10,11,13,15},{1,2,5,6,7,8,10,11,14},{1,2,5,6,7,8,10,11,14,15},{1,2,5,6,7,8,10,11,15},{1,2,5,6,7,8,10,12},{1,2,5,6,7,8,10,12,13},{1,2,5,6,7,8,10,12,13,14},{1,2,5,6,7,8,10,12,13,14,15},{1,2,5,6,7,8,10,12,13,15},{1,2,5,6,7,8,10,12,14},{1,2,5,6,7,8,10,12,14,15},{1,2,5,6,7,8,10,12,15},{1,2,5,6,7,8,10,13},{1,2,5,6,7,8,10,13,14},{1,2,5,6,7,8,10,13,14,15},{1,2,5,6,7,8,10,13,15},{1,2,5,6,7,8,10,14},{1,2,5,6,7,8,10,14,15},{1,2,5,6,7,8,10,15},{1,2,5,6,7,8,11},{1,2,5,6,7,8,11,12},{1,2,5,6,7,8,11,12,13},{1,2,5,6,7,8,11,12,13,14},{1,2,5,6,7,8,11,12,13,14,15},{1,2,5,6,7,8,11,12,13,15},{1,2,5,6,7,8,11,12,14},{1,2,5,6,7,8,11,12,14,15},{1,2,5,6,7,8,11,12,15},{1,2,5,6,7,8,11,13},{1,2,5,6,7,8,11,13,14},{1,2,5,6,7,8,11,13,14,15},{1,2,5,6,7,8,11,13,15},{1,2,5,6,7,8,11,14},{1,2,5,6,7,8,11,14,15},{1,2,5,6,7,8,11,15},{1,2,5,6,7,8,12},{1,2,5,6,7,8,12,13},{1,2,5,6,7,8,12,13,14},{1,2,5,6,7,8,12,13,14,15},{1,2,5,6,7,8,12,13,15},{1,2,5,6,7,8,12,14},{1,2,5,6,7,8,12,14,15},{1,2,5,6,7,8,12,15},{1,2,5,6,7,8,13},{1,2,5,6,7,8,13,14},{1,2,5,6,7,8,13,14,15},{1,2,5,6,7,8,13,15},{1,2,5,6,7,8,14},{1,2,5,6,7,8,14,15},{1,2,5,6,7,8,15},{1,2,5,6,7,9},{1,2,5,6,7,9,10},{1,2,5,6,7,9,10,11},{1,2,5,6,7,9,10,11,12},{1,2,5,6,7,9,10,11,12,13},{1,2,5,6,7,9,10,11,12,13,14},{1,2,5,6,7,9,10,11,12,13,14,15},{1,2,5,6,7,9,10,11,12,13,15},{1,2,5,6,7,9,10,11,12,14},{1,2,5,6,7,9,10,11,12,14,15},{1,2,5,6,7,9,10,11,12,15},{1,2,5,6,7,9,10,11,13},{1,2,5,6,7,9,10,11,13,14},{1,2,5,6,7,9,10,11,13,14,15},{1,2,5,6,7,9,10,11,13,15},{1,2,5,6,7,9,10,11,14},{1,2,5,6,7,9,10,11,14,15},{1,2,5,6,7,9,10,11,15},{1,2,5,6,7,9,10,12},{1,2,5,6,7,9,10,12,13},{1,2,5,6,7,9,10,12,13,14},{1,2,5,6,7,9,10,12,13,14,15},{1,2,5,6,7,9,10,12,13,15},{1,2,5,6,7,9,10,12,14},{1,2,5,6,7,9,10,12,14,15},{1,2,5,6,7,9,10,12,15},{1,2,5,6,7,9,10,13},{1,2,5,6,7,9,10,13,14},{1,2,5,6,7,9,10,13,14,15},{1,2,5,6,7,9,10,13,15},{1,2,5,6,7,9,10,14},{1,2,5,6,7,9,10,14,15},{1,2,5,6,7,9,10,15},{1,2,5,6,7,9,11},{1,2,5,6,7,9,11,12},{1,2,5,6,7,9,11,12,13},{1,2,5,6,7,9,11,12,13,14},{1,2,5,6,7,9,11,12,13,14,15},{1,2,5,6,7,9,11,12,13,15},{1,2,5,6,7,9,11,12,14},{1,2,5,6,7,9,11,12,14,15},{1,2,5,6,7,9,11,12,15},{1,2,5,6,7,9,11,13},{1,2,5,6,7,9,11,13,14},{1,2,5,6,7,9,11,13,14,15},{1,2,5,6,7,9,11,13,15},{1,2,5,6,7,9,11,14},{1,2,5,6,7,9,11,14,15},{1,2,5,6,7,9,11,15},{1,2,5,6,7,9,12},{1,2,5,6,7,9,12,13},{1,2,5,6,7,9,12,13,14},{1,2,5,6,7,9,12,13,14,15},{1,2,5,6,7,9,12,13,15},{1,2,5,6,7,9,12,14},{1,2,5,6,7,9,12,14,15},{1,2,5,6,7,9,12,15},{1,2,5,6,7,9,13},{1,2,5,6,7,9,13,14},{1,2,5,6,7,9,13,14,15},{1,2,5,6,7,9,13,15},{1,2,5,6,7,9,14},{1,2,5,6,7,9,14,15},{1,2,5,6,7,9,15},{1,2,5,6,7,10},{1,2,5,6,7,10,11},{1,2,5,6,7,10,11,12},{1,2,5,6,7,10,11,12,13},{1,2,5,6,7,10,11,12,13,14},{1,2,5,6,7,10,11,12,13,14,15},{1,2,5,6,7,10,11,12,13,15},{1,2,5,6,7,10,11,12,14},{1,2,5,6,7,10,11,12,14,15},{1,2,5,6,7,10,11,12,15},{1,2,5,6,7,10,11,13},{1,2,5,6,7,10,11,13,14},{1,2,5,6,7,10,11,13,14,15},{1,2,5,6,7,10,11,13,15},{1,2,5,6,7,10,11,14},{1,2,5,6,7,10,11,14,15},{1,2,5,6,7,10,11,15},{1,2,5,6,7,10,12},{1,2,5,6,7,10,12,13},{1,2,5,6,7,10,12,13,14},{1,2,5,6,7,10,12,13,14,15},{1,2,5,6,7,10,12,13,15},{1,2,5,6,7,10,12,14},{1,2,5,6,7,10,12,14,15},{1,2,5,6,7,10,12,15},{1,2,5,6,7,10,13},{1,2,5,6,7,10,13,14},{1,2,5,6,7,10,13,14,15},{1,2,5,6,7,10,13,15},{1,2,5,6,7,10,14},{1,2,5,6,7,10,14,15},{1,2,5,6,7,10,15},{1,2,5,6,7,11},{1,2,5,6,7,11,12},{1,2,5,6,7,11,12,13},{1,2,5,6,7,11,12,13,14},{1,2,5,6,7,11,12,13,14,15},{1,2,5,6,7,11,12,13,15},{1,2,5,6,7,11,12,14},{1,2,5,6,7,11,12,14,15},{1,2,5,6,7,11,12,15},{1,2,5,6,7,11,13},{1,2,5,6,7,11,13,14},{1,2,5,6,7,11,13,14,15},{1,2,5,6,7,11,13,15},{1,2,5,6,7,11,14},{1,2,5,6,7,11,14,15},{1,2,5,6,7,11,15},{1,2,5,6,7,12},{1,2,5,6,7,12,13},{1,2,5,6,7,12,13,14},{1,2,5,6,7,12,13,14,15},{1,2,5,6,7,12,13,15},{1,2,5,6,7,12,14},{1,2,5,6,7,12,14,15},{1,2,5,6,7,12,15},{1,2,5,6,7,13},{1,2,5,6,7,13,14},{1,2,5,6,7,13,14,15},{1,2,5,6,7,13,15},{1,2,5,6,7,14},{1,2,5,6,7,14,15},{1,2,5,6,7,15},{1,2,5,6,8},{1,2,5,6,8,9},{1,2,5,6,8,9,10},{1,2,5,6,8,9,10,11},{1,2,5,6,8,9,10,11,12},{1,2,5,6,8,9,10,11,12,13},{1,2,5,6,8,9,10,11,12,13,14},{1,2,5,6,8,9,10,11,12,13,14,15},{1,2,5,6,8,9,10,11,12,13,15},{1,2,5,6,8,9,10,11,12,14},{1,2,5,6,8,9,10,11,12,14,15},{1,2,5,6,8,9,10,11,12,15},{1,2,5,6,8,9,10,11,13},{1,2,5,6,8,9,10,11,13,14},{1,2,5,6,8,9,10,11,13,14,15},{1,2,5,6,8,9,10,11,13,15},{1,2,5,6,8,9,10,11,14},{1,2,5,6,8,9,10,11,14,15},{1,2,5,6,8,9,10,11,15},{1,2,5,6,8,9,10,12},{1,2,5,6,8,9,10,12,13},{1,2,5,6,8,9,10,12,13,14},{1,2,5,6,8,9,10,12,13,14,15},{1,2,5,6,8,9,10,12,13,15},{1,2,5,6,8,9,10,12,14},{1,2,5,6,8,9,10,12,14,15},{1,2,5,6,8,9,10,12,15},{1,2,5,6,8,9,10,13},{1,2,5,6,8,9,10,13,14},{1,2,5,6,8,9,10,13,14,15},{1,2,5,6,8,9,10,13,15},{1,2,5,6,8,9,10,14},{1,2,5,6,8,9,10,14,15},{1,2,5,6,8,9,10,15},{1,2,5,6,8,9,11},{1,2,5,6,8,9,11,12},{1,2,5,6,8,9,11,12,13},{1,2,5,6,8,9,11,12,13,14},{1,2,5,6,8,9,11,12,13,14,15},{1,2,5,6,8,9,11,12,13,15},{1,2,5,6,8,9,11,12,14},{1,2,5,6,8,9,11,12,14,15},{1,2,5,6,8,9,11,12,15},{1,2,5,6,8,9,11,13},{1,2,5,6,8,9,11,13,14},{1,2,5,6,8,9,11,13,14,15},{1,2,5,6,8,9,11,13,15},{1,2,5,6,8,9,11,14},{1,2,5,6,8,9,11,14,15},{1,2,5,6,8,9,11,15},{1,2,5,6,8,9,12},{1,2,5,6,8,9,12,13},{1,2,5,6,8,9,12,13,14},{1,2,5,6,8,9,12,13,14,15},{1,2,5,6,8,9,12,13,15},{1,2,5,6,8,9,12,14},{1,2,5,6,8,9,12,14,15},{1,2,5,6,8,9,12,15},{1,2,5,6,8,9,13},{1,2,5,6,8,9,13,14},{1,2,5,6,8,9,13,14,15},{1,2,5,6,8,9,13,15},{1,2,5,6,8,9,14},{1,2,5,6,8,9,14,15},{1,2,5,6,8,9,15},{1,2,5,6,8,10},{1,2,5,6,8,10,11},{1,2,5,6,8,10,11,12},{1,2,5,6,8,10,11,12,13},{1,2,5,6,8,10,11,12,13,14},{1,2,5,6,8,10,11,12,13,14,15},{1,2,5,6,8,10,11,12,13,15},{1,2,5,6,8,10,11,12,14},{1,2,5,6,8,10,11,12,14,15},{1,2,5,6,8,10,11,12,15},{1,2,5,6,8,10,11,13},{1,2,5,6,8,10,11,13,14},{1,2,5,6,8,10,11,13,14,15},{1,2,5,6,8,10,11,13,15},{1,2,5,6,8,10,11,14},{1,2,5,6,8,10,11,14,15},{1,2,5,6,8,10,11,15},{1,2,5,6,8,10,12},{1,2,5,6,8,10,12,13},{1,2,5,6,8,10,12,13,14},{1,2,5,6,8,10,12,13,14,15},{1,2,5,6,8,10,12,13,15},{1,2,5,6,8,10,12,14},{1,2,5,6,8,10,12,14,15},{1,2,5,6,8,10,12,15},{1,2,5,6,8,10,13},{1,2,5,6,8,10,13,14},{1,2,5,6,8,10,13,14,15},{1,2,5,6,8,10,13,15},{1,2,5,6,8,10,14},{1,2,5,6,8,10,14,15},{1,2,5,6,8,10,15},{1,2,5,6,8,11},{1,2,5,6,8,11,12},{1,2,5,6,8,11,12,13},{1,2,5,6,8,11,12,13,14},{1,2,5,6,8,11,12,13,14,15},{1,2,5,6,8,11,12,13,15},{1,2,5,6,8,11,12,14},{1,2,5,6,8,11,12,14,15},{1,2,5,6,8,11,12,15},{1,2,5,6,8,11,13},{1,2,5,6,8,11,13,14},{1,2,5,6,8,11,13,14,15},{1,2,5,6,8,11,13,15},{1,2,5,6,8,11,14},{1,2,5,6,8,11,14,15},{1,2,5,6,8,11,15},{1,2,5,6,8,12},{1,2,5,6,8,12,13},{1,2,5,6,8,12,13,14},{1,2,5,6,8,12,13,14,15},{1,2,5,6,8,12,13,15},{1,2,5,6,8,12,14},{1,2,5,6,8,12,14,15},{1,2,5,6,8,12,15},{1,2,5,6,8,13},{1,2,5,6,8,13,14},{1,2,5,6,8,13,14,15},{1,2,5,6,8,13,15},{1,2,5,6,8,14},{1,2,5,6,8,14,15},{1,2,5,6,8,15},{1,2,5,6,9},{1,2,5,6,9,10},{1,2,5,6,9,10,11},{1,2,5,6,9,10,11,12},{1,2,5,6,9,10,11,12,13},{1,2,5,6,9,10,11,12,13,14},{1,2,5,6,9,10,11,12,13,14,15},{1,2,5,6,9,10,11,12,13,15},{1,2,5,6,9,10,11,12,14},{1,2,5,6,9,10,11,12,14,15},{1,2,5,6,9,10,11,12,15},{1,2,5,6,9,10,11,13},{1,2,5,6,9,10,11,13,14},{1,2,5,6,9,10,11,13,14,15},{1,2,5,6,9,10,11,13,15},{1,2,5,6,9,10,11,14},{1,2,5,6,9,10,11,14,15},{1,2,5,6,9,10,11,15},{1,2,5,6,9,10,12},{1,2,5,6,9,10,12,13},{1,2,5,6,9,10,12,13,14},{1,2,5,6,9,10,12,13,14,15},{1,2,5,6,9,10,12,13,15},{1,2,5,6,9,10,12,14},{1,2,5,6,9,10,12,14,15},{1,2,5,6,9,10,12,15},{1,2,5,6,9,10,13},{1,2,5,6,9,10,13,14},{1,2,5,6,9,10,13,14,15},{1,2,5,6,9,10,13,15},{1,2,5,6,9,10,14},{1,2,5,6,9,10,14,15},{1,2,5,6,9,10,15},{1,2,5,6,9,11},{1,2,5,6,9,11,12},{1,2,5,6,9,11,12,13},{1,2,5,6,9,11,12,13,14},{1,2,5,6,9,11,12,13,14,15},{1,2,5,6,9,11,12,13,15},{1,2,5,6,9,11,12,14},{1,2,5,6,9,11,12,14,15},{1,2,5,6,9,11,12,15},{1,2,5,6,9,11,13},{1,2,5,6,9,11,13,14},{1,2,5,6,9,11,13,14,15},{1,2,5,6,9,11,13,15},{1,2,5,6,9,11,14},{1,2,5,6,9,11,14,15},{1,2,5,6,9,11,15},{1,2,5,6,9,12},{1,2,5,6,9,12,13},{1,2,5,6,9,12,13,14},{1,2,5,6,9,12,13,14,15},{1,2,5,6,9,12,13,15},{1,2,5,6,9,12,14},{1,2,5,6,9,12,14,15},{1,2,5,6,9,12,15},{1,2,5,6,9,13},{1,2,5,6,9,13,14},{1,2,5,6,9,13,14,15},{1,2,5,6,9,13,15},{1,2,5,6,9,14},{1,2,5,6,9,14,15},{1,2,5,6,9,15},{1,2,5,6,10},{1,2,5,6,10,11},{1,2,5,6,10,11,12},{1,2,5,6,10,11,12,13},{1,2,5,6,10,11,12,13,14},{1,2,5,6,10,11,12,13,14,15},{1,2,5,6,10,11,12,13,15},{1,2,5,6,10,11,12,14},{1,2,5,6,10,11,12,14,15},{1,2,5,6,10,11,12,15},{1,2,5,6,10,11,13},{1,2,5,6,10,11,13,14},{1,2,5,6,10,11,13,14,15},{1,2,5,6,10,11,13,15},{1,2,5,6,10,11,14},{1,2,5,6,10,11,14,15},{1,2,5,6,10,11,15},{1,2,5,6,10,12},{1,2,5,6,10,12,13},{1,2,5,6,10,12,13,14},{1,2,5,6,10,12,13,14,15},{1,2,5,6,10,12,13,15},{1,2,5,6,10,12,14},{1,2,5,6,10,12,14,15},{1,2,5,6,10,12,15},{1,2,5,6,10,13},{1,2,5,6,10,13,14},{1,2,5,6,10,13,14,15},{1,2,5,6,10,13,15},{1,2,5,6,10,14},{1,2,5,6,10,14,15},{1,2,5,6,10,15},{1,2,5,6,11},{1,2,5,6,11,12},{1,2,5,6,11,12,13},{1,2,5,6,11,12,13,14},{1,2,5,6,11,12,13,14,15},{1,2,5,6,11,12,13,15},{1,2,5,6,11,12,14},{1,2,5,6,11,12,14,15},{1,2,5,6,11,12,15},{1,2,5,6,11,13},{1,2,5,6,11,13,14},{1,2,5,6,11,13,14,15},{1,2,5,6,11,13,15},{1,2,5,6,11,14},{1,2,5,6,11,14,15},{1,2,5,6,11,15},{1,2,5,6,12},{1,2,5,6,12,13},{1,2,5,6,12,13,14},{1,2,5,6,12,13,14,15},{1,2,5,6,12,13,15},{1,2,5,6,12,14},{1,2,5,6,12,14,15},{1,2,5,6,12,15},{1,2,5,6,13},{1,2,5,6,13,14},{1,2,5,6,13,14,15},{1,2,5,6,13,15},{1,2,5,6,14},{1,2,5,6,14,15},{1,2,5,6,15},{1,2,5,7},{1,2,5,7,8},{1,2,5,7,8,9},{1,2,5,7,8,9,10},{1,2,5,7,8,9,10,11},{1,2,5,7,8,9,10,11,12},{1,2,5,7,8,9,10,11,12,13},{1,2,5,7,8,9,10,11,12,13,14},{1,2,5,7,8,9,10,11,12,13,14,15},{1,2,5,7,8,9,10,11,12,13,15},{1,2,5,7,8,9,10,11,12,14},{1,2,5,7,8,9,10,11,12,14,15},{1,2,5,7,8,9,10,11,12,15},{1,2,5,7,8,9,10,11,13},{1,2,5,7,8,9,10,11,13,14},{1,2,5,7,8,9,10,11,13,14,15},{1,2,5,7,8,9,10,11,13,15},{1,2,5,7,8,9,10,11,14},{1,2,5,7,8,9,10,11,14,15},{1,2,5,7,8,9,10,11,15},{1,2,5,7,8,9,10,12},{1,2,5,7,8,9,10,12,13},{1,2,5,7,8,9,10,12,13,14},{1,2,5,7,8,9,10,12,13,14,15},{1,2,5,7,8,9,10,12,13,15},{1,2,5,7,8,9,10,12,14},{1,2,5,7,8,9,10,12,14,15},{1,2,5,7,8,9,10,12,15},{1,2,5,7,8,9,10,13},{1,2,5,7,8,9,10,13,14},{1,2,5,7,8,9,10,13,14,15},{1,2,5,7,8,9,10,13,15},{1,2,5,7,8,9,10,14},{1,2,5,7,8,9,10,14,15},{1,2,5,7,8,9,10,15},{1,2,5,7,8,9,11},{1,2,5,7,8,9,11,12},{1,2,5,7,8,9,11,12,13},{1,2,5,7,8,9,11,12,13,14},{1,2,5,7,8,9,11,12,13,14,15},{1,2,5,7,8,9,11,12,13,15},{1,2,5,7,8,9,11,12,14},{1,2,5,7,8,9,11,12,14,15},{1,2,5,7,8,9,11,12,15},{1,2,5,7,8,9,11,13},{1,2,5,7,8,9,11,13,14},{1,2,5,7,8,9,11,13,14,15},{1,2,5,7,8,9,11,13,15},{1,2,5,7,8,9,11,14},{1,2,5,7,8,9,11,14,15},{1,2,5,7,8,9,11,15},{1,2,5,7,8,9,12},{1,2,5,7,8,9,12,13},{1,2,5,7,8,9,12,13,14},{1,2,5,7,8,9,12,13,14,15},{1,2,5,7,8,9,12,13,15},{1,2,5,7,8,9,12,14},{1,2,5,7,8,9,12,14,15},{1,2,5,7,8,9,12,15},{1,2,5,7,8,9,13},{1,2,5,7,8,9,13,14},{1,2,5,7,8,9,13,14,15},{1,2,5,7,8,9,13,15},{1,2,5,7,8,9,14},{1,2,5,7,8,9,14,15},{1,2,5,7,8,9,15},{1,2,5,7,8,10},{1,2,5,7,8,10,11},{1,2,5,7,8,10,11,12},{1,2,5,7,8,10,11,12,13},{1,2,5,7,8,10,11,12,13,14},{1,2,5,7,8,10,11,12,13,14,15},{1,2,5,7,8,10,11,12,13,15},{1,2,5,7,8,10,11,12,14},{1,2,5,7,8,10,11,12,14,15},{1,2,5,7,8,10,11,12,15},{1,2,5,7,8,10,11,13},{1,2,5,7,8,10,11,13,14},{1,2,5,7,8,10,11,13,14,15},{1,2,5,7,8,10,11,13,15},{1,2,5,7,8,10,11,14},{1,2,5,7,8,10,11,14,15},{1,2,5,7,8,10,11,15},{1,2,5,7,8,10,12},{1,2,5,7,8,10,12,13},{1,2,5,7,8,10,12,13,14},{1,2,5,7,8,10,12,13,14,15},{1,2,5,7,8,10,12,13,15},{1,2,5,7,8,10,12,14},{1,2,5,7,8,10,12,14,15},{1,2,5,7,8,10,12,15},{1,2,5,7,8,10,13},{1,2,5,7,8,10,13,14},{1,2,5,7,8,10,13,14,15},{1,2,5,7,8,10,13,15},{1,2,5,7,8,10,14},{1,2,5,7,8,10,14,15},{1,2,5,7,8,10,15},{1,2,5,7,8,11},{1,2,5,7,8,11,12},{1,2,5,7,8,11,12,13},{1,2,5,7,8,11,12,13,14},{1,2,5,7,8,11,12,13,14,15},{1,2,5,7,8,11,12,13,15},{1,2,5,7,8,11,12,14},{1,2,5,7,8,11,12,14,15},{1,2,5,7,8,11,12,15},{1,2,5,7,8,11,13},{1,2,5,7,8,11,13,14},{1,2,5,7,8,11,13,14,15},{1,2,5,7,8,11,13,15},{1,2,5,7,8,11,14},{1,2,5,7,8,11,14,15},{1,2,5,7,8,11,15},{1,2,5,7,8,12},{1,2,5,7,8,12,13},{1,2,5,7,8,12,13,14},{1,2,5,7,8,12,13,14,15},{1,2,5,7,8,12,13,15},{1,2,5,7,8,12,14},{1,2,5,7,8,12,14,15},{1,2,5,7,8,12,15},{1,2,5,7,8,13},{1,2,5,7,8,13,14},{1,2,5,7,8,13,14,15},{1,2,5,7,8,13,15},{1,2,5,7,8,14},{1,2,5,7,8,14,15},{1,2,5,7,8,15},{1,2,5,7,9},{1,2,5,7,9,10},{1,2,5,7,9,10,11},{1,2,5,7,9,10,11,12},{1,2,5,7,9,10,11,12,13},{1,2,5,7,9,10,11,12,13,14},{1,2,5,7,9,10,11,12,13,14,15},{1,2,5,7,9,10,11,12,13,15},{1,2,5,7,9,10,11,12,14},{1,2,5,7,9,10,11,12,14,15},{1,2,5,7,9,10,11,12,15},{1,2,5,7,9,10,11,13},{1,2,5,7,9,10,11,13,14},{1,2,5,7,9,10,11,13,14,15},{1,2,5,7,9,10,11,13,15},{1,2,5,7,9,10,11,14},{1,2,5,7,9,10,11,14,15},{1,2,5,7,9,10,11,15},{1,2,5,7,9,10,12},{1,2,5,7,9,10,12,13},{1,2,5,7,9,10,12,13,14},{1,2,5,7,9,10,12,13,14,15},{1,2,5,7,9,10,12,13,15},{1,2,5,7,9,10,12,14},{1,2,5,7,9,10,12,14,15},{1,2,5,7,9,10,12,15},{1,2,5,7,9,10,13},{1,2,5,7,9,10,13,14},{1,2,5,7,9,10,13,14,15},{1,2,5,7,9,10,13,15},{1,2,5,7,9,10,14},{1,2,5,7,9,10,14,15},{1,2,5,7,9,10,15},{1,2,5,7,9,11},{1,2,5,7,9,11,12},{1,2,5,7,9,11,12,13},{1,2,5,7,9,11,12,13,14},{1,2,5,7,9,11,12,13,14,15},{1,2,5,7,9,11,12,13,15},{1,2,5,7,9,11,12,14},{1,2,5,7,9,11,12,14,15},{1,2,5,7,9,11,12,15},{1,2,5,7,9,11,13},{1,2,5,7,9,11,13,14},{1,2,5,7,9,11,13,14,15},{1,2,5,7,9,11,13,15},{1,2,5,7,9,11,14},{1,2,5,7,9,11,14,15},{1,2,5,7,9,11,15},{1,2,5,7,9,12},{1,2,5,7,9,12,13},{1,2,5,7,9,12,13,14},{1,2,5,7,9,12,13,14,15},{1,2,5,7,9,12,13,15},{1,2,5,7,9,12,14},{1,2,5,7,9,12,14,15},{1,2,5,7,9,12,15},{1,2,5,7,9,13},{1,2,5,7,9,13,14},{1,2,5,7,9,13,14,15},{1,2,5,7,9,13,15},{1,2,5,7,9,14},{1,2,5,7,9,14,15},{1,2,5,7,9,15},{1,2,5,7,10},{1,2,5,7,10,11},{1,2,5,7,10,11,12},{1,2,5,7,10,11,12,13},{1,2,5,7,10,11,12,13,14},{1,2,5,7,10,11,12,13,14,15},{1,2,5,7,10,11,12,13,15},{1,2,5,7,10,11,12,14},{1,2,5,7,10,11,12,14,15},{1,2,5,7,10,11,12,15},{1,2,5,7,10,11,13},{1,2,5,7,10,11,13,14},{1,2,5,7,10,11,13,14,15},{1,2,5,7,10,11,13,15},{1,2,5,7,10,11,14},{1,2,5,7,10,11,14,15},{1,2,5,7,10,11,15},{1,2,5,7,10,12},{1,2,5,7,10,12,13},{1,2,5,7,10,12,13,14},{1,2,5,7,10,12,13,14,15},{1,2,5,7,10,12,13,15},{1,2,5,7,10,12,14},{1,2,5,7,10,12,14,15},{1,2,5,7,10,12,15},{1,2,5,7,10,13},{1,2,5,7,10,13,14},{1,2,5,7,10,13,14,15},{1,2,5,7,10,13,15},{1,2,5,7,10,14},{1,2,5,7,10,14,15},{1,2,5,7,10,15},{1,2,5,7,11},{1,2,5,7,11,12},{1,2,5,7,11,12,13},{1,2,5,7,11,12,13,14},{1,2,5,7,11,12,13,14,15},{1,2,5,7,11,12,13,15},{1,2,5,7,11,12,14},{1,2,5,7,11,12,14,15},{1,2,5,7,11,12,15},{1,2,5,7,11,13},{1,2,5,7,11,13,14},{1,2,5,7,11,13,14,15},{1,2,5,7,11,13,15},{1,2,5,7,11,14},{1,2,5,7,11,14,15},{1,2,5,7,11,15},{1,2,5,7,12},{1,2,5,7,12,13},{1,2,5,7,12,13,14},{1,2,5,7,12,13,14,15},{1,2,5,7,12,13,15},{1,2,5,7,12,14},{1,2,5,7,12,14,15},{1,2,5,7,12,15},{1,2,5,7,13},{1,2,5,7,13,14},{1,2,5,7,13,14,15},{1,2,5,7,13,15},{1,2,5,7,14},{1,2,5,7,14,15},{1,2,5,7,15},{1,2,5,8},{1,2,5,8,9},{1,2,5,8,9,10},{1,2,5,8,9,10,11},{1,2,5,8,9,10,11,12},{1,2,5,8,9,10,11,12,13},{1,2,5,8,9,10,11,12,13,14},{1,2,5,8,9,10,11,12,13,14,15},{1,2,5,8,9,10,11,12,13,15},{1,2,5,8,9,10,11,12,14},{1,2,5,8,9,10,11,12,14,15},{1,2,5,8,9,10,11,12,15},{1,2,5,8,9,10,11,13},{1,2,5,8,9,10,11,13,14},{1,2,5,8,9,10,11,13,14,15},{1,2,5,8,9,10,11,13,15},{1,2,5,8,9,10,11,14},{1,2,5,8,9,10,11,14,15},{1,2,5,8,9,10,11,15},{1,2,5,8,9,10,12},{1,2,5,8,9,10,12,13},{1,2,5,8,9,10,12,13,14},{1,2,5,8,9,10,12,13,14,15},{1,2,5,8,9,10,12,13,15},{1,2,5,8,9,10,12,14},{1,2,5,8,9,10,12,14,15},{1,2,5,8,9,10,12,15},{1,2,5,8,9,10,13},{1,2,5,8,9,10,13,14},{1,2,5,8,9,10,13,14,15},{1,2,5,8,9,10,13,15},{1,2,5,8,9,10,14},{1,2,5,8,9,10,14,15},{1,2,5,8,9,10,15},{1,2,5,8,9,11},{1,2,5,8,9,11,12},{1,2,5,8,9,11,12,13},{1,2,5,8,9,11,12,13,14},{1,2,5,8,9,11,12,13,14,15},{1,2,5,8,9,11,12,13,15},{1,2,5,8,9,11,12,14},{1,2,5,8,9,11,12,14,15},{1,2,5,8,9,11,12,15},{1,2,5,8,9,11,13},{1,2,5,8,9,11,13,14},{1,2,5,8,9,11,13,14,15},{1,2,5,8,9,11,13,15},{1,2,5,8,9,11,14},{1,2,5,8,9,11,14,15},{1,2,5,8,9,11,15},{1,2,5,8,9,12},{1,2,5,8,9,12,13},{1,2,5,8,9,12,13,14},{1,2,5,8,9,12,13,14,15},{1,2,5,8,9,12,13,15},{1,2,5,8,9,12,14},{1,2,5,8,9,12,14,15},{1,2,5,8,9,12,15},{1,2,5,8,9,13},{1,2,5,8,9,13,14},{1,2,5,8,9,13,14,15},{1,2,5,8,9,13,15},{1,2,5,8,9,14},{1,2,5,8,9,14,15},{1,2,5,8,9,15},{1,2,5,8,10},{1,2,5,8,10,11},{1,2,5,8,10,11,12},{1,2,5,8,10,11,12,13},{1,2,5,8,10,11,12,13,14},{1,2,5,8,10,11,12,13,14,15},{1,2,5,8,10,11,12,13,15},{1,2,5,8,10,11,12,14},{1,2,5,8,10,11,12,14,15},{1,2,5,8,10,11,12,15},{1,2,5,8,10,11,13},{1,2,5,8,10,11,13,14},{1,2,5,8,10,11,13,14,15},{1,2,5,8,10,11,13,15},{1,2,5,8,10,11,14},{1,2,5,8,10,11,14,15},{1,2,5,8,10,11,15},{1,2,5,8,10,12},{1,2,5,8,10,12,13},{1,2,5,8,10,12,13,14},{1,2,5,8,10,12,13,14,15},{1,2,5,8,10,12,13,15},{1,2,5,8,10,12,14},{1,2,5,8,10,12,14,15},{1,2,5,8,10,12,15},{1,2,5,8,10,13},{1,2,5,8,10,13,14},{1,2,5,8,10,13,14,15},{1,2,5,8,10,13,15},{1,2,5,8,10,14},{1,2,5,8,10,14,15},{1,2,5,8,10,15},{1,2,5,8,11},{1,2,5,8,11,12},{1,2,5,8,11,12,13},{1,2,5,8,11,12,13,14},{1,2,5,8,11,12,13,14,15},{1,2,5,8,11,12,13,15},{1,2,5,8,11,12,14},{1,2,5,8,11,12,14,15},{1,2,5,8,11,12,15},{1,2,5,8,11,13},{1,2,5,8,11,13,14},{1,2,5,8,11,13,14,15},{1,2,5,8,11,13,15},{1,2,5,8,11,14},{1,2,5,8,11,14,15},{1,2,5,8,11,15},{1,2,5,8,12},{1,2,5,8,12,13},{1,2,5,8,12,13,14},{1,2,5,8,12,13,14,15},{1,2,5,8,12,13,15},{1,2,5,8,12,14},{1,2,5,8,12,14,15},{1,2,5,8,12,15},{1,2,5,8,13},{1,2,5,8,13,14},{1,2,5,8,13,14,15},{1,2,5,8,13,15},{1,2,5,8,14},{1,2,5,8,14,15},{1,2,5,8,15},{1,2,5,9},{1,2,5,9,10},{1,2,5,9,10,11},{1,2,5,9,10,11,12},{1,2,5,9,10,11,12,13},{1,2,5,9,10,11,12,13,14},{1,2,5,9,10,11,12,13,14,15},{1,2,5,9,10,11,12,13,15},{1,2,5,9,10,11,12,14},{1,2,5,9,10,11,12,14,15},{1,2,5,9,10,11,12,15},{1,2,5,9,10,11,13},{1,2,5,9,10,11,13,14},{1,2,5,9,10,11,13,14,15},{1,2,5,9,10,11,13,15},{1,2,5,9,10,11,14},{1,2,5,9,10,11,14,15},{1,2,5,9,10,11,15},{1,2,5,9,10,12},{1,2,5,9,10,12,13},{1,2,5,9,10,12,13,14},{1,2,5,9,10,12,13,14,15},{1,2,5,9,10,12,13,15},{1,2,5,9,10,12,14},{1,2,5,9,10,12,14,15},{1,2,5,9,10,12,15},{1,2,5,9,10,13},{1,2,5,9,10,13,14},{1,2,5,9,10,13,14,15},{1,2,5,9,10,13,15},{1,2,5,9,10,14},{1,2,5,9,10,14,15},{1,2,5,9,10,15},{1,2,5,9,11},{1,2,5,9,11,12},{1,2,5,9,11,12,13},{1,2,5,9,11,12,13,14},{1,2,5,9,11,12,13,14,15},{1,2,5,9,11,12,13,15},{1,2,5,9,11,12,14},{1,2,5,9,11,12,14,15},{1,2,5,9,11,12,15},{1,2,5,9,11,13},{1,2,5,9,11,13,14},{1,2,5,9,11,13,14,15},{1,2,5,9,11,13,15},{1,2,5,9,11,14},{1,2,5,9,11,14,15},{1,2,5,9,11,15},{1,2,5,9,12},{1,2,5,9,12,13},{1,2,5,9,12,13,14},{1,2,5,9,12,13,14,15},{1,2,5,9,12,13,15},{1,2,5,9,12,14},{1,2,5,9,12,14,15},{1,2,5,9,12,15},{1,2,5,9,13},{1,2,5,9,13,14},{1,2,5,9,13,14,15},{1,2,5,9,13,15},{1,2,5,9,14},{1,2,5,9,14,15},{1,2,5,9,15},{1,2,5,10},{1,2,5,10,11},{1,2,5,10,11,12},{1,2,5,10,11,12,13},{1,2,5,10,11,12,13,14},{1,2,5,10,11,12,13,14,15},{1,2,5,10,11,12,13,15},{1,2,5,10,11,12,14},{1,2,5,10,11,12,14,15},{1,2,5,10,11,12,15},{1,2,5,10,11,13},{1,2,5,10,11,13,14},{1,2,5,10,11,13,14,15},{1,2,5,10,11,13,15},{1,2,5,10,11,14},{1,2,5,10,11,14,15},{1,2,5,10,11,15},{1,2,5,10,12},{1,2,5,10,12,13},{1,2,5,10,12,13,14},{1,2,5,10,12,13,14,15},{1,2,5,10,12,13,15},{1,2,5,10,12,14},{1,2,5,10,12,14,15},{1,2,5,10,12,15},{1,2,5,10,13},{1,2,5,10,13,14},{1,2,5,10,13,14,15},{1,2,5,10,13,15},{1,2,5,10,14},{1,2,5,10,14,15},{1,2,5,10,15},{1,2,5,11},{1,2,5,11,12},{1,2,5,11,12,13},{1,2,5,11,12,13,14},{1,2,5,11,12,13,14,15},{1,2,5,11,12,13,15},{1,2,5,11,12,14},{1,2,5,11,12,14,15},{1,2,5,11,12,15},{1,2,5,11,13},{1,2,5,11,13,14},{1,2,5,11,13,14,15},{1,2,5,11,13,15},{1,2,5,11,14},{1,2,5,11,14,15},{1,2,5,11,15},{1,2,5,12},{1,2,5,12,13},{1,2,5,12,13,14},{1,2,5,12,13,14,15},{1,2,5,12,13,15},{1,2,5,12,14},{1,2,5,12,14,15},{1,2,5,12,15},{1,2,5,13},{1,2,5,13,14},{1,2,5,13,14,15},{1,2,5,13,15},{1,2,5,14},{1,2,5,14,15},{1,2,5,15},{1,2,6},{1,2,6,7},{1,2,6,7,8},{1,2,6,7,8,9},{1,2,6,7,8,9,10},{1,2,6,7,8,9,10,11},{1,2,6,7,8,9,10,11,12},{1,2,6,7,8,9,10,11,12,13},{1,2,6,7,8,9,10,11,12,13,14},{1,2,6,7,8,9,10,11,12,13,14,15},{1,2,6,7,8,9,10,11,12,13,15},{1,2,6,7,8,9,10,11,12,14},{1,2,6,7,8,9,10,11,12,14,15},{1,2,6,7,8,9,10,11,12,15},{1,2,6,7,8,9,10,11,13},{1,2,6,7,8,9,10,11,13,14},{1,2,6,7,8,9,10,11,13,14,15},{1,2,6,7,8,9,10,11,13,15},{1,2,6,7,8,9,10,11,14},{1,2,6,7,8,9,10,11,14,15},{1,2,6,7,8,9,10,11,15},{1,2,6,7,8,9,10,12},{1,2,6,7,8,9,10,12,13},{1,2,6,7,8,9,10,12,13,14},{1,2,6,7,8,9,10,12,13,14,15},{1,2,6,7,8,9,10,12,13,15},{1,2,6,7,8,9,10,12,14},{1,2,6,7,8,9,10,12,14,15},{1,2,6,7,8,9,10,12,15},{1,2,6,7,8,9,10,13},{1,2,6,7,8,9,10,13,14},{1,2,6,7,8,9,10,13,14,15},{1,2,6,7,8,9,10,13,15},{1,2,6,7,8,9,10,14},{1,2,6,7,8,9,10,14,15},{1,2,6,7,8,9,10,15},{1,2,6,7,8,9,11},{1,2,6,7,8,9,11,12},{1,2,6,7,8,9,11,12,13},{1,2,6,7,8,9,11,12,13,14},{1,2,6,7,8,9,11,12,13,14,15},{1,2,6,7,8,9,11,12,13,15},{1,2,6,7,8,9,11,12,14},{1,2,6,7,8,9,11,12,14,15},{1,2,6,7,8,9,11,12,15},{1,2,6,7,8,9,11,13},{1,2,6,7,8,9,11,13,14},{1,2,6,7,8,9,11,13,14,15},{1,2,6,7,8,9,11,13,15},{1,2,6,7,8,9,11,14},{1,2,6,7,8,9,11,14,15},{1,2,6,7,8,9,11,15},{1,2,6,7,8,9,12},{1,2,6,7,8,9,12,13},{1,2,6,7,8,9,12,13,14},{1,2,6,7,8,9,12,13,14,15},{1,2,6,7,8,9,12,13,15},{1,2,6,7,8,9,12,14},{1,2,6,7,8,9,12,14,15},{1,2,6,7,8,9,12,15},{1,2,6,7,8,9,13},{1,2,6,7,8,9,13,14},{1,2,6,7,8,9,13,14,15},{1,2,6,7,8,9,13,15},{1,2,6,7,8,9,14},{1,2,6,7,8,9,14,15},{1,2,6,7,8,9,15},{1,2,6,7,8,10},{1,2,6,7,8,10,11},{1,2,6,7,8,10,11,12},{1,2,6,7,8,10,11,12,13},{1,2,6,7,8,10,11,12,13,14},{1,2,6,7,8,10,11,12,13,14,15},{1,2,6,7,8,10,11,12,13,15},{1,2,6,7,8,10,11,12,14},{1,2,6,7,8,10,11,12,14,15},{1,2,6,7,8,10,11,12,15},{1,2,6,7,8,10,11,13},{1,2,6,7,8,10,11,13,14},{1,2,6,7,8,10,11,13,14,15},{1,2,6,7,8,10,11,13,15},{1,2,6,7,8,10,11,14},{1,2,6,7,8,10,11,14,15},{1,2,6,7,8,10,11,15},{1,2,6,7,8,10,12},{1,2,6,7,8,10,12,13},{1,2,6,7,8,10,12,13,14},{1,2,6,7,8,10,12,13,14,15},{1,2,6,7,8,10,12,13,15},{1,2,6,7,8,10,12,14},{1,2,6,7,8,10,12,14,15},{1,2,6,7,8,10,12,15},{1,2,6,7,8,10,13},{1,2,6,7,8,10,13,14},{1,2,6,7,8,10,13,14,15},{1,2,6,7,8,10,13,15},{1,2,6,7,8,10,14},{1,2,6,7,8,10,14,15},{1,2,6,7,8,10,15},{1,2,6,7,8,11},{1,2,6,7,8,11,12},{1,2,6,7,8,11,12,13},{1,2,6,7,8,11,12,13,14},{1,2,6,7,8,11,12,13,14,15},{1,2,6,7,8,11,12,13,15},{1,2,6,7,8,11,12,14},{1,2,6,7,8,11,12,14,15},{1,2,6,7,8,11,12,15},{1,2,6,7,8,11,13},{1,2,6,7,8,11,13,14},{1,2,6,7,8,11,13,14,15},{1,2,6,7,8,11,13,15},{1,2,6,7,8,11,14},{1,2,6,7,8,11,14,15},{1,2,6,7,8,11,15},{1,2,6,7,8,12},{1,2,6,7,8,12,13},{1,2,6,7,8,12,13,14},{1,2,6,7,8,12,13,14,15},{1,2,6,7,8,12,13,15},{1,2,6,7,8,12,14},{1,2,6,7,8,12,14,15},{1,2,6,7,8,12,15},{1,2,6,7,8,13},{1,2,6,7,8,13,14},{1,2,6,7,8,13,14,15},{1,2,6,7,8,13,15},{1,2,6,7,8,14},{1,2,6,7,8,14,15},{1,2,6,7,8,15},{1,2,6,7,9},{1,2,6,7,9,10},{1,2,6,7,9,10,11},{1,2,6,7,9,10,11,12},{1,2,6,7,9,10,11,12,13},{1,2,6,7,9,10,11,12,13,14},{1,2,6,7,9,10,11,12,13,14,15},{1,2,6,7,9,10,11,12,13,15},{1,2,6,7,9,10,11,12,14},{1,2,6,7,9,10,11,12,14,15},{1,2,6,7,9,10,11,12,15},{1,2,6,7,9,10,11,13},{1,2,6,7,9,10,11,13,14},{1,2,6,7,9,10,11,13,14,15},{1,2,6,7,9,10,11,13,15},{1,2,6,7,9,10,11,14},{1,2,6,7,9,10,11,14,15},{1,2,6,7,9,10,11,15},{1,2,6,7,9,10,12},{1,2,6,7,9,10,12,13},{1,2,6,7,9,10,12,13,14},{1,2,6,7,9,10,12,13,14,15},{1,2,6,7,9,10,12,13,15},{1,2,6,7,9,10,12,14},{1,2,6,7,9,10,12,14,15},{1,2,6,7,9,10,12,15},{1,2,6,7,9,10,13},{1,2,6,7,9,10,13,14},{1,2,6,7,9,10,13,14,15},{1,2,6,7,9,10,13,15},{1,2,6,7,9,10,14},{1,2,6,7,9,10,14,15},{1,2,6,7,9,10,15},{1,2,6,7,9,11},{1,2,6,7,9,11,12},{1,2,6,7,9,11,12,13},{1,2,6,7,9,11,12,13,14},{1,2,6,7,9,11,12,13,14,15},{1,2,6,7,9,11,12,13,15},{1,2,6,7,9,11,12,14},{1,2,6,7,9,11,12,14,15},{1,2,6,7,9,11,12,15},{1,2,6,7,9,11,13},{1,2,6,7,9,11,13,14},{1,2,6,7,9,11,13,14,15},{1,2,6,7,9,11,13,15},{1,2,6,7,9,11,14},{1,2,6,7,9,11,14,15},{1,2,6,7,9,11,15},{1,2,6,7,9,12},{1,2,6,7,9,12,13},{1,2,6,7,9,12,13,14},{1,2,6,7,9,12,13,14,15},{1,2,6,7,9,12,13,15},{1,2,6,7,9,12,14},{1,2,6,7,9,12,14,15},{1,2,6,7,9,12,15},{1,2,6,7,9,13},{1,2,6,7,9,13,14},{1,2,6,7,9,13,14,15},{1,2,6,7,9,13,15},{1,2,6,7,9,14},{1,2,6,7,9,14,15},{1,2,6,7,9,15},{1,2,6,7,10},{1,2,6,7,10,11},{1,2,6,7,10,11,12},{1,2,6,7,10,11,12,13},{1,2,6,7,10,11,12,13,14},{1,2,6,7,10,11,12,13,14,15},{1,2,6,7,10,11,12,13,15},{1,2,6,7,10,11,12,14},{1,2,6,7,10,11,12,14,15},{1,2,6,7,10,11,12,15},{1,2,6,7,10,11,13},{1,2,6,7,10,11,13,14},{1,2,6,7,10,11,13,14,15},{1,2,6,7,10,11,13,15},{1,2,6,7,10,11,14},{1,2,6,7,10,11,14,15},{1,2,6,7,10,11,15},{1,2,6,7,10,12},{1,2,6,7,10,12,13},{1,2,6,7,10,12,13,14},{1,2,6,7,10,12,13,14,15},{1,2,6,7,10,12,13,15},{1,2,6,7,10,12,14},{1,2,6,7,10,12,14,15},{1,2,6,7,10,12,15},{1,2,6,7,10,13},{1,2,6,7,10,13,14},{1,2,6,7,10,13,14,15},{1,2,6,7,10,13,15},{1,2,6,7,10,14},{1,2,6,7,10,14,15},{1,2,6,7,10,15},{1,2,6,7,11},{1,2,6,7,11,12},{1,2,6,7,11,12,13},{1,2,6,7,11,12,13,14},{1,2,6,7,11,12,13,14,15},{1,2,6,7,11,12,13,15},{1,2,6,7,11,12,14},{1,2,6,7,11,12,14,15},{1,2,6,7,11,12,15},{1,2,6,7,11,13},{1,2,6,7,11,13,14},{1,2,6,7,11,13,14,15},{1,2,6,7,11,13,15},{1,2,6,7,11,14},{1,2,6,7,11,14,15},{1,2,6,7,11,15},{1,2,6,7,12},{1,2,6,7,12,13},{1,2,6,7,12,13,14},{1,2,6,7,12,13,14,15},{1,2,6,7,12,13,15},{1,2,6,7,12,14},{1,2,6,7,12,14,15},{1,2,6,7,12,15},{1,2,6,7,13},{1,2,6,7,13,14},{1,2,6,7,13,14,15},{1,2,6,7,13,15},{1,2,6,7,14},{1,2,6,7,14,15},{1,2,6,7,15},{1,2,6,8},{1,2,6,8,9},{1,2,6,8,9,10},{1,2,6,8,9,10,11},{1,2,6,8,9,10,11,12},{1,2,6,8,9,10,11,12,13},{1,2,6,8,9,10,11,12,13,14},{1,2,6,8,9,10,11,12,13,14,15},{1,2,6,8,9,10,11,12,13,15},{1,2,6,8,9,10,11,12,14},{1,2,6,8,9,10,11,12,14,15},{1,2,6,8,9,10,11,12,15},{1,2,6,8,9,10,11,13},{1,2,6,8,9,10,11,13,14},{1,2,6,8,9,10,11,13,14,15},{1,2,6,8,9,10,11,13,15},{1,2,6,8,9,10,11,14},{1,2,6,8,9,10,11,14,15},{1,2,6,8,9,10,11,15},{1,2,6,8,9,10,12},{1,2,6,8,9,10,12,13},{1,2,6,8,9,10,12,13,14},{1,2,6,8,9,10,12,13,14,15},{1,2,6,8,9,10,12,13,15},{1,2,6,8,9,10,12,14},{1,2,6,8,9,10,12,14,15},{1,2,6,8,9,10,12,15},{1,2,6,8,9,10,13},{1,2,6,8,9,10,13,14},{1,2,6,8,9,10,13,14,15},{1,2,6,8,9,10,13,15},{1,2,6,8,9,10,14},{1,2,6,8,9,10,14,15},{1,2,6,8,9,10,15},{1,2,6,8,9,11},{1,2,6,8,9,11,12},{1,2,6,8,9,11,12,13},{1,2,6,8,9,11,12,13,14},{1,2,6,8,9,11,12,13,14,15},{1,2,6,8,9,11,12,13,15},{1,2,6,8,9,11,12,14},{1,2,6,8,9,11,12,14,15},{1,2,6,8,9,11,12,15},{1,2,6,8,9,11,13},{1,2,6,8,9,11,13,14},{1,2,6,8,9,11,13,14,15},{1,2,6,8,9,11,13,15},{1,2,6,8,9,11,14},{1,2,6,8,9,11,14,15},{1,2,6,8,9,11,15},{1,2,6,8,9,12},{1,2,6,8,9,12,13},{1,2,6,8,9,12,13,14},{1,2,6,8,9,12,13,14,15},{1,2,6,8,9,12,13,15},{1,2,6,8,9,12,14},{1,2,6,8,9,12,14,15},{1,2,6,8,9,12,15},{1,2,6,8,9,13},{1,2,6,8,9,13,14},{1,2,6,8,9,13,14,15},{1,2,6,8,9,13,15},{1,2,6,8,9,14},{1,2,6,8,9,14,15},{1,2,6,8,9,15},{1,2,6,8,10},{1,2,6,8,10,11},{1,2,6,8,10,11,12},{1,2,6,8,10,11,12,13},{1,2,6,8,10,11,12,13,14},{1,2,6,8,10,11,12,13,14,15},{1,2,6,8,10,11,12,13,15},{1,2,6,8,10,11,12,14},{1,2,6,8,10,11,12,14,15},{1,2,6,8,10,11,12,15},{1,2,6,8,10,11,13},{1,2,6,8,10,11,13,14},{1,2,6,8,10,11,13,14,15},{1,2,6,8,10,11,13,15},{1,2,6,8,10,11,14},{1,2,6,8,10,11,14,15},{1,2,6,8,10,11,15},{1,2,6,8,10,12},{1,2,6,8,10,12,13},{1,2,6,8,10,12,13,14},{1,2,6,8,10,12,13,14,15},{1,2,6,8,10,12,13,15},{1,2,6,8,10,12,14},{1,2,6,8,10,12,14,15},{1,2,6,8,10,12,15},{1,2,6,8,10,13},{1,2,6,8,10,13,14},{1,2,6,8,10,13,14,15},{1,2,6,8,10,13,15},{1,2,6,8,10,14},{1,2,6,8,10,14,15},{1,2,6,8,10,15},{1,2,6,8,11},{1,2,6,8,11,12},{1,2,6,8,11,12,13},{1,2,6,8,11,12,13,14},{1,2,6,8,11,12,13,14,15},{1,2,6,8,11,12,13,15},{1,2,6,8,11,12,14},{1,2,6,8,11,12,14,15},{1,2,6,8,11,12,15},{1,2,6,8,11,13},{1,2,6,8,11,13,14},{1,2,6,8,11,13,14,15},{1,2,6,8,11,13,15},{1,2,6,8,11,14},{1,2,6,8,11,14,15},{1,2,6,8,11,15},{1,2,6,8,12},{1,2,6,8,12,13},{1,2,6,8,12,13,14},{1,2,6,8,12,13,14,15},{1,2,6,8,12,13,15},{1,2,6,8,12,14},{1,2,6,8,12,14,15},{1,2,6,8,12,15},{1,2,6,8,13},{1,2,6,8,13,14},{1,2,6,8,13,14,15},{1,2,6,8,13,15},{1,2,6,8,14},{1,2,6,8,14,15},{1,2,6,8,15},{1,2,6,9},{1,2,6,9,10},{1,2,6,9,10,11},{1,2,6,9,10,11,12},{1,2,6,9,10,11,12,13},{1,2,6,9,10,11,12,13,14},{1,2,6,9,10,11,12,13,14,15},{1,2,6,9,10,11,12,13,15},{1,2,6,9,10,11,12,14},{1,2,6,9,10,11,12,14,15},{1,2,6,9,10,11,12,15},{1,2,6,9,10,11,13},{1,2,6,9,10,11,13,14},{1,2,6,9,10,11,13,14,15},{1,2,6,9,10,11,13,15},{1,2,6,9,10,11,14},{1,2,6,9,10,11,14,15},{1,2,6,9,10,11,15},{1,2,6,9,10,12},{1,2,6,9,10,12,13},{1,2,6,9,10,12,13,14},{1,2,6,9,10,12,13,14,15},{1,2,6,9,10,12,13,15},{1,2,6,9,10,12,14},{1,2,6,9,10,12,14,15},{1,2,6,9,10,12,15},{1,2,6,9,10,13},{1,2,6,9,10,13,14},{1,2,6,9,10,13,14,15},{1,2,6,9,10,13,15},{1,2,6,9,10,14},{1,2,6,9,10,14,15},{1,2,6,9,10,15},{1,2,6,9,11},{1,2,6,9,11,12},{1,2,6,9,11,12,13},{1,2,6,9,11,12,13,14},{1,2,6,9,11,12,13,14,15},{1,2,6,9,11,12,13,15},{1,2,6,9,11,12,14},{1,2,6,9,11,12,14,15},{1,2,6,9,11,12,15},{1,2,6,9,11,13},{1,2,6,9,11,13,14},{1,2,6,9,11,13,14,15},{1,2,6,9,11,13,15},{1,2,6,9,11,14},{1,2,6,9,11,14,15},{1,2,6,9,11,15},{1,2,6,9,12},{1,2,6,9,12,13},{1,2,6,9,12,13,14},{1,2,6,9,12,13,14,15},{1,2,6,9,12,13,15},{1,2,6,9,12,14},{1,2,6,9,12,14,15},{1,2,6,9,12,15},{1,2,6,9,13},{1,2,6,9,13,14},{1,2,6,9,13,14,15},{1,2,6,9,13,15},{1,2,6,9,14},{1,2,6,9,14,15},{1,2,6,9,15},{1,2,6,10},{1,2,6,10,11},{1,2,6,10,11,12},{1,2,6,10,11,12,13},{1,2,6,10,11,12,13,14},{1,2,6,10,11,12,13,14,15},{1,2,6,10,11,12,13,15},{1,2,6,10,11,12,14},{1,2,6,10,11,12,14,15},{1,2,6,10,11,12,15},{1,2,6,10,11,13},{1,2,6,10,11,13,14},{1,2,6,10,11,13,14,15},{1,2,6,10,11,13,15},{1,2,6,10,11,14},{1,2,6,10,11,14,15},{1,2,6,10,11,15},{1,2,6,10,12},{1,2,6,10,12,13},{1,2,6,10,12,13,14},{1,2,6,10,12,13,14,15},{1,2,6,10,12,13,15},{1,2,6,10,12,14},{1,2,6,10,12,14,15},{1,2,6,10,12,15},{1,2,6,10,13},{1,2,6,10,13,14},{1,2,6,10,13,14,15},{1,2,6,10,13,15},{1,2,6,10,14},{1,2,6,10,14,15},{1,2,6,10,15},{1,2,6,11},{1,2,6,11,12},{1,2,6,11,12,13},{1,2,6,11,12,13,14},{1,2,6,11,12,13,14,15},{1,2,6,11,12,13,15},{1,2,6,11,12,14},{1,2,6,11,12,14,15},{1,2,6,11,12,15},{1,2,6,11,13},{1,2,6,11,13,14},{1,2,6,11,13,14,15},{1,2,6,11,13,15},{1,2,6,11,14},{1,2,6,11,14,15},{1,2,6,11,15},{1,2,6,12},{1,2,6,12,13},{1,2,6,12,13,14},{1,2,6,12,13,14,15},{1,2,6,12,13,15},{1,2,6,12,14},{1,2,6,12,14,15},{1,2,6,12,15},{1,2,6,13},{1,2,6,13,14},{1,2,6,13,14,15},{1,2,6,13,15},{1,2,6,14},{1,2,6,14,15},{1,2,6,15},{1,2,7},{1,2,7,8},{1,2,7,8,9},{1,2,7,8,9,10},{1,2,7,8,9,10,11},{1,2,7,8,9,10,11,12},{1,2,7,8,9,10,11,12,13},{1,2,7,8,9,10,11,12,13,14},{1,2,7,8,9,10,11,12,13,14,15},{1,2,7,8,9,10,11,12,13,15},{1,2,7,8,9,10,11,12,14},{1,2,7,8,9,10,11,12,14,15},{1,2,7,8,9,10,11,12,15},{1,2,7,8,9,10,11,13},{1,2,7,8,9,10,11,13,14},{1,2,7,8,9,10,11,13,14,15},{1,2,7,8,9,10,11,13,15},{1,2,7,8,9,10,11,14},{1,2,7,8,9,10,11,14,15},{1,2,7,8,9,10,11,15},{1,2,7,8,9,10,12},{1,2,7,8,9,10,12,13},{1,2,7,8,9,10,12,13,14},{1,2,7,8,9,10,12,13,14,15},{1,2,7,8,9,10,12,13,15},{1,2,7,8,9,10,12,14},{1,2,7,8,9,10,12,14,15},{1,2,7,8,9,10,12,15},{1,2,7,8,9,10,13},{1,2,7,8,9,10,13,14},{1,2,7,8,9,10,13,14,15},{1,2,7,8,9,10,13,15},{1,2,7,8,9,10,14},{1,2,7,8,9,10,14,15},{1,2,7,8,9,10,15},{1,2,7,8,9,11},{1,2,7,8,9,11,12},{1,2,7,8,9,11,12,13},{1,2,7,8,9,11,12,13,14},{1,2,7,8,9,11,12,13,14,15},{1,2,7,8,9,11,12,13,15},{1,2,7,8,9,11,12,14},{1,2,7,8,9,11,12,14,15},{1,2,7,8,9,11,12,15},{1,2,7,8,9,11,13},{1,2,7,8,9,11,13,14},{1,2,7,8,9,11,13,14,15},{1,2,7,8,9,11,13,15},{1,2,7,8,9,11,14},{1,2,7,8,9,11,14,15},{1,2,7,8,9,11,15},{1,2,7,8,9,12},{1,2,7,8,9,12,13},{1,2,7,8,9,12,13,14},{1,2,7,8,9,12,13,14,15},{1,2,7,8,9,12,13,15},{1,2,7,8,9,12,14},{1,2,7,8,9,12,14,15},{1,2,7,8,9,12,15},{1,2,7,8,9,13},{1,2,7,8,9,13,14},{1,2,7,8,9,13,14,15},{1,2,7,8,9,13,15},{1,2,7,8,9,14},{1,2,7,8,9,14,15},{1,2,7,8,9,15},{1,2,7,8,10},{1,2,7,8,10,11},{1,2,7,8,10,11,12},{1,2,7,8,10,11,12,13},{1,2,7,8,10,11,12,13,14},{1,2,7,8,10,11,12,13,14,15},{1,2,7,8,10,11,12,13,15},{1,2,7,8,10,11,12,14},{1,2,7,8,10,11,12,14,15},{1,2,7,8,10,11,12,15},{1,2,7,8,10,11,13},{1,2,7,8,10,11,13,14},{1,2,7,8,10,11,13,14,15},{1,2,7,8,10,11,13,15},{1,2,7,8,10,11,14},{1,2,7,8,10,11,14,15},{1,2,7,8,10,11,15},{1,2,7,8,10,12},{1,2,7,8,10,12,13},{1,2,7,8,10,12,13,14},{1,2,7,8,10,12,13,14,15},{1,2,7,8,10,12,13,15},{1,2,7,8,10,12,14},{1,2,7,8,10,12,14,15},{1,2,7,8,10,12,15},{1,2,7,8,10,13},{1,2,7,8,10,13,14},{1,2,7,8,10,13,14,15},{1,2,7,8,10,13,15},{1,2,7,8,10,14},{1,2,7,8,10,14,15},{1,2,7,8,10,15},{1,2,7,8,11},{1,2,7,8,11,12},{1,2,7,8,11,12,13},{1,2,7,8,11,12,13,14},{1,2,7,8,11,12,13,14,15},{1,2,7,8,11,12,13,15},{1,2,7,8,11,12,14},{1,2,7,8,11,12,14,15},{1,2,7,8,11,12,15},{1,2,7,8,11,13},{1,2,7,8,11,13,14},{1,2,7,8,11,13,14,15},{1,2,7,8,11,13,15},{1,2,7,8,11,14},{1,2,7,8,11,14,15},{1,2,7,8,11,15},{1,2,7,8,12},{1,2,7,8,12,13},{1,2,7,8,12,13,14},{1,2,7,8,12,13,14,15},{1,2,7,8,12,13,15},{1,2,7,8,12,14},{1,2,7,8,12,14,15},{1,2,7,8,12,15},{1,2,7,8,13},{1,2,7,8,13,14},{1,2,7,8,13,14,15},{1,2,7,8,13,15},{1,2,7,8,14},{1,2,7,8,14,15},{1,2,7,8,15},{1,2,7,9},{1,2,7,9,10},{1,2,7,9,10,11},{1,2,7,9,10,11,12},{1,2,7,9,10,11,12,13},{1,2,7,9,10,11,12,13,14},{1,2,7,9,10,11,12,13,14,15},{1,2,7,9,10,11,12,13,15},{1,2,7,9,10,11,12,14},{1,2,7,9,10,11,12,14,15},{1,2,7,9,10,11,12,15},{1,2,7,9,10,11,13},{1,2,7,9,10,11,13,14},{1,2,7,9,10,11,13,14,15},{1,2,7,9,10,11,13,15},{1,2,7,9,10,11,14},{1,2,7,9,10,11,14,15},{1,2,7,9,10,11,15},{1,2,7,9,10,12},{1,2,7,9,10,12,13},{1,2,7,9,10,12,13,14},{1,2,7,9,10,12,13,14,15},{1,2,7,9,10,12,13,15},{1,2,7,9,10,12,14},{1,2,7,9,10,12,14,15},{1,2,7,9,10,12,15},{1,2,7,9,10,13},{1,2,7,9,10,13,14},{1,2,7,9,10,13,14,15},{1,2,7,9,10,13,15},{1,2,7,9,10,14},{1,2,7,9,10,14,15},{1,2,7,9,10,15},{1,2,7,9,11},{1,2,7,9,11,12},{1,2,7,9,11,12,13},{1,2,7,9,11,12,13,14},{1,2,7,9,11,12,13,14,15},{1,2,7,9,11,12,13,15},{1,2,7,9,11,12,14},{1,2,7,9,11,12,14,15},{1,2,7,9,11,12,15},{1,2,7,9,11,13},{1,2,7,9,11,13,14},{1,2,7,9,11,13,14,15},{1,2,7,9,11,13,15},{1,2,7,9,11,14},{1,2,7,9,11,14,15},{1,2,7,9,11,15},{1,2,7,9,12},{1,2,7,9,12,13},{1,2,7,9,12,13,14},{1,2,7,9,12,13,14,15},{1,2,7,9,12,13,15},{1,2,7,9,12,14},{1,2,7,9,12,14,15},{1,2,7,9,12,15},{1,2,7,9,13},{1,2,7,9,13,14},{1,2,7,9,13,14,15},{1,2,7,9,13,15},{1,2,7,9,14},{1,2,7,9,14,15},{1,2,7,9,15},{1,2,7,10},{1,2,7,10,11},{1,2,7,10,11,12},{1,2,7,10,11,12,13},{1,2,7,10,11,12,13,14},{1,2,7,10,11,12,13,14,15},{1,2,7,10,11,12,13,15},{1,2,7,10,11,12,14},{1,2,7,10,11,12,14,15},{1,2,7,10,11,12,15},{1,2,7,10,11,13},{1,2,7,10,11,13,14},{1,2,7,10,11,13,14,15},{1,2,7,10,11,13,15},{1,2,7,10,11,14},{1,2,7,10,11,14,15},{1,2,7,10,11,15},{1,2,7,10,12},{1,2,7,10,12,13},{1,2,7,10,12,13,14},{1,2,7,10,12,13,14,15},{1,2,7,10,12,13,15},{1,2,7,10,12,14},{1,2,7,10,12,14,15},{1,2,7,10,12,15},{1,2,7,10,13},{1,2,7,10,13,14},{1,2,7,10,13,14,15},{1,2,7,10,13,15},{1,2,7,10,14},{1,2,7,10,14,15},{1,2,7,10,15},{1,2,7,11},{1,2,7,11,12},{1,2,7,11,12,13},{1,2,7,11,12,13,14},{1,2,7,11,12,13,14,15},{1,2,7,11,12,13,15},{1,2,7,11,12,14},{1,2,7,11,12,14,15},{1,2,7,11,12,15},{1,2,7,11,13},{1,2,7,11,13,14},{1,2,7,11,13,14,15},{1,2,7,11,13,15},{1,2,7,11,14},{1,2,7,11,14,15},{1,2,7,11,15},{1,2,7,12},{1,2,7,12,13},{1,2,7,12,13,14},{1,2,7,12,13,14,15},{1,2,7,12,13,15},{1,2,7,12,14},{1,2,7,12,14,15},{1,2,7,12,15},{1,2,7,13},{1,2,7,13,14},{1,2,7,13,14,15},{1,2,7,13,15},{1,2,7,14},{1,2,7,14,15},{1,2,7,15},{1,2,8},{1,2,8,9},{1,2,8,9,10},{1,2,8,9,10,11},{1,2,8,9,10,11,12},{1,2,8,9,10,11,12,13},{1,2,8,9,10,11,12,13,14},{1,2,8,9,10,11,12,13,14,15},{1,2,8,9,10,11,12,13,15},{1,2,8,9,10,11,12,14},{1,2,8,9,10,11,12,14,15},{1,2,8,9,10,11,12,15},{1,2,8,9,10,11,13},{1,2,8,9,10,11,13,14},{1,2,8,9,10,11,13,14,15},{1,2,8,9,10,11,13,15},{1,2,8,9,10,11,14},{1,2,8,9,10,11,14,15},{1,2,8,9,10,11,15},{1,2,8,9,10,12},{1,2,8,9,10,12,13},{1,2,8,9,10,12,13,14},{1,2,8,9,10,12,13,14,15},{1,2,8,9,10,12,13,15},{1,2,8,9,10,12,14},{1,2,8,9,10,12,14,15},{1,2,8,9,10,12,15},{1,2,8,9,10,13},{1,2,8,9,10,13,14},{1,2,8,9,10,13,14,15},{1,2,8,9,10,13,15},{1,2,8,9,10,14},{1,2,8,9,10,14,15},{1,2,8,9,10,15},{1,2,8,9,11},{1,2,8,9,11,12},{1,2,8,9,11,12,13},{1,2,8,9,11,12,13,14},{1,2,8,9,11,12,13,14,15},{1,2,8,9,11,12,13,15},{1,2,8,9,11,12,14},{1,2,8,9,11,12,14,15},{1,2,8,9,11,12,15},{1,2,8,9,11,13},{1,2,8,9,11,13,14},{1,2,8,9,11,13,14,15},{1,2,8,9,11,13,15},{1,2,8,9,11,14},{1,2,8,9,11,14,15},{1,2,8,9,11,15},{1,2,8,9,12},{1,2,8,9,12,13},{1,2,8,9,12,13,14},{1,2,8,9,12,13,14,15},{1,2,8,9,12,13,15},{1,2,8,9,12,14},{1,2,8,9,12,14,15},{1,2,8,9,12,15},{1,2,8,9,13},{1,2,8,9,13,14},{1,2,8,9,13,14,15},{1,2,8,9,13,15},{1,2,8,9,14},{1,2,8,9,14,15},{1,2,8,9,15},{1,2,8,10},{1,2,8,10,11},{1,2,8,10,11,12},{1,2,8,10,11,12,13},{1,2,8,10,11,12,13,14},{1,2,8,10,11,12,13,14,15},{1,2,8,10,11,12,13,15},{1,2,8,10,11,12,14},{1,2,8,10,11,12,14,15},{1,2,8,10,11,12,15},{1,2,8,10,11,13},{1,2,8,10,11,13,14},{1,2,8,10,11,13,14,15},{1,2,8,10,11,13,15},{1,2,8,10,11,14},{1,2,8,10,11,14,15},{1,2,8,10,11,15},{1,2,8,10,12},{1,2,8,10,12,13},{1,2,8,10,12,13,14},{1,2,8,10,12,13,14,15},{1,2,8,10,12,13,15},{1,2,8,10,12,14},{1,2,8,10,12,14,15},{1,2,8,10,12,15},{1,2,8,10,13},{1,2,8,10,13,14},{1,2,8,10,13,14,15},{1,2,8,10,13,15},{1,2,8,10,14},{1,2,8,10,14,15},{1,2,8,10,15},{1,2,8,11},{1,2,8,11,12},{1,2,8,11,12,13},{1,2,8,11,12,13,14},{1,2,8,11,12,13,14,15},{1,2,8,11,12,13,15},{1,2,8,11,12,14},{1,2,8,11,12,14,15},{1,2,8,11,12,15},{1,2,8,11,13},{1,2,8,11,13,14},{1,2,8,11,13,14,15},{1,2,8,11,13,15},{1,2,8,11,14},{1,2,8,11,14,15},{1,2,8,11,15},{1,2,8,12},{1,2,8,12,13},{1,2,8,12,13,14},{1,2,8,12,13,14,15},{1,2,8,12,13,15},{1,2,8,12,14},{1,2,8,12,14,15},{1,2,8,12,15},{1,2,8,13},{1,2,8,13,14},{1,2,8,13,14,15},{1,2,8,13,15},{1,2,8,14},{1,2,8,14,15},{1,2,8,15},{1,2,9},{1,2,9,10},{1,2,9,10,11},{1,2,9,10,11,12},{1,2,9,10,11,12,13},{1,2,9,10,11,12,13,14},{1,2,9,10,11,12,13,14,15},{1,2,9,10,11,12,13,15},{1,2,9,10,11,12,14},{1,2,9,10,11,12,14,15},{1,2,9,10,11,12,15},{1,2,9,10,11,13},{1,2,9,10,11,13,14},{1,2,9,10,11,13,14,15},{1,2,9,10,11,13,15},{1,2,9,10,11,14},{1,2,9,10,11,14,15},{1,2,9,10,11,15},{1,2,9,10,12},{1,2,9,10,12,13},{1,2,9,10,12,13,14},{1,2,9,10,12,13,14,15},{1,2,9,10,12,13,15},{1,2,9,10,12,14},{1,2,9,10,12,14,15},{1,2,9,10,12,15},{1,2,9,10,13},{1,2,9,10,13,14},{1,2,9,10,13,14,15},{1,2,9,10,13,15},{1,2,9,10,14},{1,2,9,10,14,15},{1,2,9,10,15},{1,2,9,11},{1,2,9,11,12},{1,2,9,11,12,13},{1,2,9,11,12,13,14},{1,2,9,11,12,13,14,15},{1,2,9,11,12,13,15},{1,2,9,11,12,14},{1,2,9,11,12,14,15},{1,2,9,11,12,15},{1,2,9,11,13},{1,2,9,11,13,14},{1,2,9,11,13,14,15},{1,2,9,11,13,15},{1,2,9,11,14},{1,2,9,11,14,15},{1,2,9,11,15},{1,2,9,12},{1,2,9,12,13},{1,2,9,12,13,14},{1,2,9,12,13,14,15},{1,2,9,12,13,15},{1,2,9,12,14},{1,2,9,12,14,15},{1,2,9,12,15},{1,2,9,13},{1,2,9,13,14},{1,2,9,13,14,15},{1,2,9,13,15},{1,2,9,14},{1,2,9,14,15},{1,2,9,15},{1,2,10},{1,2,10,11},{1,2,10,11,12},{1,2,10,11,12,13},{1,2,10,11,12,13,14},{1,2,10,11,12,13,14,15},{1,2,10,11,12,13,15},{1,2,10,11,12,14},{1,2,10,11,12,14,15},{1,2,10,11,12,15},{1,2,10,11,13},{1,2,10,11,13,14},{1,2,10,11,13,14,15},{1,2,10,11,13,15},{1,2,10,11,14},{1,2,10,11,14,15},{1,2,10,11,15},{1,2,10,12},{1,2,10,12,13},{1,2,10,12,13,14},{1,2,10,12,13,14,15},{1,2,10,12,13,15},{1,2,10,12,14},{1,2,10,12,14,15},{1,2,10,12,15},{1,2,10,13},{1,2,10,13,14},{1,2,10,13,14,15},{1,2,10,13,15},{1,2,10,14},{1,2,10,14,15},{1,2,10,15},{1,2,11},{1,2,11,12},{1,2,11,12,13},{1,2,11,12,13,14},{1,2,11,12,13,14,15},{1,2,11,12,13,15},{1,2,11,12,14},{1,2,11,12,14,15},{1,2,11,12,15},{1,2,11,13},{1,2,11,13,14},{1,2,11,13,14,15},{1,2,11,13,15},{1,2,11,14},{1,2,11,14,15},{1,2,11,15},{1,2,12},{1,2,12,13},{1,2,12,13,14},{1,2,12,13,14,15},{1,2,12,13,15},{1,2,12,14},{1,2,12,14,15},{1,2,12,15},{1,2,13},{1,2,13,14},{1,2,13,14,15},{1,2,13,15},{1,2,14},{1,2,14,15},{1,2,15},{1,3},{1,3,4},{1,3,4,5},{1,3,4,5,6},{1,3,4,5,6,7},{1,3,4,5,6,7,8},{1,3,4,5,6,7,8,9},{1,3,4,5,6,7,8,9,10},{1,3,4,5,6,7,8,9,10,11},{1,3,4,5,6,7,8,9,10,11,12},{1,3,4,5,6,7,8,9,10,11,12,13},{1,3,4,5,6,7,8,9,10,11,12,13,14},{1,3,4,5,6,7,8,9,10,11,12,13,14,15},{1,3,4,5,6,7,8,9,10,11,12,13,15},{1,3,4,5,6,7,8,9,10,11,12,14},{1,3,4,5,6,7,8,9,10,11,12,14,15},{1,3,4,5,6,7,8,9,10,11,12,15},{1,3,4,5,6,7,8,9,10,11,13},{1,3,4,5,6,7,8,9,10,11,13,14},{1,3,4,5,6,7,8,9,10,11,13,14,15},{1,3,4,5,6,7,8,9,10,11,13,15},{1,3,4,5,6,7,8,9,10,11,14},{1,3,4,5,6,7,8,9,10,11,14,15},{1,3,4,5,6,7,8,9,10,11,15},{1,3,4,5,6,7,8,9,10,12},{1,3,4,5,6,7,8,9,10,12,13},{1,3,4,5,6,7,8,9,10,12,13,14},{1,3,4,5,6,7,8,9,10,12,13,14,15},{1,3,4,5,6,7,8,9,10,12,13,15},{1,3,4,5,6,7,8,9,10,12,14},{1,3,4,5,6,7,8,9,10,12,14,15},{1,3,4,5,6,7,8,9,10,12,15},{1,3,4,5,6,7,8,9,10,13},{1,3,4,5,6,7,8,9,10,13,14},{1,3,4,5,6,7,8,9,10,13,14,15},{1,3,4,5,6,7,8,9,10,13,15},{1,3,4,5,6,7,8,9,10,14},{1,3,4,5,6,7,8,9,10,14,15},{1,3,4,5,6,7,8,9,10,15},{1,3,4,5,6,7,8,9,11},{1,3,4,5,6,7,8,9,11,12},{1,3,4,5,6,7,8,9,11,12,13},{1,3,4,5,6,7,8,9,11,12,13,14},{1,3,4,5,6,7,8,9,11,12,13,14,15},{1,3,4,5,6,7,8,9,11,12,13,15},{1,3,4,5,6,7,8,9,11,12,14},{1,3,4,5,6,7,8,9,11,12,14,15},{1,3,4,5,6,7,8,9,11,12,15},{1,3,4,5,6,7,8,9,11,13},{1,3,4,5,6,7,8,9,11,13,14},{1,3,4,5,6,7,8,9,11,13,14,15},{1,3,4,5,6,7,8,9,11,13,15},{1,3,4,5,6,7,8,9,11,14},{1,3,4,5,6,7,8,9,11,14,15},{1,3,4,5,6,7,8,9,11,15},{1,3,4,5,6,7,8,9,12},{1,3,4,5,6,7,8,9,12,13},{1,3,4,5,6,7,8,9,12,13,14},{1,3,4,5,6,7,8,9,12,13,14,15},{1,3,4,5,6,7,8,9,12,13,15},{1,3,4,5,6,7,8,9,12,14},{1,3,4,5,6,7,8,9,12,14,15},{1,3,4,5,6,7,8,9,12,15},{1,3,4,5,6,7,8,9,13},{1,3,4,5,6,7,8,9,13,14},{1,3,4,5,6,7,8,9,13,14,15},{1,3,4,5,6,7,8,9,13,15},{1,3,4,5,6,7,8,9,14},{1,3,4,5,6,7,8,9,14,15},{1,3,4,5,6,7,8,9,15},{1,3,4,5,6,7,8,10},{1,3,4,5,6,7,8,10,11},{1,3,4,5,6,7,8,10,11,12},{1,3,4,5,6,7,8,10,11,12,13},{1,3,4,5,6,7,8,10,11,12,13,14},{1,3,4,5,6,7,8,10,11,12,13,14,15},{1,3,4,5,6,7,8,10,11,12,13,15},{1,3,4,5,6,7,8,10,11,12,14},{1,3,4,5,6,7,8,10,11,12,14,15},{1,3,4,5,6,7,8,10,11,12,15},{1,3,4,5,6,7,8,10,11,13},{1,3,4,5,6,7,8,10,11,13,14},{1,3,4,5,6,7,8,10,11,13,14,15},{1,3,4,5,6,7,8,10,11,13,15},{1,3,4,5,6,7,8,10,11,14},{1,3,4,5,6,7,8,10,11,14,15},{1,3,4,5,6,7,8,10,11,15},{1,3,4,5,6,7,8,10,12},{1,3,4,5,6,7,8,10,12,13},{1,3,4,5,6,7,8,10,12,13,14},{1,3,4,5,6,7,8,10,12,13,14,15},{1,3,4,5,6,7,8,10,12,13,15},{1,3,4,5,6,7,8,10,12,14},{1,3,4,5,6,7,8,10,12,14,15},{1,3,4,5,6,7,8,10,12,15},{1,3,4,5,6,7,8,10,13},{1,3,4,5,6,7,8,10,13,14},{1,3,4,5,6,7,8,10,13,14,15},{1,3,4,5,6,7,8,10,13,15},{1,3,4,5,6,7,8,10,14},{1,3,4,5,6,7,8,10,14,15},{1,3,4,5,6,7,8,10,15},{1,3,4,5,6,7,8,11},{1,3,4,5,6,7,8,11,12},{1,3,4,5,6,7,8,11,12,13},{1,3,4,5,6,7,8,11,12,13,14},{1,3,4,5,6,7,8,11,12,13,14,15},{1,3,4,5,6,7,8,11,12,13,15},{1,3,4,5,6,7,8,11,12,14},{1,3,4,5,6,7,8,11,12,14,15},{1,3,4,5,6,7,8,11,12,15},{1,3,4,5,6,7,8,11,13},{1,3,4,5,6,7,8,11,13,14},{1,3,4,5,6,7,8,11,13,14,15},{1,3,4,5,6,7,8,11,13,15},{1,3,4,5,6,7,8,11,14},{1,3,4,5,6,7,8,11,14,15},{1,3,4,5,6,7,8,11,15},{1,3,4,5,6,7,8,12},{1,3,4,5,6,7,8,12,13},{1,3,4,5,6,7,8,12,13,14},{1,3,4,5,6,7,8,12,13,14,15},{1,3,4,5,6,7,8,12,13,15},{1,3,4,5,6,7,8,12,14},{1,3,4,5,6,7,8,12,14,15},{1,3,4,5,6,7,8,12,15},{1,3,4,5,6,7,8,13},{1,3,4,5,6,7,8,13,14},{1,3,4,5,6,7,8,13,14,15},{1,3,4,5,6,7,8,13,15},{1,3,4,5,6,7,8,14},{1,3,4,5,6,7,8,14,15},{1,3,4,5,6,7,8,15},{1,3,4,5,6,7,9},{1,3,4,5,6,7,9,10},{1,3,4,5,6,7,9,10,11},{1,3,4,5,6,7,9,10,11,12},{1,3,4,5,6,7,9,10,11,12,13},{1,3,4,5,6,7,9,10,11,12,13,14},{1,3,4,5,6,7,9,10,11,12,13,14,15},{1,3,4,5,6,7,9,10,11,12,13,15},{1,3,4,5,6,7,9,10,11,12,14},{1,3,4,5,6,7,9,10,11,12,14,15},{1,3,4,5,6,7,9,10,11,12,15},{1,3,4,5,6,7,9,10,11,13},{1,3,4,5,6,7,9,10,11,13,14},{1,3,4,5,6,7,9,10,11,13,14,15},{1,3,4,5,6,7,9,10,11,13,15},{1,3,4,5,6,7,9,10,11,14},{1,3,4,5,6,7,9,10,11,14,15},{1,3,4,5,6,7,9,10,11,15},{1,3,4,5,6,7,9,10,12},{1,3,4,5,6,7,9,10,12,13},{1,3,4,5,6,7,9,10,12,13,14},{1,3,4,5,6,7,9,10,12,13,14,15},{1,3,4,5,6,7,9,10,12,13,15},{1,3,4,5,6,7,9,10,12,14},{1,3,4,5,6,7,9,10,12,14,15},{1,3,4,5,6,7,9,10,12,15},{1,3,4,5,6,7,9,10,13},{1,3,4,5,6,7,9,10,13,14},{1,3,4,5,6,7,9,10,13,14,15},{1,3,4,5,6,7,9,10,13,15},{1,3,4,5,6,7,9,10,14},{1,3,4,5,6,7,9,10,14,15},{1,3,4,5,6,7,9,10,15},{1,3,4,5,6,7,9,11},{1,3,4,5,6,7,9,11,12},{1,3,4,5,6,7,9,11,12,13},{1,3,4,5,6,7,9,11,12,13,14},{1,3,4,5,6,7,9,11,12,13,14,15},{1,3,4,5,6,7,9,11,12,13,15},{1,3,4,5,6,7,9,11,12,14},{1,3,4,5,6,7,9,11,12,14,15},{1,3,4,5,6,7,9,11,12,15},{1,3,4,5,6,7,9,11,13},{1,3,4,5,6,7,9,11,13,14},{1,3,4,5,6,7,9,11,13,14,15},{1,3,4,5,6,7,9,11,13,15},{1,3,4,5,6,7,9,11,14},{1,3,4,5,6,7,9,11,14,15},{1,3,4,5,6,7,9,11,15},{1,3,4,5,6,7,9,12},{1,3,4,5,6,7,9,12,13},{1,3,4,5,6,7,9,12,13,14},{1,3,4,5,6,7,9,12,13,14,15},{1,3,4,5,6,7,9,12,13,15},{1,3,4,5,6,7,9,12,14},{1,3,4,5,6,7,9,12,14,15},{1,3,4,5,6,7,9,12,15},{1,3,4,5,6,7,9,13},{1,3,4,5,6,7,9,13,14},{1,3,4,5,6,7,9,13,14,15},{1,3,4,5,6,7,9,13,15},{1,3,4,5,6,7,9,14},{1,3,4,5,6,7,9,14,15},{1,3,4,5,6,7,9,15},{1,3,4,5,6,7,10},{1,3,4,5,6,7,10,11},{1,3,4,5,6,7,10,11,12},{1,3,4,5,6,7,10,11,12,13},{1,3,4,5,6,7,10,11,12,13,14},{1,3,4,5,6,7,10,11,12,13,14,15},{1,3,4,5,6,7,10,11,12,13,15},{1,3,4,5,6,7,10,11,12,14},{1,3,4,5,6,7,10,11,12,14,15},{1,3,4,5,6,7,10,11,12,15},{1,3,4,5,6,7,10,11,13},{1,3,4,5,6,7,10,11,13,14},{1,3,4,5,6,7,10,11,13,14,15},{1,3,4,5,6,7,10,11,13,15},{1,3,4,5,6,7,10,11,14},{1,3,4,5,6,7,10,11,14,15},{1,3,4,5,6,7,10,11,15},{1,3,4,5,6,7,10,12},{1,3,4,5,6,7,10,12,13},{1,3,4,5,6,7,10,12,13,14},{1,3,4,5,6,7,10,12,13,14,15},{1,3,4,5,6,7,10,12,13,15},{1,3,4,5,6,7,10,12,14},{1,3,4,5,6,7,10,12,14,15},{1,3,4,5,6,7,10,12,15},{1,3,4,5,6,7,10,13},{1,3,4,5,6,7,10,13,14},{1,3,4,5,6,7,10,13,14,15},{1,3,4,5,6,7,10,13,15},{1,3,4,5,6,7,10,14},{1,3,4,5,6,7,10,14,15},{1,3,4,5,6,7,10,15},{1,3,4,5,6,7,11},{1,3,4,5,6,7,11,12},{1,3,4,5,6,7,11,12,13},{1,3,4,5,6,7,11,12,13,14},{1,3,4,5,6,7,11,12,13,14,15},{1,3,4,5,6,7,11,12,13,15},{1,3,4,5,6,7,11,12,14},{1,3,4,5,6,7,11,12,14,15},{1,3,4,5,6,7,11,12,15},{1,3,4,5,6,7,11,13},{1,3,4,5,6,7,11,13,14},{1,3,4,5,6,7,11,13,14,15},{1,3,4,5,6,7,11,13,15},{1,3,4,5,6,7,11,14},{1,3,4,5,6,7,11,14,15},{1,3,4,5,6,7,11,15},{1,3,4,5,6,7,12},{1,3,4,5,6,7,12,13},{1,3,4,5,6,7,12,13,14},{1,3,4,5,6,7,12,13,14,15},{1,3,4,5,6,7,12,13,15},{1,3,4,5,6,7,12,14},{1,3,4,5,6,7,12,14,15},{1,3,4,5,6,7,12,15},{1,3,4,5,6,7,13},{1,3,4,5,6,7,13,14},{1,3,4,5,6,7,13,14,15},{1,3,4,5,6,7,13,15},{1,3,4,5,6,7,14},{1,3,4,5,6,7,14,15},{1,3,4,5,6,7,15},{1,3,4,5,6,8},{1,3,4,5,6,8,9},{1,3,4,5,6,8,9,10},{1,3,4,5,6,8,9,10,11},{1,3,4,5,6,8,9,10,11,12},{1,3,4,5,6,8,9,10,11,12,13},{1,3,4,5,6,8,9,10,11,12,13,14},{1,3,4,5,6,8,9,10,11,12,13,14,15},{1,3,4,5,6,8,9,10,11,12,13,15},{1,3,4,5,6,8,9,10,11,12,14},{1,3,4,5,6,8,9,10,11,12,14,15},{1,3,4,5,6,8,9,10,11,12,15},{1,3,4,5,6,8,9,10,11,13},{1,3,4,5,6,8,9,10,11,13,14},{1,3,4,5,6,8,9,10,11,13,14,15},{1,3,4,5,6,8,9,10,11,13,15},{1,3,4,5,6,8,9,10,11,14},{1,3,4,5,6,8,9,10,11,14,15},{1,3,4,5,6,8,9,10,11,15},{1,3,4,5,6,8,9,10,12},{1,3,4,5,6,8,9,10,12,13},{1,3,4,5,6,8,9,10,12,13,14},{1,3,4,5,6,8,9,10,12,13,14,15},{1,3,4,5,6,8,9,10,12,13,15},{1,3,4,5,6,8,9,10,12,14},{1,3,4,5,6,8,9,10,12,14,15},{1,3,4,5,6,8,9,10,12,15},{1,3,4,5,6,8,9,10,13},{1,3,4,5,6,8,9,10,13,14},{1,3,4,5,6,8,9,10,13,14,15},{1,3,4,5,6,8,9,10,13,15},{1,3,4,5,6,8,9,10,14},{1,3,4,5,6,8,9,10,14,15},{1,3,4,5,6,8,9,10,15},{1,3,4,5,6,8,9,11},{1,3,4,5,6,8,9,11,12},{1,3,4,5,6,8,9,11,12,13},{1,3,4,5,6,8,9,11,12,13,14},{1,3,4,5,6,8,9,11,12,13,14,15},{1,3,4,5,6,8,9,11,12,13,15},{1,3,4,5,6,8,9,11,12,14},{1,3,4,5,6,8,9,11,12,14,15},{1,3,4,5,6,8,9,11,12,15},{1,3,4,5,6,8,9,11,13},{1,3,4,5,6,8,9,11,13,14},{1,3,4,5,6,8,9,11,13,14,15},{1,3,4,5,6,8,9,11,13,15},{1,3,4,5,6,8,9,11,14},{1,3,4,5,6,8,9,11,14,15},{1,3,4,5,6,8,9,11,15},{1,3,4,5,6,8,9,12},{1,3,4,5,6,8,9,12,13},{1,3,4,5,6,8,9,12,13,14},{1,3,4,5,6,8,9,12,13,14,15},{1,3,4,5,6,8,9,12,13,15},{1,3,4,5,6,8,9,12,14},{1,3,4,5,6,8,9,12,14,15},{1,3,4,5,6,8,9,12,15},{1,3,4,5,6,8,9,13},{1,3,4,5,6,8,9,13,14},{1,3,4,5,6,8,9,13,14,15},{1,3,4,5,6,8,9,13,15},{1,3,4,5,6,8,9,14},{1,3,4,5,6,8,9,14,15},{1,3,4,5,6,8,9,15},{1,3,4,5,6,8,10},{1,3,4,5,6,8,10,11},{1,3,4,5,6,8,10,11,12},{1,3,4,5,6,8,10,11,12,13},{1,3,4,5,6,8,10,11,12,13,14},{1,3,4,5,6,8,10,11,12,13,14,15},{1,3,4,5,6,8,10,11,12,13,15},{1,3,4,5,6,8,10,11,12,14},{1,3,4,5,6,8,10,11,12,14,15},{1,3,4,5,6,8,10,11,12,15},{1,3,4,5,6,8,10,11,13},{1,3,4,5,6,8,10,11,13,14},{1,3,4,5,6,8,10,11,13,14,15},{1,3,4,5,6,8,10,11,13,15},{1,3,4,5,6,8,10,11,14},{1,3,4,5,6,8,10,11,14,15},{1,3,4,5,6,8,10,11,15},{1,3,4,5,6,8,10,12},{1,3,4,5,6,8,10,12,13},{1,3,4,5,6,8,10,12,13,14},{1,3,4,5,6,8,10,12,13,14,15},{1,3,4,5,6,8,10,12,13,15},{1,3,4,5,6,8,10,12,14},{1,3,4,5,6,8,10,12,14,15},{1,3,4,5,6,8,10,12,15},{1,3,4,5,6,8,10,13},{1,3,4,5,6,8,10,13,14},{1,3,4,5,6,8,10,13,14,15},{1,3,4,5,6,8,10,13,15},{1,3,4,5,6,8,10,14},{1,3,4,5,6,8,10,14,15},{1,3,4,5,6,8,10,15},{1,3,4,5,6,8,11},{1,3,4,5,6,8,11,12},{1,3,4,5,6,8,11,12,13},{1,3,4,5,6,8,11,12,13,14},{1,3,4,5,6,8,11,12,13,14,15},{1,3,4,5,6,8,11,12,13,15},{1,3,4,5,6,8,11,12,14},{1,3,4,5,6,8,11,12,14,15},{1,3,4,5,6,8,11,12,15},{1,3,4,5,6,8,11,13},{1,3,4,5,6,8,11,13,14},{1,3,4,5,6,8,11,13,14,15},{1,3,4,5,6,8,11,13,15},{1,3,4,5,6,8,11,14},{1,3,4,5,6,8,11,14,15},{1,3,4,5,6,8,11,15},{1,3,4,5,6,8,12},{1,3,4,5,6,8,12,13},{1,3,4,5,6,8,12,13,14},{1,3,4,5,6,8,12,13,14,15},{1,3,4,5,6,8,12,13,15},{1,3,4,5,6,8,12,14},{1,3,4,5,6,8,12,14,15},{1,3,4,5,6,8,12,15},{1,3,4,5,6,8,13},{1,3,4,5,6,8,13,14},{1,3,4,5,6,8,13,14,15},{1,3,4,5,6,8,13,15},{1,3,4,5,6,8,14},{1,3,4,5,6,8,14,15},{1,3,4,5,6,8,15},{1,3,4,5,6,9},{1,3,4,5,6,9,10},{1,3,4,5,6,9,10,11},{1,3,4,5,6,9,10,11,12},{1,3,4,5,6,9,10,11,12,13},{1,3,4,5,6,9,10,11,12,13,14},{1,3,4,5,6,9,10,11,12,13,14,15},{1,3,4,5,6,9,10,11,12,13,15},{1,3,4,5,6,9,10,11,12,14},{1,3,4,5,6,9,10,11,12,14,15},{1,3,4,5,6,9,10,11,12,15},{1,3,4,5,6,9,10,11,13},{1,3,4,5,6,9,10,11,13,14},{1,3,4,5,6,9,10,11,13,14,15},{1,3,4,5,6,9,10,11,13,15},{1,3,4,5,6,9,10,11,14},{1,3,4,5,6,9,10,11,14,15},{1,3,4,5,6,9,10,11,15},{1,3,4,5,6,9,10,12},{1,3,4,5,6,9,10,12,13},{1,3,4,5,6,9,10,12,13,14},{1,3,4,5,6,9,10,12,13,14,15},{1,3,4,5,6,9,10,12,13,15},{1,3,4,5,6,9,10,12,14},{1,3,4,5,6,9,10,12,14,15},{1,3,4,5,6,9,10,12,15},{1,3,4,5,6,9,10,13},{1,3,4,5,6,9,10,13,14},{1,3,4,5,6,9,10,13,14,15},{1,3,4,5,6,9,10,13,15},{1,3,4,5,6,9,10,14},{1,3,4,5,6,9,10,14,15},{1,3,4,5,6,9,10,15},{1,3,4,5,6,9,11},{1,3,4,5,6,9,11,12},{1,3,4,5,6,9,11,12,13},{1,3,4,5,6,9,11,12,13,14},{1,3,4,5,6,9,11,12,13,14,15},{1,3,4,5,6,9,11,12,13,15},{1,3,4,5,6,9,11,12,14},{1,3,4,5,6,9,11,12,14,15},{1,3,4,5,6,9,11,12,15},{1,3,4,5,6,9,11,13},{1,3,4,5,6,9,11,13,14},{1,3,4,5,6,9,11,13,14,15},{1,3,4,5,6,9,11,13,15},{1,3,4,5,6,9,11,14},{1,3,4,5,6,9,11,14,15},{1,3,4,5,6,9,11,15},{1,3,4,5,6,9,12},{1,3,4,5,6,9,12,13},{1,3,4,5,6,9,12,13,14},{1,3,4,5,6,9,12,13,14,15},{1,3,4,5,6,9,12,13,15},{1,3,4,5,6,9,12,14},{1,3,4,5,6,9,12,14,15},{1,3,4,5,6,9,12,15},{1,3,4,5,6,9,13},{1,3,4,5,6,9,13,14},{1,3,4,5,6,9,13,14,15},{1,3,4,5,6,9,13,15},{1,3,4,5,6,9,14},{1,3,4,5,6,9,14,15},{1,3,4,5,6,9,15},{1,3,4,5,6,10},{1,3,4,5,6,10,11},{1,3,4,5,6,10,11,12},{1,3,4,5,6,10,11,12,13},{1,3,4,5,6,10,11,12,13,14},{1,3,4,5,6,10,11,12,13,14,15},{1,3,4,5,6,10,11,12,13,15},{1,3,4,5,6,10,11,12,14},{1,3,4,5,6,10,11,12,14,15},{1,3,4,5,6,10,11,12,15},{1,3,4,5,6,10,11,13},{1,3,4,5,6,10,11,13,14},{1,3,4,5,6,10,11,13,14,15},{1,3,4,5,6,10,11,13,15},{1,3,4,5,6,10,11,14},{1,3,4,5,6,10,11,14,15},{1,3,4,5,6,10,11,15},{1,3,4,5,6,10,12},{1,3,4,5,6,10,12,13},{1,3,4,5,6,10,12,13,14},{1,3,4,5,6,10,12,13,14,15},{1,3,4,5,6,10,12,13,15},{1,3,4,5,6,10,12,14},{1,3,4,5,6,10,12,14,15},{1,3,4,5,6,10,12,15},{1,3,4,5,6,10,13},{1,3,4,5,6,10,13,14},{1,3,4,5,6,10,13,14,15},{1,3,4,5,6,10,13,15},{1,3,4,5,6,10,14},{1,3,4,5,6,10,14,15},{1,3,4,5,6,10,15},{1,3,4,5,6,11},{1,3,4,5,6,11,12},{1,3,4,5,6,11,12,13},{1,3,4,5,6,11,12,13,14},{1,3,4,5,6,11,12,13,14,15},{1,3,4,5,6,11,12,13,15},{1,3,4,5,6,11,12,14},{1,3,4,5,6,11,12,14,15},{1,3,4,5,6,11,12,15},{1,3,4,5,6,11,13},{1,3,4,5,6,11,13,14},{1,3,4,5,6,11,13,14,15},{1,3,4,5,6,11,13,15},{1,3,4,5,6,11,14},{1,3,4,5,6,11,14,15},{1,3,4,5,6,11,15},{1,3,4,5,6,12},{1,3,4,5,6,12,13},{1,3,4,5,6,12,13,14},{1,3,4,5,6,12,13,14,15},{1,3,4,5,6,12,13,15},{1,3,4,5,6,12,14},{1,3,4,5,6,12,14,15},{1,3,4,5,6,12,15},{1,3,4,5,6,13},{1,3,4,5,6,13,14},{1,3,4,5,6,13,14,15},{1,3,4,5,6,13,15},{1,3,4,5,6,14},{1,3,4,5,6,14,15},{1,3,4,5,6,15},{1,3,4,5,7},{1,3,4,5,7,8},{1,3,4,5,7,8,9},{1,3,4,5,7,8,9,10},{1,3,4,5,7,8,9,10,11},{1,3,4,5,7,8,9,10,11,12},{1,3,4,5,7,8,9,10,11,12,13},{1,3,4,5,7,8,9,10,11,12,13,14},{1,3,4,5,7,8,9,10,11,12,13,14,15},{1,3,4,5,7,8,9,10,11,12,13,15},{1,3,4,5,7,8,9,10,11,12,14},{1,3,4,5,7,8,9,10,11,12,14,15},{1,3,4,5,7,8,9,10,11,12,15},{1,3,4,5,7,8,9,10,11,13},{1,3,4,5,7,8,9,10,11,13,14},{1,3,4,5,7,8,9,10,11,13,14,15},{1,3,4,5,7,8,9,10,11,13,15},{1,3,4,5,7,8,9,10,11,14},{1,3,4,5,7,8,9,10,11,14,15},{1,3,4,5,7,8,9,10,11,15},{1,3,4,5,7,8,9,10,12},{1,3,4,5,7,8,9,10,12,13},{1,3,4,5,7,8,9,10,12,13,14},{1,3,4,5,7,8,9,10,12,13,14,15},{1,3,4,5,7,8,9,10,12,13,15},{1,3,4,5,7,8,9,10,12,14},{1,3,4,5,7,8,9,10,12,14,15},{1,3,4,5,7,8,9,10,12,15},{1,3,4,5,7,8,9,10,13},{1,3,4,5,7,8,9,10,13,14},{1,3,4,5,7,8,9,10,13,14,15},{1,3,4,5,7,8,9,10,13,15},{1,3,4,5,7,8,9,10,14},{1,3,4,5,7,8,9,10,14,15},{1,3,4,5,7,8,9,10,15},{1,3,4,5,7,8,9,11},{1,3,4,5,7,8,9,11,12},{1,3,4,5,7,8,9,11,12,13},{1,3,4,5,7,8,9,11,12,13,14},{1,3,4,5,7,8,9,11,12,13,14,15},{1,3,4,5,7,8,9,11,12,13,15},{1,3,4,5,7,8,9,11,12,14},{1,3,4,5,7,8,9,11,12,14,15},{1,3,4,5,7,8,9,11,12,15},{1,3,4,5,7,8,9,11,13},{1,3,4,5,7,8,9,11,13,14},{1,3,4,5,7,8,9,11,13,14,15},{1,3,4,5,7,8,9,11,13,15},{1,3,4,5,7,8,9,11,14},{1,3,4,5,7,8,9,11,14,15},{1,3,4,5,7,8,9,11,15},{1,3,4,5,7,8,9,12},{1,3,4,5,7,8,9,12,13},{1,3,4,5,7,8,9,12,13,14},{1,3,4,5,7,8,9,12,13,14,15},{1,3,4,5,7,8,9,12,13,15},{1,3,4,5,7,8,9,12,14},{1,3,4,5,7,8,9,12,14,15},{1,3,4,5,7,8,9,12,15},{1,3,4,5,7,8,9,13},{1,3,4,5,7,8,9,13,14},{1,3,4,5,7,8,9,13,14,15},{1,3,4,5,7,8,9,13,15},{1,3,4,5,7,8,9,14},{1,3,4,5,7,8,9,14,15},{1,3,4,5,7,8,9,15},{1,3,4,5,7,8,10},{1,3,4,5,7,8,10,11},{1,3,4,5,7,8,10,11,12},{1,3,4,5,7,8,10,11,12,13},{1,3,4,5,7,8,10,11,12,13,14},{1,3,4,5,7,8,10,11,12,13,14,15},{1,3,4,5,7,8,10,11,12,13,15},{1,3,4,5,7,8,10,11,12,14},{1,3,4,5,7,8,10,11,12,14,15},{1,3,4,5,7,8,10,11,12,15},{1,3,4,5,7,8,10,11,13},{1,3,4,5,7,8,10,11,13,14},{1,3,4,5,7,8,10,11,13,14,15},{1,3,4,5,7,8,10,11,13,15},{1,3,4,5,7,8,10,11,14},{1,3,4,5,7,8,10,11,14,15},{1,3,4,5,7,8,10,11,15},{1,3,4,5,7,8,10,12},{1,3,4,5,7,8,10,12,13},{1,3,4,5,7,8,10,12,13,14},{1,3,4,5,7,8,10,12,13,14,15},{1,3,4,5,7,8,10,12,13,15},{1,3,4,5,7,8,10,12,14},{1,3,4,5,7,8,10,12,14,15},{1,3,4,5,7,8,10,12,15},{1,3,4,5,7,8,10,13},{1,3,4,5,7,8,10,13,14},{1,3,4,5,7,8,10,13,14,15},{1,3,4,5,7,8,10,13,15},{1,3,4,5,7,8,10,14},{1,3,4,5,7,8,10,14,15},{1,3,4,5,7,8,10,15},{1,3,4,5,7,8,11},{1,3,4,5,7,8,11,12},{1,3,4,5,7,8,11,12,13},{1,3,4,5,7,8,11,12,13,14},{1,3,4,5,7,8,11,12,13,14,15},{1,3,4,5,7,8,11,12,13,15},{1,3,4,5,7,8,11,12,14},{1,3,4,5,7,8,11,12,14,15},{1,3,4,5,7,8,11,12,15},{1,3,4,5,7,8,11,13},{1,3,4,5,7,8,11,13,14},{1,3,4,5,7,8,11,13,14,15},{1,3,4,5,7,8,11,13,15},{1,3,4,5,7,8,11,14},{1,3,4,5,7,8,11,14,15},{1,3,4,5,7,8,11,15},{1,3,4,5,7,8,12},{1,3,4,5,7,8,12,13},{1,3,4,5,7,8,12,13,14},{1,3,4,5,7,8,12,13,14,15},{1,3,4,5,7,8,12,13,15},{1,3,4,5,7,8,12,14},{1,3,4,5,7,8,12,14,15},{1,3,4,5,7,8,12,15},{1,3,4,5,7,8,13},{1,3,4,5,7,8,13,14},{1,3,4,5,7,8,13,14,15},{1,3,4,5,7,8,13,15},{1,3,4,5,7,8,14},{1,3,4,5,7,8,14,15},{1,3,4,5,7,8,15},{1,3,4,5,7,9},{1,3,4,5,7,9,10},{1,3,4,5,7,9,10,11},{1,3,4,5,7,9,10,11,12},{1,3,4,5,7,9,10,11,12,13},{1,3,4,5,7,9,10,11,12,13,14},{1,3,4,5,7,9,10,11,12,13,14,15},{1,3,4,5,7,9,10,11,12,13,15},{1,3,4,5,7,9,10,11,12,14},{1,3,4,5,7,9,10,11,12,14,15},{1,3,4,5,7,9,10,11,12,15},{1,3,4,5,7,9,10,11,13},{1,3,4,5,7,9,10,11,13,14},{1,3,4,5,7,9,10,11,13,14,15},{1,3,4,5,7,9,10,11,13,15},{1,3,4,5,7,9,10,11,14},{1,3,4,5,7,9,10,11,14,15},{1,3,4,5,7,9,10,11,15},{1,3,4,5,7,9,10,12},{1,3,4,5,7,9,10,12,13},{1,3,4,5,7,9,10,12,13,14},{1,3,4,5,7,9,10,12,13,14,15},{1,3,4,5,7,9,10,12,13,15},{1,3,4,5,7,9,10,12,14},{1,3,4,5,7,9,10,12,14,15},{1,3,4,5,7,9,10,12,15},{1,3,4,5,7,9,10,13},{1,3,4,5,7,9,10,13,14},{1,3,4,5,7,9,10,13,14,15},{1,3,4,5,7,9,10,13,15},{1,3,4,5,7,9,10,14},{1,3,4,5,7,9,10,14,15},{1,3,4,5,7,9,10,15},{1,3,4,5,7,9,11},{1,3,4,5,7,9,11,12},{1,3,4,5,7,9,11,12,13},{1,3,4,5,7,9,11,12,13,14},{1,3,4,5,7,9,11,12,13,14,15},{1,3,4,5,7,9,11,12,13,15},{1,3,4,5,7,9,11,12,14},{1,3,4,5,7,9,11,12,14,15},{1,3,4,5,7,9,11,12,15},{1,3,4,5,7,9,11,13},{1,3,4,5,7,9,11,13,14},{1,3,4,5,7,9,11,13,14,15},{1,3,4,5,7,9,11,13,15},{1,3,4,5,7,9,11,14},{1,3,4,5,7,9,11,14,15},{1,3,4,5,7,9,11,15},{1,3,4,5,7,9,12},{1,3,4,5,7,9,12,13},{1,3,4,5,7,9,12,13,14},{1,3,4,5,7,9,12,13,14,15},{1,3,4,5,7,9,12,13,15},{1,3,4,5,7,9,12,14},{1,3,4,5,7,9,12,14,15},{1,3,4,5,7,9,12,15},{1,3,4,5,7,9,13},{1,3,4,5,7,9,13,14},{1,3,4,5,7,9,13,14,15},{1,3,4,5,7,9,13,15},{1,3,4,5,7,9,14},{1,3,4,5,7,9,14,15},{1,3,4,5,7,9,15},{1,3,4,5,7,10},{1,3,4,5,7,10,11},{1,3,4,5,7,10,11,12},{1,3,4,5,7,10,11,12,13},{1,3,4,5,7,10,11,12,13,14},{1,3,4,5,7,10,11,12,13,14,15},{1,3,4,5,7,10,11,12,13,15},{1,3,4,5,7,10,11,12,14},{1,3,4,5,7,10,11,12,14,15},{1,3,4,5,7,10,11,12,15},{1,3,4,5,7,10,11,13},{1,3,4,5,7,10,11,13,14},{1,3,4,5,7,10,11,13,14,15},{1,3,4,5,7,10,11,13,15},{1,3,4,5,7,10,11,14},{1,3,4,5,7,10,11,14,15},{1,3,4,5,7,10,11,15},{1,3,4,5,7,10,12},{1,3,4,5,7,10,12,13},{1,3,4,5,7,10,12,13,14},{1,3,4,5,7,10,12,13,14,15},{1,3,4,5,7,10,12,13,15},{1,3,4,5,7,10,12,14},{1,3,4,5,7,10,12,14,15},{1,3,4,5,7,10,12,15},{1,3,4,5,7,10,13},{1,3,4,5,7,10,13,14},{1,3,4,5,7,10,13,14,15},{1,3,4,5,7,10,13,15},{1,3,4,5,7,10,14},{1,3,4,5,7,10,14,15},{1,3,4,5,7,10,15},{1,3,4,5,7,11},{1,3,4,5,7,11,12},{1,3,4,5,7,11,12,13},{1,3,4,5,7,11,12,13,14},{1,3,4,5,7,11,12,13,14,15},{1,3,4,5,7,11,12,13,15},{1,3,4,5,7,11,12,14},{1,3,4,5,7,11,12,14,15},{1,3,4,5,7,11,12,15},{1,3,4,5,7,11,13},{1,3,4,5,7,11,13,14},{1,3,4,5,7,11,13,14,15},{1,3,4,5,7,11,13,15},{1,3,4,5,7,11,14},{1,3,4,5,7,11,14,15},{1,3,4,5,7,11,15},{1,3,4,5,7,12},{1,3,4,5,7,12,13},{1,3,4,5,7,12,13,14},{1,3,4,5,7,12,13,14,15},{1,3,4,5,7,12,13,15},{1,3,4,5,7,12,14},{1,3,4,5,7,12,14,15},{1,3,4,5,7,12,15},{1,3,4,5,7,13},{1,3,4,5,7,13,14},{1,3,4,5,7,13,14,15},{1,3,4,5,7,13,15},{1,3,4,5,7,14},{1,3,4,5,7,14,15},{1,3,4,5,7,15},{1,3,4,5,8},{1,3,4,5,8,9},{1,3,4,5,8,9,10},{1,3,4,5,8,9,10,11},{1,3,4,5,8,9,10,11,12},{1,3,4,5,8,9,10,11,12,13},{1,3,4,5,8,9,10,11,12,13,14},{1,3,4,5,8,9,10,11,12,13,14,15},{1,3,4,5,8,9,10,11,12,13,15},{1,3,4,5,8,9,10,11,12,14},{1,3,4,5,8,9,10,11,12,14,15},{1,3,4,5,8,9,10,11,12,15},{1,3,4,5,8,9,10,11,13},{1,3,4,5,8,9,10,11,13,14},{1,3,4,5,8,9,10,11,13,14,15},{1,3,4,5,8,9,10,11,13,15},{1,3,4,5,8,9,10,11,14},{1,3,4,5,8,9,10,11,14,15},{1,3,4,5,8,9,10,11,15},{1,3,4,5,8,9,10,12},{1,3,4,5,8,9,10,12,13},{1,3,4,5,8,9,10,12,13,14},{1,3,4,5,8,9,10,12,13,14,15},{1,3,4,5,8,9,10,12,13,15},{1,3,4,5,8,9,10,12,14},{1,3,4,5,8,9,10,12,14,15},{1,3,4,5,8,9,10,12,15},{1,3,4,5,8,9,10,13},{1,3,4,5,8,9,10,13,14},{1,3,4,5,8,9,10,13,14,15},{1,3,4,5,8,9,10,13,15},{1,3,4,5,8,9,10,14},{1,3,4,5,8,9,10,14,15},{1,3,4,5,8,9,10,15},{1,3,4,5,8,9,11},{1,3,4,5,8,9,11,12},{1,3,4,5,8,9,11,12,13},{1,3,4,5,8,9,11,12,13,14},{1,3,4,5,8,9,11,12,13,14,15},{1,3,4,5,8,9,11,12,13,15},{1,3,4,5,8,9,11,12,14},{1,3,4,5,8,9,11,12,14,15},{1,3,4,5,8,9,11,12,15},{1,3,4,5,8,9,11,13},{1,3,4,5,8,9,11,13,14},{1,3,4,5,8,9,11,13,14,15},{1,3,4,5,8,9,11,13,15},{1,3,4,5,8,9,11,14},{1,3,4,5,8,9,11,14,15},{1,3,4,5,8,9,11,15},{1,3,4,5,8,9,12},{1,3,4,5,8,9,12,13},{1,3,4,5,8,9,12,13,14},{1,3,4,5,8,9,12,13,14,15},{1,3,4,5,8,9,12,13,15},{1,3,4,5,8,9,12,14},{1,3,4,5,8,9,12,14,15},{1,3,4,5,8,9,12,15},{1,3,4,5,8,9,13},{1,3,4,5,8,9,13,14},{1,3,4,5,8,9,13,14,15},{1,3,4,5,8,9,13,15},{1,3,4,5,8,9,14},{1,3,4,5,8,9,14,15},{1,3,4,5,8,9,15},{1,3,4,5,8,10},{1,3,4,5,8,10,11},{1,3,4,5,8,10,11,12},{1,3,4,5,8,10,11,12,13},{1,3,4,5,8,10,11,12,13,14},{1,3,4,5,8,10,11,12,13,14,15},{1,3,4,5,8,10,11,12,13,15},{1,3,4,5,8,10,11,12,14},{1,3,4,5,8,10,11,12,14,15},{1,3,4,5,8,10,11,12,15},{1,3,4,5,8,10,11,13},{1,3,4,5,8,10,11,13,14},{1,3,4,5,8,10,11,13,14,15},{1,3,4,5,8,10,11,13,15},{1,3,4,5,8,10,11,14},{1,3,4,5,8,10,11,14,15},{1,3,4,5,8,10,11,15},{1,3,4,5,8,10,12},{1,3,4,5,8,10,12,13},{1,3,4,5,8,10,12,13,14},{1,3,4,5,8,10,12,13,14,15},{1,3,4,5,8,10,12,13,15},{1,3,4,5,8,10,12,14},{1,3,4,5,8,10,12,14,15},{1,3,4,5,8,10,12,15},{1,3,4,5,8,10,13},{1,3,4,5,8,10,13,14},{1,3,4,5,8,10,13,14,15},{1,3,4,5,8,10,13,15},{1,3,4,5,8,10,14},{1,3,4,5,8,10,14,15},{1,3,4,5,8,10,15},{1,3,4,5,8,11},{1,3,4,5,8,11,12},{1,3,4,5,8,11,12,13},{1,3,4,5,8,11,12,13,14},{1,3,4,5,8,11,12,13,14,15},{1,3,4,5,8,11,12,13,15},{1,3,4,5,8,11,12,14},{1,3,4,5,8,11,12,14,15},{1,3,4,5,8,11,12,15},{1,3,4,5,8,11,13},{1,3,4,5,8,11,13,14},{1,3,4,5,8,11,13,14,15},{1,3,4,5,8,11,13,15},{1,3,4,5,8,11,14},{1,3,4,5,8,11,14,15},{1,3,4,5,8,11,15},{1,3,4,5,8,12},{1,3,4,5,8,12,13},{1,3,4,5,8,12,13,14},{1,3,4,5,8,12,13,14,15},{1,3,4,5,8,12,13,15},{1,3,4,5,8,12,14},{1,3,4,5,8,12,14,15},{1,3,4,5,8,12,15},{1,3,4,5,8,13},{1,3,4,5,8,13,14},{1,3,4,5,8,13,14,15},{1,3,4,5,8,13,15},{1,3,4,5,8,14},{1,3,4,5,8,14,15},{1,3,4,5,8,15},{1,3,4,5,9},{1,3,4,5,9,10},{1,3,4,5,9,10,11},{1,3,4,5,9,10,11,12},{1,3,4,5,9,10,11,12,13},{1,3,4,5,9,10,11,12,13,14},{1,3,4,5,9,10,11,12,13,14,15},{1,3,4,5,9,10,11,12,13,15},{1,3,4,5,9,10,11,12,14},{1,3,4,5,9,10,11,12,14,15},{1,3,4,5,9,10,11,12,15},{1,3,4,5,9,10,11,13},{1,3,4,5,9,10,11,13,14},{1,3,4,5,9,10,11,13,14,15},{1,3,4,5,9,10,11,13,15},{1,3,4,5,9,10,11,14},{1,3,4,5,9,10,11,14,15},{1,3,4,5,9,10,11,15},{1,3,4,5,9,10,12},{1,3,4,5,9,10,12,13},{1,3,4,5,9,10,12,13,14},{1,3,4,5,9,10,12,13,14,15},{1,3,4,5,9,10,12,13,15},{1,3,4,5,9,10,12,14},{1,3,4,5,9,10,12,14,15},{1,3,4,5,9,10,12,15},{1,3,4,5,9,10,13},{1,3,4,5,9,10,13,14},{1,3,4,5,9,10,13,14,15},{1,3,4,5,9,10,13,15},{1,3,4,5,9,10,14},{1,3,4,5,9,10,14,15},{1,3,4,5,9,10,15},{1,3,4,5,9,11},{1,3,4,5,9,11,12},{1,3,4,5,9,11,12,13},{1,3,4,5,9,11,12,13,14},{1,3,4,5,9,11,12,13,14,15},{1,3,4,5,9,11,12,13,15},{1,3,4,5,9,11,12,14},{1,3,4,5,9,11,12,14,15},{1,3,4,5,9,11,12,15},{1,3,4,5,9,11,13},{1,3,4,5,9,11,13,14},{1,3,4,5,9,11,13,14,15},{1,3,4,5,9,11,13,15},{1,3,4,5,9,11,14},{1,3,4,5,9,11,14,15},{1,3,4,5,9,11,15},{1,3,4,5,9,12},{1,3,4,5,9,12,13},{1,3,4,5,9,12,13,14},{1,3,4,5,9,12,13,14,15},{1,3,4,5,9,12,13,15},{1,3,4,5,9,12,14},{1,3,4,5,9,12,14,15},{1,3,4,5,9,12,15},{1,3,4,5,9,13},{1,3,4,5,9,13,14},{1,3,4,5,9,13,14,15},{1,3,4,5,9,13,15},{1,3,4,5,9,14},{1,3,4,5,9,14,15},{1,3,4,5,9,15},{1,3,4,5,10},{1,3,4,5,10,11},{1,3,4,5,10,11,12},{1,3,4,5,10,11,12,13},{1,3,4,5,10,11,12,13,14},{1,3,4,5,10,11,12,13,14,15},{1,3,4,5,10,11,12,13,15},{1,3,4,5,10,11,12,14},{1,3,4,5,10,11,12,14,15},{1,3,4,5,10,11,12,15},{1,3,4,5,10,11,13},{1,3,4,5,10,11,13,14},{1,3,4,5,10,11,13,14,15},{1,3,4,5,10,11,13,15},{1,3,4,5,10,11,14},{1,3,4,5,10,11,14,15},{1,3,4,5,10,11,15},{1,3,4,5,10,12},{1,3,4,5,10,12,13},{1,3,4,5,10,12,13,14},{1,3,4,5,10,12,13,14,15},{1,3,4,5,10,12,13,15},{1,3,4,5,10,12,14},{1,3,4,5,10,12,14,15},{1,3,4,5,10,12,15},{1,3,4,5,10,13},{1,3,4,5,10,13,14},{1,3,4,5,10,13,14,15},{1,3,4,5,10,13,15},{1,3,4,5,10,14},{1,3,4,5,10,14,15},{1,3,4,5,10,15},{1,3,4,5,11},{1,3,4,5,11,12},{1,3,4,5,11,12,13},{1,3,4,5,11,12,13,14},{1,3,4,5,11,12,13,14,15},{1,3,4,5,11,12,13,15},{1,3,4,5,11,12,14},{1,3,4,5,11,12,14,15},{1,3,4,5,11,12,15},{1,3,4,5,11,13},{1,3,4,5,11,13,14},{1,3,4,5,11,13,14,15},{1,3,4,5,11,13,15},{1,3,4,5,11,14},{1,3,4,5,11,14,15},{1,3,4,5,11,15},{1,3,4,5,12},{1,3,4,5,12,13},{1,3,4,5,12,13,14},{1,3,4,5,12,13,14,15},{1,3,4,5,12,13,15},{1,3,4,5,12,14},{1,3,4,5,12,14,15},{1,3,4,5,12,15},{1,3,4,5,13},{1,3,4,5,13,14},{1,3,4,5,13,14,15},{1,3,4,5,13,15},{1,3,4,5,14},{1,3,4,5,14,15},{1,3,4,5,15},{1,3,4,6},{1,3,4,6,7},{1,3,4,6,7,8},{1,3,4,6,7,8,9},{1,3,4,6,7,8,9,10},{1,3,4,6,7,8,9,10,11},{1,3,4,6,7,8,9,10,11,12},{1,3,4,6,7,8,9,10,11,12,13},{1,3,4,6,7,8,9,10,11,12,13,14},{1,3,4,6,7,8,9,10,11,12,13,14,15},{1,3,4,6,7,8,9,10,11,12,13,15},{1,3,4,6,7,8,9,10,11,12,14},{1,3,4,6,7,8,9,10,11,12,14,15},{1,3,4,6,7,8,9,10,11,12,15},{1,3,4,6,7,8,9,10,11,13},{1,3,4,6,7,8,9,10,11,13,14},{1,3,4,6,7,8,9,10,11,13,14,15},{1,3,4,6,7,8,9,10,11,13,15},{1,3,4,6,7,8,9,10,11,14},{1,3,4,6,7,8,9,10,11,14,15},{1,3,4,6,7,8,9,10,11,15},{1,3,4,6,7,8,9,10,12},{1,3,4,6,7,8,9,10,12,13},{1,3,4,6,7,8,9,10,12,13,14},{1,3,4,6,7,8,9,10,12,13,14,15},{1,3,4,6,7,8,9,10,12,13,15},{1,3,4,6,7,8,9,10,12,14},{1,3,4,6,7,8,9,10,12,14,15},{1,3,4,6,7,8,9,10,12,15},{1,3,4,6,7,8,9,10,13},{1,3,4,6,7,8,9,10,13,14},{1,3,4,6,7,8,9,10,13,14,15},{1,3,4,6,7,8,9,10,13,15},{1,3,4,6,7,8,9,10,14},{1,3,4,6,7,8,9,10,14,15},{1,3,4,6,7,8,9,10,15},{1,3,4,6,7,8,9,11},{1,3,4,6,7,8,9,11,12},{1,3,4,6,7,8,9,11,12,13},{1,3,4,6,7,8,9,11,12,13,14},{1,3,4,6,7,8,9,11,12,13,14,15},{1,3,4,6,7,8,9,11,12,13,15},{1,3,4,6,7,8,9,11,12,14},{1,3,4,6,7,8,9,11,12,14,15},{1,3,4,6,7,8,9,11,12,15},{1,3,4,6,7,8,9,11,13},{1,3,4,6,7,8,9,11,13,14},{1,3,4,6,7,8,9,11,13,14,15},{1,3,4,6,7,8,9,11,13,15},{1,3,4,6,7,8,9,11,14},{1,3,4,6,7,8,9,11,14,15},{1,3,4,6,7,8,9,11,15},{1,3,4,6,7,8,9,12},{1,3,4,6,7,8,9,12,13},{1,3,4,6,7,8,9,12,13,14},{1,3,4,6,7,8,9,12,13,14,15},{1,3,4,6,7,8,9,12,13,15},{1,3,4,6,7,8,9,12,14},{1,3,4,6,7,8,9,12,14,15},{1,3,4,6,7,8,9,12,15},{1,3,4,6,7,8,9,13},{1,3,4,6,7,8,9,13,14},{1,3,4,6,7,8,9,13,14,15},{1,3,4,6,7,8,9,13,15},{1,3,4,6,7,8,9,14},{1,3,4,6,7,8,9,14,15},{1,3,4,6,7,8,9,15},{1,3,4,6,7,8,10},{1,3,4,6,7,8,10,11},{1,3,4,6,7,8,10,11,12},{1,3,4,6,7,8,10,11,12,13},{1,3,4,6,7,8,10,11,12,13,14},{1,3,4,6,7,8,10,11,12,13,14,15},{1,3,4,6,7,8,10,11,12,13,15},{1,3,4,6,7,8,10,11,12,14},{1,3,4,6,7,8,10,11,12,14,15},{1,3,4,6,7,8,10,11,12,15},{1,3,4,6,7,8,10,11,13},{1,3,4,6,7,8,10,11,13,14},{1,3,4,6,7,8,10,11,13,14,15},{1,3,4,6,7,8,10,11,13,15},{1,3,4,6,7,8,10,11,14},{1,3,4,6,7,8,10,11,14,15},{1,3,4,6,7,8,10,11,15},{1,3,4,6,7,8,10,12},{1,3,4,6,7,8,10,12,13},{1,3,4,6,7,8,10,12,13,14},{1,3,4,6,7,8,10,12,13,14,15},{1,3,4,6,7,8,10,12,13,15},{1,3,4,6,7,8,10,12,14},{1,3,4,6,7,8,10,12,14,15},{1,3,4,6,7,8,10,12,15},{1,3,4,6,7,8,10,13},{1,3,4,6,7,8,10,13,14},{1,3,4,6,7,8,10,13,14,15},{1,3,4,6,7,8,10,13,15},{1,3,4,6,7,8,10,14},{1,3,4,6,7,8,10,14,15},{1,3,4,6,7,8,10,15},{1,3,4,6,7,8,11},{1,3,4,6,7,8,11,12},{1,3,4,6,7,8,11,12,13},{1,3,4,6,7,8,11,12,13,14},{1,3,4,6,7,8,11,12,13,14,15},{1,3,4,6,7,8,11,12,13,15},{1,3,4,6,7,8,11,12,14},{1,3,4,6,7,8,11,12,14,15},{1,3,4,6,7,8,11,12,15},{1,3,4,6,7,8,11,13},{1,3,4,6,7,8,11,13,14},{1,3,4,6,7,8,11,13,14,15},{1,3,4,6,7,8,11,13,15},{1,3,4,6,7,8,11,14},{1,3,4,6,7,8,11,14,15},{1,3,4,6,7,8,11,15},{1,3,4,6,7,8,12},{1,3,4,6,7,8,12,13},{1,3,4,6,7,8,12,13,14},{1,3,4,6,7,8,12,13,14,15},{1,3,4,6,7,8,12,13,15},{1,3,4,6,7,8,12,14},{1,3,4,6,7,8,12,14,15},{1,3,4,6,7,8,12,15},{1,3,4,6,7,8,13},{1,3,4,6,7,8,13,14},{1,3,4,6,7,8,13,14,15},{1,3,4,6,7,8,13,15},{1,3,4,6,7,8,14},{1,3,4,6,7,8,14,15},{1,3,4,6,7,8,15},{1,3,4,6,7,9},{1,3,4,6,7,9,10},{1,3,4,6,7,9,10,11},{1,3,4,6,7,9,10,11,12},{1,3,4,6,7,9,10,11,12,13},{1,3,4,6,7,9,10,11,12,13,14},{1,3,4,6,7,9,10,11,12,13,14,15},{1,3,4,6,7,9,10,11,12,13,15},{1,3,4,6,7,9,10,11,12,14},{1,3,4,6,7,9,10,11,12,14,15},{1,3,4,6,7,9,10,11,12,15},{1,3,4,6,7,9,10,11,13},{1,3,4,6,7,9,10,11,13,14},{1,3,4,6,7,9,10,11,13,14,15},{1,3,4,6,7,9,10,11,13,15},{1,3,4,6,7,9,10,11,14},{1,3,4,6,7,9,10,11,14,15},{1,3,4,6,7,9,10,11,15},{1,3,4,6,7,9,10,12},{1,3,4,6,7,9,10,12,13},{1,3,4,6,7,9,10,12,13,14},{1,3,4,6,7,9,10,12,13,14,15},{1,3,4,6,7,9,10,12,13,15},{1,3,4,6,7,9,10,12,14},{1,3,4,6,7,9,10,12,14,15},{1,3,4,6,7,9,10,12,15},{1,3,4,6,7,9,10,13},{1,3,4,6,7,9,10,13,14},{1,3,4,6,7,9,10,13,14,15},{1,3,4,6,7,9,10,13,15},{1,3,4,6,7,9,10,14},{1,3,4,6,7,9,10,14,15},{1,3,4,6,7,9,10,15},{1,3,4,6,7,9,11},{1,3,4,6,7,9,11,12},{1,3,4,6,7,9,11,12,13},{1,3,4,6,7,9,11,12,13,14},{1,3,4,6,7,9,11,12,13,14,15},{1,3,4,6,7,9,11,12,13,15},{1,3,4,6,7,9,11,12,14},{1,3,4,6,7,9,11,12,14,15},{1,3,4,6,7,9,11,12,15},{1,3,4,6,7,9,11,13},{1,3,4,6,7,9,11,13,14},{1,3,4,6,7,9,11,13,14,15},{1,3,4,6,7,9,11,13,15},{1,3,4,6,7,9,11,14},{1,3,4,6,7,9,11,14,15},{1,3,4,6,7,9,11,15},{1,3,4,6,7,9,12},{1,3,4,6,7,9,12,13},{1,3,4,6,7,9,12,13,14},{1,3,4,6,7,9,12,13,14,15},{1,3,4,6,7,9,12,13,15},{1,3,4,6,7,9,12,14},{1,3,4,6,7,9,12,14,15},{1,3,4,6,7,9,12,15},{1,3,4,6,7,9,13},{1,3,4,6,7,9,13,14},{1,3,4,6,7,9,13,14,15},{1,3,4,6,7,9,13,15},{1,3,4,6,7,9,14},{1,3,4,6,7,9,14,15},{1,3,4,6,7,9,15},{1,3,4,6,7,10},{1,3,4,6,7,10,11},{1,3,4,6,7,10,11,12},{1,3,4,6,7,10,11,12,13},{1,3,4,6,7,10,11,12,13,14},{1,3,4,6,7,10,11,12,13,14,15},{1,3,4,6,7,10,11,12,13,15},{1,3,4,6,7,10,11,12,14},{1,3,4,6,7,10,11,12,14,15},{1,3,4,6,7,10,11,12,15},{1,3,4,6,7,10,11,13},{1,3,4,6,7,10,11,13,14},{1,3,4,6,7,10,11,13,14,15},{1,3,4,6,7,10,11,13,15},{1,3,4,6,7,10,11,14},{1,3,4,6,7,10,11,14,15},{1,3,4,6,7,10,11,15},{1,3,4,6,7,10,12},{1,3,4,6,7,10,12,13},{1,3,4,6,7,10,12,13,14},{1,3,4,6,7,10,12,13,14,15},{1,3,4,6,7,10,12,13,15},{1,3,4,6,7,10,12,14},{1,3,4,6,7,10,12,14,15},{1,3,4,6,7,10,12,15},{1,3,4,6,7,10,13},{1,3,4,6,7,10,13,14},{1,3,4,6,7,10,13,14,15},{1,3,4,6,7,10,13,15},{1,3,4,6,7,10,14},{1,3,4,6,7,10,14,15},{1,3,4,6,7,10,15},{1,3,4,6,7,11},{1,3,4,6,7,11,12},{1,3,4,6,7,11,12,13},{1,3,4,6,7,11,12,13,14},{1,3,4,6,7,11,12,13,14,15},{1,3,4,6,7,11,12,13,15},{1,3,4,6,7,11,12,14},{1,3,4,6,7,11,12,14,15},{1,3,4,6,7,11,12,15},{1,3,4,6,7,11,13},{1,3,4,6,7,11,13,14},{1,3,4,6,7,11,13,14,15},{1,3,4,6,7,11,13,15},{1,3,4,6,7,11,14},{1,3,4,6,7,11,14,15},{1,3,4,6,7,11,15},{1,3,4,6,7,12},{1,3,4,6,7,12,13},{1,3,4,6,7,12,13,14},{1,3,4,6,7,12,13,14,15},{1,3,4,6,7,12,13,15},{1,3,4,6,7,12,14},{1,3,4,6,7,12,14,15},{1,3,4,6,7,12,15},{1,3,4,6,7,13},{1,3,4,6,7,13,14},{1,3,4,6,7,13,14,15},{1,3,4,6,7,13,15},{1,3,4,6,7,14},{1,3,4,6,7,14,15},{1,3,4,6,7,15},{1,3,4,6,8},{1,3,4,6,8,9},{1,3,4,6,8,9,10},{1,3,4,6,8,9,10,11},{1,3,4,6,8,9,10,11,12},{1,3,4,6,8,9,10,11,12,13},{1,3,4,6,8,9,10,11,12,13,14},{1,3,4,6,8,9,10,11,12,13,14,15},{1,3,4,6,8,9,10,11,12,13,15},{1,3,4,6,8,9,10,11,12,14},{1,3,4,6,8,9,10,11,12,14,15},{1,3,4,6,8,9,10,11,12,15},{1,3,4,6,8,9,10,11,13},{1,3,4,6,8,9,10,11,13,14},{1,3,4,6,8,9,10,11,13,14,15},{1,3,4,6,8,9,10,11,13,15},{1,3,4,6,8,9,10,11,14},{1,3,4,6,8,9,10,11,14,15},{1,3,4,6,8,9,10,11,15},{1,3,4,6,8,9,10,12},{1,3,4,6,8,9,10,12,13},{1,3,4,6,8,9,10,12,13,14},{1,3,4,6,8,9,10,12,13,14,15},{1,3,4,6,8,9,10,12,13,15},{1,3,4,6,8,9,10,12,14},{1,3,4,6,8,9,10,12,14,15},{1,3,4,6,8,9,10,12,15},{1,3,4,6,8,9,10,13},{1,3,4,6,8,9,10,13,14},{1,3,4,6,8,9,10,13,14,15},{1,3,4,6,8,9,10,13,15},{1,3,4,6,8,9,10,14},{1,3,4,6,8,9,10,14,15},{1,3,4,6,8,9,10,15},{1,3,4,6,8,9,11},{1,3,4,6,8,9,11,12},{1,3,4,6,8,9,11,12,13},{1,3,4,6,8,9,11,12,13,14},{1,3,4,6,8,9,11,12,13,14,15},{1,3,4,6,8,9,11,12,13,15},{1,3,4,6,8,9,11,12,14},{1,3,4,6,8,9,11,12,14,15},{1,3,4,6,8,9,11,12,15},{1,3,4,6,8,9,11,13},{1,3,4,6,8,9,11,13,14},{1,3,4,6,8,9,11,13,14,15},{1,3,4,6,8,9,11,13,15},{1,3,4,6,8,9,11,14},{1,3,4,6,8,9,11,14,15},{1,3,4,6,8,9,11,15},{1,3,4,6,8,9,12},{1,3,4,6,8,9,12,13},{1,3,4,6,8,9,12,13,14},{1,3,4,6,8,9,12,13,14,15},{1,3,4,6,8,9,12,13,15},{1,3,4,6,8,9,12,14},{1,3,4,6,8,9,12,14,15},{1,3,4,6,8,9,12,15},{1,3,4,6,8,9,13},{1,3,4,6,8,9,13,14},{1,3,4,6,8,9,13,14,15},{1,3,4,6,8,9,13,15},{1,3,4,6,8,9,14},{1,3,4,6,8,9,14,15},{1,3,4,6,8,9,15},{1,3,4,6,8,10},{1,3,4,6,8,10,11},{1,3,4,6,8,10,11,12},{1,3,4,6,8,10,11,12,13},{1,3,4,6,8,10,11,12,13,14},{1,3,4,6,8,10,11,12,13,14,15},{1,3,4,6,8,10,11,12,13,15},{1,3,4,6,8,10,11,12,14},{1,3,4,6,8,10,11,12,14,15},{1,3,4,6,8,10,11,12,15},{1,3,4,6,8,10,11,13},{1,3,4,6,8,10,11,13,14},{1,3,4,6,8,10,11,13,14,15},{1,3,4,6,8,10,11,13,15},{1,3,4,6,8,10,11,14},{1,3,4,6,8,10,11,14,15},{1,3,4,6,8,10,11,15},{1,3,4,6,8,10,12},{1,3,4,6,8,10,12,13},{1,3,4,6,8,10,12,13,14},{1,3,4,6,8,10,12,13,14,15},{1,3,4,6,8,10,12,13,15},{1,3,4,6,8,10,12,14},{1,3,4,6,8,10,12,14,15},{1,3,4,6,8,10,12,15},{1,3,4,6,8,10,13},{1,3,4,6,8,10,13,14},{1,3,4,6,8,10,13,14,15},{1,3,4,6,8,10,13,15},{1,3,4,6,8,10,14},{1,3,4,6,8,10,14,15},{1,3,4,6,8,10,15},{1,3,4,6,8,11},{1,3,4,6,8,11,12},{1,3,4,6,8,11,12,13},{1,3,4,6,8,11,12,13,14},{1,3,4,6,8,11,12,13,14,15},{1,3,4,6,8,11,12,13,15},{1,3,4,6,8,11,12,14},{1,3,4,6,8,11,12,14,15},{1,3,4,6,8,11,12,15},{1,3,4,6,8,11,13},{1,3,4,6,8,11,13,14},{1,3,4,6,8,11,13,14,15},{1,3,4,6,8,11,13,15},{1,3,4,6,8,11,14},{1,3,4,6,8,11,14,15},{1,3,4,6,8,11,15},{1,3,4,6,8,12},{1,3,4,6,8,12,13},{1,3,4,6,8,12,13,14},{1,3,4,6,8,12,13,14,15},{1,3,4,6,8,12,13,15},{1,3,4,6,8,12,14},{1,3,4,6,8,12,14,15},{1,3,4,6,8,12,15},{1,3,4,6,8,13},{1,3,4,6,8,13,14},{1,3,4,6,8,13,14,15},{1,3,4,6,8,13,15},{1,3,4,6,8,14},{1,3,4,6,8,14,15},{1,3,4,6,8,15},{1,3,4,6,9},{1,3,4,6,9,10},{1,3,4,6,9,10,11},{1,3,4,6,9,10,11,12},{1,3,4,6,9,10,11,12,13},{1,3,4,6,9,10,11,12,13,14},{1,3,4,6,9,10,11,12,13,14,15},{1,3,4,6,9,10,11,12,13,15},{1,3,4,6,9,10,11,12,14},{1,3,4,6,9,10,11,12,14,15},{1,3,4,6,9,10,11,12,15},{1,3,4,6,9,10,11,13},{1,3,4,6,9,10,11,13,14},{1,3,4,6,9,10,11,13,14,15},{1,3,4,6,9,10,11,13,15},{1,3,4,6,9,10,11,14},{1,3,4,6,9,10,11,14,15},{1,3,4,6,9,10,11,15},{1,3,4,6,9,10,12},{1,3,4,6,9,10,12,13},{1,3,4,6,9,10,12,13,14},{1,3,4,6,9,10,12,13,14,15},{1,3,4,6,9,10,12,13,15},{1,3,4,6,9,10,12,14},{1,3,4,6,9,10,12,14,15},{1,3,4,6,9,10,12,15},{1,3,4,6,9,10,13},{1,3,4,6,9,10,13,14},{1,3,4,6,9,10,13,14,15},{1,3,4,6,9,10,13,15},{1,3,4,6,9,10,14},{1,3,4,6,9,10,14,15},{1,3,4,6,9,10,15},{1,3,4,6,9,11},{1,3,4,6,9,11,12},{1,3,4,6,9,11,12,13},{1,3,4,6,9,11,12,13,14},{1,3,4,6,9,11,12,13,14,15},{1,3,4,6,9,11,12,13,15},{1,3,4,6,9,11,12,14},{1,3,4,6,9,11,12,14,15},{1,3,4,6,9,11,12,15},{1,3,4,6,9,11,13},{1,3,4,6,9,11,13,14},{1,3,4,6,9,11,13,14,15},{1,3,4,6,9,11,13,15},{1,3,4,6,9,11,14},{1,3,4,6,9,11,14,15},{1,3,4,6,9,11,15},{1,3,4,6,9,12},{1,3,4,6,9,12,13},{1,3,4,6,9,12,13,14},{1,3,4,6,9,12,13,14,15},{1,3,4,6,9,12,13,15},{1,3,4,6,9,12,14},{1,3,4,6,9,12,14,15},{1,3,4,6,9,12,15},{1,3,4,6,9,13},{1,3,4,6,9,13,14},{1,3,4,6,9,13,14,15},{1,3,4,6,9,13,15},{1,3,4,6,9,14},{1,3,4,6,9,14,15},{1,3,4,6,9,15},{1,3,4,6,10},{1,3,4,6,10,11},{1,3,4,6,10,11,12},{1,3,4,6,10,11,12,13},{1,3,4,6,10,11,12,13,14},{1,3,4,6,10,11,12,13,14,15},{1,3,4,6,10,11,12,13,15},{1,3,4,6,10,11,12,14},{1,3,4,6,10,11,12,14,15},{1,3,4,6,10,11,12,15},{1,3,4,6,10,11,13},{1,3,4,6,10,11,13,14},{1,3,4,6,10,11,13,14,15},{1,3,4,6,10,11,13,15},{1,3,4,6,10,11,14},{1,3,4,6,10,11,14,15},{1,3,4,6,10,11,15},{1,3,4,6,10,12},{1,3,4,6,10,12,13},{1,3,4,6,10,12,13,14},{1,3,4,6,10,12,13,14,15},{1,3,4,6,10,12,13,15},{1,3,4,6,10,12,14},{1,3,4,6,10,12,14,15},{1,3,4,6,10,12,15},{1,3,4,6,10,13},{1,3,4,6,10,13,14},{1,3,4,6,10,13,14,15},{1,3,4,6,10,13,15},{1,3,4,6,10,14},{1,3,4,6,10,14,15},{1,3,4,6,10,15},{1,3,4,6,11},{1,3,4,6,11,12},{1,3,4,6,11,12,13},{1,3,4,6,11,12,13,14},{1,3,4,6,11,12,13,14,15},{1,3,4,6,11,12,13,15},{1,3,4,6,11,12,14},{1,3,4,6,11,12,14,15},{1,3,4,6,11,12,15},{1,3,4,6,11,13},{1,3,4,6,11,13,14},{1,3,4,6,11,13,14,15},{1,3,4,6,11,13,15},{1,3,4,6,11,14},{1,3,4,6,11,14,15},{1,3,4,6,11,15},{1,3,4,6,12},{1,3,4,6,12,13},{1,3,4,6,12,13,14},{1,3,4,6,12,13,14,15},{1,3,4,6,12,13,15},{1,3,4,6,12,14},{1,3,4,6,12,14,15},{1,3,4,6,12,15},{1,3,4,6,13},{1,3,4,6,13,14},{1,3,4,6,13,14,15},{1,3,4,6,13,15},{1,3,4,6,14},{1,3,4,6,14,15},{1,3,4,6,15},{1,3,4,7},{1,3,4,7,8},{1,3,4,7,8,9},{1,3,4,7,8,9,10},{1,3,4,7,8,9,10,11},{1,3,4,7,8,9,10,11,12},{1,3,4,7,8,9,10,11,12,13},{1,3,4,7,8,9,10,11,12,13,14},{1,3,4,7,8,9,10,11,12,13,14,15},{1,3,4,7,8,9,10,11,12,13,15},{1,3,4,7,8,9,10,11,12,14},{1,3,4,7,8,9,10,11,12,14,15},{1,3,4,7,8,9,10,11,12,15},{1,3,4,7,8,9,10,11,13},{1,3,4,7,8,9,10,11,13,14},{1,3,4,7,8,9,10,11,13,14,15},{1,3,4,7,8,9,10,11,13,15},{1,3,4,7,8,9,10,11,14},{1,3,4,7,8,9,10,11,14,15},{1,3,4,7,8,9,10,11,15},{1,3,4,7,8,9,10,12},{1,3,4,7,8,9,10,12,13},{1,3,4,7,8,9,10,12,13,14},{1,3,4,7,8,9,10,12,13,14,15},{1,3,4,7,8,9,10,12,13,15},{1,3,4,7,8,9,10,12,14},{1,3,4,7,8,9,10,12,14,15},{1,3,4,7,8,9,10,12,15},{1,3,4,7,8,9,10,13},{1,3,4,7,8,9,10,13,14},{1,3,4,7,8,9,10,13,14,15},{1,3,4,7,8,9,10,13,15},{1,3,4,7,8,9,10,14},{1,3,4,7,8,9,10,14,15},{1,3,4,7,8,9,10,15},{1,3,4,7,8,9,11},{1,3,4,7,8,9,11,12},{1,3,4,7,8,9,11,12,13},{1,3,4,7,8,9,11,12,13,14},{1,3,4,7,8,9,11,12,13,14,15},{1,3,4,7,8,9,11,12,13,15},{1,3,4,7,8,9,11,12,14},{1,3,4,7,8,9,11,12,14,15},{1,3,4,7,8,9,11,12,15},{1,3,4,7,8,9,11,13},{1,3,4,7,8,9,11,13,14},{1,3,4,7,8,9,11,13,14,15},{1,3,4,7,8,9,11,13,15},{1,3,4,7,8,9,11,14},{1,3,4,7,8,9,11,14,15},{1,3,4,7,8,9,11,15},{1,3,4,7,8,9,12},{1,3,4,7,8,9,12,13},{1,3,4,7,8,9,12,13,14},{1,3,4,7,8,9,12,13,14,15},{1,3,4,7,8,9,12,13,15},{1,3,4,7,8,9,12,14},{1,3,4,7,8,9,12,14,15},{1,3,4,7,8,9,12,15},{1,3,4,7,8,9,13},{1,3,4,7,8,9,13,14},{1,3,4,7,8,9,13,14,15},{1,3,4,7,8,9,13,15},{1,3,4,7,8,9,14},{1,3,4,7,8,9,14,15},{1,3,4,7,8,9,15},{1,3,4,7,8,10},{1,3,4,7,8,10,11},{1,3,4,7,8,10,11,12},{1,3,4,7,8,10,11,12,13},{1,3,4,7,8,10,11,12,13,14},{1,3,4,7,8,10,11,12,13,14,15},{1,3,4,7,8,10,11,12,13,15},{1,3,4,7,8,10,11,12,14},{1,3,4,7,8,10,11,12,14,15},{1,3,4,7,8,10,11,12,15},{1,3,4,7,8,10,11,13},{1,3,4,7,8,10,11,13,14},{1,3,4,7,8,10,11,13,14,15},{1,3,4,7,8,10,11,13,15},{1,3,4,7,8,10,11,14},{1,3,4,7,8,10,11,14,15},{1,3,4,7,8,10,11,15},{1,3,4,7,8,10,12},{1,3,4,7,8,10,12,13},{1,3,4,7,8,10,12,13,14},{1,3,4,7,8,10,12,13,14,15},{1,3,4,7,8,10,12,13,15},{1,3,4,7,8,10,12,14},{1,3,4,7,8,10,12,14,15},{1,3,4,7,8,10,12,15},{1,3,4,7,8,10,13},{1,3,4,7,8,10,13,14},{1,3,4,7,8,10,13,14,15},{1,3,4,7,8,10,13,15},{1,3,4,7,8,10,14},{1,3,4,7,8,10,14,15},{1,3,4,7,8,10,15},{1,3,4,7,8,11},{1,3,4,7,8,11,12},{1,3,4,7,8,11,12,13},{1,3,4,7,8,11,12,13,14},{1,3,4,7,8,11,12,13,14,15},{1,3,4,7,8,11,12,13,15},{1,3,4,7,8,11,12,14},{1,3,4,7,8,11,12,14,15},{1,3,4,7,8,11,12,15},{1,3,4,7,8,11,13},{1,3,4,7,8,11,13,14},{1,3,4,7,8,11,13,14,15},{1,3,4,7,8,11,13,15},{1,3,4,7,8,11,14},{1,3,4,7,8,11,14,15},{1,3,4,7,8,11,15},{1,3,4,7,8,12},{1,3,4,7,8,12,13},{1,3,4,7,8,12,13,14},{1,3,4,7,8,12,13,14,15},{1,3,4,7,8,12,13,15},{1,3,4,7,8,12,14},{1,3,4,7,8,12,14,15},{1,3,4,7,8,12,15},{1,3,4,7,8,13},{1,3,4,7,8,13,14},{1,3,4,7,8,13,14,15},{1,3,4,7,8,13,15},{1,3,4,7,8,14},{1,3,4,7,8,14,15},{1,3,4,7,8,15},{1,3,4,7,9},{1,3,4,7,9,10},{1,3,4,7,9,10,11},{1,3,4,7,9,10,11,12},{1,3,4,7,9,10,11,12,13},{1,3,4,7,9,10,11,12,13,14},{1,3,4,7,9,10,11,12,13,14,15},{1,3,4,7,9,10,11,12,13,15},{1,3,4,7,9,10,11,12,14},{1,3,4,7,9,10,11,12,14,15},{1,3,4,7,9,10,11,12,15},{1,3,4,7,9,10,11,13},{1,3,4,7,9,10,11,13,14},{1,3,4,7,9,10,11,13,14,15},{1,3,4,7,9,10,11,13,15},{1,3,4,7,9,10,11,14},{1,3,4,7,9,10,11,14,15},{1,3,4,7,9,10,11,15},{1,3,4,7,9,10,12},{1,3,4,7,9,10,12,13},{1,3,4,7,9,10,12,13,14},{1,3,4,7,9,10,12,13,14,15},{1,3,4,7,9,10,12,13,15},{1,3,4,7,9,10,12,14},{1,3,4,7,9,10,12,14,15},{1,3,4,7,9,10,12,15},{1,3,4,7,9,10,13},{1,3,4,7,9,10,13,14},{1,3,4,7,9,10,13,14,15},{1,3,4,7,9,10,13,15},{1,3,4,7,9,10,14},{1,3,4,7,9,10,14,15},{1,3,4,7,9,10,15},{1,3,4,7,9,11},{1,3,4,7,9,11,12},{1,3,4,7,9,11,12,13},{1,3,4,7,9,11,12,13,14},{1,3,4,7,9,11,12,13,14,15},{1,3,4,7,9,11,12,13,15},{1,3,4,7,9,11,12,14},{1,3,4,7,9,11,12,14,15},{1,3,4,7,9,11,12,15},{1,3,4,7,9,11,13},{1,3,4,7,9,11,13,14},{1,3,4,7,9,11,13,14,15},{1,3,4,7,9,11,13,15},{1,3,4,7,9,11,14},{1,3,4,7,9,11,14,15},{1,3,4,7,9,11,15},{1,3,4,7,9,12},{1,3,4,7,9,12,13},{1,3,4,7,9,12,13,14},{1,3,4,7,9,12,13,14,15},{1,3,4,7,9,12,13,15},{1,3,4,7,9,12,14},{1,3,4,7,9,12,14,15},{1,3,4,7,9,12,15},{1,3,4,7,9,13},{1,3,4,7,9,13,14},{1,3,4,7,9,13,14,15},{1,3,4,7,9,13,15},{1,3,4,7,9,14},{1,3,4,7,9,14,15},{1,3,4,7,9,15},{1,3,4,7,10},{1,3,4,7,10,11},{1,3,4,7,10,11,12},{1,3,4,7,10,11,12,13},{1,3,4,7,10,11,12,13,14},{1,3,4,7,10,11,12,13,14,15},{1,3,4,7,10,11,12,13,15},{1,3,4,7,10,11,12,14},{1,3,4,7,10,11,12,14,15},{1,3,4,7,10,11,12,15},{1,3,4,7,10,11,13},{1,3,4,7,10,11,13,14},{1,3,4,7,10,11,13,14,15},{1,3,4,7,10,11,13,15},{1,3,4,7,10,11,14},{1,3,4,7,10,11,14,15},{1,3,4,7,10,11,15},{1,3,4,7,10,12},{1,3,4,7,10,12,13},{1,3,4,7,10,12,13,14},{1,3,4,7,10,12,13,14,15},{1,3,4,7,10,12,13,15},{1,3,4,7,10,12,14},{1,3,4,7,10,12,14,15},{1,3,4,7,10,12,15},{1,3,4,7,10,13},{1,3,4,7,10,13,14},{1,3,4,7,10,13,14,15},{1,3,4,7,10,13,15},{1,3,4,7,10,14},{1,3,4,7,10,14,15},{1,3,4,7,10,15},{1,3,4,7,11},{1,3,4,7,11,12},{1,3,4,7,11,12,13},{1,3,4,7,11,12,13,14},{1,3,4,7,11,12,13,14,15},{1,3,4,7,11,12,13,15},{1,3,4,7,11,12,14},{1,3,4,7,11,12,14,15},{1,3,4,7,11,12,15},{1,3,4,7,11,13},{1,3,4,7,11,13,14},{1,3,4,7,11,13,14,15},{1,3,4,7,11,13,15},{1,3,4,7,11,14},{1,3,4,7,11,14,15},{1,3,4,7,11,15},{1,3,4,7,12},{1,3,4,7,12,13},{1,3,4,7,12,13,14},{1,3,4,7,12,13,14,15},{1,3,4,7,12,13,15},{1,3,4,7,12,14},{1,3,4,7,12,14,15},{1,3,4,7,12,15},{1,3,4,7,13},{1,3,4,7,13,14},{1,3,4,7,13,14,15},{1,3,4,7,13,15},{1,3,4,7,14},{1,3,4,7,14,15},{1,3,4,7,15},{1,3,4,8},{1,3,4,8,9},{1,3,4,8,9,10},{1,3,4,8,9,10,11},{1,3,4,8,9,10,11,12},{1,3,4,8,9,10,11,12,13},{1,3,4,8,9,10,11,12,13,14},{1,3,4,8,9,10,11,12,13,14,15},{1,3,4,8,9,10,11,12,13,15},{1,3,4,8,9,10,11,12,14},{1,3,4,8,9,10,11,12,14,15},{1,3,4,8,9,10,11,12,15},{1,3,4,8,9,10,11,13},{1,3,4,8,9,10,11,13,14},{1,3,4,8,9,10,11,13,14,15},{1,3,4,8,9,10,11,13,15},{1,3,4,8,9,10,11,14},{1,3,4,8,9,10,11,14,15},{1,3,4,8,9,10,11,15},{1,3,4,8,9,10,12},{1,3,4,8,9,10,12,13},{1,3,4,8,9,10,12,13,14},{1,3,4,8,9,10,12,13,14,15},{1,3,4,8,9,10,12,13,15},{1,3,4,8,9,10,12,14},{1,3,4,8,9,10,12,14,15},{1,3,4,8,9,10,12,15},{1,3,4,8,9,10,13},{1,3,4,8,9,10,13,14},{1,3,4,8,9,10,13,14,15},{1,3,4,8,9,10,13,15},{1,3,4,8,9,10,14},{1,3,4,8,9,10,14,15},{1,3,4,8,9,10,15},{1,3,4,8,9,11},{1,3,4,8,9,11,12},{1,3,4,8,9,11,12,13},{1,3,4,8,9,11,12,13,14},{1,3,4,8,9,11,12,13,14,15},{1,3,4,8,9,11,12,13,15},{1,3,4,8,9,11,12,14},{1,3,4,8,9,11,12,14,15},{1,3,4,8,9,11,12,15},{1,3,4,8,9,11,13},{1,3,4,8,9,11,13,14},{1,3,4,8,9,11,13,14,15},{1,3,4,8,9,11,13,15},{1,3,4,8,9,11,14},{1,3,4,8,9,11,14,15},{1,3,4,8,9,11,15},{1,3,4,8,9,12},{1,3,4,8,9,12,13},{1,3,4,8,9,12,13,14},{1,3,4,8,9,12,13,14,15},{1,3,4,8,9,12,13,15},{1,3,4,8,9,12,14},{1,3,4,8,9,12,14,15},{1,3,4,8,9,12,15},{1,3,4,8,9,13},{1,3,4,8,9,13,14},{1,3,4,8,9,13,14,15},{1,3,4,8,9,13,15},{1,3,4,8,9,14},{1,3,4,8,9,14,15},{1,3,4,8,9,15},{1,3,4,8,10},{1,3,4,8,10,11},{1,3,4,8,10,11,12},{1,3,4,8,10,11,12,13},{1,3,4,8,10,11,12,13,14},{1,3,4,8,10,11,12,13,14,15},{1,3,4,8,10,11,12,13,15},{1,3,4,8,10,11,12,14},{1,3,4,8,10,11,12,14,15},{1,3,4,8,10,11,12,15},{1,3,4,8,10,11,13},{1,3,4,8,10,11,13,14},{1,3,4,8,10,11,13,14,15},{1,3,4,8,10,11,13,15},{1,3,4,8,10,11,14},{1,3,4,8,10,11,14,15},{1,3,4,8,10,11,15},{1,3,4,8,10,12},{1,3,4,8,10,12,13},{1,3,4,8,10,12,13,14},{1,3,4,8,10,12,13,14,15},{1,3,4,8,10,12,13,15},{1,3,4,8,10,12,14},{1,3,4,8,10,12,14,15},{1,3,4,8,10,12,15},{1,3,4,8,10,13},{1,3,4,8,10,13,14},{1,3,4,8,10,13,14,15},{1,3,4,8,10,13,15},{1,3,4,8,10,14},{1,3,4,8,10,14,15},{1,3,4,8,10,15},{1,3,4,8,11},{1,3,4,8,11,12},{1,3,4,8,11,12,13},{1,3,4,8,11,12,13,14},{1,3,4,8,11,12,13,14,15},{1,3,4,8,11,12,13,15},{1,3,4,8,11,12,14},{1,3,4,8,11,12,14,15},{1,3,4,8,11,12,15},{1,3,4,8,11,13},{1,3,4,8,11,13,14},{1,3,4,8,11,13,14,15},{1,3,4,8,11,13,15},{1,3,4,8,11,14},{1,3,4,8,11,14,15},{1,3,4,8,11,15},{1,3,4,8,12},{1,3,4,8,12,13},{1,3,4,8,12,13,14},{1,3,4,8,12,13,14,15},{1,3,4,8,12,13,15},{1,3,4,8,12,14},{1,3,4,8,12,14,15},{1,3,4,8,12,15},{1,3,4,8,13},{1,3,4,8,13,14},{1,3,4,8,13,14,15},{1,3,4,8,13,15},{1,3,4,8,14},{1,3,4,8,14,15},{1,3,4,8,15},{1,3,4,9},{1,3,4,9,10},{1,3,4,9,10,11},{1,3,4,9,10,11,12},{1,3,4,9,10,11,12,13},{1,3,4,9,10,11,12,13,14},{1,3,4,9,10,11,12,13,14,15},{1,3,4,9,10,11,12,13,15},{1,3,4,9,10,11,12,14},{1,3,4,9,10,11,12,14,15},{1,3,4,9,10,11,12,15},{1,3,4,9,10,11,13},{1,3,4,9,10,11,13,14},{1,3,4,9,10,11,13,14,15},{1,3,4,9,10,11,13,15},{1,3,4,9,10,11,14},{1,3,4,9,10,11,14,15},{1,3,4,9,10,11,15},{1,3,4,9,10,12},{1,3,4,9,10,12,13},{1,3,4,9,10,12,13,14},{1,3,4,9,10,12,13,14,15},{1,3,4,9,10,12,13,15},{1,3,4,9,10,12,14},{1,3,4,9,10,12,14,15},{1,3,4,9,10,12,15},{1,3,4,9,10,13},{1,3,4,9,10,13,14},{1,3,4,9,10,13,14,15},{1,3,4,9,10,13,15},{1,3,4,9,10,14},{1,3,4,9,10,14,15},{1,3,4,9,10,15},{1,3,4,9,11},{1,3,4,9,11,12},{1,3,4,9,11,12,13},{1,3,4,9,11,12,13,14},{1,3,4,9,11,12,13,14,15},{1,3,4,9,11,12,13,15},{1,3,4,9,11,12,14},{1,3,4,9,11,12,14,15},{1,3,4,9,11,12,15},{1,3,4,9,11,13},{1,3,4,9,11,13,14},{1,3,4,9,11,13,14,15},{1,3,4,9,11,13,15},{1,3,4,9,11,14},{1,3,4,9,11,14,15},{1,3,4,9,11,15},{1,3,4,9,12},{1,3,4,9,12,13},{1,3,4,9,12,13,14},{1,3,4,9,12,13,14,15},{1,3,4,9,12,13,15},{1,3,4,9,12,14},{1,3,4,9,12,14,15},{1,3,4,9,12,15},{1,3,4,9,13},{1,3,4,9,13,14},{1,3,4,9,13,14,15},{1,3,4,9,13,15},{1,3,4,9,14},{1,3,4,9,14,15},{1,3,4,9,15},{1,3,4,10},{1,3,4,10,11},{1,3,4,10,11,12},{1,3,4,10,11,12,13},{1,3,4,10,11,12,13,14},{1,3,4,10,11,12,13,14,15},{1,3,4,10,11,12,13,15},{1,3,4,10,11,12,14},{1,3,4,10,11,12,14,15},{1,3,4,10,11,12,15},{1,3,4,10,11,13},{1,3,4,10,11,13,14},{1,3,4,10,11,13,14,15},{1,3,4,10,11,13,15},{1,3,4,10,11,14},{1,3,4,10,11,14,15},{1,3,4,10,11,15},{1,3,4,10,12},{1,3,4,10,12,13},{1,3,4,10,12,13,14},{1,3,4,10,12,13,14,15},{1,3,4,10,12,13,15},{1,3,4,10,12,14},{1,3,4,10,12,14,15},{1,3,4,10,12,15},{1,3,4,10,13},{1,3,4,10,13,14},{1,3,4,10,13,14,15},{1,3,4,10,13,15},{1,3,4,10,14},{1,3,4,10,14,15},{1,3,4,10,15},{1,3,4,11},{1,3,4,11,12},{1,3,4,11,12,13},{1,3,4,11,12,13,14},{1,3,4,11,12,13,14,15},{1,3,4,11,12,13,15},{1,3,4,11,12,14},{1,3,4,11,12,14,15},{1,3,4,11,12,15},{1,3,4,11,13},{1,3,4,11,13,14},{1,3,4,11,13,14,15},{1,3,4,11,13,15},{1,3,4,11,14},{1,3,4,11,14,15},{1,3,4,11,15},{1,3,4,12},{1,3,4,12,13},{1,3,4,12,13,14},{1,3,4,12,13,14,15},{1,3,4,12,13,15},{1,3,4,12,14},{1,3,4,12,14,15},{1,3,4,12,15},{1,3,4,13},{1,3,4,13,14},{1,3,4,13,14,15},{1,3,4,13,15},{1,3,4,14},{1,3,4,14,15},{1,3,4,15},{1,3,5},{1,3,5,6},{1,3,5,6,7},{1,3,5,6,7,8},{1,3,5,6,7,8,9},{1,3,5,6,7,8,9,10},{1,3,5,6,7,8,9,10,11},{1,3,5,6,7,8,9,10,11,12},{1,3,5,6,7,8,9,10,11,12,13},{1,3,5,6,7,8,9,10,11,12,13,14},{1,3,5,6,7,8,9,10,11,12,13,14,15},{1,3,5,6,7,8,9,10,11,12,13,15},{1,3,5,6,7,8,9,10,11,12,14},{1,3,5,6,7,8,9,10,11,12,14,15},{1,3,5,6,7,8,9,10,11,12,15},{1,3,5,6,7,8,9,10,11,13},{1,3,5,6,7,8,9,10,11,13,14},{1,3,5,6,7,8,9,10,11,13,14,15},{1,3,5,6,7,8,9,10,11,13,15},{1,3,5,6,7,8,9,10,11,14},{1,3,5,6,7,8,9,10,11,14,15},{1,3,5,6,7,8,9,10,11,15},{1,3,5,6,7,8,9,10,12},{1,3,5,6,7,8,9,10,12,13},{1,3,5,6,7,8,9,10,12,13,14},{1,3,5,6,7,8,9,10,12,13,14,15},{1,3,5,6,7,8,9,10,12,13,15},{1,3,5,6,7,8,9,10,12,14},{1,3,5,6,7,8,9,10,12,14,15},{1,3,5,6,7,8,9,10,12,15},{1,3,5,6,7,8,9,10,13},{1,3,5,6,7,8,9,10,13,14},{1,3,5,6,7,8,9,10,13,14,15},{1,3,5,6,7,8,9,10,13,15},{1,3,5,6,7,8,9,10,14},{1,3,5,6,7,8,9,10,14,15},{1,3,5,6,7,8,9,10,15},{1,3,5,6,7,8,9,11},{1,3,5,6,7,8,9,11,12},{1,3,5,6,7,8,9,11,12,13},{1,3,5,6,7,8,9,11,12,13,14},{1,3,5,6,7,8,9,11,12,13,14,15},{1,3,5,6,7,8,9,11,12,13,15},{1,3,5,6,7,8,9,11,12,14},{1,3,5,6,7,8,9,11,12,14,15},{1,3,5,6,7,8,9,11,12,15},{1,3,5,6,7,8,9,11,13},{1,3,5,6,7,8,9,11,13,14},{1,3,5,6,7,8,9,11,13,14,15},{1,3,5,6,7,8,9,11,13,15},{1,3,5,6,7,8,9,11,14},{1,3,5,6,7,8,9,11,14,15},{1,3,5,6,7,8,9,11,15},{1,3,5,6,7,8,9,12},{1,3,5,6,7,8,9,12,13},{1,3,5,6,7,8,9,12,13,14},{1,3,5,6,7,8,9,12,13,14,15},{1,3,5,6,7,8,9,12,13,15},{1,3,5,6,7,8,9,12,14},{1,3,5,6,7,8,9,12,14,15},{1,3,5,6,7,8,9,12,15},{1,3,5,6,7,8,9,13},{1,3,5,6,7,8,9,13,14},{1,3,5,6,7,8,9,13,14,15},{1,3,5,6,7,8,9,13,15},{1,3,5,6,7,8,9,14},{1,3,5,6,7,8,9,14,15},{1,3,5,6,7,8,9,15},{1,3,5,6,7,8,10},{1,3,5,6,7,8,10,11},{1,3,5,6,7,8,10,11,12},{1,3,5,6,7,8,10,11,12,13},{1,3,5,6,7,8,10,11,12,13,14},{1,3,5,6,7,8,10,11,12,13,14,15},{1,3,5,6,7,8,10,11,12,13,15},{1,3,5,6,7,8,10,11,12,14},{1,3,5,6,7,8,10,11,12,14,15},{1,3,5,6,7,8,10,11,12,15},{1,3,5,6,7,8,10,11,13},{1,3,5,6,7,8,10,11,13,14},{1,3,5,6,7,8,10,11,13,14,15},{1,3,5,6,7,8,10,11,13,15},{1,3,5,6,7,8,10,11,14},{1,3,5,6,7,8,10,11,14,15},{1,3,5,6,7,8,10,11,15},{1,3,5,6,7,8,10,12},{1,3,5,6,7,8,10,12,13},{1,3,5,6,7,8,10,12,13,14},{1,3,5,6,7,8,10,12,13,14,15},{1,3,5,6,7,8,10,12,13,15},{1,3,5,6,7,8,10,12,14},{1,3,5,6,7,8,10,12,14,15},{1,3,5,6,7,8,10,12,15},{1,3,5,6,7,8,10,13},{1,3,5,6,7,8,10,13,14},{1,3,5,6,7,8,10,13,14,15},{1,3,5,6,7,8,10,13,15},{1,3,5,6,7,8,10,14},{1,3,5,6,7,8,10,14,15},{1,3,5,6,7,8,10,15},{1,3,5,6,7,8,11},{1,3,5,6,7,8,11,12},{1,3,5,6,7,8,11,12,13},{1,3,5,6,7,8,11,12,13,14},{1,3,5,6,7,8,11,12,13,14,15},{1,3,5,6,7,8,11,12,13,15},{1,3,5,6,7,8,11,12,14},{1,3,5,6,7,8,11,12,14,15},{1,3,5,6,7,8,11,12,15},{1,3,5,6,7,8,11,13},{1,3,5,6,7,8,11,13,14},{1,3,5,6,7,8,11,13,14,15},{1,3,5,6,7,8,11,13,15},{1,3,5,6,7,8,11,14},{1,3,5,6,7,8,11,14,15},{1,3,5,6,7,8,11,15},{1,3,5,6,7,8,12},{1,3,5,6,7,8,12,13},{1,3,5,6,7,8,12,13,14},{1,3,5,6,7,8,12,13,14,15},{1,3,5,6,7,8,12,13,15},{1,3,5,6,7,8,12,14},{1,3,5,6,7,8,12,14,15},{1,3,5,6,7,8,12,15},{1,3,5,6,7,8,13},{1,3,5,6,7,8,13,14},{1,3,5,6,7,8,13,14,15},{1,3,5,6,7,8,13,15},{1,3,5,6,7,8,14},{1,3,5,6,7,8,14,15},{1,3,5,6,7,8,15},{1,3,5,6,7,9},{1,3,5,6,7,9,10},{1,3,5,6,7,9,10,11},{1,3,5,6,7,9,10,11,12},{1,3,5,6,7,9,10,11,12,13},{1,3,5,6,7,9,10,11,12,13,14},{1,3,5,6,7,9,10,11,12,13,14,15},{1,3,5,6,7,9,10,11,12,13,15},{1,3,5,6,7,9,10,11,12,14},{1,3,5,6,7,9,10,11,12,14,15},{1,3,5,6,7,9,10,11,12,15},{1,3,5,6,7,9,10,11,13},{1,3,5,6,7,9,10,11,13,14},{1,3,5,6,7,9,10,11,13,14,15},{1,3,5,6,7,9,10,11,13,15},{1,3,5,6,7,9,10,11,14},{1,3,5,6,7,9,10,11,14,15},{1,3,5,6,7,9,10,11,15},{1,3,5,6,7,9,10,12},{1,3,5,6,7,9,10,12,13},{1,3,5,6,7,9,10,12,13,14},{1,3,5,6,7,9,10,12,13,14,15},{1,3,5,6,7,9,10,12,13,15},{1,3,5,6,7,9,10,12,14},{1,3,5,6,7,9,10,12,14,15},{1,3,5,6,7,9,10,12,15},{1,3,5,6,7,9,10,13},{1,3,5,6,7,9,10,13,14},{1,3,5,6,7,9,10,13,14,15},{1,3,5,6,7,9,10,13,15},{1,3,5,6,7,9,10,14},{1,3,5,6,7,9,10,14,15},{1,3,5,6,7,9,10,15},{1,3,5,6,7,9,11},{1,3,5,6,7,9,11,12},{1,3,5,6,7,9,11,12,13},{1,3,5,6,7,9,11,12,13,14},{1,3,5,6,7,9,11,12,13,14,15},{1,3,5,6,7,9,11,12,13,15},{1,3,5,6,7,9,11,12,14},{1,3,5,6,7,9,11,12,14,15},{1,3,5,6,7,9,11,12,15},{1,3,5,6,7,9,11,13},{1,3,5,6,7,9,11,13,14},{1,3,5,6,7,9,11,13,14,15},{1,3,5,6,7,9,11,13,15},{1,3,5,6,7,9,11,14},{1,3,5,6,7,9,11,14,15},{1,3,5,6,7,9,11,15},{1,3,5,6,7,9,12},{1,3,5,6,7,9,12,13},{1,3,5,6,7,9,12,13,14},{1,3,5,6,7,9,12,13,14,15},{1,3,5,6,7,9,12,13,15},{1,3,5,6,7,9,12,14},{1,3,5,6,7,9,12,14,15},{1,3,5,6,7,9,12,15},{1,3,5,6,7,9,13},{1,3,5,6,7,9,13,14},{1,3,5,6,7,9,13,14,15},{1,3,5,6,7,9,13,15},{1,3,5,6,7,9,14},{1,3,5,6,7,9,14,15},{1,3,5,6,7,9,15},{1,3,5,6,7,10},{1,3,5,6,7,10,11},{1,3,5,6,7,10,11,12},{1,3,5,6,7,10,11,12,13},{1,3,5,6,7,10,11,12,13,14},{1,3,5,6,7,10,11,12,13,14,15},{1,3,5,6,7,10,11,12,13,15},{1,3,5,6,7,10,11,12,14},{1,3,5,6,7,10,11,12,14,15},{1,3,5,6,7,10,11,12,15},{1,3,5,6,7,10,11,13},{1,3,5,6,7,10,11,13,14},{1,3,5,6,7,10,11,13,14,15},{1,3,5,6,7,10,11,13,15},{1,3,5,6,7,10,11,14},{1,3,5,6,7,10,11,14,15},{1,3,5,6,7,10,11,15},{1,3,5,6,7,10,12},{1,3,5,6,7,10,12,13},{1,3,5,6,7,10,12,13,14},{1,3,5,6,7,10,12,13,14,15},{1,3,5,6,7,10,12,13,15},{1,3,5,6,7,10,12,14},{1,3,5,6,7,10,12,14,15},{1,3,5,6,7,10,12,15},{1,3,5,6,7,10,13},{1,3,5,6,7,10,13,14},{1,3,5,6,7,10,13,14,15},{1,3,5,6,7,10,13,15},{1,3,5,6,7,10,14},{1,3,5,6,7,10,14,15},{1,3,5,6,7,10,15},{1,3,5,6,7,11},{1,3,5,6,7,11,12},{1,3,5,6,7,11,12,13},{1,3,5,6,7,11,12,13,14},{1,3,5,6,7,11,12,13,14,15},{1,3,5,6,7,11,12,13,15},{1,3,5,6,7,11,12,14},{1,3,5,6,7,11,12,14,15},{1,3,5,6,7,11,12,15},{1,3,5,6,7,11,13},{1,3,5,6,7,11,13,14},{1,3,5,6,7,11,13,14,15},{1,3,5,6,7,11,13,15},{1,3,5,6,7,11,14},{1,3,5,6,7,11,14,15},{1,3,5,6,7,11,15},{1,3,5,6,7,12},{1,3,5,6,7,12,13},{1,3,5,6,7,12,13,14},{1,3,5,6,7,12,13,14,15},{1,3,5,6,7,12,13,15},{1,3,5,6,7,12,14},{1,3,5,6,7,12,14,15},{1,3,5,6,7,12,15},{1,3,5,6,7,13},{1,3,5,6,7,13,14},{1,3,5,6,7,13,14,15},{1,3,5,6,7,13,15},{1,3,5,6,7,14},{1,3,5,6,7,14,15},{1,3,5,6,7,15},{1,3,5,6,8},{1,3,5,6,8,9},{1,3,5,6,8,9,10},{1,3,5,6,8,9,10,11},{1,3,5,6,8,9,10,11,12},{1,3,5,6,8,9,10,11,12,13},{1,3,5,6,8,9,10,11,12,13,14},{1,3,5,6,8,9,10,11,12,13,14,15},{1,3,5,6,8,9,10,11,12,13,15},{1,3,5,6,8,9,10,11,12,14},{1,3,5,6,8,9,10,11,12,14,15},{1,3,5,6,8,9,10,11,12,15},{1,3,5,6,8,9,10,11,13},{1,3,5,6,8,9,10,11,13,14},{1,3,5,6,8,9,10,11,13,14,15},{1,3,5,6,8,9,10,11,13,15},{1,3,5,6,8,9,10,11,14},{1,3,5,6,8,9,10,11,14,15},{1,3,5,6,8,9,10,11,15},{1,3,5,6,8,9,10,12},{1,3,5,6,8,9,10,12,13},{1,3,5,6,8,9,10,12,13,14},{1,3,5,6,8,9,10,12,13,14,15},{1,3,5,6,8,9,10,12,13,15},{1,3,5,6,8,9,10,12,14},{1,3,5,6,8,9,10,12,14,15},{1,3,5,6,8,9,10,12,15},{1,3,5,6,8,9,10,13},{1,3,5,6,8,9,10,13,14},{1,3,5,6,8,9,10,13,14,15},{1,3,5,6,8,9,10,13,15},{1,3,5,6,8,9,10,14},{1,3,5,6,8,9,10,14,15},{1,3,5,6,8,9,10,15},{1,3,5,6,8,9,11},{1,3,5,6,8,9,11,12},{1,3,5,6,8,9,11,12,13},{1,3,5,6,8,9,11,12,13,14},{1,3,5,6,8,9,11,12,13,14,15},{1,3,5,6,8,9,11,12,13,15},{1,3,5,6,8,9,11,12,14},{1,3,5,6,8,9,11,12,14,15},{1,3,5,6,8,9,11,12,15},{1,3,5,6,8,9,11,13},{1,3,5,6,8,9,11,13,14},{1,3,5,6,8,9,11,13,14,15},{1,3,5,6,8,9,11,13,15},{1,3,5,6,8,9,11,14},{1,3,5,6,8,9,11,14,15},{1,3,5,6,8,9,11,15},{1,3,5,6,8,9,12},{1,3,5,6,8,9,12,13},{1,3,5,6,8,9,12,13,14},{1,3,5,6,8,9,12,13,14,15},{1,3,5,6,8,9,12,13,15},{1,3,5,6,8,9,12,14},{1,3,5,6,8,9,12,14,15},{1,3,5,6,8,9,12,15},{1,3,5,6,8,9,13},{1,3,5,6,8,9,13,14},{1,3,5,6,8,9,13,14,15},{1,3,5,6,8,9,13,15},{1,3,5,6,8,9,14},{1,3,5,6,8,9,14,15},{1,3,5,6,8,9,15},{1,3,5,6,8,10},{1,3,5,6,8,10,11},{1,3,5,6,8,10,11,12},{1,3,5,6,8,10,11,12,13},{1,3,5,6,8,10,11,12,13,14},{1,3,5,6,8,10,11,12,13,14,15},{1,3,5,6,8,10,11,12,13,15},{1,3,5,6,8,10,11,12,14},{1,3,5,6,8,10,11,12,14,15},{1,3,5,6,8,10,11,12,15},{1,3,5,6,8,10,11,13},{1,3,5,6,8,10,11,13,14},{1,3,5,6,8,10,11,13,14,15},{1,3,5,6,8,10,11,13,15},{1,3,5,6,8,10,11,14},{1,3,5,6,8,10,11,14,15},{1,3,5,6,8,10,11,15},{1,3,5,6,8,10,12},{1,3,5,6,8,10,12,13},{1,3,5,6,8,10,12,13,14},{1,3,5,6,8,10,12,13,14,15},{1,3,5,6,8,10,12,13,15},{1,3,5,6,8,10,12,14},{1,3,5,6,8,10,12,14,15},{1,3,5,6,8,10,12,15},{1,3,5,6,8,10,13},{1,3,5,6,8,10,13,14},{1,3,5,6,8,10,13,14,15},{1,3,5,6,8,10,13,15},{1,3,5,6,8,10,14},{1,3,5,6,8,10,14,15},{1,3,5,6,8,10,15},{1,3,5,6,8,11},{1,3,5,6,8,11,12},{1,3,5,6,8,11,12,13},{1,3,5,6,8,11,12,13,14},{1,3,5,6,8,11,12,13,14,15},{1,3,5,6,8,11,12,13,15},{1,3,5,6,8,11,12,14},{1,3,5,6,8,11,12,14,15},{1,3,5,6,8,11,12,15},{1,3,5,6,8,11,13},{1,3,5,6,8,11,13,14},{1,3,5,6,8,11,13,14,15},{1,3,5,6,8,11,13,15},{1,3,5,6,8,11,14},{1,3,5,6,8,11,14,15},{1,3,5,6,8,11,15},{1,3,5,6,8,12},{1,3,5,6,8,12,13},{1,3,5,6,8,12,13,14},{1,3,5,6,8,12,13,14,15},{1,3,5,6,8,12,13,15},{1,3,5,6,8,12,14},{1,3,5,6,8,12,14,15},{1,3,5,6,8,12,15},{1,3,5,6,8,13},{1,3,5,6,8,13,14},{1,3,5,6,8,13,14,15},{1,3,5,6,8,13,15},{1,3,5,6,8,14},{1,3,5,6,8,14,15},{1,3,5,6,8,15},{1,3,5,6,9},{1,3,5,6,9,10},{1,3,5,6,9,10,11},{1,3,5,6,9,10,11,12},{1,3,5,6,9,10,11,12,13},{1,3,5,6,9,10,11,12,13,14},{1,3,5,6,9,10,11,12,13,14,15},{1,3,5,6,9,10,11,12,13,15},{1,3,5,6,9,10,11,12,14},{1,3,5,6,9,10,11,12,14,15},{1,3,5,6,9,10,11,12,15},{1,3,5,6,9,10,11,13},{1,3,5,6,9,10,11,13,14},{1,3,5,6,9,10,11,13,14,15},{1,3,5,6,9,10,11,13,15},{1,3,5,6,9,10,11,14},{1,3,5,6,9,10,11,14,15},{1,3,5,6,9,10,11,15},{1,3,5,6,9,10,12},{1,3,5,6,9,10,12,13},{1,3,5,6,9,10,12,13,14},{1,3,5,6,9,10,12,13,14,15},{1,3,5,6,9,10,12,13,15},{1,3,5,6,9,10,12,14},{1,3,5,6,9,10,12,14,15},{1,3,5,6,9,10,12,15},{1,3,5,6,9,10,13},{1,3,5,6,9,10,13,14},{1,3,5,6,9,10,13,14,15},{1,3,5,6,9,10,13,15},{1,3,5,6,9,10,14},{1,3,5,6,9,10,14,15},{1,3,5,6,9,10,15},{1,3,5,6,9,11},{1,3,5,6,9,11,12},{1,3,5,6,9,11,12,13},{1,3,5,6,9,11,12,13,14},{1,3,5,6,9,11,12,13,14,15},{1,3,5,6,9,11,12,13,15},{1,3,5,6,9,11,12,14},{1,3,5,6,9,11,12,14,15},{1,3,5,6,9,11,12,15},{1,3,5,6,9,11,13},{1,3,5,6,9,11,13,14},{1,3,5,6,9,11,13,14,15},{1,3,5,6,9,11,13,15},{1,3,5,6,9,11,14},{1,3,5,6,9,11,14,15},{1,3,5,6,9,11,15},{1,3,5,6,9,12},{1,3,5,6,9,12,13},{1,3,5,6,9,12,13,14},{1,3,5,6,9,12,13,14,15},{1,3,5,6,9,12,13,15},{1,3,5,6,9,12,14},{1,3,5,6,9,12,14,15},{1,3,5,6,9,12,15},{1,3,5,6,9,13},{1,3,5,6,9,13,14},{1,3,5,6,9,13,14,15},{1,3,5,6,9,13,15},{1,3,5,6,9,14},{1,3,5,6,9,14,15},{1,3,5,6,9,15},{1,3,5,6,10},{1,3,5,6,10,11},{1,3,5,6,10,11,12},{1,3,5,6,10,11,12,13},{1,3,5,6,10,11,12,13,14},{1,3,5,6,10,11,12,13,14,15},{1,3,5,6,10,11,12,13,15},{1,3,5,6,10,11,12,14},{1,3,5,6,10,11,12,14,15},{1,3,5,6,10,11,12,15},{1,3,5,6,10,11,13},{1,3,5,6,10,11,13,14},{1,3,5,6,10,11,13,14,15},{1,3,5,6,10,11,13,15},{1,3,5,6,10,11,14},{1,3,5,6,10,11,14,15},{1,3,5,6,10,11,15},{1,3,5,6,10,12},{1,3,5,6,10,12,13},{1,3,5,6,10,12,13,14},{1,3,5,6,10,12,13,14,15},{1,3,5,6,10,12,13,15},{1,3,5,6,10,12,14},{1,3,5,6,10,12,14,15},{1,3,5,6,10,12,15},{1,3,5,6,10,13},{1,3,5,6,10,13,14},{1,3,5,6,10,13,14,15},{1,3,5,6,10,13,15},{1,3,5,6,10,14},{1,3,5,6,10,14,15},{1,3,5,6,10,15},{1,3,5,6,11},{1,3,5,6,11,12},{1,3,5,6,11,12,13},{1,3,5,6,11,12,13,14},{1,3,5,6,11,12,13,14,15},{1,3,5,6,11,12,13,15},{1,3,5,6,11,12,14},{1,3,5,6,11,12,14,15},{1,3,5,6,11,12,15},{1,3,5,6,11,13},{1,3,5,6,11,13,14},{1,3,5,6,11,13,14,15},{1,3,5,6,11,13,15},{1,3,5,6,11,14},{1,3,5,6,11,14,15},{1,3,5,6,11,15},{1,3,5,6,12},{1,3,5,6,12,13},{1,3,5,6,12,13,14},{1,3,5,6,12,13,14,15},{1,3,5,6,12,13,15},{1,3,5,6,12,14},{1,3,5,6,12,14,15},{1,3,5,6,12,15},{1,3,5,6,13},{1,3,5,6,13,14},{1,3,5,6,13,14,15},{1,3,5,6,13,15},{1,3,5,6,14},{1,3,5,6,14,15},{1,3,5,6,15},{1,3,5,7},{1,3,5,7,8},{1,3,5,7,8,9},{1,3,5,7,8,9,10},{1,3,5,7,8,9,10,11},{1,3,5,7,8,9,10,11,12},{1,3,5,7,8,9,10,11,12,13},{1,3,5,7,8,9,10,11,12,13,14},{1,3,5,7,8,9,10,11,12,13,14,15},{1,3,5,7,8,9,10,11,12,13,15},{1,3,5,7,8,9,10,11,12,14},{1,3,5,7,8,9,10,11,12,14,15},{1,3,5,7,8,9,10,11,12,15},{1,3,5,7,8,9,10,11,13},{1,3,5,7,8,9,10,11,13,14},{1,3,5,7,8,9,10,11,13,14,15},{1,3,5,7,8,9,10,11,13,15},{1,3,5,7,8,9,10,11,14},{1,3,5,7,8,9,10,11,14,15},{1,3,5,7,8,9,10,11,15},{1,3,5,7,8,9,10,12},{1,3,5,7,8,9,10,12,13},{1,3,5,7,8,9,10,12,13,14},{1,3,5,7,8,9,10,12,13,14,15},{1,3,5,7,8,9,10,12,13,15},{1,3,5,7,8,9,10,12,14},{1,3,5,7,8,9,10,12,14,15},{1,3,5,7,8,9,10,12,15},{1,3,5,7,8,9,10,13},{1,3,5,7,8,9,10,13,14},{1,3,5,7,8,9,10,13,14,15},{1,3,5,7,8,9,10,13,15},{1,3,5,7,8,9,10,14},{1,3,5,7,8,9,10,14,15},{1,3,5,7,8,9,10,15},{1,3,5,7,8,9,11},{1,3,5,7,8,9,11,12},{1,3,5,7,8,9,11,12,13},{1,3,5,7,8,9,11,12,13,14},{1,3,5,7,8,9,11,12,13,14,15},{1,3,5,7,8,9,11,12,13,15},{1,3,5,7,8,9,11,12,14},{1,3,5,7,8,9,11,12,14,15},{1,3,5,7,8,9,11,12,15},{1,3,5,7,8,9,11,13},{1,3,5,7,8,9,11,13,14},{1,3,5,7,8,9,11,13,14,15},{1,3,5,7,8,9,11,13,15},{1,3,5,7,8,9,11,14},{1,3,5,7,8,9,11,14,15},{1,3,5,7,8,9,11,15},{1,3,5,7,8,9,12},{1,3,5,7,8,9,12,13},{1,3,5,7,8,9,12,13,14},{1,3,5,7,8,9,12,13,14,15},{1,3,5,7,8,9,12,13,15},{1,3,5,7,8,9,12,14},{1,3,5,7,8,9,12,14,15},{1,3,5,7,8,9,12,15},{1,3,5,7,8,9,13},{1,3,5,7,8,9,13,14},{1,3,5,7,8,9,13,14,15},{1,3,5,7,8,9,13,15},{1,3,5,7,8,9,14},{1,3,5,7,8,9,14,15},{1,3,5,7,8,9,15},{1,3,5,7,8,10},{1,3,5,7,8,10,11},{1,3,5,7,8,10,11,12},{1,3,5,7,8,10,11,12,13},{1,3,5,7,8,10,11,12,13,14},{1,3,5,7,8,10,11,12,13,14,15},{1,3,5,7,8,10,11,12,13,15},{1,3,5,7,8,10,11,12,14},{1,3,5,7,8,10,11,12,14,15},{1,3,5,7,8,10,11,12,15},{1,3,5,7,8,10,11,13},{1,3,5,7,8,10,11,13,14},{1,3,5,7,8,10,11,13,14,15},{1,3,5,7,8,10,11,13,15},{1,3,5,7,8,10,11,14},{1,3,5,7,8,10,11,14,15},{1,3,5,7,8,10,11,15},{1,3,5,7,8,10,12},{1,3,5,7,8,10,12,13},{1,3,5,7,8,10,12,13,14},{1,3,5,7,8,10,12,13,14,15},{1,3,5,7,8,10,12,13,15},{1,3,5,7,8,10,12,14},{1,3,5,7,8,10,12,14,15},{1,3,5,7,8,10,12,15},{1,3,5,7,8,10,13},{1,3,5,7,8,10,13,14},{1,3,5,7,8,10,13,14,15},{1,3,5,7,8,10,13,15},{1,3,5,7,8,10,14},{1,3,5,7,8,10,14,15},{1,3,5,7,8,10,15},{1,3,5,7,8,11},{1,3,5,7,8,11,12},{1,3,5,7,8,11,12,13},{1,3,5,7,8,11,12,13,14},{1,3,5,7,8,11,12,13,14,15},{1,3,5,7,8,11,12,13,15},{1,3,5,7,8,11,12,14},{1,3,5,7,8,11,12,14,15},{1,3,5,7,8,11,12,15},{1,3,5,7,8,11,13},{1,3,5,7,8,11,13,14},{1,3,5,7,8,11,13,14,15},{1,3,5,7,8,11,13,15},{1,3,5,7,8,11,14},{1,3,5,7,8,11,14,15},{1,3,5,7,8,11,15},{1,3,5,7,8,12},{1,3,5,7,8,12,13},{1,3,5,7,8,12,13,14},{1,3,5,7,8,12,13,14,15},{1,3,5,7,8,12,13,15},{1,3,5,7,8,12,14},{1,3,5,7,8,12,14,15},{1,3,5,7,8,12,15},{1,3,5,7,8,13},{1,3,5,7,8,13,14},{1,3,5,7,8,13,14,15},{1,3,5,7,8,13,15},{1,3,5,7,8,14},{1,3,5,7,8,14,15},{1,3,5,7,8,15},{1,3,5,7,9},{1,3,5,7,9,10},{1,3,5,7,9,10,11},{1,3,5,7,9,10,11,12},{1,3,5,7,9,10,11,12,13},{1,3,5,7,9,10,11,12,13,14},{1,3,5,7,9,10,11,12,13,14,15},{1,3,5,7,9,10,11,12,13,15},{1,3,5,7,9,10,11,12,14},{1,3,5,7,9,10,11,12,14,15},{1,3,5,7,9,10,11,12,15},{1,3,5,7,9,10,11,13},{1,3,5,7,9,10,11,13,14},{1,3,5,7,9,10,11,13,14,15},{1,3,5,7,9,10,11,13,15},{1,3,5,7,9,10,11,14},{1,3,5,7,9,10,11,14,15},{1,3,5,7,9,10,11,15},{1,3,5,7,9,10,12},{1,3,5,7,9,10,12,13},{1,3,5,7,9,10,12,13,14},{1,3,5,7,9,10,12,13,14,15},{1,3,5,7,9,10,12,13,15},{1,3,5,7,9,10,12,14},{1,3,5,7,9,10,12,14,15},{1,3,5,7,9,10,12,15},{1,3,5,7,9,10,13},{1,3,5,7,9,10,13,14},{1,3,5,7,9,10,13,14,15},{1,3,5,7,9,10,13,15},{1,3,5,7,9,10,14},{1,3,5,7,9,10,14,15},{1,3,5,7,9,10,15},{1,3,5,7,9,11},{1,3,5,7,9,11,12},{1,3,5,7,9,11,12,13},{1,3,5,7,9,11,12,13,14},{1,3,5,7,9,11,12,13,14,15},{1,3,5,7,9,11,12,13,15},{1,3,5,7,9,11,12,14},{1,3,5,7,9,11,12,14,15},{1,3,5,7,9,11,12,15},{1,3,5,7,9,11,13},{1,3,5,7,9,11,13,14},{1,3,5,7,9,11,13,14,15},{1,3,5,7,9,11,13,15},{1,3,5,7,9,11,14},{1,3,5,7,9,11,14,15},{1,3,5,7,9,11,15},{1,3,5,7,9,12},{1,3,5,7,9,12,13},{1,3,5,7,9,12,13,14},{1,3,5,7,9,12,13,14,15},{1,3,5,7,9,12,13,15},{1,3,5,7,9,12,14},{1,3,5,7,9,12,14,15},{1,3,5,7,9,12,15},{1,3,5,7,9,13},{1,3,5,7,9,13,14},{1,3,5,7,9,13,14,15},{1,3,5,7,9,13,15},{1,3,5,7,9,14},{1,3,5,7,9,14,15},{1,3,5,7,9,15},{1,3,5,7,10},{1,3,5,7,10,11},{1,3,5,7,10,11,12},{1,3,5,7,10,11,12,13},{1,3,5,7,10,11,12,13,14},{1,3,5,7,10,11,12,13,14,15},{1,3,5,7,10,11,12,13,15},{1,3,5,7,10,11,12,14},{1,3,5,7,10,11,12,14,15},{1,3,5,7,10,11,12,15},{1,3,5,7,10,11,13},{1,3,5,7,10,11,13,14},{1,3,5,7,10,11,13,14,15},{1,3,5,7,10,11,13,15},{1,3,5,7,10,11,14},{1,3,5,7,10,11,14,15},{1,3,5,7,10,11,15},{1,3,5,7,10,12},{1,3,5,7,10,12,13},{1,3,5,7,10,12,13,14},{1,3,5,7,10,12,13,14,15},{1,3,5,7,10,12,13,15},{1,3,5,7,10,12,14},{1,3,5,7,10,12,14,15},{1,3,5,7,10,12,15},{1,3,5,7,10,13},{1,3,5,7,10,13,14},{1,3,5,7,10,13,14,15},{1,3,5,7,10,13,15},{1,3,5,7,10,14},{1,3,5,7,10,14,15},{1,3,5,7,10,15},{1,3,5,7,11},{1,3,5,7,11,12},{1,3,5,7,11,12,13},{1,3,5,7,11,12,13,14},{1,3,5,7,11,12,13,14,15},{1,3,5,7,11,12,13,15},{1,3,5,7,11,12,14},{1,3,5,7,11,12,14,15},{1,3,5,7,11,12,15},{1,3,5,7,11,13},{1,3,5,7,11,13,14},{1,3,5,7,11,13,14,15},{1,3,5,7,11,13,15},{1,3,5,7,11,14},{1,3,5,7,11,14,15},{1,3,5,7,11,15},{1,3,5,7,12},{1,3,5,7,12,13},{1,3,5,7,12,13,14},{1,3,5,7,12,13,14,15},{1,3,5,7,12,13,15},{1,3,5,7,12,14},{1,3,5,7,12,14,15},{1,3,5,7,12,15},{1,3,5,7,13},{1,3,5,7,13,14},{1,3,5,7,13,14,15},{1,3,5,7,13,15},{1,3,5,7,14},{1,3,5,7,14,15},{1,3,5,7,15},{1,3,5,8},{1,3,5,8,9},{1,3,5,8,9,10},{1,3,5,8,9,10,11},{1,3,5,8,9,10,11,12},{1,3,5,8,9,10,11,12,13},{1,3,5,8,9,10,11,12,13,14},{1,3,5,8,9,10,11,12,13,14,15},{1,3,5,8,9,10,11,12,13,15},{1,3,5,8,9,10,11,12,14},{1,3,5,8,9,10,11,12,14,15},{1,3,5,8,9,10,11,12,15},{1,3,5,8,9,10,11,13},{1,3,5,8,9,10,11,13,14},{1,3,5,8,9,10,11,13,14,15},{1,3,5,8,9,10,11,13,15},{1,3,5,8,9,10,11,14},{1,3,5,8,9,10,11,14,15},{1,3,5,8,9,10,11,15},{1,3,5,8,9,10,12},{1,3,5,8,9,10,12,13},{1,3,5,8,9,10,12,13,14},{1,3,5,8,9,10,12,13,14,15},{1,3,5,8,9,10,12,13,15},{1,3,5,8,9,10,12,14},{1,3,5,8,9,10,12,14,15},{1,3,5,8,9,10,12,15},{1,3,5,8,9,10,13},{1,3,5,8,9,10,13,14},{1,3,5,8,9,10,13,14,15},{1,3,5,8,9,10,13,15},{1,3,5,8,9,10,14},{1,3,5,8,9,10,14,15},{1,3,5,8,9,10,15},{1,3,5,8,9,11},{1,3,5,8,9,11,12},{1,3,5,8,9,11,12,13},{1,3,5,8,9,11,12,13,14},{1,3,5,8,9,11,12,13,14,15},{1,3,5,8,9,11,12,13,15},{1,3,5,8,9,11,12,14},{1,3,5,8,9,11,12,14,15},{1,3,5,8,9,11,12,15},{1,3,5,8,9,11,13},{1,3,5,8,9,11,13,14},{1,3,5,8,9,11,13,14,15},{1,3,5,8,9,11,13,15},{1,3,5,8,9,11,14},{1,3,5,8,9,11,14,15},{1,3,5,8,9,11,15},{1,3,5,8,9,12},{1,3,5,8,9,12,13},{1,3,5,8,9,12,13,14},{1,3,5,8,9,12,13,14,15},{1,3,5,8,9,12,13,15},{1,3,5,8,9,12,14},{1,3,5,8,9,12,14,15},{1,3,5,8,9,12,15},{1,3,5,8,9,13},{1,3,5,8,9,13,14},{1,3,5,8,9,13,14,15},{1,3,5,8,9,13,15},{1,3,5,8,9,14},{1,3,5,8,9,14,15},{1,3,5,8,9,15},{1,3,5,8,10},{1,3,5,8,10,11},{1,3,5,8,10,11,12},{1,3,5,8,10,11,12,13},{1,3,5,8,10,11,12,13,14},{1,3,5,8,10,11,12,13,14,15},{1,3,5,8,10,11,12,13,15},{1,3,5,8,10,11,12,14},{1,3,5,8,10,11,12,14,15},{1,3,5,8,10,11,12,15},{1,3,5,8,10,11,13},{1,3,5,8,10,11,13,14},{1,3,5,8,10,11,13,14,15},{1,3,5,8,10,11,13,15},{1,3,5,8,10,11,14},{1,3,5,8,10,11,14,15},{1,3,5,8,10,11,15},{1,3,5,8,10,12},{1,3,5,8,10,12,13},{1,3,5,8,10,12,13,14},{1,3,5,8,10,12,13,14,15},{1,3,5,8,10,12,13,15},{1,3,5,8,10,12,14},{1,3,5,8,10,12,14,15},{1,3,5,8,10,12,15},{1,3,5,8,10,13},{1,3,5,8,10,13,14},{1,3,5,8,10,13,14,15},{1,3,5,8,10,13,15},{1,3,5,8,10,14},{1,3,5,8,10,14,15},{1,3,5,8,10,15},{1,3,5,8,11},{1,3,5,8,11,12},{1,3,5,8,11,12,13},{1,3,5,8,11,12,13,14},{1,3,5,8,11,12,13,14,15},{1,3,5,8,11,12,13,15},{1,3,5,8,11,12,14},{1,3,5,8,11,12,14,15},{1,3,5,8,11,12,15},{1,3,5,8,11,13},{1,3,5,8,11,13,14},{1,3,5,8,11,13,14,15},{1,3,5,8,11,13,15},{1,3,5,8,11,14},{1,3,5,8,11,14,15},{1,3,5,8,11,15},{1,3,5,8,12},{1,3,5,8,12,13},{1,3,5,8,12,13,14},{1,3,5,8,12,13,14,15},{1,3,5,8,12,13,15},{1,3,5,8,12,14},{1,3,5,8,12,14,15},{1,3,5,8,12,15},{1,3,5,8,13},{1,3,5,8,13,14},{1,3,5,8,13,14,15},{1,3,5,8,13,15},{1,3,5,8,14},{1,3,5,8,14,15},{1,3,5,8,15},{1,3,5,9},{1,3,5,9,10},{1,3,5,9,10,11},{1,3,5,9,10,11,12},{1,3,5,9,10,11,12,13},{1,3,5,9,10,11,12,13,14},{1,3,5,9,10,11,12,13,14,15},{1,3,5,9,10,11,12,13,15},{1,3,5,9,10,11,12,14},{1,3,5,9,10,11,12,14,15},{1,3,5,9,10,11,12,15},{1,3,5,9,10,11,13},{1,3,5,9,10,11,13,14},{1,3,5,9,10,11,13,14,15},{1,3,5,9,10,11,13,15},{1,3,5,9,10,11,14},{1,3,5,9,10,11,14,15},{1,3,5,9,10,11,15},{1,3,5,9,10,12},{1,3,5,9,10,12,13},{1,3,5,9,10,12,13,14},{1,3,5,9,10,12,13,14,15},{1,3,5,9,10,12,13,15},{1,3,5,9,10,12,14},{1,3,5,9,10,12,14,15},{1,3,5,9,10,12,15},{1,3,5,9,10,13},{1,3,5,9,10,13,14},{1,3,5,9,10,13,14,15},{1,3,5,9,10,13,15},{1,3,5,9,10,14},{1,3,5,9,10,14,15},{1,3,5,9,10,15},{1,3,5,9,11},{1,3,5,9,11,12},{1,3,5,9,11,12,13},{1,3,5,9,11,12,13,14},{1,3,5,9,11,12,13,14,15},{1,3,5,9,11,12,13,15},{1,3,5,9,11,12,14},{1,3,5,9,11,12,14,15},{1,3,5,9,11,12,15},{1,3,5,9,11,13},{1,3,5,9,11,13,14},{1,3,5,9,11,13,14,15},{1,3,5,9,11,13,15},{1,3,5,9,11,14},{1,3,5,9,11,14,15},{1,3,5,9,11,15},{1,3,5,9,12},{1,3,5,9,12,13},{1,3,5,9,12,13,14},{1,3,5,9,12,13,14,15},{1,3,5,9,12,13,15},{1,3,5,9,12,14},{1,3,5,9,12,14,15},{1,3,5,9,12,15},{1,3,5,9,13},{1,3,5,9,13,14},{1,3,5,9,13,14,15},{1,3,5,9,13,15},{1,3,5,9,14},{1,3,5,9,14,15},{1,3,5,9,15},{1,3,5,10},{1,3,5,10,11},{1,3,5,10,11,12},{1,3,5,10,11,12,13},{1,3,5,10,11,12,13,14},{1,3,5,10,11,12,13,14,15},{1,3,5,10,11,12,13,15},{1,3,5,10,11,12,14},{1,3,5,10,11,12,14,15},{1,3,5,10,11,12,15},{1,3,5,10,11,13},{1,3,5,10,11,13,14},{1,3,5,10,11,13,14,15},{1,3,5,10,11,13,15},{1,3,5,10,11,14},{1,3,5,10,11,14,15},{1,3,5,10,11,15},{1,3,5,10,12},{1,3,5,10,12,13},{1,3,5,10,12,13,14},{1,3,5,10,12,13,14,15},{1,3,5,10,12,13,15},{1,3,5,10,12,14},{1,3,5,10,12,14,15},{1,3,5,10,12,15},{1,3,5,10,13},{1,3,5,10,13,14},{1,3,5,10,13,14,15},{1,3,5,10,13,15},{1,3,5,10,14},{1,3,5,10,14,15},{1,3,5,10,15},{1,3,5,11},{1,3,5,11,12},{1,3,5,11,12,13},{1,3,5,11,12,13,14},{1,3,5,11,12,13,14,15},{1,3,5,11,12,13,15},{1,3,5,11,12,14},{1,3,5,11,12,14,15},{1,3,5,11,12,15},{1,3,5,11,13},{1,3,5,11,13,14},{1,3,5,11,13,14,15},{1,3,5,11,13,15},{1,3,5,11,14},{1,3,5,11,14,15},{1,3,5,11,15},{1,3,5,12},{1,3,5,12,13},{1,3,5,12,13,14},{1,3,5,12,13,14,15},{1,3,5,12,13,15},{1,3,5,12,14},{1,3,5,12,14,15},{1,3,5,12,15},{1,3,5,13},{1,3,5,13,14},{1,3,5,13,14,15},{1,3,5,13,15},{1,3,5,14},{1,3,5,14,15},{1,3,5,15},{1,3,6},{1,3,6,7},{1,3,6,7,8},{1,3,6,7,8,9},{1,3,6,7,8,9,10},{1,3,6,7,8,9,10,11},{1,3,6,7,8,9,10,11,12},{1,3,6,7,8,9,10,11,12,13},{1,3,6,7,8,9,10,11,12,13,14},{1,3,6,7,8,9,10,11,12,13,14,15},{1,3,6,7,8,9,10,11,12,13,15},{1,3,6,7,8,9,10,11,12,14},{1,3,6,7,8,9,10,11,12,14,15},{1,3,6,7,8,9,10,11,12,15},{1,3,6,7,8,9,10,11,13},{1,3,6,7,8,9,10,11,13,14},{1,3,6,7,8,9,10,11,13,14,15},{1,3,6,7,8,9,10,11,13,15},{1,3,6,7,8,9,10,11,14},{1,3,6,7,8,9,10,11,14,15},{1,3,6,7,8,9,10,11,15},{1,3,6,7,8,9,10,12},{1,3,6,7,8,9,10,12,13},{1,3,6,7,8,9,10,12,13,14},{1,3,6,7,8,9,10,12,13,14,15},{1,3,6,7,8,9,10,12,13,15},{1,3,6,7,8,9,10,12,14},{1,3,6,7,8,9,10,12,14,15},{1,3,6,7,8,9,10,12,15},{1,3,6,7,8,9,10,13},{1,3,6,7,8,9,10,13,14},{1,3,6,7,8,9,10,13,14,15},{1,3,6,7,8,9,10,13,15},{1,3,6,7,8,9,10,14},{1,3,6,7,8,9,10,14,15},{1,3,6,7,8,9,10,15},{1,3,6,7,8,9,11},{1,3,6,7,8,9,11,12},{1,3,6,7,8,9,11,12,13},{1,3,6,7,8,9,11,12,13,14},{1,3,6,7,8,9,11,12,13,14,15},{1,3,6,7,8,9,11,12,13,15},{1,3,6,7,8,9,11,12,14},{1,3,6,7,8,9,11,12,14,15},{1,3,6,7,8,9,11,12,15},{1,3,6,7,8,9,11,13},{1,3,6,7,8,9,11,13,14},{1,3,6,7,8,9,11,13,14,15},{1,3,6,7,8,9,11,13,15},{1,3,6,7,8,9,11,14},{1,3,6,7,8,9,11,14,15},{1,3,6,7,8,9,11,15},{1,3,6,7,8,9,12},{1,3,6,7,8,9,12,13},{1,3,6,7,8,9,12,13,14},{1,3,6,7,8,9,12,13,14,15},{1,3,6,7,8,9,12,13,15},{1,3,6,7,8,9,12,14},{1,3,6,7,8,9,12,14,15},{1,3,6,7,8,9,12,15},{1,3,6,7,8,9,13},{1,3,6,7,8,9,13,14},{1,3,6,7,8,9,13,14,15},{1,3,6,7,8,9,13,15},{1,3,6,7,8,9,14},{1,3,6,7,8,9,14,15},{1,3,6,7,8,9,15},{1,3,6,7,8,10},{1,3,6,7,8,10,11},{1,3,6,7,8,10,11,12},{1,3,6,7,8,10,11,12,13},{1,3,6,7,8,10,11,12,13,14},{1,3,6,7,8,10,11,12,13,14,15},{1,3,6,7,8,10,11,12,13,15},{1,3,6,7,8,10,11,12,14},{1,3,6,7,8,10,11,12,14,15},{1,3,6,7,8,10,11,12,15},{1,3,6,7,8,10,11,13},{1,3,6,7,8,10,11,13,14},{1,3,6,7,8,10,11,13,14,15},{1,3,6,7,8,10,11,13,15},{1,3,6,7,8,10,11,14},{1,3,6,7,8,10,11,14,15},{1,3,6,7,8,10,11,15},{1,3,6,7,8,10,12},{1,3,6,7,8,10,12,13},{1,3,6,7,8,10,12,13,14},{1,3,6,7,8,10,12,13,14,15},{1,3,6,7,8,10,12,13,15},{1,3,6,7,8,10,12,14},{1,3,6,7,8,10,12,14,15},{1,3,6,7,8,10,12,15},{1,3,6,7,8,10,13},{1,3,6,7,8,10,13,14},{1,3,6,7,8,10,13,14,15},{1,3,6,7,8,10,13,15},{1,3,6,7,8,10,14},{1,3,6,7,8,10,14,15},{1,3,6,7,8,10,15},{1,3,6,7,8,11},{1,3,6,7,8,11,12},{1,3,6,7,8,11,12,13},{1,3,6,7,8,11,12,13,14},{1,3,6,7,8,11,12,13,14,15},{1,3,6,7,8,11,12,13,15},{1,3,6,7,8,11,12,14},{1,3,6,7,8,11,12,14,15},{1,3,6,7,8,11,12,15},{1,3,6,7,8,11,13},{1,3,6,7,8,11,13,14},{1,3,6,7,8,11,13,14,15},{1,3,6,7,8,11,13,15},{1,3,6,7,8,11,14},{1,3,6,7,8,11,14,15},{1,3,6,7,8,11,15},{1,3,6,7,8,12},{1,3,6,7,8,12,13},{1,3,6,7,8,12,13,14},{1,3,6,7,8,12,13,14,15},{1,3,6,7,8,12,13,15},{1,3,6,7,8,12,14},{1,3,6,7,8,12,14,15},{1,3,6,7,8,12,15},{1,3,6,7,8,13},{1,3,6,7,8,13,14},{1,3,6,7,8,13,14,15},{1,3,6,7,8,13,15},{1,3,6,7,8,14},{1,3,6,7,8,14,15},{1,3,6,7,8,15},{1,3,6,7,9},{1,3,6,7,9,10},{1,3,6,7,9,10,11},{1,3,6,7,9,10,11,12},{1,3,6,7,9,10,11,12,13},{1,3,6,7,9,10,11,12,13,14},{1,3,6,7,9,10,11,12,13,14,15},{1,3,6,7,9,10,11,12,13,15},{1,3,6,7,9,10,11,12,14},{1,3,6,7,9,10,11,12,14,15},{1,3,6,7,9,10,11,12,15},{1,3,6,7,9,10,11,13},{1,3,6,7,9,10,11,13,14},{1,3,6,7,9,10,11,13,14,15},{1,3,6,7,9,10,11,13,15},{1,3,6,7,9,10,11,14},{1,3,6,7,9,10,11,14,15},{1,3,6,7,9,10,11,15},{1,3,6,7,9,10,12},{1,3,6,7,9,10,12,13},{1,3,6,7,9,10,12,13,14},{1,3,6,7,9,10,12,13,14,15},{1,3,6,7,9,10,12,13,15},{1,3,6,7,9,10,12,14},{1,3,6,7,9,10,12,14,15},{1,3,6,7,9,10,12,15},{1,3,6,7,9,10,13},{1,3,6,7,9,10,13,14},{1,3,6,7,9,10,13,14,15},{1,3,6,7,9,10,13,15},{1,3,6,7,9,10,14},{1,3,6,7,9,10,14,15},{1,3,6,7,9,10,15},{1,3,6,7,9,11},{1,3,6,7,9,11,12},{1,3,6,7,9,11,12,13},{1,3,6,7,9,11,12,13,14},{1,3,6,7,9,11,12,13,14,15},{1,3,6,7,9,11,12,13,15},{1,3,6,7,9,11,12,14},{1,3,6,7,9,11,12,14,15},{1,3,6,7,9,11,12,15},{1,3,6,7,9,11,13},{1,3,6,7,9,11,13,14},{1,3,6,7,9,11,13,14,15},{1,3,6,7,9,11,13,15},{1,3,6,7,9,11,14},{1,3,6,7,9,11,14,15},{1,3,6,7,9,11,15},{1,3,6,7,9,12},{1,3,6,7,9,12,13},{1,3,6,7,9,12,13,14},{1,3,6,7,9,12,13,14,15},{1,3,6,7,9,12,13,15},{1,3,6,7,9,12,14},{1,3,6,7,9,12,14,15},{1,3,6,7,9,12,15},{1,3,6,7,9,13},{1,3,6,7,9,13,14},{1,3,6,7,9,13,14,15},{1,3,6,7,9,13,15},{1,3,6,7,9,14},{1,3,6,7,9,14,15},{1,3,6,7,9,15},{1,3,6,7,10},{1,3,6,7,10,11},{1,3,6,7,10,11,12},{1,3,6,7,10,11,12,13},{1,3,6,7,10,11,12,13,14},{1,3,6,7,10,11,12,13,14,15},{1,3,6,7,10,11,12,13,15},{1,3,6,7,10,11,12,14},{1,3,6,7,10,11,12,14,15},{1,3,6,7,10,11,12,15},{1,3,6,7,10,11,13},{1,3,6,7,10,11,13,14},{1,3,6,7,10,11,13,14,15},{1,3,6,7,10,11,13,15},{1,3,6,7,10,11,14},{1,3,6,7,10,11,14,15},{1,3,6,7,10,11,15},{1,3,6,7,10,12},{1,3,6,7,10,12,13},{1,3,6,7,10,12,13,14},{1,3,6,7,10,12,13,14,15},{1,3,6,7,10,12,13,15},{1,3,6,7,10,12,14},{1,3,6,7,10,12,14,15},{1,3,6,7,10,12,15},{1,3,6,7,10,13},{1,3,6,7,10,13,14},{1,3,6,7,10,13,14,15},{1,3,6,7,10,13,15},{1,3,6,7,10,14},{1,3,6,7,10,14,15},{1,3,6,7,10,15},{1,3,6,7,11},{1,3,6,7,11,12},{1,3,6,7,11,12,13},{1,3,6,7,11,12,13,14},{1,3,6,7,11,12,13,14,15},{1,3,6,7,11,12,13,15},{1,3,6,7,11,12,14},{1,3,6,7,11,12,14,15},{1,3,6,7,11,12,15},{1,3,6,7,11,13},{1,3,6,7,11,13,14},{1,3,6,7,11,13,14,15},{1,3,6,7,11,13,15},{1,3,6,7,11,14},{1,3,6,7,11,14,15},{1,3,6,7,11,15},{1,3,6,7,12},{1,3,6,7,12,13},{1,3,6,7,12,13,14},{1,3,6,7,12,13,14,15},{1,3,6,7,12,13,15},{1,3,6,7,12,14},{1,3,6,7,12,14,15},{1,3,6,7,12,15},{1,3,6,7,13},{1,3,6,7,13,14},{1,3,6,7,13,14,15},{1,3,6,7,13,15},{1,3,6,7,14},{1,3,6,7,14,15},{1,3,6,7,15},{1,3,6,8},{1,3,6,8,9},{1,3,6,8,9,10},{1,3,6,8,9,10,11},{1,3,6,8,9,10,11,12},{1,3,6,8,9,10,11,12,13},{1,3,6,8,9,10,11,12,13,14},{1,3,6,8,9,10,11,12,13,14,15},{1,3,6,8,9,10,11,12,13,15},{1,3,6,8,9,10,11,12,14},{1,3,6,8,9,10,11,12,14,15},{1,3,6,8,9,10,11,12,15},{1,3,6,8,9,10,11,13},{1,3,6,8,9,10,11,13,14},{1,3,6,8,9,10,11,13,14,15},{1,3,6,8,9,10,11,13,15},{1,3,6,8,9,10,11,14},{1,3,6,8,9,10,11,14,15},{1,3,6,8,9,10,11,15},{1,3,6,8,9,10,12},{1,3,6,8,9,10,12,13},{1,3,6,8,9,10,12,13,14},{1,3,6,8,9,10,12,13,14,15},{1,3,6,8,9,10,12,13,15},{1,3,6,8,9,10,12,14},{1,3,6,8,9,10,12,14,15},{1,3,6,8,9,10,12,15},{1,3,6,8,9,10,13},{1,3,6,8,9,10,13,14},{1,3,6,8,9,10,13,14,15},{1,3,6,8,9,10,13,15},{1,3,6,8,9,10,14},{1,3,6,8,9,10,14,15},{1,3,6,8,9,10,15},{1,3,6,8,9,11},{1,3,6,8,9,11,12},{1,3,6,8,9,11,12,13},{1,3,6,8,9,11,12,13,14},{1,3,6,8,9,11,12,13,14,15},{1,3,6,8,9,11,12,13,15},{1,3,6,8,9,11,12,14},{1,3,6,8,9,11,12,14,15},{1,3,6,8,9,11,12,15},{1,3,6,8,9,11,13},{1,3,6,8,9,11,13,14},{1,3,6,8,9,11,13,14,15},{1,3,6,8,9,11,13,15},{1,3,6,8,9,11,14},{1,3,6,8,9,11,14,15},{1,3,6,8,9,11,15},{1,3,6,8,9,12},{1,3,6,8,9,12,13},{1,3,6,8,9,12,13,14},{1,3,6,8,9,12,13,14,15},{1,3,6,8,9,12,13,15},{1,3,6,8,9,12,14},{1,3,6,8,9,12,14,15},{1,3,6,8,9,12,15},{1,3,6,8,9,13},{1,3,6,8,9,13,14},{1,3,6,8,9,13,14,15},{1,3,6,8,9,13,15},{1,3,6,8,9,14},{1,3,6,8,9,14,15},{1,3,6,8,9,15},{1,3,6,8,10},{1,3,6,8,10,11},{1,3,6,8,10,11,12},{1,3,6,8,10,11,12,13},{1,3,6,8,10,11,12,13,14},{1,3,6,8,10,11,12,13,14,15},{1,3,6,8,10,11,12,13,15},{1,3,6,8,10,11,12,14},{1,3,6,8,10,11,12,14,15},{1,3,6,8,10,11,12,15},{1,3,6,8,10,11,13},{1,3,6,8,10,11,13,14},{1,3,6,8,10,11,13,14,15},{1,3,6,8,10,11,13,15},{1,3,6,8,10,11,14},{1,3,6,8,10,11,14,15},{1,3,6,8,10,11,15},{1,3,6,8,10,12},{1,3,6,8,10,12,13},{1,3,6,8,10,12,13,14},{1,3,6,8,10,12,13,14,15},{1,3,6,8,10,12,13,15},{1,3,6,8,10,12,14},{1,3,6,8,10,12,14,15},{1,3,6,8,10,12,15},{1,3,6,8,10,13},{1,3,6,8,10,13,14},{1,3,6,8,10,13,14,15},{1,3,6,8,10,13,15},{1,3,6,8,10,14},{1,3,6,8,10,14,15},{1,3,6,8,10,15},{1,3,6,8,11},{1,3,6,8,11,12},{1,3,6,8,11,12,13},{1,3,6,8,11,12,13,14},{1,3,6,8,11,12,13,14,15},{1,3,6,8,11,12,13,15},{1,3,6,8,11,12,14},{1,3,6,8,11,12,14,15},{1,3,6,8,11,12,15},{1,3,6,8,11,13},{1,3,6,8,11,13,14},{1,3,6,8,11,13,14,15},{1,3,6,8,11,13,15},{1,3,6,8,11,14},{1,3,6,8,11,14,15},{1,3,6,8,11,15},{1,3,6,8,12},{1,3,6,8,12,13},{1,3,6,8,12,13,14},{1,3,6,8,12,13,14,15},{1,3,6,8,12,13,15},{1,3,6,8,12,14},{1,3,6,8,12,14,15},{1,3,6,8,12,15},{1,3,6,8,13},{1,3,6,8,13,14},{1,3,6,8,13,14,15},{1,3,6,8,13,15},{1,3,6,8,14},{1,3,6,8,14,15},{1,3,6,8,15},{1,3,6,9},{1,3,6,9,10},{1,3,6,9,10,11},{1,3,6,9,10,11,12},{1,3,6,9,10,11,12,13},{1,3,6,9,10,11,12,13,14},{1,3,6,9,10,11,12,13,14,15},{1,3,6,9,10,11,12,13,15},{1,3,6,9,10,11,12,14},{1,3,6,9,10,11,12,14,15},{1,3,6,9,10,11,12,15},{1,3,6,9,10,11,13},{1,3,6,9,10,11,13,14},{1,3,6,9,10,11,13,14,15},{1,3,6,9,10,11,13,15},{1,3,6,9,10,11,14},{1,3,6,9,10,11,14,15},{1,3,6,9,10,11,15},{1,3,6,9,10,12},{1,3,6,9,10,12,13},{1,3,6,9,10,12,13,14},{1,3,6,9,10,12,13,14,15},{1,3,6,9,10,12,13,15},{1,3,6,9,10,12,14},{1,3,6,9,10,12,14,15},{1,3,6,9,10,12,15},{1,3,6,9,10,13},{1,3,6,9,10,13,14},{1,3,6,9,10,13,14,15},{1,3,6,9,10,13,15},{1,3,6,9,10,14},{1,3,6,9,10,14,15},{1,3,6,9,10,15},{1,3,6,9,11},{1,3,6,9,11,12},{1,3,6,9,11,12,13},{1,3,6,9,11,12,13,14},{1,3,6,9,11,12,13,14,15},{1,3,6,9,11,12,13,15},{1,3,6,9,11,12,14},{1,3,6,9,11,12,14,15},{1,3,6,9,11,12,15},{1,3,6,9,11,13},{1,3,6,9,11,13,14},{1,3,6,9,11,13,14,15},{1,3,6,9,11,13,15},{1,3,6,9,11,14},{1,3,6,9,11,14,15},{1,3,6,9,11,15},{1,3,6,9,12},{1,3,6,9,12,13},{1,3,6,9,12,13,14},{1,3,6,9,12,13,14,15},{1,3,6,9,12,13,15},{1,3,6,9,12,14},{1,3,6,9,12,14,15},{1,3,6,9,12,15},{1,3,6,9,13},{1,3,6,9,13,14},{1,3,6,9,13,14,15},{1,3,6,9,13,15},{1,3,6,9,14},{1,3,6,9,14,15},{1,3,6,9,15},{1,3,6,10},{1,3,6,10,11},{1,3,6,10,11,12},{1,3,6,10,11,12,13},{1,3,6,10,11,12,13,14},{1,3,6,10,11,12,13,14,15},{1,3,6,10,11,12,13,15},{1,3,6,10,11,12,14},{1,3,6,10,11,12,14,15},{1,3,6,10,11,12,15},{1,3,6,10,11,13},{1,3,6,10,11,13,14},{1,3,6,10,11,13,14,15},{1,3,6,10,11,13,15},{1,3,6,10,11,14},{1,3,6,10,11,14,15},{1,3,6,10,11,15},{1,3,6,10,12},{1,3,6,10,12,13},{1,3,6,10,12,13,14},{1,3,6,10,12,13,14,15},{1,3,6,10,12,13,15},{1,3,6,10,12,14},{1,3,6,10,12,14,15},{1,3,6,10,12,15},{1,3,6,10,13},{1,3,6,10,13,14},{1,3,6,10,13,14,15},{1,3,6,10,13,15},{1,3,6,10,14},{1,3,6,10,14,15},{1,3,6,10,15},{1,3,6,11},{1,3,6,11,12},{1,3,6,11,12,13},{1,3,6,11,12,13,14},{1,3,6,11,12,13,14,15},{1,3,6,11,12,13,15},{1,3,6,11,12,14},{1,3,6,11,12,14,15},{1,3,6,11,12,15},{1,3,6,11,13},{1,3,6,11,13,14},{1,3,6,11,13,14,15},{1,3,6,11,13,15},{1,3,6,11,14},{1,3,6,11,14,15},{1,3,6,11,15},{1,3,6,12},{1,3,6,12,13},{1,3,6,12,13,14},{1,3,6,12,13,14,15},{1,3,6,12,13,15},{1,3,6,12,14},{1,3,6,12,14,15},{1,3,6,12,15},{1,3,6,13},{1,3,6,13,14},{1,3,6,13,14,15},{1,3,6,13,15},{1,3,6,14},{1,3,6,14,15},{1,3,6,15},{1,3,7},{1,3,7,8},{1,3,7,8,9},{1,3,7,8,9,10},{1,3,7,8,9,10,11},{1,3,7,8,9,10,11,12},{1,3,7,8,9,10,11,12,13},{1,3,7,8,9,10,11,12,13,14},{1,3,7,8,9,10,11,12,13,14,15},{1,3,7,8,9,10,11,12,13,15},{1,3,7,8,9,10,11,12,14},{1,3,7,8,9,10,11,12,14,15},{1,3,7,8,9,10,11,12,15},{1,3,7,8,9,10,11,13},{1,3,7,8,9,10,11,13,14},{1,3,7,8,9,10,11,13,14,15},{1,3,7,8,9,10,11,13,15},{1,3,7,8,9,10,11,14},{1,3,7,8,9,10,11,14,15},{1,3,7,8,9,10,11,15},{1,3,7,8,9,10,12},{1,3,7,8,9,10,12,13},{1,3,7,8,9,10,12,13,14},{1,3,7,8,9,10,12,13,14,15},{1,3,7,8,9,10,12,13,15},{1,3,7,8,9,10,12,14},{1,3,7,8,9,10,12,14,15},{1,3,7,8,9,10,12,15},{1,3,7,8,9,10,13},{1,3,7,8,9,10,13,14},{1,3,7,8,9,10,13,14,15},{1,3,7,8,9,10,13,15},{1,3,7,8,9,10,14},{1,3,7,8,9,10,14,15},{1,3,7,8,9,10,15},{1,3,7,8,9,11},{1,3,7,8,9,11,12},{1,3,7,8,9,11,12,13},{1,3,7,8,9,11,12,13,14},{1,3,7,8,9,11,12,13,14,15},{1,3,7,8,9,11,12,13,15},{1,3,7,8,9,11,12,14},{1,3,7,8,9,11,12,14,15},{1,3,7,8,9,11,12,15},{1,3,7,8,9,11,13},{1,3,7,8,9,11,13,14},{1,3,7,8,9,11,13,14,15},{1,3,7,8,9,11,13,15},{1,3,7,8,9,11,14},{1,3,7,8,9,11,14,15},{1,3,7,8,9,11,15},{1,3,7,8,9,12},{1,3,7,8,9,12,13},{1,3,7,8,9,12,13,14},{1,3,7,8,9,12,13,14,15},{1,3,7,8,9,12,13,15},{1,3,7,8,9,12,14},{1,3,7,8,9,12,14,15},{1,3,7,8,9,12,15},{1,3,7,8,9,13},{1,3,7,8,9,13,14},{1,3,7,8,9,13,14,15},{1,3,7,8,9,13,15},{1,3,7,8,9,14},{1,3,7,8,9,14,15},{1,3,7,8,9,15},{1,3,7,8,10},{1,3,7,8,10,11},{1,3,7,8,10,11,12},{1,3,7,8,10,11,12,13},{1,3,7,8,10,11,12,13,14},{1,3,7,8,10,11,12,13,14,15},{1,3,7,8,10,11,12,13,15},{1,3,7,8,10,11,12,14},{1,3,7,8,10,11,12,14,15},{1,3,7,8,10,11,12,15},{1,3,7,8,10,11,13},{1,3,7,8,10,11,13,14},{1,3,7,8,10,11,13,14,15},{1,3,7,8,10,11,13,15},{1,3,7,8,10,11,14},{1,3,7,8,10,11,14,15},{1,3,7,8,10,11,15},{1,3,7,8,10,12},{1,3,7,8,10,12,13},{1,3,7,8,10,12,13,14},{1,3,7,8,10,12,13,14,15},{1,3,7,8,10,12,13,15},{1,3,7,8,10,12,14},{1,3,7,8,10,12,14,15},{1,3,7,8,10,12,15},{1,3,7,8,10,13},{1,3,7,8,10,13,14},{1,3,7,8,10,13,14,15},{1,3,7,8,10,13,15},{1,3,7,8,10,14},{1,3,7,8,10,14,15},{1,3,7,8,10,15},{1,3,7,8,11},{1,3,7,8,11,12},{1,3,7,8,11,12,13},{1,3,7,8,11,12,13,14},{1,3,7,8,11,12,13,14,15},{1,3,7,8,11,12,13,15},{1,3,7,8,11,12,14},{1,3,7,8,11,12,14,15},{1,3,7,8,11,12,15},{1,3,7,8,11,13},{1,3,7,8,11,13,14},{1,3,7,8,11,13,14,15},{1,3,7,8,11,13,15},{1,3,7,8,11,14},{1,3,7,8,11,14,15},{1,3,7,8,11,15},{1,3,7,8,12},{1,3,7,8,12,13},{1,3,7,8,12,13,14},{1,3,7,8,12,13,14,15},{1,3,7,8,12,13,15},{1,3,7,8,12,14},{1,3,7,8,12,14,15},{1,3,7,8,12,15},{1,3,7,8,13},{1,3,7,8,13,14},{1,3,7,8,13,14,15},{1,3,7,8,13,15},{1,3,7,8,14},{1,3,7,8,14,15},{1,3,7,8,15},{1,3,7,9},{1,3,7,9,10},{1,3,7,9,10,11},{1,3,7,9,10,11,12},{1,3,7,9,10,11,12,13},{1,3,7,9,10,11,12,13,14},{1,3,7,9,10,11,12,13,14,15},{1,3,7,9,10,11,12,13,15},{1,3,7,9,10,11,12,14},{1,3,7,9,10,11,12,14,15},{1,3,7,9,10,11,12,15},{1,3,7,9,10,11,13},{1,3,7,9,10,11,13,14},{1,3,7,9,10,11,13,14,15},{1,3,7,9,10,11,13,15},{1,3,7,9,10,11,14},{1,3,7,9,10,11,14,15},{1,3,7,9,10,11,15},{1,3,7,9,10,12},{1,3,7,9,10,12,13},{1,3,7,9,10,12,13,14},{1,3,7,9,10,12,13,14,15},{1,3,7,9,10,12,13,15},{1,3,7,9,10,12,14},{1,3,7,9,10,12,14,15},{1,3,7,9,10,12,15},{1,3,7,9,10,13},{1,3,7,9,10,13,14},{1,3,7,9,10,13,14,15},{1,3,7,9,10,13,15},{1,3,7,9,10,14},{1,3,7,9,10,14,15},{1,3,7,9,10,15},{1,3,7,9,11},{1,3,7,9,11,12},{1,3,7,9,11,12,13},{1,3,7,9,11,12,13,14},{1,3,7,9,11,12,13,14,15},{1,3,7,9,11,12,13,15},{1,3,7,9,11,12,14},{1,3,7,9,11,12,14,15},{1,3,7,9,11,12,15},{1,3,7,9,11,13},{1,3,7,9,11,13,14},{1,3,7,9,11,13,14,15},{1,3,7,9,11,13,15},{1,3,7,9,11,14},{1,3,7,9,11,14,15},{1,3,7,9,11,15},{1,3,7,9,12},{1,3,7,9,12,13},{1,3,7,9,12,13,14},{1,3,7,9,12,13,14,15},{1,3,7,9,12,13,15},{1,3,7,9,12,14},{1,3,7,9,12,14,15},{1,3,7,9,12,15},{1,3,7,9,13},{1,3,7,9,13,14},{1,3,7,9,13,14,15},{1,3,7,9,13,15},{1,3,7,9,14},{1,3,7,9,14,15},{1,3,7,9,15},{1,3,7,10},{1,3,7,10,11},{1,3,7,10,11,12},{1,3,7,10,11,12,13},{1,3,7,10,11,12,13,14},{1,3,7,10,11,12,13,14,15},{1,3,7,10,11,12,13,15},{1,3,7,10,11,12,14},{1,3,7,10,11,12,14,15},{1,3,7,10,11,12,15},{1,3,7,10,11,13},{1,3,7,10,11,13,14},{1,3,7,10,11,13,14,15},{1,3,7,10,11,13,15},{1,3,7,10,11,14},{1,3,7,10,11,14,15},{1,3,7,10,11,15},{1,3,7,10,12},{1,3,7,10,12,13},{1,3,7,10,12,13,14},{1,3,7,10,12,13,14,15},{1,3,7,10,12,13,15},{1,3,7,10,12,14},{1,3,7,10,12,14,15},{1,3,7,10,12,15},{1,3,7,10,13},{1,3,7,10,13,14},{1,3,7,10,13,14,15},{1,3,7,10,13,15},{1,3,7,10,14},{1,3,7,10,14,15},{1,3,7,10,15},{1,3,7,11},{1,3,7,11,12},{1,3,7,11,12,13},{1,3,7,11,12,13,14},{1,3,7,11,12,13,14,15},{1,3,7,11,12,13,15},{1,3,7,11,12,14},{1,3,7,11,12,14,15},{1,3,7,11,12,15},{1,3,7,11,13},{1,3,7,11,13,14},{1,3,7,11,13,14,15},{1,3,7,11,13,15},{1,3,7,11,14},{1,3,7,11,14,15},{1,3,7,11,15},{1,3,7,12},{1,3,7,12,13},{1,3,7,12,13,14},{1,3,7,12,13,14,15},{1,3,7,12,13,15},{1,3,7,12,14},{1,3,7,12,14,15},{1,3,7,12,15},{1,3,7,13},{1,3,7,13,14},{1,3,7,13,14,15},{1,3,7,13,15},{1,3,7,14},{1,3,7,14,15},{1,3,7,15},{1,3,8},{1,3,8,9},{1,3,8,9,10},{1,3,8,9,10,11},{1,3,8,9,10,11,12},{1,3,8,9,10,11,12,13},{1,3,8,9,10,11,12,13,14},{1,3,8,9,10,11,12,13,14,15},{1,3,8,9,10,11,12,13,15},{1,3,8,9,10,11,12,14},{1,3,8,9,10,11,12,14,15},{1,3,8,9,10,11,12,15},{1,3,8,9,10,11,13},{1,3,8,9,10,11,13,14},{1,3,8,9,10,11,13,14,15},{1,3,8,9,10,11,13,15},{1,3,8,9,10,11,14},{1,3,8,9,10,11,14,15},{1,3,8,9,10,11,15},{1,3,8,9,10,12},{1,3,8,9,10,12,13},{1,3,8,9,10,12,13,14},{1,3,8,9,10,12,13,14,15},{1,3,8,9,10,12,13,15},{1,3,8,9,10,12,14},{1,3,8,9,10,12,14,15},{1,3,8,9,10,12,15},{1,3,8,9,10,13},{1,3,8,9,10,13,14},{1,3,8,9,10,13,14,15},{1,3,8,9,10,13,15},{1,3,8,9,10,14},{1,3,8,9,10,14,15},{1,3,8,9,10,15},{1,3,8,9,11},{1,3,8,9,11,12},{1,3,8,9,11,12,13},{1,3,8,9,11,12,13,14},{1,3,8,9,11,12,13,14,15},{1,3,8,9,11,12,13,15},{1,3,8,9,11,12,14},{1,3,8,9,11,12,14,15},{1,3,8,9,11,12,15},{1,3,8,9,11,13},{1,3,8,9,11,13,14},{1,3,8,9,11,13,14,15},{1,3,8,9,11,13,15},{1,3,8,9,11,14},{1,3,8,9,11,14,15},{1,3,8,9,11,15},{1,3,8,9,12},{1,3,8,9,12,13},{1,3,8,9,12,13,14},{1,3,8,9,12,13,14,15},{1,3,8,9,12,13,15},{1,3,8,9,12,14},{1,3,8,9,12,14,15},{1,3,8,9,12,15},{1,3,8,9,13},{1,3,8,9,13,14},{1,3,8,9,13,14,15},{1,3,8,9,13,15},{1,3,8,9,14},{1,3,8,9,14,15},{1,3,8,9,15},{1,3,8,10},{1,3,8,10,11},{1,3,8,10,11,12},{1,3,8,10,11,12,13},{1,3,8,10,11,12,13,14},{1,3,8,10,11,12,13,14,15},{1,3,8,10,11,12,13,15},{1,3,8,10,11,12,14},{1,3,8,10,11,12,14,15},{1,3,8,10,11,12,15},{1,3,8,10,11,13},{1,3,8,10,11,13,14},{1,3,8,10,11,13,14,15},{1,3,8,10,11,13,15},{1,3,8,10,11,14},{1,3,8,10,11,14,15},{1,3,8,10,11,15},{1,3,8,10,12},{1,3,8,10,12,13},{1,3,8,10,12,13,14},{1,3,8,10,12,13,14,15},{1,3,8,10,12,13,15},{1,3,8,10,12,14},{1,3,8,10,12,14,15},{1,3,8,10,12,15},{1,3,8,10,13},{1,3,8,10,13,14},{1,3,8,10,13,14,15},{1,3,8,10,13,15},{1,3,8,10,14},{1,3,8,10,14,15},{1,3,8,10,15},{1,3,8,11},{1,3,8,11,12},{1,3,8,11,12,13},{1,3,8,11,12,13,14},{1,3,8,11,12,13,14,15},{1,3,8,11,12,13,15},{1,3,8,11,12,14},{1,3,8,11,12,14,15},{1,3,8,11,12,15},{1,3,8,11,13},{1,3,8,11,13,14},{1,3,8,11,13,14,15},{1,3,8,11,13,15},{1,3,8,11,14},{1,3,8,11,14,15},{1,3,8,11,15},{1,3,8,12},{1,3,8,12,13},{1,3,8,12,13,14},{1,3,8,12,13,14,15},{1,3,8,12,13,15},{1,3,8,12,14},{1,3,8,12,14,15},{1,3,8,12,15},{1,3,8,13},{1,3,8,13,14},{1,3,8,13,14,15},{1,3,8,13,15},{1,3,8,14},{1,3,8,14,15},{1,3,8,15},{1,3,9},{1,3,9,10},{1,3,9,10,11},{1,3,9,10,11,12},{1,3,9,10,11,12,13},{1,3,9,10,11,12,13,14},{1,3,9,10,11,12,13,14,15},{1,3,9,10,11,12,13,15},{1,3,9,10,11,12,14},{1,3,9,10,11,12,14,15},{1,3,9,10,11,12,15},{1,3,9,10,11,13},{1,3,9,10,11,13,14},{1,3,9,10,11,13,14,15},{1,3,9,10,11,13,15},{1,3,9,10,11,14},{1,3,9,10,11,14,15},{1,3,9,10,11,15},{1,3,9,10,12},{1,3,9,10,12,13},{1,3,9,10,12,13,14},{1,3,9,10,12,13,14,15},{1,3,9,10,12,13,15},{1,3,9,10,12,14},{1,3,9,10,12,14,15},{1,3,9,10,12,15},{1,3,9,10,13},{1,3,9,10,13,14},{1,3,9,10,13,14,15},{1,3,9,10,13,15},{1,3,9,10,14},{1,3,9,10,14,15},{1,3,9,10,15},{1,3,9,11},{1,3,9,11,12},{1,3,9,11,12,13},{1,3,9,11,12,13,14},{1,3,9,11,12,13,14,15},{1,3,9,11,12,13,15},{1,3,9,11,12,14},{1,3,9,11,12,14,15},{1,3,9,11,12,15},{1,3,9,11,13},{1,3,9,11,13,14},{1,3,9,11,13,14,15},{1,3,9,11,13,15},{1,3,9,11,14},{1,3,9,11,14,15},{1,3,9,11,15},{1,3,9,12},{1,3,9,12,13},{1,3,9,12,13,14},{1,3,9,12,13,14,15},{1,3,9,12,13,15},{1,3,9,12,14},{1,3,9,12,14,15},{1,3,9,12,15},{1,3,9,13},{1,3,9,13,14},{1,3,9,13,14,15},{1,3,9,13,15},{1,3,9,14},{1,3,9,14,15},{1,3,9,15},{1,3,10},{1,3,10,11},{1,3,10,11,12},{1,3,10,11,12,13},{1,3,10,11,12,13,14},{1,3,10,11,12,13,14,15},{1,3,10,11,12,13,15},{1,3,10,11,12,14},{1,3,10,11,12,14,15},{1,3,10,11,12,15},{1,3,10,11,13},{1,3,10,11,13,14},{1,3,10,11,13,14,15},{1,3,10,11,13,15},{1,3,10,11,14},{1,3,10,11,14,15},{1,3,10,11,15},{1,3,10,12},{1,3,10,12,13},{1,3,10,12,13,14},{1,3,10,12,13,14,15},{1,3,10,12,13,15},{1,3,10,12,14},{1,3,10,12,14,15},{1,3,10,12,15},{1,3,10,13},{1,3,10,13,14},{1,3,10,13,14,15},{1,3,10,13,15},{1,3,10,14},{1,3,10,14,15},{1,3,10,15},{1,3,11},{1,3,11,12},{1,3,11,12,13},{1,3,11,12,13,14},{1,3,11,12,13,14,15},{1,3,11,12,13,15},{1,3,11,12,14},{1,3,11,12,14,15},{1,3,11,12,15},{1,3,11,13},{1,3,11,13,14},{1,3,11,13,14,15},{1,3,11,13,15},{1,3,11,14},{1,3,11,14,15},{1,3,11,15},{1,3,12},{1,3,12,13},{1,3,12,13,14},{1,3,12,13,14,15},{1,3,12,13,15},{1,3,12,14},{1,3,12,14,15},{1,3,12,15},{1,3,13},{1,3,13,14},{1,3,13,14,15},{1,3,13,15},{1,3,14},{1,3,14,15},{1,3,15},{1,4},{1,4,5},{1,4,5,6},{1,4,5,6,7},{1,4,5,6,7,8},{1,4,5,6,7,8,9},{1,4,5,6,7,8,9,10},{1,4,5,6,7,8,9,10,11},{1,4,5,6,7,8,9,10,11,12},{1,4,5,6,7,8,9,10,11,12,13},{1,4,5,6,7,8,9,10,11,12,13,14},{1,4,5,6,7,8,9,10,11,12,13,14,15},{1,4,5,6,7,8,9,10,11,12,13,15},{1,4,5,6,7,8,9,10,11,12,14},{1,4,5,6,7,8,9,10,11,12,14,15},{1,4,5,6,7,8,9,10,11,12,15},{1,4,5,6,7,8,9,10,11,13},{1,4,5,6,7,8,9,10,11,13,14},{1,4,5,6,7,8,9,10,11,13,14,15},{1,4,5,6,7,8,9,10,11,13,15},{1,4,5,6,7,8,9,10,11,14},{1,4,5,6,7,8,9,10,11,14,15},{1,4,5,6,7,8,9,10,11,15},{1,4,5,6,7,8,9,10,12},{1,4,5,6,7,8,9,10,12,13},{1,4,5,6,7,8,9,10,12,13,14},{1,4,5,6,7,8,9,10,12,13,14,15},{1,4,5,6,7,8,9,10,12,13,15},{1,4,5,6,7,8,9,10,12,14},{1,4,5,6,7,8,9,10,12,14,15},{1,4,5,6,7,8,9,10,12,15},{1,4,5,6,7,8,9,10,13},{1,4,5,6,7,8,9,10,13,14},{1,4,5,6,7,8,9,10,13,14,15},{1,4,5,6,7,8,9,10,13,15},{1,4,5,6,7,8,9,10,14},{1,4,5,6,7,8,9,10,14,15},{1,4,5,6,7,8,9,10,15},{1,4,5,6,7,8,9,11},{1,4,5,6,7,8,9,11,12},{1,4,5,6,7,8,9,11,12,13},{1,4,5,6,7,8,9,11,12,13,14},{1,4,5,6,7,8,9,11,12,13,14,15},{1,4,5,6,7,8,9,11,12,13,15},{1,4,5,6,7,8,9,11,12,14},{1,4,5,6,7,8,9,11,12,14,15},{1,4,5,6,7,8,9,11,12,15},{1,4,5,6,7,8,9,11,13},{1,4,5,6,7,8,9,11,13,14},{1,4,5,6,7,8,9,11,13,14,15},{1,4,5,6,7,8,9,11,13,15},{1,4,5,6,7,8,9,11,14},{1,4,5,6,7,8,9,11,14,15},{1,4,5,6,7,8,9,11,15},{1,4,5,6,7,8,9,12},{1,4,5,6,7,8,9,12,13},{1,4,5,6,7,8,9,12,13,14},{1,4,5,6,7,8,9,12,13,14,15},{1,4,5,6,7,8,9,12,13,15},{1,4,5,6,7,8,9,12,14},{1,4,5,6,7,8,9,12,14,15},{1,4,5,6,7,8,9,12,15},{1,4,5,6,7,8,9,13},{1,4,5,6,7,8,9,13,14},{1,4,5,6,7,8,9,13,14,15},{1,4,5,6,7,8,9,13,15},{1,4,5,6,7,8,9,14},{1,4,5,6,7,8,9,14,15},{1,4,5,6,7,8,9,15},{1,4,5,6,7,8,10},{1,4,5,6,7,8,10,11},{1,4,5,6,7,8,10,11,12},{1,4,5,6,7,8,10,11,12,13},{1,4,5,6,7,8,10,11,12,13,14},{1,4,5,6,7,8,10,11,12,13,14,15},{1,4,5,6,7,8,10,11,12,13,15},{1,4,5,6,7,8,10,11,12,14},{1,4,5,6,7,8,10,11,12,14,15},{1,4,5,6,7,8,10,11,12,15},{1,4,5,6,7,8,10,11,13},{1,4,5,6,7,8,10,11,13,14},{1,4,5,6,7,8,10,11,13,14,15},{1,4,5,6,7,8,10,11,13,15},{1,4,5,6,7,8,10,11,14},{1,4,5,6,7,8,10,11,14,15},{1,4,5,6,7,8,10,11,15},{1,4,5,6,7,8,10,12},{1,4,5,6,7,8,10,12,13},{1,4,5,6,7,8,10,12,13,14},{1,4,5,6,7,8,10,12,13,14,15},{1,4,5,6,7,8,10,12,13,15},{1,4,5,6,7,8,10,12,14},{1,4,5,6,7,8,10,12,14,15},{1,4,5,6,7,8,10,12,15},{1,4,5,6,7,8,10,13},{1,4,5,6,7,8,10,13,14},{1,4,5,6,7,8,10,13,14,15},{1,4,5,6,7,8,10,13,15},{1,4,5,6,7,8,10,14},{1,4,5,6,7,8,10,14,15},{1,4,5,6,7,8,10,15},{1,4,5,6,7,8,11},{1,4,5,6,7,8,11,12},{1,4,5,6,7,8,11,12,13},{1,4,5,6,7,8,11,12,13,14},{1,4,5,6,7,8,11,12,13,14,15},{1,4,5,6,7,8,11,12,13,15},{1,4,5,6,7,8,11,12,14},{1,4,5,6,7,8,11,12,14,15},{1,4,5,6,7,8,11,12,15},{1,4,5,6,7,8,11,13},{1,4,5,6,7,8,11,13,14},{1,4,5,6,7,8,11,13,14,15},{1,4,5,6,7,8,11,13,15},{1,4,5,6,7,8,11,14},{1,4,5,6,7,8,11,14,15},{1,4,5,6,7,8,11,15},{1,4,5,6,7,8,12},{1,4,5,6,7,8,12,13},{1,4,5,6,7,8,12,13,14},{1,4,5,6,7,8,12,13,14,15},{1,4,5,6,7,8,12,13,15},{1,4,5,6,7,8,12,14},{1,4,5,6,7,8,12,14,15},{1,4,5,6,7,8,12,15},{1,4,5,6,7,8,13},{1,4,5,6,7,8,13,14},{1,4,5,6,7,8,13,14,15},{1,4,5,6,7,8,13,15},{1,4,5,6,7,8,14},{1,4,5,6,7,8,14,15},{1,4,5,6,7,8,15},{1,4,5,6,7,9},{1,4,5,6,7,9,10},{1,4,5,6,7,9,10,11},{1,4,5,6,7,9,10,11,12},{1,4,5,6,7,9,10,11,12,13},{1,4,5,6,7,9,10,11,12,13,14},{1,4,5,6,7,9,10,11,12,13,14,15},{1,4,5,6,7,9,10,11,12,13,15},{1,4,5,6,7,9,10,11,12,14},{1,4,5,6,7,9,10,11,12,14,15},{1,4,5,6,7,9,10,11,12,15},{1,4,5,6,7,9,10,11,13},{1,4,5,6,7,9,10,11,13,14},{1,4,5,6,7,9,10,11,13,14,15},{1,4,5,6,7,9,10,11,13,15},{1,4,5,6,7,9,10,11,14},{1,4,5,6,7,9,10,11,14,15},{1,4,5,6,7,9,10,11,15},{1,4,5,6,7,9,10,12},{1,4,5,6,7,9,10,12,13},{1,4,5,6,7,9,10,12,13,14},{1,4,5,6,7,9,10,12,13,14,15},{1,4,5,6,7,9,10,12,13,15},{1,4,5,6,7,9,10,12,14},{1,4,5,6,7,9,10,12,14,15},{1,4,5,6,7,9,10,12,15},{1,4,5,6,7,9,10,13},{1,4,5,6,7,9,10,13,14},{1,4,5,6,7,9,10,13,14,15},{1,4,5,6,7,9,10,13,15},{1,4,5,6,7,9,10,14},{1,4,5,6,7,9,10,14,15},{1,4,5,6,7,9,10,15},{1,4,5,6,7,9,11},{1,4,5,6,7,9,11,12},{1,4,5,6,7,9,11,12,13},{1,4,5,6,7,9,11,12,13,14},{1,4,5,6,7,9,11,12,13,14,15},{1,4,5,6,7,9,11,12,13,15},{1,4,5,6,7,9,11,12,14},{1,4,5,6,7,9,11,12,14,15},{1,4,5,6,7,9,11,12,15},{1,4,5,6,7,9,11,13},{1,4,5,6,7,9,11,13,14},{1,4,5,6,7,9,11,13,14,15},{1,4,5,6,7,9,11,13,15},{1,4,5,6,7,9,11,14},{1,4,5,6,7,9,11,14,15},{1,4,5,6,7,9,11,15},{1,4,5,6,7,9,12},{1,4,5,6,7,9,12,13},{1,4,5,6,7,9,12,13,14},{1,4,5,6,7,9,12,13,14,15},{1,4,5,6,7,9,12,13,15},{1,4,5,6,7,9,12,14},{1,4,5,6,7,9,12,14,15},{1,4,5,6,7,9,12,15},{1,4,5,6,7,9,13},{1,4,5,6,7,9,13,14},{1,4,5,6,7,9,13,14,15},{1,4,5,6,7,9,13,15},{1,4,5,6,7,9,14},{1,4,5,6,7,9,14,15},{1,4,5,6,7,9,15},{1,4,5,6,7,10},{1,4,5,6,7,10,11},{1,4,5,6,7,10,11,12},{1,4,5,6,7,10,11,12,13},{1,4,5,6,7,10,11,12,13,14},{1,4,5,6,7,10,11,12,13,14,15},{1,4,5,6,7,10,11,12,13,15},{1,4,5,6,7,10,11,12,14},{1,4,5,6,7,10,11,12,14,15},{1,4,5,6,7,10,11,12,15},{1,4,5,6,7,10,11,13},{1,4,5,6,7,10,11,13,14},{1,4,5,6,7,10,11,13,14,15},{1,4,5,6,7,10,11,13,15},{1,4,5,6,7,10,11,14},{1,4,5,6,7,10,11,14,15},{1,4,5,6,7,10,11,15},{1,4,5,6,7,10,12},{1,4,5,6,7,10,12,13},{1,4,5,6,7,10,12,13,14},{1,4,5,6,7,10,12,13,14,15},{1,4,5,6,7,10,12,13,15},{1,4,5,6,7,10,12,14},{1,4,5,6,7,10,12,14,15},{1,4,5,6,7,10,12,15},{1,4,5,6,7,10,13},{1,4,5,6,7,10,13,14},{1,4,5,6,7,10,13,14,15},{1,4,5,6,7,10,13,15},{1,4,5,6,7,10,14},{1,4,5,6,7,10,14,15},{1,4,5,6,7,10,15},{1,4,5,6,7,11},{1,4,5,6,7,11,12},{1,4,5,6,7,11,12,13},{1,4,5,6,7,11,12,13,14},{1,4,5,6,7,11,12,13,14,15},{1,4,5,6,7,11,12,13,15},{1,4,5,6,7,11,12,14},{1,4,5,6,7,11,12,14,15},{1,4,5,6,7,11,12,15},{1,4,5,6,7,11,13},{1,4,5,6,7,11,13,14},{1,4,5,6,7,11,13,14,15},{1,4,5,6,7,11,13,15},{1,4,5,6,7,11,14},{1,4,5,6,7,11,14,15},{1,4,5,6,7,11,15},{1,4,5,6,7,12},{1,4,5,6,7,12,13},{1,4,5,6,7,12,13,14},{1,4,5,6,7,12,13,14,15},{1,4,5,6,7,12,13,15},{1,4,5,6,7,12,14},{1,4,5,6,7,12,14,15},{1,4,5,6,7,12,15},{1,4,5,6,7,13},{1,4,5,6,7,13,14},{1,4,5,6,7,13,14,15},{1,4,5,6,7,13,15},{1,4,5,6,7,14},{1,4,5,6,7,14,15},{1,4,5,6,7,15},{1,4,5,6,8},{1,4,5,6,8,9},{1,4,5,6,8,9,10},{1,4,5,6,8,9,10,11},{1,4,5,6,8,9,10,11,12},{1,4,5,6,8,9,10,11,12,13},{1,4,5,6,8,9,10,11,12,13,14},{1,4,5,6,8,9,10,11,12,13,14,15},{1,4,5,6,8,9,10,11,12,13,15},{1,4,5,6,8,9,10,11,12,14},{1,4,5,6,8,9,10,11,12,14,15},{1,4,5,6,8,9,10,11,12,15},{1,4,5,6,8,9,10,11,13},{1,4,5,6,8,9,10,11,13,14},{1,4,5,6,8,9,10,11,13,14,15},{1,4,5,6,8,9,10,11,13,15},{1,4,5,6,8,9,10,11,14},{1,4,5,6,8,9,10,11,14,15},{1,4,5,6,8,9,10,11,15},{1,4,5,6,8,9,10,12},{1,4,5,6,8,9,10,12,13},{1,4,5,6,8,9,10,12,13,14},{1,4,5,6,8,9,10,12,13,14,15},{1,4,5,6,8,9,10,12,13,15},{1,4,5,6,8,9,10,12,14},{1,4,5,6,8,9,10,12,14,15},{1,4,5,6,8,9,10,12,15},{1,4,5,6,8,9,10,13},{1,4,5,6,8,9,10,13,14},{1,4,5,6,8,9,10,13,14,15},{1,4,5,6,8,9,10,13,15},{1,4,5,6,8,9,10,14},{1,4,5,6,8,9,10,14,15},{1,4,5,6,8,9,10,15},{1,4,5,6,8,9,11},{1,4,5,6,8,9,11,12},{1,4,5,6,8,9,11,12,13},{1,4,5,6,8,9,11,12,13,14},{1,4,5,6,8,9,11,12,13,14,15},{1,4,5,6,8,9,11,12,13,15},{1,4,5,6,8,9,11,12,14},{1,4,5,6,8,9,11,12,14,15},{1,4,5,6,8,9,11,12,15},{1,4,5,6,8,9,11,13},{1,4,5,6,8,9,11,13,14},{1,4,5,6,8,9,11,13,14,15},{1,4,5,6,8,9,11,13,15},{1,4,5,6,8,9,11,14},{1,4,5,6,8,9,11,14,15},{1,4,5,6,8,9,11,15},{1,4,5,6,8,9,12},{1,4,5,6,8,9,12,13},{1,4,5,6,8,9,12,13,14},{1,4,5,6,8,9,12,13,14,15},{1,4,5,6,8,9,12,13,15},{1,4,5,6,8,9,12,14},{1,4,5,6,8,9,12,14,15},{1,4,5,6,8,9,12,15},{1,4,5,6,8,9,13},{1,4,5,6,8,9,13,14},{1,4,5,6,8,9,13,14,15},{1,4,5,6,8,9,13,15},{1,4,5,6,8,9,14},{1,4,5,6,8,9,14,15},{1,4,5,6,8,9,15},{1,4,5,6,8,10},{1,4,5,6,8,10,11},{1,4,5,6,8,10,11,12},{1,4,5,6,8,10,11,12,13},{1,4,5,6,8,10,11,12,13,14},{1,4,5,6,8,10,11,12,13,14,15},{1,4,5,6,8,10,11,12,13,15},{1,4,5,6,8,10,11,12,14},{1,4,5,6,8,10,11,12,14,15},{1,4,5,6,8,10,11,12,15},{1,4,5,6,8,10,11,13},{1,4,5,6,8,10,11,13,14},{1,4,5,6,8,10,11,13,14,15},{1,4,5,6,8,10,11,13,15},{1,4,5,6,8,10,11,14},{1,4,5,6,8,10,11,14,15},{1,4,5,6,8,10,11,15},{1,4,5,6,8,10,12},{1,4,5,6,8,10,12,13},{1,4,5,6,8,10,12,13,14},{1,4,5,6,8,10,12,13,14,15},{1,4,5,6,8,10,12,13,15},{1,4,5,6,8,10,12,14},{1,4,5,6,8,10,12,14,15},{1,4,5,6,8,10,12,15},{1,4,5,6,8,10,13},{1,4,5,6,8,10,13,14},{1,4,5,6,8,10,13,14,15},{1,4,5,6,8,10,13,15},{1,4,5,6,8,10,14},{1,4,5,6,8,10,14,15},{1,4,5,6,8,10,15},{1,4,5,6,8,11},{1,4,5,6,8,11,12},{1,4,5,6,8,11,12,13},{1,4,5,6,8,11,12,13,14},{1,4,5,6,8,11,12,13,14,15},{1,4,5,6,8,11,12,13,15},{1,4,5,6,8,11,12,14},{1,4,5,6,8,11,12,14,15},{1,4,5,6,8,11,12,15},{1,4,5,6,8,11,13},{1,4,5,6,8,11,13,14},{1,4,5,6,8,11,13,14,15},{1,4,5,6,8,11,13,15},{1,4,5,6,8,11,14},{1,4,5,6,8,11,14,15},{1,4,5,6,8,11,15},{1,4,5,6,8,12},{1,4,5,6,8,12,13},{1,4,5,6,8,12,13,14},{1,4,5,6,8,12,13,14,15},{1,4,5,6,8,12,13,15},{1,4,5,6,8,12,14},{1,4,5,6,8,12,14,15},{1,4,5,6,8,12,15},{1,4,5,6,8,13},{1,4,5,6,8,13,14},{1,4,5,6,8,13,14,15},{1,4,5,6,8,13,15},{1,4,5,6,8,14},{1,4,5,6,8,14,15},{1,4,5,6,8,15},{1,4,5,6,9},{1,4,5,6,9,10},{1,4,5,6,9,10,11},{1,4,5,6,9,10,11,12},{1,4,5,6,9,10,11,12,13},{1,4,5,6,9,10,11,12,13,14},{1,4,5,6,9,10,11,12,13,14,15},{1,4,5,6,9,10,11,12,13,15},{1,4,5,6,9,10,11,12,14},{1,4,5,6,9,10,11,12,14,15},{1,4,5,6,9,10,11,12,15},{1,4,5,6,9,10,11,13},{1,4,5,6,9,10,11,13,14},{1,4,5,6,9,10,11,13,14,15},{1,4,5,6,9,10,11,13,15},{1,4,5,6,9,10,11,14},{1,4,5,6,9,10,11,14,15},{1,4,5,6,9,10,11,15},{1,4,5,6,9,10,12},{1,4,5,6,9,10,12,13},{1,4,5,6,9,10,12,13,14},{1,4,5,6,9,10,12,13,14,15},{1,4,5,6,9,10,12,13,15},{1,4,5,6,9,10,12,14},{1,4,5,6,9,10,12,14,15},{1,4,5,6,9,10,12,15},{1,4,5,6,9,10,13},{1,4,5,6,9,10,13,14},{1,4,5,6,9,10,13,14,15},{1,4,5,6,9,10,13,15},{1,4,5,6,9,10,14},{1,4,5,6,9,10,14,15},{1,4,5,6,9,10,15},{1,4,5,6,9,11},{1,4,5,6,9,11,12},{1,4,5,6,9,11,12,13},{1,4,5,6,9,11,12,13,14},{1,4,5,6,9,11,12,13,14,15},{1,4,5,6,9,11,12,13,15},{1,4,5,6,9,11,12,14},{1,4,5,6,9,11,12,14,15},{1,4,5,6,9,11,12,15},{1,4,5,6,9,11,13},{1,4,5,6,9,11,13,14},{1,4,5,6,9,11,13,14,15},{1,4,5,6,9,11,13,15},{1,4,5,6,9,11,14},{1,4,5,6,9,11,14,15},{1,4,5,6,9,11,15},{1,4,5,6,9,12},{1,4,5,6,9,12,13},{1,4,5,6,9,12,13,14},{1,4,5,6,9,12,13,14,15},{1,4,5,6,9,12,13,15},{1,4,5,6,9,12,14},{1,4,5,6,9,12,14,15},{1,4,5,6,9,12,15},{1,4,5,6,9,13},{1,4,5,6,9,13,14},{1,4,5,6,9,13,14,15},{1,4,5,6,9,13,15},{1,4,5,6,9,14},{1,4,5,6,9,14,15},{1,4,5,6,9,15},{1,4,5,6,10},{1,4,5,6,10,11},{1,4,5,6,10,11,12},{1,4,5,6,10,11,12,13},{1,4,5,6,10,11,12,13,14},{1,4,5,6,10,11,12,13,14,15},{1,4,5,6,10,11,12,13,15},{1,4,5,6,10,11,12,14},{1,4,5,6,10,11,12,14,15},{1,4,5,6,10,11,12,15},{1,4,5,6,10,11,13},{1,4,5,6,10,11,13,14},{1,4,5,6,10,11,13,14,15},{1,4,5,6,10,11,13,15},{1,4,5,6,10,11,14},{1,4,5,6,10,11,14,15},{1,4,5,6,10,11,15},{1,4,5,6,10,12},{1,4,5,6,10,12,13},{1,4,5,6,10,12,13,14},{1,4,5,6,10,12,13,14,15},{1,4,5,6,10,12,13,15},{1,4,5,6,10,12,14},{1,4,5,6,10,12,14,15},{1,4,5,6,10,12,15},{1,4,5,6,10,13},{1,4,5,6,10,13,14},{1,4,5,6,10,13,14,15},{1,4,5,6,10,13,15},{1,4,5,6,10,14},{1,4,5,6,10,14,15},{1,4,5,6,10,15},{1,4,5,6,11},{1,4,5,6,11,12},{1,4,5,6,11,12,13},{1,4,5,6,11,12,13,14},{1,4,5,6,11,12,13,14,15},{1,4,5,6,11,12,13,15},{1,4,5,6,11,12,14},{1,4,5,6,11,12,14,15},{1,4,5,6,11,12,15},{1,4,5,6,11,13},{1,4,5,6,11,13,14},{1,4,5,6,11,13,14,15},{1,4,5,6,11,13,15},{1,4,5,6,11,14},{1,4,5,6,11,14,15},{1,4,5,6,11,15},{1,4,5,6,12},{1,4,5,6,12,13},{1,4,5,6,12,13,14},{1,4,5,6,12,13,14,15},{1,4,5,6,12,13,15},{1,4,5,6,12,14},{1,4,5,6,12,14,15},{1,4,5,6,12,15},{1,4,5,6,13},{1,4,5,6,13,14},{1,4,5,6,13,14,15},{1,4,5,6,13,15},{1,4,5,6,14},{1,4,5,6,14,15},{1,4,5,6,15},{1,4,5,7},{1,4,5,7,8},{1,4,5,7,8,9},{1,4,5,7,8,9,10},{1,4,5,7,8,9,10,11},{1,4,5,7,8,9,10,11,12},{1,4,5,7,8,9,10,11,12,13},{1,4,5,7,8,9,10,11,12,13,14},{1,4,5,7,8,9,10,11,12,13,14,15},{1,4,5,7,8,9,10,11,12,13,15},{1,4,5,7,8,9,10,11,12,14},{1,4,5,7,8,9,10,11,12,14,15},{1,4,5,7,8,9,10,11,12,15},{1,4,5,7,8,9,10,11,13},{1,4,5,7,8,9,10,11,13,14},{1,4,5,7,8,9,10,11,13,14,15},{1,4,5,7,8,9,10,11,13,15},{1,4,5,7,8,9,10,11,14},{1,4,5,7,8,9,10,11,14,15},{1,4,5,7,8,9,10,11,15},{1,4,5,7,8,9,10,12},{1,4,5,7,8,9,10,12,13},{1,4,5,7,8,9,10,12,13,14},{1,4,5,7,8,9,10,12,13,14,15},{1,4,5,7,8,9,10,12,13,15},{1,4,5,7,8,9,10,12,14},{1,4,5,7,8,9,10,12,14,15},{1,4,5,7,8,9,10,12,15},{1,4,5,7,8,9,10,13},{1,4,5,7,8,9,10,13,14},{1,4,5,7,8,9,10,13,14,15},{1,4,5,7,8,9,10,13,15},{1,4,5,7,8,9,10,14},{1,4,5,7,8,9,10,14,15},{1,4,5,7,8,9,10,15},{1,4,5,7,8,9,11},{1,4,5,7,8,9,11,12},{1,4,5,7,8,9,11,12,13},{1,4,5,7,8,9,11,12,13,14},{1,4,5,7,8,9,11,12,13,14,15},{1,4,5,7,8,9,11,12,13,15},{1,4,5,7,8,9,11,12,14},{1,4,5,7,8,9,11,12,14,15},{1,4,5,7,8,9,11,12,15},{1,4,5,7,8,9,11,13},{1,4,5,7,8,9,11,13,14},{1,4,5,7,8,9,11,13,14,15},{1,4,5,7,8,9,11,13,15},{1,4,5,7,8,9,11,14},{1,4,5,7,8,9,11,14,15},{1,4,5,7,8,9,11,15},{1,4,5,7,8,9,12},{1,4,5,7,8,9,12,13},{1,4,5,7,8,9,12,13,14},{1,4,5,7,8,9,12,13,14,15},{1,4,5,7,8,9,12,13,15},{1,4,5,7,8,9,12,14},{1,4,5,7,8,9,12,14,15},{1,4,5,7,8,9,12,15},{1,4,5,7,8,9,13},{1,4,5,7,8,9,13,14},{1,4,5,7,8,9,13,14,15},{1,4,5,7,8,9,13,15},{1,4,5,7,8,9,14},{1,4,5,7,8,9,14,15},{1,4,5,7,8,9,15},{1,4,5,7,8,10},{1,4,5,7,8,10,11},{1,4,5,7,8,10,11,12},{1,4,5,7,8,10,11,12,13},{1,4,5,7,8,10,11,12,13,14},{1,4,5,7,8,10,11,12,13,14,15},{1,4,5,7,8,10,11,12,13,15},{1,4,5,7,8,10,11,12,14},{1,4,5,7,8,10,11,12,14,15},{1,4,5,7,8,10,11,12,15},{1,4,5,7,8,10,11,13},{1,4,5,7,8,10,11,13,14},{1,4,5,7,8,10,11,13,14,15},{1,4,5,7,8,10,11,13,15},{1,4,5,7,8,10,11,14},{1,4,5,7,8,10,11,14,15},{1,4,5,7,8,10,11,15},{1,4,5,7,8,10,12},{1,4,5,7,8,10,12,13},{1,4,5,7,8,10,12,13,14},{1,4,5,7,8,10,12,13,14,15},{1,4,5,7,8,10,12,13,15},{1,4,5,7,8,10,12,14},{1,4,5,7,8,10,12,14,15},{1,4,5,7,8,10,12,15},{1,4,5,7,8,10,13},{1,4,5,7,8,10,13,14},{1,4,5,7,8,10,13,14,15},{1,4,5,7,8,10,13,15},{1,4,5,7,8,10,14},{1,4,5,7,8,10,14,15},{1,4,5,7,8,10,15},{1,4,5,7,8,11},{1,4,5,7,8,11,12},{1,4,5,7,8,11,12,13},{1,4,5,7,8,11,12,13,14},{1,4,5,7,8,11,12,13,14,15},{1,4,5,7,8,11,12,13,15},{1,4,5,7,8,11,12,14},{1,4,5,7,8,11,12,14,15},{1,4,5,7,8,11,12,15},{1,4,5,7,8,11,13},{1,4,5,7,8,11,13,14},{1,4,5,7,8,11,13,14,15},{1,4,5,7,8,11,13,15},{1,4,5,7,8,11,14},{1,4,5,7,8,11,14,15},{1,4,5,7,8,11,15},{1,4,5,7,8,12},{1,4,5,7,8,12,13},{1,4,5,7,8,12,13,14},{1,4,5,7,8,12,13,14,15},{1,4,5,7,8,12,13,15},{1,4,5,7,8,12,14},{1,4,5,7,8,12,14,15},{1,4,5,7,8,12,15},{1,4,5,7,8,13},{1,4,5,7,8,13,14},{1,4,5,7,8,13,14,15},{1,4,5,7,8,13,15},{1,4,5,7,8,14},{1,4,5,7,8,14,15},{1,4,5,7,8,15},{1,4,5,7,9},{1,4,5,7,9,10},{1,4,5,7,9,10,11},{1,4,5,7,9,10,11,12},{1,4,5,7,9,10,11,12,13},{1,4,5,7,9,10,11,12,13,14},{1,4,5,7,9,10,11,12,13,14,15},{1,4,5,7,9,10,11,12,13,15},{1,4,5,7,9,10,11,12,14},{1,4,5,7,9,10,11,12,14,15},{1,4,5,7,9,10,11,12,15},{1,4,5,7,9,10,11,13},{1,4,5,7,9,10,11,13,14},{1,4,5,7,9,10,11,13,14,15},{1,4,5,7,9,10,11,13,15},{1,4,5,7,9,10,11,14},{1,4,5,7,9,10,11,14,15},{1,4,5,7,9,10,11,15},{1,4,5,7,9,10,12},{1,4,5,7,9,10,12,13},{1,4,5,7,9,10,12,13,14},{1,4,5,7,9,10,12,13,14,15},{1,4,5,7,9,10,12,13,15},{1,4,5,7,9,10,12,14},{1,4,5,7,9,10,12,14,15},{1,4,5,7,9,10,12,15},{1,4,5,7,9,10,13},{1,4,5,7,9,10,13,14},{1,4,5,7,9,10,13,14,15},{1,4,5,7,9,10,13,15},{1,4,5,7,9,10,14},{1,4,5,7,9,10,14,15},{1,4,5,7,9,10,15},{1,4,5,7,9,11},{1,4,5,7,9,11,12},{1,4,5,7,9,11,12,13},{1,4,5,7,9,11,12,13,14},{1,4,5,7,9,11,12,13,14,15},{1,4,5,7,9,11,12,13,15},{1,4,5,7,9,11,12,14},{1,4,5,7,9,11,12,14,15},{1,4,5,7,9,11,12,15},{1,4,5,7,9,11,13},{1,4,5,7,9,11,13,14},{1,4,5,7,9,11,13,14,15},{1,4,5,7,9,11,13,15},{1,4,5,7,9,11,14},{1,4,5,7,9,11,14,15},{1,4,5,7,9,11,15},{1,4,5,7,9,12},{1,4,5,7,9,12,13},{1,4,5,7,9,12,13,14},{1,4,5,7,9,12,13,14,15},{1,4,5,7,9,12,13,15},{1,4,5,7,9,12,14},{1,4,5,7,9,12,14,15},{1,4,5,7,9,12,15},{1,4,5,7,9,13},{1,4,5,7,9,13,14},{1,4,5,7,9,13,14,15},{1,4,5,7,9,13,15},{1,4,5,7,9,14},{1,4,5,7,9,14,15},{1,4,5,7,9,15},{1,4,5,7,10},{1,4,5,7,10,11},{1,4,5,7,10,11,12},{1,4,5,7,10,11,12,13},{1,4,5,7,10,11,12,13,14},{1,4,5,7,10,11,12,13,14,15},{1,4,5,7,10,11,12,13,15},{1,4,5,7,10,11,12,14},{1,4,5,7,10,11,12,14,15},{1,4,5,7,10,11,12,15},{1,4,5,7,10,11,13},{1,4,5,7,10,11,13,14},{1,4,5,7,10,11,13,14,15},{1,4,5,7,10,11,13,15},{1,4,5,7,10,11,14},{1,4,5,7,10,11,14,15},{1,4,5,7,10,11,15},{1,4,5,7,10,12},{1,4,5,7,10,12,13},{1,4,5,7,10,12,13,14},{1,4,5,7,10,12,13,14,15},{1,4,5,7,10,12,13,15},{1,4,5,7,10,12,14},{1,4,5,7,10,12,14,15},{1,4,5,7,10,12,15},{1,4,5,7,10,13},{1,4,5,7,10,13,14},{1,4,5,7,10,13,14,15},{1,4,5,7,10,13,15},{1,4,5,7,10,14},{1,4,5,7,10,14,15},{1,4,5,7,10,15},{1,4,5,7,11},{1,4,5,7,11,12},{1,4,5,7,11,12,13},{1,4,5,7,11,12,13,14},{1,4,5,7,11,12,13,14,15},{1,4,5,7,11,12,13,15},{1,4,5,7,11,12,14},{1,4,5,7,11,12,14,15},{1,4,5,7,11,12,15},{1,4,5,7,11,13},{1,4,5,7,11,13,14},{1,4,5,7,11,13,14,15},{1,4,5,7,11,13,15},{1,4,5,7,11,14},{1,4,5,7,11,14,15},{1,4,5,7,11,15},{1,4,5,7,12},{1,4,5,7,12,13},{1,4,5,7,12,13,14},{1,4,5,7,12,13,14,15},{1,4,5,7,12,13,15},{1,4,5,7,12,14},{1,4,5,7,12,14,15},{1,4,5,7,12,15},{1,4,5,7,13},{1,4,5,7,13,14},{1,4,5,7,13,14,15},{1,4,5,7,13,15},{1,4,5,7,14},{1,4,5,7,14,15},{1,4,5,7,15},{1,4,5,8},{1,4,5,8,9},{1,4,5,8,9,10},{1,4,5,8,9,10,11},{1,4,5,8,9,10,11,12},{1,4,5,8,9,10,11,12,13},{1,4,5,8,9,10,11,12,13,14},{1,4,5,8,9,10,11,12,13,14,15},{1,4,5,8,9,10,11,12,13,15},{1,4,5,8,9,10,11,12,14},{1,4,5,8,9,10,11,12,14,15},{1,4,5,8,9,10,11,12,15},{1,4,5,8,9,10,11,13},{1,4,5,8,9,10,11,13,14},{1,4,5,8,9,10,11,13,14,15},{1,4,5,8,9,10,11,13,15},{1,4,5,8,9,10,11,14},{1,4,5,8,9,10,11,14,15},{1,4,5,8,9,10,11,15},{1,4,5,8,9,10,12},{1,4,5,8,9,10,12,13},{1,4,5,8,9,10,12,13,14},{1,4,5,8,9,10,12,13,14,15},{1,4,5,8,9,10,12,13,15},{1,4,5,8,9,10,12,14},{1,4,5,8,9,10,12,14,15},{1,4,5,8,9,10,12,15},{1,4,5,8,9,10,13},{1,4,5,8,9,10,13,14},{1,4,5,8,9,10,13,14,15},{1,4,5,8,9,10,13,15},{1,4,5,8,9,10,14},{1,4,5,8,9,10,14,15},{1,4,5,8,9,10,15},{1,4,5,8,9,11},{1,4,5,8,9,11,12},{1,4,5,8,9,11,12,13},{1,4,5,8,9,11,12,13,14},{1,4,5,8,9,11,12,13,14,15},{1,4,5,8,9,11,12,13,15},{1,4,5,8,9,11,12,14},{1,4,5,8,9,11,12,14,15},{1,4,5,8,9,11,12,15},{1,4,5,8,9,11,13},{1,4,5,8,9,11,13,14},{1,4,5,8,9,11,13,14,15},{1,4,5,8,9,11,13,15},{1,4,5,8,9,11,14},{1,4,5,8,9,11,14,15},{1,4,5,8,9,11,15},{1,4,5,8,9,12},{1,4,5,8,9,12,13},{1,4,5,8,9,12,13,14},{1,4,5,8,9,12,13,14,15},{1,4,5,8,9,12,13,15},{1,4,5,8,9,12,14},{1,4,5,8,9,12,14,15},{1,4,5,8,9,12,15},{1,4,5,8,9,13},{1,4,5,8,9,13,14},{1,4,5,8,9,13,14,15},{1,4,5,8,9,13,15},{1,4,5,8,9,14},{1,4,5,8,9,14,15},{1,4,5,8,9,15},{1,4,5,8,10},{1,4,5,8,10,11},{1,4,5,8,10,11,12},{1,4,5,8,10,11,12,13},{1,4,5,8,10,11,12,13,14},{1,4,5,8,10,11,12,13,14,15},{1,4,5,8,10,11,12,13,15},{1,4,5,8,10,11,12,14},{1,4,5,8,10,11,12,14,15},{1,4,5,8,10,11,12,15},{1,4,5,8,10,11,13},{1,4,5,8,10,11,13,14},{1,4,5,8,10,11,13,14,15},{1,4,5,8,10,11,13,15},{1,4,5,8,10,11,14},{1,4,5,8,10,11,14,15},{1,4,5,8,10,11,15},{1,4,5,8,10,12},{1,4,5,8,10,12,13},{1,4,5,8,10,12,13,14},{1,4,5,8,10,12,13,14,15},{1,4,5,8,10,12,13,15},{1,4,5,8,10,12,14},{1,4,5,8,10,12,14,15},{1,4,5,8,10,12,15},{1,4,5,8,10,13},{1,4,5,8,10,13,14},{1,4,5,8,10,13,14,15},{1,4,5,8,10,13,15},{1,4,5,8,10,14},{1,4,5,8,10,14,15},{1,4,5,8,10,15},{1,4,5,8,11},{1,4,5,8,11,12},{1,4,5,8,11,12,13},{1,4,5,8,11,12,13,14},{1,4,5,8,11,12,13,14,15},{1,4,5,8,11,12,13,15},{1,4,5,8,11,12,14},{1,4,5,8,11,12,14,15},{1,4,5,8,11,12,15},{1,4,5,8,11,13},{1,4,5,8,11,13,14},{1,4,5,8,11,13,14,15},{1,4,5,8,11,13,15},{1,4,5,8,11,14},{1,4,5,8,11,14,15},{1,4,5,8,11,15},{1,4,5,8,12},{1,4,5,8,12,13},{1,4,5,8,12,13,14},{1,4,5,8,12,13,14,15},{1,4,5,8,12,13,15},{1,4,5,8,12,14},{1,4,5,8,12,14,15},{1,4,5,8,12,15},{1,4,5,8,13},{1,4,5,8,13,14},{1,4,5,8,13,14,15},{1,4,5,8,13,15},{1,4,5,8,14},{1,4,5,8,14,15},{1,4,5,8,15},{1,4,5,9},{1,4,5,9,10},{1,4,5,9,10,11},{1,4,5,9,10,11,12},{1,4,5,9,10,11,12,13},{1,4,5,9,10,11,12,13,14},{1,4,5,9,10,11,12,13,14,15},{1,4,5,9,10,11,12,13,15},{1,4,5,9,10,11,12,14},{1,4,5,9,10,11,12,14,15},{1,4,5,9,10,11,12,15},{1,4,5,9,10,11,13},{1,4,5,9,10,11,13,14},{1,4,5,9,10,11,13,14,15},{1,4,5,9,10,11,13,15},{1,4,5,9,10,11,14},{1,4,5,9,10,11,14,15},{1,4,5,9,10,11,15},{1,4,5,9,10,12},{1,4,5,9,10,12,13},{1,4,5,9,10,12,13,14},{1,4,5,9,10,12,13,14,15},{1,4,5,9,10,12,13,15},{1,4,5,9,10,12,14},{1,4,5,9,10,12,14,15},{1,4,5,9,10,12,15},{1,4,5,9,10,13},{1,4,5,9,10,13,14},{1,4,5,9,10,13,14,15},{1,4,5,9,10,13,15},{1,4,5,9,10,14},{1,4,5,9,10,14,15},{1,4,5,9,10,15},{1,4,5,9,11},{1,4,5,9,11,12},{1,4,5,9,11,12,13},{1,4,5,9,11,12,13,14},{1,4,5,9,11,12,13,14,15},{1,4,5,9,11,12,13,15},{1,4,5,9,11,12,14},{1,4,5,9,11,12,14,15},{1,4,5,9,11,12,15},{1,4,5,9,11,13},{1,4,5,9,11,13,14},{1,4,5,9,11,13,14,15},{1,4,5,9,11,13,15},{1,4,5,9,11,14},{1,4,5,9,11,14,15},{1,4,5,9,11,15},{1,4,5,9,12},{1,4,5,9,12,13},{1,4,5,9,12,13,14},{1,4,5,9,12,13,14,15},{1,4,5,9,12,13,15},{1,4,5,9,12,14},{1,4,5,9,12,14,15},{1,4,5,9,12,15},{1,4,5,9,13},{1,4,5,9,13,14},{1,4,5,9,13,14,15},{1,4,5,9,13,15},{1,4,5,9,14},{1,4,5,9,14,15},{1,4,5,9,15},{1,4,5,10},{1,4,5,10,11},{1,4,5,10,11,12},{1,4,5,10,11,12,13},{1,4,5,10,11,12,13,14},{1,4,5,10,11,12,13,14,15},{1,4,5,10,11,12,13,15},{1,4,5,10,11,12,14},{1,4,5,10,11,12,14,15},{1,4,5,10,11,12,15},{1,4,5,10,11,13},{1,4,5,10,11,13,14},{1,4,5,10,11,13,14,15},{1,4,5,10,11,13,15},{1,4,5,10,11,14},{1,4,5,10,11,14,15},{1,4,5,10,11,15},{1,4,5,10,12},{1,4,5,10,12,13},{1,4,5,10,12,13,14},{1,4,5,10,12,13,14,15},{1,4,5,10,12,13,15},{1,4,5,10,12,14},{1,4,5,10,12,14,15},{1,4,5,10,12,15},{1,4,5,10,13},{1,4,5,10,13,14},{1,4,5,10,13,14,15},{1,4,5,10,13,15},{1,4,5,10,14},{1,4,5,10,14,15},{1,4,5,10,15},{1,4,5,11},{1,4,5,11,12},{1,4,5,11,12,13},{1,4,5,11,12,13,14},{1,4,5,11,12,13,14,15},{1,4,5,11,12,13,15},{1,4,5,11,12,14},{1,4,5,11,12,14,15},{1,4,5,11,12,15},{1,4,5,11,13},{1,4,5,11,13,14},{1,4,5,11,13,14,15},{1,4,5,11,13,15},{1,4,5,11,14},{1,4,5,11,14,15},{1,4,5,11,15},{1,4,5,12},{1,4,5,12,13},{1,4,5,12,13,14},{1,4,5,12,13,14,15},{1,4,5,12,13,15},{1,4,5,12,14},{1,4,5,12,14,15},{1,4,5,12,15},{1,4,5,13},{1,4,5,13,14},{1,4,5,13,14,15},{1,4,5,13,15},{1,4,5,14},{1,4,5,14,15},{1,4,5,15},{1,4,6},{1,4,6,7},{1,4,6,7,8},{1,4,6,7,8,9},{1,4,6,7,8,9,10},{1,4,6,7,8,9,10,11},{1,4,6,7,8,9,10,11,12},{1,4,6,7,8,9,10,11,12,13},{1,4,6,7,8,9,10,11,12,13,14},{1,4,6,7,8,9,10,11,12,13,14,15},{1,4,6,7,8,9,10,11,12,13,15},{1,4,6,7,8,9,10,11,12,14},{1,4,6,7,8,9,10,11,12,14,15},{1,4,6,7,8,9,10,11,12,15},{1,4,6,7,8,9,10,11,13},{1,4,6,7,8,9,10,11,13,14},{1,4,6,7,8,9,10,11,13,14,15},{1,4,6,7,8,9,10,11,13,15},{1,4,6,7,8,9,10,11,14},{1,4,6,7,8,9,10,11,14,15},{1,4,6,7,8,9,10,11,15},{1,4,6,7,8,9,10,12},{1,4,6,7,8,9,10,12,13},{1,4,6,7,8,9,10,12,13,14},{1,4,6,7,8,9,10,12,13,14,15},{1,4,6,7,8,9,10,12,13,15},{1,4,6,7,8,9,10,12,14},{1,4,6,7,8,9,10,12,14,15},{1,4,6,7,8,9,10,12,15},{1,4,6,7,8,9,10,13},{1,4,6,7,8,9,10,13,14},{1,4,6,7,8,9,10,13,14,15},{1,4,6,7,8,9,10,13,15},{1,4,6,7,8,9,10,14},{1,4,6,7,8,9,10,14,15},{1,4,6,7,8,9,10,15},{1,4,6,7,8,9,11},{1,4,6,7,8,9,11,12},{1,4,6,7,8,9,11,12,13},{1,4,6,7,8,9,11,12,13,14},{1,4,6,7,8,9,11,12,13,14,15},{1,4,6,7,8,9,11,12,13,15},{1,4,6,7,8,9,11,12,14},{1,4,6,7,8,9,11,12,14,15},{1,4,6,7,8,9,11,12,15},{1,4,6,7,8,9,11,13},{1,4,6,7,8,9,11,13,14},{1,4,6,7,8,9,11,13,14,15},{1,4,6,7,8,9,11,13,15},{1,4,6,7,8,9,11,14},{1,4,6,7,8,9,11,14,15},{1,4,6,7,8,9,11,15},{1,4,6,7,8,9,12},{1,4,6,7,8,9,12,13},{1,4,6,7,8,9,12,13,14},{1,4,6,7,8,9,12,13,14,15},{1,4,6,7,8,9,12,13,15},{1,4,6,7,8,9,12,14},{1,4,6,7,8,9,12,14,15},{1,4,6,7,8,9,12,15},{1,4,6,7,8,9,13},{1,4,6,7,8,9,13,14},{1,4,6,7,8,9,13,14,15},{1,4,6,7,8,9,13,15},{1,4,6,7,8,9,14},{1,4,6,7,8,9,14,15},{1,4,6,7,8,9,15},{1,4,6,7,8,10},{1,4,6,7,8,10,11},{1,4,6,7,8,10,11,12},{1,4,6,7,8,10,11,12,13},{1,4,6,7,8,10,11,12,13,14},{1,4,6,7,8,10,11,12,13,14,15},{1,4,6,7,8,10,11,12,13,15},{1,4,6,7,8,10,11,12,14},{1,4,6,7,8,10,11,12,14,15},{1,4,6,7,8,10,11,12,15},{1,4,6,7,8,10,11,13},{1,4,6,7,8,10,11,13,14},{1,4,6,7,8,10,11,13,14,15},{1,4,6,7,8,10,11,13,15},{1,4,6,7,8,10,11,14},{1,4,6,7,8,10,11,14,15},{1,4,6,7,8,10,11,15},{1,4,6,7,8,10,12},{1,4,6,7,8,10,12,13},{1,4,6,7,8,10,12,13,14},{1,4,6,7,8,10,12,13,14,15},{1,4,6,7,8,10,12,13,15},{1,4,6,7,8,10,12,14},{1,4,6,7,8,10,12,14,15},{1,4,6,7,8,10,12,15},{1,4,6,7,8,10,13},{1,4,6,7,8,10,13,14},{1,4,6,7,8,10,13,14,15},{1,4,6,7,8,10,13,15},{1,4,6,7,8,10,14},{1,4,6,7,8,10,14,15},{1,4,6,7,8,10,15},{1,4,6,7,8,11},{1,4,6,7,8,11,12},{1,4,6,7,8,11,12,13},{1,4,6,7,8,11,12,13,14},{1,4,6,7,8,11,12,13,14,15},{1,4,6,7,8,11,12,13,15},{1,4,6,7,8,11,12,14},{1,4,6,7,8,11,12,14,15},{1,4,6,7,8,11,12,15},{1,4,6,7,8,11,13},{1,4,6,7,8,11,13,14},{1,4,6,7,8,11,13,14,15},{1,4,6,7,8,11,13,15},{1,4,6,7,8,11,14},{1,4,6,7,8,11,14,15},{1,4,6,7,8,11,15},{1,4,6,7,8,12},{1,4,6,7,8,12,13},{1,4,6,7,8,12,13,14},{1,4,6,7,8,12,13,14,15},{1,4,6,7,8,12,13,15},{1,4,6,7,8,12,14},{1,4,6,7,8,12,14,15},{1,4,6,7,8,12,15},{1,4,6,7,8,13},{1,4,6,7,8,13,14},{1,4,6,7,8,13,14,15},{1,4,6,7,8,13,15},{1,4,6,7,8,14},{1,4,6,7,8,14,15},{1,4,6,7,8,15},{1,4,6,7,9},{1,4,6,7,9,10},{1,4,6,7,9,10,11},{1,4,6,7,9,10,11,12},{1,4,6,7,9,10,11,12,13},{1,4,6,7,9,10,11,12,13,14},{1,4,6,7,9,10,11,12,13,14,15},{1,4,6,7,9,10,11,12,13,15},{1,4,6,7,9,10,11,12,14},{1,4,6,7,9,10,11,12,14,15},{1,4,6,7,9,10,11,12,15},{1,4,6,7,9,10,11,13},{1,4,6,7,9,10,11,13,14},{1,4,6,7,9,10,11,13,14,15},{1,4,6,7,9,10,11,13,15},{1,4,6,7,9,10,11,14},{1,4,6,7,9,10,11,14,15},{1,4,6,7,9,10,11,15},{1,4,6,7,9,10,12},{1,4,6,7,9,10,12,13},{1,4,6,7,9,10,12,13,14},{1,4,6,7,9,10,12,13,14,15},{1,4,6,7,9,10,12,13,15},{1,4,6,7,9,10,12,14},{1,4,6,7,9,10,12,14,15},{1,4,6,7,9,10,12,15},{1,4,6,7,9,10,13},{1,4,6,7,9,10,13,14},{1,4,6,7,9,10,13,14,15},{1,4,6,7,9,10,13,15},{1,4,6,7,9,10,14},{1,4,6,7,9,10,14,15},{1,4,6,7,9,10,15},{1,4,6,7,9,11},{1,4,6,7,9,11,12},{1,4,6,7,9,11,12,13},{1,4,6,7,9,11,12,13,14},{1,4,6,7,9,11,12,13,14,15},{1,4,6,7,9,11,12,13,15},{1,4,6,7,9,11,12,14},{1,4,6,7,9,11,12,14,15},{1,4,6,7,9,11,12,15},{1,4,6,7,9,11,13},{1,4,6,7,9,11,13,14},{1,4,6,7,9,11,13,14,15},{1,4,6,7,9,11,13,15},{1,4,6,7,9,11,14},{1,4,6,7,9,11,14,15},{1,4,6,7,9,11,15},{1,4,6,7,9,12},{1,4,6,7,9,12,13},{1,4,6,7,9,12,13,14},{1,4,6,7,9,12,13,14,15},{1,4,6,7,9,12,13,15},{1,4,6,7,9,12,14},{1,4,6,7,9,12,14,15},{1,4,6,7,9,12,15},{1,4,6,7,9,13},{1,4,6,7,9,13,14},{1,4,6,7,9,13,14,15},{1,4,6,7,9,13,15},{1,4,6,7,9,14},{1,4,6,7,9,14,15},{1,4,6,7,9,15},{1,4,6,7,10},{1,4,6,7,10,11},{1,4,6,7,10,11,12},{1,4,6,7,10,11,12,13},{1,4,6,7,10,11,12,13,14},{1,4,6,7,10,11,12,13,14,15},{1,4,6,7,10,11,12,13,15},{1,4,6,7,10,11,12,14},{1,4,6,7,10,11,12,14,15},{1,4,6,7,10,11,12,15},{1,4,6,7,10,11,13},{1,4,6,7,10,11,13,14},{1,4,6,7,10,11,13,14,15},{1,4,6,7,10,11,13,15},{1,4,6,7,10,11,14},{1,4,6,7,10,11,14,15},{1,4,6,7,10,11,15},{1,4,6,7,10,12},{1,4,6,7,10,12,13},{1,4,6,7,10,12,13,14},{1,4,6,7,10,12,13,14,15},{1,4,6,7,10,12,13,15},{1,4,6,7,10,12,14},{1,4,6,7,10,12,14,15},{1,4,6,7,10,12,15},{1,4,6,7,10,13},{1,4,6,7,10,13,14},{1,4,6,7,10,13,14,15},{1,4,6,7,10,13,15},{1,4,6,7,10,14},{1,4,6,7,10,14,15},{1,4,6,7,10,15},{1,4,6,7,11},{1,4,6,7,11,12},{1,4,6,7,11,12,13},{1,4,6,7,11,12,13,14},{1,4,6,7,11,12,13,14,15},{1,4,6,7,11,12,13,15},{1,4,6,7,11,12,14},{1,4,6,7,11,12,14,15},{1,4,6,7,11,12,15},{1,4,6,7,11,13},{1,4,6,7,11,13,14},{1,4,6,7,11,13,14,15},{1,4,6,7,11,13,15},{1,4,6,7,11,14},{1,4,6,7,11,14,15},{1,4,6,7,11,15},{1,4,6,7,12},{1,4,6,7,12,13},{1,4,6,7,12,13,14},{1,4,6,7,12,13,14,15},{1,4,6,7,12,13,15},{1,4,6,7,12,14},{1,4,6,7,12,14,15},{1,4,6,7,12,15},{1,4,6,7,13},{1,4,6,7,13,14},{1,4,6,7,13,14,15},{1,4,6,7,13,15},{1,4,6,7,14},{1,4,6,7,14,15},{1,4,6,7,15},{1,4,6,8},{1,4,6,8,9},{1,4,6,8,9,10},{1,4,6,8,9,10,11},{1,4,6,8,9,10,11,12},{1,4,6,8,9,10,11,12,13},{1,4,6,8,9,10,11,12,13,14},{1,4,6,8,9,10,11,12,13,14,15},{1,4,6,8,9,10,11,12,13,15},{1,4,6,8,9,10,11,12,14},{1,4,6,8,9,10,11,12,14,15},{1,4,6,8,9,10,11,12,15},{1,4,6,8,9,10,11,13},{1,4,6,8,9,10,11,13,14},{1,4,6,8,9,10,11,13,14,15},{1,4,6,8,9,10,11,13,15},{1,4,6,8,9,10,11,14},{1,4,6,8,9,10,11,14,15},{1,4,6,8,9,10,11,15},{1,4,6,8,9,10,12},{1,4,6,8,9,10,12,13},{1,4,6,8,9,10,12,13,14},{1,4,6,8,9,10,12,13,14,15},{1,4,6,8,9,10,12,13,15},{1,4,6,8,9,10,12,14},{1,4,6,8,9,10,12,14,15},{1,4,6,8,9,10,12,15},{1,4,6,8,9,10,13},{1,4,6,8,9,10,13,14},{1,4,6,8,9,10,13,14,15},{1,4,6,8,9,10,13,15},{1,4,6,8,9,10,14},{1,4,6,8,9,10,14,15},{1,4,6,8,9,10,15},{1,4,6,8,9,11},{1,4,6,8,9,11,12},{1,4,6,8,9,11,12,13},{1,4,6,8,9,11,12,13,14},{1,4,6,8,9,11,12,13,14,15},{1,4,6,8,9,11,12,13,15},{1,4,6,8,9,11,12,14},{1,4,6,8,9,11,12,14,15},{1,4,6,8,9,11,12,15},{1,4,6,8,9,11,13},{1,4,6,8,9,11,13,14},{1,4,6,8,9,11,13,14,15},{1,4,6,8,9,11,13,15},{1,4,6,8,9,11,14},{1,4,6,8,9,11,14,15},{1,4,6,8,9,11,15},{1,4,6,8,9,12},{1,4,6,8,9,12,13},{1,4,6,8,9,12,13,14},{1,4,6,8,9,12,13,14,15},{1,4,6,8,9,12,13,15},{1,4,6,8,9,12,14},{1,4,6,8,9,12,14,15},{1,4,6,8,9,12,15},{1,4,6,8,9,13},{1,4,6,8,9,13,14},{1,4,6,8,9,13,14,15},{1,4,6,8,9,13,15},{1,4,6,8,9,14},{1,4,6,8,9,14,15},{1,4,6,8,9,15},{1,4,6,8,10},{1,4,6,8,10,11},{1,4,6,8,10,11,12},{1,4,6,8,10,11,12,13},{1,4,6,8,10,11,12,13,14},{1,4,6,8,10,11,12,13,14,15},{1,4,6,8,10,11,12,13,15},{1,4,6,8,10,11,12,14},{1,4,6,8,10,11,12,14,15},{1,4,6,8,10,11,12,15},{1,4,6,8,10,11,13},{1,4,6,8,10,11,13,14},{1,4,6,8,10,11,13,14,15},{1,4,6,8,10,11,13,15},{1,4,6,8,10,11,14},{1,4,6,8,10,11,14,15},{1,4,6,8,10,11,15},{1,4,6,8,10,12},{1,4,6,8,10,12,13},{1,4,6,8,10,12,13,14},{1,4,6,8,10,12,13,14,15},{1,4,6,8,10,12,13,15},{1,4,6,8,10,12,14},{1,4,6,8,10,12,14,15},{1,4,6,8,10,12,15},{1,4,6,8,10,13},{1,4,6,8,10,13,14},{1,4,6,8,10,13,14,15},{1,4,6,8,10,13,15},{1,4,6,8,10,14},{1,4,6,8,10,14,15},{1,4,6,8,10,15},{1,4,6,8,11},{1,4,6,8,11,12},{1,4,6,8,11,12,13},{1,4,6,8,11,12,13,14},{1,4,6,8,11,12,13,14,15},{1,4,6,8,11,12,13,15},{1,4,6,8,11,12,14},{1,4,6,8,11,12,14,15},{1,4,6,8,11,12,15},{1,4,6,8,11,13},{1,4,6,8,11,13,14},{1,4,6,8,11,13,14,15},{1,4,6,8,11,13,15},{1,4,6,8,11,14},{1,4,6,8,11,14,15},{1,4,6,8,11,15},{1,4,6,8,12},{1,4,6,8,12,13},{1,4,6,8,12,13,14},{1,4,6,8,12,13,14,15},{1,4,6,8,12,13,15},{1,4,6,8,12,14},{1,4,6,8,12,14,15},{1,4,6,8,12,15},{1,4,6,8,13},{1,4,6,8,13,14},{1,4,6,8,13,14,15},{1,4,6,8,13,15},{1,4,6,8,14},{1,4,6,8,14,15},{1,4,6,8,15},{1,4,6,9},{1,4,6,9,10},{1,4,6,9,10,11},{1,4,6,9,10,11,12},{1,4,6,9,10,11,12,13},{1,4,6,9,10,11,12,13,14},{1,4,6,9,10,11,12,13,14,15},{1,4,6,9,10,11,12,13,15},{1,4,6,9,10,11,12,14},{1,4,6,9,10,11,12,14,15},{1,4,6,9,10,11,12,15},{1,4,6,9,10,11,13},{1,4,6,9,10,11,13,14},{1,4,6,9,10,11,13,14,15},{1,4,6,9,10,11,13,15},{1,4,6,9,10,11,14},{1,4,6,9,10,11,14,15},{1,4,6,9,10,11,15},{1,4,6,9,10,12},{1,4,6,9,10,12,13},{1,4,6,9,10,12,13,14},{1,4,6,9,10,12,13,14,15},{1,4,6,9,10,12,13,15},{1,4,6,9,10,12,14},{1,4,6,9,10,12,14,15},{1,4,6,9,10,12,15},{1,4,6,9,10,13},{1,4,6,9,10,13,14},{1,4,6,9,10,13,14,15},{1,4,6,9,10,13,15},{1,4,6,9,10,14},{1,4,6,9,10,14,15},{1,4,6,9,10,15},{1,4,6,9,11},{1,4,6,9,11,12},{1,4,6,9,11,12,13},{1,4,6,9,11,12,13,14},{1,4,6,9,11,12,13,14,15},{1,4,6,9,11,12,13,15},{1,4,6,9,11,12,14},{1,4,6,9,11,12,14,15},{1,4,6,9,11,12,15},{1,4,6,9,11,13},{1,4,6,9,11,13,14},{1,4,6,9,11,13,14,15},{1,4,6,9,11,13,15},{1,4,6,9,11,14},{1,4,6,9,11,14,15},{1,4,6,9,11,15},{1,4,6,9,12},{1,4,6,9,12,13},{1,4,6,9,12,13,14},{1,4,6,9,12,13,14,15},{1,4,6,9,12,13,15},{1,4,6,9,12,14},{1,4,6,9,12,14,15},{1,4,6,9,12,15},{1,4,6,9,13},{1,4,6,9,13,14},{1,4,6,9,13,14,15},{1,4,6,9,13,15},{1,4,6,9,14},{1,4,6,9,14,15},{1,4,6,9,15},{1,4,6,10},{1,4,6,10,11},{1,4,6,10,11,12},{1,4,6,10,11,12,13},{1,4,6,10,11,12,13,14},{1,4,6,10,11,12,13,14,15},{1,4,6,10,11,12,13,15},{1,4,6,10,11,12,14},{1,4,6,10,11,12,14,15},{1,4,6,10,11,12,15},{1,4,6,10,11,13},{1,4,6,10,11,13,14},{1,4,6,10,11,13,14,15},{1,4,6,10,11,13,15},{1,4,6,10,11,14},{1,4,6,10,11,14,15},{1,4,6,10,11,15},{1,4,6,10,12},{1,4,6,10,12,13},{1,4,6,10,12,13,14},{1,4,6,10,12,13,14,15},{1,4,6,10,12,13,15},{1,4,6,10,12,14},{1,4,6,10,12,14,15},{1,4,6,10,12,15},{1,4,6,10,13},{1,4,6,10,13,14},{1,4,6,10,13,14,15},{1,4,6,10,13,15},{1,4,6,10,14},{1,4,6,10,14,15},{1,4,6,10,15},{1,4,6,11},{1,4,6,11,12},{1,4,6,11,12,13},{1,4,6,11,12,13,14},{1,4,6,11,12,13,14,15},{1,4,6,11,12,13,15},{1,4,6,11,12,14},{1,4,6,11,12,14,15},{1,4,6,11,12,15},{1,4,6,11,13},{1,4,6,11,13,14},{1,4,6,11,13,14,15},{1,4,6,11,13,15},{1,4,6,11,14},{1,4,6,11,14,15},{1,4,6,11,15},{1,4,6,12},{1,4,6,12,13},{1,4,6,12,13,14},{1,4,6,12,13,14,15},{1,4,6,12,13,15},{1,4,6,12,14},{1,4,6,12,14,15},{1,4,6,12,15},{1,4,6,13},{1,4,6,13,14},{1,4,6,13,14,15},{1,4,6,13,15},{1,4,6,14},{1,4,6,14,15},{1,4,6,15},{1,4,7},{1,4,7,8},{1,4,7,8,9},{1,4,7,8,9,10},{1,4,7,8,9,10,11},{1,4,7,8,9,10,11,12},{1,4,7,8,9,10,11,12,13},{1,4,7,8,9,10,11,12,13,14},{1,4,7,8,9,10,11,12,13,14,15},{1,4,7,8,9,10,11,12,13,15},{1,4,7,8,9,10,11,12,14},{1,4,7,8,9,10,11,12,14,15},{1,4,7,8,9,10,11,12,15},{1,4,7,8,9,10,11,13},{1,4,7,8,9,10,11,13,14},{1,4,7,8,9,10,11,13,14,15},{1,4,7,8,9,10,11,13,15},{1,4,7,8,9,10,11,14},{1,4,7,8,9,10,11,14,15},{1,4,7,8,9,10,11,15},{1,4,7,8,9,10,12},{1,4,7,8,9,10,12,13},{1,4,7,8,9,10,12,13,14},{1,4,7,8,9,10,12,13,14,15},{1,4,7,8,9,10,12,13,15},{1,4,7,8,9,10,12,14},{1,4,7,8,9,10,12,14,15},{1,4,7,8,9,10,12,15},{1,4,7,8,9,10,13},{1,4,7,8,9,10,13,14},{1,4,7,8,9,10,13,14,15},{1,4,7,8,9,10,13,15},{1,4,7,8,9,10,14},{1,4,7,8,9,10,14,15},{1,4,7,8,9,10,15},{1,4,7,8,9,11},{1,4,7,8,9,11,12},{1,4,7,8,9,11,12,13},{1,4,7,8,9,11,12,13,14},{1,4,7,8,9,11,12,13,14,15},{1,4,7,8,9,11,12,13,15},{1,4,7,8,9,11,12,14},{1,4,7,8,9,11,12,14,15},{1,4,7,8,9,11,12,15},{1,4,7,8,9,11,13},{1,4,7,8,9,11,13,14},{1,4,7,8,9,11,13,14,15},{1,4,7,8,9,11,13,15},{1,4,7,8,9,11,14},{1,4,7,8,9,11,14,15},{1,4,7,8,9,11,15},{1,4,7,8,9,12},{1,4,7,8,9,12,13},{1,4,7,8,9,12,13,14},{1,4,7,8,9,12,13,14,15},{1,4,7,8,9,12,13,15},{1,4,7,8,9,12,14},{1,4,7,8,9,12,14,15},{1,4,7,8,9,12,15},{1,4,7,8,9,13},{1,4,7,8,9,13,14},{1,4,7,8,9,13,14,15},{1,4,7,8,9,13,15},{1,4,7,8,9,14},{1,4,7,8,9,14,15},{1,4,7,8,9,15},{1,4,7,8,10},{1,4,7,8,10,11},{1,4,7,8,10,11,12},{1,4,7,8,10,11,12,13},{1,4,7,8,10,11,12,13,14},{1,4,7,8,10,11,12,13,14,15},{1,4,7,8,10,11,12,13,15},{1,4,7,8,10,11,12,14},{1,4,7,8,10,11,12,14,15},{1,4,7,8,10,11,12,15},{1,4,7,8,10,11,13},{1,4,7,8,10,11,13,14},{1,4,7,8,10,11,13,14,15},{1,4,7,8,10,11,13,15},{1,4,7,8,10,11,14},{1,4,7,8,10,11,14,15},{1,4,7,8,10,11,15},{1,4,7,8,10,12},{1,4,7,8,10,12,13},{1,4,7,8,10,12,13,14},{1,4,7,8,10,12,13,14,15},{1,4,7,8,10,12,13,15},{1,4,7,8,10,12,14},{1,4,7,8,10,12,14,15},{1,4,7,8,10,12,15},{1,4,7,8,10,13},{1,4,7,8,10,13,14},{1,4,7,8,10,13,14,15},{1,4,7,8,10,13,15},{1,4,7,8,10,14},{1,4,7,8,10,14,15},{1,4,7,8,10,15},{1,4,7,8,11},{1,4,7,8,11,12},{1,4,7,8,11,12,13},{1,4,7,8,11,12,13,14},{1,4,7,8,11,12,13,14,15},{1,4,7,8,11,12,13,15},{1,4,7,8,11,12,14},{1,4,7,8,11,12,14,15},{1,4,7,8,11,12,15},{1,4,7,8,11,13},{1,4,7,8,11,13,14},{1,4,7,8,11,13,14,15},{1,4,7,8,11,13,15},{1,4,7,8,11,14},{1,4,7,8,11,14,15},{1,4,7,8,11,15},{1,4,7,8,12},{1,4,7,8,12,13},{1,4,7,8,12,13,14},{1,4,7,8,12,13,14,15},{1,4,7,8,12,13,15},{1,4,7,8,12,14},{1,4,7,8,12,14,15},{1,4,7,8,12,15},{1,4,7,8,13},{1,4,7,8,13,14},{1,4,7,8,13,14,15},{1,4,7,8,13,15},{1,4,7,8,14},{1,4,7,8,14,15},{1,4,7,8,15},{1,4,7,9},{1,4,7,9,10},{1,4,7,9,10,11},{1,4,7,9,10,11,12},{1,4,7,9,10,11,12,13},{1,4,7,9,10,11,12,13,14},{1,4,7,9,10,11,12,13,14,15},{1,4,7,9,10,11,12,13,15},{1,4,7,9,10,11,12,14},{1,4,7,9,10,11,12,14,15},{1,4,7,9,10,11,12,15},{1,4,7,9,10,11,13},{1,4,7,9,10,11,13,14},{1,4,7,9,10,11,13,14,15},{1,4,7,9,10,11,13,15},{1,4,7,9,10,11,14},{1,4,7,9,10,11,14,15},{1,4,7,9,10,11,15},{1,4,7,9,10,12},{1,4,7,9,10,12,13},{1,4,7,9,10,12,13,14},{1,4,7,9,10,12,13,14,15},{1,4,7,9,10,12,13,15},{1,4,7,9,10,12,14},{1,4,7,9,10,12,14,15},{1,4,7,9,10,12,15},{1,4,7,9,10,13},{1,4,7,9,10,13,14},{1,4,7,9,10,13,14,15},{1,4,7,9,10,13,15},{1,4,7,9,10,14},{1,4,7,9,10,14,15},{1,4,7,9,10,15},{1,4,7,9,11},{1,4,7,9,11,12},{1,4,7,9,11,12,13},{1,4,7,9,11,12,13,14},{1,4,7,9,11,12,13,14,15},{1,4,7,9,11,12,13,15},{1,4,7,9,11,12,14},{1,4,7,9,11,12,14,15},{1,4,7,9,11,12,15},{1,4,7,9,11,13},{1,4,7,9,11,13,14},{1,4,7,9,11,13,14,15},{1,4,7,9,11,13,15},{1,4,7,9,11,14},{1,4,7,9,11,14,15},{1,4,7,9,11,15},{1,4,7,9,12},{1,4,7,9,12,13},{1,4,7,9,12,13,14},{1,4,7,9,12,13,14,15},{1,4,7,9,12,13,15},{1,4,7,9,12,14},{1,4,7,9,12,14,15},{1,4,7,9,12,15},{1,4,7,9,13},{1,4,7,9,13,14},{1,4,7,9,13,14,15},{1,4,7,9,13,15},{1,4,7,9,14},{1,4,7,9,14,15},{1,4,7,9,15},{1,4,7,10},{1,4,7,10,11},{1,4,7,10,11,12},{1,4,7,10,11,12,13},{1,4,7,10,11,12,13,14},{1,4,7,10,11,12,13,14,15},{1,4,7,10,11,12,13,15},{1,4,7,10,11,12,14},{1,4,7,10,11,12,14,15},{1,4,7,10,11,12,15},{1,4,7,10,11,13},{1,4,7,10,11,13,14},{1,4,7,10,11,13,14,15},{1,4,7,10,11,13,15},{1,4,7,10,11,14},{1,4,7,10,11,14,15},{1,4,7,10,11,15},{1,4,7,10,12},{1,4,7,10,12,13},{1,4,7,10,12,13,14},{1,4,7,10,12,13,14,15},{1,4,7,10,12,13,15},{1,4,7,10,12,14},{1,4,7,10,12,14,15},{1,4,7,10,12,15},{1,4,7,10,13},{1,4,7,10,13,14},{1,4,7,10,13,14,15},{1,4,7,10,13,15},{1,4,7,10,14},{1,4,7,10,14,15},{1,4,7,10,15},{1,4,7,11},{1,4,7,11,12},{1,4,7,11,12,13},{1,4,7,11,12,13,14},{1,4,7,11,12,13,14,15},{1,4,7,11,12,13,15},{1,4,7,11,12,14},{1,4,7,11,12,14,15},{1,4,7,11,12,15},{1,4,7,11,13},{1,4,7,11,13,14},{1,4,7,11,13,14,15},{1,4,7,11,13,15},{1,4,7,11,14},{1,4,7,11,14,15},{1,4,7,11,15},{1,4,7,12},{1,4,7,12,13},{1,4,7,12,13,14},{1,4,7,12,13,14,15},{1,4,7,12,13,15},{1,4,7,12,14},{1,4,7,12,14,15},{1,4,7,12,15},{1,4,7,13},{1,4,7,13,14},{1,4,7,13,14,15},{1,4,7,13,15},{1,4,7,14},{1,4,7,14,15},{1,4,7,15},{1,4,8},{1,4,8,9},{1,4,8,9,10},{1,4,8,9,10,11},{1,4,8,9,10,11,12},{1,4,8,9,10,11,12,13},{1,4,8,9,10,11,12,13,14},{1,4,8,9,10,11,12,13,14,15},{1,4,8,9,10,11,12,13,15},{1,4,8,9,10,11,12,14},{1,4,8,9,10,11,12,14,15},{1,4,8,9,10,11,12,15},{1,4,8,9,10,11,13},{1,4,8,9,10,11,13,14},{1,4,8,9,10,11,13,14,15},{1,4,8,9,10,11,13,15},{1,4,8,9,10,11,14},{1,4,8,9,10,11,14,15},{1,4,8,9,10,11,15},{1,4,8,9,10,12},{1,4,8,9,10,12,13},{1,4,8,9,10,12,13,14},{1,4,8,9,10,12,13,14,15},{1,4,8,9,10,12,13,15},{1,4,8,9,10,12,14},{1,4,8,9,10,12,14,15},{1,4,8,9,10,12,15},{1,4,8,9,10,13},{1,4,8,9,10,13,14},{1,4,8,9,10,13,14,15},{1,4,8,9,10,13,15},{1,4,8,9,10,14},{1,4,8,9,10,14,15},{1,4,8,9,10,15},{1,4,8,9,11},{1,4,8,9,11,12},{1,4,8,9,11,12,13},{1,4,8,9,11,12,13,14},{1,4,8,9,11,12,13,14,15},{1,4,8,9,11,12,13,15},{1,4,8,9,11,12,14},{1,4,8,9,11,12,14,15},{1,4,8,9,11,12,15},{1,4,8,9,11,13},{1,4,8,9,11,13,14},{1,4,8,9,11,13,14,15},{1,4,8,9,11,13,15},{1,4,8,9,11,14},{1,4,8,9,11,14,15},{1,4,8,9,11,15},{1,4,8,9,12},{1,4,8,9,12,13},{1,4,8,9,12,13,14},{1,4,8,9,12,13,14,15},{1,4,8,9,12,13,15},{1,4,8,9,12,14},{1,4,8,9,12,14,15},{1,4,8,9,12,15},{1,4,8,9,13},{1,4,8,9,13,14},{1,4,8,9,13,14,15},{1,4,8,9,13,15},{1,4,8,9,14},{1,4,8,9,14,15},{1,4,8,9,15},{1,4,8,10},{1,4,8,10,11},{1,4,8,10,11,12},{1,4,8,10,11,12,13},{1,4,8,10,11,12,13,14},{1,4,8,10,11,12,13,14,15},{1,4,8,10,11,12,13,15},{1,4,8,10,11,12,14},{1,4,8,10,11,12,14,15},{1,4,8,10,11,12,15},{1,4,8,10,11,13},{1,4,8,10,11,13,14},{1,4,8,10,11,13,14,15},{1,4,8,10,11,13,15},{1,4,8,10,11,14},{1,4,8,10,11,14,15},{1,4,8,10,11,15},{1,4,8,10,12},{1,4,8,10,12,13},{1,4,8,10,12,13,14},{1,4,8,10,12,13,14,15},{1,4,8,10,12,13,15},{1,4,8,10,12,14},{1,4,8,10,12,14,15},{1,4,8,10,12,15},{1,4,8,10,13},{1,4,8,10,13,14},{1,4,8,10,13,14,15},{1,4,8,10,13,15},{1,4,8,10,14},{1,4,8,10,14,15},{1,4,8,10,15},{1,4,8,11},{1,4,8,11,12},{1,4,8,11,12,13},{1,4,8,11,12,13,14},{1,4,8,11,12,13,14,15},{1,4,8,11,12,13,15},{1,4,8,11,12,14},{1,4,8,11,12,14,15},{1,4,8,11,12,15},{1,4,8,11,13},{1,4,8,11,13,14},{1,4,8,11,13,14,15},{1,4,8,11,13,15},{1,4,8,11,14},{1,4,8,11,14,15},{1,4,8,11,15},{1,4,8,12},{1,4,8,12,13},{1,4,8,12,13,14},{1,4,8,12,13,14,15},{1,4,8,12,13,15},{1,4,8,12,14},{1,4,8,12,14,15},{1,4,8,12,15},{1,4,8,13},{1,4,8,13,14},{1,4,8,13,14,15},{1,4,8,13,15},{1,4,8,14},{1,4,8,14,15},{1,4,8,15},{1,4,9},{1,4,9,10},{1,4,9,10,11},{1,4,9,10,11,12},{1,4,9,10,11,12,13},{1,4,9,10,11,12,13,14},{1,4,9,10,11,12,13,14,15},{1,4,9,10,11,12,13,15},{1,4,9,10,11,12,14},{1,4,9,10,11,12,14,15},{1,4,9,10,11,12,15},{1,4,9,10,11,13},{1,4,9,10,11,13,14},{1,4,9,10,11,13,14,15},{1,4,9,10,11,13,15},{1,4,9,10,11,14},{1,4,9,10,11,14,15},{1,4,9,10,11,15},{1,4,9,10,12},{1,4,9,10,12,13},{1,4,9,10,12,13,14},{1,4,9,10,12,13,14,15},{1,4,9,10,12,13,15},{1,4,9,10,12,14},{1,4,9,10,12,14,15},{1,4,9,10,12,15},{1,4,9,10,13},{1,4,9,10,13,14},{1,4,9,10,13,14,15},{1,4,9,10,13,15},{1,4,9,10,14},{1,4,9,10,14,15},{1,4,9,10,15},{1,4,9,11},{1,4,9,11,12},{1,4,9,11,12,13},{1,4,9,11,12,13,14},{1,4,9,11,12,13,14,15},{1,4,9,11,12,13,15},{1,4,9,11,12,14},{1,4,9,11,12,14,15},{1,4,9,11,12,15},{1,4,9,11,13},{1,4,9,11,13,14},{1,4,9,11,13,14,15},{1,4,9,11,13,15},{1,4,9,11,14},{1,4,9,11,14,15},{1,4,9,11,15},{1,4,9,12},{1,4,9,12,13},{1,4,9,12,13,14},{1,4,9,12,13,14,15},{1,4,9,12,13,15},{1,4,9,12,14},{1,4,9,12,14,15},{1,4,9,12,15},{1,4,9,13},{1,4,9,13,14},{1,4,9,13,14,15},{1,4,9,13,15},{1,4,9,14},{1,4,9,14,15},{1,4,9,15},{1,4,10},{1,4,10,11},{1,4,10,11,12},{1,4,10,11,12,13},{1,4,10,11,12,13,14},{1,4,10,11,12,13,14,15},{1,4,10,11,12,13,15},{1,4,10,11,12,14},{1,4,10,11,12,14,15},{1,4,10,11,12,15},{1,4,10,11,13},{1,4,10,11,13,14},{1,4,10,11,13,14,15},{1,4,10,11,13,15},{1,4,10,11,14},{1,4,10,11,14,15},{1,4,10,11,15},{1,4,10,12},{1,4,10,12,13},{1,4,10,12,13,14},{1,4,10,12,13,14,15},{1,4,10,12,13,15},{1,4,10,12,14},{1,4,10,12,14,15},{1,4,10,12,15},{1,4,10,13},{1,4,10,13,14},{1,4,10,13,14,15},{1,4,10,13,15},{1,4,10,14},{1,4,10,14,15},{1,4,10,15},{1,4,11},{1,4,11,12},{1,4,11,12,13},{1,4,11,12,13,14},{1,4,11,12,13,14,15},{1,4,11,12,13,15},{1,4,11,12,14},{1,4,11,12,14,15},{1,4,11,12,15},{1,4,11,13},{1,4,11,13,14},{1,4,11,13,14,15},{1,4,11,13,15},{1,4,11,14},{1,4,11,14,15},{1,4,11,15},{1,4,12},{1,4,12,13},{1,4,12,13,14},{1,4,12,13,14,15},{1,4,12,13,15},{1,4,12,14},{1,4,12,14,15},{1,4,12,15},{1,4,13},{1,4,13,14},{1,4,13,14,15},{1,4,13,15},{1,4,14},{1,4,14,15},{1,4,15},{1,5},{1,5,6},{1,5,6,7},{1,5,6,7,8},{1,5,6,7,8,9},{1,5,6,7,8,9,10},{1,5,6,7,8,9,10,11},{1,5,6,7,8,9,10,11,12},{1,5,6,7,8,9,10,11,12,13},{1,5,6,7,8,9,10,11,12,13,14},{1,5,6,7,8,9,10,11,12,13,14,15},{1,5,6,7,8,9,10,11,12,13,15},{1,5,6,7,8,9,10,11,12,14},{1,5,6,7,8,9,10,11,12,14,15},{1,5,6,7,8,9,10,11,12,15},{1,5,6,7,8,9,10,11,13},{1,5,6,7,8,9,10,11,13,14},{1,5,6,7,8,9,10,11,13,14,15},{1,5,6,7,8,9,10,11,13,15},{1,5,6,7,8,9,10,11,14},{1,5,6,7,8,9,10,11,14,15},{1,5,6,7,8,9,10,11,15},{1,5,6,7,8,9,10,12},{1,5,6,7,8,9,10,12,13},{1,5,6,7,8,9,10,12,13,14},{1,5,6,7,8,9,10,12,13,14,15},{1,5,6,7,8,9,10,12,13,15},{1,5,6,7,8,9,10,12,14},{1,5,6,7,8,9,10,12,14,15},{1,5,6,7,8,9,10,12,15},{1,5,6,7,8,9,10,13},{1,5,6,7,8,9,10,13,14},{1,5,6,7,8,9,10,13,14,15},{1,5,6,7,8,9,10,13,15},{1,5,6,7,8,9,10,14},{1,5,6,7,8,9,10,14,15},{1,5,6,7,8,9,10,15},{1,5,6,7,8,9,11},{1,5,6,7,8,9,11,12},{1,5,6,7,8,9,11,12,13},{1,5,6,7,8,9,11,12,13,14},{1,5,6,7,8,9,11,12,13,14,15},{1,5,6,7,8,9,11,12,13,15},{1,5,6,7,8,9,11,12,14},{1,5,6,7,8,9,11,12,14,15},{1,5,6,7,8,9,11,12,15},{1,5,6,7,8,9,11,13},{1,5,6,7,8,9,11,13,14},{1,5,6,7,8,9,11,13,14,15},{1,5,6,7,8,9,11,13,15},{1,5,6,7,8,9,11,14},{1,5,6,7,8,9,11,14,15},{1,5,6,7,8,9,11,15},{1,5,6,7,8,9,12},{1,5,6,7,8,9,12,13},{1,5,6,7,8,9,12,13,14},{1,5,6,7,8,9,12,13,14,15},{1,5,6,7,8,9,12,13,15},{1,5,6,7,8,9,12,14},{1,5,6,7,8,9,12,14,15},{1,5,6,7,8,9,12,15},{1,5,6,7,8,9,13},{1,5,6,7,8,9,13,14},{1,5,6,7,8,9,13,14,15},{1,5,6,7,8,9,13,15},{1,5,6,7,8,9,14},{1,5,6,7,8,9,14,15},{1,5,6,7,8,9,15},{1,5,6,7,8,10},{1,5,6,7,8,10,11},{1,5,6,7,8,10,11,12},{1,5,6,7,8,10,11,12,13},{1,5,6,7,8,10,11,12,13,14},{1,5,6,7,8,10,11,12,13,14,15},{1,5,6,7,8,10,11,12,13,15},{1,5,6,7,8,10,11,12,14},{1,5,6,7,8,10,11,12,14,15},{1,5,6,7,8,10,11,12,15},{1,5,6,7,8,10,11,13},{1,5,6,7,8,10,11,13,14},{1,5,6,7,8,10,11,13,14,15},{1,5,6,7,8,10,11,13,15},{1,5,6,7,8,10,11,14},{1,5,6,7,8,10,11,14,15},{1,5,6,7,8,10,11,15},{1,5,6,7,8,10,12},{1,5,6,7,8,10,12,13},{1,5,6,7,8,10,12,13,14},{1,5,6,7,8,10,12,13,14,15},{1,5,6,7,8,10,12,13,15},{1,5,6,7,8,10,12,14},{1,5,6,7,8,10,12,14,15},{1,5,6,7,8,10,12,15},{1,5,6,7,8,10,13},{1,5,6,7,8,10,13,14},{1,5,6,7,8,10,13,14,15},{1,5,6,7,8,10,13,15},{1,5,6,7,8,10,14},{1,5,6,7,8,10,14,15},{1,5,6,7,8,10,15},{1,5,6,7,8,11},{1,5,6,7,8,11,12},{1,5,6,7,8,11,12,13},{1,5,6,7,8,11,12,13,14},{1,5,6,7,8,11,12,13,14,15},{1,5,6,7,8,11,12,13,15},{1,5,6,7,8,11,12,14},{1,5,6,7,8,11,12,14,15},{1,5,6,7,8,11,12,15},{1,5,6,7,8,11,13},{1,5,6,7,8,11,13,14},{1,5,6,7,8,11,13,14,15},{1,5,6,7,8,11,13,15},{1,5,6,7,8,11,14},{1,5,6,7,8,11,14,15},{1,5,6,7,8,11,15},{1,5,6,7,8,12},{1,5,6,7,8,12,13},{1,5,6,7,8,12,13,14},{1,5,6,7,8,12,13,14,15},{1,5,6,7,8,12,13,15},{1,5,6,7,8,12,14},{1,5,6,7,8,12,14,15},{1,5,6,7,8,12,15},{1,5,6,7,8,13},{1,5,6,7,8,13,14},{1,5,6,7,8,13,14,15},{1,5,6,7,8,13,15},{1,5,6,7,8,14},{1,5,6,7,8,14,15},{1,5,6,7,8,15},{1,5,6,7,9},{1,5,6,7,9,10},{1,5,6,7,9,10,11},{1,5,6,7,9,10,11,12},{1,5,6,7,9,10,11,12,13},{1,5,6,7,9,10,11,12,13,14},{1,5,6,7,9,10,11,12,13,14,15},{1,5,6,7,9,10,11,12,13,15},{1,5,6,7,9,10,11,12,14},{1,5,6,7,9,10,11,12,14,15},{1,5,6,7,9,10,11,12,15},{1,5,6,7,9,10,11,13},{1,5,6,7,9,10,11,13,14},{1,5,6,7,9,10,11,13,14,15},{1,5,6,7,9,10,11,13,15},{1,5,6,7,9,10,11,14},{1,5,6,7,9,10,11,14,15},{1,5,6,7,9,10,11,15},{1,5,6,7,9,10,12},{1,5,6,7,9,10,12,13},{1,5,6,7,9,10,12,13,14},{1,5,6,7,9,10,12,13,14,15},{1,5,6,7,9,10,12,13,15},{1,5,6,7,9,10,12,14},{1,5,6,7,9,10,12,14,15},{1,5,6,7,9,10,12,15},{1,5,6,7,9,10,13},{1,5,6,7,9,10,13,14},{1,5,6,7,9,10,13,14,15},{1,5,6,7,9,10,13,15},{1,5,6,7,9,10,14},{1,5,6,7,9,10,14,15},{1,5,6,7,9,10,15},{1,5,6,7,9,11},{1,5,6,7,9,11,12},{1,5,6,7,9,11,12,13},{1,5,6,7,9,11,12,13,14},{1,5,6,7,9,11,12,13,14,15},{1,5,6,7,9,11,12,13,15},{1,5,6,7,9,11,12,14},{1,5,6,7,9,11,12,14,15},{1,5,6,7,9,11,12,15},{1,5,6,7,9,11,13},{1,5,6,7,9,11,13,14},{1,5,6,7,9,11,13,14,15},{1,5,6,7,9,11,13,15},{1,5,6,7,9,11,14},{1,5,6,7,9,11,14,15},{1,5,6,7,9,11,15},{1,5,6,7,9,12},{1,5,6,7,9,12,13},{1,5,6,7,9,12,13,14},{1,5,6,7,9,12,13,14,15},{1,5,6,7,9,12,13,15},{1,5,6,7,9,12,14},{1,5,6,7,9,12,14,15},{1,5,6,7,9,12,15},{1,5,6,7,9,13},{1,5,6,7,9,13,14},{1,5,6,7,9,13,14,15},{1,5,6,7,9,13,15},{1,5,6,7,9,14},{1,5,6,7,9,14,15},{1,5,6,7,9,15},{1,5,6,7,10},{1,5,6,7,10,11},{1,5,6,7,10,11,12},{1,5,6,7,10,11,12,13},{1,5,6,7,10,11,12,13,14},{1,5,6,7,10,11,12,13,14,15},{1,5,6,7,10,11,12,13,15},{1,5,6,7,10,11,12,14},{1,5,6,7,10,11,12,14,15},{1,5,6,7,10,11,12,15},{1,5,6,7,10,11,13},{1,5,6,7,10,11,13,14},{1,5,6,7,10,11,13,14,15},{1,5,6,7,10,11,13,15},{1,5,6,7,10,11,14},{1,5,6,7,10,11,14,15},{1,5,6,7,10,11,15},{1,5,6,7,10,12},{1,5,6,7,10,12,13},{1,5,6,7,10,12,13,14},{1,5,6,7,10,12,13,14,15},{1,5,6,7,10,12,13,15},{1,5,6,7,10,12,14},{1,5,6,7,10,12,14,15},{1,5,6,7,10,12,15},{1,5,6,7,10,13},{1,5,6,7,10,13,14},{1,5,6,7,10,13,14,15},{1,5,6,7,10,13,15},{1,5,6,7,10,14},{1,5,6,7,10,14,15},{1,5,6,7,10,15},{1,5,6,7,11},{1,5,6,7,11,12},{1,5,6,7,11,12,13},{1,5,6,7,11,12,13,14},{1,5,6,7,11,12,13,14,15},{1,5,6,7,11,12,13,15},{1,5,6,7,11,12,14},{1,5,6,7,11,12,14,15},{1,5,6,7,11,12,15},{1,5,6,7,11,13},{1,5,6,7,11,13,14},{1,5,6,7,11,13,14,15},{1,5,6,7,11,13,15},{1,5,6,7,11,14},{1,5,6,7,11,14,15},{1,5,6,7,11,15},{1,5,6,7,12},{1,5,6,7,12,13},{1,5,6,7,12,13,14},{1,5,6,7,12,13,14,15},{1,5,6,7,12,13,15},{1,5,6,7,12,14},{1,5,6,7,12,14,15},{1,5,6,7,12,15},{1,5,6,7,13},{1,5,6,7,13,14},{1,5,6,7,13,14,15},{1,5,6,7,13,15},{1,5,6,7,14},{1,5,6,7,14,15},{1,5,6,7,15},{1,5,6,8},{1,5,6,8,9},{1,5,6,8,9,10},{1,5,6,8,9,10,11},{1,5,6,8,9,10,11,12},{1,5,6,8,9,10,11,12,13},{1,5,6,8,9,10,11,12,13,14},{1,5,6,8,9,10,11,12,13,14,15},{1,5,6,8,9,10,11,12,13,15},{1,5,6,8,9,10,11,12,14},{1,5,6,8,9,10,11,12,14,15},{1,5,6,8,9,10,11,12,15},{1,5,6,8,9,10,11,13},{1,5,6,8,9,10,11,13,14},{1,5,6,8,9,10,11,13,14,15},{1,5,6,8,9,10,11,13,15},{1,5,6,8,9,10,11,14},{1,5,6,8,9,10,11,14,15},{1,5,6,8,9,10,11,15},{1,5,6,8,9,10,12},{1,5,6,8,9,10,12,13},{1,5,6,8,9,10,12,13,14},{1,5,6,8,9,10,12,13,14,15},{1,5,6,8,9,10,12,13,15},{1,5,6,8,9,10,12,14},{1,5,6,8,9,10,12,14,15},{1,5,6,8,9,10,12,15},{1,5,6,8,9,10,13},{1,5,6,8,9,10,13,14},{1,5,6,8,9,10,13,14,15},{1,5,6,8,9,10,13,15},{1,5,6,8,9,10,14},{1,5,6,8,9,10,14,15},{1,5,6,8,9,10,15},{1,5,6,8,9,11},{1,5,6,8,9,11,12},{1,5,6,8,9,11,12,13},{1,5,6,8,9,11,12,13,14},{1,5,6,8,9,11,12,13,14,15},{1,5,6,8,9,11,12,13,15},{1,5,6,8,9,11,12,14},{1,5,6,8,9,11,12,14,15},{1,5,6,8,9,11,12,15},{1,5,6,8,9,11,13},{1,5,6,8,9,11,13,14},{1,5,6,8,9,11,13,14,15},{1,5,6,8,9,11,13,15},{1,5,6,8,9,11,14},{1,5,6,8,9,11,14,15},{1,5,6,8,9,11,15},{1,5,6,8,9,12},{1,5,6,8,9,12,13},{1,5,6,8,9,12,13,14},{1,5,6,8,9,12,13,14,15},{1,5,6,8,9,12,13,15},{1,5,6,8,9,12,14},{1,5,6,8,9,12,14,15},{1,5,6,8,9,12,15},{1,5,6,8,9,13},{1,5,6,8,9,13,14},{1,5,6,8,9,13,14,15},{1,5,6,8,9,13,15},{1,5,6,8,9,14},{1,5,6,8,9,14,15},{1,5,6,8,9,15},{1,5,6,8,10},{1,5,6,8,10,11},{1,5,6,8,10,11,12},{1,5,6,8,10,11,12,13},{1,5,6,8,10,11,12,13,14},{1,5,6,8,10,11,12,13,14,15},{1,5,6,8,10,11,12,13,15},{1,5,6,8,10,11,12,14},{1,5,6,8,10,11,12,14,15},{1,5,6,8,10,11,12,15},{1,5,6,8,10,11,13},{1,5,6,8,10,11,13,14},{1,5,6,8,10,11,13,14,15},{1,5,6,8,10,11,13,15},{1,5,6,8,10,11,14},{1,5,6,8,10,11,14,15},{1,5,6,8,10,11,15},{1,5,6,8,10,12},{1,5,6,8,10,12,13},{1,5,6,8,10,12,13,14},{1,5,6,8,10,12,13,14,15},{1,5,6,8,10,12,13,15},{1,5,6,8,10,12,14},{1,5,6,8,10,12,14,15},{1,5,6,8,10,12,15},{1,5,6,8,10,13},{1,5,6,8,10,13,14},{1,5,6,8,10,13,14,15},{1,5,6,8,10,13,15},{1,5,6,8,10,14},{1,5,6,8,10,14,15},{1,5,6,8,10,15},{1,5,6,8,11},{1,5,6,8,11,12},{1,5,6,8,11,12,13},{1,5,6,8,11,12,13,14},{1,5,6,8,11,12,13,14,15},{1,5,6,8,11,12,13,15},{1,5,6,8,11,12,14},{1,5,6,8,11,12,14,15},{1,5,6,8,11,12,15},{1,5,6,8,11,13},{1,5,6,8,11,13,14},{1,5,6,8,11,13,14,15},{1,5,6,8,11,13,15},{1,5,6,8,11,14},{1,5,6,8,11,14,15},{1,5,6,8,11,15},{1,5,6,8,12},{1,5,6,8,12,13},{1,5,6,8,12,13,14},{1,5,6,8,12,13,14,15},{1,5,6,8,12,13,15},{1,5,6,8,12,14},{1,5,6,8,12,14,15},{1,5,6,8,12,15},{1,5,6,8,13},{1,5,6,8,13,14},{1,5,6,8,13,14,15},{1,5,6,8,13,15},{1,5,6,8,14},{1,5,6,8,14,15},{1,5,6,8,15},{1,5,6,9},{1,5,6,9,10},{1,5,6,9,10,11},{1,5,6,9,10,11,12},{1,5,6,9,10,11,12,13},{1,5,6,9,10,11,12,13,14},{1,5,6,9,10,11,12,13,14,15},{1,5,6,9,10,11,12,13,15},{1,5,6,9,10,11,12,14},{1,5,6,9,10,11,12,14,15},{1,5,6,9,10,11,12,15},{1,5,6,9,10,11,13},{1,5,6,9,10,11,13,14},{1,5,6,9,10,11,13,14,15},{1,5,6,9,10,11,13,15},{1,5,6,9,10,11,14},{1,5,6,9,10,11,14,15},{1,5,6,9,10,11,15},{1,5,6,9,10,12},{1,5,6,9,10,12,13},{1,5,6,9,10,12,13,14},{1,5,6,9,10,12,13,14,15},{1,5,6,9,10,12,13,15},{1,5,6,9,10,12,14},{1,5,6,9,10,12,14,15},{1,5,6,9,10,12,15},{1,5,6,9,10,13},{1,5,6,9,10,13,14},{1,5,6,9,10,13,14,15},{1,5,6,9,10,13,15},{1,5,6,9,10,14},{1,5,6,9,10,14,15},{1,5,6,9,10,15},{1,5,6,9,11},{1,5,6,9,11,12},{1,5,6,9,11,12,13},{1,5,6,9,11,12,13,14},{1,5,6,9,11,12,13,14,15},{1,5,6,9,11,12,13,15},{1,5,6,9,11,12,14},{1,5,6,9,11,12,14,15},{1,5,6,9,11,12,15},{1,5,6,9,11,13},{1,5,6,9,11,13,14},{1,5,6,9,11,13,14,15},{1,5,6,9,11,13,15},{1,5,6,9,11,14},{1,5,6,9,11,14,15},{1,5,6,9,11,15},{1,5,6,9,12},{1,5,6,9,12,13},{1,5,6,9,12,13,14},{1,5,6,9,12,13,14,15},{1,5,6,9,12,13,15},{1,5,6,9,12,14},{1,5,6,9,12,14,15},{1,5,6,9,12,15},{1,5,6,9,13},{1,5,6,9,13,14},{1,5,6,9,13,14,15},{1,5,6,9,13,15},{1,5,6,9,14},{1,5,6,9,14,15},{1,5,6,9,15},{1,5,6,10},{1,5,6,10,11},{1,5,6,10,11,12},{1,5,6,10,11,12,13},{1,5,6,10,11,12,13,14},{1,5,6,10,11,12,13,14,15},{1,5,6,10,11,12,13,15},{1,5,6,10,11,12,14},{1,5,6,10,11,12,14,15},{1,5,6,10,11,12,15},{1,5,6,10,11,13},{1,5,6,10,11,13,14},{1,5,6,10,11,13,14,15},{1,5,6,10,11,13,15},{1,5,6,10,11,14},{1,5,6,10,11,14,15},{1,5,6,10,11,15},{1,5,6,10,12},{1,5,6,10,12,13},{1,5,6,10,12,13,14},{1,5,6,10,12,13,14,15},{1,5,6,10,12,13,15},{1,5,6,10,12,14},{1,5,6,10,12,14,15},{1,5,6,10,12,15},{1,5,6,10,13},{1,5,6,10,13,14},{1,5,6,10,13,14,15},{1,5,6,10,13,15},{1,5,6,10,14},{1,5,6,10,14,15},{1,5,6,10,15},{1,5,6,11},{1,5,6,11,12},{1,5,6,11,12,13},{1,5,6,11,12,13,14},{1,5,6,11,12,13,14,15},{1,5,6,11,12,13,15},{1,5,6,11,12,14},{1,5,6,11,12,14,15},{1,5,6,11,12,15},{1,5,6,11,13},{1,5,6,11,13,14},{1,5,6,11,13,14,15},{1,5,6,11,13,15},{1,5,6,11,14},{1,5,6,11,14,15},{1,5,6,11,15},{1,5,6,12},{1,5,6,12,13},{1,5,6,12,13,14},{1,5,6,12,13,14,15},{1,5,6,12,13,15},{1,5,6,12,14},{1,5,6,12,14,15},{1,5,6,12,15},{1,5,6,13},{1,5,6,13,14},{1,5,6,13,14,15},{1,5,6,13,15},{1,5,6,14},{1,5,6,14,15},{1,5,6,15},{1,5,7},{1,5,7,8},{1,5,7,8,9},{1,5,7,8,9,10},{1,5,7,8,9,10,11},{1,5,7,8,9,10,11,12},{1,5,7,8,9,10,11,12,13},{1,5,7,8,9,10,11,12,13,14},{1,5,7,8,9,10,11,12,13,14,15},{1,5,7,8,9,10,11,12,13,15},{1,5,7,8,9,10,11,12,14},{1,5,7,8,9,10,11,12,14,15},{1,5,7,8,9,10,11,12,15},{1,5,7,8,9,10,11,13},{1,5,7,8,9,10,11,13,14},{1,5,7,8,9,10,11,13,14,15},{1,5,7,8,9,10,11,13,15},{1,5,7,8,9,10,11,14},{1,5,7,8,9,10,11,14,15},{1,5,7,8,9,10,11,15},{1,5,7,8,9,10,12},{1,5,7,8,9,10,12,13},{1,5,7,8,9,10,12,13,14},{1,5,7,8,9,10,12,13,14,15},{1,5,7,8,9,10,12,13,15},{1,5,7,8,9,10,12,14},{1,5,7,8,9,10,12,14,15},{1,5,7,8,9,10,12,15},{1,5,7,8,9,10,13},{1,5,7,8,9,10,13,14},{1,5,7,8,9,10,13,14,15},{1,5,7,8,9,10,13,15},{1,5,7,8,9,10,14},{1,5,7,8,9,10,14,15},{1,5,7,8,9,10,15},{1,5,7,8,9,11},{1,5,7,8,9,11,12},{1,5,7,8,9,11,12,13},{1,5,7,8,9,11,12,13,14},{1,5,7,8,9,11,12,13,14,15},{1,5,7,8,9,11,12,13,15},{1,5,7,8,9,11,12,14},{1,5,7,8,9,11,12,14,15},{1,5,7,8,9,11,12,15},{1,5,7,8,9,11,13},{1,5,7,8,9,11,13,14},{1,5,7,8,9,11,13,14,15},{1,5,7,8,9,11,13,15},{1,5,7,8,9,11,14},{1,5,7,8,9,11,14,15},{1,5,7,8,9,11,15},{1,5,7,8,9,12},{1,5,7,8,9,12,13},{1,5,7,8,9,12,13,14},{1,5,7,8,9,12,13,14,15},{1,5,7,8,9,12,13,15},{1,5,7,8,9,12,14},{1,5,7,8,9,12,14,15},{1,5,7,8,9,12,15},{1,5,7,8,9,13},{1,5,7,8,9,13,14},{1,5,7,8,9,13,14,15},{1,5,7,8,9,13,15},{1,5,7,8,9,14},{1,5,7,8,9,14,15},{1,5,7,8,9,15},{1,5,7,8,10},{1,5,7,8,10,11},{1,5,7,8,10,11,12},{1,5,7,8,10,11,12,13},{1,5,7,8,10,11,12,13,14},{1,5,7,8,10,11,12,13,14,15},{1,5,7,8,10,11,12,13,15},{1,5,7,8,10,11,12,14},{1,5,7,8,10,11,12,14,15},{1,5,7,8,10,11,12,15},{1,5,7,8,10,11,13},{1,5,7,8,10,11,13,14},{1,5,7,8,10,11,13,14,15},{1,5,7,8,10,11,13,15},{1,5,7,8,10,11,14},{1,5,7,8,10,11,14,15},{1,5,7,8,10,11,15},{1,5,7,8,10,12},{1,5,7,8,10,12,13},{1,5,7,8,10,12,13,14},{1,5,7,8,10,12,13,14,15},{1,5,7,8,10,12,13,15},{1,5,7,8,10,12,14},{1,5,7,8,10,12,14,15},{1,5,7,8,10,12,15},{1,5,7,8,10,13},{1,5,7,8,10,13,14},{1,5,7,8,10,13,14,15},{1,5,7,8,10,13,15},{1,5,7,8,10,14},{1,5,7,8,10,14,15},{1,5,7,8,10,15},{1,5,7,8,11},{1,5,7,8,11,12},{1,5,7,8,11,12,13},{1,5,7,8,11,12,13,14},{1,5,7,8,11,12,13,14,15},{1,5,7,8,11,12,13,15},{1,5,7,8,11,12,14},{1,5,7,8,11,12,14,15},{1,5,7,8,11,12,15},{1,5,7,8,11,13},{1,5,7,8,11,13,14},{1,5,7,8,11,13,14,15},{1,5,7,8,11,13,15},{1,5,7,8,11,14},{1,5,7,8,11,14,15},{1,5,7,8,11,15},{1,5,7,8,12},{1,5,7,8,12,13},{1,5,7,8,12,13,14},{1,5,7,8,12,13,14,15},{1,5,7,8,12,13,15},{1,5,7,8,12,14},{1,5,7,8,12,14,15},{1,5,7,8,12,15},{1,5,7,8,13},{1,5,7,8,13,14},{1,5,7,8,13,14,15},{1,5,7,8,13,15},{1,5,7,8,14},{1,5,7,8,14,15},{1,5,7,8,15},{1,5,7,9},{1,5,7,9,10},{1,5,7,9,10,11},{1,5,7,9,10,11,12},{1,5,7,9,10,11,12,13},{1,5,7,9,10,11,12,13,14},{1,5,7,9,10,11,12,13,14,15},{1,5,7,9,10,11,12,13,15},{1,5,7,9,10,11,12,14},{1,5,7,9,10,11,12,14,15},{1,5,7,9,10,11,12,15},{1,5,7,9,10,11,13},{1,5,7,9,10,11,13,14},{1,5,7,9,10,11,13,14,15},{1,5,7,9,10,11,13,15},{1,5,7,9,10,11,14},{1,5,7,9,10,11,14,15},{1,5,7,9,10,11,15},{1,5,7,9,10,12},{1,5,7,9,10,12,13},{1,5,7,9,10,12,13,14},{1,5,7,9,10,12,13,14,15},{1,5,7,9,10,12,13,15},{1,5,7,9,10,12,14},{1,5,7,9,10,12,14,15},{1,5,7,9,10,12,15},{1,5,7,9,10,13},{1,5,7,9,10,13,14},{1,5,7,9,10,13,14,15},{1,5,7,9,10,13,15},{1,5,7,9,10,14},{1,5,7,9,10,14,15},{1,5,7,9,10,15},{1,5,7,9,11},{1,5,7,9,11,12},{1,5,7,9,11,12,13},{1,5,7,9,11,12,13,14},{1,5,7,9,11,12,13,14,15},{1,5,7,9,11,12,13,15},{1,5,7,9,11,12,14},{1,5,7,9,11,12,14,15},{1,5,7,9,11,12,15},{1,5,7,9,11,13},{1,5,7,9,11,13,14},{1,5,7,9,11,13,14,15},{1,5,7,9,11,13,15},{1,5,7,9,11,14},{1,5,7,9,11,14,15},{1,5,7,9,11,15},{1,5,7,9,12},{1,5,7,9,12,13},{1,5,7,9,12,13,14},{1,5,7,9,12,13,14,15},{1,5,7,9,12,13,15},{1,5,7,9,12,14},{1,5,7,9,12,14,15},{1,5,7,9,12,15},{1,5,7,9,13},{1,5,7,9,13,14},{1,5,7,9,13,14,15},{1,5,7,9,13,15},{1,5,7,9,14},{1,5,7,9,14,15},{1,5,7,9,15},{1,5,7,10},{1,5,7,10,11},{1,5,7,10,11,12},{1,5,7,10,11,12,13},{1,5,7,10,11,12,13,14},{1,5,7,10,11,12,13,14,15},{1,5,7,10,11,12,13,15},{1,5,7,10,11,12,14},{1,5,7,10,11,12,14,15},{1,5,7,10,11,12,15},{1,5,7,10,11,13},{1,5,7,10,11,13,14},{1,5,7,10,11,13,14,15},{1,5,7,10,11,13,15},{1,5,7,10,11,14},{1,5,7,10,11,14,15},{1,5,7,10,11,15},{1,5,7,10,12},{1,5,7,10,12,13},{1,5,7,10,12,13,14},{1,5,7,10,12,13,14,15},{1,5,7,10,12,13,15},{1,5,7,10,12,14},{1,5,7,10,12,14,15},{1,5,7,10,12,15},{1,5,7,10,13},{1,5,7,10,13,14},{1,5,7,10,13,14,15},{1,5,7,10,13,15},{1,5,7,10,14},{1,5,7,10,14,15},{1,5,7,10,15},{1,5,7,11},{1,5,7,11,12},{1,5,7,11,12,13},{1,5,7,11,12,13,14},{1,5,7,11,12,13,14,15},{1,5,7,11,12,13,15},{1,5,7,11,12,14},{1,5,7,11,12,14,15},{1,5,7,11,12,15},{1,5,7,11,13},{1,5,7,11,13,14},{1,5,7,11,13,14,15},{1,5,7,11,13,15},{1,5,7,11,14},{1,5,7,11,14,15},{1,5,7,11,15},{1,5,7,12},{1,5,7,12,13},{1,5,7,12,13,14},{1,5,7,12,13,14,15},{1,5,7,12,13,15},{1,5,7,12,14},{1,5,7,12,14,15},{1,5,7,12,15},{1,5,7,13},{1,5,7,13,14},{1,5,7,13,14,15},{1,5,7,13,15},{1,5,7,14},{1,5,7,14,15},{1,5,7,15},{1,5,8},{1,5,8,9},{1,5,8,9,10},{1,5,8,9,10,11},{1,5,8,9,10,11,12},{1,5,8,9,10,11,12,13},{1,5,8,9,10,11,12,13,14},{1,5,8,9,10,11,12,13,14,15},{1,5,8,9,10,11,12,13,15},{1,5,8,9,10,11,12,14},{1,5,8,9,10,11,12,14,15},{1,5,8,9,10,11,12,15},{1,5,8,9,10,11,13},{1,5,8,9,10,11,13,14},{1,5,8,9,10,11,13,14,15},{1,5,8,9,10,11,13,15},{1,5,8,9,10,11,14},{1,5,8,9,10,11,14,15},{1,5,8,9,10,11,15},{1,5,8,9,10,12},{1,5,8,9,10,12,13},{1,5,8,9,10,12,13,14},{1,5,8,9,10,12,13,14,15},{1,5,8,9,10,12,13,15},{1,5,8,9,10,12,14},{1,5,8,9,10,12,14,15},{1,5,8,9,10,12,15},{1,5,8,9,10,13},{1,5,8,9,10,13,14},{1,5,8,9,10,13,14,15},{1,5,8,9,10,13,15},{1,5,8,9,10,14},{1,5,8,9,10,14,15},{1,5,8,9,10,15},{1,5,8,9,11},{1,5,8,9,11,12},{1,5,8,9,11,12,13},{1,5,8,9,11,12,13,14},{1,5,8,9,11,12,13,14,15},{1,5,8,9,11,12,13,15},{1,5,8,9,11,12,14},{1,5,8,9,11,12,14,15},{1,5,8,9,11,12,15},{1,5,8,9,11,13},{1,5,8,9,11,13,14},{1,5,8,9,11,13,14,15},{1,5,8,9,11,13,15},{1,5,8,9,11,14},{1,5,8,9,11,14,15},{1,5,8,9,11,15},{1,5,8,9,12},{1,5,8,9,12,13},{1,5,8,9,12,13,14},{1,5,8,9,12,13,14,15},{1,5,8,9,12,13,15},{1,5,8,9,12,14},{1,5,8,9,12,14,15},{1,5,8,9,12,15},{1,5,8,9,13},{1,5,8,9,13,14},{1,5,8,9,13,14,15},{1,5,8,9,13,15},{1,5,8,9,14},{1,5,8,9,14,15},{1,5,8,9,15},{1,5,8,10},{1,5,8,10,11},{1,5,8,10,11,12},{1,5,8,10,11,12,13},{1,5,8,10,11,12,13,14},{1,5,8,10,11,12,13,14,15},{1,5,8,10,11,12,13,15},{1,5,8,10,11,12,14},{1,5,8,10,11,12,14,15},{1,5,8,10,11,12,15},{1,5,8,10,11,13},{1,5,8,10,11,13,14},{1,5,8,10,11,13,14,15},{1,5,8,10,11,13,15},{1,5,8,10,11,14},{1,5,8,10,11,14,15},{1,5,8,10,11,15},{1,5,8,10,12},{1,5,8,10,12,13},{1,5,8,10,12,13,14},{1,5,8,10,12,13,14,15},{1,5,8,10,12,13,15},{1,5,8,10,12,14},{1,5,8,10,12,14,15},{1,5,8,10,12,15},{1,5,8,10,13},{1,5,8,10,13,14},{1,5,8,10,13,14,15},{1,5,8,10,13,15},{1,5,8,10,14},{1,5,8,10,14,15},{1,5,8,10,15},{1,5,8,11},{1,5,8,11,12},{1,5,8,11,12,13},{1,5,8,11,12,13,14},{1,5,8,11,12,13,14,15},{1,5,8,11,12,13,15},{1,5,8,11,12,14},{1,5,8,11,12,14,15},{1,5,8,11,12,15},{1,5,8,11,13},{1,5,8,11,13,14},{1,5,8,11,13,14,15},{1,5,8,11,13,15},{1,5,8,11,14},{1,5,8,11,14,15},{1,5,8,11,15},{1,5,8,12},{1,5,8,12,13},{1,5,8,12,13,14},{1,5,8,12,13,14,15},{1,5,8,12,13,15},{1,5,8,12,14},{1,5,8,12,14,15},{1,5,8,12,15},{1,5,8,13},{1,5,8,13,14},{1,5,8,13,14,15},{1,5,8,13,15},{1,5,8,14},{1,5,8,14,15},{1,5,8,15},{1,5,9},{1,5,9,10},{1,5,9,10,11},{1,5,9,10,11,12},{1,5,9,10,11,12,13},{1,5,9,10,11,12,13,14},{1,5,9,10,11,12,13,14,15},{1,5,9,10,11,12,13,15},{1,5,9,10,11,12,14},{1,5,9,10,11,12,14,15},{1,5,9,10,11,12,15},{1,5,9,10,11,13},{1,5,9,10,11,13,14},{1,5,9,10,11,13,14,15},{1,5,9,10,11,13,15},{1,5,9,10,11,14},{1,5,9,10,11,14,15},{1,5,9,10,11,15},{1,5,9,10,12},{1,5,9,10,12,13},{1,5,9,10,12,13,14},{1,5,9,10,12,13,14,15},{1,5,9,10,12,13,15},{1,5,9,10,12,14},{1,5,9,10,12,14,15},{1,5,9,10,12,15},{1,5,9,10,13},{1,5,9,10,13,14},{1,5,9,10,13,14,15},{1,5,9,10,13,15},{1,5,9,10,14},{1,5,9,10,14,15},{1,5,9,10,15},{1,5,9,11},{1,5,9,11,12},{1,5,9,11,12,13},{1,5,9,11,12,13,14},{1,5,9,11,12,13,14,15},{1,5,9,11,12,13,15},{1,5,9,11,12,14},{1,5,9,11,12,14,15},{1,5,9,11,12,15},{1,5,9,11,13},{1,5,9,11,13,14},{1,5,9,11,13,14,15},{1,5,9,11,13,15},{1,5,9,11,14},{1,5,9,11,14,15},{1,5,9,11,15},{1,5,9,12},{1,5,9,12,13},{1,5,9,12,13,14},{1,5,9,12,13,14,15},{1,5,9,12,13,15},{1,5,9,12,14},{1,5,9,12,14,15},{1,5,9,12,15},{1,5,9,13},{1,5,9,13,14},{1,5,9,13,14,15},{1,5,9,13,15},{1,5,9,14},{1,5,9,14,15},{1,5,9,15},{1,5,10},{1,5,10,11},{1,5,10,11,12},{1,5,10,11,12,13},{1,5,10,11,12,13,14},{1,5,10,11,12,13,14,15},{1,5,10,11,12,13,15},{1,5,10,11,12,14},{1,5,10,11,12,14,15},{1,5,10,11,12,15},{1,5,10,11,13},{1,5,10,11,13,14},{1,5,10,11,13,14,15},{1,5,10,11,13,15},{1,5,10,11,14},{1,5,10,11,14,15},{1,5,10,11,15},{1,5,10,12},{1,5,10,12,13},{1,5,10,12,13,14},{1,5,10,12,13,14,15},{1,5,10,12,13,15},{1,5,10,12,14},{1,5,10,12,14,15},{1,5,10,12,15},{1,5,10,13},{1,5,10,13,14},{1,5,10,13,14,15},{1,5,10,13,15},{1,5,10,14},{1,5,10,14,15},{1,5,10,15},{1,5,11},{1,5,11,12},{1,5,11,12,13},{1,5,11,12,13,14},{1,5,11,12,13,14,15},{1,5,11,12,13,15},{1,5,11,12,14},{1,5,11,12,14,15},{1,5,11,12,15},{1,5,11,13},{1,5,11,13,14},{1,5,11,13,14,15},{1,5,11,13,15},{1,5,11,14},{1,5,11,14,15},{1,5,11,15},{1,5,12},{1,5,12,13},{1,5,12,13,14},{1,5,12,13,14,15},{1,5,12,13,15},{1,5,12,14},{1,5,12,14,15},{1,5,12,15},{1,5,13},{1,5,13,14},{1,5,13,14,15},{1,5,13,15},{1,5,14},{1,5,14,15},{1,5,15},{1,6},{1,6,7},{1,6,7,8},{1,6,7,8,9},{1,6,7,8,9,10},{1,6,7,8,9,10,11},{1,6,7,8,9,10,11,12},{1,6,7,8,9,10,11,12,13},{1,6,7,8,9,10,11,12,13,14},{1,6,7,8,9,10,11,12,13,14,15},{1,6,7,8,9,10,11,12,13,15},{1,6,7,8,9,10,11,12,14},{1,6,7,8,9,10,11,12,14,15},{1,6,7,8,9,10,11,12,15},{1,6,7,8,9,10,11,13},{1,6,7,8,9,10,11,13,14},{1,6,7,8,9,10,11,13,14,15},{1,6,7,8,9,10,11,13,15},{1,6,7,8,9,10,11,14},{1,6,7,8,9,10,11,14,15},{1,6,7,8,9,10,11,15},{1,6,7,8,9,10,12},{1,6,7,8,9,10,12,13},{1,6,7,8,9,10,12,13,14},{1,6,7,8,9,10,12,13,14,15},{1,6,7,8,9,10,12,13,15},{1,6,7,8,9,10,12,14},{1,6,7,8,9,10,12,14,15},{1,6,7,8,9,10,12,15},{1,6,7,8,9,10,13},{1,6,7,8,9,10,13,14},{1,6,7,8,9,10,13,14,15},{1,6,7,8,9,10,13,15},{1,6,7,8,9,10,14},{1,6,7,8,9,10,14,15},{1,6,7,8,9,10,15},{1,6,7,8,9,11},{1,6,7,8,9,11,12},{1,6,7,8,9,11,12,13},{1,6,7,8,9,11,12,13,14},{1,6,7,8,9,11,12,13,14,15},{1,6,7,8,9,11,12,13,15},{1,6,7,8,9,11,12,14},{1,6,7,8,9,11,12,14,15},{1,6,7,8,9,11,12,15},{1,6,7,8,9,11,13},{1,6,7,8,9,11,13,14},{1,6,7,8,9,11,13,14,15},{1,6,7,8,9,11,13,15},{1,6,7,8,9,11,14},{1,6,7,8,9,11,14,15},{1,6,7,8,9,11,15},{1,6,7,8,9,12},{1,6,7,8,9,12,13},{1,6,7,8,9,12,13,14},{1,6,7,8,9,12,13,14,15},{1,6,7,8,9,12,13,15},{1,6,7,8,9,12,14},{1,6,7,8,9,12,14,15},{1,6,7,8,9,12,15},{1,6,7,8,9,13},{1,6,7,8,9,13,14},{1,6,7,8,9,13,14,15},{1,6,7,8,9,13,15},{1,6,7,8,9,14},{1,6,7,8,9,14,15},{1,6,7,8,9,15},{1,6,7,8,10},{1,6,7,8,10,11},{1,6,7,8,10,11,12},{1,6,7,8,10,11,12,13},{1,6,7,8,10,11,12,13,14},{1,6,7,8,10,11,12,13,14,15},{1,6,7,8,10,11,12,13,15},{1,6,7,8,10,11,12,14},{1,6,7,8,10,11,12,14,15},{1,6,7,8,10,11,12,15},{1,6,7,8,10,11,13},{1,6,7,8,10,11,13,14},{1,6,7,8,10,11,13,14,15},{1,6,7,8,10,11,13,15},{1,6,7,8,10,11,14},{1,6,7,8,10,11,14,15},{1,6,7,8,10,11,15},{1,6,7,8,10,12},{1,6,7,8,10,12,13},{1,6,7,8,10,12,13,14},{1,6,7,8,10,12,13,14,15},{1,6,7,8,10,12,13,15},{1,6,7,8,10,12,14},{1,6,7,8,10,12,14,15},{1,6,7,8,10,12,15},{1,6,7,8,10,13},{1,6,7,8,10,13,14},{1,6,7,8,10,13,14,15},{1,6,7,8,10,13,15},{1,6,7,8,10,14},{1,6,7,8,10,14,15},{1,6,7,8,10,15},{1,6,7,8,11},{1,6,7,8,11,12},{1,6,7,8,11,12,13},{1,6,7,8,11,12,13,14},{1,6,7,8,11,12,13,14,15},{1,6,7,8,11,12,13,15},{1,6,7,8,11,12,14},{1,6,7,8,11,12,14,15},{1,6,7,8,11,12,15},{1,6,7,8,11,13},{1,6,7,8,11,13,14},{1,6,7,8,11,13,14,15},{1,6,7,8,11,13,15},{1,6,7,8,11,14},{1,6,7,8,11,14,15},{1,6,7,8,11,15},{1,6,7,8,12},{1,6,7,8,12,13},{1,6,7,8,12,13,14},{1,6,7,8,12,13,14,15},{1,6,7,8,12,13,15},{1,6,7,8,12,14},{1,6,7,8,12,14,15},{1,6,7,8,12,15},{1,6,7,8,13},{1,6,7,8,13,14},{1,6,7,8,13,14,15},{1,6,7,8,13,15},{1,6,7,8,14},{1,6,7,8,14,15},{1,6,7,8,15},{1,6,7,9},{1,6,7,9,10},{1,6,7,9,10,11},{1,6,7,9,10,11,12},{1,6,7,9,10,11,12,13},{1,6,7,9,10,11,12,13,14},{1,6,7,9,10,11,12,13,14,15},{1,6,7,9,10,11,12,13,15},{1,6,7,9,10,11,12,14},{1,6,7,9,10,11,12,14,15},{1,6,7,9,10,11,12,15},{1,6,7,9,10,11,13},{1,6,7,9,10,11,13,14},{1,6,7,9,10,11,13,14,15},{1,6,7,9,10,11,13,15},{1,6,7,9,10,11,14},{1,6,7,9,10,11,14,15},{1,6,7,9,10,11,15},{1,6,7,9,10,12},{1,6,7,9,10,12,13},{1,6,7,9,10,12,13,14},{1,6,7,9,10,12,13,14,15},{1,6,7,9,10,12,13,15},{1,6,7,9,10,12,14},{1,6,7,9,10,12,14,15},{1,6,7,9,10,12,15},{1,6,7,9,10,13},{1,6,7,9,10,13,14},{1,6,7,9,10,13,14,15},{1,6,7,9,10,13,15},{1,6,7,9,10,14},{1,6,7,9,10,14,15},{1,6,7,9,10,15},{1,6,7,9,11},{1,6,7,9,11,12},{1,6,7,9,11,12,13},{1,6,7,9,11,12,13,14},{1,6,7,9,11,12,13,14,15},{1,6,7,9,11,12,13,15},{1,6,7,9,11,12,14},{1,6,7,9,11,12,14,15},{1,6,7,9,11,12,15},{1,6,7,9,11,13},{1,6,7,9,11,13,14},{1,6,7,9,11,13,14,15},{1,6,7,9,11,13,15},{1,6,7,9,11,14},{1,6,7,9,11,14,15},{1,6,7,9,11,15},{1,6,7,9,12},{1,6,7,9,12,13},{1,6,7,9,12,13,14},{1,6,7,9,12,13,14,15},{1,6,7,9,12,13,15},{1,6,7,9,12,14},{1,6,7,9,12,14,15},{1,6,7,9,12,15},{1,6,7,9,13},{1,6,7,9,13,14},{1,6,7,9,13,14,15},{1,6,7,9,13,15},{1,6,7,9,14},{1,6,7,9,14,15},{1,6,7,9,15},{1,6,7,10},{1,6,7,10,11},{1,6,7,10,11,12},{1,6,7,10,11,12,13},{1,6,7,10,11,12,13,14},{1,6,7,10,11,12,13,14,15},{1,6,7,10,11,12,13,15},{1,6,7,10,11,12,14},{1,6,7,10,11,12,14,15},{1,6,7,10,11,12,15},{1,6,7,10,11,13},{1,6,7,10,11,13,14},{1,6,7,10,11,13,14,15},{1,6,7,10,11,13,15},{1,6,7,10,11,14},{1,6,7,10,11,14,15},{1,6,7,10,11,15},{1,6,7,10,12},{1,6,7,10,12,13},{1,6,7,10,12,13,14},{1,6,7,10,12,13,14,15},{1,6,7,10,12,13,15},{1,6,7,10,12,14},{1,6,7,10,12,14,15},{1,6,7,10,12,15},{1,6,7,10,13},{1,6,7,10,13,14},{1,6,7,10,13,14,15},{1,6,7,10,13,15},{1,6,7,10,14},{1,6,7,10,14,15},{1,6,7,10,15},{1,6,7,11},{1,6,7,11,12},{1,6,7,11,12,13},{1,6,7,11,12,13,14},{1,6,7,11,12,13,14,15},{1,6,7,11,12,13,15},{1,6,7,11,12,14},{1,6,7,11,12,14,15},{1,6,7,11,12,15},{1,6,7,11,13},{1,6,7,11,13,14},{1,6,7,11,13,14,15},{1,6,7,11,13,15},{1,6,7,11,14},{1,6,7,11,14,15},{1,6,7,11,15},{1,6,7,12},{1,6,7,12,13},{1,6,7,12,13,14},{1,6,7,12,13,14,15},{1,6,7,12,13,15},{1,6,7,12,14},{1,6,7,12,14,15},{1,6,7,12,15},{1,6,7,13},{1,6,7,13,14},{1,6,7,13,14,15},{1,6,7,13,15},{1,6,7,14},{1,6,7,14,15},{1,6,7,15},{1,6,8},{1,6,8,9},{1,6,8,9,10},{1,6,8,9,10,11},{1,6,8,9,10,11,12},{1,6,8,9,10,11,12,13},{1,6,8,9,10,11,12,13,14},{1,6,8,9,10,11,12,13,14,15},{1,6,8,9,10,11,12,13,15},{1,6,8,9,10,11,12,14},{1,6,8,9,10,11,12,14,15},{1,6,8,9,10,11,12,15},{1,6,8,9,10,11,13},{1,6,8,9,10,11,13,14},{1,6,8,9,10,11,13,14,15},{1,6,8,9,10,11,13,15},{1,6,8,9,10,11,14},{1,6,8,9,10,11,14,15},{1,6,8,9,10,11,15},{1,6,8,9,10,12},{1,6,8,9,10,12,13},{1,6,8,9,10,12,13,14},{1,6,8,9,10,12,13,14,15},{1,6,8,9,10,12,13,15},{1,6,8,9,10,12,14},{1,6,8,9,10,12,14,15},{1,6,8,9,10,12,15},{1,6,8,9,10,13},{1,6,8,9,10,13,14},{1,6,8,9,10,13,14,15},{1,6,8,9,10,13,15},{1,6,8,9,10,14},{1,6,8,9,10,14,15},{1,6,8,9,10,15},{1,6,8,9,11},{1,6,8,9,11,12},{1,6,8,9,11,12,13},{1,6,8,9,11,12,13,14},{1,6,8,9,11,12,13,14,15},{1,6,8,9,11,12,13,15},{1,6,8,9,11,12,14},{1,6,8,9,11,12,14,15},{1,6,8,9,11,12,15},{1,6,8,9,11,13},{1,6,8,9,11,13,14},{1,6,8,9,11,13,14,15},{1,6,8,9,11,13,15},{1,6,8,9,11,14},{1,6,8,9,11,14,15},{1,6,8,9,11,15},{1,6,8,9,12},{1,6,8,9,12,13},{1,6,8,9,12,13,14},{1,6,8,9,12,13,14,15},{1,6,8,9,12,13,15},{1,6,8,9,12,14},{1,6,8,9,12,14,15},{1,6,8,9,12,15},{1,6,8,9,13},{1,6,8,9,13,14},{1,6,8,9,13,14,15},{1,6,8,9,13,15},{1,6,8,9,14},{1,6,8,9,14,15},{1,6,8,9,15},{1,6,8,10},{1,6,8,10,11},{1,6,8,10,11,12},{1,6,8,10,11,12,13},{1,6,8,10,11,12,13,14},{1,6,8,10,11,12,13,14,15},{1,6,8,10,11,12,13,15},{1,6,8,10,11,12,14},{1,6,8,10,11,12,14,15},{1,6,8,10,11,12,15},{1,6,8,10,11,13},{1,6,8,10,11,13,14},{1,6,8,10,11,13,14,15},{1,6,8,10,11,13,15},{1,6,8,10,11,14},{1,6,8,10,11,14,15},{1,6,8,10,11,15},{1,6,8,10,12},{1,6,8,10,12,13},{1,6,8,10,12,13,14},{1,6,8,10,12,13,14,15},{1,6,8,10,12,13,15},{1,6,8,10,12,14},{1,6,8,10,12,14,15},{1,6,8,10,12,15},{1,6,8,10,13},{1,6,8,10,13,14},{1,6,8,10,13,14,15},{1,6,8,10,13,15},{1,6,8,10,14},{1,6,8,10,14,15},{1,6,8,10,15},{1,6,8,11},{1,6,8,11,12},{1,6,8,11,12,13},{1,6,8,11,12,13,14},{1,6,8,11,12,13,14,15},{1,6,8,11,12,13,15},{1,6,8,11,12,14},{1,6,8,11,12,14,15},{1,6,8,11,12,15},{1,6,8,11,13},{1,6,8,11,13,14},{1,6,8,11,13,14,15},{1,6,8,11,13,15},{1,6,8,11,14},{1,6,8,11,14,15},{1,6,8,11,15},{1,6,8,12},{1,6,8,12,13},{1,6,8,12,13,14},{1,6,8,12,13,14,15},{1,6,8,12,13,15},{1,6,8,12,14},{1,6,8,12,14,15},{1,6,8,12,15},{1,6,8,13},{1,6,8,13,14},{1,6,8,13,14,15},{1,6,8,13,15},{1,6,8,14},{1,6,8,14,15},{1,6,8,15},{1,6,9},{1,6,9,10},{1,6,9,10,11},{1,6,9,10,11,12},{1,6,9,10,11,12,13},{1,6,9,10,11,12,13,14},{1,6,9,10,11,12,13,14,15},{1,6,9,10,11,12,13,15},{1,6,9,10,11,12,14},{1,6,9,10,11,12,14,15},{1,6,9,10,11,12,15},{1,6,9,10,11,13},{1,6,9,10,11,13,14},{1,6,9,10,11,13,14,15},{1,6,9,10,11,13,15},{1,6,9,10,11,14},{1,6,9,10,11,14,15},{1,6,9,10,11,15},{1,6,9,10,12},{1,6,9,10,12,13},{1,6,9,10,12,13,14},{1,6,9,10,12,13,14,15},{1,6,9,10,12,13,15},{1,6,9,10,12,14},{1,6,9,10,12,14,15},{1,6,9,10,12,15},{1,6,9,10,13},{1,6,9,10,13,14},{1,6,9,10,13,14,15},{1,6,9,10,13,15},{1,6,9,10,14},{1,6,9,10,14,15},{1,6,9,10,15},{1,6,9,11},{1,6,9,11,12},{1,6,9,11,12,13},{1,6,9,11,12,13,14},{1,6,9,11,12,13,14,15},{1,6,9,11,12,13,15},{1,6,9,11,12,14},{1,6,9,11,12,14,15},{1,6,9,11,12,15},{1,6,9,11,13},{1,6,9,11,13,14},{1,6,9,11,13,14,15},{1,6,9,11,13,15},{1,6,9,11,14},{1,6,9,11,14,15},{1,6,9,11,15},{1,6,9,12},{1,6,9,12,13},{1,6,9,12,13,14},{1,6,9,12,13,14,15},{1,6,9,12,13,15},{1,6,9,12,14},{1,6,9,12,14,15},{1,6,9,12,15},{1,6,9,13},{1,6,9,13,14},{1,6,9,13,14,15},{1,6,9,13,15},{1,6,9,14},{1,6,9,14,15},{1,6,9,15},{1,6,10},{1,6,10,11},{1,6,10,11,12},{1,6,10,11,12,13},{1,6,10,11,12,13,14},{1,6,10,11,12,13,14,15},{1,6,10,11,12,13,15},{1,6,10,11,12,14},{1,6,10,11,12,14,15},{1,6,10,11,12,15},{1,6,10,11,13},{1,6,10,11,13,14},{1,6,10,11,13,14,15},{1,6,10,11,13,15},{1,6,10,11,14},{1,6,10,11,14,15},{1,6,10,11,15},{1,6,10,12},{1,6,10,12,13},{1,6,10,12,13,14},{1,6,10,12,13,14,15},{1,6,10,12,13,15},{1,6,10,12,14},{1,6,10,12,14,15},{1,6,10,12,15},{1,6,10,13},{1,6,10,13,14},{1,6,10,13,14,15},{1,6,10,13,15},{1,6,10,14},{1,6,10,14,15},{1,6,10,15},{1,6,11},{1,6,11,12},{1,6,11,12,13},{1,6,11,12,13,14},{1,6,11,12,13,14,15},{1,6,11,12,13,15},{1,6,11,12,14},{1,6,11,12,14,15},{1,6,11,12,15},{1,6,11,13},{1,6,11,13,14},{1,6,11,13,14,15},{1,6,11,13,15},{1,6,11,14},{1,6,11,14,15},{1,6,11,15},{1,6,12},{1,6,12,13},{1,6,12,13,14},{1,6,12,13,14,15},{1,6,12,13,15},{1,6,12,14},{1,6,12,14,15},{1,6,12,15},{1,6,13},{1,6,13,14},{1,6,13,14,15},{1,6,13,15},{1,6,14},{1,6,14,15},{1,6,15},{1,7},{1,7,8},{1,7,8,9},{1,7,8,9,10},{1,7,8,9,10,11},{1,7,8,9,10,11,12},{1,7,8,9,10,11,12,13},{1,7,8,9,10,11,12,13,14},{1,7,8,9,10,11,12,13,14,15},{1,7,8,9,10,11,12,13,15},{1,7,8,9,10,11,12,14},{1,7,8,9,10,11,12,14,15},{1,7,8,9,10,11,12,15},{1,7,8,9,10,11,13},{1,7,8,9,10,11,13,14},{1,7,8,9,10,11,13,14,15},{1,7,8,9,10,11,13,15},{1,7,8,9,10,11,14},{1,7,8,9,10,11,14,15},{1,7,8,9,10,11,15},{1,7,8,9,10,12},{1,7,8,9,10,12,13},{1,7,8,9,10,12,13,14},{1,7,8,9,10,12,13,14,15},{1,7,8,9,10,12,13,15},{1,7,8,9,10,12,14},{1,7,8,9,10,12,14,15},{1,7,8,9,10,12,15},{1,7,8,9,10,13},{1,7,8,9,10,13,14},{1,7,8,9,10,13,14,15},{1,7,8,9,10,13,15},{1,7,8,9,10,14},{1,7,8,9,10,14,15},{1,7,8,9,10,15},{1,7,8,9,11},{1,7,8,9,11,12},{1,7,8,9,11,12,13},{1,7,8,9,11,12,13,14},{1,7,8,9,11,12,13,14,15},{1,7,8,9,11,12,13,15},{1,7,8,9,11,12,14},{1,7,8,9,11,12,14,15},{1,7,8,9,11,12,15},{1,7,8,9,11,13},{1,7,8,9,11,13,14},{1,7,8,9,11,13,14,15},{1,7,8,9,11,13,15},{1,7,8,9,11,14},{1,7,8,9,11,14,15},{1,7,8,9,11,15},{1,7,8,9,12},{1,7,8,9,12,13},{1,7,8,9,12,13,14},{1,7,8,9,12,13,14,15},{1,7,8,9,12,13,15},{1,7,8,9,12,14},{1,7,8,9,12,14,15},{1,7,8,9,12,15},{1,7,8,9,13},{1,7,8,9,13,14},{1,7,8,9,13,14,15},{1,7,8,9,13,15},{1,7,8,9,14},{1,7,8,9,14,15},{1,7,8,9,15},{1,7,8,10},{1,7,8,10,11},{1,7,8,10,11,12},{1,7,8,10,11,12,13},{1,7,8,10,11,12,13,14},{1,7,8,10,11,12,13,14,15},{1,7,8,10,11,12,13,15},{1,7,8,10,11,12,14},{1,7,8,10,11,12,14,15},{1,7,8,10,11,12,15},{1,7,8,10,11,13},{1,7,8,10,11,13,14},{1,7,8,10,11,13,14,15},{1,7,8,10,11,13,15},{1,7,8,10,11,14},{1,7,8,10,11,14,15},{1,7,8,10,11,15},{1,7,8,10,12},{1,7,8,10,12,13},{1,7,8,10,12,13,14},{1,7,8,10,12,13,14,15},{1,7,8,10,12,13,15},{1,7,8,10,12,14},{1,7,8,10,12,14,15},{1,7,8,10,12,15},{1,7,8,10,13},{1,7,8,10,13,14},{1,7,8,10,13,14,15},{1,7,8,10,13,15},{1,7,8,10,14},{1,7,8,10,14,15},{1,7,8,10,15},{1,7,8,11},{1,7,8,11,12},{1,7,8,11,12,13},{1,7,8,11,12,13,14},{1,7,8,11,12,13,14,15},{1,7,8,11,12,13,15},{1,7,8,11,12,14},{1,7,8,11,12,14,15},{1,7,8,11,12,15},{1,7,8,11,13},{1,7,8,11,13,14},{1,7,8,11,13,14,15},{1,7,8,11,13,15},{1,7,8,11,14},{1,7,8,11,14,15},{1,7,8,11,15},{1,7,8,12},{1,7,8,12,13},{1,7,8,12,13,14},{1,7,8,12,13,14,15},{1,7,8,12,13,15},{1,7,8,12,14},{1,7,8,12,14,15},{1,7,8,12,15},{1,7,8,13},{1,7,8,13,14},{1,7,8,13,14,15},{1,7,8,13,15},{1,7,8,14},{1,7,8,14,15},{1,7,8,15},{1,7,9},{1,7,9,10},{1,7,9,10,11},{1,7,9,10,11,12},{1,7,9,10,11,12,13},{1,7,9,10,11,12,13,14},{1,7,9,10,11,12,13,14,15},{1,7,9,10,11,12,13,15},{1,7,9,10,11,12,14},{1,7,9,10,11,12,14,15},{1,7,9,10,11,12,15},{1,7,9,10,11,13},{1,7,9,10,11,13,14},{1,7,9,10,11,13,14,15},{1,7,9,10,11,13,15},{1,7,9,10,11,14},{1,7,9,10,11,14,15},{1,7,9,10,11,15},{1,7,9,10,12},{1,7,9,10,12,13},{1,7,9,10,12,13,14},{1,7,9,10,12,13,14,15},{1,7,9,10,12,13,15},{1,7,9,10,12,14},{1,7,9,10,12,14,15},{1,7,9,10,12,15},{1,7,9,10,13},{1,7,9,10,13,14},{1,7,9,10,13,14,15},{1,7,9,10,13,15},{1,7,9,10,14},{1,7,9,10,14,15},{1,7,9,10,15},{1,7,9,11},{1,7,9,11,12},{1,7,9,11,12,13},{1,7,9,11,12,13,14},{1,7,9,11,12,13,14,15},{1,7,9,11,12,13,15},{1,7,9,11,12,14},{1,7,9,11,12,14,15},{1,7,9,11,12,15},{1,7,9,11,13},{1,7,9,11,13,14},{1,7,9,11,13,14,15},{1,7,9,11,13,15},{1,7,9,11,14},{1,7,9,11,14,15},{1,7,9,11,15},{1,7,9,12},{1,7,9,12,13},{1,7,9,12,13,14},{1,7,9,12,13,14,15},{1,7,9,12,13,15},{1,7,9,12,14},{1,7,9,12,14,15},{1,7,9,12,15},{1,7,9,13},{1,7,9,13,14},{1,7,9,13,14,15},{1,7,9,13,15},{1,7,9,14},{1,7,9,14,15},{1,7,9,15},{1,7,10},{1,7,10,11},{1,7,10,11,12},{1,7,10,11,12,13},{1,7,10,11,12,13,14},{1,7,10,11,12,13,14,15},{1,7,10,11,12,13,15},{1,7,10,11,12,14},{1,7,10,11,12,14,15},{1,7,10,11,12,15},{1,7,10,11,13},{1,7,10,11,13,14},{1,7,10,11,13,14,15},{1,7,10,11,13,15},{1,7,10,11,14},{1,7,10,11,14,15},{1,7,10,11,15},{1,7,10,12},{1,7,10,12,13},{1,7,10,12,13,14},{1,7,10,12,13,14,15},{1,7,10,12,13,15},{1,7,10,12,14},{1,7,10,12,14,15},{1,7,10,12,15},{1,7,10,13},{1,7,10,13,14},{1,7,10,13,14,15},{1,7,10,13,15},{1,7,10,14},{1,7,10,14,15},{1,7,10,15},{1,7,11},{1,7,11,12},{1,7,11,12,13},{1,7,11,12,13,14},{1,7,11,12,13,14,15},{1,7,11,12,13,15},{1,7,11,12,14},{1,7,11,12,14,15},{1,7,11,12,15},{1,7,11,13},{1,7,11,13,14},{1,7,11,13,14,15},{1,7,11,13,15},{1,7,11,14},{1,7,11,14,15},{1,7,11,15},{1,7,12},{1,7,12,13},{1,7,12,13,14},{1,7,12,13,14,15},{1,7,12,13,15},{1,7,12,14},{1,7,12,14,15},{1,7,12,15},{1,7,13},{1,7,13,14},{1,7,13,14,15},{1,7,13,15},{1,7,14},{1,7,14,15},{1,7,15},{1,8},{1,8,9},{1,8,9,10},{1,8,9,10,11},{1,8,9,10,11,12},{1,8,9,10,11,12,13},{1,8,9,10,11,12,13,14},{1,8,9,10,11,12,13,14,15},{1,8,9,10,11,12,13,15},{1,8,9,10,11,12,14},{1,8,9,10,11,12,14,15},{1,8,9,10,11,12,15},{1,8,9,10,11,13},{1,8,9,10,11,13,14},{1,8,9,10,11,13,14,15},{1,8,9,10,11,13,15},{1,8,9,10,11,14},{1,8,9,10,11,14,15},{1,8,9,10,11,15},{1,8,9,10,12},{1,8,9,10,12,13},{1,8,9,10,12,13,14},{1,8,9,10,12,13,14,15},{1,8,9,10,12,13,15},{1,8,9,10,12,14},{1,8,9,10,12,14,15},{1,8,9,10,12,15},{1,8,9,10,13},{1,8,9,10,13,14},{1,8,9,10,13,14,15},{1,8,9,10,13,15},{1,8,9,10,14},{1,8,9,10,14,15},{1,8,9,10,15},{1,8,9,11},{1,8,9,11,12},{1,8,9,11,12,13},{1,8,9,11,12,13,14},{1,8,9,11,12,13,14,15},{1,8,9,11,12,13,15},{1,8,9,11,12,14},{1,8,9,11,12,14,15},{1,8,9,11,12,15},{1,8,9,11,13},{1,8,9,11,13,14},{1,8,9,11,13,14,15},{1,8,9,11,13,15},{1,8,9,11,14},{1,8,9,11,14,15},{1,8,9,11,15},{1,8,9,12},{1,8,9,12,13},{1,8,9,12,13,14},{1,8,9,12,13,14,15},{1,8,9,12,13,15},{1,8,9,12,14},{1,8,9,12,14,15},{1,8,9,12,15},{1,8,9,13},{1,8,9,13,14},{1,8,9,13,14,15},{1,8,9,13,15},{1,8,9,14},{1,8,9,14,15},{1,8,9,15},{1,8,10},{1,8,10,11},{1,8,10,11,12},{1,8,10,11,12,13},{1,8,10,11,12,13,14},{1,8,10,11,12,13,14,15},{1,8,10,11,12,13,15},{1,8,10,11,12,14},{1,8,10,11,12,14,15},{1,8,10,11,12,15},{1,8,10,11,13},{1,8,10,11,13,14},{1,8,10,11,13,14,15},{1,8,10,11,13,15},{1,8,10,11,14},{1,8,10,11,14,15},{1,8,10,11,15},{1,8,10,12},{1,8,10,12,13},{1,8,10,12,13,14},{1,8,10,12,13,14,15},{1,8,10,12,13,15},{1,8,10,12,14},{1,8,10,12,14,15},{1,8,10,12,15},{1,8,10,13},{1,8,10,13,14},{1,8,10,13,14,15},{1,8,10,13,15},{1,8,10,14},{1,8,10,14,15},{1,8,10,15},{1,8,11},{1,8,11,12},{1,8,11,12,13},{1,8,11,12,13,14},{1,8,11,12,13,14,15},{1,8,11,12,13,15},{1,8,11,12,14},{1,8,11,12,14,15},{1,8,11,12,15},{1,8,11,13},{1,8,11,13,14},{1,8,11,13,14,15},{1,8,11,13,15},{1,8,11,14},{1,8,11,14,15},{1,8,11,15},{1,8,12},{1,8,12,13},{1,8,12,13,14},{1,8,12,13,14,15},{1,8,12,13,15},{1,8,12,14},{1,8,12,14,15},{1,8,12,15},{1,8,13},{1,8,13,14},{1,8,13,14,15},{1,8,13,15},{1,8,14},{1,8,14,15},{1,8,15},{1,9},{1,9,10},{1,9,10,11},{1,9,10,11,12},{1,9,10,11,12,13},{1,9,10,11,12,13,14},{1,9,10,11,12,13,14,15},{1,9,10,11,12,13,15},{1,9,10,11,12,14},{1,9,10,11,12,14,15},{1,9,10,11,12,15},{1,9,10,11,13},{1,9,10,11,13,14},{1,9,10,11,13,14,15},{1,9,10,11,13,15},{1,9,10,11,14},{1,9,10,11,14,15},{1,9,10,11,15},{1,9,10,12},{1,9,10,12,13},{1,9,10,12,13,14},{1,9,10,12,13,14,15},{1,9,10,12,13,15},{1,9,10,12,14},{1,9,10,12,14,15},{1,9,10,12,15},{1,9,10,13},{1,9,10,13,14},{1,9,10,13,14,15},{1,9,10,13,15},{1,9,10,14},{1,9,10,14,15},{1,9,10,15},{1,9,11},{1,9,11,12},{1,9,11,12,13},{1,9,11,12,13,14},{1,9,11,12,13,14,15},{1,9,11,12,13,15},{1,9,11,12,14},{1,9,11,12,14,15},{1,9,11,12,15},{1,9,11,13},{1,9,11,13,14},{1,9,11,13,14,15},{1,9,11,13,15},{1,9,11,14},{1,9,11,14,15},{1,9,11,15},{1,9,12},{1,9,12,13},{1,9,12,13,14},{1,9,12,13,14,15},{1,9,12,13,15},{1,9,12,14},{1,9,12,14,15},{1,9,12,15},{1,9,13},{1,9,13,14},{1,9,13,14,15},{1,9,13,15},{1,9,14},{1,9,14,15},{1,9,15},{1,10},{1,10,11},{1,10,11,12},{1,10,11,12,13},{1,10,11,12,13,14},{1,10,11,12,13,14,15},{1,10,11,12,13,15},{1,10,11,12,14},{1,10,11,12,14,15},{1,10,11,12,15},{1,10,11,13},{1,10,11,13,14},{1,10,11,13,14,15},{1,10,11,13,15},{1,10,11,14},{1,10,11,14,15},{1,10,11,15},{1,10,12},{1,10,12,13},{1,10,12,13,14},{1,10,12,13,14,15},{1,10,12,13,15},{1,10,12,14},{1,10,12,14,15},{1,10,12,15},{1,10,13},{1,10,13,14},{1,10,13,14,15},{1,10,13,15},{1,10,14},{1,10,14,15},{1,10,15},{1,11},{1,11,12},{1,11,12,13},{1,11,12,13,14},{1,11,12,13,14,15},{1,11,12,13,15},{1,11,12,14},{1,11,12,14,15},{1,11,12,15},{1,11,13},{1,11,13,14},{1,11,13,14,15},{1,11,13,15},{1,11,14},{1,11,14,15},{1,11,15},{1,12},{1,12,13},{1,12,13,14},{1,12,13,14,15},{1,12,13,15},{1,12,14},{1,12,14,15},{1,12,15},{1,13},{1,13,14},{1,13,14,15},{1,13,15},{1,14},{1,14,15},{1,15},{2,3},{2,3,4},{2,3,4,5},{2,3,4,5,6},{2,3,4,5,6,7},{2,3,4,5,6,7,8},{2,3,4,5,6,7,8,9},{2,3,4,5,6,7,8,9,10},{2,3,4,5,6,7,8,9,10,11},{2,3,4,5,6,7,8,9,10,11,12},{2,3,4,5,6,7,8,9,10,11,12,13},{2,3,4,5,6,7,8,9,10,11,12,13,14},{2,3,4,5,6,7,8,9,10,11,12,13,14,15},{2,3,4,5,6,7,8,9,10,11,12,13,15},{2,3,4,5,6,7,8,9,10,11,12,14},{2,3,4,5,6,7,8,9,10,11,12,14,15},{2,3,4,5,6,7,8,9,10,11,12,15},{2,3,4,5,6,7,8,9,10,11,13},{2,3,4,5,6,7,8,9,10,11,13,14},{2,3,4,5,6,7,8,9,10,11,13,14,15},{2,3,4,5,6,7,8,9,10,11,13,15},{2,3,4,5,6,7,8,9,10,11,14},{2,3,4,5,6,7,8,9,10,11,14,15},{2,3,4,5,6,7,8,9,10,11,15},{2,3,4,5,6,7,8,9,10,12},{2,3,4,5,6,7,8,9,10,12,13},{2,3,4,5,6,7,8,9,10,12,13,14},{2,3,4,5,6,7,8,9,10,12,13,14,15},{2,3,4,5,6,7,8,9,10,12,13,15},{2,3,4,5,6,7,8,9,10,12,14},{2,3,4,5,6,7,8,9,10,12,14,15},{2,3,4,5,6,7,8,9,10,12,15},{2,3,4,5,6,7,8,9,10,13},{2,3,4,5,6,7,8,9,10,13,14},{2,3,4,5,6,7,8,9,10,13,14,15},{2,3,4,5,6,7,8,9,10,13,15},{2,3,4,5,6,7,8,9,10,14},{2,3,4,5,6,7,8,9,10,14,15},{2,3,4,5,6,7,8,9,10,15},{2,3,4,5,6,7,8,9,11},{2,3,4,5,6,7,8,9,11,12},{2,3,4,5,6,7,8,9,11,12,13},{2,3,4,5,6,7,8,9,11,12,13,14},{2,3,4,5,6,7,8,9,11,12,13,14,15},{2,3,4,5,6,7,8,9,11,12,13,15},{2,3,4,5,6,7,8,9,11,12,14},{2,3,4,5,6,7,8,9,11,12,14,15},{2,3,4,5,6,7,8,9,11,12,15},{2,3,4,5,6,7,8,9,11,13},{2,3,4,5,6,7,8,9,11,13,14},{2,3,4,5,6,7,8,9,11,13,14,15},{2,3,4,5,6,7,8,9,11,13,15},{2,3,4,5,6,7,8,9,11,14},{2,3,4,5,6,7,8,9,11,14,15},{2,3,4,5,6,7,8,9,11,15},{2,3,4,5,6,7,8,9,12},{2,3,4,5,6,7,8,9,12,13},{2,3,4,5,6,7,8,9,12,13,14},{2,3,4,5,6,7,8,9,12,13,14,15},{2,3,4,5,6,7,8,9,12,13,15},{2,3,4,5,6,7,8,9,12,14},{2,3,4,5,6,7,8,9,12,14,15},{2,3,4,5,6,7,8,9,12,15},{2,3,4,5,6,7,8,9,13},{2,3,4,5,6,7,8,9,13,14},{2,3,4,5,6,7,8,9,13,14,15},{2,3,4,5,6,7,8,9,13,15},{2,3,4,5,6,7,8,9,14},{2,3,4,5,6,7,8,9,14,15},{2,3,4,5,6,7,8,9,15},{2,3,4,5,6,7,8,10},{2,3,4,5,6,7,8,10,11},{2,3,4,5,6,7,8,10,11,12},{2,3,4,5,6,7,8,10,11,12,13},{2,3,4,5,6,7,8,10,11,12,13,14},{2,3,4,5,6,7,8,10,11,12,13,14,15},{2,3,4,5,6,7,8,10,11,12,13,15},{2,3,4,5,6,7,8,10,11,12,14},{2,3,4,5,6,7,8,10,11,12,14,15},{2,3,4,5,6,7,8,10,11,12,15},{2,3,4,5,6,7,8,10,11,13},{2,3,4,5,6,7,8,10,11,13,14},{2,3,4,5,6,7,8,10,11,13,14,15},{2,3,4,5,6,7,8,10,11,13,15},{2,3,4,5,6,7,8,10,11,14},{2,3,4,5,6,7,8,10,11,14,15},{2,3,4,5,6,7,8,10,11,15},{2,3,4,5,6,7,8,10,12},{2,3,4,5,6,7,8,10,12,13},{2,3,4,5,6,7,8,10,12,13,14},{2,3,4,5,6,7,8,10,12,13,14,15},{2,3,4,5,6,7,8,10,12,13,15},{2,3,4,5,6,7,8,10,12,14},{2,3,4,5,6,7,8,10,12,14,15},{2,3,4,5,6,7,8,10,12,15},{2,3,4,5,6,7,8,10,13},{2,3,4,5,6,7,8,10,13,14},{2,3,4,5,6,7,8,10,13,14,15},{2,3,4,5,6,7,8,10,13,15},{2,3,4,5,6,7,8,10,14},{2,3,4,5,6,7,8,10,14,15},{2,3,4,5,6,7,8,10,15},{2,3,4,5,6,7,8,11},{2,3,4,5,6,7,8,11,12},{2,3,4,5,6,7,8,11,12,13},{2,3,4,5,6,7,8,11,12,13,14},{2,3,4,5,6,7,8,11,12,13,14,15},{2,3,4,5,6,7,8,11,12,13,15},{2,3,4,5,6,7,8,11,12,14},{2,3,4,5,6,7,8,11,12,14,15},{2,3,4,5,6,7,8,11,12,15},{2,3,4,5,6,7,8,11,13},{2,3,4,5,6,7,8,11,13,14},{2,3,4,5,6,7,8,11,13,14,15},{2,3,4,5,6,7,8,11,13,15},{2,3,4,5,6,7,8,11,14},{2,3,4,5,6,7,8,11,14,15},{2,3,4,5,6,7,8,11,15},{2,3,4,5,6,7,8,12},{2,3,4,5,6,7,8,12,13},{2,3,4,5,6,7,8,12,13,14},{2,3,4,5,6,7,8,12,13,14,15},{2,3,4,5,6,7,8,12,13,15},{2,3,4,5,6,7,8,12,14},{2,3,4,5,6,7,8,12,14,15},{2,3,4,5,6,7,8,12,15},{2,3,4,5,6,7,8,13},{2,3,4,5,6,7,8,13,14},{2,3,4,5,6,7,8,13,14,15},{2,3,4,5,6,7,8,13,15},{2,3,4,5,6,7,8,14},{2,3,4,5,6,7,8,14,15},{2,3,4,5,6,7,8,15},{2,3,4,5,6,7,9},{2,3,4,5,6,7,9,10},{2,3,4,5,6,7,9,10,11},{2,3,4,5,6,7,9,10,11,12},{2,3,4,5,6,7,9,10,11,12,13},{2,3,4,5,6,7,9,10,11,12,13,14},{2,3,4,5,6,7,9,10,11,12,13,14,15},{2,3,4,5,6,7,9,10,11,12,13,15},{2,3,4,5,6,7,9,10,11,12,14},{2,3,4,5,6,7,9,10,11,12,14,15},{2,3,4,5,6,7,9,10,11,12,15},{2,3,4,5,6,7,9,10,11,13},{2,3,4,5,6,7,9,10,11,13,14},{2,3,4,5,6,7,9,10,11,13,14,15},{2,3,4,5,6,7,9,10,11,13,15},{2,3,4,5,6,7,9,10,11,14},{2,3,4,5,6,7,9,10,11,14,15},{2,3,4,5,6,7,9,10,11,15},{2,3,4,5,6,7,9,10,12},{2,3,4,5,6,7,9,10,12,13},{2,3,4,5,6,7,9,10,12,13,14},{2,3,4,5,6,7,9,10,12,13,14,15},{2,3,4,5,6,7,9,10,12,13,15},{2,3,4,5,6,7,9,10,12,14},{2,3,4,5,6,7,9,10,12,14,15},{2,3,4,5,6,7,9,10,12,15},{2,3,4,5,6,7,9,10,13},{2,3,4,5,6,7,9,10,13,14},{2,3,4,5,6,7,9,10,13,14,15},{2,3,4,5,6,7,9,10,13,15},{2,3,4,5,6,7,9,10,14},{2,3,4,5,6,7,9,10,14,15},{2,3,4,5,6,7,9,10,15},{2,3,4,5,6,7,9,11},{2,3,4,5,6,7,9,11,12},{2,3,4,5,6,7,9,11,12,13},{2,3,4,5,6,7,9,11,12,13,14},{2,3,4,5,6,7,9,11,12,13,14,15},{2,3,4,5,6,7,9,11,12,13,15},{2,3,4,5,6,7,9,11,12,14},{2,3,4,5,6,7,9,11,12,14,15},{2,3,4,5,6,7,9,11,12,15},{2,3,4,5,6,7,9,11,13},{2,3,4,5,6,7,9,11,13,14},{2,3,4,5,6,7,9,11,13,14,15},{2,3,4,5,6,7,9,11,13,15},{2,3,4,5,6,7,9,11,14},{2,3,4,5,6,7,9,11,14,15},{2,3,4,5,6,7,9,11,15},{2,3,4,5,6,7,9,12},{2,3,4,5,6,7,9,12,13},{2,3,4,5,6,7,9,12,13,14},{2,3,4,5,6,7,9,12,13,14,15},{2,3,4,5,6,7,9,12,13,15},{2,3,4,5,6,7,9,12,14},{2,3,4,5,6,7,9,12,14,15},{2,3,4,5,6,7,9,12,15},{2,3,4,5,6,7,9,13},{2,3,4,5,6,7,9,13,14},{2,3,4,5,6,7,9,13,14,15},{2,3,4,5,6,7,9,13,15},{2,3,4,5,6,7,9,14},{2,3,4,5,6,7,9,14,15},{2,3,4,5,6,7,9,15},{2,3,4,5,6,7,10},{2,3,4,5,6,7,10,11},{2,3,4,5,6,7,10,11,12},{2,3,4,5,6,7,10,11,12,13},{2,3,4,5,6,7,10,11,12,13,14},{2,3,4,5,6,7,10,11,12,13,14,15},{2,3,4,5,6,7,10,11,12,13,15},{2,3,4,5,6,7,10,11,12,14},{2,3,4,5,6,7,10,11,12,14,15},{2,3,4,5,6,7,10,11,12,15},{2,3,4,5,6,7,10,11,13},{2,3,4,5,6,7,10,11,13,14},{2,3,4,5,6,7,10,11,13,14,15},{2,3,4,5,6,7,10,11,13,15},{2,3,4,5,6,7,10,11,14},{2,3,4,5,6,7,10,11,14,15},{2,3,4,5,6,7,10,11,15},{2,3,4,5,6,7,10,12},{2,3,4,5,6,7,10,12,13},{2,3,4,5,6,7,10,12,13,14},{2,3,4,5,6,7,10,12,13,14,15},{2,3,4,5,6,7,10,12,13,15},{2,3,4,5,6,7,10,12,14},{2,3,4,5,6,7,10,12,14,15},{2,3,4,5,6,7,10,12,15},{2,3,4,5,6,7,10,13},{2,3,4,5,6,7,10,13,14},{2,3,4,5,6,7,10,13,14,15},{2,3,4,5,6,7,10,13,15},{2,3,4,5,6,7,10,14},{2,3,4,5,6,7,10,14,15},{2,3,4,5,6,7,10,15},{2,3,4,5,6,7,11},{2,3,4,5,6,7,11,12},{2,3,4,5,6,7,11,12,13},{2,3,4,5,6,7,11,12,13,14},{2,3,4,5,6,7,11,12,13,14,15},{2,3,4,5,6,7,11,12,13,15},{2,3,4,5,6,7,11,12,14},{2,3,4,5,6,7,11,12,14,15},{2,3,4,5,6,7,11,12,15},{2,3,4,5,6,7,11,13},{2,3,4,5,6,7,11,13,14},{2,3,4,5,6,7,11,13,14,15},{2,3,4,5,6,7,11,13,15},{2,3,4,5,6,7,11,14},{2,3,4,5,6,7,11,14,15},{2,3,4,5,6,7,11,15},{2,3,4,5,6,7,12},{2,3,4,5,6,7,12,13},{2,3,4,5,6,7,12,13,14},{2,3,4,5,6,7,12,13,14,15},{2,3,4,5,6,7,12,13,15},{2,3,4,5,6,7,12,14},{2,3,4,5,6,7,12,14,15},{2,3,4,5,6,7,12,15},{2,3,4,5,6,7,13},{2,3,4,5,6,7,13,14},{2,3,4,5,6,7,13,14,15},{2,3,4,5,6,7,13,15},{2,3,4,5,6,7,14},{2,3,4,5,6,7,14,15},{2,3,4,5,6,7,15},{2,3,4,5,6,8},{2,3,4,5,6,8,9},{2,3,4,5,6,8,9,10},{2,3,4,5,6,8,9,10,11},{2,3,4,5,6,8,9,10,11,12},{2,3,4,5,6,8,9,10,11,12,13},{2,3,4,5,6,8,9,10,11,12,13,14},{2,3,4,5,6,8,9,10,11,12,13,14,15},{2,3,4,5,6,8,9,10,11,12,13,15},{2,3,4,5,6,8,9,10,11,12,14},{2,3,4,5,6,8,9,10,11,12,14,15},{2,3,4,5,6,8,9,10,11,12,15},{2,3,4,5,6,8,9,10,11,13},{2,3,4,5,6,8,9,10,11,13,14},{2,3,4,5,6,8,9,10,11,13,14,15},{2,3,4,5,6,8,9,10,11,13,15},{2,3,4,5,6,8,9,10,11,14},{2,3,4,5,6,8,9,10,11,14,15},{2,3,4,5,6,8,9,10,11,15},{2,3,4,5,6,8,9,10,12},{2,3,4,5,6,8,9,10,12,13},{2,3,4,5,6,8,9,10,12,13,14},{2,3,4,5,6,8,9,10,12,13,14,15},{2,3,4,5,6,8,9,10,12,13,15},{2,3,4,5,6,8,9,10,12,14},{2,3,4,5,6,8,9,10,12,14,15},{2,3,4,5,6,8,9,10,12,15},{2,3,4,5,6,8,9,10,13},{2,3,4,5,6,8,9,10,13,14},{2,3,4,5,6,8,9,10,13,14,15},{2,3,4,5,6,8,9,10,13,15},{2,3,4,5,6,8,9,10,14},{2,3,4,5,6,8,9,10,14,15},{2,3,4,5,6,8,9,10,15},{2,3,4,5,6,8,9,11},{2,3,4,5,6,8,9,11,12},{2,3,4,5,6,8,9,11,12,13},{2,3,4,5,6,8,9,11,12,13,14},{2,3,4,5,6,8,9,11,12,13,14,15},{2,3,4,5,6,8,9,11,12,13,15},{2,3,4,5,6,8,9,11,12,14},{2,3,4,5,6,8,9,11,12,14,15},{2,3,4,5,6,8,9,11,12,15},{2,3,4,5,6,8,9,11,13},{2,3,4,5,6,8,9,11,13,14},{2,3,4,5,6,8,9,11,13,14,15},{2,3,4,5,6,8,9,11,13,15},{2,3,4,5,6,8,9,11,14},{2,3,4,5,6,8,9,11,14,15},{2,3,4,5,6,8,9,11,15},{2,3,4,5,6,8,9,12},{2,3,4,5,6,8,9,12,13},{2,3,4,5,6,8,9,12,13,14},{2,3,4,5,6,8,9,12,13,14,15},{2,3,4,5,6,8,9,12,13,15},{2,3,4,5,6,8,9,12,14},{2,3,4,5,6,8,9,12,14,15},{2,3,4,5,6,8,9,12,15},{2,3,4,5,6,8,9,13},{2,3,4,5,6,8,9,13,14},{2,3,4,5,6,8,9,13,14,15},{2,3,4,5,6,8,9,13,15},{2,3,4,5,6,8,9,14},{2,3,4,5,6,8,9,14,15},{2,3,4,5,6,8,9,15},{2,3,4,5,6,8,10},{2,3,4,5,6,8,10,11},{2,3,4,5,6,8,10,11,12},{2,3,4,5,6,8,10,11,12,13},{2,3,4,5,6,8,10,11,12,13,14},{2,3,4,5,6,8,10,11,12,13,14,15},{2,3,4,5,6,8,10,11,12,13,15},{2,3,4,5,6,8,10,11,12,14},{2,3,4,5,6,8,10,11,12,14,15},{2,3,4,5,6,8,10,11,12,15},{2,3,4,5,6,8,10,11,13},{2,3,4,5,6,8,10,11,13,14},{2,3,4,5,6,8,10,11,13,14,15},{2,3,4,5,6,8,10,11,13,15},{2,3,4,5,6,8,10,11,14},{2,3,4,5,6,8,10,11,14,15},{2,3,4,5,6,8,10,11,15},{2,3,4,5,6,8,10,12},{2,3,4,5,6,8,10,12,13},{2,3,4,5,6,8,10,12,13,14},{2,3,4,5,6,8,10,12,13,14,15},{2,3,4,5,6,8,10,12,13,15},{2,3,4,5,6,8,10,12,14},{2,3,4,5,6,8,10,12,14,15},{2,3,4,5,6,8,10,12,15},{2,3,4,5,6,8,10,13},{2,3,4,5,6,8,10,13,14},{2,3,4,5,6,8,10,13,14,15},{2,3,4,5,6,8,10,13,15},{2,3,4,5,6,8,10,14},{2,3,4,5,6,8,10,14,15},{2,3,4,5,6,8,10,15},{2,3,4,5,6,8,11},{2,3,4,5,6,8,11,12},{2,3,4,5,6,8,11,12,13},{2,3,4,5,6,8,11,12,13,14},{2,3,4,5,6,8,11,12,13,14,15},{2,3,4,5,6,8,11,12,13,15},{2,3,4,5,6,8,11,12,14},{2,3,4,5,6,8,11,12,14,15},{2,3,4,5,6,8,11,12,15},{2,3,4,5,6,8,11,13},{2,3,4,5,6,8,11,13,14},{2,3,4,5,6,8,11,13,14,15},{2,3,4,5,6,8,11,13,15},{2,3,4,5,6,8,11,14},{2,3,4,5,6,8,11,14,15},{2,3,4,5,6,8,11,15},{2,3,4,5,6,8,12},{2,3,4,5,6,8,12,13},{2,3,4,5,6,8,12,13,14},{2,3,4,5,6,8,12,13,14,15},{2,3,4,5,6,8,12,13,15},{2,3,4,5,6,8,12,14},{2,3,4,5,6,8,12,14,15},{2,3,4,5,6,8,12,15},{2,3,4,5,6,8,13},{2,3,4,5,6,8,13,14},{2,3,4,5,6,8,13,14,15},{2,3,4,5,6,8,13,15},{2,3,4,5,6,8,14},{2,3,4,5,6,8,14,15},{2,3,4,5,6,8,15},{2,3,4,5,6,9},{2,3,4,5,6,9,10},{2,3,4,5,6,9,10,11},{2,3,4,5,6,9,10,11,12},{2,3,4,5,6,9,10,11,12,13},{2,3,4,5,6,9,10,11,12,13,14},{2,3,4,5,6,9,10,11,12,13,14,15},{2,3,4,5,6,9,10,11,12,13,15},{2,3,4,5,6,9,10,11,12,14},{2,3,4,5,6,9,10,11,12,14,15},{2,3,4,5,6,9,10,11,12,15},{2,3,4,5,6,9,10,11,13},{2,3,4,5,6,9,10,11,13,14},{2,3,4,5,6,9,10,11,13,14,15},{2,3,4,5,6,9,10,11,13,15},{2,3,4,5,6,9,10,11,14},{2,3,4,5,6,9,10,11,14,15},{2,3,4,5,6,9,10,11,15},{2,3,4,5,6,9,10,12},{2,3,4,5,6,9,10,12,13},{2,3,4,5,6,9,10,12,13,14},{2,3,4,5,6,9,10,12,13,14,15},{2,3,4,5,6,9,10,12,13,15},{2,3,4,5,6,9,10,12,14},{2,3,4,5,6,9,10,12,14,15},{2,3,4,5,6,9,10,12,15},{2,3,4,5,6,9,10,13},{2,3,4,5,6,9,10,13,14},{2,3,4,5,6,9,10,13,14,15},{2,3,4,5,6,9,10,13,15},{2,3,4,5,6,9,10,14},{2,3,4,5,6,9,10,14,15},{2,3,4,5,6,9,10,15},{2,3,4,5,6,9,11},{2,3,4,5,6,9,11,12},{2,3,4,5,6,9,11,12,13},{2,3,4,5,6,9,11,12,13,14},{2,3,4,5,6,9,11,12,13,14,15},{2,3,4,5,6,9,11,12,13,15},{2,3,4,5,6,9,11,12,14},{2,3,4,5,6,9,11,12,14,15},{2,3,4,5,6,9,11,12,15},{2,3,4,5,6,9,11,13},{2,3,4,5,6,9,11,13,14},{2,3,4,5,6,9,11,13,14,15},{2,3,4,5,6,9,11,13,15},{2,3,4,5,6,9,11,14},{2,3,4,5,6,9,11,14,15},{2,3,4,5,6,9,11,15},{2,3,4,5,6,9,12},{2,3,4,5,6,9,12,13},{2,3,4,5,6,9,12,13,14},{2,3,4,5,6,9,12,13,14,15},{2,3,4,5,6,9,12,13,15},{2,3,4,5,6,9,12,14},{2,3,4,5,6,9,12,14,15},{2,3,4,5,6,9,12,15},{2,3,4,5,6,9,13},{2,3,4,5,6,9,13,14},{2,3,4,5,6,9,13,14,15},{2,3,4,5,6,9,13,15},{2,3,4,5,6,9,14},{2,3,4,5,6,9,14,15},{2,3,4,5,6,9,15},{2,3,4,5,6,10},{2,3,4,5,6,10,11},{2,3,4,5,6,10,11,12},{2,3,4,5,6,10,11,12,13},{2,3,4,5,6,10,11,12,13,14},{2,3,4,5,6,10,11,12,13,14,15},{2,3,4,5,6,10,11,12,13,15},{2,3,4,5,6,10,11,12,14},{2,3,4,5,6,10,11,12,14,15},{2,3,4,5,6,10,11,12,15},{2,3,4,5,6,10,11,13},{2,3,4,5,6,10,11,13,14},{2,3,4,5,6,10,11,13,14,15},{2,3,4,5,6,10,11,13,15},{2,3,4,5,6,10,11,14},{2,3,4,5,6,10,11,14,15},{2,3,4,5,6,10,11,15},{2,3,4,5,6,10,12},{2,3,4,5,6,10,12,13},{2,3,4,5,6,10,12,13,14},{2,3,4,5,6,10,12,13,14,15},{2,3,4,5,6,10,12,13,15},{2,3,4,5,6,10,12,14},{2,3,4,5,6,10,12,14,15},{2,3,4,5,6,10,12,15},{2,3,4,5,6,10,13},{2,3,4,5,6,10,13,14},{2,3,4,5,6,10,13,14,15},{2,3,4,5,6,10,13,15},{2,3,4,5,6,10,14},{2,3,4,5,6,10,14,15},{2,3,4,5,6,10,15},{2,3,4,5,6,11},{2,3,4,5,6,11,12},{2,3,4,5,6,11,12,13},{2,3,4,5,6,11,12,13,14},{2,3,4,5,6,11,12,13,14,15},{2,3,4,5,6,11,12,13,15},{2,3,4,5,6,11,12,14},{2,3,4,5,6,11,12,14,15},{2,3,4,5,6,11,12,15},{2,3,4,5,6,11,13},{2,3,4,5,6,11,13,14},{2,3,4,5,6,11,13,14,15},{2,3,4,5,6,11,13,15},{2,3,4,5,6,11,14},{2,3,4,5,6,11,14,15},{2,3,4,5,6,11,15},{2,3,4,5,6,12},{2,3,4,5,6,12,13},{2,3,4,5,6,12,13,14},{2,3,4,5,6,12,13,14,15},{2,3,4,5,6,12,13,15},{2,3,4,5,6,12,14},{2,3,4,5,6,12,14,15},{2,3,4,5,6,12,15},{2,3,4,5,6,13},{2,3,4,5,6,13,14},{2,3,4,5,6,13,14,15},{2,3,4,5,6,13,15},{2,3,4,5,6,14},{2,3,4,5,6,14,15},{2,3,4,5,6,15},{2,3,4,5,7},{2,3,4,5,7,8},{2,3,4,5,7,8,9},{2,3,4,5,7,8,9,10},{2,3,4,5,7,8,9,10,11},{2,3,4,5,7,8,9,10,11,12},{2,3,4,5,7,8,9,10,11,12,13},{2,3,4,5,7,8,9,10,11,12,13,14},{2,3,4,5,7,8,9,10,11,12,13,14,15},{2,3,4,5,7,8,9,10,11,12,13,15},{2,3,4,5,7,8,9,10,11,12,14},{2,3,4,5,7,8,9,10,11,12,14,15},{2,3,4,5,7,8,9,10,11,12,15},{2,3,4,5,7,8,9,10,11,13},{2,3,4,5,7,8,9,10,11,13,14},{2,3,4,5,7,8,9,10,11,13,14,15},{2,3,4,5,7,8,9,10,11,13,15},{2,3,4,5,7,8,9,10,11,14},{2,3,4,5,7,8,9,10,11,14,15},{2,3,4,5,7,8,9,10,11,15},{2,3,4,5,7,8,9,10,12},{2,3,4,5,7,8,9,10,12,13},{2,3,4,5,7,8,9,10,12,13,14},{2,3,4,5,7,8,9,10,12,13,14,15},{2,3,4,5,7,8,9,10,12,13,15},{2,3,4,5,7,8,9,10,12,14},{2,3,4,5,7,8,9,10,12,14,15},{2,3,4,5,7,8,9,10,12,15},{2,3,4,5,7,8,9,10,13},{2,3,4,5,7,8,9,10,13,14},{2,3,4,5,7,8,9,10,13,14,15},{2,3,4,5,7,8,9,10,13,15},{2,3,4,5,7,8,9,10,14},{2,3,4,5,7,8,9,10,14,15},{2,3,4,5,7,8,9,10,15},{2,3,4,5,7,8,9,11},{2,3,4,5,7,8,9,11,12},{2,3,4,5,7,8,9,11,12,13},{2,3,4,5,7,8,9,11,12,13,14},{2,3,4,5,7,8,9,11,12,13,14,15},{2,3,4,5,7,8,9,11,12,13,15},{2,3,4,5,7,8,9,11,12,14},{2,3,4,5,7,8,9,11,12,14,15},{2,3,4,5,7,8,9,11,12,15},{2,3,4,5,7,8,9,11,13},{2,3,4,5,7,8,9,11,13,14},{2,3,4,5,7,8,9,11,13,14,15},{2,3,4,5,7,8,9,11,13,15},{2,3,4,5,7,8,9,11,14},{2,3,4,5,7,8,9,11,14,15},{2,3,4,5,7,8,9,11,15},{2,3,4,5,7,8,9,12},{2,3,4,5,7,8,9,12,13},{2,3,4,5,7,8,9,12,13,14},{2,3,4,5,7,8,9,12,13,14,15},{2,3,4,5,7,8,9,12,13,15},{2,3,4,5,7,8,9,12,14},{2,3,4,5,7,8,9,12,14,15},{2,3,4,5,7,8,9,12,15},{2,3,4,5,7,8,9,13},{2,3,4,5,7,8,9,13,14},{2,3,4,5,7,8,9,13,14,15},{2,3,4,5,7,8,9,13,15},{2,3,4,5,7,8,9,14},{2,3,4,5,7,8,9,14,15},{2,3,4,5,7,8,9,15},{2,3,4,5,7,8,10},{2,3,4,5,7,8,10,11},{2,3,4,5,7,8,10,11,12},{2,3,4,5,7,8,10,11,12,13},{2,3,4,5,7,8,10,11,12,13,14},{2,3,4,5,7,8,10,11,12,13,14,15},{2,3,4,5,7,8,10,11,12,13,15},{2,3,4,5,7,8,10,11,12,14},{2,3,4,5,7,8,10,11,12,14,15},{2,3,4,5,7,8,10,11,12,15},{2,3,4,5,7,8,10,11,13},{2,3,4,5,7,8,10,11,13,14},{2,3,4,5,7,8,10,11,13,14,15},{2,3,4,5,7,8,10,11,13,15},{2,3,4,5,7,8,10,11,14},{2,3,4,5,7,8,10,11,14,15},{2,3,4,5,7,8,10,11,15},{2,3,4,5,7,8,10,12},{2,3,4,5,7,8,10,12,13},{2,3,4,5,7,8,10,12,13,14},{2,3,4,5,7,8,10,12,13,14,15},{2,3,4,5,7,8,10,12,13,15},{2,3,4,5,7,8,10,12,14},{2,3,4,5,7,8,10,12,14,15},{2,3,4,5,7,8,10,12,15},{2,3,4,5,7,8,10,13},{2,3,4,5,7,8,10,13,14},{2,3,4,5,7,8,10,13,14,15},{2,3,4,5,7,8,10,13,15},{2,3,4,5,7,8,10,14},{2,3,4,5,7,8,10,14,15},{2,3,4,5,7,8,10,15},{2,3,4,5,7,8,11},{2,3,4,5,7,8,11,12},{2,3,4,5,7,8,11,12,13},{2,3,4,5,7,8,11,12,13,14},{2,3,4,5,7,8,11,12,13,14,15},{2,3,4,5,7,8,11,12,13,15},{2,3,4,5,7,8,11,12,14},{2,3,4,5,7,8,11,12,14,15},{2,3,4,5,7,8,11,12,15},{2,3,4,5,7,8,11,13},{2,3,4,5,7,8,11,13,14},{2,3,4,5,7,8,11,13,14,15},{2,3,4,5,7,8,11,13,15},{2,3,4,5,7,8,11,14},{2,3,4,5,7,8,11,14,15},{2,3,4,5,7,8,11,15},{2,3,4,5,7,8,12},{2,3,4,5,7,8,12,13},{2,3,4,5,7,8,12,13,14},{2,3,4,5,7,8,12,13,14,15},{2,3,4,5,7,8,12,13,15},{2,3,4,5,7,8,12,14},{2,3,4,5,7,8,12,14,15},{2,3,4,5,7,8,12,15},{2,3,4,5,7,8,13},{2,3,4,5,7,8,13,14},{2,3,4,5,7,8,13,14,15},{2,3,4,5,7,8,13,15},{2,3,4,5,7,8,14},{2,3,4,5,7,8,14,15},{2,3,4,5,7,8,15},{2,3,4,5,7,9},{2,3,4,5,7,9,10},{2,3,4,5,7,9,10,11},{2,3,4,5,7,9,10,11,12},{2,3,4,5,7,9,10,11,12,13},{2,3,4,5,7,9,10,11,12,13,14},{2,3,4,5,7,9,10,11,12,13,14,15},{2,3,4,5,7,9,10,11,12,13,15},{2,3,4,5,7,9,10,11,12,14},{2,3,4,5,7,9,10,11,12,14,15},{2,3,4,5,7,9,10,11,12,15},{2,3,4,5,7,9,10,11,13},{2,3,4,5,7,9,10,11,13,14},{2,3,4,5,7,9,10,11,13,14,15},{2,3,4,5,7,9,10,11,13,15},{2,3,4,5,7,9,10,11,14},{2,3,4,5,7,9,10,11,14,15},{2,3,4,5,7,9,10,11,15},{2,3,4,5,7,9,10,12},{2,3,4,5,7,9,10,12,13},{2,3,4,5,7,9,10,12,13,14},{2,3,4,5,7,9,10,12,13,14,15},{2,3,4,5,7,9,10,12,13,15},{2,3,4,5,7,9,10,12,14},{2,3,4,5,7,9,10,12,14,15},{2,3,4,5,7,9,10,12,15},{2,3,4,5,7,9,10,13},{2,3,4,5,7,9,10,13,14},{2,3,4,5,7,9,10,13,14,15},{2,3,4,5,7,9,10,13,15},{2,3,4,5,7,9,10,14},{2,3,4,5,7,9,10,14,15},{2,3,4,5,7,9,10,15},{2,3,4,5,7,9,11},{2,3,4,5,7,9,11,12},{2,3,4,5,7,9,11,12,13},{2,3,4,5,7,9,11,12,13,14},{2,3,4,5,7,9,11,12,13,14,15},{2,3,4,5,7,9,11,12,13,15},{2,3,4,5,7,9,11,12,14},{2,3,4,5,7,9,11,12,14,15},{2,3,4,5,7,9,11,12,15},{2,3,4,5,7,9,11,13},{2,3,4,5,7,9,11,13,14},{2,3,4,5,7,9,11,13,14,15},{2,3,4,5,7,9,11,13,15},{2,3,4,5,7,9,11,14},{2,3,4,5,7,9,11,14,15},{2,3,4,5,7,9,11,15},{2,3,4,5,7,9,12},{2,3,4,5,7,9,12,13},{2,3,4,5,7,9,12,13,14},{2,3,4,5,7,9,12,13,14,15},{2,3,4,5,7,9,12,13,15},{2,3,4,5,7,9,12,14},{2,3,4,5,7,9,12,14,15},{2,3,4,5,7,9,12,15},{2,3,4,5,7,9,13},{2,3,4,5,7,9,13,14},{2,3,4,5,7,9,13,14,15},{2,3,4,5,7,9,13,15},{2,3,4,5,7,9,14},{2,3,4,5,7,9,14,15},{2,3,4,5,7,9,15},{2,3,4,5,7,10},{2,3,4,5,7,10,11},{2,3,4,5,7,10,11,12},{2,3,4,5,7,10,11,12,13},{2,3,4,5,7,10,11,12,13,14},{2,3,4,5,7,10,11,12,13,14,15},{2,3,4,5,7,10,11,12,13,15},{2,3,4,5,7,10,11,12,14},{2,3,4,5,7,10,11,12,14,15},{2,3,4,5,7,10,11,12,15},{2,3,4,5,7,10,11,13},{2,3,4,5,7,10,11,13,14},{2,3,4,5,7,10,11,13,14,15},{2,3,4,5,7,10,11,13,15},{2,3,4,5,7,10,11,14},{2,3,4,5,7,10,11,14,15},{2,3,4,5,7,10,11,15},{2,3,4,5,7,10,12},{2,3,4,5,7,10,12,13},{2,3,4,5,7,10,12,13,14},{2,3,4,5,7,10,12,13,14,15},{2,3,4,5,7,10,12,13,15},{2,3,4,5,7,10,12,14},{2,3,4,5,7,10,12,14,15},{2,3,4,5,7,10,12,15},{2,3,4,5,7,10,13},{2,3,4,5,7,10,13,14},{2,3,4,5,7,10,13,14,15},{2,3,4,5,7,10,13,15},{2,3,4,5,7,10,14},{2,3,4,5,7,10,14,15},{2,3,4,5,7,10,15},{2,3,4,5,7,11},{2,3,4,5,7,11,12},{2,3,4,5,7,11,12,13},{2,3,4,5,7,11,12,13,14},{2,3,4,5,7,11,12,13,14,15},{2,3,4,5,7,11,12,13,15},{2,3,4,5,7,11,12,14},{2,3,4,5,7,11,12,14,15},{2,3,4,5,7,11,12,15},{2,3,4,5,7,11,13},{2,3,4,5,7,11,13,14},{2,3,4,5,7,11,13,14,15},{2,3,4,5,7,11,13,15},{2,3,4,5,7,11,14},{2,3,4,5,7,11,14,15},{2,3,4,5,7,11,15},{2,3,4,5,7,12},{2,3,4,5,7,12,13},{2,3,4,5,7,12,13,14},{2,3,4,5,7,12,13,14,15},{2,3,4,5,7,12,13,15},{2,3,4,5,7,12,14},{2,3,4,5,7,12,14,15},{2,3,4,5,7,12,15},{2,3,4,5,7,13},{2,3,4,5,7,13,14},{2,3,4,5,7,13,14,15},{2,3,4,5,7,13,15},{2,3,4,5,7,14},{2,3,4,5,7,14,15},{2,3,4,5,7,15},{2,3,4,5,8},{2,3,4,5,8,9},{2,3,4,5,8,9,10},{2,3,4,5,8,9,10,11},{2,3,4,5,8,9,10,11,12},{2,3,4,5,8,9,10,11,12,13},{2,3,4,5,8,9,10,11,12,13,14},{2,3,4,5,8,9,10,11,12,13,14,15},{2,3,4,5,8,9,10,11,12,13,15},{2,3,4,5,8,9,10,11,12,14},{2,3,4,5,8,9,10,11,12,14,15},{2,3,4,5,8,9,10,11,12,15},{2,3,4,5,8,9,10,11,13},{2,3,4,5,8,9,10,11,13,14},{2,3,4,5,8,9,10,11,13,14,15},{2,3,4,5,8,9,10,11,13,15},{2,3,4,5,8,9,10,11,14},{2,3,4,5,8,9,10,11,14,15},{2,3,4,5,8,9,10,11,15},{2,3,4,5,8,9,10,12},{2,3,4,5,8,9,10,12,13},{2,3,4,5,8,9,10,12,13,14},{2,3,4,5,8,9,10,12,13,14,15},{2,3,4,5,8,9,10,12,13,15},{2,3,4,5,8,9,10,12,14},{2,3,4,5,8,9,10,12,14,15},{2,3,4,5,8,9,10,12,15},{2,3,4,5,8,9,10,13},{2,3,4,5,8,9,10,13,14},{2,3,4,5,8,9,10,13,14,15},{2,3,4,5,8,9,10,13,15},{2,3,4,5,8,9,10,14},{2,3,4,5,8,9,10,14,15},{2,3,4,5,8,9,10,15},{2,3,4,5,8,9,11},{2,3,4,5,8,9,11,12},{2,3,4,5,8,9,11,12,13},{2,3,4,5,8,9,11,12,13,14},{2,3,4,5,8,9,11,12,13,14,15},{2,3,4,5,8,9,11,12,13,15},{2,3,4,5,8,9,11,12,14},{2,3,4,5,8,9,11,12,14,15},{2,3,4,5,8,9,11,12,15},{2,3,4,5,8,9,11,13},{2,3,4,5,8,9,11,13,14},{2,3,4,5,8,9,11,13,14,15},{2,3,4,5,8,9,11,13,15},{2,3,4,5,8,9,11,14},{2,3,4,5,8,9,11,14,15},{2,3,4,5,8,9,11,15},{2,3,4,5,8,9,12},{2,3,4,5,8,9,12,13},{2,3,4,5,8,9,12,13,14},{2,3,4,5,8,9,12,13,14,15},{2,3,4,5,8,9,12,13,15},{2,3,4,5,8,9,12,14},{2,3,4,5,8,9,12,14,15},{2,3,4,5,8,9,12,15},{2,3,4,5,8,9,13},{2,3,4,5,8,9,13,14},{2,3,4,5,8,9,13,14,15},{2,3,4,5,8,9,13,15},{2,3,4,5,8,9,14},{2,3,4,5,8,9,14,15},{2,3,4,5,8,9,15},{2,3,4,5,8,10},{2,3,4,5,8,10,11},{2,3,4,5,8,10,11,12},{2,3,4,5,8,10,11,12,13},{2,3,4,5,8,10,11,12,13,14},{2,3,4,5,8,10,11,12,13,14,15},{2,3,4,5,8,10,11,12,13,15},{2,3,4,5,8,10,11,12,14},{2,3,4,5,8,10,11,12,14,15},{2,3,4,5,8,10,11,12,15},{2,3,4,5,8,10,11,13},{2,3,4,5,8,10,11,13,14},{2,3,4,5,8,10,11,13,14,15},{2,3,4,5,8,10,11,13,15},{2,3,4,5,8,10,11,14},{2,3,4,5,8,10,11,14,15},{2,3,4,5,8,10,11,15},{2,3,4,5,8,10,12},{2,3,4,5,8,10,12,13},{2,3,4,5,8,10,12,13,14},{2,3,4,5,8,10,12,13,14,15},{2,3,4,5,8,10,12,13,15},{2,3,4,5,8,10,12,14},{2,3,4,5,8,10,12,14,15},{2,3,4,5,8,10,12,15},{2,3,4,5,8,10,13},{2,3,4,5,8,10,13,14},{2,3,4,5,8,10,13,14,15},{2,3,4,5,8,10,13,15},{2,3,4,5,8,10,14},{2,3,4,5,8,10,14,15},{2,3,4,5,8,10,15},{2,3,4,5,8,11},{2,3,4,5,8,11,12},{2,3,4,5,8,11,12,13},{2,3,4,5,8,11,12,13,14},{2,3,4,5,8,11,12,13,14,15},{2,3,4,5,8,11,12,13,15},{2,3,4,5,8,11,12,14},{2,3,4,5,8,11,12,14,15},{2,3,4,5,8,11,12,15},{2,3,4,5,8,11,13},{2,3,4,5,8,11,13,14},{2,3,4,5,8,11,13,14,15},{2,3,4,5,8,11,13,15},{2,3,4,5,8,11,14},{2,3,4,5,8,11,14,15},{2,3,4,5,8,11,15},{2,3,4,5,8,12},{2,3,4,5,8,12,13},{2,3,4,5,8,12,13,14},{2,3,4,5,8,12,13,14,15},{2,3,4,5,8,12,13,15},{2,3,4,5,8,12,14},{2,3,4,5,8,12,14,15},{2,3,4,5,8,12,15},{2,3,4,5,8,13},{2,3,4,5,8,13,14},{2,3,4,5,8,13,14,15},{2,3,4,5,8,13,15},{2,3,4,5,8,14},{2,3,4,5,8,14,15},{2,3,4,5,8,15},{2,3,4,5,9},{2,3,4,5,9,10},{2,3,4,5,9,10,11},{2,3,4,5,9,10,11,12},{2,3,4,5,9,10,11,12,13},{2,3,4,5,9,10,11,12,13,14},{2,3,4,5,9,10,11,12,13,14,15},{2,3,4,5,9,10,11,12,13,15},{2,3,4,5,9,10,11,12,14},{2,3,4,5,9,10,11,12,14,15},{2,3,4,5,9,10,11,12,15},{2,3,4,5,9,10,11,13},{2,3,4,5,9,10,11,13,14},{2,3,4,5,9,10,11,13,14,15},{2,3,4,5,9,10,11,13,15},{2,3,4,5,9,10,11,14},{2,3,4,5,9,10,11,14,15},{2,3,4,5,9,10,11,15},{2,3,4,5,9,10,12},{2,3,4,5,9,10,12,13},{2,3,4,5,9,10,12,13,14},{2,3,4,5,9,10,12,13,14,15},{2,3,4,5,9,10,12,13,15},{2,3,4,5,9,10,12,14},{2,3,4,5,9,10,12,14,15},{2,3,4,5,9,10,12,15},{2,3,4,5,9,10,13},{2,3,4,5,9,10,13,14},{2,3,4,5,9,10,13,14,15},{2,3,4,5,9,10,13,15},{2,3,4,5,9,10,14},{2,3,4,5,9,10,14,15},{2,3,4,5,9,10,15},{2,3,4,5,9,11},{2,3,4,5,9,11,12},{2,3,4,5,9,11,12,13},{2,3,4,5,9,11,12,13,14},{2,3,4,5,9,11,12,13,14,15},{2,3,4,5,9,11,12,13,15},{2,3,4,5,9,11,12,14},{2,3,4,5,9,11,12,14,15},{2,3,4,5,9,11,12,15},{2,3,4,5,9,11,13},{2,3,4,5,9,11,13,14},{2,3,4,5,9,11,13,14,15},{2,3,4,5,9,11,13,15},{2,3,4,5,9,11,14},{2,3,4,5,9,11,14,15},{2,3,4,5,9,11,15},{2,3,4,5,9,12},{2,3,4,5,9,12,13},{2,3,4,5,9,12,13,14},{2,3,4,5,9,12,13,14,15},{2,3,4,5,9,12,13,15},{2,3,4,5,9,12,14},{2,3,4,5,9,12,14,15},{2,3,4,5,9,12,15},{2,3,4,5,9,13},{2,3,4,5,9,13,14},{2,3,4,5,9,13,14,15},{2,3,4,5,9,13,15},{2,3,4,5,9,14},{2,3,4,5,9,14,15},{2,3,4,5,9,15},{2,3,4,5,10},{2,3,4,5,10,11},{2,3,4,5,10,11,12},{2,3,4,5,10,11,12,13},{2,3,4,5,10,11,12,13,14},{2,3,4,5,10,11,12,13,14,15},{2,3,4,5,10,11,12,13,15},{2,3,4,5,10,11,12,14},{2,3,4,5,10,11,12,14,15},{2,3,4,5,10,11,12,15},{2,3,4,5,10,11,13},{2,3,4,5,10,11,13,14},{2,3,4,5,10,11,13,14,15},{2,3,4,5,10,11,13,15},{2,3,4,5,10,11,14},{2,3,4,5,10,11,14,15},{2,3,4,5,10,11,15},{2,3,4,5,10,12},{2,3,4,5,10,12,13},{2,3,4,5,10,12,13,14},{2,3,4,5,10,12,13,14,15},{2,3,4,5,10,12,13,15},{2,3,4,5,10,12,14},{2,3,4,5,10,12,14,15},{2,3,4,5,10,12,15},{2,3,4,5,10,13},{2,3,4,5,10,13,14},{2,3,4,5,10,13,14,15},{2,3,4,5,10,13,15},{2,3,4,5,10,14},{2,3,4,5,10,14,15},{2,3,4,5,10,15},{2,3,4,5,11},{2,3,4,5,11,12},{2,3,4,5,11,12,13},{2,3,4,5,11,12,13,14},{2,3,4,5,11,12,13,14,15},{2,3,4,5,11,12,13,15},{2,3,4,5,11,12,14},{2,3,4,5,11,12,14,15},{2,3,4,5,11,12,15},{2,3,4,5,11,13},{2,3,4,5,11,13,14},{2,3,4,5,11,13,14,15},{2,3,4,5,11,13,15},{2,3,4,5,11,14},{2,3,4,5,11,14,15},{2,3,4,5,11,15},{2,3,4,5,12},{2,3,4,5,12,13},{2,3,4,5,12,13,14},{2,3,4,5,12,13,14,15},{2,3,4,5,12,13,15},{2,3,4,5,12,14},{2,3,4,5,12,14,15},{2,3,4,5,12,15},{2,3,4,5,13},{2,3,4,5,13,14},{2,3,4,5,13,14,15},{2,3,4,5,13,15},{2,3,4,5,14},{2,3,4,5,14,15},{2,3,4,5,15},{2,3,4,6},{2,3,4,6,7},{2,3,4,6,7,8},{2,3,4,6,7,8,9},{2,3,4,6,7,8,9,10},{2,3,4,6,7,8,9,10,11},{2,3,4,6,7,8,9,10,11,12},{2,3,4,6,7,8,9,10,11,12,13},{2,3,4,6,7,8,9,10,11,12,13,14},{2,3,4,6,7,8,9,10,11,12,13,14,15},{2,3,4,6,7,8,9,10,11,12,13,15},{2,3,4,6,7,8,9,10,11,12,14},{2,3,4,6,7,8,9,10,11,12,14,15},{2,3,4,6,7,8,9,10,11,12,15},{2,3,4,6,7,8,9,10,11,13},{2,3,4,6,7,8,9,10,11,13,14},{2,3,4,6,7,8,9,10,11,13,14,15},{2,3,4,6,7,8,9,10,11,13,15},{2,3,4,6,7,8,9,10,11,14},{2,3,4,6,7,8,9,10,11,14,15},{2,3,4,6,7,8,9,10,11,15},{2,3,4,6,7,8,9,10,12},{2,3,4,6,7,8,9,10,12,13},{2,3,4,6,7,8,9,10,12,13,14},{2,3,4,6,7,8,9,10,12,13,14,15},{2,3,4,6,7,8,9,10,12,13,15},{2,3,4,6,7,8,9,10,12,14},{2,3,4,6,7,8,9,10,12,14,15},{2,3,4,6,7,8,9,10,12,15},{2,3,4,6,7,8,9,10,13},{2,3,4,6,7,8,9,10,13,14},{2,3,4,6,7,8,9,10,13,14,15},{2,3,4,6,7,8,9,10,13,15},{2,3,4,6,7,8,9,10,14},{2,3,4,6,7,8,9,10,14,15},{2,3,4,6,7,8,9,10,15},{2,3,4,6,7,8,9,11},{2,3,4,6,7,8,9,11,12},{2,3,4,6,7,8,9,11,12,13},{2,3,4,6,7,8,9,11,12,13,14},{2,3,4,6,7,8,9,11,12,13,14,15},{2,3,4,6,7,8,9,11,12,13,15},{2,3,4,6,7,8,9,11,12,14},{2,3,4,6,7,8,9,11,12,14,15},{2,3,4,6,7,8,9,11,12,15},{2,3,4,6,7,8,9,11,13},{2,3,4,6,7,8,9,11,13,14},{2,3,4,6,7,8,9,11,13,14,15},{2,3,4,6,7,8,9,11,13,15},{2,3,4,6,7,8,9,11,14},{2,3,4,6,7,8,9,11,14,15},{2,3,4,6,7,8,9,11,15},{2,3,4,6,7,8,9,12},{2,3,4,6,7,8,9,12,13},{2,3,4,6,7,8,9,12,13,14},{2,3,4,6,7,8,9,12,13,14,15},{2,3,4,6,7,8,9,12,13,15},{2,3,4,6,7,8,9,12,14},{2,3,4,6,7,8,9,12,14,15},{2,3,4,6,7,8,9,12,15},{2,3,4,6,7,8,9,13},{2,3,4,6,7,8,9,13,14},{2,3,4,6,7,8,9,13,14,15},{2,3,4,6,7,8,9,13,15},{2,3,4,6,7,8,9,14},{2,3,4,6,7,8,9,14,15},{2,3,4,6,7,8,9,15},{2,3,4,6,7,8,10},{2,3,4,6,7,8,10,11},{2,3,4,6,7,8,10,11,12},{2,3,4,6,7,8,10,11,12,13},{2,3,4,6,7,8,10,11,12,13,14},{2,3,4,6,7,8,10,11,12,13,14,15},{2,3,4,6,7,8,10,11,12,13,15},{2,3,4,6,7,8,10,11,12,14},{2,3,4,6,7,8,10,11,12,14,15},{2,3,4,6,7,8,10,11,12,15},{2,3,4,6,7,8,10,11,13},{2,3,4,6,7,8,10,11,13,14},{2,3,4,6,7,8,10,11,13,14,15},{2,3,4,6,7,8,10,11,13,15},{2,3,4,6,7,8,10,11,14},{2,3,4,6,7,8,10,11,14,15},{2,3,4,6,7,8,10,11,15},{2,3,4,6,7,8,10,12},{2,3,4,6,7,8,10,12,13},{2,3,4,6,7,8,10,12,13,14},{2,3,4,6,7,8,10,12,13,14,15},{2,3,4,6,7,8,10,12,13,15},{2,3,4,6,7,8,10,12,14},{2,3,4,6,7,8,10,12,14,15},{2,3,4,6,7,8,10,12,15},{2,3,4,6,7,8,10,13},{2,3,4,6,7,8,10,13,14},{2,3,4,6,7,8,10,13,14,15},{2,3,4,6,7,8,10,13,15},{2,3,4,6,7,8,10,14},{2,3,4,6,7,8,10,14,15},{2,3,4,6,7,8,10,15},{2,3,4,6,7,8,11},{2,3,4,6,7,8,11,12},{2,3,4,6,7,8,11,12,13},{2,3,4,6,7,8,11,12,13,14},{2,3,4,6,7,8,11,12,13,14,15},{2,3,4,6,7,8,11,12,13,15},{2,3,4,6,7,8,11,12,14},{2,3,4,6,7,8,11,12,14,15},{2,3,4,6,7,8,11,12,15},{2,3,4,6,7,8,11,13},{2,3,4,6,7,8,11,13,14},{2,3,4,6,7,8,11,13,14,15},{2,3,4,6,7,8,11,13,15},{2,3,4,6,7,8,11,14},{2,3,4,6,7,8,11,14,15},{2,3,4,6,7,8,11,15},{2,3,4,6,7,8,12},{2,3,4,6,7,8,12,13},{2,3,4,6,7,8,12,13,14},{2,3,4,6,7,8,12,13,14,15},{2,3,4,6,7,8,12,13,15},{2,3,4,6,7,8,12,14},{2,3,4,6,7,8,12,14,15},{2,3,4,6,7,8,12,15},{2,3,4,6,7,8,13},{2,3,4,6,7,8,13,14},{2,3,4,6,7,8,13,14,15},{2,3,4,6,7,8,13,15},{2,3,4,6,7,8,14},{2,3,4,6,7,8,14,15},{2,3,4,6,7,8,15},{2,3,4,6,7,9},{2,3,4,6,7,9,10},{2,3,4,6,7,9,10,11},{2,3,4,6,7,9,10,11,12},{2,3,4,6,7,9,10,11,12,13},{2,3,4,6,7,9,10,11,12,13,14},{2,3,4,6,7,9,10,11,12,13,14,15},{2,3,4,6,7,9,10,11,12,13,15},{2,3,4,6,7,9,10,11,12,14},{2,3,4,6,7,9,10,11,12,14,15},{2,3,4,6,7,9,10,11,12,15},{2,3,4,6,7,9,10,11,13},{2,3,4,6,7,9,10,11,13,14},{2,3,4,6,7,9,10,11,13,14,15},{2,3,4,6,7,9,10,11,13,15},{2,3,4,6,7,9,10,11,14},{2,3,4,6,7,9,10,11,14,15},{2,3,4,6,7,9,10,11,15},{2,3,4,6,7,9,10,12},{2,3,4,6,7,9,10,12,13},{2,3,4,6,7,9,10,12,13,14},{2,3,4,6,7,9,10,12,13,14,15},{2,3,4,6,7,9,10,12,13,15},{2,3,4,6,7,9,10,12,14},{2,3,4,6,7,9,10,12,14,15},{2,3,4,6,7,9,10,12,15},{2,3,4,6,7,9,10,13},{2,3,4,6,7,9,10,13,14},{2,3,4,6,7,9,10,13,14,15},{2,3,4,6,7,9,10,13,15},{2,3,4,6,7,9,10,14},{2,3,4,6,7,9,10,14,15},{2,3,4,6,7,9,10,15},{2,3,4,6,7,9,11},{2,3,4,6,7,9,11,12},{2,3,4,6,7,9,11,12,13},{2,3,4,6,7,9,11,12,13,14},{2,3,4,6,7,9,11,12,13,14,15},{2,3,4,6,7,9,11,12,13,15},{2,3,4,6,7,9,11,12,14},{2,3,4,6,7,9,11,12,14,15},{2,3,4,6,7,9,11,12,15},{2,3,4,6,7,9,11,13},{2,3,4,6,7,9,11,13,14},{2,3,4,6,7,9,11,13,14,15},{2,3,4,6,7,9,11,13,15},{2,3,4,6,7,9,11,14},{2,3,4,6,7,9,11,14,15},{2,3,4,6,7,9,11,15},{2,3,4,6,7,9,12},{2,3,4,6,7,9,12,13},{2,3,4,6,7,9,12,13,14},{2,3,4,6,7,9,12,13,14,15},{2,3,4,6,7,9,12,13,15},{2,3,4,6,7,9,12,14},{2,3,4,6,7,9,12,14,15},{2,3,4,6,7,9,12,15},{2,3,4,6,7,9,13},{2,3,4,6,7,9,13,14},{2,3,4,6,7,9,13,14,15},{2,3,4,6,7,9,13,15},{2,3,4,6,7,9,14},{2,3,4,6,7,9,14,15},{2,3,4,6,7,9,15},{2,3,4,6,7,10},{2,3,4,6,7,10,11},{2,3,4,6,7,10,11,12},{2,3,4,6,7,10,11,12,13},{2,3,4,6,7,10,11,12,13,14},{2,3,4,6,7,10,11,12,13,14,15},{2,3,4,6,7,10,11,12,13,15},{2,3,4,6,7,10,11,12,14},{2,3,4,6,7,10,11,12,14,15},{2,3,4,6,7,10,11,12,15},{2,3,4,6,7,10,11,13},{2,3,4,6,7,10,11,13,14},{2,3,4,6,7,10,11,13,14,15},{2,3,4,6,7,10,11,13,15},{2,3,4,6,7,10,11,14},{2,3,4,6,7,10,11,14,15},{2,3,4,6,7,10,11,15},{2,3,4,6,7,10,12},{2,3,4,6,7,10,12,13},{2,3,4,6,7,10,12,13,14},{2,3,4,6,7,10,12,13,14,15},{2,3,4,6,7,10,12,13,15},{2,3,4,6,7,10,12,14},{2,3,4,6,7,10,12,14,15},{2,3,4,6,7,10,12,15},{2,3,4,6,7,10,13},{2,3,4,6,7,10,13,14},{2,3,4,6,7,10,13,14,15},{2,3,4,6,7,10,13,15},{2,3,4,6,7,10,14},{2,3,4,6,7,10,14,15},{2,3,4,6,7,10,15},{2,3,4,6,7,11},{2,3,4,6,7,11,12},{2,3,4,6,7,11,12,13},{2,3,4,6,7,11,12,13,14},{2,3,4,6,7,11,12,13,14,15},{2,3,4,6,7,11,12,13,15},{2,3,4,6,7,11,12,14},{2,3,4,6,7,11,12,14,15},{2,3,4,6,7,11,12,15},{2,3,4,6,7,11,13},{2,3,4,6,7,11,13,14},{2,3,4,6,7,11,13,14,15},{2,3,4,6,7,11,13,15},{2,3,4,6,7,11,14},{2,3,4,6,7,11,14,15},{2,3,4,6,7,11,15},{2,3,4,6,7,12},{2,3,4,6,7,12,13},{2,3,4,6,7,12,13,14},{2,3,4,6,7,12,13,14,15},{2,3,4,6,7,12,13,15},{2,3,4,6,7,12,14},{2,3,4,6,7,12,14,15},{2,3,4,6,7,12,15},{2,3,4,6,7,13},{2,3,4,6,7,13,14},{2,3,4,6,7,13,14,15},{2,3,4,6,7,13,15},{2,3,4,6,7,14},{2,3,4,6,7,14,15},{2,3,4,6,7,15},{2,3,4,6,8},{2,3,4,6,8,9},{2,3,4,6,8,9,10},{2,3,4,6,8,9,10,11},{2,3,4,6,8,9,10,11,12},{2,3,4,6,8,9,10,11,12,13},{2,3,4,6,8,9,10,11,12,13,14},{2,3,4,6,8,9,10,11,12,13,14,15},{2,3,4,6,8,9,10,11,12,13,15},{2,3,4,6,8,9,10,11,12,14},{2,3,4,6,8,9,10,11,12,14,15},{2,3,4,6,8,9,10,11,12,15},{2,3,4,6,8,9,10,11,13},{2,3,4,6,8,9,10,11,13,14},{2,3,4,6,8,9,10,11,13,14,15},{2,3,4,6,8,9,10,11,13,15},{2,3,4,6,8,9,10,11,14},{2,3,4,6,8,9,10,11,14,15},{2,3,4,6,8,9,10,11,15},{2,3,4,6,8,9,10,12},{2,3,4,6,8,9,10,12,13},{2,3,4,6,8,9,10,12,13,14},{2,3,4,6,8,9,10,12,13,14,15},{2,3,4,6,8,9,10,12,13,15},{2,3,4,6,8,9,10,12,14},{2,3,4,6,8,9,10,12,14,15},{2,3,4,6,8,9,10,12,15},{2,3,4,6,8,9,10,13},{2,3,4,6,8,9,10,13,14},{2,3,4,6,8,9,10,13,14,15},{2,3,4,6,8,9,10,13,15},{2,3,4,6,8,9,10,14},{2,3,4,6,8,9,10,14,15},{2,3,4,6,8,9,10,15},{2,3,4,6,8,9,11},{2,3,4,6,8,9,11,12},{2,3,4,6,8,9,11,12,13},{2,3,4,6,8,9,11,12,13,14},{2,3,4,6,8,9,11,12,13,14,15},{2,3,4,6,8,9,11,12,13,15},{2,3,4,6,8,9,11,12,14},{2,3,4,6,8,9,11,12,14,15},{2,3,4,6,8,9,11,12,15},{2,3,4,6,8,9,11,13},{2,3,4,6,8,9,11,13,14},{2,3,4,6,8,9,11,13,14,15},{2,3,4,6,8,9,11,13,15},{2,3,4,6,8,9,11,14},{2,3,4,6,8,9,11,14,15},{2,3,4,6,8,9,11,15},{2,3,4,6,8,9,12},{2,3,4,6,8,9,12,13},{2,3,4,6,8,9,12,13,14},{2,3,4,6,8,9,12,13,14,15},{2,3,4,6,8,9,12,13,15},{2,3,4,6,8,9,12,14},{2,3,4,6,8,9,12,14,15},{2,3,4,6,8,9,12,15},{2,3,4,6,8,9,13},{2,3,4,6,8,9,13,14},{2,3,4,6,8,9,13,14,15},{2,3,4,6,8,9,13,15},{2,3,4,6,8,9,14},{2,3,4,6,8,9,14,15},{2,3,4,6,8,9,15},{2,3,4,6,8,10},{2,3,4,6,8,10,11},{2,3,4,6,8,10,11,12},{2,3,4,6,8,10,11,12,13},{2,3,4,6,8,10,11,12,13,14},{2,3,4,6,8,10,11,12,13,14,15},{2,3,4,6,8,10,11,12,13,15},{2,3,4,6,8,10,11,12,14},{2,3,4,6,8,10,11,12,14,15},{2,3,4,6,8,10,11,12,15},{2,3,4,6,8,10,11,13},{2,3,4,6,8,10,11,13,14},{2,3,4,6,8,10,11,13,14,15},{2,3,4,6,8,10,11,13,15},{2,3,4,6,8,10,11,14},{2,3,4,6,8,10,11,14,15},{2,3,4,6,8,10,11,15},{2,3,4,6,8,10,12},{2,3,4,6,8,10,12,13},{2,3,4,6,8,10,12,13,14},{2,3,4,6,8,10,12,13,14,15},{2,3,4,6,8,10,12,13,15},{2,3,4,6,8,10,12,14},{2,3,4,6,8,10,12,14,15},{2,3,4,6,8,10,12,15},{2,3,4,6,8,10,13},{2,3,4,6,8,10,13,14},{2,3,4,6,8,10,13,14,15},{2,3,4,6,8,10,13,15},{2,3,4,6,8,10,14},{2,3,4,6,8,10,14,15},{2,3,4,6,8,10,15},{2,3,4,6,8,11},{2,3,4,6,8,11,12},{2,3,4,6,8,11,12,13},{2,3,4,6,8,11,12,13,14},{2,3,4,6,8,11,12,13,14,15},{2,3,4,6,8,11,12,13,15},{2,3,4,6,8,11,12,14},{2,3,4,6,8,11,12,14,15},{2,3,4,6,8,11,12,15},{2,3,4,6,8,11,13},{2,3,4,6,8,11,13,14},{2,3,4,6,8,11,13,14,15},{2,3,4,6,8,11,13,15},{2,3,4,6,8,11,14},{2,3,4,6,8,11,14,15},{2,3,4,6,8,11,15},{2,3,4,6,8,12},{2,3,4,6,8,12,13},{2,3,4,6,8,12,13,14},{2,3,4,6,8,12,13,14,15},{2,3,4,6,8,12,13,15},{2,3,4,6,8,12,14},{2,3,4,6,8,12,14,15},{2,3,4,6,8,12,15},{2,3,4,6,8,13},{2,3,4,6,8,13,14},{2,3,4,6,8,13,14,15},{2,3,4,6,8,13,15},{2,3,4,6,8,14},{2,3,4,6,8,14,15},{2,3,4,6,8,15},{2,3,4,6,9},{2,3,4,6,9,10},{2,3,4,6,9,10,11},{2,3,4,6,9,10,11,12},{2,3,4,6,9,10,11,12,13},{2,3,4,6,9,10,11,12,13,14},{2,3,4,6,9,10,11,12,13,14,15},{2,3,4,6,9,10,11,12,13,15},{2,3,4,6,9,10,11,12,14},{2,3,4,6,9,10,11,12,14,15},{2,3,4,6,9,10,11,12,15},{2,3,4,6,9,10,11,13},{2,3,4,6,9,10,11,13,14},{2,3,4,6,9,10,11,13,14,15},{2,3,4,6,9,10,11,13,15},{2,3,4,6,9,10,11,14},{2,3,4,6,9,10,11,14,15},{2,3,4,6,9,10,11,15},{2,3,4,6,9,10,12},{2,3,4,6,9,10,12,13},{2,3,4,6,9,10,12,13,14},{2,3,4,6,9,10,12,13,14,15},{2,3,4,6,9,10,12,13,15},{2,3,4,6,9,10,12,14},{2,3,4,6,9,10,12,14,15},{2,3,4,6,9,10,12,15},{2,3,4,6,9,10,13},{2,3,4,6,9,10,13,14},{2,3,4,6,9,10,13,14,15},{2,3,4,6,9,10,13,15},{2,3,4,6,9,10,14},{2,3,4,6,9,10,14,15},{2,3,4,6,9,10,15},{2,3,4,6,9,11},{2,3,4,6,9,11,12},{2,3,4,6,9,11,12,13},{2,3,4,6,9,11,12,13,14},{2,3,4,6,9,11,12,13,14,15},{2,3,4,6,9,11,12,13,15},{2,3,4,6,9,11,12,14},{2,3,4,6,9,11,12,14,15},{2,3,4,6,9,11,12,15},{2,3,4,6,9,11,13},{2,3,4,6,9,11,13,14},{2,3,4,6,9,11,13,14,15},{2,3,4,6,9,11,13,15},{2,3,4,6,9,11,14},{2,3,4,6,9,11,14,15},{2,3,4,6,9,11,15},{2,3,4,6,9,12},{2,3,4,6,9,12,13},{2,3,4,6,9,12,13,14},{2,3,4,6,9,12,13,14,15},{2,3,4,6,9,12,13,15},{2,3,4,6,9,12,14},{2,3,4,6,9,12,14,15},{2,3,4,6,9,12,15},{2,3,4,6,9,13},{2,3,4,6,9,13,14},{2,3,4,6,9,13,14,15},{2,3,4,6,9,13,15},{2,3,4,6,9,14},{2,3,4,6,9,14,15},{2,3,4,6,9,15},{2,3,4,6,10},{2,3,4,6,10,11},{2,3,4,6,10,11,12},{2,3,4,6,10,11,12,13},{2,3,4,6,10,11,12,13,14},{2,3,4,6,10,11,12,13,14,15},{2,3,4,6,10,11,12,13,15},{2,3,4,6,10,11,12,14},{2,3,4,6,10,11,12,14,15},{2,3,4,6,10,11,12,15},{2,3,4,6,10,11,13},{2,3,4,6,10,11,13,14},{2,3,4,6,10,11,13,14,15},{2,3,4,6,10,11,13,15},{2,3,4,6,10,11,14},{2,3,4,6,10,11,14,15},{2,3,4,6,10,11,15},{2,3,4,6,10,12},{2,3,4,6,10,12,13},{2,3,4,6,10,12,13,14},{2,3,4,6,10,12,13,14,15},{2,3,4,6,10,12,13,15},{2,3,4,6,10,12,14},{2,3,4,6,10,12,14,15},{2,3,4,6,10,12,15},{2,3,4,6,10,13},{2,3,4,6,10,13,14},{2,3,4,6,10,13,14,15},{2,3,4,6,10,13,15},{2,3,4,6,10,14},{2,3,4,6,10,14,15},{2,3,4,6,10,15},{2,3,4,6,11},{2,3,4,6,11,12},{2,3,4,6,11,12,13},{2,3,4,6,11,12,13,14},{2,3,4,6,11,12,13,14,15},{2,3,4,6,11,12,13,15},{2,3,4,6,11,12,14},{2,3,4,6,11,12,14,15},{2,3,4,6,11,12,15},{2,3,4,6,11,13},{2,3,4,6,11,13,14},{2,3,4,6,11,13,14,15},{2,3,4,6,11,13,15},{2,3,4,6,11,14},{2,3,4,6,11,14,15},{2,3,4,6,11,15},{2,3,4,6,12},{2,3,4,6,12,13},{2,3,4,6,12,13,14},{2,3,4,6,12,13,14,15},{2,3,4,6,12,13,15},{2,3,4,6,12,14},{2,3,4,6,12,14,15},{2,3,4,6,12,15},{2,3,4,6,13},{2,3,4,6,13,14},{2,3,4,6,13,14,15},{2,3,4,6,13,15},{2,3,4,6,14},{2,3,4,6,14,15},{2,3,4,6,15},{2,3,4,7},{2,3,4,7,8},{2,3,4,7,8,9},{2,3,4,7,8,9,10},{2,3,4,7,8,9,10,11},{2,3,4,7,8,9,10,11,12},{2,3,4,7,8,9,10,11,12,13},{2,3,4,7,8,9,10,11,12,13,14},{2,3,4,7,8,9,10,11,12,13,14,15},{2,3,4,7,8,9,10,11,12,13,15},{2,3,4,7,8,9,10,11,12,14},{2,3,4,7,8,9,10,11,12,14,15},{2,3,4,7,8,9,10,11,12,15},{2,3,4,7,8,9,10,11,13},{2,3,4,7,8,9,10,11,13,14},{2,3,4,7,8,9,10,11,13,14,15},{2,3,4,7,8,9,10,11,13,15},{2,3,4,7,8,9,10,11,14},{2,3,4,7,8,9,10,11,14,15},{2,3,4,7,8,9,10,11,15},{2,3,4,7,8,9,10,12},{2,3,4,7,8,9,10,12,13},{2,3,4,7,8,9,10,12,13,14},{2,3,4,7,8,9,10,12,13,14,15},{2,3,4,7,8,9,10,12,13,15},{2,3,4,7,8,9,10,12,14},{2,3,4,7,8,9,10,12,14,15},{2,3,4,7,8,9,10,12,15},{2,3,4,7,8,9,10,13},{2,3,4,7,8,9,10,13,14},{2,3,4,7,8,9,10,13,14,15},{2,3,4,7,8,9,10,13,15},{2,3,4,7,8,9,10,14},{2,3,4,7,8,9,10,14,15},{2,3,4,7,8,9,10,15},{2,3,4,7,8,9,11},{2,3,4,7,8,9,11,12},{2,3,4,7,8,9,11,12,13},{2,3,4,7,8,9,11,12,13,14},{2,3,4,7,8,9,11,12,13,14,15},{2,3,4,7,8,9,11,12,13,15},{2,3,4,7,8,9,11,12,14},{2,3,4,7,8,9,11,12,14,15},{2,3,4,7,8,9,11,12,15},{2,3,4,7,8,9,11,13},{2,3,4,7,8,9,11,13,14},{2,3,4,7,8,9,11,13,14,15},{2,3,4,7,8,9,11,13,15},{2,3,4,7,8,9,11,14},{2,3,4,7,8,9,11,14,15},{2,3,4,7,8,9,11,15},{2,3,4,7,8,9,12},{2,3,4,7,8,9,12,13},{2,3,4,7,8,9,12,13,14},{2,3,4,7,8,9,12,13,14,15},{2,3,4,7,8,9,12,13,15},{2,3,4,7,8,9,12,14},{2,3,4,7,8,9,12,14,15},{2,3,4,7,8,9,12,15},{2,3,4,7,8,9,13},{2,3,4,7,8,9,13,14},{2,3,4,7,8,9,13,14,15},{2,3,4,7,8,9,13,15},{2,3,4,7,8,9,14},{2,3,4,7,8,9,14,15},{2,3,4,7,8,9,15},{2,3,4,7,8,10},{2,3,4,7,8,10,11},{2,3,4,7,8,10,11,12},{2,3,4,7,8,10,11,12,13},{2,3,4,7,8,10,11,12,13,14},{2,3,4,7,8,10,11,12,13,14,15},{2,3,4,7,8,10,11,12,13,15},{2,3,4,7,8,10,11,12,14},{2,3,4,7,8,10,11,12,14,15},{2,3,4,7,8,10,11,12,15},{2,3,4,7,8,10,11,13},{2,3,4,7,8,10,11,13,14},{2,3,4,7,8,10,11,13,14,15},{2,3,4,7,8,10,11,13,15},{2,3,4,7,8,10,11,14},{2,3,4,7,8,10,11,14,15},{2,3,4,7,8,10,11,15},{2,3,4,7,8,10,12},{2,3,4,7,8,10,12,13},{2,3,4,7,8,10,12,13,14},{2,3,4,7,8,10,12,13,14,15},{2,3,4,7,8,10,12,13,15},{2,3,4,7,8,10,12,14},{2,3,4,7,8,10,12,14,15},{2,3,4,7,8,10,12,15},{2,3,4,7,8,10,13},{2,3,4,7,8,10,13,14},{2,3,4,7,8,10,13,14,15},{2,3,4,7,8,10,13,15},{2,3,4,7,8,10,14},{2,3,4,7,8,10,14,15},{2,3,4,7,8,10,15},{2,3,4,7,8,11},{2,3,4,7,8,11,12},{2,3,4,7,8,11,12,13},{2,3,4,7,8,11,12,13,14},{2,3,4,7,8,11,12,13,14,15},{2,3,4,7,8,11,12,13,15},{2,3,4,7,8,11,12,14},{2,3,4,7,8,11,12,14,15},{2,3,4,7,8,11,12,15},{2,3,4,7,8,11,13},{2,3,4,7,8,11,13,14},{2,3,4,7,8,11,13,14,15},{2,3,4,7,8,11,13,15},{2,3,4,7,8,11,14},{2,3,4,7,8,11,14,15},{2,3,4,7,8,11,15},{2,3,4,7,8,12},{2,3,4,7,8,12,13},{2,3,4,7,8,12,13,14},{2,3,4,7,8,12,13,14,15},{2,3,4,7,8,12,13,15},{2,3,4,7,8,12,14},{2,3,4,7,8,12,14,15},{2,3,4,7,8,12,15},{2,3,4,7,8,13},{2,3,4,7,8,13,14},{2,3,4,7,8,13,14,15},{2,3,4,7,8,13,15},{2,3,4,7,8,14},{2,3,4,7,8,14,15},{2,3,4,7,8,15},{2,3,4,7,9},{2,3,4,7,9,10},{2,3,4,7,9,10,11},{2,3,4,7,9,10,11,12},{2,3,4,7,9,10,11,12,13},{2,3,4,7,9,10,11,12,13,14},{2,3,4,7,9,10,11,12,13,14,15},{2,3,4,7,9,10,11,12,13,15},{2,3,4,7,9,10,11,12,14},{2,3,4,7,9,10,11,12,14,15},{2,3,4,7,9,10,11,12,15},{2,3,4,7,9,10,11,13},{2,3,4,7,9,10,11,13,14},{2,3,4,7,9,10,11,13,14,15},{2,3,4,7,9,10,11,13,15},{2,3,4,7,9,10,11,14},{2,3,4,7,9,10,11,14,15},{2,3,4,7,9,10,11,15},{2,3,4,7,9,10,12},{2,3,4,7,9,10,12,13},{2,3,4,7,9,10,12,13,14},{2,3,4,7,9,10,12,13,14,15},{2,3,4,7,9,10,12,13,15},{2,3,4,7,9,10,12,14},{2,3,4,7,9,10,12,14,15},{2,3,4,7,9,10,12,15},{2,3,4,7,9,10,13},{2,3,4,7,9,10,13,14},{2,3,4,7,9,10,13,14,15},{2,3,4,7,9,10,13,15},{2,3,4,7,9,10,14},{2,3,4,7,9,10,14,15},{2,3,4,7,9,10,15},{2,3,4,7,9,11},{2,3,4,7,9,11,12},{2,3,4,7,9,11,12,13},{2,3,4,7,9,11,12,13,14},{2,3,4,7,9,11,12,13,14,15},{2,3,4,7,9,11,12,13,15},{2,3,4,7,9,11,12,14},{2,3,4,7,9,11,12,14,15},{2,3,4,7,9,11,12,15},{2,3,4,7,9,11,13},{2,3,4,7,9,11,13,14},{2,3,4,7,9,11,13,14,15},{2,3,4,7,9,11,13,15},{2,3,4,7,9,11,14},{2,3,4,7,9,11,14,15},{2,3,4,7,9,11,15},{2,3,4,7,9,12},{2,3,4,7,9,12,13},{2,3,4,7,9,12,13,14},{2,3,4,7,9,12,13,14,15},{2,3,4,7,9,12,13,15},{2,3,4,7,9,12,14},{2,3,4,7,9,12,14,15},{2,3,4,7,9,12,15},{2,3,4,7,9,13},{2,3,4,7,9,13,14},{2,3,4,7,9,13,14,15},{2,3,4,7,9,13,15},{2,3,4,7,9,14},{2,3,4,7,9,14,15},{2,3,4,7,9,15},{2,3,4,7,10},{2,3,4,7,10,11},{2,3,4,7,10,11,12},{2,3,4,7,10,11,12,13},{2,3,4,7,10,11,12,13,14},{2,3,4,7,10,11,12,13,14,15},{2,3,4,7,10,11,12,13,15},{2,3,4,7,10,11,12,14},{2,3,4,7,10,11,12,14,15},{2,3,4,7,10,11,12,15},{2,3,4,7,10,11,13},{2,3,4,7,10,11,13,14},{2,3,4,7,10,11,13,14,15},{2,3,4,7,10,11,13,15},{2,3,4,7,10,11,14},{2,3,4,7,10,11,14,15},{2,3,4,7,10,11,15},{2,3,4,7,10,12},{2,3,4,7,10,12,13},{2,3,4,7,10,12,13,14},{2,3,4,7,10,12,13,14,15},{2,3,4,7,10,12,13,15},{2,3,4,7,10,12,14},{2,3,4,7,10,12,14,15},{2,3,4,7,10,12,15},{2,3,4,7,10,13},{2,3,4,7,10,13,14},{2,3,4,7,10,13,14,15},{2,3,4,7,10,13,15},{2,3,4,7,10,14},{2,3,4,7,10,14,15},{2,3,4,7,10,15},{2,3,4,7,11},{2,3,4,7,11,12},{2,3,4,7,11,12,13},{2,3,4,7,11,12,13,14},{2,3,4,7,11,12,13,14,15},{2,3,4,7,11,12,13,15},{2,3,4,7,11,12,14},{2,3,4,7,11,12,14,15},{2,3,4,7,11,12,15},{2,3,4,7,11,13},{2,3,4,7,11,13,14},{2,3,4,7,11,13,14,15},{2,3,4,7,11,13,15},{2,3,4,7,11,14},{2,3,4,7,11,14,15},{2,3,4,7,11,15},{2,3,4,7,12},{2,3,4,7,12,13},{2,3,4,7,12,13,14},{2,3,4,7,12,13,14,15},{2,3,4,7,12,13,15},{2,3,4,7,12,14},{2,3,4,7,12,14,15},{2,3,4,7,12,15},{2,3,4,7,13},{2,3,4,7,13,14},{2,3,4,7,13,14,15},{2,3,4,7,13,15},{2,3,4,7,14},{2,3,4,7,14,15},{2,3,4,7,15},{2,3,4,8},{2,3,4,8,9},{2,3,4,8,9,10},{2,3,4,8,9,10,11},{2,3,4,8,9,10,11,12},{2,3,4,8,9,10,11,12,13},{2,3,4,8,9,10,11,12,13,14},{2,3,4,8,9,10,11,12,13,14,15},{2,3,4,8,9,10,11,12,13,15},{2,3,4,8,9,10,11,12,14},{2,3,4,8,9,10,11,12,14,15},{2,3,4,8,9,10,11,12,15},{2,3,4,8,9,10,11,13},{2,3,4,8,9,10,11,13,14},{2,3,4,8,9,10,11,13,14,15},{2,3,4,8,9,10,11,13,15},{2,3,4,8,9,10,11,14},{2,3,4,8,9,10,11,14,15},{2,3,4,8,9,10,11,15},{2,3,4,8,9,10,12},{2,3,4,8,9,10,12,13},{2,3,4,8,9,10,12,13,14},{2,3,4,8,9,10,12,13,14,15},{2,3,4,8,9,10,12,13,15},{2,3,4,8,9,10,12,14},{2,3,4,8,9,10,12,14,15},{2,3,4,8,9,10,12,15},{2,3,4,8,9,10,13},{2,3,4,8,9,10,13,14},{2,3,4,8,9,10,13,14,15},{2,3,4,8,9,10,13,15},{2,3,4,8,9,10,14},{2,3,4,8,9,10,14,15},{2,3,4,8,9,10,15},{2,3,4,8,9,11},{2,3,4,8,9,11,12},{2,3,4,8,9,11,12,13},{2,3,4,8,9,11,12,13,14},{2,3,4,8,9,11,12,13,14,15},{2,3,4,8,9,11,12,13,15},{2,3,4,8,9,11,12,14},{2,3,4,8,9,11,12,14,15},{2,3,4,8,9,11,12,15},{2,3,4,8,9,11,13},{2,3,4,8,9,11,13,14},{2,3,4,8,9,11,13,14,15},{2,3,4,8,9,11,13,15},{2,3,4,8,9,11,14},{2,3,4,8,9,11,14,15},{2,3,4,8,9,11,15},{2,3,4,8,9,12},{2,3,4,8,9,12,13},{2,3,4,8,9,12,13,14},{2,3,4,8,9,12,13,14,15},{2,3,4,8,9,12,13,15},{2,3,4,8,9,12,14},{2,3,4,8,9,12,14,15},{2,3,4,8,9,12,15},{2,3,4,8,9,13},{2,3,4,8,9,13,14},{2,3,4,8,9,13,14,15},{2,3,4,8,9,13,15},{2,3,4,8,9,14},{2,3,4,8,9,14,15},{2,3,4,8,9,15},{2,3,4,8,10},{2,3,4,8,10,11},{2,3,4,8,10,11,12},{2,3,4,8,10,11,12,13},{2,3,4,8,10,11,12,13,14},{2,3,4,8,10,11,12,13,14,15},{2,3,4,8,10,11,12,13,15},{2,3,4,8,10,11,12,14},{2,3,4,8,10,11,12,14,15},{2,3,4,8,10,11,12,15},{2,3,4,8,10,11,13},{2,3,4,8,10,11,13,14},{2,3,4,8,10,11,13,14,15},{2,3,4,8,10,11,13,15},{2,3,4,8,10,11,14},{2,3,4,8,10,11,14,15},{2,3,4,8,10,11,15},{2,3,4,8,10,12},{2,3,4,8,10,12,13},{2,3,4,8,10,12,13,14},{2,3,4,8,10,12,13,14,15},{2,3,4,8,10,12,13,15},{2,3,4,8,10,12,14},{2,3,4,8,10,12,14,15},{2,3,4,8,10,12,15},{2,3,4,8,10,13},{2,3,4,8,10,13,14},{2,3,4,8,10,13,14,15},{2,3,4,8,10,13,15},{2,3,4,8,10,14},{2,3,4,8,10,14,15},{2,3,4,8,10,15},{2,3,4,8,11},{2,3,4,8,11,12},{2,3,4,8,11,12,13},{2,3,4,8,11,12,13,14},{2,3,4,8,11,12,13,14,15},{2,3,4,8,11,12,13,15},{2,3,4,8,11,12,14},{2,3,4,8,11,12,14,15},{2,3,4,8,11,12,15},{2,3,4,8,11,13},{2,3,4,8,11,13,14},{2,3,4,8,11,13,14,15},{2,3,4,8,11,13,15},{2,3,4,8,11,14},{2,3,4,8,11,14,15},{2,3,4,8,11,15},{2,3,4,8,12},{2,3,4,8,12,13},{2,3,4,8,12,13,14},{2,3,4,8,12,13,14,15},{2,3,4,8,12,13,15},{2,3,4,8,12,14},{2,3,4,8,12,14,15},{2,3,4,8,12,15},{2,3,4,8,13},{2,3,4,8,13,14},{2,3,4,8,13,14,15},{2,3,4,8,13,15},{2,3,4,8,14},{2,3,4,8,14,15},{2,3,4,8,15},{2,3,4,9},{2,3,4,9,10},{2,3,4,9,10,11},{2,3,4,9,10,11,12},{2,3,4,9,10,11,12,13},{2,3,4,9,10,11,12,13,14},{2,3,4,9,10,11,12,13,14,15},{2,3,4,9,10,11,12,13,15},{2,3,4,9,10,11,12,14},{2,3,4,9,10,11,12,14,15},{2,3,4,9,10,11,12,15},{2,3,4,9,10,11,13},{2,3,4,9,10,11,13,14},{2,3,4,9,10,11,13,14,15},{2,3,4,9,10,11,13,15},{2,3,4,9,10,11,14},{2,3,4,9,10,11,14,15},{2,3,4,9,10,11,15},{2,3,4,9,10,12},{2,3,4,9,10,12,13},{2,3,4,9,10,12,13,14},{2,3,4,9,10,12,13,14,15},{2,3,4,9,10,12,13,15},{2,3,4,9,10,12,14},{2,3,4,9,10,12,14,15},{2,3,4,9,10,12,15},{2,3,4,9,10,13},{2,3,4,9,10,13,14},{2,3,4,9,10,13,14,15},{2,3,4,9,10,13,15},{2,3,4,9,10,14},{2,3,4,9,10,14,15},{2,3,4,9,10,15},{2,3,4,9,11},{2,3,4,9,11,12},{2,3,4,9,11,12,13},{2,3,4,9,11,12,13,14},{2,3,4,9,11,12,13,14,15},{2,3,4,9,11,12,13,15},{2,3,4,9,11,12,14},{2,3,4,9,11,12,14,15},{2,3,4,9,11,12,15},{2,3,4,9,11,13},{2,3,4,9,11,13,14},{2,3,4,9,11,13,14,15},{2,3,4,9,11,13,15},{2,3,4,9,11,14},{2,3,4,9,11,14,15},{2,3,4,9,11,15},{2,3,4,9,12},{2,3,4,9,12,13},{2,3,4,9,12,13,14},{2,3,4,9,12,13,14,15},{2,3,4,9,12,13,15},{2,3,4,9,12,14},{2,3,4,9,12,14,15},{2,3,4,9,12,15},{2,3,4,9,13},{2,3,4,9,13,14},{2,3,4,9,13,14,15},{2,3,4,9,13,15},{2,3,4,9,14},{2,3,4,9,14,15},{2,3,4,9,15},{2,3,4,10},{2,3,4,10,11},{2,3,4,10,11,12},{2,3,4,10,11,12,13},{2,3,4,10,11,12,13,14},{2,3,4,10,11,12,13,14,15},{2,3,4,10,11,12,13,15},{2,3,4,10,11,12,14},{2,3,4,10,11,12,14,15},{2,3,4,10,11,12,15},{2,3,4,10,11,13},{2,3,4,10,11,13,14},{2,3,4,10,11,13,14,15},{2,3,4,10,11,13,15},{2,3,4,10,11,14},{2,3,4,10,11,14,15},{2,3,4,10,11,15},{2,3,4,10,12},{2,3,4,10,12,13},{2,3,4,10,12,13,14},{2,3,4,10,12,13,14,15},{2,3,4,10,12,13,15},{2,3,4,10,12,14},{2,3,4,10,12,14,15},{2,3,4,10,12,15},{2,3,4,10,13},{2,3,4,10,13,14},{2,3,4,10,13,14,15},{2,3,4,10,13,15},{2,3,4,10,14},{2,3,4,10,14,15},{2,3,4,10,15},{2,3,4,11},{2,3,4,11,12},{2,3,4,11,12,13},{2,3,4,11,12,13,14},{2,3,4,11,12,13,14,15},{2,3,4,11,12,13,15},{2,3,4,11,12,14},{2,3,4,11,12,14,15},{2,3,4,11,12,15},{2,3,4,11,13},{2,3,4,11,13,14},{2,3,4,11,13,14,15},{2,3,4,11,13,15},{2,3,4,11,14},{2,3,4,11,14,15},{2,3,4,11,15},{2,3,4,12},{2,3,4,12,13},{2,3,4,12,13,14},{2,3,4,12,13,14,15},{2,3,4,12,13,15},{2,3,4,12,14},{2,3,4,12,14,15},{2,3,4,12,15},{2,3,4,13},{2,3,4,13,14},{2,3,4,13,14,15},{2,3,4,13,15},{2,3,4,14},{2,3,4,14,15},{2,3,4,15},{2,3,5},{2,3,5,6},{2,3,5,6,7},{2,3,5,6,7,8},{2,3,5,6,7,8,9},{2,3,5,6,7,8,9,10},{2,3,5,6,7,8,9,10,11},{2,3,5,6,7,8,9,10,11,12},{2,3,5,6,7,8,9,10,11,12,13},{2,3,5,6,7,8,9,10,11,12,13,14},{2,3,5,6,7,8,9,10,11,12,13,14,15},{2,3,5,6,7,8,9,10,11,12,13,15},{2,3,5,6,7,8,9,10,11,12,14},{2,3,5,6,7,8,9,10,11,12,14,15},{2,3,5,6,7,8,9,10,11,12,15},{2,3,5,6,7,8,9,10,11,13},{2,3,5,6,7,8,9,10,11,13,14},{2,3,5,6,7,8,9,10,11,13,14,15},{2,3,5,6,7,8,9,10,11,13,15},{2,3,5,6,7,8,9,10,11,14},{2,3,5,6,7,8,9,10,11,14,15},{2,3,5,6,7,8,9,10,11,15},{2,3,5,6,7,8,9,10,12},{2,3,5,6,7,8,9,10,12,13},{2,3,5,6,7,8,9,10,12,13,14},{2,3,5,6,7,8,9,10,12,13,14,15},{2,3,5,6,7,8,9,10,12,13,15},{2,3,5,6,7,8,9,10,12,14},{2,3,5,6,7,8,9,10,12,14,15},{2,3,5,6,7,8,9,10,12,15},{2,3,5,6,7,8,9,10,13},{2,3,5,6,7,8,9,10,13,14},{2,3,5,6,7,8,9,10,13,14,15},{2,3,5,6,7,8,9,10,13,15},{2,3,5,6,7,8,9,10,14},{2,3,5,6,7,8,9,10,14,15},{2,3,5,6,7,8,9,10,15},{2,3,5,6,7,8,9,11},{2,3,5,6,7,8,9,11,12},{2,3,5,6,7,8,9,11,12,13},{2,3,5,6,7,8,9,11,12,13,14},{2,3,5,6,7,8,9,11,12,13,14,15},{2,3,5,6,7,8,9,11,12,13,15},{2,3,5,6,7,8,9,11,12,14},{2,3,5,6,7,8,9,11,12,14,15},{2,3,5,6,7,8,9,11,12,15},{2,3,5,6,7,8,9,11,13},{2,3,5,6,7,8,9,11,13,14},{2,3,5,6,7,8,9,11,13,14,15},{2,3,5,6,7,8,9,11,13,15},{2,3,5,6,7,8,9,11,14},{2,3,5,6,7,8,9,11,14,15},{2,3,5,6,7,8,9,11,15},{2,3,5,6,7,8,9,12},{2,3,5,6,7,8,9,12,13},{2,3,5,6,7,8,9,12,13,14},{2,3,5,6,7,8,9,12,13,14,15},{2,3,5,6,7,8,9,12,13,15},{2,3,5,6,7,8,9,12,14},{2,3,5,6,7,8,9,12,14,15},{2,3,5,6,7,8,9,12,15},{2,3,5,6,7,8,9,13},{2,3,5,6,7,8,9,13,14},{2,3,5,6,7,8,9,13,14,15},{2,3,5,6,7,8,9,13,15},{2,3,5,6,7,8,9,14},{2,3,5,6,7,8,9,14,15},{2,3,5,6,7,8,9,15},{2,3,5,6,7,8,10},{2,3,5,6,7,8,10,11},{2,3,5,6,7,8,10,11,12},{2,3,5,6,7,8,10,11,12,13},{2,3,5,6,7,8,10,11,12,13,14},{2,3,5,6,7,8,10,11,12,13,14,15},{2,3,5,6,7,8,10,11,12,13,15},{2,3,5,6,7,8,10,11,12,14},{2,3,5,6,7,8,10,11,12,14,15},{2,3,5,6,7,8,10,11,12,15},{2,3,5,6,7,8,10,11,13},{2,3,5,6,7,8,10,11,13,14},{2,3,5,6,7,8,10,11,13,14,15},{2,3,5,6,7,8,10,11,13,15},{2,3,5,6,7,8,10,11,14},{2,3,5,6,7,8,10,11,14,15},{2,3,5,6,7,8,10,11,15},{2,3,5,6,7,8,10,12},{2,3,5,6,7,8,10,12,13},{2,3,5,6,7,8,10,12,13,14},{2,3,5,6,7,8,10,12,13,14,15},{2,3,5,6,7,8,10,12,13,15},{2,3,5,6,7,8,10,12,14},{2,3,5,6,7,8,10,12,14,15},{2,3,5,6,7,8,10,12,15},{2,3,5,6,7,8,10,13},{2,3,5,6,7,8,10,13,14},{2,3,5,6,7,8,10,13,14,15},{2,3,5,6,7,8,10,13,15},{2,3,5,6,7,8,10,14},{2,3,5,6,7,8,10,14,15},{2,3,5,6,7,8,10,15},{2,3,5,6,7,8,11},{2,3,5,6,7,8,11,12},{2,3,5,6,7,8,11,12,13},{2,3,5,6,7,8,11,12,13,14},{2,3,5,6,7,8,11,12,13,14,15},{2,3,5,6,7,8,11,12,13,15},{2,3,5,6,7,8,11,12,14},{2,3,5,6,7,8,11,12,14,15},{2,3,5,6,7,8,11,12,15},{2,3,5,6,7,8,11,13},{2,3,5,6,7,8,11,13,14},{2,3,5,6,7,8,11,13,14,15},{2,3,5,6,7,8,11,13,15},{2,3,5,6,7,8,11,14},{2,3,5,6,7,8,11,14,15},{2,3,5,6,7,8,11,15},{2,3,5,6,7,8,12},{2,3,5,6,7,8,12,13},{2,3,5,6,7,8,12,13,14},{2,3,5,6,7,8,12,13,14,15},{2,3,5,6,7,8,12,13,15},{2,3,5,6,7,8,12,14},{2,3,5,6,7,8,12,14,15},{2,3,5,6,7,8,12,15},{2,3,5,6,7,8,13},{2,3,5,6,7,8,13,14},{2,3,5,6,7,8,13,14,15},{2,3,5,6,7,8,13,15},{2,3,5,6,7,8,14},{2,3,5,6,7,8,14,15},{2,3,5,6,7,8,15},{2,3,5,6,7,9},{2,3,5,6,7,9,10},{2,3,5,6,7,9,10,11},{2,3,5,6,7,9,10,11,12},{2,3,5,6,7,9,10,11,12,13},{2,3,5,6,7,9,10,11,12,13,14},{2,3,5,6,7,9,10,11,12,13,14,15},{2,3,5,6,7,9,10,11,12,13,15},{2,3,5,6,7,9,10,11,12,14},{2,3,5,6,7,9,10,11,12,14,15},{2,3,5,6,7,9,10,11,12,15},{2,3,5,6,7,9,10,11,13},{2,3,5,6,7,9,10,11,13,14},{2,3,5,6,7,9,10,11,13,14,15},{2,3,5,6,7,9,10,11,13,15},{2,3,5,6,7,9,10,11,14},{2,3,5,6,7,9,10,11,14,15},{2,3,5,6,7,9,10,11,15},{2,3,5,6,7,9,10,12},{2,3,5,6,7,9,10,12,13},{2,3,5,6,7,9,10,12,13,14},{2,3,5,6,7,9,10,12,13,14,15},{2,3,5,6,7,9,10,12,13,15},{2,3,5,6,7,9,10,12,14},{2,3,5,6,7,9,10,12,14,15},{2,3,5,6,7,9,10,12,15},{2,3,5,6,7,9,10,13},{2,3,5,6,7,9,10,13,14},{2,3,5,6,7,9,10,13,14,15},{2,3,5,6,7,9,10,13,15},{2,3,5,6,7,9,10,14},{2,3,5,6,7,9,10,14,15},{2,3,5,6,7,9,10,15},{2,3,5,6,7,9,11},{2,3,5,6,7,9,11,12},{2,3,5,6,7,9,11,12,13},{2,3,5,6,7,9,11,12,13,14},{2,3,5,6,7,9,11,12,13,14,15},{2,3,5,6,7,9,11,12,13,15},{2,3,5,6,7,9,11,12,14},{2,3,5,6,7,9,11,12,14,15},{2,3,5,6,7,9,11,12,15},{2,3,5,6,7,9,11,13},{2,3,5,6,7,9,11,13,14},{2,3,5,6,7,9,11,13,14,15},{2,3,5,6,7,9,11,13,15},{2,3,5,6,7,9,11,14},{2,3,5,6,7,9,11,14,15},{2,3,5,6,7,9,11,15},{2,3,5,6,7,9,12},{2,3,5,6,7,9,12,13},{2,3,5,6,7,9,12,13,14},{2,3,5,6,7,9,12,13,14,15},{2,3,5,6,7,9,12,13,15},{2,3,5,6,7,9,12,14},{2,3,5,6,7,9,12,14,15},{2,3,5,6,7,9,12,15},{2,3,5,6,7,9,13},{2,3,5,6,7,9,13,14},{2,3,5,6,7,9,13,14,15},{2,3,5,6,7,9,13,15},{2,3,5,6,7,9,14},{2,3,5,6,7,9,14,15},{2,3,5,6,7,9,15},{2,3,5,6,7,10},{2,3,5,6,7,10,11},{2,3,5,6,7,10,11,12},{2,3,5,6,7,10,11,12,13},{2,3,5,6,7,10,11,12,13,14},{2,3,5,6,7,10,11,12,13,14,15},{2,3,5,6,7,10,11,12,13,15},{2,3,5,6,7,10,11,12,14},{2,3,5,6,7,10,11,12,14,15},{2,3,5,6,7,10,11,12,15},{2,3,5,6,7,10,11,13},{2,3,5,6,7,10,11,13,14},{2,3,5,6,7,10,11,13,14,15},{2,3,5,6,7,10,11,13,15},{2,3,5,6,7,10,11,14},{2,3,5,6,7,10,11,14,15},{2,3,5,6,7,10,11,15},{2,3,5,6,7,10,12},{2,3,5,6,7,10,12,13},{2,3,5,6,7,10,12,13,14},{2,3,5,6,7,10,12,13,14,15},{2,3,5,6,7,10,12,13,15},{2,3,5,6,7,10,12,14},{2,3,5,6,7,10,12,14,15},{2,3,5,6,7,10,12,15},{2,3,5,6,7,10,13},{2,3,5,6,7,10,13,14},{2,3,5,6,7,10,13,14,15},{2,3,5,6,7,10,13,15},{2,3,5,6,7,10,14},{2,3,5,6,7,10,14,15},{2,3,5,6,7,10,15},{2,3,5,6,7,11},{2,3,5,6,7,11,12},{2,3,5,6,7,11,12,13},{2,3,5,6,7,11,12,13,14},{2,3,5,6,7,11,12,13,14,15},{2,3,5,6,7,11,12,13,15},{2,3,5,6,7,11,12,14},{2,3,5,6,7,11,12,14,15},{2,3,5,6,7,11,12,15},{2,3,5,6,7,11,13},{2,3,5,6,7,11,13,14},{2,3,5,6,7,11,13,14,15},{2,3,5,6,7,11,13,15},{2,3,5,6,7,11,14},{2,3,5,6,7,11,14,15},{2,3,5,6,7,11,15},{2,3,5,6,7,12},{2,3,5,6,7,12,13},{2,3,5,6,7,12,13,14},{2,3,5,6,7,12,13,14,15},{2,3,5,6,7,12,13,15},{2,3,5,6,7,12,14},{2,3,5,6,7,12,14,15},{2,3,5,6,7,12,15},{2,3,5,6,7,13},{2,3,5,6,7,13,14},{2,3,5,6,7,13,14,15},{2,3,5,6,7,13,15},{2,3,5,6,7,14},{2,3,5,6,7,14,15},{2,3,5,6,7,15},{2,3,5,6,8},{2,3,5,6,8,9},{2,3,5,6,8,9,10},{2,3,5,6,8,9,10,11},{2,3,5,6,8,9,10,11,12},{2,3,5,6,8,9,10,11,12,13},{2,3,5,6,8,9,10,11,12,13,14},{2,3,5,6,8,9,10,11,12,13,14,15},{2,3,5,6,8,9,10,11,12,13,15},{2,3,5,6,8,9,10,11,12,14},{2,3,5,6,8,9,10,11,12,14,15},{2,3,5,6,8,9,10,11,12,15},{2,3,5,6,8,9,10,11,13},{2,3,5,6,8,9,10,11,13,14},{2,3,5,6,8,9,10,11,13,14,15},{2,3,5,6,8,9,10,11,13,15},{2,3,5,6,8,9,10,11,14},{2,3,5,6,8,9,10,11,14,15},{2,3,5,6,8,9,10,11,15},{2,3,5,6,8,9,10,12},{2,3,5,6,8,9,10,12,13},{2,3,5,6,8,9,10,12,13,14},{2,3,5,6,8,9,10,12,13,14,15},{2,3,5,6,8,9,10,12,13,15},{2,3,5,6,8,9,10,12,14},{2,3,5,6,8,9,10,12,14,15},{2,3,5,6,8,9,10,12,15},{2,3,5,6,8,9,10,13},{2,3,5,6,8,9,10,13,14},{2,3,5,6,8,9,10,13,14,15},{2,3,5,6,8,9,10,13,15},{2,3,5,6,8,9,10,14},{2,3,5,6,8,9,10,14,15},{2,3,5,6,8,9,10,15},{2,3,5,6,8,9,11},{2,3,5,6,8,9,11,12},{2,3,5,6,8,9,11,12,13},{2,3,5,6,8,9,11,12,13,14},{2,3,5,6,8,9,11,12,13,14,15},{2,3,5,6,8,9,11,12,13,15},{2,3,5,6,8,9,11,12,14},{2,3,5,6,8,9,11,12,14,15},{2,3,5,6,8,9,11,12,15},{2,3,5,6,8,9,11,13},{2,3,5,6,8,9,11,13,14},{2,3,5,6,8,9,11,13,14,15},{2,3,5,6,8,9,11,13,15},{2,3,5,6,8,9,11,14},{2,3,5,6,8,9,11,14,15},{2,3,5,6,8,9,11,15},{2,3,5,6,8,9,12},{2,3,5,6,8,9,12,13},{2,3,5,6,8,9,12,13,14},{2,3,5,6,8,9,12,13,14,15},{2,3,5,6,8,9,12,13,15},{2,3,5,6,8,9,12,14},{2,3,5,6,8,9,12,14,15},{2,3,5,6,8,9,12,15},{2,3,5,6,8,9,13},{2,3,5,6,8,9,13,14},{2,3,5,6,8,9,13,14,15},{2,3,5,6,8,9,13,15},{2,3,5,6,8,9,14},{2,3,5,6,8,9,14,15},{2,3,5,6,8,9,15},{2,3,5,6,8,10},{2,3,5,6,8,10,11},{2,3,5,6,8,10,11,12},{2,3,5,6,8,10,11,12,13},{2,3,5,6,8,10,11,12,13,14},{2,3,5,6,8,10,11,12,13,14,15},{2,3,5,6,8,10,11,12,13,15},{2,3,5,6,8,10,11,12,14},{2,3,5,6,8,10,11,12,14,15},{2,3,5,6,8,10,11,12,15},{2,3,5,6,8,10,11,13},{2,3,5,6,8,10,11,13,14},{2,3,5,6,8,10,11,13,14,15},{2,3,5,6,8,10,11,13,15},{2,3,5,6,8,10,11,14},{2,3,5,6,8,10,11,14,15},{2,3,5,6,8,10,11,15},{2,3,5,6,8,10,12},{2,3,5,6,8,10,12,13},{2,3,5,6,8,10,12,13,14},{2,3,5,6,8,10,12,13,14,15},{2,3,5,6,8,10,12,13,15},{2,3,5,6,8,10,12,14},{2,3,5,6,8,10,12,14,15},{2,3,5,6,8,10,12,15},{2,3,5,6,8,10,13},{2,3,5,6,8,10,13,14},{2,3,5,6,8,10,13,14,15},{2,3,5,6,8,10,13,15},{2,3,5,6,8,10,14},{2,3,5,6,8,10,14,15},{2,3,5,6,8,10,15},{2,3,5,6,8,11},{2,3,5,6,8,11,12},{2,3,5,6,8,11,12,13},{2,3,5,6,8,11,12,13,14},{2,3,5,6,8,11,12,13,14,15},{2,3,5,6,8,11,12,13,15},{2,3,5,6,8,11,12,14},{2,3,5,6,8,11,12,14,15},{2,3,5,6,8,11,12,15},{2,3,5,6,8,11,13},{2,3,5,6,8,11,13,14},{2,3,5,6,8,11,13,14,15},{2,3,5,6,8,11,13,15},{2,3,5,6,8,11,14},{2,3,5,6,8,11,14,15},{2,3,5,6,8,11,15},{2,3,5,6,8,12},{2,3,5,6,8,12,13},{2,3,5,6,8,12,13,14},{2,3,5,6,8,12,13,14,15},{2,3,5,6,8,12,13,15},{2,3,5,6,8,12,14},{2,3,5,6,8,12,14,15},{2,3,5,6,8,12,15},{2,3,5,6,8,13},{2,3,5,6,8,13,14},{2,3,5,6,8,13,14,15},{2,3,5,6,8,13,15},{2,3,5,6,8,14},{2,3,5,6,8,14,15},{2,3,5,6,8,15},{2,3,5,6,9},{2,3,5,6,9,10},{2,3,5,6,9,10,11},{2,3,5,6,9,10,11,12},{2,3,5,6,9,10,11,12,13},{2,3,5,6,9,10,11,12,13,14},{2,3,5,6,9,10,11,12,13,14,15},{2,3,5,6,9,10,11,12,13,15},{2,3,5,6,9,10,11,12,14},{2,3,5,6,9,10,11,12,14,15},{2,3,5,6,9,10,11,12,15},{2,3,5,6,9,10,11,13},{2,3,5,6,9,10,11,13,14},{2,3,5,6,9,10,11,13,14,15},{2,3,5,6,9,10,11,13,15},{2,3,5,6,9,10,11,14},{2,3,5,6,9,10,11,14,15},{2,3,5,6,9,10,11,15},{2,3,5,6,9,10,12},{2,3,5,6,9,10,12,13},{2,3,5,6,9,10,12,13,14},{2,3,5,6,9,10,12,13,14,15},{2,3,5,6,9,10,12,13,15},{2,3,5,6,9,10,12,14},{2,3,5,6,9,10,12,14,15},{2,3,5,6,9,10,12,15},{2,3,5,6,9,10,13},{2,3,5,6,9,10,13,14},{2,3,5,6,9,10,13,14,15},{2,3,5,6,9,10,13,15},{2,3,5,6,9,10,14},{2,3,5,6,9,10,14,15},{2,3,5,6,9,10,15},{2,3,5,6,9,11},{2,3,5,6,9,11,12},{2,3,5,6,9,11,12,13},{2,3,5,6,9,11,12,13,14},{2,3,5,6,9,11,12,13,14,15},{2,3,5,6,9,11,12,13,15},{2,3,5,6,9,11,12,14},{2,3,5,6,9,11,12,14,15},{2,3,5,6,9,11,12,15},{2,3,5,6,9,11,13},{2,3,5,6,9,11,13,14},{2,3,5,6,9,11,13,14,15},{2,3,5,6,9,11,13,15},{2,3,5,6,9,11,14},{2,3,5,6,9,11,14,15},{2,3,5,6,9,11,15},{2,3,5,6,9,12},{2,3,5,6,9,12,13},{2,3,5,6,9,12,13,14},{2,3,5,6,9,12,13,14,15},{2,3,5,6,9,12,13,15},{2,3,5,6,9,12,14},{2,3,5,6,9,12,14,15},{2,3,5,6,9,12,15},{2,3,5,6,9,13},{2,3,5,6,9,13,14},{2,3,5,6,9,13,14,15},{2,3,5,6,9,13,15},{2,3,5,6,9,14},{2,3,5,6,9,14,15},{2,3,5,6,9,15},{2,3,5,6,10},{2,3,5,6,10,11},{2,3,5,6,10,11,12},{2,3,5,6,10,11,12,13},{2,3,5,6,10,11,12,13,14},{2,3,5,6,10,11,12,13,14,15},{2,3,5,6,10,11,12,13,15},{2,3,5,6,10,11,12,14},{2,3,5,6,10,11,12,14,15},{2,3,5,6,10,11,12,15},{2,3,5,6,10,11,13},{2,3,5,6,10,11,13,14},{2,3,5,6,10,11,13,14,15},{2,3,5,6,10,11,13,15},{2,3,5,6,10,11,14},{2,3,5,6,10,11,14,15},{2,3,5,6,10,11,15},{2,3,5,6,10,12},{2,3,5,6,10,12,13},{2,3,5,6,10,12,13,14},{2,3,5,6,10,12,13,14,15},{2,3,5,6,10,12,13,15},{2,3,5,6,10,12,14},{2,3,5,6,10,12,14,15},{2,3,5,6,10,12,15},{2,3,5,6,10,13},{2,3,5,6,10,13,14},{2,3,5,6,10,13,14,15},{2,3,5,6,10,13,15},{2,3,5,6,10,14},{2,3,5,6,10,14,15},{2,3,5,6,10,15},{2,3,5,6,11},{2,3,5,6,11,12},{2,3,5,6,11,12,13},{2,3,5,6,11,12,13,14},{2,3,5,6,11,12,13,14,15},{2,3,5,6,11,12,13,15},{2,3,5,6,11,12,14},{2,3,5,6,11,12,14,15},{2,3,5,6,11,12,15},{2,3,5,6,11,13},{2,3,5,6,11,13,14},{2,3,5,6,11,13,14,15},{2,3,5,6,11,13,15},{2,3,5,6,11,14},{2,3,5,6,11,14,15},{2,3,5,6,11,15},{2,3,5,6,12},{2,3,5,6,12,13},{2,3,5,6,12,13,14},{2,3,5,6,12,13,14,15},{2,3,5,6,12,13,15},{2,3,5,6,12,14},{2,3,5,6,12,14,15},{2,3,5,6,12,15},{2,3,5,6,13},{2,3,5,6,13,14},{2,3,5,6,13,14,15},{2,3,5,6,13,15},{2,3,5,6,14},{2,3,5,6,14,15},{2,3,5,6,15},{2,3,5,7},{2,3,5,7,8},{2,3,5,7,8,9},{2,3,5,7,8,9,10},{2,3,5,7,8,9,10,11},{2,3,5,7,8,9,10,11,12},{2,3,5,7,8,9,10,11,12,13},{2,3,5,7,8,9,10,11,12,13,14},{2,3,5,7,8,9,10,11,12,13,14,15},{2,3,5,7,8,9,10,11,12,13,15},{2,3,5,7,8,9,10,11,12,14},{2,3,5,7,8,9,10,11,12,14,15},{2,3,5,7,8,9,10,11,12,15},{2,3,5,7,8,9,10,11,13},{2,3,5,7,8,9,10,11,13,14},{2,3,5,7,8,9,10,11,13,14,15},{2,3,5,7,8,9,10,11,13,15},{2,3,5,7,8,9,10,11,14},{2,3,5,7,8,9,10,11,14,15},{2,3,5,7,8,9,10,11,15},{2,3,5,7,8,9,10,12},{2,3,5,7,8,9,10,12,13},{2,3,5,7,8,9,10,12,13,14},{2,3,5,7,8,9,10,12,13,14,15},{2,3,5,7,8,9,10,12,13,15},{2,3,5,7,8,9,10,12,14},{2,3,5,7,8,9,10,12,14,15},{2,3,5,7,8,9,10,12,15},{2,3,5,7,8,9,10,13},{2,3,5,7,8,9,10,13,14},{2,3,5,7,8,9,10,13,14,15},{2,3,5,7,8,9,10,13,15},{2,3,5,7,8,9,10,14},{2,3,5,7,8,9,10,14,15},{2,3,5,7,8,9,10,15},{2,3,5,7,8,9,11},{2,3,5,7,8,9,11,12},{2,3,5,7,8,9,11,12,13},{2,3,5,7,8,9,11,12,13,14},{2,3,5,7,8,9,11,12,13,14,15},{2,3,5,7,8,9,11,12,13,15},{2,3,5,7,8,9,11,12,14},{2,3,5,7,8,9,11,12,14,15},{2,3,5,7,8,9,11,12,15},{2,3,5,7,8,9,11,13},{2,3,5,7,8,9,11,13,14},{2,3,5,7,8,9,11,13,14,15},{2,3,5,7,8,9,11,13,15},{2,3,5,7,8,9,11,14},{2,3,5,7,8,9,11,14,15},{2,3,5,7,8,9,11,15},{2,3,5,7,8,9,12},{2,3,5,7,8,9,12,13},{2,3,5,7,8,9,12,13,14},{2,3,5,7,8,9,12,13,14,15},{2,3,5,7,8,9,12,13,15},{2,3,5,7,8,9,12,14},{2,3,5,7,8,9,12,14,15},{2,3,5,7,8,9,12,15},{2,3,5,7,8,9,13},{2,3,5,7,8,9,13,14},{2,3,5,7,8,9,13,14,15},{2,3,5,7,8,9,13,15},{2,3,5,7,8,9,14},{2,3,5,7,8,9,14,15},{2,3,5,7,8,9,15},{2,3,5,7,8,10},{2,3,5,7,8,10,11},{2,3,5,7,8,10,11,12},{2,3,5,7,8,10,11,12,13},{2,3,5,7,8,10,11,12,13,14},{2,3,5,7,8,10,11,12,13,14,15},{2,3,5,7,8,10,11,12,13,15},{2,3,5,7,8,10,11,12,14},{2,3,5,7,8,10,11,12,14,15},{2,3,5,7,8,10,11,12,15},{2,3,5,7,8,10,11,13},{2,3,5,7,8,10,11,13,14},{2,3,5,7,8,10,11,13,14,15},{2,3,5,7,8,10,11,13,15},{2,3,5,7,8,10,11,14},{2,3,5,7,8,10,11,14,15},{2,3,5,7,8,10,11,15},{2,3,5,7,8,10,12},{2,3,5,7,8,10,12,13},{2,3,5,7,8,10,12,13,14},{2,3,5,7,8,10,12,13,14,15},{2,3,5,7,8,10,12,13,15},{2,3,5,7,8,10,12,14},{2,3,5,7,8,10,12,14,15},{2,3,5,7,8,10,12,15},{2,3,5,7,8,10,13},{2,3,5,7,8,10,13,14},{2,3,5,7,8,10,13,14,15},{2,3,5,7,8,10,13,15},{2,3,5,7,8,10,14},{2,3,5,7,8,10,14,15},{2,3,5,7,8,10,15},{2,3,5,7,8,11},{2,3,5,7,8,11,12},{2,3,5,7,8,11,12,13},{2,3,5,7,8,11,12,13,14},{2,3,5,7,8,11,12,13,14,15},{2,3,5,7,8,11,12,13,15},{2,3,5,7,8,11,12,14},{2,3,5,7,8,11,12,14,15},{2,3,5,7,8,11,12,15},{2,3,5,7,8,11,13},{2,3,5,7,8,11,13,14},{2,3,5,7,8,11,13,14,15},{2,3,5,7,8,11,13,15},{2,3,5,7,8,11,14},{2,3,5,7,8,11,14,15},{2,3,5,7,8,11,15},{2,3,5,7,8,12},{2,3,5,7,8,12,13},{2,3,5,7,8,12,13,14},{2,3,5,7,8,12,13,14,15},{2,3,5,7,8,12,13,15},{2,3,5,7,8,12,14},{2,3,5,7,8,12,14,15},{2,3,5,7,8,12,15},{2,3,5,7,8,13},{2,3,5,7,8,13,14},{2,3,5,7,8,13,14,15},{2,3,5,7,8,13,15},{2,3,5,7,8,14},{2,3,5,7,8,14,15},{2,3,5,7,8,15},{2,3,5,7,9},{2,3,5,7,9,10},{2,3,5,7,9,10,11},{2,3,5,7,9,10,11,12},{2,3,5,7,9,10,11,12,13},{2,3,5,7,9,10,11,12,13,14},{2,3,5,7,9,10,11,12,13,14,15},{2,3,5,7,9,10,11,12,13,15},{2,3,5,7,9,10,11,12,14},{2,3,5,7,9,10,11,12,14,15},{2,3,5,7,9,10,11,12,15},{2,3,5,7,9,10,11,13},{2,3,5,7,9,10,11,13,14},{2,3,5,7,9,10,11,13,14,15},{2,3,5,7,9,10,11,13,15},{2,3,5,7,9,10,11,14},{2,3,5,7,9,10,11,14,15},{2,3,5,7,9,10,11,15},{2,3,5,7,9,10,12},{2,3,5,7,9,10,12,13},{2,3,5,7,9,10,12,13,14},{2,3,5,7,9,10,12,13,14,15},{2,3,5,7,9,10,12,13,15},{2,3,5,7,9,10,12,14},{2,3,5,7,9,10,12,14,15},{2,3,5,7,9,10,12,15},{2,3,5,7,9,10,13},{2,3,5,7,9,10,13,14},{2,3,5,7,9,10,13,14,15},{2,3,5,7,9,10,13,15},{2,3,5,7,9,10,14},{2,3,5,7,9,10,14,15},{2,3,5,7,9,10,15},{2,3,5,7,9,11},{2,3,5,7,9,11,12},{2,3,5,7,9,11,12,13},{2,3,5,7,9,11,12,13,14},{2,3,5,7,9,11,12,13,14,15},{2,3,5,7,9,11,12,13,15},{2,3,5,7,9,11,12,14},{2,3,5,7,9,11,12,14,15},{2,3,5,7,9,11,12,15},{2,3,5,7,9,11,13},{2,3,5,7,9,11,13,14},{2,3,5,7,9,11,13,14,15},{2,3,5,7,9,11,13,15},{2,3,5,7,9,11,14},{2,3,5,7,9,11,14,15},{2,3,5,7,9,11,15},{2,3,5,7,9,12},{2,3,5,7,9,12,13},{2,3,5,7,9,12,13,14},{2,3,5,7,9,12,13,14,15},{2,3,5,7,9,12,13,15},{2,3,5,7,9,12,14},{2,3,5,7,9,12,14,15},{2,3,5,7,9,12,15},{2,3,5,7,9,13},{2,3,5,7,9,13,14},{2,3,5,7,9,13,14,15},{2,3,5,7,9,13,15},{2,3,5,7,9,14},{2,3,5,7,9,14,15},{2,3,5,7,9,15},{2,3,5,7,10},{2,3,5,7,10,11},{2,3,5,7,10,11,12},{2,3,5,7,10,11,12,13},{2,3,5,7,10,11,12,13,14},{2,3,5,7,10,11,12,13,14,15},{2,3,5,7,10,11,12,13,15},{2,3,5,7,10,11,12,14},{2,3,5,7,10,11,12,14,15},{2,3,5,7,10,11,12,15},{2,3,5,7,10,11,13},{2,3,5,7,10,11,13,14},{2,3,5,7,10,11,13,14,15},{2,3,5,7,10,11,13,15},{2,3,5,7,10,11,14},{2,3,5,7,10,11,14,15},{2,3,5,7,10,11,15},{2,3,5,7,10,12},{2,3,5,7,10,12,13},{2,3,5,7,10,12,13,14},{2,3,5,7,10,12,13,14,15},{2,3,5,7,10,12,13,15},{2,3,5,7,10,12,14},{2,3,5,7,10,12,14,15},{2,3,5,7,10,12,15},{2,3,5,7,10,13},{2,3,5,7,10,13,14},{2,3,5,7,10,13,14,15},{2,3,5,7,10,13,15},{2,3,5,7,10,14},{2,3,5,7,10,14,15},{2,3,5,7,10,15},{2,3,5,7,11},{2,3,5,7,11,12},{2,3,5,7,11,12,13},{2,3,5,7,11,12,13,14},{2,3,5,7,11,12,13,14,15},{2,3,5,7,11,12,13,15},{2,3,5,7,11,12,14},{2,3,5,7,11,12,14,15},{2,3,5,7,11,12,15},{2,3,5,7,11,13},{2,3,5,7,11,13,14},{2,3,5,7,11,13,14,15},{2,3,5,7,11,13,15},{2,3,5,7,11,14},{2,3,5,7,11,14,15},{2,3,5,7,11,15},{2,3,5,7,12},{2,3,5,7,12,13},{2,3,5,7,12,13,14},{2,3,5,7,12,13,14,15},{2,3,5,7,12,13,15},{2,3,5,7,12,14},{2,3,5,7,12,14,15},{2,3,5,7,12,15},{2,3,5,7,13},{2,3,5,7,13,14},{2,3,5,7,13,14,15},{2,3,5,7,13,15},{2,3,5,7,14},{2,3,5,7,14,15},{2,3,5,7,15},{2,3,5,8},{2,3,5,8,9},{2,3,5,8,9,10},{2,3,5,8,9,10,11},{2,3,5,8,9,10,11,12},{2,3,5,8,9,10,11,12,13},{2,3,5,8,9,10,11,12,13,14},{2,3,5,8,9,10,11,12,13,14,15},{2,3,5,8,9,10,11,12,13,15},{2,3,5,8,9,10,11,12,14},{2,3,5,8,9,10,11,12,14,15},{2,3,5,8,9,10,11,12,15},{2,3,5,8,9,10,11,13},{2,3,5,8,9,10,11,13,14},{2,3,5,8,9,10,11,13,14,15},{2,3,5,8,9,10,11,13,15},{2,3,5,8,9,10,11,14},{2,3,5,8,9,10,11,14,15},{2,3,5,8,9,10,11,15},{2,3,5,8,9,10,12},{2,3,5,8,9,10,12,13},{2,3,5,8,9,10,12,13,14},{2,3,5,8,9,10,12,13,14,15},{2,3,5,8,9,10,12,13,15},{2,3,5,8,9,10,12,14},{2,3,5,8,9,10,12,14,15},{2,3,5,8,9,10,12,15},{2,3,5,8,9,10,13},{2,3,5,8,9,10,13,14},{2,3,5,8,9,10,13,14,15},{2,3,5,8,9,10,13,15},{2,3,5,8,9,10,14},{2,3,5,8,9,10,14,15},{2,3,5,8,9,10,15},{2,3,5,8,9,11},{2,3,5,8,9,11,12},{2,3,5,8,9,11,12,13},{2,3,5,8,9,11,12,13,14},{2,3,5,8,9,11,12,13,14,15},{2,3,5,8,9,11,12,13,15},{2,3,5,8,9,11,12,14},{2,3,5,8,9,11,12,14,15},{2,3,5,8,9,11,12,15},{2,3,5,8,9,11,13},{2,3,5,8,9,11,13,14},{2,3,5,8,9,11,13,14,15},{2,3,5,8,9,11,13,15},{2,3,5,8,9,11,14},{2,3,5,8,9,11,14,15},{2,3,5,8,9,11,15},{2,3,5,8,9,12},{2,3,5,8,9,12,13},{2,3,5,8,9,12,13,14},{2,3,5,8,9,12,13,14,15},{2,3,5,8,9,12,13,15},{2,3,5,8,9,12,14},{2,3,5,8,9,12,14,15},{2,3,5,8,9,12,15},{2,3,5,8,9,13},{2,3,5,8,9,13,14},{2,3,5,8,9,13,14,15},{2,3,5,8,9,13,15},{2,3,5,8,9,14},{2,3,5,8,9,14,15},{2,3,5,8,9,15},{2,3,5,8,10},{2,3,5,8,10,11},{2,3,5,8,10,11,12},{2,3,5,8,10,11,12,13},{2,3,5,8,10,11,12,13,14},{2,3,5,8,10,11,12,13,14,15},{2,3,5,8,10,11,12,13,15},{2,3,5,8,10,11,12,14},{2,3,5,8,10,11,12,14,15},{2,3,5,8,10,11,12,15},{2,3,5,8,10,11,13},{2,3,5,8,10,11,13,14},{2,3,5,8,10,11,13,14,15},{2,3,5,8,10,11,13,15},{2,3,5,8,10,11,14},{2,3,5,8,10,11,14,15},{2,3,5,8,10,11,15},{2,3,5,8,10,12},{2,3,5,8,10,12,13},{2,3,5,8,10,12,13,14},{2,3,5,8,10,12,13,14,15},{2,3,5,8,10,12,13,15},{2,3,5,8,10,12,14},{2,3,5,8,10,12,14,15},{2,3,5,8,10,12,15},{2,3,5,8,10,13},{2,3,5,8,10,13,14},{2,3,5,8,10,13,14,15},{2,3,5,8,10,13,15},{2,3,5,8,10,14},{2,3,5,8,10,14,15},{2,3,5,8,10,15},{2,3,5,8,11},{2,3,5,8,11,12},{2,3,5,8,11,12,13},{2,3,5,8,11,12,13,14},{2,3,5,8,11,12,13,14,15},{2,3,5,8,11,12,13,15},{2,3,5,8,11,12,14},{2,3,5,8,11,12,14,15},{2,3,5,8,11,12,15},{2,3,5,8,11,13},{2,3,5,8,11,13,14},{2,3,5,8,11,13,14,15},{2,3,5,8,11,13,15},{2,3,5,8,11,14},{2,3,5,8,11,14,15},{2,3,5,8,11,15},{2,3,5,8,12},{2,3,5,8,12,13},{2,3,5,8,12,13,14},{2,3,5,8,12,13,14,15},{2,3,5,8,12,13,15},{2,3,5,8,12,14},{2,3,5,8,12,14,15},{2,3,5,8,12,15},{2,3,5,8,13},{2,3,5,8,13,14},{2,3,5,8,13,14,15},{2,3,5,8,13,15},{2,3,5,8,14},{2,3,5,8,14,15},{2,3,5,8,15},{2,3,5,9},{2,3,5,9,10},{2,3,5,9,10,11},{2,3,5,9,10,11,12},{2,3,5,9,10,11,12,13},{2,3,5,9,10,11,12,13,14},{2,3,5,9,10,11,12,13,14,15},{2,3,5,9,10,11,12,13,15},{2,3,5,9,10,11,12,14},{2,3,5,9,10,11,12,14,15},{2,3,5,9,10,11,12,15},{2,3,5,9,10,11,13},{2,3,5,9,10,11,13,14},{2,3,5,9,10,11,13,14,15},{2,3,5,9,10,11,13,15},{2,3,5,9,10,11,14},{2,3,5,9,10,11,14,15},{2,3,5,9,10,11,15},{2,3,5,9,10,12},{2,3,5,9,10,12,13},{2,3,5,9,10,12,13,14},{2,3,5,9,10,12,13,14,15},{2,3,5,9,10,12,13,15},{2,3,5,9,10,12,14},{2,3,5,9,10,12,14,15},{2,3,5,9,10,12,15},{2,3,5,9,10,13},{2,3,5,9,10,13,14},{2,3,5,9,10,13,14,15},{2,3,5,9,10,13,15},{2,3,5,9,10,14},{2,3,5,9,10,14,15},{2,3,5,9,10,15},{2,3,5,9,11},{2,3,5,9,11,12},{2,3,5,9,11,12,13},{2,3,5,9,11,12,13,14},{2,3,5,9,11,12,13,14,15},{2,3,5,9,11,12,13,15},{2,3,5,9,11,12,14},{2,3,5,9,11,12,14,15},{2,3,5,9,11,12,15},{2,3,5,9,11,13},{2,3,5,9,11,13,14},{2,3,5,9,11,13,14,15},{2,3,5,9,11,13,15},{2,3,5,9,11,14},{2,3,5,9,11,14,15},{2,3,5,9,11,15},{2,3,5,9,12},{2,3,5,9,12,13},{2,3,5,9,12,13,14},{2,3,5,9,12,13,14,15},{2,3,5,9,12,13,15},{2,3,5,9,12,14},{2,3,5,9,12,14,15},{2,3,5,9,12,15},{2,3,5,9,13},{2,3,5,9,13,14},{2,3,5,9,13,14,15},{2,3,5,9,13,15},{2,3,5,9,14},{2,3,5,9,14,15},{2,3,5,9,15},{2,3,5,10},{2,3,5,10,11},{2,3,5,10,11,12},{2,3,5,10,11,12,13},{2,3,5,10,11,12,13,14},{2,3,5,10,11,12,13,14,15},{2,3,5,10,11,12,13,15},{2,3,5,10,11,12,14},{2,3,5,10,11,12,14,15},{2,3,5,10,11,12,15},{2,3,5,10,11,13},{2,3,5,10,11,13,14},{2,3,5,10,11,13,14,15},{2,3,5,10,11,13,15},{2,3,5,10,11,14},{2,3,5,10,11,14,15},{2,3,5,10,11,15},{2,3,5,10,12},{2,3,5,10,12,13},{2,3,5,10,12,13,14},{2,3,5,10,12,13,14,15},{2,3,5,10,12,13,15},{2,3,5,10,12,14},{2,3,5,10,12,14,15},{2,3,5,10,12,15},{2,3,5,10,13},{2,3,5,10,13,14},{2,3,5,10,13,14,15},{2,3,5,10,13,15},{2,3,5,10,14},{2,3,5,10,14,15},{2,3,5,10,15},{2,3,5,11},{2,3,5,11,12},{2,3,5,11,12,13},{2,3,5,11,12,13,14},{2,3,5,11,12,13,14,15},{2,3,5,11,12,13,15},{2,3,5,11,12,14},{2,3,5,11,12,14,15},{2,3,5,11,12,15},{2,3,5,11,13},{2,3,5,11,13,14},{2,3,5,11,13,14,15},{2,3,5,11,13,15},{2,3,5,11,14},{2,3,5,11,14,15},{2,3,5,11,15},{2,3,5,12},{2,3,5,12,13},{2,3,5,12,13,14},{2,3,5,12,13,14,15},{2,3,5,12,13,15},{2,3,5,12,14},{2,3,5,12,14,15},{2,3,5,12,15},{2,3,5,13},{2,3,5,13,14},{2,3,5,13,14,15},{2,3,5,13,15},{2,3,5,14},{2,3,5,14,15},{2,3,5,15},{2,3,6},{2,3,6,7},{2,3,6,7,8},{2,3,6,7,8,9},{2,3,6,7,8,9,10},{2,3,6,7,8,9,10,11},{2,3,6,7,8,9,10,11,12},{2,3,6,7,8,9,10,11,12,13},{2,3,6,7,8,9,10,11,12,13,14},{2,3,6,7,8,9,10,11,12,13,14,15},{2,3,6,7,8,9,10,11,12,13,15},{2,3,6,7,8,9,10,11,12,14},{2,3,6,7,8,9,10,11,12,14,15},{2,3,6,7,8,9,10,11,12,15},{2,3,6,7,8,9,10,11,13},{2,3,6,7,8,9,10,11,13,14},{2,3,6,7,8,9,10,11,13,14,15},{2,3,6,7,8,9,10,11,13,15},{2,3,6,7,8,9,10,11,14},{2,3,6,7,8,9,10,11,14,15},{2,3,6,7,8,9,10,11,15},{2,3,6,7,8,9,10,12},{2,3,6,7,8,9,10,12,13},{2,3,6,7,8,9,10,12,13,14},{2,3,6,7,8,9,10,12,13,14,15},{2,3,6,7,8,9,10,12,13,15},{2,3,6,7,8,9,10,12,14},{2,3,6,7,8,9,10,12,14,15},{2,3,6,7,8,9,10,12,15},{2,3,6,7,8,9,10,13},{2,3,6,7,8,9,10,13,14},{2,3,6,7,8,9,10,13,14,15},{2,3,6,7,8,9,10,13,15},{2,3,6,7,8,9,10,14},{2,3,6,7,8,9,10,14,15},{2,3,6,7,8,9,10,15},{2,3,6,7,8,9,11},{2,3,6,7,8,9,11,12},{2,3,6,7,8,9,11,12,13},{2,3,6,7,8,9,11,12,13,14},{2,3,6,7,8,9,11,12,13,14,15},{2,3,6,7,8,9,11,12,13,15},{2,3,6,7,8,9,11,12,14},{2,3,6,7,8,9,11,12,14,15},{2,3,6,7,8,9,11,12,15},{2,3,6,7,8,9,11,13},{2,3,6,7,8,9,11,13,14},{2,3,6,7,8,9,11,13,14,15},{2,3,6,7,8,9,11,13,15},{2,3,6,7,8,9,11,14},{2,3,6,7,8,9,11,14,15},{2,3,6,7,8,9,11,15},{2,3,6,7,8,9,12},{2,3,6,7,8,9,12,13},{2,3,6,7,8,9,12,13,14},{2,3,6,7,8,9,12,13,14,15},{2,3,6,7,8,9,12,13,15},{2,3,6,7,8,9,12,14},{2,3,6,7,8,9,12,14,15},{2,3,6,7,8,9,12,15},{2,3,6,7,8,9,13},{2,3,6,7,8,9,13,14},{2,3,6,7,8,9,13,14,15},{2,3,6,7,8,9,13,15},{2,3,6,7,8,9,14},{2,3,6,7,8,9,14,15},{2,3,6,7,8,9,15},{2,3,6,7,8,10},{2,3,6,7,8,10,11},{2,3,6,7,8,10,11,12},{2,3,6,7,8,10,11,12,13},{2,3,6,7,8,10,11,12,13,14},{2,3,6,7,8,10,11,12,13,14,15},{2,3,6,7,8,10,11,12,13,15},{2,3,6,7,8,10,11,12,14},{2,3,6,7,8,10,11,12,14,15},{2,3,6,7,8,10,11,12,15},{2,3,6,7,8,10,11,13},{2,3,6,7,8,10,11,13,14},{2,3,6,7,8,10,11,13,14,15},{2,3,6,7,8,10,11,13,15},{2,3,6,7,8,10,11,14},{2,3,6,7,8,10,11,14,15},{2,3,6,7,8,10,11,15},{2,3,6,7,8,10,12},{2,3,6,7,8,10,12,13},{2,3,6,7,8,10,12,13,14},{2,3,6,7,8,10,12,13,14,15},{2,3,6,7,8,10,12,13,15},{2,3,6,7,8,10,12,14},{2,3,6,7,8,10,12,14,15},{2,3,6,7,8,10,12,15},{2,3,6,7,8,10,13},{2,3,6,7,8,10,13,14},{2,3,6,7,8,10,13,14,15},{2,3,6,7,8,10,13,15},{2,3,6,7,8,10,14},{2,3,6,7,8,10,14,15},{2,3,6,7,8,10,15},{2,3,6,7,8,11},{2,3,6,7,8,11,12},{2,3,6,7,8,11,12,13},{2,3,6,7,8,11,12,13,14},{2,3,6,7,8,11,12,13,14,15},{2,3,6,7,8,11,12,13,15},{2,3,6,7,8,11,12,14},{2,3,6,7,8,11,12,14,15},{2,3,6,7,8,11,12,15},{2,3,6,7,8,11,13},{2,3,6,7,8,11,13,14},{2,3,6,7,8,11,13,14,15},{2,3,6,7,8,11,13,15},{2,3,6,7,8,11,14},{2,3,6,7,8,11,14,15},{2,3,6,7,8,11,15},{2,3,6,7,8,12},{2,3,6,7,8,12,13},{2,3,6,7,8,12,13,14},{2,3,6,7,8,12,13,14,15},{2,3,6,7,8,12,13,15},{2,3,6,7,8,12,14},{2,3,6,7,8,12,14,15},{2,3,6,7,8,12,15},{2,3,6,7,8,13},{2,3,6,7,8,13,14},{2,3,6,7,8,13,14,15},{2,3,6,7,8,13,15},{2,3,6,7,8,14},{2,3,6,7,8,14,15},{2,3,6,7,8,15},{2,3,6,7,9},{2,3,6,7,9,10},{2,3,6,7,9,10,11},{2,3,6,7,9,10,11,12},{2,3,6,7,9,10,11,12,13},{2,3,6,7,9,10,11,12,13,14},{2,3,6,7,9,10,11,12,13,14,15},{2,3,6,7,9,10,11,12,13,15},{2,3,6,7,9,10,11,12,14},{2,3,6,7,9,10,11,12,14,15},{2,3,6,7,9,10,11,12,15},{2,3,6,7,9,10,11,13},{2,3,6,7,9,10,11,13,14},{2,3,6,7,9,10,11,13,14,15},{2,3,6,7,9,10,11,13,15},{2,3,6,7,9,10,11,14},{2,3,6,7,9,10,11,14,15},{2,3,6,7,9,10,11,15},{2,3,6,7,9,10,12},{2,3,6,7,9,10,12,13},{2,3,6,7,9,10,12,13,14},{2,3,6,7,9,10,12,13,14,15},{2,3,6,7,9,10,12,13,15},{2,3,6,7,9,10,12,14},{2,3,6,7,9,10,12,14,15},{2,3,6,7,9,10,12,15},{2,3,6,7,9,10,13},{2,3,6,7,9,10,13,14},{2,3,6,7,9,10,13,14,15},{2,3,6,7,9,10,13,15},{2,3,6,7,9,10,14},{2,3,6,7,9,10,14,15},{2,3,6,7,9,10,15},{2,3,6,7,9,11},{2,3,6,7,9,11,12},{2,3,6,7,9,11,12,13},{2,3,6,7,9,11,12,13,14},{2,3,6,7,9,11,12,13,14,15},{2,3,6,7,9,11,12,13,15},{2,3,6,7,9,11,12,14},{2,3,6,7,9,11,12,14,15},{2,3,6,7,9,11,12,15},{2,3,6,7,9,11,13},{2,3,6,7,9,11,13,14},{2,3,6,7,9,11,13,14,15},{2,3,6,7,9,11,13,15},{2,3,6,7,9,11,14},{2,3,6,7,9,11,14,15},{2,3,6,7,9,11,15},{2,3,6,7,9,12},{2,3,6,7,9,12,13},{2,3,6,7,9,12,13,14},{2,3,6,7,9,12,13,14,15},{2,3,6,7,9,12,13,15},{2,3,6,7,9,12,14},{2,3,6,7,9,12,14,15},{2,3,6,7,9,12,15},{2,3,6,7,9,13},{2,3,6,7,9,13,14},{2,3,6,7,9,13,14,15},{2,3,6,7,9,13,15},{2,3,6,7,9,14},{2,3,6,7,9,14,15},{2,3,6,7,9,15},{2,3,6,7,10},{2,3,6,7,10,11},{2,3,6,7,10,11,12},{2,3,6,7,10,11,12,13},{2,3,6,7,10,11,12,13,14},{2,3,6,7,10,11,12,13,14,15},{2,3,6,7,10,11,12,13,15},{2,3,6,7,10,11,12,14},{2,3,6,7,10,11,12,14,15},{2,3,6,7,10,11,12,15},{2,3,6,7,10,11,13},{2,3,6,7,10,11,13,14},{2,3,6,7,10,11,13,14,15},{2,3,6,7,10,11,13,15},{2,3,6,7,10,11,14},{2,3,6,7,10,11,14,15},{2,3,6,7,10,11,15},{2,3,6,7,10,12},{2,3,6,7,10,12,13},{2,3,6,7,10,12,13,14},{2,3,6,7,10,12,13,14,15},{2,3,6,7,10,12,13,15},{2,3,6,7,10,12,14},{2,3,6,7,10,12,14,15},{2,3,6,7,10,12,15},{2,3,6,7,10,13},{2,3,6,7,10,13,14},{2,3,6,7,10,13,14,15},{2,3,6,7,10,13,15},{2,3,6,7,10,14},{2,3,6,7,10,14,15},{2,3,6,7,10,15},{2,3,6,7,11},{2,3,6,7,11,12},{2,3,6,7,11,12,13},{2,3,6,7,11,12,13,14},{2,3,6,7,11,12,13,14,15},{2,3,6,7,11,12,13,15},{2,3,6,7,11,12,14},{2,3,6,7,11,12,14,15},{2,3,6,7,11,12,15},{2,3,6,7,11,13},{2,3,6,7,11,13,14},{2,3,6,7,11,13,14,15},{2,3,6,7,11,13,15},{2,3,6,7,11,14},{2,3,6,7,11,14,15},{2,3,6,7,11,15},{2,3,6,7,12},{2,3,6,7,12,13},{2,3,6,7,12,13,14},{2,3,6,7,12,13,14,15},{2,3,6,7,12,13,15},{2,3,6,7,12,14},{2,3,6,7,12,14,15},{2,3,6,7,12,15},{2,3,6,7,13},{2,3,6,7,13,14},{2,3,6,7,13,14,15},{2,3,6,7,13,15},{2,3,6,7,14},{2,3,6,7,14,15},{2,3,6,7,15},{2,3,6,8},{2,3,6,8,9},{2,3,6,8,9,10},{2,3,6,8,9,10,11},{2,3,6,8,9,10,11,12},{2,3,6,8,9,10,11,12,13},{2,3,6,8,9,10,11,12,13,14},{2,3,6,8,9,10,11,12,13,14,15},{2,3,6,8,9,10,11,12,13,15},{2,3,6,8,9,10,11,12,14},{2,3,6,8,9,10,11,12,14,15},{2,3,6,8,9,10,11,12,15},{2,3,6,8,9,10,11,13},{2,3,6,8,9,10,11,13,14},{2,3,6,8,9,10,11,13,14,15},{2,3,6,8,9,10,11,13,15},{2,3,6,8,9,10,11,14},{2,3,6,8,9,10,11,14,15},{2,3,6,8,9,10,11,15},{2,3,6,8,9,10,12},{2,3,6,8,9,10,12,13},{2,3,6,8,9,10,12,13,14},{2,3,6,8,9,10,12,13,14,15},{2,3,6,8,9,10,12,13,15},{2,3,6,8,9,10,12,14},{2,3,6,8,9,10,12,14,15},{2,3,6,8,9,10,12,15},{2,3,6,8,9,10,13},{2,3,6,8,9,10,13,14},{2,3,6,8,9,10,13,14,15},{2,3,6,8,9,10,13,15},{2,3,6,8,9,10,14},{2,3,6,8,9,10,14,15},{2,3,6,8,9,10,15},{2,3,6,8,9,11},{2,3,6,8,9,11,12},{2,3,6,8,9,11,12,13},{2,3,6,8,9,11,12,13,14},{2,3,6,8,9,11,12,13,14,15},{2,3,6,8,9,11,12,13,15},{2,3,6,8,9,11,12,14},{2,3,6,8,9,11,12,14,15},{2,3,6,8,9,11,12,15},{2,3,6,8,9,11,13},{2,3,6,8,9,11,13,14},{2,3,6,8,9,11,13,14,15},{2,3,6,8,9,11,13,15},{2,3,6,8,9,11,14},{2,3,6,8,9,11,14,15},{2,3,6,8,9,11,15},{2,3,6,8,9,12},{2,3,6,8,9,12,13},{2,3,6,8,9,12,13,14},{2,3,6,8,9,12,13,14,15},{2,3,6,8,9,12,13,15},{2,3,6,8,9,12,14},{2,3,6,8,9,12,14,15},{2,3,6,8,9,12,15},{2,3,6,8,9,13},{2,3,6,8,9,13,14},{2,3,6,8,9,13,14,15},{2,3,6,8,9,13,15},{2,3,6,8,9,14},{2,3,6,8,9,14,15},{2,3,6,8,9,15},{2,3,6,8,10},{2,3,6,8,10,11},{2,3,6,8,10,11,12},{2,3,6,8,10,11,12,13},{2,3,6,8,10,11,12,13,14},{2,3,6,8,10,11,12,13,14,15},{2,3,6,8,10,11,12,13,15},{2,3,6,8,10,11,12,14},{2,3,6,8,10,11,12,14,15},{2,3,6,8,10,11,12,15},{2,3,6,8,10,11,13},{2,3,6,8,10,11,13,14},{2,3,6,8,10,11,13,14,15},{2,3,6,8,10,11,13,15},{2,3,6,8,10,11,14},{2,3,6,8,10,11,14,15},{2,3,6,8,10,11,15},{2,3,6,8,10,12},{2,3,6,8,10,12,13},{2,3,6,8,10,12,13,14},{2,3,6,8,10,12,13,14,15},{2,3,6,8,10,12,13,15},{2,3,6,8,10,12,14},{2,3,6,8,10,12,14,15},{2,3,6,8,10,12,15},{2,3,6,8,10,13},{2,3,6,8,10,13,14},{2,3,6,8,10,13,14,15},{2,3,6,8,10,13,15},{2,3,6,8,10,14},{2,3,6,8,10,14,15},{2,3,6,8,10,15},{2,3,6,8,11},{2,3,6,8,11,12},{2,3,6,8,11,12,13},{2,3,6,8,11,12,13,14},{2,3,6,8,11,12,13,14,15},{2,3,6,8,11,12,13,15},{2,3,6,8,11,12,14},{2,3,6,8,11,12,14,15},{2,3,6,8,11,12,15},{2,3,6,8,11,13},{2,3,6,8,11,13,14},{2,3,6,8,11,13,14,15},{2,3,6,8,11,13,15},{2,3,6,8,11,14},{2,3,6,8,11,14,15},{2,3,6,8,11,15},{2,3,6,8,12},{2,3,6,8,12,13},{2,3,6,8,12,13,14},{2,3,6,8,12,13,14,15},{2,3,6,8,12,13,15},{2,3,6,8,12,14},{2,3,6,8,12,14,15},{2,3,6,8,12,15},{2,3,6,8,13},{2,3,6,8,13,14},{2,3,6,8,13,14,15},{2,3,6,8,13,15},{2,3,6,8,14},{2,3,6,8,14,15},{2,3,6,8,15},{2,3,6,9},{2,3,6,9,10},{2,3,6,9,10,11},{2,3,6,9,10,11,12},{2,3,6,9,10,11,12,13},{2,3,6,9,10,11,12,13,14},{2,3,6,9,10,11,12,13,14,15},{2,3,6,9,10,11,12,13,15},{2,3,6,9,10,11,12,14},{2,3,6,9,10,11,12,14,15},{2,3,6,9,10,11,12,15},{2,3,6,9,10,11,13},{2,3,6,9,10,11,13,14},{2,3,6,9,10,11,13,14,15},{2,3,6,9,10,11,13,15},{2,3,6,9,10,11,14},{2,3,6,9,10,11,14,15},{2,3,6,9,10,11,15},{2,3,6,9,10,12},{2,3,6,9,10,12,13},{2,3,6,9,10,12,13,14},{2,3,6,9,10,12,13,14,15},{2,3,6,9,10,12,13,15},{2,3,6,9,10,12,14},{2,3,6,9,10,12,14,15},{2,3,6,9,10,12,15},{2,3,6,9,10,13},{2,3,6,9,10,13,14},{2,3,6,9,10,13,14,15},{2,3,6,9,10,13,15},{2,3,6,9,10,14},{2,3,6,9,10,14,15},{2,3,6,9,10,15},{2,3,6,9,11},{2,3,6,9,11,12},{2,3,6,9,11,12,13},{2,3,6,9,11,12,13,14},{2,3,6,9,11,12,13,14,15},{2,3,6,9,11,12,13,15},{2,3,6,9,11,12,14},{2,3,6,9,11,12,14,15},{2,3,6,9,11,12,15},{2,3,6,9,11,13},{2,3,6,9,11,13,14},{2,3,6,9,11,13,14,15},{2,3,6,9,11,13,15},{2,3,6,9,11,14},{2,3,6,9,11,14,15},{2,3,6,9,11,15},{2,3,6,9,12},{2,3,6,9,12,13},{2,3,6,9,12,13,14},{2,3,6,9,12,13,14,15},{2,3,6,9,12,13,15},{2,3,6,9,12,14},{2,3,6,9,12,14,15},{2,3,6,9,12,15},{2,3,6,9,13},{2,3,6,9,13,14},{2,3,6,9,13,14,15},{2,3,6,9,13,15},{2,3,6,9,14},{2,3,6,9,14,15},{2,3,6,9,15},{2,3,6,10},{2,3,6,10,11},{2,3,6,10,11,12},{2,3,6,10,11,12,13},{2,3,6,10,11,12,13,14},{2,3,6,10,11,12,13,14,15},{2,3,6,10,11,12,13,15},{2,3,6,10,11,12,14},{2,3,6,10,11,12,14,15},{2,3,6,10,11,12,15},{2,3,6,10,11,13},{2,3,6,10,11,13,14},{2,3,6,10,11,13,14,15},{2,3,6,10,11,13,15},{2,3,6,10,11,14},{2,3,6,10,11,14,15},{2,3,6,10,11,15},{2,3,6,10,12},{2,3,6,10,12,13},{2,3,6,10,12,13,14},{2,3,6,10,12,13,14,15},{2,3,6,10,12,13,15},{2,3,6,10,12,14},{2,3,6,10,12,14,15},{2,3,6,10,12,15},{2,3,6,10,13},{2,3,6,10,13,14},{2,3,6,10,13,14,15},{2,3,6,10,13,15},{2,3,6,10,14},{2,3,6,10,14,15},{2,3,6,10,15},{2,3,6,11},{2,3,6,11,12},{2,3,6,11,12,13},{2,3,6,11,12,13,14},{2,3,6,11,12,13,14,15},{2,3,6,11,12,13,15},{2,3,6,11,12,14},{2,3,6,11,12,14,15},{2,3,6,11,12,15},{2,3,6,11,13},{2,3,6,11,13,14},{2,3,6,11,13,14,15},{2,3,6,11,13,15},{2,3,6,11,14},{2,3,6,11,14,15},{2,3,6,11,15},{2,3,6,12},{2,3,6,12,13},{2,3,6,12,13,14},{2,3,6,12,13,14,15},{2,3,6,12,13,15},{2,3,6,12,14},{2,3,6,12,14,15},{2,3,6,12,15},{2,3,6,13},{2,3,6,13,14},{2,3,6,13,14,15},{2,3,6,13,15},{2,3,6,14},{2,3,6,14,15},{2,3,6,15},{2,3,7},{2,3,7,8},{2,3,7,8,9},{2,3,7,8,9,10},{2,3,7,8,9,10,11},{2,3,7,8,9,10,11,12},{2,3,7,8,9,10,11,12,13},{2,3,7,8,9,10,11,12,13,14},{2,3,7,8,9,10,11,12,13,14,15},{2,3,7,8,9,10,11,12,13,15},{2,3,7,8,9,10,11,12,14},{2,3,7,8,9,10,11,12,14,15},{2,3,7,8,9,10,11,12,15},{2,3,7,8,9,10,11,13},{2,3,7,8,9,10,11,13,14},{2,3,7,8,9,10,11,13,14,15},{2,3,7,8,9,10,11,13,15},{2,3,7,8,9,10,11,14},{2,3,7,8,9,10,11,14,15},{2,3,7,8,9,10,11,15},{2,3,7,8,9,10,12},{2,3,7,8,9,10,12,13},{2,3,7,8,9,10,12,13,14},{2,3,7,8,9,10,12,13,14,15},{2,3,7,8,9,10,12,13,15},{2,3,7,8,9,10,12,14},{2,3,7,8,9,10,12,14,15},{2,3,7,8,9,10,12,15},{2,3,7,8,9,10,13},{2,3,7,8,9,10,13,14},{2,3,7,8,9,10,13,14,15},{2,3,7,8,9,10,13,15},{2,3,7,8,9,10,14},{2,3,7,8,9,10,14,15},{2,3,7,8,9,10,15},{2,3,7,8,9,11},{2,3,7,8,9,11,12},{2,3,7,8,9,11,12,13},{2,3,7,8,9,11,12,13,14},{2,3,7,8,9,11,12,13,14,15},{2,3,7,8,9,11,12,13,15},{2,3,7,8,9,11,12,14},{2,3,7,8,9,11,12,14,15},{2,3,7,8,9,11,12,15},{2,3,7,8,9,11,13},{2,3,7,8,9,11,13,14},{2,3,7,8,9,11,13,14,15},{2,3,7,8,9,11,13,15},{2,3,7,8,9,11,14},{2,3,7,8,9,11,14,15},{2,3,7,8,9,11,15},{2,3,7,8,9,12},{2,3,7,8,9,12,13},{2,3,7,8,9,12,13,14},{2,3,7,8,9,12,13,14,15},{2,3,7,8,9,12,13,15},{2,3,7,8,9,12,14},{2,3,7,8,9,12,14,15},{2,3,7,8,9,12,15},{2,3,7,8,9,13},{2,3,7,8,9,13,14},{2,3,7,8,9,13,14,15},{2,3,7,8,9,13,15},{2,3,7,8,9,14},{2,3,7,8,9,14,15},{2,3,7,8,9,15},{2,3,7,8,10},{2,3,7,8,10,11},{2,3,7,8,10,11,12},{2,3,7,8,10,11,12,13},{2,3,7,8,10,11,12,13,14},{2,3,7,8,10,11,12,13,14,15},{2,3,7,8,10,11,12,13,15},{2,3,7,8,10,11,12,14},{2,3,7,8,10,11,12,14,15},{2,3,7,8,10,11,12,15},{2,3,7,8,10,11,13},{2,3,7,8,10,11,13,14},{2,3,7,8,10,11,13,14,15},{2,3,7,8,10,11,13,15},{2,3,7,8,10,11,14},{2,3,7,8,10,11,14,15},{2,3,7,8,10,11,15},{2,3,7,8,10,12},{2,3,7,8,10,12,13},{2,3,7,8,10,12,13,14},{2,3,7,8,10,12,13,14,15},{2,3,7,8,10,12,13,15},{2,3,7,8,10,12,14},{2,3,7,8,10,12,14,15},{2,3,7,8,10,12,15},{2,3,7,8,10,13},{2,3,7,8,10,13,14},{2,3,7,8,10,13,14,15},{2,3,7,8,10,13,15},{2,3,7,8,10,14},{2,3,7,8,10,14,15},{2,3,7,8,10,15},{2,3,7,8,11},{2,3,7,8,11,12},{2,3,7,8,11,12,13},{2,3,7,8,11,12,13,14},{2,3,7,8,11,12,13,14,15},{2,3,7,8,11,12,13,15},{2,3,7,8,11,12,14},{2,3,7,8,11,12,14,15},{2,3,7,8,11,12,15},{2,3,7,8,11,13},{2,3,7,8,11,13,14},{2,3,7,8,11,13,14,15},{2,3,7,8,11,13,15},{2,3,7,8,11,14},{2,3,7,8,11,14,15},{2,3,7,8,11,15},{2,3,7,8,12},{2,3,7,8,12,13},{2,3,7,8,12,13,14},{2,3,7,8,12,13,14,15},{2,3,7,8,12,13,15},{2,3,7,8,12,14},{2,3,7,8,12,14,15},{2,3,7,8,12,15},{2,3,7,8,13},{2,3,7,8,13,14},{2,3,7,8,13,14,15},{2,3,7,8,13,15},{2,3,7,8,14},{2,3,7,8,14,15},{2,3,7,8,15},{2,3,7,9},{2,3,7,9,10},{2,3,7,9,10,11},{2,3,7,9,10,11,12},{2,3,7,9,10,11,12,13},{2,3,7,9,10,11,12,13,14},{2,3,7,9,10,11,12,13,14,15},{2,3,7,9,10,11,12,13,15},{2,3,7,9,10,11,12,14},{2,3,7,9,10,11,12,14,15},{2,3,7,9,10,11,12,15},{2,3,7,9,10,11,13},{2,3,7,9,10,11,13,14},{2,3,7,9,10,11,13,14,15},{2,3,7,9,10,11,13,15},{2,3,7,9,10,11,14},{2,3,7,9,10,11,14,15},{2,3,7,9,10,11,15},{2,3,7,9,10,12},{2,3,7,9,10,12,13},{2,3,7,9,10,12,13,14},{2,3,7,9,10,12,13,14,15},{2,3,7,9,10,12,13,15},{2,3,7,9,10,12,14},{2,3,7,9,10,12,14,15},{2,3,7,9,10,12,15},{2,3,7,9,10,13},{2,3,7,9,10,13,14},{2,3,7,9,10,13,14,15},{2,3,7,9,10,13,15},{2,3,7,9,10,14},{2,3,7,9,10,14,15},{2,3,7,9,10,15},{2,3,7,9,11},{2,3,7,9,11,12},{2,3,7,9,11,12,13},{2,3,7,9,11,12,13,14},{2,3,7,9,11,12,13,14,15},{2,3,7,9,11,12,13,15},{2,3,7,9,11,12,14},{2,3,7,9,11,12,14,15},{2,3,7,9,11,12,15},{2,3,7,9,11,13},{2,3,7,9,11,13,14},{2,3,7,9,11,13,14,15},{2,3,7,9,11,13,15},{2,3,7,9,11,14},{2,3,7,9,11,14,15},{2,3,7,9,11,15},{2,3,7,9,12},{2,3,7,9,12,13},{2,3,7,9,12,13,14},{2,3,7,9,12,13,14,15},{2,3,7,9,12,13,15},{2,3,7,9,12,14},{2,3,7,9,12,14,15},{2,3,7,9,12,15},{2,3,7,9,13},{2,3,7,9,13,14},{2,3,7,9,13,14,15},{2,3,7,9,13,15},{2,3,7,9,14},{2,3,7,9,14,15},{2,3,7,9,15},{2,3,7,10},{2,3,7,10,11},{2,3,7,10,11,12},{2,3,7,10,11,12,13},{2,3,7,10,11,12,13,14},{2,3,7,10,11,12,13,14,15},{2,3,7,10,11,12,13,15},{2,3,7,10,11,12,14},{2,3,7,10,11,12,14,15},{2,3,7,10,11,12,15},{2,3,7,10,11,13},{2,3,7,10,11,13,14},{2,3,7,10,11,13,14,15},{2,3,7,10,11,13,15},{2,3,7,10,11,14},{2,3,7,10,11,14,15},{2,3,7,10,11,15},{2,3,7,10,12},{2,3,7,10,12,13},{2,3,7,10,12,13,14},{2,3,7,10,12,13,14,15},{2,3,7,10,12,13,15},{2,3,7,10,12,14},{2,3,7,10,12,14,15},{2,3,7,10,12,15},{2,3,7,10,13},{2,3,7,10,13,14},{2,3,7,10,13,14,15},{2,3,7,10,13,15},{2,3,7,10,14},{2,3,7,10,14,15},{2,3,7,10,15},{2,3,7,11},{2,3,7,11,12},{2,3,7,11,12,13},{2,3,7,11,12,13,14},{2,3,7,11,12,13,14,15},{2,3,7,11,12,13,15},{2,3,7,11,12,14},{2,3,7,11,12,14,15},{2,3,7,11,12,15},{2,3,7,11,13},{2,3,7,11,13,14},{2,3,7,11,13,14,15},{2,3,7,11,13,15},{2,3,7,11,14},{2,3,7,11,14,15},{2,3,7,11,15},{2,3,7,12},{2,3,7,12,13},{2,3,7,12,13,14},{2,3,7,12,13,14,15},{2,3,7,12,13,15},{2,3,7,12,14},{2,3,7,12,14,15},{2,3,7,12,15},{2,3,7,13},{2,3,7,13,14},{2,3,7,13,14,15},{2,3,7,13,15},{2,3,7,14},{2,3,7,14,15},{2,3,7,15},{2,3,8},{2,3,8,9},{2,3,8,9,10},{2,3,8,9,10,11},{2,3,8,9,10,11,12},{2,3,8,9,10,11,12,13},{2,3,8,9,10,11,12,13,14},{2,3,8,9,10,11,12,13,14,15},{2,3,8,9,10,11,12,13,15},{2,3,8,9,10,11,12,14},{2,3,8,9,10,11,12,14,15},{2,3,8,9,10,11,12,15},{2,3,8,9,10,11,13},{2,3,8,9,10,11,13,14},{2,3,8,9,10,11,13,14,15},{2,3,8,9,10,11,13,15},{2,3,8,9,10,11,14},{2,3,8,9,10,11,14,15},{2,3,8,9,10,11,15},{2,3,8,9,10,12},{2,3,8,9,10,12,13},{2,3,8,9,10,12,13,14},{2,3,8,9,10,12,13,14,15},{2,3,8,9,10,12,13,15},{2,3,8,9,10,12,14},{2,3,8,9,10,12,14,15},{2,3,8,9,10,12,15},{2,3,8,9,10,13},{2,3,8,9,10,13,14},{2,3,8,9,10,13,14,15},{2,3,8,9,10,13,15},{2,3,8,9,10,14},{2,3,8,9,10,14,15},{2,3,8,9,10,15},{2,3,8,9,11},{2,3,8,9,11,12},{2,3,8,9,11,12,13},{2,3,8,9,11,12,13,14},{2,3,8,9,11,12,13,14,15},{2,3,8,9,11,12,13,15},{2,3,8,9,11,12,14},{2,3,8,9,11,12,14,15},{2,3,8,9,11,12,15},{2,3,8,9,11,13},{2,3,8,9,11,13,14},{2,3,8,9,11,13,14,15},{2,3,8,9,11,13,15},{2,3,8,9,11,14},{2,3,8,9,11,14,15},{2,3,8,9,11,15},{2,3,8,9,12},{2,3,8,9,12,13},{2,3,8,9,12,13,14},{2,3,8,9,12,13,14,15},{2,3,8,9,12,13,15},{2,3,8,9,12,14},{2,3,8,9,12,14,15},{2,3,8,9,12,15},{2,3,8,9,13},{2,3,8,9,13,14},{2,3,8,9,13,14,15},{2,3,8,9,13,15},{2,3,8,9,14},{2,3,8,9,14,15},{2,3,8,9,15},{2,3,8,10},{2,3,8,10,11},{2,3,8,10,11,12},{2,3,8,10,11,12,13},{2,3,8,10,11,12,13,14},{2,3,8,10,11,12,13,14,15},{2,3,8,10,11,12,13,15},{2,3,8,10,11,12,14},{2,3,8,10,11,12,14,15},{2,3,8,10,11,12,15},{2,3,8,10,11,13},{2,3,8,10,11,13,14},{2,3,8,10,11,13,14,15},{2,3,8,10,11,13,15},{2,3,8,10,11,14},{2,3,8,10,11,14,15},{2,3,8,10,11,15},{2,3,8,10,12},{2,3,8,10,12,13},{2,3,8,10,12,13,14},{2,3,8,10,12,13,14,15},{2,3,8,10,12,13,15},{2,3,8,10,12,14},{2,3,8,10,12,14,15},{2,3,8,10,12,15},{2,3,8,10,13},{2,3,8,10,13,14},{2,3,8,10,13,14,15},{2,3,8,10,13,15},{2,3,8,10,14},{2,3,8,10,14,15},{2,3,8,10,15},{2,3,8,11},{2,3,8,11,12},{2,3,8,11,12,13},{2,3,8,11,12,13,14},{2,3,8,11,12,13,14,15},{2,3,8,11,12,13,15},{2,3,8,11,12,14},{2,3,8,11,12,14,15},{2,3,8,11,12,15},{2,3,8,11,13},{2,3,8,11,13,14},{2,3,8,11,13,14,15},{2,3,8,11,13,15},{2,3,8,11,14},{2,3,8,11,14,15},{2,3,8,11,15},{2,3,8,12},{2,3,8,12,13},{2,3,8,12,13,14},{2,3,8,12,13,14,15},{2,3,8,12,13,15},{2,3,8,12,14},{2,3,8,12,14,15},{2,3,8,12,15},{2,3,8,13},{2,3,8,13,14},{2,3,8,13,14,15},{2,3,8,13,15},{2,3,8,14},{2,3,8,14,15},{2,3,8,15},{2,3,9},{2,3,9,10},{2,3,9,10,11},{2,3,9,10,11,12},{2,3,9,10,11,12,13},{2,3,9,10,11,12,13,14},{2,3,9,10,11,12,13,14,15},{2,3,9,10,11,12,13,15},{2,3,9,10,11,12,14},{2,3,9,10,11,12,14,15},{2,3,9,10,11,12,15},{2,3,9,10,11,13},{2,3,9,10,11,13,14},{2,3,9,10,11,13,14,15},{2,3,9,10,11,13,15},{2,3,9,10,11,14},{2,3,9,10,11,14,15},{2,3,9,10,11,15},{2,3,9,10,12},{2,3,9,10,12,13},{2,3,9,10,12,13,14},{2,3,9,10,12,13,14,15},{2,3,9,10,12,13,15},{2,3,9,10,12,14},{2,3,9,10,12,14,15},{2,3,9,10,12,15},{2,3,9,10,13},{2,3,9,10,13,14},{2,3,9,10,13,14,15},{2,3,9,10,13,15},{2,3,9,10,14},{2,3,9,10,14,15},{2,3,9,10,15},{2,3,9,11},{2,3,9,11,12},{2,3,9,11,12,13},{2,3,9,11,12,13,14},{2,3,9,11,12,13,14,15},{2,3,9,11,12,13,15},{2,3,9,11,12,14},{2,3,9,11,12,14,15},{2,3,9,11,12,15},{2,3,9,11,13},{2,3,9,11,13,14},{2,3,9,11,13,14,15},{2,3,9,11,13,15},{2,3,9,11,14},{2,3,9,11,14,15},{2,3,9,11,15},{2,3,9,12},{2,3,9,12,13},{2,3,9,12,13,14},{2,3,9,12,13,14,15},{2,3,9,12,13,15},{2,3,9,12,14},{2,3,9,12,14,15},{2,3,9,12,15},{2,3,9,13},{2,3,9,13,14},{2,3,9,13,14,15},{2,3,9,13,15},{2,3,9,14},{2,3,9,14,15},{2,3,9,15},{2,3,10},{2,3,10,11},{2,3,10,11,12},{2,3,10,11,12,13},{2,3,10,11,12,13,14},{2,3,10,11,12,13,14,15},{2,3,10,11,12,13,15},{2,3,10,11,12,14},{2,3,10,11,12,14,15},{2,3,10,11,12,15},{2,3,10,11,13},{2,3,10,11,13,14},{2,3,10,11,13,14,15},{2,3,10,11,13,15},{2,3,10,11,14},{2,3,10,11,14,15},{2,3,10,11,15},{2,3,10,12},{2,3,10,12,13},{2,3,10,12,13,14},{2,3,10,12,13,14,15},{2,3,10,12,13,15},{2,3,10,12,14},{2,3,10,12,14,15},{2,3,10,12,15},{2,3,10,13},{2,3,10,13,14},{2,3,10,13,14,15},{2,3,10,13,15},{2,3,10,14},{2,3,10,14,15},{2,3,10,15},{2,3,11},{2,3,11,12},{2,3,11,12,13},{2,3,11,12,13,14},{2,3,11,12,13,14,15},{2,3,11,12,13,15},{2,3,11,12,14},{2,3,11,12,14,15},{2,3,11,12,15},{2,3,11,13},{2,3,11,13,14},{2,3,11,13,14,15},{2,3,11,13,15},{2,3,11,14},{2,3,11,14,15},{2,3,11,15},{2,3,12},{2,3,12,13},{2,3,12,13,14},{2,3,12,13,14,15},{2,3,12,13,15},{2,3,12,14},{2,3,12,14,15},{2,3,12,15},{2,3,13},{2,3,13,14},{2,3,13,14,15},{2,3,13,15},{2,3,14},{2,3,14,15},{2,3,15},{2,4},{2,4,5},{2,4,5,6},{2,4,5,6,7},{2,4,5,6,7,8},{2,4,5,6,7,8,9},{2,4,5,6,7,8,9,10},{2,4,5,6,7,8,9,10,11},{2,4,5,6,7,8,9,10,11,12},{2,4,5,6,7,8,9,10,11,12,13},{2,4,5,6,7,8,9,10,11,12,13,14},{2,4,5,6,7,8,9,10,11,12,13,14,15},{2,4,5,6,7,8,9,10,11,12,13,15},{2,4,5,6,7,8,9,10,11,12,14},{2,4,5,6,7,8,9,10,11,12,14,15},{2,4,5,6,7,8,9,10,11,12,15},{2,4,5,6,7,8,9,10,11,13},{2,4,5,6,7,8,9,10,11,13,14},{2,4,5,6,7,8,9,10,11,13,14,15},{2,4,5,6,7,8,9,10,11,13,15},{2,4,5,6,7,8,9,10,11,14},{2,4,5,6,7,8,9,10,11,14,15},{2,4,5,6,7,8,9,10,11,15},{2,4,5,6,7,8,9,10,12},{2,4,5,6,7,8,9,10,12,13},{2,4,5,6,7,8,9,10,12,13,14},{2,4,5,6,7,8,9,10,12,13,14,15},{2,4,5,6,7,8,9,10,12,13,15},{2,4,5,6,7,8,9,10,12,14},{2,4,5,6,7,8,9,10,12,14,15},{2,4,5,6,7,8,9,10,12,15},{2,4,5,6,7,8,9,10,13},{2,4,5,6,7,8,9,10,13,14},{2,4,5,6,7,8,9,10,13,14,15},{2,4,5,6,7,8,9,10,13,15},{2,4,5,6,7,8,9,10,14},{2,4,5,6,7,8,9,10,14,15},{2,4,5,6,7,8,9,10,15},{2,4,5,6,7,8,9,11},{2,4,5,6,7,8,9,11,12},{2,4,5,6,7,8,9,11,12,13},{2,4,5,6,7,8,9,11,12,13,14},{2,4,5,6,7,8,9,11,12,13,14,15},{2,4,5,6,7,8,9,11,12,13,15},{2,4,5,6,7,8,9,11,12,14},{2,4,5,6,7,8,9,11,12,14,15},{2,4,5,6,7,8,9,11,12,15},{2,4,5,6,7,8,9,11,13},{2,4,5,6,7,8,9,11,13,14},{2,4,5,6,7,8,9,11,13,14,15},{2,4,5,6,7,8,9,11,13,15},{2,4,5,6,7,8,9,11,14},{2,4,5,6,7,8,9,11,14,15},{2,4,5,6,7,8,9,11,15},{2,4,5,6,7,8,9,12},{2,4,5,6,7,8,9,12,13},{2,4,5,6,7,8,9,12,13,14},{2,4,5,6,7,8,9,12,13,14,15},{2,4,5,6,7,8,9,12,13,15},{2,4,5,6,7,8,9,12,14},{2,4,5,6,7,8,9,12,14,15},{2,4,5,6,7,8,9,12,15},{2,4,5,6,7,8,9,13},{2,4,5,6,7,8,9,13,14},{2,4,5,6,7,8,9,13,14,15},{2,4,5,6,7,8,9,13,15},{2,4,5,6,7,8,9,14},{2,4,5,6,7,8,9,14,15},{2,4,5,6,7,8,9,15},{2,4,5,6,7,8,10},{2,4,5,6,7,8,10,11},{2,4,5,6,7,8,10,11,12},{2,4,5,6,7,8,10,11,12,13},{2,4,5,6,7,8,10,11,12,13,14},{2,4,5,6,7,8,10,11,12,13,14,15},{2,4,5,6,7,8,10,11,12,13,15},{2,4,5,6,7,8,10,11,12,14},{2,4,5,6,7,8,10,11,12,14,15},{2,4,5,6,7,8,10,11,12,15},{2,4,5,6,7,8,10,11,13},{2,4,5,6,7,8,10,11,13,14},{2,4,5,6,7,8,10,11,13,14,15},{2,4,5,6,7,8,10,11,13,15},{2,4,5,6,7,8,10,11,14},{2,4,5,6,7,8,10,11,14,15},{2,4,5,6,7,8,10,11,15},{2,4,5,6,7,8,10,12},{2,4,5,6,7,8,10,12,13},{2,4,5,6,7,8,10,12,13,14},{2,4,5,6,7,8,10,12,13,14,15},{2,4,5,6,7,8,10,12,13,15},{2,4,5,6,7,8,10,12,14},{2,4,5,6,7,8,10,12,14,15},{2,4,5,6,7,8,10,12,15},{2,4,5,6,7,8,10,13},{2,4,5,6,7,8,10,13,14},{2,4,5,6,7,8,10,13,14,15},{2,4,5,6,7,8,10,13,15},{2,4,5,6,7,8,10,14},{2,4,5,6,7,8,10,14,15},{2,4,5,6,7,8,10,15},{2,4,5,6,7,8,11},{2,4,5,6,7,8,11,12},{2,4,5,6,7,8,11,12,13},{2,4,5,6,7,8,11,12,13,14},{2,4,5,6,7,8,11,12,13,14,15},{2,4,5,6,7,8,11,12,13,15},{2,4,5,6,7,8,11,12,14},{2,4,5,6,7,8,11,12,14,15},{2,4,5,6,7,8,11,12,15},{2,4,5,6,7,8,11,13},{2,4,5,6,7,8,11,13,14},{2,4,5,6,7,8,11,13,14,15},{2,4,5,6,7,8,11,13,15},{2,4,5,6,7,8,11,14},{2,4,5,6,7,8,11,14,15},{2,4,5,6,7,8,11,15},{2,4,5,6,7,8,12},{2,4,5,6,7,8,12,13},{2,4,5,6,7,8,12,13,14},{2,4,5,6,7,8,12,13,14,15},{2,4,5,6,7,8,12,13,15},{2,4,5,6,7,8,12,14},{2,4,5,6,7,8,12,14,15},{2,4,5,6,7,8,12,15},{2,4,5,6,7,8,13},{2,4,5,6,7,8,13,14},{2,4,5,6,7,8,13,14,15},{2,4,5,6,7,8,13,15},{2,4,5,6,7,8,14},{2,4,5,6,7,8,14,15},{2,4,5,6,7,8,15},{2,4,5,6,7,9},{2,4,5,6,7,9,10},{2,4,5,6,7,9,10,11},{2,4,5,6,7,9,10,11,12},{2,4,5,6,7,9,10,11,12,13},{2,4,5,6,7,9,10,11,12,13,14},{2,4,5,6,7,9,10,11,12,13,14,15},{2,4,5,6,7,9,10,11,12,13,15},{2,4,5,6,7,9,10,11,12,14},{2,4,5,6,7,9,10,11,12,14,15},{2,4,5,6,7,9,10,11,12,15},{2,4,5,6,7,9,10,11,13},{2,4,5,6,7,9,10,11,13,14},{2,4,5,6,7,9,10,11,13,14,15},{2,4,5,6,7,9,10,11,13,15},{2,4,5,6,7,9,10,11,14},{2,4,5,6,7,9,10,11,14,15},{2,4,5,6,7,9,10,11,15},{2,4,5,6,7,9,10,12},{2,4,5,6,7,9,10,12,13},{2,4,5,6,7,9,10,12,13,14},{2,4,5,6,7,9,10,12,13,14,15},{2,4,5,6,7,9,10,12,13,15},{2,4,5,6,7,9,10,12,14},{2,4,5,6,7,9,10,12,14,15},{2,4,5,6,7,9,10,12,15},{2,4,5,6,7,9,10,13},{2,4,5,6,7,9,10,13,14},{2,4,5,6,7,9,10,13,14,15},{2,4,5,6,7,9,10,13,15},{2,4,5,6,7,9,10,14},{2,4,5,6,7,9,10,14,15},{2,4,5,6,7,9,10,15},{2,4,5,6,7,9,11},{2,4,5,6,7,9,11,12},{2,4,5,6,7,9,11,12,13},{2,4,5,6,7,9,11,12,13,14},{2,4,5,6,7,9,11,12,13,14,15},{2,4,5,6,7,9,11,12,13,15},{2,4,5,6,7,9,11,12,14},{2,4,5,6,7,9,11,12,14,15},{2,4,5,6,7,9,11,12,15},{2,4,5,6,7,9,11,13},{2,4,5,6,7,9,11,13,14},{2,4,5,6,7,9,11,13,14,15},{2,4,5,6,7,9,11,13,15},{2,4,5,6,7,9,11,14},{2,4,5,6,7,9,11,14,15},{2,4,5,6,7,9,11,15},{2,4,5,6,7,9,12},{2,4,5,6,7,9,12,13},{2,4,5,6,7,9,12,13,14},{2,4,5,6,7,9,12,13,14,15},{2,4,5,6,7,9,12,13,15},{2,4,5,6,7,9,12,14},{2,4,5,6,7,9,12,14,15},{2,4,5,6,7,9,12,15},{2,4,5,6,7,9,13},{2,4,5,6,7,9,13,14},{2,4,5,6,7,9,13,14,15},{2,4,5,6,7,9,13,15},{2,4,5,6,7,9,14},{2,4,5,6,7,9,14,15},{2,4,5,6,7,9,15},{2,4,5,6,7,10},{2,4,5,6,7,10,11},{2,4,5,6,7,10,11,12},{2,4,5,6,7,10,11,12,13},{2,4,5,6,7,10,11,12,13,14},{2,4,5,6,7,10,11,12,13,14,15},{2,4,5,6,7,10,11,12,13,15},{2,4,5,6,7,10,11,12,14},{2,4,5,6,7,10,11,12,14,15},{2,4,5,6,7,10,11,12,15},{2,4,5,6,7,10,11,13},{2,4,5,6,7,10,11,13,14},{2,4,5,6,7,10,11,13,14,15},{2,4,5,6,7,10,11,13,15},{2,4,5,6,7,10,11,14},{2,4,5,6,7,10,11,14,15},{2,4,5,6,7,10,11,15},{2,4,5,6,7,10,12},{2,4,5,6,7,10,12,13},{2,4,5,6,7,10,12,13,14},{2,4,5,6,7,10,12,13,14,15},{2,4,5,6,7,10,12,13,15},{2,4,5,6,7,10,12,14},{2,4,5,6,7,10,12,14,15},{2,4,5,6,7,10,12,15},{2,4,5,6,7,10,13},{2,4,5,6,7,10,13,14},{2,4,5,6,7,10,13,14,15},{2,4,5,6,7,10,13,15},{2,4,5,6,7,10,14},{2,4,5,6,7,10,14,15},{2,4,5,6,7,10,15},{2,4,5,6,7,11},{2,4,5,6,7,11,12},{2,4,5,6,7,11,12,13},{2,4,5,6,7,11,12,13,14},{2,4,5,6,7,11,12,13,14,15},{2,4,5,6,7,11,12,13,15},{2,4,5,6,7,11,12,14},{2,4,5,6,7,11,12,14,15},{2,4,5,6,7,11,12,15},{2,4,5,6,7,11,13},{2,4,5,6,7,11,13,14},{2,4,5,6,7,11,13,14,15},{2,4,5,6,7,11,13,15},{2,4,5,6,7,11,14},{2,4,5,6,7,11,14,15},{2,4,5,6,7,11,15},{2,4,5,6,7,12},{2,4,5,6,7,12,13},{2,4,5,6,7,12,13,14},{2,4,5,6,7,12,13,14,15},{2,4,5,6,7,12,13,15},{2,4,5,6,7,12,14},{2,4,5,6,7,12,14,15},{2,4,5,6,7,12,15},{2,4,5,6,7,13},{2,4,5,6,7,13,14},{2,4,5,6,7,13,14,15},{2,4,5,6,7,13,15},{2,4,5,6,7,14},{2,4,5,6,7,14,15},{2,4,5,6,7,15},{2,4,5,6,8},{2,4,5,6,8,9},{2,4,5,6,8,9,10},{2,4,5,6,8,9,10,11},{2,4,5,6,8,9,10,11,12},{2,4,5,6,8,9,10,11,12,13},{2,4,5,6,8,9,10,11,12,13,14},{2,4,5,6,8,9,10,11,12,13,14,15},{2,4,5,6,8,9,10,11,12,13,15},{2,4,5,6,8,9,10,11,12,14},{2,4,5,6,8,9,10,11,12,14,15},{2,4,5,6,8,9,10,11,12,15},{2,4,5,6,8,9,10,11,13},{2,4,5,6,8,9,10,11,13,14},{2,4,5,6,8,9,10,11,13,14,15},{2,4,5,6,8,9,10,11,13,15},{2,4,5,6,8,9,10,11,14},{2,4,5,6,8,9,10,11,14,15},{2,4,5,6,8,9,10,11,15},{2,4,5,6,8,9,10,12},{2,4,5,6,8,9,10,12,13},{2,4,5,6,8,9,10,12,13,14},{2,4,5,6,8,9,10,12,13,14,15},{2,4,5,6,8,9,10,12,13,15},{2,4,5,6,8,9,10,12,14},{2,4,5,6,8,9,10,12,14,15},{2,4,5,6,8,9,10,12,15},{2,4,5,6,8,9,10,13},{2,4,5,6,8,9,10,13,14},{2,4,5,6,8,9,10,13,14,15},{2,4,5,6,8,9,10,13,15},{2,4,5,6,8,9,10,14},{2,4,5,6,8,9,10,14,15},{2,4,5,6,8,9,10,15},{2,4,5,6,8,9,11},{2,4,5,6,8,9,11,12},{2,4,5,6,8,9,11,12,13},{2,4,5,6,8,9,11,12,13,14},{2,4,5,6,8,9,11,12,13,14,15},{2,4,5,6,8,9,11,12,13,15},{2,4,5,6,8,9,11,12,14},{2,4,5,6,8,9,11,12,14,15},{2,4,5,6,8,9,11,12,15},{2,4,5,6,8,9,11,13},{2,4,5,6,8,9,11,13,14},{2,4,5,6,8,9,11,13,14,15},{2,4,5,6,8,9,11,13,15},{2,4,5,6,8,9,11,14},{2,4,5,6,8,9,11,14,15},{2,4,5,6,8,9,11,15},{2,4,5,6,8,9,12},{2,4,5,6,8,9,12,13},{2,4,5,6,8,9,12,13,14},{2,4,5,6,8,9,12,13,14,15},{2,4,5,6,8,9,12,13,15},{2,4,5,6,8,9,12,14},{2,4,5,6,8,9,12,14,15},{2,4,5,6,8,9,12,15},{2,4,5,6,8,9,13},{2,4,5,6,8,9,13,14},{2,4,5,6,8,9,13,14,15},{2,4,5,6,8,9,13,15},{2,4,5,6,8,9,14},{2,4,5,6,8,9,14,15},{2,4,5,6,8,9,15},{2,4,5,6,8,10},{2,4,5,6,8,10,11},{2,4,5,6,8,10,11,12},{2,4,5,6,8,10,11,12,13},{2,4,5,6,8,10,11,12,13,14},{2,4,5,6,8,10,11,12,13,14,15},{2,4,5,6,8,10,11,12,13,15},{2,4,5,6,8,10,11,12,14},{2,4,5,6,8,10,11,12,14,15},{2,4,5,6,8,10,11,12,15},{2,4,5,6,8,10,11,13},{2,4,5,6,8,10,11,13,14},{2,4,5,6,8,10,11,13,14,15},{2,4,5,6,8,10,11,13,15},{2,4,5,6,8,10,11,14},{2,4,5,6,8,10,11,14,15},{2,4,5,6,8,10,11,15},{2,4,5,6,8,10,12},{2,4,5,6,8,10,12,13},{2,4,5,6,8,10,12,13,14},{2,4,5,6,8,10,12,13,14,15},{2,4,5,6,8,10,12,13,15},{2,4,5,6,8,10,12,14},{2,4,5,6,8,10,12,14,15},{2,4,5,6,8,10,12,15},{2,4,5,6,8,10,13},{2,4,5,6,8,10,13,14},{2,4,5,6,8,10,13,14,15},{2,4,5,6,8,10,13,15},{2,4,5,6,8,10,14},{2,4,5,6,8,10,14,15},{2,4,5,6,8,10,15},{2,4,5,6,8,11},{2,4,5,6,8,11,12},{2,4,5,6,8,11,12,13},{2,4,5,6,8,11,12,13,14},{2,4,5,6,8,11,12,13,14,15},{2,4,5,6,8,11,12,13,15},{2,4,5,6,8,11,12,14},{2,4,5,6,8,11,12,14,15},{2,4,5,6,8,11,12,15},{2,4,5,6,8,11,13},{2,4,5,6,8,11,13,14},{2,4,5,6,8,11,13,14,15},{2,4,5,6,8,11,13,15},{2,4,5,6,8,11,14},{2,4,5,6,8,11,14,15},{2,4,5,6,8,11,15},{2,4,5,6,8,12},{2,4,5,6,8,12,13},{2,4,5,6,8,12,13,14},{2,4,5,6,8,12,13,14,15},{2,4,5,6,8,12,13,15},{2,4,5,6,8,12,14},{2,4,5,6,8,12,14,15},{2,4,5,6,8,12,15},{2,4,5,6,8,13},{2,4,5,6,8,13,14},{2,4,5,6,8,13,14,15},{2,4,5,6,8,13,15},{2,4,5,6,8,14},{2,4,5,6,8,14,15},{2,4,5,6,8,15},{2,4,5,6,9},{2,4,5,6,9,10},{2,4,5,6,9,10,11},{2,4,5,6,9,10,11,12},{2,4,5,6,9,10,11,12,13},{2,4,5,6,9,10,11,12,13,14},{2,4,5,6,9,10,11,12,13,14,15},{2,4,5,6,9,10,11,12,13,15},{2,4,5,6,9,10,11,12,14},{2,4,5,6,9,10,11,12,14,15},{2,4,5,6,9,10,11,12,15},{2,4,5,6,9,10,11,13},{2,4,5,6,9,10,11,13,14},{2,4,5,6,9,10,11,13,14,15},{2,4,5,6,9,10,11,13,15},{2,4,5,6,9,10,11,14},{2,4,5,6,9,10,11,14,15},{2,4,5,6,9,10,11,15},{2,4,5,6,9,10,12},{2,4,5,6,9,10,12,13},{2,4,5,6,9,10,12,13,14},{2,4,5,6,9,10,12,13,14,15},{2,4,5,6,9,10,12,13,15},{2,4,5,6,9,10,12,14},{2,4,5,6,9,10,12,14,15},{2,4,5,6,9,10,12,15},{2,4,5,6,9,10,13},{2,4,5,6,9,10,13,14},{2,4,5,6,9,10,13,14,15},{2,4,5,6,9,10,13,15},{2,4,5,6,9,10,14},{2,4,5,6,9,10,14,15},{2,4,5,6,9,10,15},{2,4,5,6,9,11},{2,4,5,6,9,11,12},{2,4,5,6,9,11,12,13},{2,4,5,6,9,11,12,13,14},{2,4,5,6,9,11,12,13,14,15},{2,4,5,6,9,11,12,13,15},{2,4,5,6,9,11,12,14},{2,4,5,6,9,11,12,14,15},{2,4,5,6,9,11,12,15},{2,4,5,6,9,11,13},{2,4,5,6,9,11,13,14},{2,4,5,6,9,11,13,14,15},{2,4,5,6,9,11,13,15},{2,4,5,6,9,11,14},{2,4,5,6,9,11,14,15},{2,4,5,6,9,11,15},{2,4,5,6,9,12},{2,4,5,6,9,12,13},{2,4,5,6,9,12,13,14},{2,4,5,6,9,12,13,14,15},{2,4,5,6,9,12,13,15},{2,4,5,6,9,12,14},{2,4,5,6,9,12,14,15},{2,4,5,6,9,12,15},{2,4,5,6,9,13},{2,4,5,6,9,13,14},{2,4,5,6,9,13,14,15},{2,4,5,6,9,13,15},{2,4,5,6,9,14},{2,4,5,6,9,14,15},{2,4,5,6,9,15},{2,4,5,6,10},{2,4,5,6,10,11},{2,4,5,6,10,11,12},{2,4,5,6,10,11,12,13},{2,4,5,6,10,11,12,13,14},{2,4,5,6,10,11,12,13,14,15},{2,4,5,6,10,11,12,13,15},{2,4,5,6,10,11,12,14},{2,4,5,6,10,11,12,14,15},{2,4,5,6,10,11,12,15},{2,4,5,6,10,11,13},{2,4,5,6,10,11,13,14},{2,4,5,6,10,11,13,14,15},{2,4,5,6,10,11,13,15},{2,4,5,6,10,11,14},{2,4,5,6,10,11,14,15},{2,4,5,6,10,11,15},{2,4,5,6,10,12},{2,4,5,6,10,12,13},{2,4,5,6,10,12,13,14},{2,4,5,6,10,12,13,14,15},{2,4,5,6,10,12,13,15},{2,4,5,6,10,12,14},{2,4,5,6,10,12,14,15},{2,4,5,6,10,12,15},{2,4,5,6,10,13},{2,4,5,6,10,13,14},{2,4,5,6,10,13,14,15},{2,4,5,6,10,13,15},{2,4,5,6,10,14},{2,4,5,6,10,14,15},{2,4,5,6,10,15},{2,4,5,6,11},{2,4,5,6,11,12},{2,4,5,6,11,12,13},{2,4,5,6,11,12,13,14},{2,4,5,6,11,12,13,14,15},{2,4,5,6,11,12,13,15},{2,4,5,6,11,12,14},{2,4,5,6,11,12,14,15},{2,4,5,6,11,12,15},{2,4,5,6,11,13},{2,4,5,6,11,13,14},{2,4,5,6,11,13,14,15},{2,4,5,6,11,13,15},{2,4,5,6,11,14},{2,4,5,6,11,14,15},{2,4,5,6,11,15},{2,4,5,6,12},{2,4,5,6,12,13},{2,4,5,6,12,13,14},{2,4,5,6,12,13,14,15},{2,4,5,6,12,13,15},{2,4,5,6,12,14},{2,4,5,6,12,14,15},{2,4,5,6,12,15},{2,4,5,6,13},{2,4,5,6,13,14},{2,4,5,6,13,14,15},{2,4,5,6,13,15},{2,4,5,6,14},{2,4,5,6,14,15},{2,4,5,6,15},{2,4,5,7},{2,4,5,7,8},{2,4,5,7,8,9},{2,4,5,7,8,9,10},{2,4,5,7,8,9,10,11},{2,4,5,7,8,9,10,11,12},{2,4,5,7,8,9,10,11,12,13},{2,4,5,7,8,9,10,11,12,13,14},{2,4,5,7,8,9,10,11,12,13,14,15},{2,4,5,7,8,9,10,11,12,13,15},{2,4,5,7,8,9,10,11,12,14},{2,4,5,7,8,9,10,11,12,14,15},{2,4,5,7,8,9,10,11,12,15},{2,4,5,7,8,9,10,11,13},{2,4,5,7,8,9,10,11,13,14},{2,4,5,7,8,9,10,11,13,14,15},{2,4,5,7,8,9,10,11,13,15},{2,4,5,7,8,9,10,11,14},{2,4,5,7,8,9,10,11,14,15},{2,4,5,7,8,9,10,11,15},{2,4,5,7,8,9,10,12},{2,4,5,7,8,9,10,12,13},{2,4,5,7,8,9,10,12,13,14},{2,4,5,7,8,9,10,12,13,14,15},{2,4,5,7,8,9,10,12,13,15},{2,4,5,7,8,9,10,12,14},{2,4,5,7,8,9,10,12,14,15},{2,4,5,7,8,9,10,12,15},{2,4,5,7,8,9,10,13},{2,4,5,7,8,9,10,13,14},{2,4,5,7,8,9,10,13,14,15},{2,4,5,7,8,9,10,13,15},{2,4,5,7,8,9,10,14},{2,4,5,7,8,9,10,14,15},{2,4,5,7,8,9,10,15},{2,4,5,7,8,9,11},{2,4,5,7,8,9,11,12},{2,4,5,7,8,9,11,12,13},{2,4,5,7,8,9,11,12,13,14},{2,4,5,7,8,9,11,12,13,14,15},{2,4,5,7,8,9,11,12,13,15},{2,4,5,7,8,9,11,12,14},{2,4,5,7,8,9,11,12,14,15},{2,4,5,7,8,9,11,12,15},{2,4,5,7,8,9,11,13},{2,4,5,7,8,9,11,13,14},{2,4,5,7,8,9,11,13,14,15},{2,4,5,7,8,9,11,13,15},{2,4,5,7,8,9,11,14},{2,4,5,7,8,9,11,14,15},{2,4,5,7,8,9,11,15},{2,4,5,7,8,9,12},{2,4,5,7,8,9,12,13},{2,4,5,7,8,9,12,13,14},{2,4,5,7,8,9,12,13,14,15},{2,4,5,7,8,9,12,13,15},{2,4,5,7,8,9,12,14},{2,4,5,7,8,9,12,14,15},{2,4,5,7,8,9,12,15},{2,4,5,7,8,9,13},{2,4,5,7,8,9,13,14},{2,4,5,7,8,9,13,14,15},{2,4,5,7,8,9,13,15},{2,4,5,7,8,9,14},{2,4,5,7,8,9,14,15},{2,4,5,7,8,9,15},{2,4,5,7,8,10},{2,4,5,7,8,10,11},{2,4,5,7,8,10,11,12},{2,4,5,7,8,10,11,12,13},{2,4,5,7,8,10,11,12,13,14},{2,4,5,7,8,10,11,12,13,14,15},{2,4,5,7,8,10,11,12,13,15},{2,4,5,7,8,10,11,12,14},{2,4,5,7,8,10,11,12,14,15},{2,4,5,7,8,10,11,12,15},{2,4,5,7,8,10,11,13},{2,4,5,7,8,10,11,13,14},{2,4,5,7,8,10,11,13,14,15},{2,4,5,7,8,10,11,13,15},{2,4,5,7,8,10,11,14},{2,4,5,7,8,10,11,14,15},{2,4,5,7,8,10,11,15},{2,4,5,7,8,10,12},{2,4,5,7,8,10,12,13},{2,4,5,7,8,10,12,13,14},{2,4,5,7,8,10,12,13,14,15},{2,4,5,7,8,10,12,13,15},{2,4,5,7,8,10,12,14},{2,4,5,7,8,10,12,14,15},{2,4,5,7,8,10,12,15},{2,4,5,7,8,10,13},{2,4,5,7,8,10,13,14},{2,4,5,7,8,10,13,14,15},{2,4,5,7,8,10,13,15},{2,4,5,7,8,10,14},{2,4,5,7,8,10,14,15},{2,4,5,7,8,10,15},{2,4,5,7,8,11},{2,4,5,7,8,11,12},{2,4,5,7,8,11,12,13},{2,4,5,7,8,11,12,13,14},{2,4,5,7,8,11,12,13,14,15},{2,4,5,7,8,11,12,13,15},{2,4,5,7,8,11,12,14},{2,4,5,7,8,11,12,14,15},{2,4,5,7,8,11,12,15},{2,4,5,7,8,11,13},{2,4,5,7,8,11,13,14},{2,4,5,7,8,11,13,14,15},{2,4,5,7,8,11,13,15},{2,4,5,7,8,11,14},{2,4,5,7,8,11,14,15},{2,4,5,7,8,11,15},{2,4,5,7,8,12},{2,4,5,7,8,12,13},{2,4,5,7,8,12,13,14},{2,4,5,7,8,12,13,14,15},{2,4,5,7,8,12,13,15},{2,4,5,7,8,12,14},{2,4,5,7,8,12,14,15},{2,4,5,7,8,12,15},{2,4,5,7,8,13},{2,4,5,7,8,13,14},{2,4,5,7,8,13,14,15},{2,4,5,7,8,13,15},{2,4,5,7,8,14},{2,4,5,7,8,14,15},{2,4,5,7,8,15},{2,4,5,7,9},{2,4,5,7,9,10},{2,4,5,7,9,10,11},{2,4,5,7,9,10,11,12},{2,4,5,7,9,10,11,12,13},{2,4,5,7,9,10,11,12,13,14},{2,4,5,7,9,10,11,12,13,14,15},{2,4,5,7,9,10,11,12,13,15},{2,4,5,7,9,10,11,12,14},{2,4,5,7,9,10,11,12,14,15},{2,4,5,7,9,10,11,12,15},{2,4,5,7,9,10,11,13},{2,4,5,7,9,10,11,13,14},{2,4,5,7,9,10,11,13,14,15},{2,4,5,7,9,10,11,13,15},{2,4,5,7,9,10,11,14},{2,4,5,7,9,10,11,14,15},{2,4,5,7,9,10,11,15},{2,4,5,7,9,10,12},{2,4,5,7,9,10,12,13},{2,4,5,7,9,10,12,13,14},{2,4,5,7,9,10,12,13,14,15},{2,4,5,7,9,10,12,13,15},{2,4,5,7,9,10,12,14},{2,4,5,7,9,10,12,14,15},{2,4,5,7,9,10,12,15},{2,4,5,7,9,10,13},{2,4,5,7,9,10,13,14},{2,4,5,7,9,10,13,14,15},{2,4,5,7,9,10,13,15},{2,4,5,7,9,10,14},{2,4,5,7,9,10,14,15},{2,4,5,7,9,10,15},{2,4,5,7,9,11},{2,4,5,7,9,11,12},{2,4,5,7,9,11,12,13},{2,4,5,7,9,11,12,13,14},{2,4,5,7,9,11,12,13,14,15},{2,4,5,7,9,11,12,13,15},{2,4,5,7,9,11,12,14},{2,4,5,7,9,11,12,14,15},{2,4,5,7,9,11,12,15},{2,4,5,7,9,11,13},{2,4,5,7,9,11,13,14},{2,4,5,7,9,11,13,14,15},{2,4,5,7,9,11,13,15},{2,4,5,7,9,11,14},{2,4,5,7,9,11,14,15},{2,4,5,7,9,11,15},{2,4,5,7,9,12},{2,4,5,7,9,12,13},{2,4,5,7,9,12,13,14},{2,4,5,7,9,12,13,14,15},{2,4,5,7,9,12,13,15},{2,4,5,7,9,12,14},{2,4,5,7,9,12,14,15},{2,4,5,7,9,12,15},{2,4,5,7,9,13},{2,4,5,7,9,13,14},{2,4,5,7,9,13,14,15},{2,4,5,7,9,13,15},{2,4,5,7,9,14},{2,4,5,7,9,14,15},{2,4,5,7,9,15},{2,4,5,7,10},{2,4,5,7,10,11},{2,4,5,7,10,11,12},{2,4,5,7,10,11,12,13},{2,4,5,7,10,11,12,13,14},{2,4,5,7,10,11,12,13,14,15},{2,4,5,7,10,11,12,13,15},{2,4,5,7,10,11,12,14},{2,4,5,7,10,11,12,14,15},{2,4,5,7,10,11,12,15},{2,4,5,7,10,11,13},{2,4,5,7,10,11,13,14},{2,4,5,7,10,11,13,14,15},{2,4,5,7,10,11,13,15},{2,4,5,7,10,11,14},{2,4,5,7,10,11,14,15},{2,4,5,7,10,11,15},{2,4,5,7,10,12},{2,4,5,7,10,12,13},{2,4,5,7,10,12,13,14},{2,4,5,7,10,12,13,14,15},{2,4,5,7,10,12,13,15},{2,4,5,7,10,12,14},{2,4,5,7,10,12,14,15},{2,4,5,7,10,12,15},{2,4,5,7,10,13},{2,4,5,7,10,13,14},{2,4,5,7,10,13,14,15},{2,4,5,7,10,13,15},{2,4,5,7,10,14},{2,4,5,7,10,14,15},{2,4,5,7,10,15},{2,4,5,7,11},{2,4,5,7,11,12},{2,4,5,7,11,12,13},{2,4,5,7,11,12,13,14},{2,4,5,7,11,12,13,14,15},{2,4,5,7,11,12,13,15},{2,4,5,7,11,12,14},{2,4,5,7,11,12,14,15},{2,4,5,7,11,12,15},{2,4,5,7,11,13},{2,4,5,7,11,13,14},{2,4,5,7,11,13,14,15},{2,4,5,7,11,13,15},{2,4,5,7,11,14},{2,4,5,7,11,14,15},{2,4,5,7,11,15},{2,4,5,7,12},{2,4,5,7,12,13},{2,4,5,7,12,13,14},{2,4,5,7,12,13,14,15},{2,4,5,7,12,13,15},{2,4,5,7,12,14},{2,4,5,7,12,14,15},{2,4,5,7,12,15},{2,4,5,7,13},{2,4,5,7,13,14},{2,4,5,7,13,14,15},{2,4,5,7,13,15},{2,4,5,7,14},{2,4,5,7,14,15},{2,4,5,7,15},{2,4,5,8},{2,4,5,8,9},{2,4,5,8,9,10},{2,4,5,8,9,10,11},{2,4,5,8,9,10,11,12},{2,4,5,8,9,10,11,12,13},{2,4,5,8,9,10,11,12,13,14},{2,4,5,8,9,10,11,12,13,14,15},{2,4,5,8,9,10,11,12,13,15},{2,4,5,8,9,10,11,12,14},{2,4,5,8,9,10,11,12,14,15},{2,4,5,8,9,10,11,12,15},{2,4,5,8,9,10,11,13},{2,4,5,8,9,10,11,13,14},{2,4,5,8,9,10,11,13,14,15},{2,4,5,8,9,10,11,13,15},{2,4,5,8,9,10,11,14},{2,4,5,8,9,10,11,14,15},{2,4,5,8,9,10,11,15},{2,4,5,8,9,10,12},{2,4,5,8,9,10,12,13},{2,4,5,8,9,10,12,13,14},{2,4,5,8,9,10,12,13,14,15},{2,4,5,8,9,10,12,13,15},{2,4,5,8,9,10,12,14},{2,4,5,8,9,10,12,14,15},{2,4,5,8,9,10,12,15},{2,4,5,8,9,10,13},{2,4,5,8,9,10,13,14},{2,4,5,8,9,10,13,14,15},{2,4,5,8,9,10,13,15},{2,4,5,8,9,10,14},{2,4,5,8,9,10,14,15},{2,4,5,8,9,10,15},{2,4,5,8,9,11},{2,4,5,8,9,11,12},{2,4,5,8,9,11,12,13},{2,4,5,8,9,11,12,13,14},{2,4,5,8,9,11,12,13,14,15},{2,4,5,8,9,11,12,13,15},{2,4,5,8,9,11,12,14},{2,4,5,8,9,11,12,14,15},{2,4,5,8,9,11,12,15},{2,4,5,8,9,11,13},{2,4,5,8,9,11,13,14},{2,4,5,8,9,11,13,14,15},{2,4,5,8,9,11,13,15},{2,4,5,8,9,11,14},{2,4,5,8,9,11,14,15},{2,4,5,8,9,11,15},{2,4,5,8,9,12},{2,4,5,8,9,12,13},{2,4,5,8,9,12,13,14},{2,4,5,8,9,12,13,14,15},{2,4,5,8,9,12,13,15},{2,4,5,8,9,12,14},{2,4,5,8,9,12,14,15},{2,4,5,8,9,12,15},{2,4,5,8,9,13},{2,4,5,8,9,13,14},{2,4,5,8,9,13,14,15},{2,4,5,8,9,13,15},{2,4,5,8,9,14},{2,4,5,8,9,14,15},{2,4,5,8,9,15},{2,4,5,8,10},{2,4,5,8,10,11},{2,4,5,8,10,11,12},{2,4,5,8,10,11,12,13},{2,4,5,8,10,11,12,13,14},{2,4,5,8,10,11,12,13,14,15},{2,4,5,8,10,11,12,13,15},{2,4,5,8,10,11,12,14},{2,4,5,8,10,11,12,14,15},{2,4,5,8,10,11,12,15},{2,4,5,8,10,11,13},{2,4,5,8,10,11,13,14},{2,4,5,8,10,11,13,14,15},{2,4,5,8,10,11,13,15},{2,4,5,8,10,11,14},{2,4,5,8,10,11,14,15},{2,4,5,8,10,11,15},{2,4,5,8,10,12},{2,4,5,8,10,12,13},{2,4,5,8,10,12,13,14},{2,4,5,8,10,12,13,14,15},{2,4,5,8,10,12,13,15},{2,4,5,8,10,12,14},{2,4,5,8,10,12,14,15},{2,4,5,8,10,12,15},{2,4,5,8,10,13},{2,4,5,8,10,13,14},{2,4,5,8,10,13,14,15},{2,4,5,8,10,13,15},{2,4,5,8,10,14},{2,4,5,8,10,14,15},{2,4,5,8,10,15},{2,4,5,8,11},{2,4,5,8,11,12},{2,4,5,8,11,12,13},{2,4,5,8,11,12,13,14},{2,4,5,8,11,12,13,14,15},{2,4,5,8,11,12,13,15},{2,4,5,8,11,12,14},{2,4,5,8,11,12,14,15},{2,4,5,8,11,12,15},{2,4,5,8,11,13},{2,4,5,8,11,13,14},{2,4,5,8,11,13,14,15},{2,4,5,8,11,13,15},{2,4,5,8,11,14},{2,4,5,8,11,14,15},{2,4,5,8,11,15},{2,4,5,8,12},{2,4,5,8,12,13},{2,4,5,8,12,13,14},{2,4,5,8,12,13,14,15},{2,4,5,8,12,13,15},{2,4,5,8,12,14},{2,4,5,8,12,14,15},{2,4,5,8,12,15},{2,4,5,8,13},{2,4,5,8,13,14},{2,4,5,8,13,14,15},{2,4,5,8,13,15},{2,4,5,8,14},{2,4,5,8,14,15},{2,4,5,8,15},{2,4,5,9},{2,4,5,9,10},{2,4,5,9,10,11},{2,4,5,9,10,11,12},{2,4,5,9,10,11,12,13},{2,4,5,9,10,11,12,13,14},{2,4,5,9,10,11,12,13,14,15},{2,4,5,9,10,11,12,13,15},{2,4,5,9,10,11,12,14},{2,4,5,9,10,11,12,14,15},{2,4,5,9,10,11,12,15},{2,4,5,9,10,11,13},{2,4,5,9,10,11,13,14},{2,4,5,9,10,11,13,14,15},{2,4,5,9,10,11,13,15},{2,4,5,9,10,11,14},{2,4,5,9,10,11,14,15},{2,4,5,9,10,11,15},{2,4,5,9,10,12},{2,4,5,9,10,12,13},{2,4,5,9,10,12,13,14},{2,4,5,9,10,12,13,14,15},{2,4,5,9,10,12,13,15},{2,4,5,9,10,12,14},{2,4,5,9,10,12,14,15},{2,4,5,9,10,12,15},{2,4,5,9,10,13},{2,4,5,9,10,13,14},{2,4,5,9,10,13,14,15},{2,4,5,9,10,13,15},{2,4,5,9,10,14},{2,4,5,9,10,14,15},{2,4,5,9,10,15},{2,4,5,9,11},{2,4,5,9,11,12},{2,4,5,9,11,12,13},{2,4,5,9,11,12,13,14},{2,4,5,9,11,12,13,14,15},{2,4,5,9,11,12,13,15},{2,4,5,9,11,12,14},{2,4,5,9,11,12,14,15},{2,4,5,9,11,12,15},{2,4,5,9,11,13},{2,4,5,9,11,13,14},{2,4,5,9,11,13,14,15},{2,4,5,9,11,13,15},{2,4,5,9,11,14},{2,4,5,9,11,14,15},{2,4,5,9,11,15},{2,4,5,9,12},{2,4,5,9,12,13},{2,4,5,9,12,13,14},{2,4,5,9,12,13,14,15},{2,4,5,9,12,13,15},{2,4,5,9,12,14},{2,4,5,9,12,14,15},{2,4,5,9,12,15},{2,4,5,9,13},{2,4,5,9,13,14},{2,4,5,9,13,14,15},{2,4,5,9,13,15},{2,4,5,9,14},{2,4,5,9,14,15},{2,4,5,9,15},{2,4,5,10},{2,4,5,10,11},{2,4,5,10,11,12},{2,4,5,10,11,12,13},{2,4,5,10,11,12,13,14},{2,4,5,10,11,12,13,14,15},{2,4,5,10,11,12,13,15},{2,4,5,10,11,12,14},{2,4,5,10,11,12,14,15},{2,4,5,10,11,12,15},{2,4,5,10,11,13},{2,4,5,10,11,13,14},{2,4,5,10,11,13,14,15},{2,4,5,10,11,13,15},{2,4,5,10,11,14},{2,4,5,10,11,14,15},{2,4,5,10,11,15},{2,4,5,10,12},{2,4,5,10,12,13},{2,4,5,10,12,13,14},{2,4,5,10,12,13,14,15},{2,4,5,10,12,13,15},{2,4,5,10,12,14},{2,4,5,10,12,14,15},{2,4,5,10,12,15},{2,4,5,10,13},{2,4,5,10,13,14},{2,4,5,10,13,14,15},{2,4,5,10,13,15},{2,4,5,10,14},{2,4,5,10,14,15},{2,4,5,10,15},{2,4,5,11},{2,4,5,11,12},{2,4,5,11,12,13},{2,4,5,11,12,13,14},{2,4,5,11,12,13,14,15},{2,4,5,11,12,13,15},{2,4,5,11,12,14},{2,4,5,11,12,14,15},{2,4,5,11,12,15},{2,4,5,11,13},{2,4,5,11,13,14},{2,4,5,11,13,14,15},{2,4,5,11,13,15},{2,4,5,11,14},{2,4,5,11,14,15},{2,4,5,11,15},{2,4,5,12},{2,4,5,12,13},{2,4,5,12,13,14},{2,4,5,12,13,14,15},{2,4,5,12,13,15},{2,4,5,12,14},{2,4,5,12,14,15},{2,4,5,12,15},{2,4,5,13},{2,4,5,13,14},{2,4,5,13,14,15},{2,4,5,13,15},{2,4,5,14},{2,4,5,14,15},{2,4,5,15},{2,4,6},{2,4,6,7},{2,4,6,7,8},{2,4,6,7,8,9},{2,4,6,7,8,9,10},{2,4,6,7,8,9,10,11},{2,4,6,7,8,9,10,11,12},{2,4,6,7,8,9,10,11,12,13},{2,4,6,7,8,9,10,11,12,13,14},{2,4,6,7,8,9,10,11,12,13,14,15},{2,4,6,7,8,9,10,11,12,13,15},{2,4,6,7,8,9,10,11,12,14},{2,4,6,7,8,9,10,11,12,14,15},{2,4,6,7,8,9,10,11,12,15},{2,4,6,7,8,9,10,11,13},{2,4,6,7,8,9,10,11,13,14},{2,4,6,7,8,9,10,11,13,14,15},{2,4,6,7,8,9,10,11,13,15},{2,4,6,7,8,9,10,11,14},{2,4,6,7,8,9,10,11,14,15},{2,4,6,7,8,9,10,11,15},{2,4,6,7,8,9,10,12},{2,4,6,7,8,9,10,12,13},{2,4,6,7,8,9,10,12,13,14},{2,4,6,7,8,9,10,12,13,14,15},{2,4,6,7,8,9,10,12,13,15},{2,4,6,7,8,9,10,12,14},{2,4,6,7,8,9,10,12,14,15},{2,4,6,7,8,9,10,12,15},{2,4,6,7,8,9,10,13},{2,4,6,7,8,9,10,13,14},{2,4,6,7,8,9,10,13,14,15},{2,4,6,7,8,9,10,13,15},{2,4,6,7,8,9,10,14},{2,4,6,7,8,9,10,14,15},{2,4,6,7,8,9,10,15},{2,4,6,7,8,9,11},{2,4,6,7,8,9,11,12},{2,4,6,7,8,9,11,12,13},{2,4,6,7,8,9,11,12,13,14},{2,4,6,7,8,9,11,12,13,14,15},{2,4,6,7,8,9,11,12,13,15},{2,4,6,7,8,9,11,12,14},{2,4,6,7,8,9,11,12,14,15},{2,4,6,7,8,9,11,12,15},{2,4,6,7,8,9,11,13},{2,4,6,7,8,9,11,13,14},{2,4,6,7,8,9,11,13,14,15},{2,4,6,7,8,9,11,13,15},{2,4,6,7,8,9,11,14},{2,4,6,7,8,9,11,14,15},{2,4,6,7,8,9,11,15},{2,4,6,7,8,9,12},{2,4,6,7,8,9,12,13},{2,4,6,7,8,9,12,13,14},{2,4,6,7,8,9,12,13,14,15},{2,4,6,7,8,9,12,13,15},{2,4,6,7,8,9,12,14},{2,4,6,7,8,9,12,14,15},{2,4,6,7,8,9,12,15},{2,4,6,7,8,9,13},{2,4,6,7,8,9,13,14},{2,4,6,7,8,9,13,14,15},{2,4,6,7,8,9,13,15},{2,4,6,7,8,9,14},{2,4,6,7,8,9,14,15},{2,4,6,7,8,9,15},{2,4,6,7,8,10},{2,4,6,7,8,10,11},{2,4,6,7,8,10,11,12},{2,4,6,7,8,10,11,12,13},{2,4,6,7,8,10,11,12,13,14},{2,4,6,7,8,10,11,12,13,14,15},{2,4,6,7,8,10,11,12,13,15},{2,4,6,7,8,10,11,12,14},{2,4,6,7,8,10,11,12,14,15},{2,4,6,7,8,10,11,12,15},{2,4,6,7,8,10,11,13},{2,4,6,7,8,10,11,13,14},{2,4,6,7,8,10,11,13,14,15},{2,4,6,7,8,10,11,13,15},{2,4,6,7,8,10,11,14},{2,4,6,7,8,10,11,14,15},{2,4,6,7,8,10,11,15},{2,4,6,7,8,10,12},{2,4,6,7,8,10,12,13},{2,4,6,7,8,10,12,13,14},{2,4,6,7,8,10,12,13,14,15},{2,4,6,7,8,10,12,13,15},{2,4,6,7,8,10,12,14},{2,4,6,7,8,10,12,14,15},{2,4,6,7,8,10,12,15},{2,4,6,7,8,10,13},{2,4,6,7,8,10,13,14},{2,4,6,7,8,10,13,14,15},{2,4,6,7,8,10,13,15},{2,4,6,7,8,10,14},{2,4,6,7,8,10,14,15},{2,4,6,7,8,10,15},{2,4,6,7,8,11},{2,4,6,7,8,11,12},{2,4,6,7,8,11,12,13},{2,4,6,7,8,11,12,13,14},{2,4,6,7,8,11,12,13,14,15},{2,4,6,7,8,11,12,13,15},{2,4,6,7,8,11,12,14},{2,4,6,7,8,11,12,14,15},{2,4,6,7,8,11,12,15},{2,4,6,7,8,11,13},{2,4,6,7,8,11,13,14},{2,4,6,7,8,11,13,14,15},{2,4,6,7,8,11,13,15},{2,4,6,7,8,11,14},{2,4,6,7,8,11,14,15},{2,4,6,7,8,11,15},{2,4,6,7,8,12},{2,4,6,7,8,12,13},{2,4,6,7,8,12,13,14},{2,4,6,7,8,12,13,14,15},{2,4,6,7,8,12,13,15},{2,4,6,7,8,12,14},{2,4,6,7,8,12,14,15},{2,4,6,7,8,12,15},{2,4,6,7,8,13},{2,4,6,7,8,13,14},{2,4,6,7,8,13,14,15},{2,4,6,7,8,13,15},{2,4,6,7,8,14},{2,4,6,7,8,14,15},{2,4,6,7,8,15},{2,4,6,7,9},{2,4,6,7,9,10},{2,4,6,7,9,10,11},{2,4,6,7,9,10,11,12},{2,4,6,7,9,10,11,12,13},{2,4,6,7,9,10,11,12,13,14},{2,4,6,7,9,10,11,12,13,14,15},{2,4,6,7,9,10,11,12,13,15},{2,4,6,7,9,10,11,12,14},{2,4,6,7,9,10,11,12,14,15},{2,4,6,7,9,10,11,12,15},{2,4,6,7,9,10,11,13},{2,4,6,7,9,10,11,13,14},{2,4,6,7,9,10,11,13,14,15},{2,4,6,7,9,10,11,13,15},{2,4,6,7,9,10,11,14},{2,4,6,7,9,10,11,14,15},{2,4,6,7,9,10,11,15},{2,4,6,7,9,10,12},{2,4,6,7,9,10,12,13},{2,4,6,7,9,10,12,13,14},{2,4,6,7,9,10,12,13,14,15},{2,4,6,7,9,10,12,13,15},{2,4,6,7,9,10,12,14},{2,4,6,7,9,10,12,14,15},{2,4,6,7,9,10,12,15},{2,4,6,7,9,10,13},{2,4,6,7,9,10,13,14},{2,4,6,7,9,10,13,14,15},{2,4,6,7,9,10,13,15},{2,4,6,7,9,10,14},{2,4,6,7,9,10,14,15},{2,4,6,7,9,10,15},{2,4,6,7,9,11},{2,4,6,7,9,11,12},{2,4,6,7,9,11,12,13},{2,4,6,7,9,11,12,13,14},{2,4,6,7,9,11,12,13,14,15},{2,4,6,7,9,11,12,13,15},{2,4,6,7,9,11,12,14},{2,4,6,7,9,11,12,14,15},{2,4,6,7,9,11,12,15},{2,4,6,7,9,11,13},{2,4,6,7,9,11,13,14},{2,4,6,7,9,11,13,14,15},{2,4,6,7,9,11,13,15},{2,4,6,7,9,11,14},{2,4,6,7,9,11,14,15},{2,4,6,7,9,11,15},{2,4,6,7,9,12},{2,4,6,7,9,12,13},{2,4,6,7,9,12,13,14},{2,4,6,7,9,12,13,14,15},{2,4,6,7,9,12,13,15},{2,4,6,7,9,12,14},{2,4,6,7,9,12,14,15},{2,4,6,7,9,12,15},{2,4,6,7,9,13},{2,4,6,7,9,13,14},{2,4,6,7,9,13,14,15},{2,4,6,7,9,13,15},{2,4,6,7,9,14},{2,4,6,7,9,14,15},{2,4,6,7,9,15},{2,4,6,7,10},{2,4,6,7,10,11},{2,4,6,7,10,11,12},{2,4,6,7,10,11,12,13},{2,4,6,7,10,11,12,13,14},{2,4,6,7,10,11,12,13,14,15},{2,4,6,7,10,11,12,13,15},{2,4,6,7,10,11,12,14},{2,4,6,7,10,11,12,14,15},{2,4,6,7,10,11,12,15},{2,4,6,7,10,11,13},{2,4,6,7,10,11,13,14},{2,4,6,7,10,11,13,14,15},{2,4,6,7,10,11,13,15},{2,4,6,7,10,11,14},{2,4,6,7,10,11,14,15},{2,4,6,7,10,11,15},{2,4,6,7,10,12},{2,4,6,7,10,12,13},{2,4,6,7,10,12,13,14},{2,4,6,7,10,12,13,14,15},{2,4,6,7,10,12,13,15},{2,4,6,7,10,12,14},{2,4,6,7,10,12,14,15},{2,4,6,7,10,12,15},{2,4,6,7,10,13},{2,4,6,7,10,13,14},{2,4,6,7,10,13,14,15},{2,4,6,7,10,13,15},{2,4,6,7,10,14},{2,4,6,7,10,14,15},{2,4,6,7,10,15},{2,4,6,7,11},{2,4,6,7,11,12},{2,4,6,7,11,12,13},{2,4,6,7,11,12,13,14},{2,4,6,7,11,12,13,14,15},{2,4,6,7,11,12,13,15},{2,4,6,7,11,12,14},{2,4,6,7,11,12,14,15},{2,4,6,7,11,12,15},{2,4,6,7,11,13},{2,4,6,7,11,13,14},{2,4,6,7,11,13,14,15},{2,4,6,7,11,13,15},{2,4,6,7,11,14},{2,4,6,7,11,14,15},{2,4,6,7,11,15},{2,4,6,7,12},{2,4,6,7,12,13},{2,4,6,7,12,13,14},{2,4,6,7,12,13,14,15},{2,4,6,7,12,13,15},{2,4,6,7,12,14},{2,4,6,7,12,14,15},{2,4,6,7,12,15},{2,4,6,7,13},{2,4,6,7,13,14},{2,4,6,7,13,14,15},{2,4,6,7,13,15},{2,4,6,7,14},{2,4,6,7,14,15},{2,4,6,7,15},{2,4,6,8},{2,4,6,8,9},{2,4,6,8,9,10},{2,4,6,8,9,10,11},{2,4,6,8,9,10,11,12},{2,4,6,8,9,10,11,12,13},{2,4,6,8,9,10,11,12,13,14},{2,4,6,8,9,10,11,12,13,14,15},{2,4,6,8,9,10,11,12,13,15},{2,4,6,8,9,10,11,12,14},{2,4,6,8,9,10,11,12,14,15},{2,4,6,8,9,10,11,12,15},{2,4,6,8,9,10,11,13},{2,4,6,8,9,10,11,13,14},{2,4,6,8,9,10,11,13,14,15},{2,4,6,8,9,10,11,13,15},{2,4,6,8,9,10,11,14},{2,4,6,8,9,10,11,14,15},{2,4,6,8,9,10,11,15},{2,4,6,8,9,10,12},{2,4,6,8,9,10,12,13},{2,4,6,8,9,10,12,13,14},{2,4,6,8,9,10,12,13,14,15},{2,4,6,8,9,10,12,13,15},{2,4,6,8,9,10,12,14},{2,4,6,8,9,10,12,14,15},{2,4,6,8,9,10,12,15},{2,4,6,8,9,10,13},{2,4,6,8,9,10,13,14},{2,4,6,8,9,10,13,14,15},{2,4,6,8,9,10,13,15},{2,4,6,8,9,10,14},{2,4,6,8,9,10,14,15},{2,4,6,8,9,10,15},{2,4,6,8,9,11},{2,4,6,8,9,11,12},{2,4,6,8,9,11,12,13},{2,4,6,8,9,11,12,13,14},{2,4,6,8,9,11,12,13,14,15},{2,4,6,8,9,11,12,13,15},{2,4,6,8,9,11,12,14},{2,4,6,8,9,11,12,14,15},{2,4,6,8,9,11,12,15},{2,4,6,8,9,11,13},{2,4,6,8,9,11,13,14},{2,4,6,8,9,11,13,14,15},{2,4,6,8,9,11,13,15},{2,4,6,8,9,11,14},{2,4,6,8,9,11,14,15},{2,4,6,8,9,11,15},{2,4,6,8,9,12},{2,4,6,8,9,12,13},{2,4,6,8,9,12,13,14},{2,4,6,8,9,12,13,14,15},{2,4,6,8,9,12,13,15},{2,4,6,8,9,12,14},{2,4,6,8,9,12,14,15},{2,4,6,8,9,12,15},{2,4,6,8,9,13},{2,4,6,8,9,13,14},{2,4,6,8,9,13,14,15},{2,4,6,8,9,13,15},{2,4,6,8,9,14},{2,4,6,8,9,14,15},{2,4,6,8,9,15},{2,4,6,8,10},{2,4,6,8,10,11},{2,4,6,8,10,11,12},{2,4,6,8,10,11,12,13},{2,4,6,8,10,11,12,13,14},{2,4,6,8,10,11,12,13,14,15},{2,4,6,8,10,11,12,13,15},{2,4,6,8,10,11,12,14},{2,4,6,8,10,11,12,14,15},{2,4,6,8,10,11,12,15},{2,4,6,8,10,11,13},{2,4,6,8,10,11,13,14},{2,4,6,8,10,11,13,14,15},{2,4,6,8,10,11,13,15},{2,4,6,8,10,11,14},{2,4,6,8,10,11,14,15},{2,4,6,8,10,11,15},{2,4,6,8,10,12},{2,4,6,8,10,12,13},{2,4,6,8,10,12,13,14},{2,4,6,8,10,12,13,14,15},{2,4,6,8,10,12,13,15},{2,4,6,8,10,12,14},{2,4,6,8,10,12,14,15},{2,4,6,8,10,12,15},{2,4,6,8,10,13},{2,4,6,8,10,13,14},{2,4,6,8,10,13,14,15},{2,4,6,8,10,13,15},{2,4,6,8,10,14},{2,4,6,8,10,14,15},{2,4,6,8,10,15},{2,4,6,8,11},{2,4,6,8,11,12},{2,4,6,8,11,12,13},{2,4,6,8,11,12,13,14},{2,4,6,8,11,12,13,14,15},{2,4,6,8,11,12,13,15},{2,4,6,8,11,12,14},{2,4,6,8,11,12,14,15},{2,4,6,8,11,12,15},{2,4,6,8,11,13},{2,4,6,8,11,13,14},{2,4,6,8,11,13,14,15},{2,4,6,8,11,13,15},{2,4,6,8,11,14},{2,4,6,8,11,14,15},{2,4,6,8,11,15},{2,4,6,8,12},{2,4,6,8,12,13},{2,4,6,8,12,13,14},{2,4,6,8,12,13,14,15},{2,4,6,8,12,13,15},{2,4,6,8,12,14},{2,4,6,8,12,14,15},{2,4,6,8,12,15},{2,4,6,8,13},{2,4,6,8,13,14},{2,4,6,8,13,14,15},{2,4,6,8,13,15},{2,4,6,8,14},{2,4,6,8,14,15},{2,4,6,8,15},{2,4,6,9},{2,4,6,9,10},{2,4,6,9,10,11},{2,4,6,9,10,11,12},{2,4,6,9,10,11,12,13},{2,4,6,9,10,11,12,13,14},{2,4,6,9,10,11,12,13,14,15},{2,4,6,9,10,11,12,13,15},{2,4,6,9,10,11,12,14},{2,4,6,9,10,11,12,14,15},{2,4,6,9,10,11,12,15},{2,4,6,9,10,11,13},{2,4,6,9,10,11,13,14},{2,4,6,9,10,11,13,14,15},{2,4,6,9,10,11,13,15},{2,4,6,9,10,11,14},{2,4,6,9,10,11,14,15},{2,4,6,9,10,11,15},{2,4,6,9,10,12},{2,4,6,9,10,12,13},{2,4,6,9,10,12,13,14},{2,4,6,9,10,12,13,14,15},{2,4,6,9,10,12,13,15},{2,4,6,9,10,12,14},{2,4,6,9,10,12,14,15},{2,4,6,9,10,12,15},{2,4,6,9,10,13},{2,4,6,9,10,13,14},{2,4,6,9,10,13,14,15},{2,4,6,9,10,13,15},{2,4,6,9,10,14},{2,4,6,9,10,14,15},{2,4,6,9,10,15},{2,4,6,9,11},{2,4,6,9,11,12},{2,4,6,9,11,12,13},{2,4,6,9,11,12,13,14},{2,4,6,9,11,12,13,14,15},{2,4,6,9,11,12,13,15},{2,4,6,9,11,12,14},{2,4,6,9,11,12,14,15},{2,4,6,9,11,12,15},{2,4,6,9,11,13},{2,4,6,9,11,13,14},{2,4,6,9,11,13,14,15},{2,4,6,9,11,13,15},{2,4,6,9,11,14},{2,4,6,9,11,14,15},{2,4,6,9,11,15},{2,4,6,9,12},{2,4,6,9,12,13},{2,4,6,9,12,13,14},{2,4,6,9,12,13,14,15},{2,4,6,9,12,13,15},{2,4,6,9,12,14},{2,4,6,9,12,14,15},{2,4,6,9,12,15},{2,4,6,9,13},{2,4,6,9,13,14},{2,4,6,9,13,14,15},{2,4,6,9,13,15},{2,4,6,9,14},{2,4,6,9,14,15},{2,4,6,9,15},{2,4,6,10},{2,4,6,10,11},{2,4,6,10,11,12},{2,4,6,10,11,12,13},{2,4,6,10,11,12,13,14},{2,4,6,10,11,12,13,14,15},{2,4,6,10,11,12,13,15},{2,4,6,10,11,12,14},{2,4,6,10,11,12,14,15},{2,4,6,10,11,12,15},{2,4,6,10,11,13},{2,4,6,10,11,13,14},{2,4,6,10,11,13,14,15},{2,4,6,10,11,13,15},{2,4,6,10,11,14},{2,4,6,10,11,14,15},{2,4,6,10,11,15},{2,4,6,10,12},{2,4,6,10,12,13},{2,4,6,10,12,13,14},{2,4,6,10,12,13,14,15},{2,4,6,10,12,13,15},{2,4,6,10,12,14},{2,4,6,10,12,14,15},{2,4,6,10,12,15},{2,4,6,10,13},{2,4,6,10,13,14},{2,4,6,10,13,14,15},{2,4,6,10,13,15},{2,4,6,10,14},{2,4,6,10,14,15},{2,4,6,10,15},{2,4,6,11},{2,4,6,11,12},{2,4,6,11,12,13},{2,4,6,11,12,13,14},{2,4,6,11,12,13,14,15},{2,4,6,11,12,13,15},{2,4,6,11,12,14},{2,4,6,11,12,14,15},{2,4,6,11,12,15},{2,4,6,11,13},{2,4,6,11,13,14},{2,4,6,11,13,14,15},{2,4,6,11,13,15},{2,4,6,11,14},{2,4,6,11,14,15},{2,4,6,11,15},{2,4,6,12},{2,4,6,12,13},{2,4,6,12,13,14},{2,4,6,12,13,14,15},{2,4,6,12,13,15},{2,4,6,12,14},{2,4,6,12,14,15},{2,4,6,12,15},{2,4,6,13},{2,4,6,13,14},{2,4,6,13,14,15},{2,4,6,13,15},{2,4,6,14},{2,4,6,14,15},{2,4,6,15},{2,4,7},{2,4,7,8},{2,4,7,8,9},{2,4,7,8,9,10},{2,4,7,8,9,10,11},{2,4,7,8,9,10,11,12},{2,4,7,8,9,10,11,12,13},{2,4,7,8,9,10,11,12,13,14},{2,4,7,8,9,10,11,12,13,14,15},{2,4,7,8,9,10,11,12,13,15},{2,4,7,8,9,10,11,12,14},{2,4,7,8,9,10,11,12,14,15},{2,4,7,8,9,10,11,12,15},{2,4,7,8,9,10,11,13},{2,4,7,8,9,10,11,13,14},{2,4,7,8,9,10,11,13,14,15},{2,4,7,8,9,10,11,13,15},{2,4,7,8,9,10,11,14},{2,4,7,8,9,10,11,14,15},{2,4,7,8,9,10,11,15},{2,4,7,8,9,10,12},{2,4,7,8,9,10,12,13},{2,4,7,8,9,10,12,13,14},{2,4,7,8,9,10,12,13,14,15},{2,4,7,8,9,10,12,13,15},{2,4,7,8,9,10,12,14},{2,4,7,8,9,10,12,14,15},{2,4,7,8,9,10,12,15},{2,4,7,8,9,10,13},{2,4,7,8,9,10,13,14},{2,4,7,8,9,10,13,14,15},{2,4,7,8,9,10,13,15},{2,4,7,8,9,10,14},{2,4,7,8,9,10,14,15},{2,4,7,8,9,10,15},{2,4,7,8,9,11},{2,4,7,8,9,11,12},{2,4,7,8,9,11,12,13},{2,4,7,8,9,11,12,13,14},{2,4,7,8,9,11,12,13,14,15},{2,4,7,8,9,11,12,13,15},{2,4,7,8,9,11,12,14},{2,4,7,8,9,11,12,14,15},{2,4,7,8,9,11,12,15},{2,4,7,8,9,11,13},{2,4,7,8,9,11,13,14},{2,4,7,8,9,11,13,14,15},{2,4,7,8,9,11,13,15},{2,4,7,8,9,11,14},{2,4,7,8,9,11,14,15},{2,4,7,8,9,11,15},{2,4,7,8,9,12},{2,4,7,8,9,12,13},{2,4,7,8,9,12,13,14},{2,4,7,8,9,12,13,14,15},{2,4,7,8,9,12,13,15},{2,4,7,8,9,12,14},{2,4,7,8,9,12,14,15},{2,4,7,8,9,12,15},{2,4,7,8,9,13},{2,4,7,8,9,13,14},{2,4,7,8,9,13,14,15},{2,4,7,8,9,13,15},{2,4,7,8,9,14},{2,4,7,8,9,14,15},{2,4,7,8,9,15},{2,4,7,8,10},{2,4,7,8,10,11},{2,4,7,8,10,11,12},{2,4,7,8,10,11,12,13},{2,4,7,8,10,11,12,13,14},{2,4,7,8,10,11,12,13,14,15},{2,4,7,8,10,11,12,13,15},{2,4,7,8,10,11,12,14},{2,4,7,8,10,11,12,14,15},{2,4,7,8,10,11,12,15},{2,4,7,8,10,11,13},{2,4,7,8,10,11,13,14},{2,4,7,8,10,11,13,14,15},{2,4,7,8,10,11,13,15},{2,4,7,8,10,11,14},{2,4,7,8,10,11,14,15},{2,4,7,8,10,11,15},{2,4,7,8,10,12},{2,4,7,8,10,12,13},{2,4,7,8,10,12,13,14},{2,4,7,8,10,12,13,14,15},{2,4,7,8,10,12,13,15},{2,4,7,8,10,12,14},{2,4,7,8,10,12,14,15},{2,4,7,8,10,12,15},{2,4,7,8,10,13},{2,4,7,8,10,13,14},{2,4,7,8,10,13,14,15},{2,4,7,8,10,13,15},{2,4,7,8,10,14},{2,4,7,8,10,14,15},{2,4,7,8,10,15},{2,4,7,8,11},{2,4,7,8,11,12},{2,4,7,8,11,12,13},{2,4,7,8,11,12,13,14},{2,4,7,8,11,12,13,14,15},{2,4,7,8,11,12,13,15},{2,4,7,8,11,12,14},{2,4,7,8,11,12,14,15},{2,4,7,8,11,12,15},{2,4,7,8,11,13},{2,4,7,8,11,13,14},{2,4,7,8,11,13,14,15},{2,4,7,8,11,13,15},{2,4,7,8,11,14},{2,4,7,8,11,14,15},{2,4,7,8,11,15},{2,4,7,8,12},{2,4,7,8,12,13},{2,4,7,8,12,13,14},{2,4,7,8,12,13,14,15},{2,4,7,8,12,13,15},{2,4,7,8,12,14},{2,4,7,8,12,14,15},{2,4,7,8,12,15},{2,4,7,8,13},{2,4,7,8,13,14},{2,4,7,8,13,14,15},{2,4,7,8,13,15},{2,4,7,8,14},{2,4,7,8,14,15},{2,4,7,8,15},{2,4,7,9},{2,4,7,9,10},{2,4,7,9,10,11},{2,4,7,9,10,11,12},{2,4,7,9,10,11,12,13},{2,4,7,9,10,11,12,13,14},{2,4,7,9,10,11,12,13,14,15},{2,4,7,9,10,11,12,13,15},{2,4,7,9,10,11,12,14},{2,4,7,9,10,11,12,14,15},{2,4,7,9,10,11,12,15},{2,4,7,9,10,11,13},{2,4,7,9,10,11,13,14},{2,4,7,9,10,11,13,14,15},{2,4,7,9,10,11,13,15},{2,4,7,9,10,11,14},{2,4,7,9,10,11,14,15},{2,4,7,9,10,11,15},{2,4,7,9,10,12},{2,4,7,9,10,12,13},{2,4,7,9,10,12,13,14},{2,4,7,9,10,12,13,14,15},{2,4,7,9,10,12,13,15},{2,4,7,9,10,12,14},{2,4,7,9,10,12,14,15},{2,4,7,9,10,12,15},{2,4,7,9,10,13},{2,4,7,9,10,13,14},{2,4,7,9,10,13,14,15},{2,4,7,9,10,13,15},{2,4,7,9,10,14},{2,4,7,9,10,14,15},{2,4,7,9,10,15},{2,4,7,9,11},{2,4,7,9,11,12},{2,4,7,9,11,12,13},{2,4,7,9,11,12,13,14},{2,4,7,9,11,12,13,14,15},{2,4,7,9,11,12,13,15},{2,4,7,9,11,12,14},{2,4,7,9,11,12,14,15},{2,4,7,9,11,12,15},{2,4,7,9,11,13},{2,4,7,9,11,13,14},{2,4,7,9,11,13,14,15},{2,4,7,9,11,13,15},{2,4,7,9,11,14},{2,4,7,9,11,14,15},{2,4,7,9,11,15},{2,4,7,9,12},{2,4,7,9,12,13},{2,4,7,9,12,13,14},{2,4,7,9,12,13,14,15},{2,4,7,9,12,13,15},{2,4,7,9,12,14},{2,4,7,9,12,14,15},{2,4,7,9,12,15},{2,4,7,9,13},{2,4,7,9,13,14},{2,4,7,9,13,14,15},{2,4,7,9,13,15},{2,4,7,9,14},{2,4,7,9,14,15},{2,4,7,9,15},{2,4,7,10},{2,4,7,10,11},{2,4,7,10,11,12},{2,4,7,10,11,12,13},{2,4,7,10,11,12,13,14},{2,4,7,10,11,12,13,14,15},{2,4,7,10,11,12,13,15},{2,4,7,10,11,12,14},{2,4,7,10,11,12,14,15},{2,4,7,10,11,12,15},{2,4,7,10,11,13},{2,4,7,10,11,13,14},{2,4,7,10,11,13,14,15},{2,4,7,10,11,13,15},{2,4,7,10,11,14},{2,4,7,10,11,14,15},{2,4,7,10,11,15},{2,4,7,10,12},{2,4,7,10,12,13},{2,4,7,10,12,13,14},{2,4,7,10,12,13,14,15},{2,4,7,10,12,13,15},{2,4,7,10,12,14},{2,4,7,10,12,14,15},{2,4,7,10,12,15},{2,4,7,10,13},{2,4,7,10,13,14},{2,4,7,10,13,14,15},{2,4,7,10,13,15},{2,4,7,10,14},{2,4,7,10,14,15},{2,4,7,10,15},{2,4,7,11},{2,4,7,11,12},{2,4,7,11,12,13},{2,4,7,11,12,13,14},{2,4,7,11,12,13,14,15},{2,4,7,11,12,13,15},{2,4,7,11,12,14},{2,4,7,11,12,14,15},{2,4,7,11,12,15},{2,4,7,11,13},{2,4,7,11,13,14},{2,4,7,11,13,14,15},{2,4,7,11,13,15},{2,4,7,11,14},{2,4,7,11,14,15},{2,4,7,11,15},{2,4,7,12},{2,4,7,12,13},{2,4,7,12,13,14},{2,4,7,12,13,14,15},{2,4,7,12,13,15},{2,4,7,12,14},{2,4,7,12,14,15},{2,4,7,12,15},{2,4,7,13},{2,4,7,13,14},{2,4,7,13,14,15},{2,4,7,13,15},{2,4,7,14},{2,4,7,14,15},{2,4,7,15},{2,4,8},{2,4,8,9},{2,4,8,9,10},{2,4,8,9,10,11},{2,4,8,9,10,11,12},{2,4,8,9,10,11,12,13},{2,4,8,9,10,11,12,13,14},{2,4,8,9,10,11,12,13,14,15},{2,4,8,9,10,11,12,13,15},{2,4,8,9,10,11,12,14},{2,4,8,9,10,11,12,14,15},{2,4,8,9,10,11,12,15},{2,4,8,9,10,11,13},{2,4,8,9,10,11,13,14},{2,4,8,9,10,11,13,14,15},{2,4,8,9,10,11,13,15},{2,4,8,9,10,11,14},{2,4,8,9,10,11,14,15},{2,4,8,9,10,11,15},{2,4,8,9,10,12},{2,4,8,9,10,12,13},{2,4,8,9,10,12,13,14},{2,4,8,9,10,12,13,14,15},{2,4,8,9,10,12,13,15},{2,4,8,9,10,12,14},{2,4,8,9,10,12,14,15},{2,4,8,9,10,12,15},{2,4,8,9,10,13},{2,4,8,9,10,13,14},{2,4,8,9,10,13,14,15},{2,4,8,9,10,13,15},{2,4,8,9,10,14},{2,4,8,9,10,14,15},{2,4,8,9,10,15},{2,4,8,9,11},{2,4,8,9,11,12},{2,4,8,9,11,12,13},{2,4,8,9,11,12,13,14},{2,4,8,9,11,12,13,14,15},{2,4,8,9,11,12,13,15},{2,4,8,9,11,12,14},{2,4,8,9,11,12,14,15},{2,4,8,9,11,12,15},{2,4,8,9,11,13},{2,4,8,9,11,13,14},{2,4,8,9,11,13,14,15},{2,4,8,9,11,13,15},{2,4,8,9,11,14},{2,4,8,9,11,14,15},{2,4,8,9,11,15},{2,4,8,9,12},{2,4,8,9,12,13},{2,4,8,9,12,13,14},{2,4,8,9,12,13,14,15},{2,4,8,9,12,13,15},{2,4,8,9,12,14},{2,4,8,9,12,14,15},{2,4,8,9,12,15},{2,4,8,9,13},{2,4,8,9,13,14},{2,4,8,9,13,14,15},{2,4,8,9,13,15},{2,4,8,9,14},{2,4,8,9,14,15},{2,4,8,9,15},{2,4,8,10},{2,4,8,10,11},{2,4,8,10,11,12},{2,4,8,10,11,12,13},{2,4,8,10,11,12,13,14},{2,4,8,10,11,12,13,14,15},{2,4,8,10,11,12,13,15},{2,4,8,10,11,12,14},{2,4,8,10,11,12,14,15},{2,4,8,10,11,12,15},{2,4,8,10,11,13},{2,4,8,10,11,13,14},{2,4,8,10,11,13,14,15},{2,4,8,10,11,13,15},{2,4,8,10,11,14},{2,4,8,10,11,14,15},{2,4,8,10,11,15},{2,4,8,10,12},{2,4,8,10,12,13},{2,4,8,10,12,13,14},{2,4,8,10,12,13,14,15},{2,4,8,10,12,13,15},{2,4,8,10,12,14},{2,4,8,10,12,14,15},{2,4,8,10,12,15},{2,4,8,10,13},{2,4,8,10,13,14},{2,4,8,10,13,14,15},{2,4,8,10,13,15},{2,4,8,10,14},{2,4,8,10,14,15},{2,4,8,10,15},{2,4,8,11},{2,4,8,11,12},{2,4,8,11,12,13},{2,4,8,11,12,13,14},{2,4,8,11,12,13,14,15},{2,4,8,11,12,13,15},{2,4,8,11,12,14},{2,4,8,11,12,14,15},{2,4,8,11,12,15},{2,4,8,11,13},{2,4,8,11,13,14},{2,4,8,11,13,14,15},{2,4,8,11,13,15},{2,4,8,11,14},{2,4,8,11,14,15},{2,4,8,11,15},{2,4,8,12},{2,4,8,12,13},{2,4,8,12,13,14},{2,4,8,12,13,14,15},{2,4,8,12,13,15},{2,4,8,12,14},{2,4,8,12,14,15},{2,4,8,12,15},{2,4,8,13},{2,4,8,13,14},{2,4,8,13,14,15},{2,4,8,13,15},{2,4,8,14},{2,4,8,14,15},{2,4,8,15},{2,4,9},{2,4,9,10},{2,4,9,10,11},{2,4,9,10,11,12},{2,4,9,10,11,12,13},{2,4,9,10,11,12,13,14},{2,4,9,10,11,12,13,14,15},{2,4,9,10,11,12,13,15},{2,4,9,10,11,12,14},{2,4,9,10,11,12,14,15},{2,4,9,10,11,12,15},{2,4,9,10,11,13},{2,4,9,10,11,13,14},{2,4,9,10,11,13,14,15},{2,4,9,10,11,13,15},{2,4,9,10,11,14},{2,4,9,10,11,14,15},{2,4,9,10,11,15},{2,4,9,10,12},{2,4,9,10,12,13},{2,4,9,10,12,13,14},{2,4,9,10,12,13,14,15},{2,4,9,10,12,13,15},{2,4,9,10,12,14},{2,4,9,10,12,14,15},{2,4,9,10,12,15},{2,4,9,10,13},{2,4,9,10,13,14},{2,4,9,10,13,14,15},{2,4,9,10,13,15},{2,4,9,10,14},{2,4,9,10,14,15},{2,4,9,10,15},{2,4,9,11},{2,4,9,11,12},{2,4,9,11,12,13},{2,4,9,11,12,13,14},{2,4,9,11,12,13,14,15},{2,4,9,11,12,13,15},{2,4,9,11,12,14},{2,4,9,11,12,14,15},{2,4,9,11,12,15},{2,4,9,11,13},{2,4,9,11,13,14},{2,4,9,11,13,14,15},{2,4,9,11,13,15},{2,4,9,11,14},{2,4,9,11,14,15},{2,4,9,11,15},{2,4,9,12},{2,4,9,12,13},{2,4,9,12,13,14},{2,4,9,12,13,14,15},{2,4,9,12,13,15},{2,4,9,12,14},{2,4,9,12,14,15},{2,4,9,12,15},{2,4,9,13},{2,4,9,13,14},{2,4,9,13,14,15},{2,4,9,13,15},{2,4,9,14},{2,4,9,14,15},{2,4,9,15},{2,4,10},{2,4,10,11},{2,4,10,11,12},{2,4,10,11,12,13},{2,4,10,11,12,13,14},{2,4,10,11,12,13,14,15},{2,4,10,11,12,13,15},{2,4,10,11,12,14},{2,4,10,11,12,14,15},{2,4,10,11,12,15},{2,4,10,11,13},{2,4,10,11,13,14},{2,4,10,11,13,14,15},{2,4,10,11,13,15},{2,4,10,11,14},{2,4,10,11,14,15},{2,4,10,11,15},{2,4,10,12},{2,4,10,12,13},{2,4,10,12,13,14},{2,4,10,12,13,14,15},{2,4,10,12,13,15},{2,4,10,12,14},{2,4,10,12,14,15},{2,4,10,12,15},{2,4,10,13},{2,4,10,13,14},{2,4,10,13,14,15},{2,4,10,13,15},{2,4,10,14},{2,4,10,14,15},{2,4,10,15},{2,4,11},{2,4,11,12},{2,4,11,12,13},{2,4,11,12,13,14},{2,4,11,12,13,14,15},{2,4,11,12,13,15},{2,4,11,12,14},{2,4,11,12,14,15},{2,4,11,12,15},{2,4,11,13},{2,4,11,13,14},{2,4,11,13,14,15},{2,4,11,13,15},{2,4,11,14},{2,4,11,14,15},{2,4,11,15},{2,4,12},{2,4,12,13},{2,4,12,13,14},{2,4,12,13,14,15},{2,4,12,13,15},{2,4,12,14},{2,4,12,14,15},{2,4,12,15},{2,4,13},{2,4,13,14},{2,4,13,14,15},{2,4,13,15},{2,4,14},{2,4,14,15},{2,4,15},{2,5},{2,5,6},{2,5,6,7},{2,5,6,7,8},{2,5,6,7,8,9},{2,5,6,7,8,9,10},{2,5,6,7,8,9,10,11},{2,5,6,7,8,9,10,11,12},{2,5,6,7,8,9,10,11,12,13},{2,5,6,7,8,9,10,11,12,13,14},{2,5,6,7,8,9,10,11,12,13,14,15},{2,5,6,7,8,9,10,11,12,13,15},{2,5,6,7,8,9,10,11,12,14},{2,5,6,7,8,9,10,11,12,14,15},{2,5,6,7,8,9,10,11,12,15},{2,5,6,7,8,9,10,11,13},{2,5,6,7,8,9,10,11,13,14},{2,5,6,7,8,9,10,11,13,14,15},{2,5,6,7,8,9,10,11,13,15},{2,5,6,7,8,9,10,11,14},{2,5,6,7,8,9,10,11,14,15},{2,5,6,7,8,9,10,11,15},{2,5,6,7,8,9,10,12},{2,5,6,7,8,9,10,12,13},{2,5,6,7,8,9,10,12,13,14},{2,5,6,7,8,9,10,12,13,14,15},{2,5,6,7,8,9,10,12,13,15},{2,5,6,7,8,9,10,12,14},{2,5,6,7,8,9,10,12,14,15},{2,5,6,7,8,9,10,12,15},{2,5,6,7,8,9,10,13},{2,5,6,7,8,9,10,13,14},{2,5,6,7,8,9,10,13,14,15},{2,5,6,7,8,9,10,13,15},{2,5,6,7,8,9,10,14},{2,5,6,7,8,9,10,14,15},{2,5,6,7,8,9,10,15},{2,5,6,7,8,9,11},{2,5,6,7,8,9,11,12},{2,5,6,7,8,9,11,12,13},{2,5,6,7,8,9,11,12,13,14},{2,5,6,7,8,9,11,12,13,14,15},{2,5,6,7,8,9,11,12,13,15},{2,5,6,7,8,9,11,12,14},{2,5,6,7,8,9,11,12,14,15},{2,5,6,7,8,9,11,12,15},{2,5,6,7,8,9,11,13},{2,5,6,7,8,9,11,13,14},{2,5,6,7,8,9,11,13,14,15},{2,5,6,7,8,9,11,13,15},{2,5,6,7,8,9,11,14},{2,5,6,7,8,9,11,14,15},{2,5,6,7,8,9,11,15},{2,5,6,7,8,9,12},{2,5,6,7,8,9,12,13},{2,5,6,7,8,9,12,13,14},{2,5,6,7,8,9,12,13,14,15},{2,5,6,7,8,9,12,13,15},{2,5,6,7,8,9,12,14},{2,5,6,7,8,9,12,14,15},{2,5,6,7,8,9,12,15},{2,5,6,7,8,9,13},{2,5,6,7,8,9,13,14},{2,5,6,7,8,9,13,14,15},{2,5,6,7,8,9,13,15},{2,5,6,7,8,9,14},{2,5,6,7,8,9,14,15},{2,5,6,7,8,9,15},{2,5,6,7,8,10},{2,5,6,7,8,10,11},{2,5,6,7,8,10,11,12},{2,5,6,7,8,10,11,12,13},{2,5,6,7,8,10,11,12,13,14},{2,5,6,7,8,10,11,12,13,14,15},{2,5,6,7,8,10,11,12,13,15},{2,5,6,7,8,10,11,12,14},{2,5,6,7,8,10,11,12,14,15},{2,5,6,7,8,10,11,12,15},{2,5,6,7,8,10,11,13},{2,5,6,7,8,10,11,13,14},{2,5,6,7,8,10,11,13,14,15},{2,5,6,7,8,10,11,13,15},{2,5,6,7,8,10,11,14},{2,5,6,7,8,10,11,14,15},{2,5,6,7,8,10,11,15},{2,5,6,7,8,10,12},{2,5,6,7,8,10,12,13},{2,5,6,7,8,10,12,13,14},{2,5,6,7,8,10,12,13,14,15},{2,5,6,7,8,10,12,13,15},{2,5,6,7,8,10,12,14},{2,5,6,7,8,10,12,14,15},{2,5,6,7,8,10,12,15},{2,5,6,7,8,10,13},{2,5,6,7,8,10,13,14},{2,5,6,7,8,10,13,14,15},{2,5,6,7,8,10,13,15},{2,5,6,7,8,10,14},{2,5,6,7,8,10,14,15},{2,5,6,7,8,10,15},{2,5,6,7,8,11},{2,5,6,7,8,11,12},{2,5,6,7,8,11,12,13},{2,5,6,7,8,11,12,13,14},{2,5,6,7,8,11,12,13,14,15},{2,5,6,7,8,11,12,13,15},{2,5,6,7,8,11,12,14},{2,5,6,7,8,11,12,14,15},{2,5,6,7,8,11,12,15},{2,5,6,7,8,11,13},{2,5,6,7,8,11,13,14},{2,5,6,7,8,11,13,14,15},{2,5,6,7,8,11,13,15},{2,5,6,7,8,11,14},{2,5,6,7,8,11,14,15},{2,5,6,7,8,11,15},{2,5,6,7,8,12},{2,5,6,7,8,12,13},{2,5,6,7,8,12,13,14},{2,5,6,7,8,12,13,14,15},{2,5,6,7,8,12,13,15},{2,5,6,7,8,12,14},{2,5,6,7,8,12,14,15},{2,5,6,7,8,12,15},{2,5,6,7,8,13},{2,5,6,7,8,13,14},{2,5,6,7,8,13,14,15},{2,5,6,7,8,13,15},{2,5,6,7,8,14},{2,5,6,7,8,14,15},{2,5,6,7,8,15},{2,5,6,7,9},{2,5,6,7,9,10},{2,5,6,7,9,10,11},{2,5,6,7,9,10,11,12},{2,5,6,7,9,10,11,12,13},{2,5,6,7,9,10,11,12,13,14},{2,5,6,7,9,10,11,12,13,14,15},{2,5,6,7,9,10,11,12,13,15},{2,5,6,7,9,10,11,12,14},{2,5,6,7,9,10,11,12,14,15},{2,5,6,7,9,10,11,12,15},{2,5,6,7,9,10,11,13},{2,5,6,7,9,10,11,13,14},{2,5,6,7,9,10,11,13,14,15},{2,5,6,7,9,10,11,13,15},{2,5,6,7,9,10,11,14},{2,5,6,7,9,10,11,14,15},{2,5,6,7,9,10,11,15},{2,5,6,7,9,10,12},{2,5,6,7,9,10,12,13},{2,5,6,7,9,10,12,13,14},{2,5,6,7,9,10,12,13,14,15},{2,5,6,7,9,10,12,13,15},{2,5,6,7,9,10,12,14},{2,5,6,7,9,10,12,14,15},{2,5,6,7,9,10,12,15},{2,5,6,7,9,10,13},{2,5,6,7,9,10,13,14},{2,5,6,7,9,10,13,14,15},{2,5,6,7,9,10,13,15},{2,5,6,7,9,10,14},{2,5,6,7,9,10,14,15},{2,5,6,7,9,10,15},{2,5,6,7,9,11},{2,5,6,7,9,11,12},{2,5,6,7,9,11,12,13},{2,5,6,7,9,11,12,13,14},{2,5,6,7,9,11,12,13,14,15},{2,5,6,7,9,11,12,13,15},{2,5,6,7,9,11,12,14},{2,5,6,7,9,11,12,14,15},{2,5,6,7,9,11,12,15},{2,5,6,7,9,11,13},{2,5,6,7,9,11,13,14},{2,5,6,7,9,11,13,14,15},{2,5,6,7,9,11,13,15},{2,5,6,7,9,11,14},{2,5,6,7,9,11,14,15},{2,5,6,7,9,11,15},{2,5,6,7,9,12},{2,5,6,7,9,12,13},{2,5,6,7,9,12,13,14},{2,5,6,7,9,12,13,14,15},{2,5,6,7,9,12,13,15},{2,5,6,7,9,12,14},{2,5,6,7,9,12,14,15},{2,5,6,7,9,12,15},{2,5,6,7,9,13},{2,5,6,7,9,13,14},{2,5,6,7,9,13,14,15},{2,5,6,7,9,13,15},{2,5,6,7,9,14},{2,5,6,7,9,14,15},{2,5,6,7,9,15},{2,5,6,7,10},{2,5,6,7,10,11},{2,5,6,7,10,11,12},{2,5,6,7,10,11,12,13},{2,5,6,7,10,11,12,13,14},{2,5,6,7,10,11,12,13,14,15},{2,5,6,7,10,11,12,13,15},{2,5,6,7,10,11,12,14},{2,5,6,7,10,11,12,14,15},{2,5,6,7,10,11,12,15},{2,5,6,7,10,11,13},{2,5,6,7,10,11,13,14},{2,5,6,7,10,11,13,14,15},{2,5,6,7,10,11,13,15},{2,5,6,7,10,11,14},{2,5,6,7,10,11,14,15},{2,5,6,7,10,11,15},{2,5,6,7,10,12},{2,5,6,7,10,12,13},{2,5,6,7,10,12,13,14},{2,5,6,7,10,12,13,14,15},{2,5,6,7,10,12,13,15},{2,5,6,7,10,12,14},{2,5,6,7,10,12,14,15},{2,5,6,7,10,12,15},{2,5,6,7,10,13},{2,5,6,7,10,13,14},{2,5,6,7,10,13,14,15},{2,5,6,7,10,13,15},{2,5,6,7,10,14},{2,5,6,7,10,14,15},{2,5,6,7,10,15},{2,5,6,7,11},{2,5,6,7,11,12},{2,5,6,7,11,12,13},{2,5,6,7,11,12,13,14},{2,5,6,7,11,12,13,14,15},{2,5,6,7,11,12,13,15},{2,5,6,7,11,12,14},{2,5,6,7,11,12,14,15},{2,5,6,7,11,12,15},{2,5,6,7,11,13},{2,5,6,7,11,13,14},{2,5,6,7,11,13,14,15},{2,5,6,7,11,13,15},{2,5,6,7,11,14},{2,5,6,7,11,14,15},{2,5,6,7,11,15},{2,5,6,7,12},{2,5,6,7,12,13},{2,5,6,7,12,13,14},{2,5,6,7,12,13,14,15},{2,5,6,7,12,13,15},{2,5,6,7,12,14},{2,5,6,7,12,14,15},{2,5,6,7,12,15},{2,5,6,7,13},{2,5,6,7,13,14},{2,5,6,7,13,14,15},{2,5,6,7,13,15},{2,5,6,7,14},{2,5,6,7,14,15},{2,5,6,7,15},{2,5,6,8},{2,5,6,8,9},{2,5,6,8,9,10},{2,5,6,8,9,10,11},{2,5,6,8,9,10,11,12},{2,5,6,8,9,10,11,12,13},{2,5,6,8,9,10,11,12,13,14},{2,5,6,8,9,10,11,12,13,14,15},{2,5,6,8,9,10,11,12,13,15},{2,5,6,8,9,10,11,12,14},{2,5,6,8,9,10,11,12,14,15},{2,5,6,8,9,10,11,12,15},{2,5,6,8,9,10,11,13},{2,5,6,8,9,10,11,13,14},{2,5,6,8,9,10,11,13,14,15},{2,5,6,8,9,10,11,13,15},{2,5,6,8,9,10,11,14},{2,5,6,8,9,10,11,14,15},{2,5,6,8,9,10,11,15},{2,5,6,8,9,10,12},{2,5,6,8,9,10,12,13},{2,5,6,8,9,10,12,13,14},{2,5,6,8,9,10,12,13,14,15},{2,5,6,8,9,10,12,13,15},{2,5,6,8,9,10,12,14},{2,5,6,8,9,10,12,14,15},{2,5,6,8,9,10,12,15},{2,5,6,8,9,10,13},{2,5,6,8,9,10,13,14},{2,5,6,8,9,10,13,14,15},{2,5,6,8,9,10,13,15},{2,5,6,8,9,10,14},{2,5,6,8,9,10,14,15},{2,5,6,8,9,10,15},{2,5,6,8,9,11},{2,5,6,8,9,11,12},{2,5,6,8,9,11,12,13},{2,5,6,8,9,11,12,13,14},{2,5,6,8,9,11,12,13,14,15},{2,5,6,8,9,11,12,13,15},{2,5,6,8,9,11,12,14},{2,5,6,8,9,11,12,14,15},{2,5,6,8,9,11,12,15},{2,5,6,8,9,11,13},{2,5,6,8,9,11,13,14},{2,5,6,8,9,11,13,14,15},{2,5,6,8,9,11,13,15},{2,5,6,8,9,11,14},{2,5,6,8,9,11,14,15},{2,5,6,8,9,11,15},{2,5,6,8,9,12},{2,5,6,8,9,12,13},{2,5,6,8,9,12,13,14},{2,5,6,8,9,12,13,14,15},{2,5,6,8,9,12,13,15},{2,5,6,8,9,12,14},{2,5,6,8,9,12,14,15},{2,5,6,8,9,12,15},{2,5,6,8,9,13},{2,5,6,8,9,13,14},{2,5,6,8,9,13,14,15},{2,5,6,8,9,13,15},{2,5,6,8,9,14},{2,5,6,8,9,14,15},{2,5,6,8,9,15},{2,5,6,8,10},{2,5,6,8,10,11},{2,5,6,8,10,11,12},{2,5,6,8,10,11,12,13},{2,5,6,8,10,11,12,13,14},{2,5,6,8,10,11,12,13,14,15},{2,5,6,8,10,11,12,13,15},{2,5,6,8,10,11,12,14},{2,5,6,8,10,11,12,14,15},{2,5,6,8,10,11,12,15},{2,5,6,8,10,11,13},{2,5,6,8,10,11,13,14},{2,5,6,8,10,11,13,14,15},{2,5,6,8,10,11,13,15},{2,5,6,8,10,11,14},{2,5,6,8,10,11,14,15},{2,5,6,8,10,11,15},{2,5,6,8,10,12},{2,5,6,8,10,12,13},{2,5,6,8,10,12,13,14},{2,5,6,8,10,12,13,14,15},{2,5,6,8,10,12,13,15},{2,5,6,8,10,12,14},{2,5,6,8,10,12,14,15},{2,5,6,8,10,12,15},{2,5,6,8,10,13},{2,5,6,8,10,13,14},{2,5,6,8,10,13,14,15},{2,5,6,8,10,13,15},{2,5,6,8,10,14},{2,5,6,8,10,14,15},{2,5,6,8,10,15},{2,5,6,8,11},{2,5,6,8,11,12},{2,5,6,8,11,12,13},{2,5,6,8,11,12,13,14},{2,5,6,8,11,12,13,14,15},{2,5,6,8,11,12,13,15},{2,5,6,8,11,12,14},{2,5,6,8,11,12,14,15},{2,5,6,8,11,12,15},{2,5,6,8,11,13},{2,5,6,8,11,13,14},{2,5,6,8,11,13,14,15},{2,5,6,8,11,13,15},{2,5,6,8,11,14},{2,5,6,8,11,14,15},{2,5,6,8,11,15},{2,5,6,8,12},{2,5,6,8,12,13},{2,5,6,8,12,13,14},{2,5,6,8,12,13,14,15},{2,5,6,8,12,13,15},{2,5,6,8,12,14},{2,5,6,8,12,14,15},{2,5,6,8,12,15},{2,5,6,8,13},{2,5,6,8,13,14},{2,5,6,8,13,14,15},{2,5,6,8,13,15},{2,5,6,8,14},{2,5,6,8,14,15},{2,5,6,8,15},{2,5,6,9},{2,5,6,9,10},{2,5,6,9,10,11},{2,5,6,9,10,11,12},{2,5,6,9,10,11,12,13},{2,5,6,9,10,11,12,13,14},{2,5,6,9,10,11,12,13,14,15},{2,5,6,9,10,11,12,13,15},{2,5,6,9,10,11,12,14},{2,5,6,9,10,11,12,14,15},{2,5,6,9,10,11,12,15},{2,5,6,9,10,11,13},{2,5,6,9,10,11,13,14},{2,5,6,9,10,11,13,14,15},{2,5,6,9,10,11,13,15},{2,5,6,9,10,11,14},{2,5,6,9,10,11,14,15},{2,5,6,9,10,11,15},{2,5,6,9,10,12},{2,5,6,9,10,12,13},{2,5,6,9,10,12,13,14},{2,5,6,9,10,12,13,14,15},{2,5,6,9,10,12,13,15},{2,5,6,9,10,12,14},{2,5,6,9,10,12,14,15},{2,5,6,9,10,12,15},{2,5,6,9,10,13},{2,5,6,9,10,13,14},{2,5,6,9,10,13,14,15},{2,5,6,9,10,13,15},{2,5,6,9,10,14},{2,5,6,9,10,14,15},{2,5,6,9,10,15},{2,5,6,9,11},{2,5,6,9,11,12},{2,5,6,9,11,12,13},{2,5,6,9,11,12,13,14},{2,5,6,9,11,12,13,14,15},{2,5,6,9,11,12,13,15},{2,5,6,9,11,12,14},{2,5,6,9,11,12,14,15},{2,5,6,9,11,12,15},{2,5,6,9,11,13},{2,5,6,9,11,13,14},{2,5,6,9,11,13,14,15},{2,5,6,9,11,13,15},{2,5,6,9,11,14},{2,5,6,9,11,14,15},{2,5,6,9,11,15},{2,5,6,9,12},{2,5,6,9,12,13},{2,5,6,9,12,13,14},{2,5,6,9,12,13,14,15},{2,5,6,9,12,13,15},{2,5,6,9,12,14},{2,5,6,9,12,14,15},{2,5,6,9,12,15},{2,5,6,9,13},{2,5,6,9,13,14},{2,5,6,9,13,14,15},{2,5,6,9,13,15},{2,5,6,9,14},{2,5,6,9,14,15},{2,5,6,9,15},{2,5,6,10},{2,5,6,10,11},{2,5,6,10,11,12},{2,5,6,10,11,12,13},{2,5,6,10,11,12,13,14},{2,5,6,10,11,12,13,14,15},{2,5,6,10,11,12,13,15},{2,5,6,10,11,12,14},{2,5,6,10,11,12,14,15},{2,5,6,10,11,12,15},{2,5,6,10,11,13},{2,5,6,10,11,13,14},{2,5,6,10,11,13,14,15},{2,5,6,10,11,13,15},{2,5,6,10,11,14},{2,5,6,10,11,14,15},{2,5,6,10,11,15},{2,5,6,10,12},{2,5,6,10,12,13},{2,5,6,10,12,13,14},{2,5,6,10,12,13,14,15},{2,5,6,10,12,13,15},{2,5,6,10,12,14},{2,5,6,10,12,14,15},{2,5,6,10,12,15},{2,5,6,10,13},{2,5,6,10,13,14},{2,5,6,10,13,14,15},{2,5,6,10,13,15},{2,5,6,10,14},{2,5,6,10,14,15},{2,5,6,10,15},{2,5,6,11},{2,5,6,11,12},{2,5,6,11,12,13},{2,5,6,11,12,13,14},{2,5,6,11,12,13,14,15},{2,5,6,11,12,13,15},{2,5,6,11,12,14},{2,5,6,11,12,14,15},{2,5,6,11,12,15},{2,5,6,11,13},{2,5,6,11,13,14},{2,5,6,11,13,14,15},{2,5,6,11,13,15},{2,5,6,11,14},{2,5,6,11,14,15},{2,5,6,11,15},{2,5,6,12},{2,5,6,12,13},{2,5,6,12,13,14},{2,5,6,12,13,14,15},{2,5,6,12,13,15},{2,5,6,12,14},{2,5,6,12,14,15},{2,5,6,12,15},{2,5,6,13},{2,5,6,13,14},{2,5,6,13,14,15},{2,5,6,13,15},{2,5,6,14},{2,5,6,14,15},{2,5,6,15},{2,5,7},{2,5,7,8},{2,5,7,8,9},{2,5,7,8,9,10},{2,5,7,8,9,10,11},{2,5,7,8,9,10,11,12},{2,5,7,8,9,10,11,12,13},{2,5,7,8,9,10,11,12,13,14},{2,5,7,8,9,10,11,12,13,14,15},{2,5,7,8,9,10,11,12,13,15},{2,5,7,8,9,10,11,12,14},{2,5,7,8,9,10,11,12,14,15},{2,5,7,8,9,10,11,12,15},{2,5,7,8,9,10,11,13},{2,5,7,8,9,10,11,13,14},{2,5,7,8,9,10,11,13,14,15},{2,5,7,8,9,10,11,13,15},{2,5,7,8,9,10,11,14},{2,5,7,8,9,10,11,14,15},{2,5,7,8,9,10,11,15},{2,5,7,8,9,10,12},{2,5,7,8,9,10,12,13},{2,5,7,8,9,10,12,13,14},{2,5,7,8,9,10,12,13,14,15},{2,5,7,8,9,10,12,13,15},{2,5,7,8,9,10,12,14},{2,5,7,8,9,10,12,14,15},{2,5,7,8,9,10,12,15},{2,5,7,8,9,10,13},{2,5,7,8,9,10,13,14},{2,5,7,8,9,10,13,14,15},{2,5,7,8,9,10,13,15},{2,5,7,8,9,10,14},{2,5,7,8,9,10,14,15},{2,5,7,8,9,10,15},{2,5,7,8,9,11},{2,5,7,8,9,11,12},{2,5,7,8,9,11,12,13},{2,5,7,8,9,11,12,13,14},{2,5,7,8,9,11,12,13,14,15},{2,5,7,8,9,11,12,13,15},{2,5,7,8,9,11,12,14},{2,5,7,8,9,11,12,14,15},{2,5,7,8,9,11,12,15},{2,5,7,8,9,11,13},{2,5,7,8,9,11,13,14},{2,5,7,8,9,11,13,14,15},{2,5,7,8,9,11,13,15},{2,5,7,8,9,11,14},{2,5,7,8,9,11,14,15},{2,5,7,8,9,11,15},{2,5,7,8,9,12},{2,5,7,8,9,12,13},{2,5,7,8,9,12,13,14},{2,5,7,8,9,12,13,14,15},{2,5,7,8,9,12,13,15},{2,5,7,8,9,12,14},{2,5,7,8,9,12,14,15},{2,5,7,8,9,12,15},{2,5,7,8,9,13},{2,5,7,8,9,13,14},{2,5,7,8,9,13,14,15},{2,5,7,8,9,13,15},{2,5,7,8,9,14},{2,5,7,8,9,14,15},{2,5,7,8,9,15},{2,5,7,8,10},{2,5,7,8,10,11},{2,5,7,8,10,11,12},{2,5,7,8,10,11,12,13},{2,5,7,8,10,11,12,13,14},{2,5,7,8,10,11,12,13,14,15},{2,5,7,8,10,11,12,13,15},{2,5,7,8,10,11,12,14},{2,5,7,8,10,11,12,14,15},{2,5,7,8,10,11,12,15},{2,5,7,8,10,11,13},{2,5,7,8,10,11,13,14},{2,5,7,8,10,11,13,14,15},{2,5,7,8,10,11,13,15},{2,5,7,8,10,11,14},{2,5,7,8,10,11,14,15},{2,5,7,8,10,11,15},{2,5,7,8,10,12},{2,5,7,8,10,12,13},{2,5,7,8,10,12,13,14},{2,5,7,8,10,12,13,14,15},{2,5,7,8,10,12,13,15},{2,5,7,8,10,12,14},{2,5,7,8,10,12,14,15},{2,5,7,8,10,12,15},{2,5,7,8,10,13},{2,5,7,8,10,13,14},{2,5,7,8,10,13,14,15},{2,5,7,8,10,13,15},{2,5,7,8,10,14},{2,5,7,8,10,14,15},{2,5,7,8,10,15},{2,5,7,8,11},{2,5,7,8,11,12},{2,5,7,8,11,12,13},{2,5,7,8,11,12,13,14},{2,5,7,8,11,12,13,14,15},{2,5,7,8,11,12,13,15},{2,5,7,8,11,12,14},{2,5,7,8,11,12,14,15},{2,5,7,8,11,12,15},{2,5,7,8,11,13},{2,5,7,8,11,13,14},{2,5,7,8,11,13,14,15},{2,5,7,8,11,13,15},{2,5,7,8,11,14},{2,5,7,8,11,14,15},{2,5,7,8,11,15},{2,5,7,8,12},{2,5,7,8,12,13},{2,5,7,8,12,13,14},{2,5,7,8,12,13,14,15},{2,5,7,8,12,13,15},{2,5,7,8,12,14},{2,5,7,8,12,14,15},{2,5,7,8,12,15},{2,5,7,8,13},{2,5,7,8,13,14},{2,5,7,8,13,14,15},{2,5,7,8,13,15},{2,5,7,8,14},{2,5,7,8,14,15},{2,5,7,8,15},{2,5,7,9},{2,5,7,9,10},{2,5,7,9,10,11},{2,5,7,9,10,11,12},{2,5,7,9,10,11,12,13},{2,5,7,9,10,11,12,13,14},{2,5,7,9,10,11,12,13,14,15},{2,5,7,9,10,11,12,13,15},{2,5,7,9,10,11,12,14},{2,5,7,9,10,11,12,14,15},{2,5,7,9,10,11,12,15},{2,5,7,9,10,11,13},{2,5,7,9,10,11,13,14},{2,5,7,9,10,11,13,14,15},{2,5,7,9,10,11,13,15},{2,5,7,9,10,11,14},{2,5,7,9,10,11,14,15},{2,5,7,9,10,11,15},{2,5,7,9,10,12},{2,5,7,9,10,12,13},{2,5,7,9,10,12,13,14},{2,5,7,9,10,12,13,14,15},{2,5,7,9,10,12,13,15},{2,5,7,9,10,12,14},{2,5,7,9,10,12,14,15},{2,5,7,9,10,12,15},{2,5,7,9,10,13},{2,5,7,9,10,13,14},{2,5,7,9,10,13,14,15},{2,5,7,9,10,13,15},{2,5,7,9,10,14},{2,5,7,9,10,14,15},{2,5,7,9,10,15},{2,5,7,9,11},{2,5,7,9,11,12},{2,5,7,9,11,12,13},{2,5,7,9,11,12,13,14},{2,5,7,9,11,12,13,14,15},{2,5,7,9,11,12,13,15},{2,5,7,9,11,12,14},{2,5,7,9,11,12,14,15},{2,5,7,9,11,12,15},{2,5,7,9,11,13},{2,5,7,9,11,13,14},{2,5,7,9,11,13,14,15},{2,5,7,9,11,13,15},{2,5,7,9,11,14},{2,5,7,9,11,14,15},{2,5,7,9,11,15},{2,5,7,9,12},{2,5,7,9,12,13},{2,5,7,9,12,13,14},{2,5,7,9,12,13,14,15},{2,5,7,9,12,13,15},{2,5,7,9,12,14},{2,5,7,9,12,14,15},{2,5,7,9,12,15},{2,5,7,9,13},{2,5,7,9,13,14},{2,5,7,9,13,14,15},{2,5,7,9,13,15},{2,5,7,9,14},{2,5,7,9,14,15},{2,5,7,9,15},{2,5,7,10},{2,5,7,10,11},{2,5,7,10,11,12},{2,5,7,10,11,12,13},{2,5,7,10,11,12,13,14},{2,5,7,10,11,12,13,14,15},{2,5,7,10,11,12,13,15},{2,5,7,10,11,12,14},{2,5,7,10,11,12,14,15},{2,5,7,10,11,12,15},{2,5,7,10,11,13},{2,5,7,10,11,13,14},{2,5,7,10,11,13,14,15},{2,5,7,10,11,13,15},{2,5,7,10,11,14},{2,5,7,10,11,14,15},{2,5,7,10,11,15},{2,5,7,10,12},{2,5,7,10,12,13},{2,5,7,10,12,13,14},{2,5,7,10,12,13,14,15},{2,5,7,10,12,13,15},{2,5,7,10,12,14},{2,5,7,10,12,14,15},{2,5,7,10,12,15},{2,5,7,10,13},{2,5,7,10,13,14},{2,5,7,10,13,14,15},{2,5,7,10,13,15},{2,5,7,10,14},{2,5,7,10,14,15},{2,5,7,10,15},{2,5,7,11},{2,5,7,11,12},{2,5,7,11,12,13},{2,5,7,11,12,13,14},{2,5,7,11,12,13,14,15},{2,5,7,11,12,13,15},{2,5,7,11,12,14},{2,5,7,11,12,14,15},{2,5,7,11,12,15},{2,5,7,11,13},{2,5,7,11,13,14},{2,5,7,11,13,14,15},{2,5,7,11,13,15},{2,5,7,11,14},{2,5,7,11,14,15},{2,5,7,11,15},{2,5,7,12},{2,5,7,12,13},{2,5,7,12,13,14},{2,5,7,12,13,14,15},{2,5,7,12,13,15},{2,5,7,12,14},{2,5,7,12,14,15},{2,5,7,12,15},{2,5,7,13},{2,5,7,13,14},{2,5,7,13,14,15},{2,5,7,13,15},{2,5,7,14},{2,5,7,14,15},{2,5,7,15},{2,5,8},{2,5,8,9},{2,5,8,9,10},{2,5,8,9,10,11},{2,5,8,9,10,11,12},{2,5,8,9,10,11,12,13},{2,5,8,9,10,11,12,13,14},{2,5,8,9,10,11,12,13,14,15},{2,5,8,9,10,11,12,13,15},{2,5,8,9,10,11,12,14},{2,5,8,9,10,11,12,14,15},{2,5,8,9,10,11,12,15},{2,5,8,9,10,11,13},{2,5,8,9,10,11,13,14},{2,5,8,9,10,11,13,14,15},{2,5,8,9,10,11,13,15},{2,5,8,9,10,11,14},{2,5,8,9,10,11,14,15},{2,5,8,9,10,11,15},{2,5,8,9,10,12},{2,5,8,9,10,12,13},{2,5,8,9,10,12,13,14},{2,5,8,9,10,12,13,14,15},{2,5,8,9,10,12,13,15},{2,5,8,9,10,12,14},{2,5,8,9,10,12,14,15},{2,5,8,9,10,12,15},{2,5,8,9,10,13},{2,5,8,9,10,13,14},{2,5,8,9,10,13,14,15},{2,5,8,9,10,13,15},{2,5,8,9,10,14},{2,5,8,9,10,14,15},{2,5,8,9,10,15},{2,5,8,9,11},{2,5,8,9,11,12},{2,5,8,9,11,12,13},{2,5,8,9,11,12,13,14},{2,5,8,9,11,12,13,14,15},{2,5,8,9,11,12,13,15},{2,5,8,9,11,12,14},{2,5,8,9,11,12,14,15},{2,5,8,9,11,12,15},{2,5,8,9,11,13},{2,5,8,9,11,13,14},{2,5,8,9,11,13,14,15},{2,5,8,9,11,13,15},{2,5,8,9,11,14},{2,5,8,9,11,14,15},{2,5,8,9,11,15},{2,5,8,9,12},{2,5,8,9,12,13},{2,5,8,9,12,13,14},{2,5,8,9,12,13,14,15},{2,5,8,9,12,13,15},{2,5,8,9,12,14},{2,5,8,9,12,14,15},{2,5,8,9,12,15},{2,5,8,9,13},{2,5,8,9,13,14},{2,5,8,9,13,14,15},{2,5,8,9,13,15},{2,5,8,9,14},{2,5,8,9,14,15},{2,5,8,9,15},{2,5,8,10},{2,5,8,10,11},{2,5,8,10,11,12},{2,5,8,10,11,12,13},{2,5,8,10,11,12,13,14},{2,5,8,10,11,12,13,14,15},{2,5,8,10,11,12,13,15},{2,5,8,10,11,12,14},{2,5,8,10,11,12,14,15},{2,5,8,10,11,12,15},{2,5,8,10,11,13},{2,5,8,10,11,13,14},{2,5,8,10,11,13,14,15},{2,5,8,10,11,13,15},{2,5,8,10,11,14},{2,5,8,10,11,14,15},{2,5,8,10,11,15},{2,5,8,10,12},{2,5,8,10,12,13},{2,5,8,10,12,13,14},{2,5,8,10,12,13,14,15},{2,5,8,10,12,13,15},{2,5,8,10,12,14},{2,5,8,10,12,14,15},{2,5,8,10,12,15},{2,5,8,10,13},{2,5,8,10,13,14},{2,5,8,10,13,14,15},{2,5,8,10,13,15},{2,5,8,10,14},{2,5,8,10,14,15},{2,5,8,10,15},{2,5,8,11},{2,5,8,11,12},{2,5,8,11,12,13},{2,5,8,11,12,13,14},{2,5,8,11,12,13,14,15},{2,5,8,11,12,13,15},{2,5,8,11,12,14},{2,5,8,11,12,14,15},{2,5,8,11,12,15},{2,5,8,11,13},{2,5,8,11,13,14},{2,5,8,11,13,14,15},{2,5,8,11,13,15},{2,5,8,11,14},{2,5,8,11,14,15},{2,5,8,11,15},{2,5,8,12},{2,5,8,12,13},{2,5,8,12,13,14},{2,5,8,12,13,14,15},{2,5,8,12,13,15},{2,5,8,12,14},{2,5,8,12,14,15},{2,5,8,12,15},{2,5,8,13},{2,5,8,13,14},{2,5,8,13,14,15},{2,5,8,13,15},{2,5,8,14},{2,5,8,14,15},{2,5,8,15},{2,5,9},{2,5,9,10},{2,5,9,10,11},{2,5,9,10,11,12},{2,5,9,10,11,12,13},{2,5,9,10,11,12,13,14},{2,5,9,10,11,12,13,14,15},{2,5,9,10,11,12,13,15},{2,5,9,10,11,12,14},{2,5,9,10,11,12,14,15},{2,5,9,10,11,12,15},{2,5,9,10,11,13},{2,5,9,10,11,13,14},{2,5,9,10,11,13,14,15},{2,5,9,10,11,13,15},{2,5,9,10,11,14},{2,5,9,10,11,14,15},{2,5,9,10,11,15},{2,5,9,10,12},{2,5,9,10,12,13},{2,5,9,10,12,13,14},{2,5,9,10,12,13,14,15},{2,5,9,10,12,13,15},{2,5,9,10,12,14},{2,5,9,10,12,14,15},{2,5,9,10,12,15},{2,5,9,10,13},{2,5,9,10,13,14},{2,5,9,10,13,14,15},{2,5,9,10,13,15},{2,5,9,10,14},{2,5,9,10,14,15},{2,5,9,10,15},{2,5,9,11},{2,5,9,11,12},{2,5,9,11,12,13},{2,5,9,11,12,13,14},{2,5,9,11,12,13,14,15},{2,5,9,11,12,13,15},{2,5,9,11,12,14},{2,5,9,11,12,14,15},{2,5,9,11,12,15},{2,5,9,11,13},{2,5,9,11,13,14},{2,5,9,11,13,14,15},{2,5,9,11,13,15},{2,5,9,11,14},{2,5,9,11,14,15},{2,5,9,11,15},{2,5,9,12},{2,5,9,12,13},{2,5,9,12,13,14},{2,5,9,12,13,14,15},{2,5,9,12,13,15},{2,5,9,12,14},{2,5,9,12,14,15},{2,5,9,12,15},{2,5,9,13},{2,5,9,13,14},{2,5,9,13,14,15},{2,5,9,13,15},{2,5,9,14},{2,5,9,14,15},{2,5,9,15},{2,5,10},{2,5,10,11},{2,5,10,11,12},{2,5,10,11,12,13},{2,5,10,11,12,13,14},{2,5,10,11,12,13,14,15},{2,5,10,11,12,13,15},{2,5,10,11,12,14},{2,5,10,11,12,14,15},{2,5,10,11,12,15},{2,5,10,11,13},{2,5,10,11,13,14},{2,5,10,11,13,14,15},{2,5,10,11,13,15},{2,5,10,11,14},{2,5,10,11,14,15},{2,5,10,11,15},{2,5,10,12},{2,5,10,12,13},{2,5,10,12,13,14},{2,5,10,12,13,14,15},{2,5,10,12,13,15},{2,5,10,12,14},{2,5,10,12,14,15},{2,5,10,12,15},{2,5,10,13},{2,5,10,13,14},{2,5,10,13,14,15},{2,5,10,13,15},{2,5,10,14},{2,5,10,14,15},{2,5,10,15},{2,5,11},{2,5,11,12},{2,5,11,12,13},{2,5,11,12,13,14},{2,5,11,12,13,14,15},{2,5,11,12,13,15},{2,5,11,12,14},{2,5,11,12,14,15},{2,5,11,12,15},{2,5,11,13},{2,5,11,13,14},{2,5,11,13,14,15},{2,5,11,13,15},{2,5,11,14},{2,5,11,14,15},{2,5,11,15},{2,5,12},{2,5,12,13},{2,5,12,13,14},{2,5,12,13,14,15},{2,5,12,13,15},{2,5,12,14},{2,5,12,14,15},{2,5,12,15},{2,5,13},{2,5,13,14},{2,5,13,14,15},{2,5,13,15},{2,5,14},{2,5,14,15},{2,5,15},{2,6},{2,6,7},{2,6,7,8},{2,6,7,8,9},{2,6,7,8,9,10},{2,6,7,8,9,10,11},{2,6,7,8,9,10,11,12},{2,6,7,8,9,10,11,12,13},{2,6,7,8,9,10,11,12,13,14},{2,6,7,8,9,10,11,12,13,14,15},{2,6,7,8,9,10,11,12,13,15},{2,6,7,8,9,10,11,12,14},{2,6,7,8,9,10,11,12,14,15},{2,6,7,8,9,10,11,12,15},{2,6,7,8,9,10,11,13},{2,6,7,8,9,10,11,13,14},{2,6,7,8,9,10,11,13,14,15},{2,6,7,8,9,10,11,13,15},{2,6,7,8,9,10,11,14},{2,6,7,8,9,10,11,14,15},{2,6,7,8,9,10,11,15},{2,6,7,8,9,10,12},{2,6,7,8,9,10,12,13},{2,6,7,8,9,10,12,13,14},{2,6,7,8,9,10,12,13,14,15},{2,6,7,8,9,10,12,13,15},{2,6,7,8,9,10,12,14},{2,6,7,8,9,10,12,14,15},{2,6,7,8,9,10,12,15},{2,6,7,8,9,10,13},{2,6,7,8,9,10,13,14},{2,6,7,8,9,10,13,14,15},{2,6,7,8,9,10,13,15},{2,6,7,8,9,10,14},{2,6,7,8,9,10,14,15},{2,6,7,8,9,10,15},{2,6,7,8,9,11},{2,6,7,8,9,11,12},{2,6,7,8,9,11,12,13},{2,6,7,8,9,11,12,13,14},{2,6,7,8,9,11,12,13,14,15},{2,6,7,8,9,11,12,13,15},{2,6,7,8,9,11,12,14},{2,6,7,8,9,11,12,14,15},{2,6,7,8,9,11,12,15},{2,6,7,8,9,11,13},{2,6,7,8,9,11,13,14},{2,6,7,8,9,11,13,14,15},{2,6,7,8,9,11,13,15},{2,6,7,8,9,11,14},{2,6,7,8,9,11,14,15},{2,6,7,8,9,11,15},{2,6,7,8,9,12},{2,6,7,8,9,12,13},{2,6,7,8,9,12,13,14},{2,6,7,8,9,12,13,14,15},{2,6,7,8,9,12,13,15},{2,6,7,8,9,12,14},{2,6,7,8,9,12,14,15},{2,6,7,8,9,12,15},{2,6,7,8,9,13},{2,6,7,8,9,13,14},{2,6,7,8,9,13,14,15},{2,6,7,8,9,13,15},{2,6,7,8,9,14},{2,6,7,8,9,14,15},{2,6,7,8,9,15},{2,6,7,8,10},{2,6,7,8,10,11},{2,6,7,8,10,11,12},{2,6,7,8,10,11,12,13},{2,6,7,8,10,11,12,13,14},{2,6,7,8,10,11,12,13,14,15},{2,6,7,8,10,11,12,13,15},{2,6,7,8,10,11,12,14},{2,6,7,8,10,11,12,14,15},{2,6,7,8,10,11,12,15},{2,6,7,8,10,11,13},{2,6,7,8,10,11,13,14},{2,6,7,8,10,11,13,14,15},{2,6,7,8,10,11,13,15},{2,6,7,8,10,11,14},{2,6,7,8,10,11,14,15},{2,6,7,8,10,11,15},{2,6,7,8,10,12},{2,6,7,8,10,12,13},{2,6,7,8,10,12,13,14},{2,6,7,8,10,12,13,14,15},{2,6,7,8,10,12,13,15},{2,6,7,8,10,12,14},{2,6,7,8,10,12,14,15},{2,6,7,8,10,12,15},{2,6,7,8,10,13},{2,6,7,8,10,13,14},{2,6,7,8,10,13,14,15},{2,6,7,8,10,13,15},{2,6,7,8,10,14},{2,6,7,8,10,14,15},{2,6,7,8,10,15},{2,6,7,8,11},{2,6,7,8,11,12},{2,6,7,8,11,12,13},{2,6,7,8,11,12,13,14},{2,6,7,8,11,12,13,14,15},{2,6,7,8,11,12,13,15},{2,6,7,8,11,12,14},{2,6,7,8,11,12,14,15},{2,6,7,8,11,12,15},{2,6,7,8,11,13},{2,6,7,8,11,13,14},{2,6,7,8,11,13,14,15},{2,6,7,8,11,13,15},{2,6,7,8,11,14},{2,6,7,8,11,14,15},{2,6,7,8,11,15},{2,6,7,8,12},{2,6,7,8,12,13},{2,6,7,8,12,13,14},{2,6,7,8,12,13,14,15},{2,6,7,8,12,13,15},{2,6,7,8,12,14},{2,6,7,8,12,14,15},{2,6,7,8,12,15},{2,6,7,8,13},{2,6,7,8,13,14},{2,6,7,8,13,14,15},{2,6,7,8,13,15},{2,6,7,8,14},{2,6,7,8,14,15},{2,6,7,8,15},{2,6,7,9},{2,6,7,9,10},{2,6,7,9,10,11},{2,6,7,9,10,11,12},{2,6,7,9,10,11,12,13},{2,6,7,9,10,11,12,13,14},{2,6,7,9,10,11,12,13,14,15},{2,6,7,9,10,11,12,13,15},{2,6,7,9,10,11,12,14},{2,6,7,9,10,11,12,14,15},{2,6,7,9,10,11,12,15},{2,6,7,9,10,11,13},{2,6,7,9,10,11,13,14},{2,6,7,9,10,11,13,14,15},{2,6,7,9,10,11,13,15},{2,6,7,9,10,11,14},{2,6,7,9,10,11,14,15},{2,6,7,9,10,11,15},{2,6,7,9,10,12},{2,6,7,9,10,12,13},{2,6,7,9,10,12,13,14},{2,6,7,9,10,12,13,14,15},{2,6,7,9,10,12,13,15},{2,6,7,9,10,12,14},{2,6,7,9,10,12,14,15},{2,6,7,9,10,12,15},{2,6,7,9,10,13},{2,6,7,9,10,13,14},{2,6,7,9,10,13,14,15},{2,6,7,9,10,13,15},{2,6,7,9,10,14},{2,6,7,9,10,14,15},{2,6,7,9,10,15},{2,6,7,9,11},{2,6,7,9,11,12},{2,6,7,9,11,12,13},{2,6,7,9,11,12,13,14},{2,6,7,9,11,12,13,14,15},{2,6,7,9,11,12,13,15},{2,6,7,9,11,12,14},{2,6,7,9,11,12,14,15},{2,6,7,9,11,12,15},{2,6,7,9,11,13},{2,6,7,9,11,13,14},{2,6,7,9,11,13,14,15},{2,6,7,9,11,13,15},{2,6,7,9,11,14},{2,6,7,9,11,14,15},{2,6,7,9,11,15},{2,6,7,9,12},{2,6,7,9,12,13},{2,6,7,9,12,13,14},{2,6,7,9,12,13,14,15},{2,6,7,9,12,13,15},{2,6,7,9,12,14},{2,6,7,9,12,14,15},{2,6,7,9,12,15},{2,6,7,9,13},{2,6,7,9,13,14},{2,6,7,9,13,14,15},{2,6,7,9,13,15},{2,6,7,9,14},{2,6,7,9,14,15},{2,6,7,9,15},{2,6,7,10},{2,6,7,10,11},{2,6,7,10,11,12},{2,6,7,10,11,12,13},{2,6,7,10,11,12,13,14},{2,6,7,10,11,12,13,14,15},{2,6,7,10,11,12,13,15},{2,6,7,10,11,12,14},{2,6,7,10,11,12,14,15},{2,6,7,10,11,12,15},{2,6,7,10,11,13},{2,6,7,10,11,13,14},{2,6,7,10,11,13,14,15},{2,6,7,10,11,13,15},{2,6,7,10,11,14},{2,6,7,10,11,14,15},{2,6,7,10,11,15},{2,6,7,10,12},{2,6,7,10,12,13},{2,6,7,10,12,13,14},{2,6,7,10,12,13,14,15},{2,6,7,10,12,13,15},{2,6,7,10,12,14},{2,6,7,10,12,14,15},{2,6,7,10,12,15},{2,6,7,10,13},{2,6,7,10,13,14},{2,6,7,10,13,14,15},{2,6,7,10,13,15},{2,6,7,10,14},{2,6,7,10,14,15},{2,6,7,10,15},{2,6,7,11},{2,6,7,11,12},{2,6,7,11,12,13},{2,6,7,11,12,13,14},{2,6,7,11,12,13,14,15},{2,6,7,11,12,13,15},{2,6,7,11,12,14},{2,6,7,11,12,14,15},{2,6,7,11,12,15},{2,6,7,11,13},{2,6,7,11,13,14},{2,6,7,11,13,14,15},{2,6,7,11,13,15},{2,6,7,11,14},{2,6,7,11,14,15},{2,6,7,11,15},{2,6,7,12},{2,6,7,12,13},{2,6,7,12,13,14},{2,6,7,12,13,14,15},{2,6,7,12,13,15},{2,6,7,12,14},{2,6,7,12,14,15},{2,6,7,12,15},{2,6,7,13},{2,6,7,13,14},{2,6,7,13,14,15},{2,6,7,13,15},{2,6,7,14},{2,6,7,14,15},{2,6,7,15},{2,6,8},{2,6,8,9},{2,6,8,9,10},{2,6,8,9,10,11},{2,6,8,9,10,11,12},{2,6,8,9,10,11,12,13},{2,6,8,9,10,11,12,13,14},{2,6,8,9,10,11,12,13,14,15},{2,6,8,9,10,11,12,13,15},{2,6,8,9,10,11,12,14},{2,6,8,9,10,11,12,14,15},{2,6,8,9,10,11,12,15},{2,6,8,9,10,11,13},{2,6,8,9,10,11,13,14},{2,6,8,9,10,11,13,14,15},{2,6,8,9,10,11,13,15},{2,6,8,9,10,11,14},{2,6,8,9,10,11,14,15},{2,6,8,9,10,11,15},{2,6,8,9,10,12},{2,6,8,9,10,12,13},{2,6,8,9,10,12,13,14},{2,6,8,9,10,12,13,14,15},{2,6,8,9,10,12,13,15},{2,6,8,9,10,12,14},{2,6,8,9,10,12,14,15},{2,6,8,9,10,12,15},{2,6,8,9,10,13},{2,6,8,9,10,13,14},{2,6,8,9,10,13,14,15},{2,6,8,9,10,13,15},{2,6,8,9,10,14},{2,6,8,9,10,14,15},{2,6,8,9,10,15},{2,6,8,9,11},{2,6,8,9,11,12},{2,6,8,9,11,12,13},{2,6,8,9,11,12,13,14},{2,6,8,9,11,12,13,14,15},{2,6,8,9,11,12,13,15},{2,6,8,9,11,12,14},{2,6,8,9,11,12,14,15},{2,6,8,9,11,12,15},{2,6,8,9,11,13},{2,6,8,9,11,13,14},{2,6,8,9,11,13,14,15},{2,6,8,9,11,13,15},{2,6,8,9,11,14},{2,6,8,9,11,14,15},{2,6,8,9,11,15},{2,6,8,9,12},{2,6,8,9,12,13},{2,6,8,9,12,13,14},{2,6,8,9,12,13,14,15},{2,6,8,9,12,13,15},{2,6,8,9,12,14},{2,6,8,9,12,14,15},{2,6,8,9,12,15},{2,6,8,9,13},{2,6,8,9,13,14},{2,6,8,9,13,14,15},{2,6,8,9,13,15},{2,6,8,9,14},{2,6,8,9,14,15},{2,6,8,9,15},{2,6,8,10},{2,6,8,10,11},{2,6,8,10,11,12},{2,6,8,10,11,12,13},{2,6,8,10,11,12,13,14},{2,6,8,10,11,12,13,14,15},{2,6,8,10,11,12,13,15},{2,6,8,10,11,12,14},{2,6,8,10,11,12,14,15},{2,6,8,10,11,12,15},{2,6,8,10,11,13},{2,6,8,10,11,13,14},{2,6,8,10,11,13,14,15},{2,6,8,10,11,13,15},{2,6,8,10,11,14},{2,6,8,10,11,14,15},{2,6,8,10,11,15},{2,6,8,10,12},{2,6,8,10,12,13},{2,6,8,10,12,13,14},{2,6,8,10,12,13,14,15},{2,6,8,10,12,13,15},{2,6,8,10,12,14},{2,6,8,10,12,14,15},{2,6,8,10,12,15},{2,6,8,10,13},{2,6,8,10,13,14},{2,6,8,10,13,14,15},{2,6,8,10,13,15},{2,6,8,10,14},{2,6,8,10,14,15},{2,6,8,10,15},{2,6,8,11},{2,6,8,11,12},{2,6,8,11,12,13},{2,6,8,11,12,13,14},{2,6,8,11,12,13,14,15},{2,6,8,11,12,13,15},{2,6,8,11,12,14},{2,6,8,11,12,14,15},{2,6,8,11,12,15},{2,6,8,11,13},{2,6,8,11,13,14},{2,6,8,11,13,14,15},{2,6,8,11,13,15},{2,6,8,11,14},{2,6,8,11,14,15},{2,6,8,11,15},{2,6,8,12},{2,6,8,12,13},{2,6,8,12,13,14},{2,6,8,12,13,14,15},{2,6,8,12,13,15},{2,6,8,12,14},{2,6,8,12,14,15},{2,6,8,12,15},{2,6,8,13},{2,6,8,13,14},{2,6,8,13,14,15},{2,6,8,13,15},{2,6,8,14},{2,6,8,14,15},{2,6,8,15},{2,6,9},{2,6,9,10},{2,6,9,10,11},{2,6,9,10,11,12},{2,6,9,10,11,12,13},{2,6,9,10,11,12,13,14},{2,6,9,10,11,12,13,14,15},{2,6,9,10,11,12,13,15},{2,6,9,10,11,12,14},{2,6,9,10,11,12,14,15},{2,6,9,10,11,12,15},{2,6,9,10,11,13},{2,6,9,10,11,13,14},{2,6,9,10,11,13,14,15},{2,6,9,10,11,13,15},{2,6,9,10,11,14},{2,6,9,10,11,14,15},{2,6,9,10,11,15},{2,6,9,10,12},{2,6,9,10,12,13},{2,6,9,10,12,13,14},{2,6,9,10,12,13,14,15},{2,6,9,10,12,13,15},{2,6,9,10,12,14},{2,6,9,10,12,14,15},{2,6,9,10,12,15},{2,6,9,10,13},{2,6,9,10,13,14},{2,6,9,10,13,14,15},{2,6,9,10,13,15},{2,6,9,10,14},{2,6,9,10,14,15},{2,6,9,10,15},{2,6,9,11},{2,6,9,11,12},{2,6,9,11,12,13},{2,6,9,11,12,13,14},{2,6,9,11,12,13,14,15},{2,6,9,11,12,13,15},{2,6,9,11,12,14},{2,6,9,11,12,14,15},{2,6,9,11,12,15},{2,6,9,11,13},{2,6,9,11,13,14},{2,6,9,11,13,14,15},{2,6,9,11,13,15},{2,6,9,11,14},{2,6,9,11,14,15},{2,6,9,11,15},{2,6,9,12},{2,6,9,12,13},{2,6,9,12,13,14},{2,6,9,12,13,14,15},{2,6,9,12,13,15},{2,6,9,12,14},{2,6,9,12,14,15},{2,6,9,12,15},{2,6,9,13},{2,6,9,13,14},{2,6,9,13,14,15},{2,6,9,13,15},{2,6,9,14},{2,6,9,14,15},{2,6,9,15},{2,6,10},{2,6,10,11},{2,6,10,11,12},{2,6,10,11,12,13},{2,6,10,11,12,13,14},{2,6,10,11,12,13,14,15},{2,6,10,11,12,13,15},{2,6,10,11,12,14},{2,6,10,11,12,14,15},{2,6,10,11,12,15},{2,6,10,11,13},{2,6,10,11,13,14},{2,6,10,11,13,14,15},{2,6,10,11,13,15},{2,6,10,11,14},{2,6,10,11,14,15},{2,6,10,11,15},{2,6,10,12},{2,6,10,12,13},{2,6,10,12,13,14},{2,6,10,12,13,14,15},{2,6,10,12,13,15},{2,6,10,12,14},{2,6,10,12,14,15},{2,6,10,12,15},{2,6,10,13},{2,6,10,13,14},{2,6,10,13,14,15},{2,6,10,13,15},{2,6,10,14},{2,6,10,14,15},{2,6,10,15},{2,6,11},{2,6,11,12},{2,6,11,12,13},{2,6,11,12,13,14},{2,6,11,12,13,14,15},{2,6,11,12,13,15},{2,6,11,12,14},{2,6,11,12,14,15},{2,6,11,12,15},{2,6,11,13},{2,6,11,13,14},{2,6,11,13,14,15},{2,6,11,13,15},{2,6,11,14},{2,6,11,14,15},{2,6,11,15},{2,6,12},{2,6,12,13},{2,6,12,13,14},{2,6,12,13,14,15},{2,6,12,13,15},{2,6,12,14},{2,6,12,14,15},{2,6,12,15},{2,6,13},{2,6,13,14},{2,6,13,14,15},{2,6,13,15},{2,6,14},{2,6,14,15},{2,6,15},{2,7},{2,7,8},{2,7,8,9},{2,7,8,9,10},{2,7,8,9,10,11},{2,7,8,9,10,11,12},{2,7,8,9,10,11,12,13},{2,7,8,9,10,11,12,13,14},{2,7,8,9,10,11,12,13,14,15},{2,7,8,9,10,11,12,13,15},{2,7,8,9,10,11,12,14},{2,7,8,9,10,11,12,14,15},{2,7,8,9,10,11,12,15},{2,7,8,9,10,11,13},{2,7,8,9,10,11,13,14},{2,7,8,9,10,11,13,14,15},{2,7,8,9,10,11,13,15},{2,7,8,9,10,11,14},{2,7,8,9,10,11,14,15},{2,7,8,9,10,11,15},{2,7,8,9,10,12},{2,7,8,9,10,12,13},{2,7,8,9,10,12,13,14},{2,7,8,9,10,12,13,14,15},{2,7,8,9,10,12,13,15},{2,7,8,9,10,12,14},{2,7,8,9,10,12,14,15},{2,7,8,9,10,12,15},{2,7,8,9,10,13},{2,7,8,9,10,13,14},{2,7,8,9,10,13,14,15},{2,7,8,9,10,13,15},{2,7,8,9,10,14},{2,7,8,9,10,14,15},{2,7,8,9,10,15},{2,7,8,9,11},{2,7,8,9,11,12},{2,7,8,9,11,12,13},{2,7,8,9,11,12,13,14},{2,7,8,9,11,12,13,14,15},{2,7,8,9,11,12,13,15},{2,7,8,9,11,12,14},{2,7,8,9,11,12,14,15},{2,7,8,9,11,12,15},{2,7,8,9,11,13},{2,7,8,9,11,13,14},{2,7,8,9,11,13,14,15},{2,7,8,9,11,13,15},{2,7,8,9,11,14},{2,7,8,9,11,14,15},{2,7,8,9,11,15},{2,7,8,9,12},{2,7,8,9,12,13},{2,7,8,9,12,13,14},{2,7,8,9,12,13,14,15},{2,7,8,9,12,13,15},{2,7,8,9,12,14},{2,7,8,9,12,14,15},{2,7,8,9,12,15},{2,7,8,9,13},{2,7,8,9,13,14},{2,7,8,9,13,14,15},{2,7,8,9,13,15},{2,7,8,9,14},{2,7,8,9,14,15},{2,7,8,9,15},{2,7,8,10},{2,7,8,10,11},{2,7,8,10,11,12},{2,7,8,10,11,12,13},{2,7,8,10,11,12,13,14},{2,7,8,10,11,12,13,14,15},{2,7,8,10,11,12,13,15},{2,7,8,10,11,12,14},{2,7,8,10,11,12,14,15},{2,7,8,10,11,12,15},{2,7,8,10,11,13},{2,7,8,10,11,13,14},{2,7,8,10,11,13,14,15},{2,7,8,10,11,13,15},{2,7,8,10,11,14},{2,7,8,10,11,14,15},{2,7,8,10,11,15},{2,7,8,10,12},{2,7,8,10,12,13},{2,7,8,10,12,13,14},{2,7,8,10,12,13,14,15},{2,7,8,10,12,13,15},{2,7,8,10,12,14},{2,7,8,10,12,14,15},{2,7,8,10,12,15},{2,7,8,10,13},{2,7,8,10,13,14},{2,7,8,10,13,14,15},{2,7,8,10,13,15},{2,7,8,10,14},{2,7,8,10,14,15},{2,7,8,10,15},{2,7,8,11},{2,7,8,11,12},{2,7,8,11,12,13},{2,7,8,11,12,13,14},{2,7,8,11,12,13,14,15},{2,7,8,11,12,13,15},{2,7,8,11,12,14},{2,7,8,11,12,14,15},{2,7,8,11,12,15},{2,7,8,11,13},{2,7,8,11,13,14},{2,7,8,11,13,14,15},{2,7,8,11,13,15},{2,7,8,11,14},{2,7,8,11,14,15},{2,7,8,11,15},{2,7,8,12},{2,7,8,12,13},{2,7,8,12,13,14},{2,7,8,12,13,14,15},{2,7,8,12,13,15},{2,7,8,12,14},{2,7,8,12,14,15},{2,7,8,12,15},{2,7,8,13},{2,7,8,13,14},{2,7,8,13,14,15},{2,7,8,13,15},{2,7,8,14},{2,7,8,14,15},{2,7,8,15},{2,7,9},{2,7,9,10},{2,7,9,10,11},{2,7,9,10,11,12},{2,7,9,10,11,12,13},{2,7,9,10,11,12,13,14},{2,7,9,10,11,12,13,14,15},{2,7,9,10,11,12,13,15},{2,7,9,10,11,12,14},{2,7,9,10,11,12,14,15},{2,7,9,10,11,12,15},{2,7,9,10,11,13},{2,7,9,10,11,13,14},{2,7,9,10,11,13,14,15},{2,7,9,10,11,13,15},{2,7,9,10,11,14},{2,7,9,10,11,14,15},{2,7,9,10,11,15},{2,7,9,10,12},{2,7,9,10,12,13},{2,7,9,10,12,13,14},{2,7,9,10,12,13,14,15},{2,7,9,10,12,13,15},{2,7,9,10,12,14},{2,7,9,10,12,14,15},{2,7,9,10,12,15},{2,7,9,10,13},{2,7,9,10,13,14},{2,7,9,10,13,14,15},{2,7,9,10,13,15},{2,7,9,10,14},{2,7,9,10,14,15},{2,7,9,10,15},{2,7,9,11},{2,7,9,11,12},{2,7,9,11,12,13},{2,7,9,11,12,13,14},{2,7,9,11,12,13,14,15},{2,7,9,11,12,13,15},{2,7,9,11,12,14},{2,7,9,11,12,14,15},{2,7,9,11,12,15},{2,7,9,11,13},{2,7,9,11,13,14},{2,7,9,11,13,14,15},{2,7,9,11,13,15},{2,7,9,11,14},{2,7,9,11,14,15},{2,7,9,11,15},{2,7,9,12},{2,7,9,12,13},{2,7,9,12,13,14},{2,7,9,12,13,14,15},{2,7,9,12,13,15},{2,7,9,12,14},{2,7,9,12,14,15},{2,7,9,12,15},{2,7,9,13},{2,7,9,13,14},{2,7,9,13,14,15},{2,7,9,13,15},{2,7,9,14},{2,7,9,14,15},{2,7,9,15},{2,7,10},{2,7,10,11},{2,7,10,11,12},{2,7,10,11,12,13},{2,7,10,11,12,13,14},{2,7,10,11,12,13,14,15},{2,7,10,11,12,13,15},{2,7,10,11,12,14},{2,7,10,11,12,14,15},{2,7,10,11,12,15},{2,7,10,11,13},{2,7,10,11,13,14},{2,7,10,11,13,14,15},{2,7,10,11,13,15},{2,7,10,11,14},{2,7,10,11,14,15},{2,7,10,11,15},{2,7,10,12},{2,7,10,12,13},{2,7,10,12,13,14},{2,7,10,12,13,14,15},{2,7,10,12,13,15},{2,7,10,12,14},{2,7,10,12,14,15},{2,7,10,12,15},{2,7,10,13},{2,7,10,13,14},{2,7,10,13,14,15},{2,7,10,13,15},{2,7,10,14},{2,7,10,14,15},{2,7,10,15},{2,7,11},{2,7,11,12},{2,7,11,12,13},{2,7,11,12,13,14},{2,7,11,12,13,14,15},{2,7,11,12,13,15},{2,7,11,12,14},{2,7,11,12,14,15},{2,7,11,12,15},{2,7,11,13},{2,7,11,13,14},{2,7,11,13,14,15},{2,7,11,13,15},{2,7,11,14},{2,7,11,14,15},{2,7,11,15},{2,7,12},{2,7,12,13},{2,7,12,13,14},{2,7,12,13,14,15},{2,7,12,13,15},{2,7,12,14},{2,7,12,14,15},{2,7,12,15},{2,7,13},{2,7,13,14},{2,7,13,14,15},{2,7,13,15},{2,7,14},{2,7,14,15},{2,7,15},{2,8},{2,8,9},{2,8,9,10},{2,8,9,10,11},{2,8,9,10,11,12},{2,8,9,10,11,12,13},{2,8,9,10,11,12,13,14},{2,8,9,10,11,12,13,14,15},{2,8,9,10,11,12,13,15},{2,8,9,10,11,12,14},{2,8,9,10,11,12,14,15},{2,8,9,10,11,12,15},{2,8,9,10,11,13},{2,8,9,10,11,13,14},{2,8,9,10,11,13,14,15},{2,8,9,10,11,13,15},{2,8,9,10,11,14},{2,8,9,10,11,14,15},{2,8,9,10,11,15},{2,8,9,10,12},{2,8,9,10,12,13},{2,8,9,10,12,13,14},{2,8,9,10,12,13,14,15},{2,8,9,10,12,13,15},{2,8,9,10,12,14},{2,8,9,10,12,14,15},{2,8,9,10,12,15},{2,8,9,10,13},{2,8,9,10,13,14},{2,8,9,10,13,14,15},{2,8,9,10,13,15},{2,8,9,10,14},{2,8,9,10,14,15},{2,8,9,10,15},{2,8,9,11},{2,8,9,11,12},{2,8,9,11,12,13},{2,8,9,11,12,13,14},{2,8,9,11,12,13,14,15},{2,8,9,11,12,13,15},{2,8,9,11,12,14},{2,8,9,11,12,14,15},{2,8,9,11,12,15},{2,8,9,11,13},{2,8,9,11,13,14},{2,8,9,11,13,14,15},{2,8,9,11,13,15},{2,8,9,11,14},{2,8,9,11,14,15},{2,8,9,11,15},{2,8,9,12},{2,8,9,12,13},{2,8,9,12,13,14},{2,8,9,12,13,14,15},{2,8,9,12,13,15},{2,8,9,12,14},{2,8,9,12,14,15},{2,8,9,12,15},{2,8,9,13},{2,8,9,13,14},{2,8,9,13,14,15},{2,8,9,13,15},{2,8,9,14},{2,8,9,14,15},{2,8,9,15},{2,8,10},{2,8,10,11},{2,8,10,11,12},{2,8,10,11,12,13},{2,8,10,11,12,13,14},{2,8,10,11,12,13,14,15},{2,8,10,11,12,13,15},{2,8,10,11,12,14},{2,8,10,11,12,14,15},{2,8,10,11,12,15},{2,8,10,11,13},{2,8,10,11,13,14},{2,8,10,11,13,14,15},{2,8,10,11,13,15},{2,8,10,11,14},{2,8,10,11,14,15},{2,8,10,11,15},{2,8,10,12},{2,8,10,12,13},{2,8,10,12,13,14},{2,8,10,12,13,14,15},{2,8,10,12,13,15},{2,8,10,12,14},{2,8,10,12,14,15},{2,8,10,12,15},{2,8,10,13},{2,8,10,13,14},{2,8,10,13,14,15},{2,8,10,13,15},{2,8,10,14},{2,8,10,14,15},{2,8,10,15},{2,8,11},{2,8,11,12},{2,8,11,12,13},{2,8,11,12,13,14},{2,8,11,12,13,14,15},{2,8,11,12,13,15},{2,8,11,12,14},{2,8,11,12,14,15},{2,8,11,12,15},{2,8,11,13},{2,8,11,13,14},{2,8,11,13,14,15},{2,8,11,13,15},{2,8,11,14},{2,8,11,14,15},{2,8,11,15},{2,8,12},{2,8,12,13},{2,8,12,13,14},{2,8,12,13,14,15},{2,8,12,13,15},{2,8,12,14},{2,8,12,14,15},{2,8,12,15},{2,8,13},{2,8,13,14},{2,8,13,14,15},{2,8,13,15},{2,8,14},{2,8,14,15},{2,8,15},{2,9},{2,9,10},{2,9,10,11},{2,9,10,11,12},{2,9,10,11,12,13},{2,9,10,11,12,13,14},{2,9,10,11,12,13,14,15},{2,9,10,11,12,13,15},{2,9,10,11,12,14},{2,9,10,11,12,14,15},{2,9,10,11,12,15},{2,9,10,11,13},{2,9,10,11,13,14},{2,9,10,11,13,14,15},{2,9,10,11,13,15},{2,9,10,11,14},{2,9,10,11,14,15},{2,9,10,11,15},{2,9,10,12},{2,9,10,12,13},{2,9,10,12,13,14},{2,9,10,12,13,14,15},{2,9,10,12,13,15},{2,9,10,12,14},{2,9,10,12,14,15},{2,9,10,12,15},{2,9,10,13},{2,9,10,13,14},{2,9,10,13,14,15},{2,9,10,13,15},{2,9,10,14},{2,9,10,14,15},{2,9,10,15},{2,9,11},{2,9,11,12},{2,9,11,12,13},{2,9,11,12,13,14},{2,9,11,12,13,14,15},{2,9,11,12,13,15},{2,9,11,12,14},{2,9,11,12,14,15},{2,9,11,12,15},{2,9,11,13},{2,9,11,13,14},{2,9,11,13,14,15},{2,9,11,13,15},{2,9,11,14},{2,9,11,14,15},{2,9,11,15},{2,9,12},{2,9,12,13},{2,9,12,13,14},{2,9,12,13,14,15},{2,9,12,13,15},{2,9,12,14},{2,9,12,14,15},{2,9,12,15},{2,9,13},{2,9,13,14},{2,9,13,14,15},{2,9,13,15},{2,9,14},{2,9,14,15},{2,9,15},{2,10},{2,10,11},{2,10,11,12},{2,10,11,12,13},{2,10,11,12,13,14},{2,10,11,12,13,14,15},{2,10,11,12,13,15},{2,10,11,12,14},{2,10,11,12,14,15},{2,10,11,12,15},{2,10,11,13},{2,10,11,13,14},{2,10,11,13,14,15},{2,10,11,13,15},{2,10,11,14},{2,10,11,14,15},{2,10,11,15},{2,10,12},{2,10,12,13},{2,10,12,13,14},{2,10,12,13,14,15},{2,10,12,13,15},{2,10,12,14},{2,10,12,14,15},{2,10,12,15},{2,10,13},{2,10,13,14},{2,10,13,14,15},{2,10,13,15},{2,10,14},{2,10,14,15},{2,10,15},{2,11},{2,11,12},{2,11,12,13},{2,11,12,13,14},{2,11,12,13,14,15},{2,11,12,13,15},{2,11,12,14},{2,11,12,14,15},{2,11,12,15},{2,11,13},{2,11,13,14},{2,11,13,14,15},{2,11,13,15},{2,11,14},{2,11,14,15},{2,11,15},{2,12},{2,12,13},{2,12,13,14},{2,12,13,14,15},{2,12,13,15},{2,12,14},{2,12,14,15},{2,12,15},{2,13},{2,13,14},{2,13,14,15},{2,13,15},{2,14},{2,14,15},{2,15},{3,4},{3,4,5},{3,4,5,6},{3,4,5,6,7},{3,4,5,6,7,8},{3,4,5,6,7,8,9},{3,4,5,6,7,8,9,10},{3,4,5,6,7,8,9,10,11},{3,4,5,6,7,8,9,10,11,12},{3,4,5,6,7,8,9,10,11,12,13},{3,4,5,6,7,8,9,10,11,12,13,14},{3,4,5,6,7,8,9,10,11,12,13,14,15},{3,4,5,6,7,8,9,10,11,12,13,15},{3,4,5,6,7,8,9,10,11,12,14},{3,4,5,6,7,8,9,10,11,12,14,15},{3,4,5,6,7,8,9,10,11,12,15},{3,4,5,6,7,8,9,10,11,13},{3,4,5,6,7,8,9,10,11,13,14},{3,4,5,6,7,8,9,10,11,13,14,15},{3,4,5,6,7,8,9,10,11,13,15},{3,4,5,6,7,8,9,10,11,14},{3,4,5,6,7,8,9,10,11,14,15},{3,4,5,6,7,8,9,10,11,15},{3,4,5,6,7,8,9,10,12},{3,4,5,6,7,8,9,10,12,13},{3,4,5,6,7,8,9,10,12,13,14},{3,4,5,6,7,8,9,10,12,13,14,15},{3,4,5,6,7,8,9,10,12,13,15},{3,4,5,6,7,8,9,10,12,14},{3,4,5,6,7,8,9,10,12,14,15},{3,4,5,6,7,8,9,10,12,15},{3,4,5,6,7,8,9,10,13},{3,4,5,6,7,8,9,10,13,14},{3,4,5,6,7,8,9,10,13,14,15},{3,4,5,6,7,8,9,10,13,15},{3,4,5,6,7,8,9,10,14},{3,4,5,6,7,8,9,10,14,15},{3,4,5,6,7,8,9,10,15},{3,4,5,6,7,8,9,11},{3,4,5,6,7,8,9,11,12},{3,4,5,6,7,8,9,11,12,13},{3,4,5,6,7,8,9,11,12,13,14},{3,4,5,6,7,8,9,11,12,13,14,15},{3,4,5,6,7,8,9,11,12,13,15},{3,4,5,6,7,8,9,11,12,14},{3,4,5,6,7,8,9,11,12,14,15},{3,4,5,6,7,8,9,11,12,15},{3,4,5,6,7,8,9,11,13},{3,4,5,6,7,8,9,11,13,14},{3,4,5,6,7,8,9,11,13,14,15},{3,4,5,6,7,8,9,11,13,15},{3,4,5,6,7,8,9,11,14},{3,4,5,6,7,8,9,11,14,15},{3,4,5,6,7,8,9,11,15},{3,4,5,6,7,8,9,12},{3,4,5,6,7,8,9,12,13},{3,4,5,6,7,8,9,12,13,14},{3,4,5,6,7,8,9,12,13,14,15},{3,4,5,6,7,8,9,12,13,15},{3,4,5,6,7,8,9,12,14},{3,4,5,6,7,8,9,12,14,15},{3,4,5,6,7,8,9,12,15},{3,4,5,6,7,8,9,13},{3,4,5,6,7,8,9,13,14},{3,4,5,6,7,8,9,13,14,15},{3,4,5,6,7,8,9,13,15},{3,4,5,6,7,8,9,14},{3,4,5,6,7,8,9,14,15},{3,4,5,6,7,8,9,15},{3,4,5,6,7,8,10},{3,4,5,6,7,8,10,11},{3,4,5,6,7,8,10,11,12},{3,4,5,6,7,8,10,11,12,13},{3,4,5,6,7,8,10,11,12,13,14},{3,4,5,6,7,8,10,11,12,13,14,15},{3,4,5,6,7,8,10,11,12,13,15},{3,4,5,6,7,8,10,11,12,14},{3,4,5,6,7,8,10,11,12,14,15},{3,4,5,6,7,8,10,11,12,15},{3,4,5,6,7,8,10,11,13},{3,4,5,6,7,8,10,11,13,14},{3,4,5,6,7,8,10,11,13,14,15},{3,4,5,6,7,8,10,11,13,15},{3,4,5,6,7,8,10,11,14},{3,4,5,6,7,8,10,11,14,15},{3,4,5,6,7,8,10,11,15},{3,4,5,6,7,8,10,12},{3,4,5,6,7,8,10,12,13},{3,4,5,6,7,8,10,12,13,14},{3,4,5,6,7,8,10,12,13,14,15},{3,4,5,6,7,8,10,12,13,15},{3,4,5,6,7,8,10,12,14},{3,4,5,6,7,8,10,12,14,15},{3,4,5,6,7,8,10,12,15},{3,4,5,6,7,8,10,13},{3,4,5,6,7,8,10,13,14},{3,4,5,6,7,8,10,13,14,15},{3,4,5,6,7,8,10,13,15},{3,4,5,6,7,8,10,14},{3,4,5,6,7,8,10,14,15},{3,4,5,6,7,8,10,15},{3,4,5,6,7,8,11},{3,4,5,6,7,8,11,12},{3,4,5,6,7,8,11,12,13},{3,4,5,6,7,8,11,12,13,14},{3,4,5,6,7,8,11,12,13,14,15},{3,4,5,6,7,8,11,12,13,15},{3,4,5,6,7,8,11,12,14},{3,4,5,6,7,8,11,12,14,15},{3,4,5,6,7,8,11,12,15},{3,4,5,6,7,8,11,13},{3,4,5,6,7,8,11,13,14},{3,4,5,6,7,8,11,13,14,15},{3,4,5,6,7,8,11,13,15},{3,4,5,6,7,8,11,14},{3,4,5,6,7,8,11,14,15},{3,4,5,6,7,8,11,15},{3,4,5,6,7,8,12},{3,4,5,6,7,8,12,13},{3,4,5,6,7,8,12,13,14},{3,4,5,6,7,8,12,13,14,15},{3,4,5,6,7,8,12,13,15},{3,4,5,6,7,8,12,14},{3,4,5,6,7,8,12,14,15},{3,4,5,6,7,8,12,15},{3,4,5,6,7,8,13},{3,4,5,6,7,8,13,14},{3,4,5,6,7,8,13,14,15},{3,4,5,6,7,8,13,15},{3,4,5,6,7,8,14},{3,4,5,6,7,8,14,15},{3,4,5,6,7,8,15},{3,4,5,6,7,9},{3,4,5,6,7,9,10},{3,4,5,6,7,9,10,11},{3,4,5,6,7,9,10,11,12},{3,4,5,6,7,9,10,11,12,13},{3,4,5,6,7,9,10,11,12,13,14},{3,4,5,6,7,9,10,11,12,13,14,15},{3,4,5,6,7,9,10,11,12,13,15},{3,4,5,6,7,9,10,11,12,14},{3,4,5,6,7,9,10,11,12,14,15},{3,4,5,6,7,9,10,11,12,15},{3,4,5,6,7,9,10,11,13},{3,4,5,6,7,9,10,11,13,14},{3,4,5,6,7,9,10,11,13,14,15},{3,4,5,6,7,9,10,11,13,15},{3,4,5,6,7,9,10,11,14},{3,4,5,6,7,9,10,11,14,15},{3,4,5,6,7,9,10,11,15},{3,4,5,6,7,9,10,12},{3,4,5,6,7,9,10,12,13},{3,4,5,6,7,9,10,12,13,14},{3,4,5,6,7,9,10,12,13,14,15},{3,4,5,6,7,9,10,12,13,15},{3,4,5,6,7,9,10,12,14},{3,4,5,6,7,9,10,12,14,15},{3,4,5,6,7,9,10,12,15},{3,4,5,6,7,9,10,13},{3,4,5,6,7,9,10,13,14},{3,4,5,6,7,9,10,13,14,15},{3,4,5,6,7,9,10,13,15},{3,4,5,6,7,9,10,14},{3,4,5,6,7,9,10,14,15},{3,4,5,6,7,9,10,15},{3,4,5,6,7,9,11},{3,4,5,6,7,9,11,12},{3,4,5,6,7,9,11,12,13},{3,4,5,6,7,9,11,12,13,14},{3,4,5,6,7,9,11,12,13,14,15},{3,4,5,6,7,9,11,12,13,15},{3,4,5,6,7,9,11,12,14},{3,4,5,6,7,9,11,12,14,15},{3,4,5,6,7,9,11,12,15},{3,4,5,6,7,9,11,13},{3,4,5,6,7,9,11,13,14},{3,4,5,6,7,9,11,13,14,15},{3,4,5,6,7,9,11,13,15},{3,4,5,6,7,9,11,14},{3,4,5,6,7,9,11,14,15},{3,4,5,6,7,9,11,15},{3,4,5,6,7,9,12},{3,4,5,6,7,9,12,13},{3,4,5,6,7,9,12,13,14},{3,4,5,6,7,9,12,13,14,15},{3,4,5,6,7,9,12,13,15},{3,4,5,6,7,9,12,14},{3,4,5,6,7,9,12,14,15},{3,4,5,6,7,9,12,15},{3,4,5,6,7,9,13},{3,4,5,6,7,9,13,14},{3,4,5,6,7,9,13,14,15},{3,4,5,6,7,9,13,15},{3,4,5,6,7,9,14},{3,4,5,6,7,9,14,15},{3,4,5,6,7,9,15},{3,4,5,6,7,10},{3,4,5,6,7,10,11},{3,4,5,6,7,10,11,12},{3,4,5,6,7,10,11,12,13},{3,4,5,6,7,10,11,12,13,14},{3,4,5,6,7,10,11,12,13,14,15},{3,4,5,6,7,10,11,12,13,15},{3,4,5,6,7,10,11,12,14},{3,4,5,6,7,10,11,12,14,15},{3,4,5,6,7,10,11,12,15},{3,4,5,6,7,10,11,13},{3,4,5,6,7,10,11,13,14},{3,4,5,6,7,10,11,13,14,15},{3,4,5,6,7,10,11,13,15},{3,4,5,6,7,10,11,14},{3,4,5,6,7,10,11,14,15},{3,4,5,6,7,10,11,15},{3,4,5,6,7,10,12},{3,4,5,6,7,10,12,13},{3,4,5,6,7,10,12,13,14},{3,4,5,6,7,10,12,13,14,15},{3,4,5,6,7,10,12,13,15},{3,4,5,6,7,10,12,14},{3,4,5,6,7,10,12,14,15},{3,4,5,6,7,10,12,15},{3,4,5,6,7,10,13},{3,4,5,6,7,10,13,14},{3,4,5,6,7,10,13,14,15},{3,4,5,6,7,10,13,15},{3,4,5,6,7,10,14},{3,4,5,6,7,10,14,15},{3,4,5,6,7,10,15},{3,4,5,6,7,11},{3,4,5,6,7,11,12},{3,4,5,6,7,11,12,13},{3,4,5,6,7,11,12,13,14},{3,4,5,6,7,11,12,13,14,15},{3,4,5,6,7,11,12,13,15},{3,4,5,6,7,11,12,14},{3,4,5,6,7,11,12,14,15},{3,4,5,6,7,11,12,15},{3,4,5,6,7,11,13},{3,4,5,6,7,11,13,14},{3,4,5,6,7,11,13,14,15},{3,4,5,6,7,11,13,15},{3,4,5,6,7,11,14},{3,4,5,6,7,11,14,15},{3,4,5,6,7,11,15},{3,4,5,6,7,12},{3,4,5,6,7,12,13},{3,4,5,6,7,12,13,14},{3,4,5,6,7,12,13,14,15},{3,4,5,6,7,12,13,15},{3,4,5,6,7,12,14},{3,4,5,6,7,12,14,15},{3,4,5,6,7,12,15},{3,4,5,6,7,13},{3,4,5,6,7,13,14},{3,4,5,6,7,13,14,15},{3,4,5,6,7,13,15},{3,4,5,6,7,14},{3,4,5,6,7,14,15},{3,4,5,6,7,15},{3,4,5,6,8},{3,4,5,6,8,9},{3,4,5,6,8,9,10},{3,4,5,6,8,9,10,11},{3,4,5,6,8,9,10,11,12},{3,4,5,6,8,9,10,11,12,13},{3,4,5,6,8,9,10,11,12,13,14},{3,4,5,6,8,9,10,11,12,13,14,15},{3,4,5,6,8,9,10,11,12,13,15},{3,4,5,6,8,9,10,11,12,14},{3,4,5,6,8,9,10,11,12,14,15},{3,4,5,6,8,9,10,11,12,15},{3,4,5,6,8,9,10,11,13},{3,4,5,6,8,9,10,11,13,14},{3,4,5,6,8,9,10,11,13,14,15},{3,4,5,6,8,9,10,11,13,15},{3,4,5,6,8,9,10,11,14},{3,4,5,6,8,9,10,11,14,15},{3,4,5,6,8,9,10,11,15},{3,4,5,6,8,9,10,12},{3,4,5,6,8,9,10,12,13},{3,4,5,6,8,9,10,12,13,14},{3,4,5,6,8,9,10,12,13,14,15},{3,4,5,6,8,9,10,12,13,15},{3,4,5,6,8,9,10,12,14},{3,4,5,6,8,9,10,12,14,15},{3,4,5,6,8,9,10,12,15},{3,4,5,6,8,9,10,13},{3,4,5,6,8,9,10,13,14},{3,4,5,6,8,9,10,13,14,15},{3,4,5,6,8,9,10,13,15},{3,4,5,6,8,9,10,14},{3,4,5,6,8,9,10,14,15},{3,4,5,6,8,9,10,15},{3,4,5,6,8,9,11},{3,4,5,6,8,9,11,12},{3,4,5,6,8,9,11,12,13},{3,4,5,6,8,9,11,12,13,14},{3,4,5,6,8,9,11,12,13,14,15},{3,4,5,6,8,9,11,12,13,15},{3,4,5,6,8,9,11,12,14},{3,4,5,6,8,9,11,12,14,15},{3,4,5,6,8,9,11,12,15},{3,4,5,6,8,9,11,13},{3,4,5,6,8,9,11,13,14},{3,4,5,6,8,9,11,13,14,15},{3,4,5,6,8,9,11,13,15},{3,4,5,6,8,9,11,14},{3,4,5,6,8,9,11,14,15},{3,4,5,6,8,9,11,15},{3,4,5,6,8,9,12},{3,4,5,6,8,9,12,13},{3,4,5,6,8,9,12,13,14},{3,4,5,6,8,9,12,13,14,15},{3,4,5,6,8,9,12,13,15},{3,4,5,6,8,9,12,14},{3,4,5,6,8,9,12,14,15},{3,4,5,6,8,9,12,15},{3,4,5,6,8,9,13},{3,4,5,6,8,9,13,14},{3,4,5,6,8,9,13,14,15},{3,4,5,6,8,9,13,15},{3,4,5,6,8,9,14},{3,4,5,6,8,9,14,15},{3,4,5,6,8,9,15},{3,4,5,6,8,10},{3,4,5,6,8,10,11},{3,4,5,6,8,10,11,12},{3,4,5,6,8,10,11,12,13},{3,4,5,6,8,10,11,12,13,14},{3,4,5,6,8,10,11,12,13,14,15},{3,4,5,6,8,10,11,12,13,15},{3,4,5,6,8,10,11,12,14},{3,4,5,6,8,10,11,12,14,15},{3,4,5,6,8,10,11,12,15},{3,4,5,6,8,10,11,13},{3,4,5,6,8,10,11,13,14},{3,4,5,6,8,10,11,13,14,15},{3,4,5,6,8,10,11,13,15},{3,4,5,6,8,10,11,14},{3,4,5,6,8,10,11,14,15},{3,4,5,6,8,10,11,15},{3,4,5,6,8,10,12},{3,4,5,6,8,10,12,13},{3,4,5,6,8,10,12,13,14},{3,4,5,6,8,10,12,13,14,15},{3,4,5,6,8,10,12,13,15},{3,4,5,6,8,10,12,14},{3,4,5,6,8,10,12,14,15},{3,4,5,6,8,10,12,15},{3,4,5,6,8,10,13},{3,4,5,6,8,10,13,14},{3,4,5,6,8,10,13,14,15},{3,4,5,6,8,10,13,15},{3,4,5,6,8,10,14},{3,4,5,6,8,10,14,15},{3,4,5,6,8,10,15},{3,4,5,6,8,11},{3,4,5,6,8,11,12},{3,4,5,6,8,11,12,13},{3,4,5,6,8,11,12,13,14},{3,4,5,6,8,11,12,13,14,15},{3,4,5,6,8,11,12,13,15},{3,4,5,6,8,11,12,14},{3,4,5,6,8,11,12,14,15},{3,4,5,6,8,11,12,15},{3,4,5,6,8,11,13},{3,4,5,6,8,11,13,14},{3,4,5,6,8,11,13,14,15},{3,4,5,6,8,11,13,15},{3,4,5,6,8,11,14},{3,4,5,6,8,11,14,15},{3,4,5,6,8,11,15},{3,4,5,6,8,12},{3,4,5,6,8,12,13},{3,4,5,6,8,12,13,14},{3,4,5,6,8,12,13,14,15},{3,4,5,6,8,12,13,15},{3,4,5,6,8,12,14},{3,4,5,6,8,12,14,15},{3,4,5,6,8,12,15},{3,4,5,6,8,13},{3,4,5,6,8,13,14},{3,4,5,6,8,13,14,15},{3,4,5,6,8,13,15},{3,4,5,6,8,14},{3,4,5,6,8,14,15},{3,4,5,6,8,15},{3,4,5,6,9},{3,4,5,6,9,10},{3,4,5,6,9,10,11},{3,4,5,6,9,10,11,12},{3,4,5,6,9,10,11,12,13},{3,4,5,6,9,10,11,12,13,14},{3,4,5,6,9,10,11,12,13,14,15},{3,4,5,6,9,10,11,12,13,15},{3,4,5,6,9,10,11,12,14},{3,4,5,6,9,10,11,12,14,15},{3,4,5,6,9,10,11,12,15},{3,4,5,6,9,10,11,13},{3,4,5,6,9,10,11,13,14},{3,4,5,6,9,10,11,13,14,15},{3,4,5,6,9,10,11,13,15},{3,4,5,6,9,10,11,14},{3,4,5,6,9,10,11,14,15},{3,4,5,6,9,10,11,15},{3,4,5,6,9,10,12},{3,4,5,6,9,10,12,13},{3,4,5,6,9,10,12,13,14},{3,4,5,6,9,10,12,13,14,15},{3,4,5,6,9,10,12,13,15},{3,4,5,6,9,10,12,14},{3,4,5,6,9,10,12,14,15},{3,4,5,6,9,10,12,15},{3,4,5,6,9,10,13},{3,4,5,6,9,10,13,14},{3,4,5,6,9,10,13,14,15},{3,4,5,6,9,10,13,15},{3,4,5,6,9,10,14},{3,4,5,6,9,10,14,15},{3,4,5,6,9,10,15},{3,4,5,6,9,11},{3,4,5,6,9,11,12},{3,4,5,6,9,11,12,13},{3,4,5,6,9,11,12,13,14},{3,4,5,6,9,11,12,13,14,15},{3,4,5,6,9,11,12,13,15},{3,4,5,6,9,11,12,14},{3,4,5,6,9,11,12,14,15},{3,4,5,6,9,11,12,15},{3,4,5,6,9,11,13},{3,4,5,6,9,11,13,14},{3,4,5,6,9,11,13,14,15},{3,4,5,6,9,11,13,15},{3,4,5,6,9,11,14},{3,4,5,6,9,11,14,15},{3,4,5,6,9,11,15},{3,4,5,6,9,12},{3,4,5,6,9,12,13},{3,4,5,6,9,12,13,14},{3,4,5,6,9,12,13,14,15},{3,4,5,6,9,12,13,15},{3,4,5,6,9,12,14},{3,4,5,6,9,12,14,15},{3,4,5,6,9,12,15},{3,4,5,6,9,13},{3,4,5,6,9,13,14},{3,4,5,6,9,13,14,15},{3,4,5,6,9,13,15},{3,4,5,6,9,14},{3,4,5,6,9,14,15},{3,4,5,6,9,15},{3,4,5,6,10},{3,4,5,6,10,11},{3,4,5,6,10,11,12},{3,4,5,6,10,11,12,13},{3,4,5,6,10,11,12,13,14},{3,4,5,6,10,11,12,13,14,15},{3,4,5,6,10,11,12,13,15},{3,4,5,6,10,11,12,14},{3,4,5,6,10,11,12,14,15},{3,4,5,6,10,11,12,15},{3,4,5,6,10,11,13},{3,4,5,6,10,11,13,14},{3,4,5,6,10,11,13,14,15},{3,4,5,6,10,11,13,15},{3,4,5,6,10,11,14},{3,4,5,6,10,11,14,15},{3,4,5,6,10,11,15},{3,4,5,6,10,12},{3,4,5,6,10,12,13},{3,4,5,6,10,12,13,14},{3,4,5,6,10,12,13,14,15},{3,4,5,6,10,12,13,15},{3,4,5,6,10,12,14},{3,4,5,6,10,12,14,15},{3,4,5,6,10,12,15},{3,4,5,6,10,13},{3,4,5,6,10,13,14},{3,4,5,6,10,13,14,15},{3,4,5,6,10,13,15},{3,4,5,6,10,14},{3,4,5,6,10,14,15},{3,4,5,6,10,15},{3,4,5,6,11},{3,4,5,6,11,12},{3,4,5,6,11,12,13},{3,4,5,6,11,12,13,14},{3,4,5,6,11,12,13,14,15},{3,4,5,6,11,12,13,15},{3,4,5,6,11,12,14},{3,4,5,6,11,12,14,15},{3,4,5,6,11,12,15},{3,4,5,6,11,13},{3,4,5,6,11,13,14},{3,4,5,6,11,13,14,15},{3,4,5,6,11,13,15},{3,4,5,6,11,14},{3,4,5,6,11,14,15},{3,4,5,6,11,15},{3,4,5,6,12},{3,4,5,6,12,13},{3,4,5,6,12,13,14},{3,4,5,6,12,13,14,15},{3,4,5,6,12,13,15},{3,4,5,6,12,14},{3,4,5,6,12,14,15},{3,4,5,6,12,15},{3,4,5,6,13},{3,4,5,6,13,14},{3,4,5,6,13,14,15},{3,4,5,6,13,15},{3,4,5,6,14},{3,4,5,6,14,15},{3,4,5,6,15},{3,4,5,7},{3,4,5,7,8},{3,4,5,7,8,9},{3,4,5,7,8,9,10},{3,4,5,7,8,9,10,11},{3,4,5,7,8,9,10,11,12},{3,4,5,7,8,9,10,11,12,13},{3,4,5,7,8,9,10,11,12,13,14},{3,4,5,7,8,9,10,11,12,13,14,15},{3,4,5,7,8,9,10,11,12,13,15},{3,4,5,7,8,9,10,11,12,14},{3,4,5,7,8,9,10,11,12,14,15},{3,4,5,7,8,9,10,11,12,15},{3,4,5,7,8,9,10,11,13},{3,4,5,7,8,9,10,11,13,14},{3,4,5,7,8,9,10,11,13,14,15},{3,4,5,7,8,9,10,11,13,15},{3,4,5,7,8,9,10,11,14},{3,4,5,7,8,9,10,11,14,15},{3,4,5,7,8,9,10,11,15},{3,4,5,7,8,9,10,12},{3,4,5,7,8,9,10,12,13},{3,4,5,7,8,9,10,12,13,14},{3,4,5,7,8,9,10,12,13,14,15},{3,4,5,7,8,9,10,12,13,15},{3,4,5,7,8,9,10,12,14},{3,4,5,7,8,9,10,12,14,15},{3,4,5,7,8,9,10,12,15},{3,4,5,7,8,9,10,13},{3,4,5,7,8,9,10,13,14},{3,4,5,7,8,9,10,13,14,15},{3,4,5,7,8,9,10,13,15},{3,4,5,7,8,9,10,14},{3,4,5,7,8,9,10,14,15},{3,4,5,7,8,9,10,15},{3,4,5,7,8,9,11},{3,4,5,7,8,9,11,12},{3,4,5,7,8,9,11,12,13},{3,4,5,7,8,9,11,12,13,14},{3,4,5,7,8,9,11,12,13,14,15},{3,4,5,7,8,9,11,12,13,15},{3,4,5,7,8,9,11,12,14},{3,4,5,7,8,9,11,12,14,15},{3,4,5,7,8,9,11,12,15},{3,4,5,7,8,9,11,13},{3,4,5,7,8,9,11,13,14},{3,4,5,7,8,9,11,13,14,15},{3,4,5,7,8,9,11,13,15},{3,4,5,7,8,9,11,14},{3,4,5,7,8,9,11,14,15},{3,4,5,7,8,9,11,15},{3,4,5,7,8,9,12},{3,4,5,7,8,9,12,13},{3,4,5,7,8,9,12,13,14},{3,4,5,7,8,9,12,13,14,15},{3,4,5,7,8,9,12,13,15},{3,4,5,7,8,9,12,14},{3,4,5,7,8,9,12,14,15},{3,4,5,7,8,9,12,15},{3,4,5,7,8,9,13},{3,4,5,7,8,9,13,14},{3,4,5,7,8,9,13,14,15},{3,4,5,7,8,9,13,15},{3,4,5,7,8,9,14},{3,4,5,7,8,9,14,15},{3,4,5,7,8,9,15},{3,4,5,7,8,10},{3,4,5,7,8,10,11},{3,4,5,7,8,10,11,12},{3,4,5,7,8,10,11,12,13},{3,4,5,7,8,10,11,12,13,14},{3,4,5,7,8,10,11,12,13,14,15},{3,4,5,7,8,10,11,12,13,15},{3,4,5,7,8,10,11,12,14},{3,4,5,7,8,10,11,12,14,15},{3,4,5,7,8,10,11,12,15},{3,4,5,7,8,10,11,13},{3,4,5,7,8,10,11,13,14},{3,4,5,7,8,10,11,13,14,15},{3,4,5,7,8,10,11,13,15},{3,4,5,7,8,10,11,14},{3,4,5,7,8,10,11,14,15},{3,4,5,7,8,10,11,15},{3,4,5,7,8,10,12},{3,4,5,7,8,10,12,13},{3,4,5,7,8,10,12,13,14},{3,4,5,7,8,10,12,13,14,15},{3,4,5,7,8,10,12,13,15},{3,4,5,7,8,10,12,14},{3,4,5,7,8,10,12,14,15},{3,4,5,7,8,10,12,15},{3,4,5,7,8,10,13},{3,4,5,7,8,10,13,14},{3,4,5,7,8,10,13,14,15},{3,4,5,7,8,10,13,15},{3,4,5,7,8,10,14},{3,4,5,7,8,10,14,15},{3,4,5,7,8,10,15},{3,4,5,7,8,11},{3,4,5,7,8,11,12},{3,4,5,7,8,11,12,13},{3,4,5,7,8,11,12,13,14},{3,4,5,7,8,11,12,13,14,15},{3,4,5,7,8,11,12,13,15},{3,4,5,7,8,11,12,14},{3,4,5,7,8,11,12,14,15},{3,4,5,7,8,11,12,15},{3,4,5,7,8,11,13},{3,4,5,7,8,11,13,14},{3,4,5,7,8,11,13,14,15},{3,4,5,7,8,11,13,15},{3,4,5,7,8,11,14},{3,4,5,7,8,11,14,15},{3,4,5,7,8,11,15},{3,4,5,7,8,12},{3,4,5,7,8,12,13},{3,4,5,7,8,12,13,14},{3,4,5,7,8,12,13,14,15},{3,4,5,7,8,12,13,15},{3,4,5,7,8,12,14},{3,4,5,7,8,12,14,15},{3,4,5,7,8,12,15},{3,4,5,7,8,13},{3,4,5,7,8,13,14},{3,4,5,7,8,13,14,15},{3,4,5,7,8,13,15},{3,4,5,7,8,14},{3,4,5,7,8,14,15},{3,4,5,7,8,15},{3,4,5,7,9},{3,4,5,7,9,10},{3,4,5,7,9,10,11},{3,4,5,7,9,10,11,12},{3,4,5,7,9,10,11,12,13},{3,4,5,7,9,10,11,12,13,14},{3,4,5,7,9,10,11,12,13,14,15},{3,4,5,7,9,10,11,12,13,15},{3,4,5,7,9,10,11,12,14},{3,4,5,7,9,10,11,12,14,15},{3,4,5,7,9,10,11,12,15},{3,4,5,7,9,10,11,13},{3,4,5,7,9,10,11,13,14},{3,4,5,7,9,10,11,13,14,15},{3,4,5,7,9,10,11,13,15},{3,4,5,7,9,10,11,14},{3,4,5,7,9,10,11,14,15},{3,4,5,7,9,10,11,15},{3,4,5,7,9,10,12},{3,4,5,7,9,10,12,13},{3,4,5,7,9,10,12,13,14},{3,4,5,7,9,10,12,13,14,15},{3,4,5,7,9,10,12,13,15},{3,4,5,7,9,10,12,14},{3,4,5,7,9,10,12,14,15},{3,4,5,7,9,10,12,15},{3,4,5,7,9,10,13},{3,4,5,7,9,10,13,14},{3,4,5,7,9,10,13,14,15},{3,4,5,7,9,10,13,15},{3,4,5,7,9,10,14},{3,4,5,7,9,10,14,15},{3,4,5,7,9,10,15},{3,4,5,7,9,11},{3,4,5,7,9,11,12},{3,4,5,7,9,11,12,13},{3,4,5,7,9,11,12,13,14},{3,4,5,7,9,11,12,13,14,15},{3,4,5,7,9,11,12,13,15},{3,4,5,7,9,11,12,14},{3,4,5,7,9,11,12,14,15},{3,4,5,7,9,11,12,15},{3,4,5,7,9,11,13},{3,4,5,7,9,11,13,14},{3,4,5,7,9,11,13,14,15},{3,4,5,7,9,11,13,15},{3,4,5,7,9,11,14},{3,4,5,7,9,11,14,15},{3,4,5,7,9,11,15},{3,4,5,7,9,12},{3,4,5,7,9,12,13},{3,4,5,7,9,12,13,14},{3,4,5,7,9,12,13,14,15},{3,4,5,7,9,12,13,15},{3,4,5,7,9,12,14},{3,4,5,7,9,12,14,15},{3,4,5,7,9,12,15},{3,4,5,7,9,13},{3,4,5,7,9,13,14},{3,4,5,7,9,13,14,15},{3,4,5,7,9,13,15},{3,4,5,7,9,14},{3,4,5,7,9,14,15},{3,4,5,7,9,15},{3,4,5,7,10},{3,4,5,7,10,11},{3,4,5,7,10,11,12},{3,4,5,7,10,11,12,13},{3,4,5,7,10,11,12,13,14},{3,4,5,7,10,11,12,13,14,15},{3,4,5,7,10,11,12,13,15},{3,4,5,7,10,11,12,14},{3,4,5,7,10,11,12,14,15},{3,4,5,7,10,11,12,15},{3,4,5,7,10,11,13},{3,4,5,7,10,11,13,14},{3,4,5,7,10,11,13,14,15},{3,4,5,7,10,11,13,15},{3,4,5,7,10,11,14},{3,4,5,7,10,11,14,15},{3,4,5,7,10,11,15},{3,4,5,7,10,12},{3,4,5,7,10,12,13},{3,4,5,7,10,12,13,14},{3,4,5,7,10,12,13,14,15},{3,4,5,7,10,12,13,15},{3,4,5,7,10,12,14},{3,4,5,7,10,12,14,15},{3,4,5,7,10,12,15},{3,4,5,7,10,13},{3,4,5,7,10,13,14},{3,4,5,7,10,13,14,15},{3,4,5,7,10,13,15},{3,4,5,7,10,14},{3,4,5,7,10,14,15},{3,4,5,7,10,15},{3,4,5,7,11},{3,4,5,7,11,12},{3,4,5,7,11,12,13},{3,4,5,7,11,12,13,14},{3,4,5,7,11,12,13,14,15},{3,4,5,7,11,12,13,15},{3,4,5,7,11,12,14},{3,4,5,7,11,12,14,15},{3,4,5,7,11,12,15},{3,4,5,7,11,13},{3,4,5,7,11,13,14},{3,4,5,7,11,13,14,15},{3,4,5,7,11,13,15},{3,4,5,7,11,14},{3,4,5,7,11,14,15},{3,4,5,7,11,15},{3,4,5,7,12},{3,4,5,7,12,13},{3,4,5,7,12,13,14},{3,4,5,7,12,13,14,15},{3,4,5,7,12,13,15},{3,4,5,7,12,14},{3,4,5,7,12,14,15},{3,4,5,7,12,15},{3,4,5,7,13},{3,4,5,7,13,14},{3,4,5,7,13,14,15},{3,4,5,7,13,15},{3,4,5,7,14},{3,4,5,7,14,15},{3,4,5,7,15},{3,4,5,8},{3,4,5,8,9},{3,4,5,8,9,10},{3,4,5,8,9,10,11},{3,4,5,8,9,10,11,12},{3,4,5,8,9,10,11,12,13},{3,4,5,8,9,10,11,12,13,14},{3,4,5,8,9,10,11,12,13,14,15},{3,4,5,8,9,10,11,12,13,15},{3,4,5,8,9,10,11,12,14},{3,4,5,8,9,10,11,12,14,15},{3,4,5,8,9,10,11,12,15},{3,4,5,8,9,10,11,13},{3,4,5,8,9,10,11,13,14},{3,4,5,8,9,10,11,13,14,15},{3,4,5,8,9,10,11,13,15},{3,4,5,8,9,10,11,14},{3,4,5,8,9,10,11,14,15},{3,4,5,8,9,10,11,15},{3,4,5,8,9,10,12},{3,4,5,8,9,10,12,13},{3,4,5,8,9,10,12,13,14},{3,4,5,8,9,10,12,13,14,15},{3,4,5,8,9,10,12,13,15},{3,4,5,8,9,10,12,14},{3,4,5,8,9,10,12,14,15},{3,4,5,8,9,10,12,15},{3,4,5,8,9,10,13},{3,4,5,8,9,10,13,14},{3,4,5,8,9,10,13,14,15},{3,4,5,8,9,10,13,15},{3,4,5,8,9,10,14},{3,4,5,8,9,10,14,15},{3,4,5,8,9,10,15},{3,4,5,8,9,11},{3,4,5,8,9,11,12},{3,4,5,8,9,11,12,13},{3,4,5,8,9,11,12,13,14},{3,4,5,8,9,11,12,13,14,15},{3,4,5,8,9,11,12,13,15},{3,4,5,8,9,11,12,14},{3,4,5,8,9,11,12,14,15},{3,4,5,8,9,11,12,15},{3,4,5,8,9,11,13},{3,4,5,8,9,11,13,14},{3,4,5,8,9,11,13,14,15},{3,4,5,8,9,11,13,15},{3,4,5,8,9,11,14},{3,4,5,8,9,11,14,15},{3,4,5,8,9,11,15},{3,4,5,8,9,12},{3,4,5,8,9,12,13},{3,4,5,8,9,12,13,14},{3,4,5,8,9,12,13,14,15},{3,4,5,8,9,12,13,15},{3,4,5,8,9,12,14},{3,4,5,8,9,12,14,15},{3,4,5,8,9,12,15},{3,4,5,8,9,13},{3,4,5,8,9,13,14},{3,4,5,8,9,13,14,15},{3,4,5,8,9,13,15},{3,4,5,8,9,14},{3,4,5,8,9,14,15},{3,4,5,8,9,15},{3,4,5,8,10},{3,4,5,8,10,11},{3,4,5,8,10,11,12},{3,4,5,8,10,11,12,13},{3,4,5,8,10,11,12,13,14},{3,4,5,8,10,11,12,13,14,15},{3,4,5,8,10,11,12,13,15},{3,4,5,8,10,11,12,14},{3,4,5,8,10,11,12,14,15},{3,4,5,8,10,11,12,15},{3,4,5,8,10,11,13},{3,4,5,8,10,11,13,14},{3,4,5,8,10,11,13,14,15},{3,4,5,8,10,11,13,15},{3,4,5,8,10,11,14},{3,4,5,8,10,11,14,15},{3,4,5,8,10,11,15},{3,4,5,8,10,12},{3,4,5,8,10,12,13},{3,4,5,8,10,12,13,14},{3,4,5,8,10,12,13,14,15},{3,4,5,8,10,12,13,15},{3,4,5,8,10,12,14},{3,4,5,8,10,12,14,15},{3,4,5,8,10,12,15},{3,4,5,8,10,13},{3,4,5,8,10,13,14},{3,4,5,8,10,13,14,15},{3,4,5,8,10,13,15},{3,4,5,8,10,14},{3,4,5,8,10,14,15},{3,4,5,8,10,15},{3,4,5,8,11},{3,4,5,8,11,12},{3,4,5,8,11,12,13},{3,4,5,8,11,12,13,14},{3,4,5,8,11,12,13,14,15},{3,4,5,8,11,12,13,15},{3,4,5,8,11,12,14},{3,4,5,8,11,12,14,15},{3,4,5,8,11,12,15},{3,4,5,8,11,13},{3,4,5,8,11,13,14},{3,4,5,8,11,13,14,15},{3,4,5,8,11,13,15},{3,4,5,8,11,14},{3,4,5,8,11,14,15},{3,4,5,8,11,15},{3,4,5,8,12},{3,4,5,8,12,13},{3,4,5,8,12,13,14},{3,4,5,8,12,13,14,15},{3,4,5,8,12,13,15},{3,4,5,8,12,14},{3,4,5,8,12,14,15},{3,4,5,8,12,15},{3,4,5,8,13},{3,4,5,8,13,14},{3,4,5,8,13,14,15},{3,4,5,8,13,15},{3,4,5,8,14},{3,4,5,8,14,15},{3,4,5,8,15},{3,4,5,9},{3,4,5,9,10},{3,4,5,9,10,11},{3,4,5,9,10,11,12},{3,4,5,9,10,11,12,13},{3,4,5,9,10,11,12,13,14},{3,4,5,9,10,11,12,13,14,15},{3,4,5,9,10,11,12,13,15},{3,4,5,9,10,11,12,14},{3,4,5,9,10,11,12,14,15},{3,4,5,9,10,11,12,15},{3,4,5,9,10,11,13},{3,4,5,9,10,11,13,14},{3,4,5,9,10,11,13,14,15},{3,4,5,9,10,11,13,15},{3,4,5,9,10,11,14},{3,4,5,9,10,11,14,15},{3,4,5,9,10,11,15},{3,4,5,9,10,12},{3,4,5,9,10,12,13},{3,4,5,9,10,12,13,14},{3,4,5,9,10,12,13,14,15},{3,4,5,9,10,12,13,15},{3,4,5,9,10,12,14},{3,4,5,9,10,12,14,15},{3,4,5,9,10,12,15},{3,4,5,9,10,13},{3,4,5,9,10,13,14},{3,4,5,9,10,13,14,15},{3,4,5,9,10,13,15},{3,4,5,9,10,14},{3,4,5,9,10,14,15},{3,4,5,9,10,15},{3,4,5,9,11},{3,4,5,9,11,12},{3,4,5,9,11,12,13},{3,4,5,9,11,12,13,14},{3,4,5,9,11,12,13,14,15},{3,4,5,9,11,12,13,15},{3,4,5,9,11,12,14},{3,4,5,9,11,12,14,15},{3,4,5,9,11,12,15},{3,4,5,9,11,13},{3,4,5,9,11,13,14},{3,4,5,9,11,13,14,15},{3,4,5,9,11,13,15},{3,4,5,9,11,14},{3,4,5,9,11,14,15},{3,4,5,9,11,15},{3,4,5,9,12},{3,4,5,9,12,13},{3,4,5,9,12,13,14},{3,4,5,9,12,13,14,15},{3,4,5,9,12,13,15},{3,4,5,9,12,14},{3,4,5,9,12,14,15},{3,4,5,9,12,15},{3,4,5,9,13},{3,4,5,9,13,14},{3,4,5,9,13,14,15},{3,4,5,9,13,15},{3,4,5,9,14},{3,4,5,9,14,15},{3,4,5,9,15},{3,4,5,10},{3,4,5,10,11},{3,4,5,10,11,12},{3,4,5,10,11,12,13},{3,4,5,10,11,12,13,14},{3,4,5,10,11,12,13,14,15},{3,4,5,10,11,12,13,15},{3,4,5,10,11,12,14},{3,4,5,10,11,12,14,15},{3,4,5,10,11,12,15},{3,4,5,10,11,13},{3,4,5,10,11,13,14},{3,4,5,10,11,13,14,15},{3,4,5,10,11,13,15},{3,4,5,10,11,14},{3,4,5,10,11,14,15},{3,4,5,10,11,15},{3,4,5,10,12},{3,4,5,10,12,13},{3,4,5,10,12,13,14},{3,4,5,10,12,13,14,15},{3,4,5,10,12,13,15},{3,4,5,10,12,14},{3,4,5,10,12,14,15},{3,4,5,10,12,15},{3,4,5,10,13},{3,4,5,10,13,14},{3,4,5,10,13,14,15},{3,4,5,10,13,15},{3,4,5,10,14},{3,4,5,10,14,15},{3,4,5,10,15},{3,4,5,11},{3,4,5,11,12},{3,4,5,11,12,13},{3,4,5,11,12,13,14},{3,4,5,11,12,13,14,15},{3,4,5,11,12,13,15},{3,4,5,11,12,14},{3,4,5,11,12,14,15},{3,4,5,11,12,15},{3,4,5,11,13},{3,4,5,11,13,14},{3,4,5,11,13,14,15},{3,4,5,11,13,15},{3,4,5,11,14},{3,4,5,11,14,15},{3,4,5,11,15},{3,4,5,12},{3,4,5,12,13},{3,4,5,12,13,14},{3,4,5,12,13,14,15},{3,4,5,12,13,15},{3,4,5,12,14},{3,4,5,12,14,15},{3,4,5,12,15},{3,4,5,13},{3,4,5,13,14},{3,4,5,13,14,15},{3,4,5,13,15},{3,4,5,14},{3,4,5,14,15},{3,4,5,15},{3,4,6},{3,4,6,7},{3,4,6,7,8},{3,4,6,7,8,9},{3,4,6,7,8,9,10},{3,4,6,7,8,9,10,11},{3,4,6,7,8,9,10,11,12},{3,4,6,7,8,9,10,11,12,13},{3,4,6,7,8,9,10,11,12,13,14},{3,4,6,7,8,9,10,11,12,13,14,15},{3,4,6,7,8,9,10,11,12,13,15},{3,4,6,7,8,9,10,11,12,14},{3,4,6,7,8,9,10,11,12,14,15},{3,4,6,7,8,9,10,11,12,15},{3,4,6,7,8,9,10,11,13},{3,4,6,7,8,9,10,11,13,14},{3,4,6,7,8,9,10,11,13,14,15},{3,4,6,7,8,9,10,11,13,15},{3,4,6,7,8,9,10,11,14},{3,4,6,7,8,9,10,11,14,15},{3,4,6,7,8,9,10,11,15},{3,4,6,7,8,9,10,12},{3,4,6,7,8,9,10,12,13},{3,4,6,7,8,9,10,12,13,14},{3,4,6,7,8,9,10,12,13,14,15},{3,4,6,7,8,9,10,12,13,15},{3,4,6,7,8,9,10,12,14},{3,4,6,7,8,9,10,12,14,15},{3,4,6,7,8,9,10,12,15},{3,4,6,7,8,9,10,13},{3,4,6,7,8,9,10,13,14},{3,4,6,7,8,9,10,13,14,15},{3,4,6,7,8,9,10,13,15},{3,4,6,7,8,9,10,14},{3,4,6,7,8,9,10,14,15},{3,4,6,7,8,9,10,15},{3,4,6,7,8,9,11},{3,4,6,7,8,9,11,12},{3,4,6,7,8,9,11,12,13},{3,4,6,7,8,9,11,12,13,14},{3,4,6,7,8,9,11,12,13,14,15},{3,4,6,7,8,9,11,12,13,15},{3,4,6,7,8,9,11,12,14},{3,4,6,7,8,9,11,12,14,15},{3,4,6,7,8,9,11,12,15},{3,4,6,7,8,9,11,13},{3,4,6,7,8,9,11,13,14},{3,4,6,7,8,9,11,13,14,15},{3,4,6,7,8,9,11,13,15},{3,4,6,7,8,9,11,14},{3,4,6,7,8,9,11,14,15},{3,4,6,7,8,9,11,15},{3,4,6,7,8,9,12},{3,4,6,7,8,9,12,13},{3,4,6,7,8,9,12,13,14},{3,4,6,7,8,9,12,13,14,15},{3,4,6,7,8,9,12,13,15},{3,4,6,7,8,9,12,14},{3,4,6,7,8,9,12,14,15},{3,4,6,7,8,9,12,15},{3,4,6,7,8,9,13},{3,4,6,7,8,9,13,14},{3,4,6,7,8,9,13,14,15},{3,4,6,7,8,9,13,15},{3,4,6,7,8,9,14},{3,4,6,7,8,9,14,15},{3,4,6,7,8,9,15},{3,4,6,7,8,10},{3,4,6,7,8,10,11},{3,4,6,7,8,10,11,12},{3,4,6,7,8,10,11,12,13},{3,4,6,7,8,10,11,12,13,14},{3,4,6,7,8,10,11,12,13,14,15},{3,4,6,7,8,10,11,12,13,15},{3,4,6,7,8,10,11,12,14},{3,4,6,7,8,10,11,12,14,15},{3,4,6,7,8,10,11,12,15},{3,4,6,7,8,10,11,13},{3,4,6,7,8,10,11,13,14},{3,4,6,7,8,10,11,13,14,15},{3,4,6,7,8,10,11,13,15},{3,4,6,7,8,10,11,14},{3,4,6,7,8,10,11,14,15},{3,4,6,7,8,10,11,15},{3,4,6,7,8,10,12},{3,4,6,7,8,10,12,13},{3,4,6,7,8,10,12,13,14},{3,4,6,7,8,10,12,13,14,15},{3,4,6,7,8,10,12,13,15},{3,4,6,7,8,10,12,14},{3,4,6,7,8,10,12,14,15},{3,4,6,7,8,10,12,15},{3,4,6,7,8,10,13},{3,4,6,7,8,10,13,14},{3,4,6,7,8,10,13,14,15},{3,4,6,7,8,10,13,15},{3,4,6,7,8,10,14},{3,4,6,7,8,10,14,15},{3,4,6,7,8,10,15},{3,4,6,7,8,11},{3,4,6,7,8,11,12},{3,4,6,7,8,11,12,13},{3,4,6,7,8,11,12,13,14},{3,4,6,7,8,11,12,13,14,15},{3,4,6,7,8,11,12,13,15},{3,4,6,7,8,11,12,14},{3,4,6,7,8,11,12,14,15},{3,4,6,7,8,11,12,15},{3,4,6,7,8,11,13},{3,4,6,7,8,11,13,14},{3,4,6,7,8,11,13,14,15},{3,4,6,7,8,11,13,15},{3,4,6,7,8,11,14},{3,4,6,7,8,11,14,15},{3,4,6,7,8,11,15},{3,4,6,7,8,12},{3,4,6,7,8,12,13},{3,4,6,7,8,12,13,14},{3,4,6,7,8,12,13,14,15},{3,4,6,7,8,12,13,15},{3,4,6,7,8,12,14},{3,4,6,7,8,12,14,15},{3,4,6,7,8,12,15},{3,4,6,7,8,13},{3,4,6,7,8,13,14},{3,4,6,7,8,13,14,15},{3,4,6,7,8,13,15},{3,4,6,7,8,14},{3,4,6,7,8,14,15},{3,4,6,7,8,15},{3,4,6,7,9},{3,4,6,7,9,10},{3,4,6,7,9,10,11},{3,4,6,7,9,10,11,12},{3,4,6,7,9,10,11,12,13},{3,4,6,7,9,10,11,12,13,14},{3,4,6,7,9,10,11,12,13,14,15},{3,4,6,7,9,10,11,12,13,15},{3,4,6,7,9,10,11,12,14},{3,4,6,7,9,10,11,12,14,15},{3,4,6,7,9,10,11,12,15},{3,4,6,7,9,10,11,13},{3,4,6,7,9,10,11,13,14},{3,4,6,7,9,10,11,13,14,15},{3,4,6,7,9,10,11,13,15},{3,4,6,7,9,10,11,14},{3,4,6,7,9,10,11,14,15},{3,4,6,7,9,10,11,15},{3,4,6,7,9,10,12},{3,4,6,7,9,10,12,13},{3,4,6,7,9,10,12,13,14},{3,4,6,7,9,10,12,13,14,15},{3,4,6,7,9,10,12,13,15},{3,4,6,7,9,10,12,14},{3,4,6,7,9,10,12,14,15},{3,4,6,7,9,10,12,15},{3,4,6,7,9,10,13},{3,4,6,7,9,10,13,14},{3,4,6,7,9,10,13,14,15},{3,4,6,7,9,10,13,15},{3,4,6,7,9,10,14},{3,4,6,7,9,10,14,15},{3,4,6,7,9,10,15},{3,4,6,7,9,11},{3,4,6,7,9,11,12},{3,4,6,7,9,11,12,13},{3,4,6,7,9,11,12,13,14},{3,4,6,7,9,11,12,13,14,15},{3,4,6,7,9,11,12,13,15},{3,4,6,7,9,11,12,14},{3,4,6,7,9,11,12,14,15},{3,4,6,7,9,11,12,15},{3,4,6,7,9,11,13},{3,4,6,7,9,11,13,14},{3,4,6,7,9,11,13,14,15},{3,4,6,7,9,11,13,15},{3,4,6,7,9,11,14},{3,4,6,7,9,11,14,15},{3,4,6,7,9,11,15},{3,4,6,7,9,12},{3,4,6,7,9,12,13},{3,4,6,7,9,12,13,14},{3,4,6,7,9,12,13,14,15},{3,4,6,7,9,12,13,15},{3,4,6,7,9,12,14},{3,4,6,7,9,12,14,15},{3,4,6,7,9,12,15},{3,4,6,7,9,13},{3,4,6,7,9,13,14},{3,4,6,7,9,13,14,15},{3,4,6,7,9,13,15},{3,4,6,7,9,14},{3,4,6,7,9,14,15},{3,4,6,7,9,15},{3,4,6,7,10},{3,4,6,7,10,11},{3,4,6,7,10,11,12},{3,4,6,7,10,11,12,13},{3,4,6,7,10,11,12,13,14},{3,4,6,7,10,11,12,13,14,15},{3,4,6,7,10,11,12,13,15},{3,4,6,7,10,11,12,14},{3,4,6,7,10,11,12,14,15},{3,4,6,7,10,11,12,15},{3,4,6,7,10,11,13},{3,4,6,7,10,11,13,14},{3,4,6,7,10,11,13,14,15},{3,4,6,7,10,11,13,15},{3,4,6,7,10,11,14},{3,4,6,7,10,11,14,15},{3,4,6,7,10,11,15},{3,4,6,7,10,12},{3,4,6,7,10,12,13},{3,4,6,7,10,12,13,14},{3,4,6,7,10,12,13,14,15},{3,4,6,7,10,12,13,15},{3,4,6,7,10,12,14},{3,4,6,7,10,12,14,15},{3,4,6,7,10,12,15},{3,4,6,7,10,13},{3,4,6,7,10,13,14},{3,4,6,7,10,13,14,15},{3,4,6,7,10,13,15},{3,4,6,7,10,14},{3,4,6,7,10,14,15},{3,4,6,7,10,15},{3,4,6,7,11},{3,4,6,7,11,12},{3,4,6,7,11,12,13},{3,4,6,7,11,12,13,14},{3,4,6,7,11,12,13,14,15},{3,4,6,7,11,12,13,15},{3,4,6,7,11,12,14},{3,4,6,7,11,12,14,15},{3,4,6,7,11,12,15},{3,4,6,7,11,13},{3,4,6,7,11,13,14},{3,4,6,7,11,13,14,15},{3,4,6,7,11,13,15},{3,4,6,7,11,14},{3,4,6,7,11,14,15},{3,4,6,7,11,15},{3,4,6,7,12},{3,4,6,7,12,13},{3,4,6,7,12,13,14},{3,4,6,7,12,13,14,15},{3,4,6,7,12,13,15},{3,4,6,7,12,14},{3,4,6,7,12,14,15},{3,4,6,7,12,15},{3,4,6,7,13},{3,4,6,7,13,14},{3,4,6,7,13,14,15},{3,4,6,7,13,15},{3,4,6,7,14},{3,4,6,7,14,15},{3,4,6,7,15},{3,4,6,8},{3,4,6,8,9},{3,4,6,8,9,10},{3,4,6,8,9,10,11},{3,4,6,8,9,10,11,12},{3,4,6,8,9,10,11,12,13},{3,4,6,8,9,10,11,12,13,14},{3,4,6,8,9,10,11,12,13,14,15},{3,4,6,8,9,10,11,12,13,15},{3,4,6,8,9,10,11,12,14},{3,4,6,8,9,10,11,12,14,15},{3,4,6,8,9,10,11,12,15},{3,4,6,8,9,10,11,13},{3,4,6,8,9,10,11,13,14},{3,4,6,8,9,10,11,13,14,15},{3,4,6,8,9,10,11,13,15},{3,4,6,8,9,10,11,14},{3,4,6,8,9,10,11,14,15},{3,4,6,8,9,10,11,15},{3,4,6,8,9,10,12},{3,4,6,8,9,10,12,13},{3,4,6,8,9,10,12,13,14},{3,4,6,8,9,10,12,13,14,15},{3,4,6,8,9,10,12,13,15},{3,4,6,8,9,10,12,14},{3,4,6,8,9,10,12,14,15},{3,4,6,8,9,10,12,15},{3,4,6,8,9,10,13},{3,4,6,8,9,10,13,14},{3,4,6,8,9,10,13,14,15},{3,4,6,8,9,10,13,15},{3,4,6,8,9,10,14},{3,4,6,8,9,10,14,15},{3,4,6,8,9,10,15},{3,4,6,8,9,11},{3,4,6,8,9,11,12},{3,4,6,8,9,11,12,13},{3,4,6,8,9,11,12,13,14},{3,4,6,8,9,11,12,13,14,15},{3,4,6,8,9,11,12,13,15},{3,4,6,8,9,11,12,14},{3,4,6,8,9,11,12,14,15},{3,4,6,8,9,11,12,15},{3,4,6,8,9,11,13},{3,4,6,8,9,11,13,14},{3,4,6,8,9,11,13,14,15},{3,4,6,8,9,11,13,15},{3,4,6,8,9,11,14},{3,4,6,8,9,11,14,15},{3,4,6,8,9,11,15},{3,4,6,8,9,12},{3,4,6,8,9,12,13},{3,4,6,8,9,12,13,14},{3,4,6,8,9,12,13,14,15},{3,4,6,8,9,12,13,15},{3,4,6,8,9,12,14},{3,4,6,8,9,12,14,15},{3,4,6,8,9,12,15},{3,4,6,8,9,13},{3,4,6,8,9,13,14},{3,4,6,8,9,13,14,15},{3,4,6,8,9,13,15},{3,4,6,8,9,14},{3,4,6,8,9,14,15},{3,4,6,8,9,15},{3,4,6,8,10},{3,4,6,8,10,11},{3,4,6,8,10,11,12},{3,4,6,8,10,11,12,13},{3,4,6,8,10,11,12,13,14},{3,4,6,8,10,11,12,13,14,15},{3,4,6,8,10,11,12,13,15},{3,4,6,8,10,11,12,14},{3,4,6,8,10,11,12,14,15},{3,4,6,8,10,11,12,15},{3,4,6,8,10,11,13},{3,4,6,8,10,11,13,14},{3,4,6,8,10,11,13,14,15},{3,4,6,8,10,11,13,15},{3,4,6,8,10,11,14},{3,4,6,8,10,11,14,15},{3,4,6,8,10,11,15},{3,4,6,8,10,12},{3,4,6,8,10,12,13},{3,4,6,8,10,12,13,14},{3,4,6,8,10,12,13,14,15},{3,4,6,8,10,12,13,15},{3,4,6,8,10,12,14},{3,4,6,8,10,12,14,15},{3,4,6,8,10,12,15},{3,4,6,8,10,13},{3,4,6,8,10,13,14},{3,4,6,8,10,13,14,15},{3,4,6,8,10,13,15},{3,4,6,8,10,14},{3,4,6,8,10,14,15},{3,4,6,8,10,15},{3,4,6,8,11},{3,4,6,8,11,12},{3,4,6,8,11,12,13},{3,4,6,8,11,12,13,14},{3,4,6,8,11,12,13,14,15},{3,4,6,8,11,12,13,15},{3,4,6,8,11,12,14},{3,4,6,8,11,12,14,15},{3,4,6,8,11,12,15},{3,4,6,8,11,13},{3,4,6,8,11,13,14},{3,4,6,8,11,13,14,15},{3,4,6,8,11,13,15},{3,4,6,8,11,14},{3,4,6,8,11,14,15},{3,4,6,8,11,15},{3,4,6,8,12},{3,4,6,8,12,13},{3,4,6,8,12,13,14},{3,4,6,8,12,13,14,15},{3,4,6,8,12,13,15},{3,4,6,8,12,14},{3,4,6,8,12,14,15},{3,4,6,8,12,15},{3,4,6,8,13},{3,4,6,8,13,14},{3,4,6,8,13,14,15},{3,4,6,8,13,15},{3,4,6,8,14},{3,4,6,8,14,15},{3,4,6,8,15},{3,4,6,9},{3,4,6,9,10},{3,4,6,9,10,11},{3,4,6,9,10,11,12},{3,4,6,9,10,11,12,13},{3,4,6,9,10,11,12,13,14},{3,4,6,9,10,11,12,13,14,15},{3,4,6,9,10,11,12,13,15},{3,4,6,9,10,11,12,14},{3,4,6,9,10,11,12,14,15},{3,4,6,9,10,11,12,15},{3,4,6,9,10,11,13},{3,4,6,9,10,11,13,14},{3,4,6,9,10,11,13,14,15},{3,4,6,9,10,11,13,15},{3,4,6,9,10,11,14},{3,4,6,9,10,11,14,15},{3,4,6,9,10,11,15},{3,4,6,9,10,12},{3,4,6,9,10,12,13},{3,4,6,9,10,12,13,14},{3,4,6,9,10,12,13,14,15},{3,4,6,9,10,12,13,15},{3,4,6,9,10,12,14},{3,4,6,9,10,12,14,15},{3,4,6,9,10,12,15},{3,4,6,9,10,13},{3,4,6,9,10,13,14},{3,4,6,9,10,13,14,15},{3,4,6,9,10,13,15},{3,4,6,9,10,14},{3,4,6,9,10,14,15},{3,4,6,9,10,15},{3,4,6,9,11},{3,4,6,9,11,12},{3,4,6,9,11,12,13},{3,4,6,9,11,12,13,14},{3,4,6,9,11,12,13,14,15},{3,4,6,9,11,12,13,15},{3,4,6,9,11,12,14},{3,4,6,9,11,12,14,15},{3,4,6,9,11,12,15},{3,4,6,9,11,13},{3,4,6,9,11,13,14},{3,4,6,9,11,13,14,15},{3,4,6,9,11,13,15},{3,4,6,9,11,14},{3,4,6,9,11,14,15},{3,4,6,9,11,15},{3,4,6,9,12},{3,4,6,9,12,13},{3,4,6,9,12,13,14},{3,4,6,9,12,13,14,15},{3,4,6,9,12,13,15},{3,4,6,9,12,14},{3,4,6,9,12,14,15},{3,4,6,9,12,15},{3,4,6,9,13},{3,4,6,9,13,14},{3,4,6,9,13,14,15},{3,4,6,9,13,15},{3,4,6,9,14},{3,4,6,9,14,15},{3,4,6,9,15},{3,4,6,10},{3,4,6,10,11},{3,4,6,10,11,12},{3,4,6,10,11,12,13},{3,4,6,10,11,12,13,14},{3,4,6,10,11,12,13,14,15},{3,4,6,10,11,12,13,15},{3,4,6,10,11,12,14},{3,4,6,10,11,12,14,15},{3,4,6,10,11,12,15},{3,4,6,10,11,13},{3,4,6,10,11,13,14},{3,4,6,10,11,13,14,15},{3,4,6,10,11,13,15},{3,4,6,10,11,14},{3,4,6,10,11,14,15},{3,4,6,10,11,15},{3,4,6,10,12},{3,4,6,10,12,13},{3,4,6,10,12,13,14},{3,4,6,10,12,13,14,15},{3,4,6,10,12,13,15},{3,4,6,10,12,14},{3,4,6,10,12,14,15},{3,4,6,10,12,15},{3,4,6,10,13},{3,4,6,10,13,14},{3,4,6,10,13,14,15},{3,4,6,10,13,15},{3,4,6,10,14},{3,4,6,10,14,15},{3,4,6,10,15},{3,4,6,11},{3,4,6,11,12},{3,4,6,11,12,13},{3,4,6,11,12,13,14},{3,4,6,11,12,13,14,15},{3,4,6,11,12,13,15},{3,4,6,11,12,14},{3,4,6,11,12,14,15},{3,4,6,11,12,15},{3,4,6,11,13},{3,4,6,11,13,14},{3,4,6,11,13,14,15},{3,4,6,11,13,15},{3,4,6,11,14},{3,4,6,11,14,15},{3,4,6,11,15},{3,4,6,12},{3,4,6,12,13},{3,4,6,12,13,14},{3,4,6,12,13,14,15},{3,4,6,12,13,15},{3,4,6,12,14},{3,4,6,12,14,15},{3,4,6,12,15},{3,4,6,13},{3,4,6,13,14},{3,4,6,13,14,15},{3,4,6,13,15},{3,4,6,14},{3,4,6,14,15},{3,4,6,15},{3,4,7},{3,4,7,8},{3,4,7,8,9},{3,4,7,8,9,10},{3,4,7,8,9,10,11},{3,4,7,8,9,10,11,12},{3,4,7,8,9,10,11,12,13},{3,4,7,8,9,10,11,12,13,14},{3,4,7,8,9,10,11,12,13,14,15},{3,4,7,8,9,10,11,12,13,15},{3,4,7,8,9,10,11,12,14},{3,4,7,8,9,10,11,12,14,15},{3,4,7,8,9,10,11,12,15},{3,4,7,8,9,10,11,13},{3,4,7,8,9,10,11,13,14},{3,4,7,8,9,10,11,13,14,15},{3,4,7,8,9,10,11,13,15},{3,4,7,8,9,10,11,14},{3,4,7,8,9,10,11,14,15},{3,4,7,8,9,10,11,15},{3,4,7,8,9,10,12},{3,4,7,8,9,10,12,13},{3,4,7,8,9,10,12,13,14},{3,4,7,8,9,10,12,13,14,15},{3,4,7,8,9,10,12,13,15},{3,4,7,8,9,10,12,14},{3,4,7,8,9,10,12,14,15},{3,4,7,8,9,10,12,15},{3,4,7,8,9,10,13},{3,4,7,8,9,10,13,14},{3,4,7,8,9,10,13,14,15},{3,4,7,8,9,10,13,15},{3,4,7,8,9,10,14},{3,4,7,8,9,10,14,15},{3,4,7,8,9,10,15},{3,4,7,8,9,11},{3,4,7,8,9,11,12},{3,4,7,8,9,11,12,13},{3,4,7,8,9,11,12,13,14},{3,4,7,8,9,11,12,13,14,15},{3,4,7,8,9,11,12,13,15},{3,4,7,8,9,11,12,14},{3,4,7,8,9,11,12,14,15},{3,4,7,8,9,11,12,15},{3,4,7,8,9,11,13},{3,4,7,8,9,11,13,14},{3,4,7,8,9,11,13,14,15},{3,4,7,8,9,11,13,15},{3,4,7,8,9,11,14},{3,4,7,8,9,11,14,15},{3,4,7,8,9,11,15},{3,4,7,8,9,12},{3,4,7,8,9,12,13},{3,4,7,8,9,12,13,14},{3,4,7,8,9,12,13,14,15},{3,4,7,8,9,12,13,15},{3,4,7,8,9,12,14},{3,4,7,8,9,12,14,15},{3,4,7,8,9,12,15},{3,4,7,8,9,13},{3,4,7,8,9,13,14},{3,4,7,8,9,13,14,15},{3,4,7,8,9,13,15},{3,4,7,8,9,14},{3,4,7,8,9,14,15},{3,4,7,8,9,15},{3,4,7,8,10},{3,4,7,8,10,11},{3,4,7,8,10,11,12},{3,4,7,8,10,11,12,13},{3,4,7,8,10,11,12,13,14},{3,4,7,8,10,11,12,13,14,15},{3,4,7,8,10,11,12,13,15},{3,4,7,8,10,11,12,14},{3,4,7,8,10,11,12,14,15},{3,4,7,8,10,11,12,15},{3,4,7,8,10,11,13},{3,4,7,8,10,11,13,14},{3,4,7,8,10,11,13,14,15},{3,4,7,8,10,11,13,15},{3,4,7,8,10,11,14},{3,4,7,8,10,11,14,15},{3,4,7,8,10,11,15},{3,4,7,8,10,12},{3,4,7,8,10,12,13},{3,4,7,8,10,12,13,14},{3,4,7,8,10,12,13,14,15},{3,4,7,8,10,12,13,15},{3,4,7,8,10,12,14},{3,4,7,8,10,12,14,15},{3,4,7,8,10,12,15},{3,4,7,8,10,13},{3,4,7,8,10,13,14},{3,4,7,8,10,13,14,15},{3,4,7,8,10,13,15},{3,4,7,8,10,14},{3,4,7,8,10,14,15},{3,4,7,8,10,15},{3,4,7,8,11},{3,4,7,8,11,12},{3,4,7,8,11,12,13},{3,4,7,8,11,12,13,14},{3,4,7,8,11,12,13,14,15},{3,4,7,8,11,12,13,15},{3,4,7,8,11,12,14},{3,4,7,8,11,12,14,15},{3,4,7,8,11,12,15},{3,4,7,8,11,13},{3,4,7,8,11,13,14},{3,4,7,8,11,13,14,15},{3,4,7,8,11,13,15},{3,4,7,8,11,14},{3,4,7,8,11,14,15},{3,4,7,8,11,15},{3,4,7,8,12},{3,4,7,8,12,13},{3,4,7,8,12,13,14},{3,4,7,8,12,13,14,15},{3,4,7,8,12,13,15},{3,4,7,8,12,14},{3,4,7,8,12,14,15},{3,4,7,8,12,15},{3,4,7,8,13},{3,4,7,8,13,14},{3,4,7,8,13,14,15},{3,4,7,8,13,15},{3,4,7,8,14},{3,4,7,8,14,15},{3,4,7,8,15},{3,4,7,9},{3,4,7,9,10},{3,4,7,9,10,11},{3,4,7,9,10,11,12},{3,4,7,9,10,11,12,13},{3,4,7,9,10,11,12,13,14},{3,4,7,9,10,11,12,13,14,15},{3,4,7,9,10,11,12,13,15},{3,4,7,9,10,11,12,14},{3,4,7,9,10,11,12,14,15},{3,4,7,9,10,11,12,15},{3,4,7,9,10,11,13},{3,4,7,9,10,11,13,14},{3,4,7,9,10,11,13,14,15},{3,4,7,9,10,11,13,15},{3,4,7,9,10,11,14},{3,4,7,9,10,11,14,15},{3,4,7,9,10,11,15},{3,4,7,9,10,12},{3,4,7,9,10,12,13},{3,4,7,9,10,12,13,14},{3,4,7,9,10,12,13,14,15},{3,4,7,9,10,12,13,15},{3,4,7,9,10,12,14},{3,4,7,9,10,12,14,15},{3,4,7,9,10,12,15},{3,4,7,9,10,13},{3,4,7,9,10,13,14},{3,4,7,9,10,13,14,15},{3,4,7,9,10,13,15},{3,4,7,9,10,14},{3,4,7,9,10,14,15},{3,4,7,9,10,15},{3,4,7,9,11},{3,4,7,9,11,12},{3,4,7,9,11,12,13},{3,4,7,9,11,12,13,14},{3,4,7,9,11,12,13,14,15},{3,4,7,9,11,12,13,15},{3,4,7,9,11,12,14},{3,4,7,9,11,12,14,15},{3,4,7,9,11,12,15},{3,4,7,9,11,13},{3,4,7,9,11,13,14},{3,4,7,9,11,13,14,15},{3,4,7,9,11,13,15},{3,4,7,9,11,14},{3,4,7,9,11,14,15},{3,4,7,9,11,15},{3,4,7,9,12},{3,4,7,9,12,13},{3,4,7,9,12,13,14},{3,4,7,9,12,13,14,15},{3,4,7,9,12,13,15},{3,4,7,9,12,14},{3,4,7,9,12,14,15},{3,4,7,9,12,15},{3,4,7,9,13},{3,4,7,9,13,14},{3,4,7,9,13,14,15},{3,4,7,9,13,15},{3,4,7,9,14},{3,4,7,9,14,15},{3,4,7,9,15},{3,4,7,10},{3,4,7,10,11},{3,4,7,10,11,12},{3,4,7,10,11,12,13},{3,4,7,10,11,12,13,14},{3,4,7,10,11,12,13,14,15},{3,4,7,10,11,12,13,15},{3,4,7,10,11,12,14},{3,4,7,10,11,12,14,15},{3,4,7,10,11,12,15},{3,4,7,10,11,13},{3,4,7,10,11,13,14},{3,4,7,10,11,13,14,15},{3,4,7,10,11,13,15},{3,4,7,10,11,14},{3,4,7,10,11,14,15},{3,4,7,10,11,15},{3,4,7,10,12},{3,4,7,10,12,13},{3,4,7,10,12,13,14},{3,4,7,10,12,13,14,15},{3,4,7,10,12,13,15},{3,4,7,10,12,14},{3,4,7,10,12,14,15},{3,4,7,10,12,15},{3,4,7,10,13},{3,4,7,10,13,14},{3,4,7,10,13,14,15},{3,4,7,10,13,15},{3,4,7,10,14},{3,4,7,10,14,15},{3,4,7,10,15},{3,4,7,11},{3,4,7,11,12},{3,4,7,11,12,13},{3,4,7,11,12,13,14},{3,4,7,11,12,13,14,15},{3,4,7,11,12,13,15},{3,4,7,11,12,14},{3,4,7,11,12,14,15},{3,4,7,11,12,15},{3,4,7,11,13},{3,4,7,11,13,14},{3,4,7,11,13,14,15},{3,4,7,11,13,15},{3,4,7,11,14},{3,4,7,11,14,15},{3,4,7,11,15},{3,4,7,12},{3,4,7,12,13},{3,4,7,12,13,14},{3,4,7,12,13,14,15},{3,4,7,12,13,15},{3,4,7,12,14},{3,4,7,12,14,15},{3,4,7,12,15},{3,4,7,13},{3,4,7,13,14},{3,4,7,13,14,15},{3,4,7,13,15},{3,4,7,14},{3,4,7,14,15},{3,4,7,15},{3,4,8},{3,4,8,9},{3,4,8,9,10},{3,4,8,9,10,11},{3,4,8,9,10,11,12},{3,4,8,9,10,11,12,13},{3,4,8,9,10,11,12,13,14},{3,4,8,9,10,11,12,13,14,15},{3,4,8,9,10,11,12,13,15},{3,4,8,9,10,11,12,14},{3,4,8,9,10,11,12,14,15},{3,4,8,9,10,11,12,15},{3,4,8,9,10,11,13},{3,4,8,9,10,11,13,14},{3,4,8,9,10,11,13,14,15},{3,4,8,9,10,11,13,15},{3,4,8,9,10,11,14},{3,4,8,9,10,11,14,15},{3,4,8,9,10,11,15},{3,4,8,9,10,12},{3,4,8,9,10,12,13},{3,4,8,9,10,12,13,14},{3,4,8,9,10,12,13,14,15},{3,4,8,9,10,12,13,15},{3,4,8,9,10,12,14},{3,4,8,9,10,12,14,15},{3,4,8,9,10,12,15},{3,4,8,9,10,13},{3,4,8,9,10,13,14},{3,4,8,9,10,13,14,15},{3,4,8,9,10,13,15},{3,4,8,9,10,14},{3,4,8,9,10,14,15},{3,4,8,9,10,15},{3,4,8,9,11},{3,4,8,9,11,12},{3,4,8,9,11,12,13},{3,4,8,9,11,12,13,14},{3,4,8,9,11,12,13,14,15},{3,4,8,9,11,12,13,15},{3,4,8,9,11,12,14},{3,4,8,9,11,12,14,15},{3,4,8,9,11,12,15},{3,4,8,9,11,13},{3,4,8,9,11,13,14},{3,4,8,9,11,13,14,15},{3,4,8,9,11,13,15},{3,4,8,9,11,14},{3,4,8,9,11,14,15},{3,4,8,9,11,15},{3,4,8,9,12},{3,4,8,9,12,13},{3,4,8,9,12,13,14},{3,4,8,9,12,13,14,15},{3,4,8,9,12,13,15},{3,4,8,9,12,14},{3,4,8,9,12,14,15},{3,4,8,9,12,15},{3,4,8,9,13},{3,4,8,9,13,14},{3,4,8,9,13,14,15},{3,4,8,9,13,15},{3,4,8,9,14},{3,4,8,9,14,15},{3,4,8,9,15},{3,4,8,10},{3,4,8,10,11},{3,4,8,10,11,12},{3,4,8,10,11,12,13},{3,4,8,10,11,12,13,14},{3,4,8,10,11,12,13,14,15},{3,4,8,10,11,12,13,15},{3,4,8,10,11,12,14},{3,4,8,10,11,12,14,15},{3,4,8,10,11,12,15},{3,4,8,10,11,13},{3,4,8,10,11,13,14},{3,4,8,10,11,13,14,15},{3,4,8,10,11,13,15},{3,4,8,10,11,14},{3,4,8,10,11,14,15},{3,4,8,10,11,15},{3,4,8,10,12},{3,4,8,10,12,13},{3,4,8,10,12,13,14},{3,4,8,10,12,13,14,15},{3,4,8,10,12,13,15},{3,4,8,10,12,14},{3,4,8,10,12,14,15},{3,4,8,10,12,15},{3,4,8,10,13},{3,4,8,10,13,14},{3,4,8,10,13,14,15},{3,4,8,10,13,15},{3,4,8,10,14},{3,4,8,10,14,15},{3,4,8,10,15},{3,4,8,11},{3,4,8,11,12},{3,4,8,11,12,13},{3,4,8,11,12,13,14},{3,4,8,11,12,13,14,15},{3,4,8,11,12,13,15},{3,4,8,11,12,14},{3,4,8,11,12,14,15},{3,4,8,11,12,15},{3,4,8,11,13},{3,4,8,11,13,14},{3,4,8,11,13,14,15},{3,4,8,11,13,15},{3,4,8,11,14},{3,4,8,11,14,15},{3,4,8,11,15},{3,4,8,12},{3,4,8,12,13},{3,4,8,12,13,14},{3,4,8,12,13,14,15},{3,4,8,12,13,15},{3,4,8,12,14},{3,4,8,12,14,15},{3,4,8,12,15},{3,4,8,13},{3,4,8,13,14},{3,4,8,13,14,15},{3,4,8,13,15},{3,4,8,14},{3,4,8,14,15},{3,4,8,15},{3,4,9},{3,4,9,10},{3,4,9,10,11},{3,4,9,10,11,12},{3,4,9,10,11,12,13},{3,4,9,10,11,12,13,14},{3,4,9,10,11,12,13,14,15},{3,4,9,10,11,12,13,15},{3,4,9,10,11,12,14},{3,4,9,10,11,12,14,15},{3,4,9,10,11,12,15},{3,4,9,10,11,13},{3,4,9,10,11,13,14},{3,4,9,10,11,13,14,15},{3,4,9,10,11,13,15},{3,4,9,10,11,14},{3,4,9,10,11,14,15},{3,4,9,10,11,15},{3,4,9,10,12},{3,4,9,10,12,13},{3,4,9,10,12,13,14},{3,4,9,10,12,13,14,15},{3,4,9,10,12,13,15},{3,4,9,10,12,14},{3,4,9,10,12,14,15},{3,4,9,10,12,15},{3,4,9,10,13},{3,4,9,10,13,14},{3,4,9,10,13,14,15},{3,4,9,10,13,15},{3,4,9,10,14},{3,4,9,10,14,15},{3,4,9,10,15},{3,4,9,11},{3,4,9,11,12},{3,4,9,11,12,13},{3,4,9,11,12,13,14},{3,4,9,11,12,13,14,15},{3,4,9,11,12,13,15},{3,4,9,11,12,14},{3,4,9,11,12,14,15},{3,4,9,11,12,15},{3,4,9,11,13},{3,4,9,11,13,14},{3,4,9,11,13,14,15},{3,4,9,11,13,15},{3,4,9,11,14},{3,4,9,11,14,15},{3,4,9,11,15},{3,4,9,12},{3,4,9,12,13},{3,4,9,12,13,14},{3,4,9,12,13,14,15},{3,4,9,12,13,15},{3,4,9,12,14},{3,4,9,12,14,15},{3,4,9,12,15},{3,4,9,13},{3,4,9,13,14},{3,4,9,13,14,15},{3,4,9,13,15},{3,4,9,14},{3,4,9,14,15},{3,4,9,15},{3,4,10},{3,4,10,11},{3,4,10,11,12},{3,4,10,11,12,13},{3,4,10,11,12,13,14},{3,4,10,11,12,13,14,15},{3,4,10,11,12,13,15},{3,4,10,11,12,14},{3,4,10,11,12,14,15},{3,4,10,11,12,15},{3,4,10,11,13},{3,4,10,11,13,14},{3,4,10,11,13,14,15},{3,4,10,11,13,15},{3,4,10,11,14},{3,4,10,11,14,15},{3,4,10,11,15},{3,4,10,12},{3,4,10,12,13},{3,4,10,12,13,14},{3,4,10,12,13,14,15},{3,4,10,12,13,15},{3,4,10,12,14},{3,4,10,12,14,15},{3,4,10,12,15},{3,4,10,13},{3,4,10,13,14},{3,4,10,13,14,15},{3,4,10,13,15},{3,4,10,14},{3,4,10,14,15},{3,4,10,15},{3,4,11},{3,4,11,12},{3,4,11,12,13},{3,4,11,12,13,14},{3,4,11,12,13,14,15},{3,4,11,12,13,15},{3,4,11,12,14},{3,4,11,12,14,15},{3,4,11,12,15},{3,4,11,13},{3,4,11,13,14},{3,4,11,13,14,15},{3,4,11,13,15},{3,4,11,14},{3,4,11,14,15},{3,4,11,15},{3,4,12},{3,4,12,13},{3,4,12,13,14},{3,4,12,13,14,15},{3,4,12,13,15},{3,4,12,14},{3,4,12,14,15},{3,4,12,15},{3,4,13},{3,4,13,14},{3,4,13,14,15},{3,4,13,15},{3,4,14},{3,4,14,15},{3,4,15},{3,5},{3,5,6},{3,5,6,7},{3,5,6,7,8},{3,5,6,7,8,9},{3,5,6,7,8,9,10},{3,5,6,7,8,9,10,11},{3,5,6,7,8,9,10,11,12},{3,5,6,7,8,9,10,11,12,13},{3,5,6,7,8,9,10,11,12,13,14},{3,5,6,7,8,9,10,11,12,13,14,15},{3,5,6,7,8,9,10,11,12,13,15},{3,5,6,7,8,9,10,11,12,14},{3,5,6,7,8,9,10,11,12,14,15},{3,5,6,7,8,9,10,11,12,15},{3,5,6,7,8,9,10,11,13},{3,5,6,7,8,9,10,11,13,14},{3,5,6,7,8,9,10,11,13,14,15},{3,5,6,7,8,9,10,11,13,15},{3,5,6,7,8,9,10,11,14},{3,5,6,7,8,9,10,11,14,15},{3,5,6,7,8,9,10,11,15},{3,5,6,7,8,9,10,12},{3,5,6,7,8,9,10,12,13},{3,5,6,7,8,9,10,12,13,14},{3,5,6,7,8,9,10,12,13,14,15},{3,5,6,7,8,9,10,12,13,15},{3,5,6,7,8,9,10,12,14},{3,5,6,7,8,9,10,12,14,15},{3,5,6,7,8,9,10,12,15},{3,5,6,7,8,9,10,13},{3,5,6,7,8,9,10,13,14},{3,5,6,7,8,9,10,13,14,15},{3,5,6,7,8,9,10,13,15},{3,5,6,7,8,9,10,14},{3,5,6,7,8,9,10,14,15},{3,5,6,7,8,9,10,15},{3,5,6,7,8,9,11},{3,5,6,7,8,9,11,12},{3,5,6,7,8,9,11,12,13},{3,5,6,7,8,9,11,12,13,14},{3,5,6,7,8,9,11,12,13,14,15},{3,5,6,7,8,9,11,12,13,15},{3,5,6,7,8,9,11,12,14},{3,5,6,7,8,9,11,12,14,15},{3,5,6,7,8,9,11,12,15},{3,5,6,7,8,9,11,13},{3,5,6,7,8,9,11,13,14},{3,5,6,7,8,9,11,13,14,15},{3,5,6,7,8,9,11,13,15},{3,5,6,7,8,9,11,14},{3,5,6,7,8,9,11,14,15},{3,5,6,7,8,9,11,15},{3,5,6,7,8,9,12},{3,5,6,7,8,9,12,13},{3,5,6,7,8,9,12,13,14},{3,5,6,7,8,9,12,13,14,15},{3,5,6,7,8,9,12,13,15},{3,5,6,7,8,9,12,14},{3,5,6,7,8,9,12,14,15},{3,5,6,7,8,9,12,15},{3,5,6,7,8,9,13},{3,5,6,7,8,9,13,14},{3,5,6,7,8,9,13,14,15},{3,5,6,7,8,9,13,15},{3,5,6,7,8,9,14},{3,5,6,7,8,9,14,15},{3,5,6,7,8,9,15},{3,5,6,7,8,10},{3,5,6,7,8,10,11},{3,5,6,7,8,10,11,12},{3,5,6,7,8,10,11,12,13},{3,5,6,7,8,10,11,12,13,14},{3,5,6,7,8,10,11,12,13,14,15},{3,5,6,7,8,10,11,12,13,15},{3,5,6,7,8,10,11,12,14},{3,5,6,7,8,10,11,12,14,15},{3,5,6,7,8,10,11,12,15},{3,5,6,7,8,10,11,13},{3,5,6,7,8,10,11,13,14},{3,5,6,7,8,10,11,13,14,15},{3,5,6,7,8,10,11,13,15},{3,5,6,7,8,10,11,14},{3,5,6,7,8,10,11,14,15},{3,5,6,7,8,10,11,15},{3,5,6,7,8,10,12},{3,5,6,7,8,10,12,13},{3,5,6,7,8,10,12,13,14},{3,5,6,7,8,10,12,13,14,15},{3,5,6,7,8,10,12,13,15},{3,5,6,7,8,10,12,14},{3,5,6,7,8,10,12,14,15},{3,5,6,7,8,10,12,15},{3,5,6,7,8,10,13},{3,5,6,7,8,10,13,14},{3,5,6,7,8,10,13,14,15},{3,5,6,7,8,10,13,15},{3,5,6,7,8,10,14},{3,5,6,7,8,10,14,15},{3,5,6,7,8,10,15},{3,5,6,7,8,11},{3,5,6,7,8,11,12},{3,5,6,7,8,11,12,13},{3,5,6,7,8,11,12,13,14},{3,5,6,7,8,11,12,13,14,15},{3,5,6,7,8,11,12,13,15},{3,5,6,7,8,11,12,14},{3,5,6,7,8,11,12,14,15},{3,5,6,7,8,11,12,15},{3,5,6,7,8,11,13},{3,5,6,7,8,11,13,14},{3,5,6,7,8,11,13,14,15},{3,5,6,7,8,11,13,15},{3,5,6,7,8,11,14},{3,5,6,7,8,11,14,15},{3,5,6,7,8,11,15},{3,5,6,7,8,12},{3,5,6,7,8,12,13},{3,5,6,7,8,12,13,14},{3,5,6,7,8,12,13,14,15},{3,5,6,7,8,12,13,15},{3,5,6,7,8,12,14},{3,5,6,7,8,12,14,15},{3,5,6,7,8,12,15},{3,5,6,7,8,13},{3,5,6,7,8,13,14},{3,5,6,7,8,13,14,15},{3,5,6,7,8,13,15},{3,5,6,7,8,14},{3,5,6,7,8,14,15},{3,5,6,7,8,15},{3,5,6,7,9},{3,5,6,7,9,10},{3,5,6,7,9,10,11},{3,5,6,7,9,10,11,12},{3,5,6,7,9,10,11,12,13},{3,5,6,7,9,10,11,12,13,14},{3,5,6,7,9,10,11,12,13,14,15},{3,5,6,7,9,10,11,12,13,15},{3,5,6,7,9,10,11,12,14},{3,5,6,7,9,10,11,12,14,15},{3,5,6,7,9,10,11,12,15},{3,5,6,7,9,10,11,13},{3,5,6,7,9,10,11,13,14},{3,5,6,7,9,10,11,13,14,15},{3,5,6,7,9,10,11,13,15},{3,5,6,7,9,10,11,14},{3,5,6,7,9,10,11,14,15},{3,5,6,7,9,10,11,15},{3,5,6,7,9,10,12},{3,5,6,7,9,10,12,13},{3,5,6,7,9,10,12,13,14},{3,5,6,7,9,10,12,13,14,15},{3,5,6,7,9,10,12,13,15},{3,5,6,7,9,10,12,14},{3,5,6,7,9,10,12,14,15},{3,5,6,7,9,10,12,15},{3,5,6,7,9,10,13},{3,5,6,7,9,10,13,14},{3,5,6,7,9,10,13,14,15},{3,5,6,7,9,10,13,15},{3,5,6,7,9,10,14},{3,5,6,7,9,10,14,15},{3,5,6,7,9,10,15},{3,5,6,7,9,11},{3,5,6,7,9,11,12},{3,5,6,7,9,11,12,13},{3,5,6,7,9,11,12,13,14},{3,5,6,7,9,11,12,13,14,15},{3,5,6,7,9,11,12,13,15},{3,5,6,7,9,11,12,14},{3,5,6,7,9,11,12,14,15},{3,5,6,7,9,11,12,15},{3,5,6,7,9,11,13},{3,5,6,7,9,11,13,14},{3,5,6,7,9,11,13,14,15},{3,5,6,7,9,11,13,15},{3,5,6,7,9,11,14},{3,5,6,7,9,11,14,15},{3,5,6,7,9,11,15},{3,5,6,7,9,12},{3,5,6,7,9,12,13},{3,5,6,7,9,12,13,14},{3,5,6,7,9,12,13,14,15},{3,5,6,7,9,12,13,15},{3,5,6,7,9,12,14},{3,5,6,7,9,12,14,15},{3,5,6,7,9,12,15},{3,5,6,7,9,13},{3,5,6,7,9,13,14},{3,5,6,7,9,13,14,15},{3,5,6,7,9,13,15},{3,5,6,7,9,14},{3,5,6,7,9,14,15},{3,5,6,7,9,15},{3,5,6,7,10},{3,5,6,7,10,11},{3,5,6,7,10,11,12},{3,5,6,7,10,11,12,13},{3,5,6,7,10,11,12,13,14},{3,5,6,7,10,11,12,13,14,15},{3,5,6,7,10,11,12,13,15},{3,5,6,7,10,11,12,14},{3,5,6,7,10,11,12,14,15},{3,5,6,7,10,11,12,15},{3,5,6,7,10,11,13},{3,5,6,7,10,11,13,14},{3,5,6,7,10,11,13,14,15},{3,5,6,7,10,11,13,15},{3,5,6,7,10,11,14},{3,5,6,7,10,11,14,15},{3,5,6,7,10,11,15},{3,5,6,7,10,12},{3,5,6,7,10,12,13},{3,5,6,7,10,12,13,14},{3,5,6,7,10,12,13,14,15},{3,5,6,7,10,12,13,15},{3,5,6,7,10,12,14},{3,5,6,7,10,12,14,15},{3,5,6,7,10,12,15},{3,5,6,7,10,13},{3,5,6,7,10,13,14},{3,5,6,7,10,13,14,15},{3,5,6,7,10,13,15},{3,5,6,7,10,14},{3,5,6,7,10,14,15},{3,5,6,7,10,15},{3,5,6,7,11},{3,5,6,7,11,12},{3,5,6,7,11,12,13},{3,5,6,7,11,12,13,14},{3,5,6,7,11,12,13,14,15},{3,5,6,7,11,12,13,15},{3,5,6,7,11,12,14},{3,5,6,7,11,12,14,15},{3,5,6,7,11,12,15},{3,5,6,7,11,13},{3,5,6,7,11,13,14},{3,5,6,7,11,13,14,15},{3,5,6,7,11,13,15},{3,5,6,7,11,14},{3,5,6,7,11,14,15},{3,5,6,7,11,15},{3,5,6,7,12},{3,5,6,7,12,13},{3,5,6,7,12,13,14},{3,5,6,7,12,13,14,15},{3,5,6,7,12,13,15},{3,5,6,7,12,14},{3,5,6,7,12,14,15},{3,5,6,7,12,15},{3,5,6,7,13},{3,5,6,7,13,14},{3,5,6,7,13,14,15},{3,5,6,7,13,15},{3,5,6,7,14},{3,5,6,7,14,15},{3,5,6,7,15},{3,5,6,8},{3,5,6,8,9},{3,5,6,8,9,10},{3,5,6,8,9,10,11},{3,5,6,8,9,10,11,12},{3,5,6,8,9,10,11,12,13},{3,5,6,8,9,10,11,12,13,14},{3,5,6,8,9,10,11,12,13,14,15},{3,5,6,8,9,10,11,12,13,15},{3,5,6,8,9,10,11,12,14},{3,5,6,8,9,10,11,12,14,15},{3,5,6,8,9,10,11,12,15},{3,5,6,8,9,10,11,13},{3,5,6,8,9,10,11,13,14},{3,5,6,8,9,10,11,13,14,15},{3,5,6,8,9,10,11,13,15},{3,5,6,8,9,10,11,14},{3,5,6,8,9,10,11,14,15},{3,5,6,8,9,10,11,15},{3,5,6,8,9,10,12},{3,5,6,8,9,10,12,13},{3,5,6,8,9,10,12,13,14},{3,5,6,8,9,10,12,13,14,15},{3,5,6,8,9,10,12,13,15},{3,5,6,8,9,10,12,14},{3,5,6,8,9,10,12,14,15},{3,5,6,8,9,10,12,15},{3,5,6,8,9,10,13},{3,5,6,8,9,10,13,14},{3,5,6,8,9,10,13,14,15},{3,5,6,8,9,10,13,15},{3,5,6,8,9,10,14},{3,5,6,8,9,10,14,15},{3,5,6,8,9,10,15},{3,5,6,8,9,11},{3,5,6,8,9,11,12},{3,5,6,8,9,11,12,13},{3,5,6,8,9,11,12,13,14},{3,5,6,8,9,11,12,13,14,15},{3,5,6,8,9,11,12,13,15},{3,5,6,8,9,11,12,14},{3,5,6,8,9,11,12,14,15},{3,5,6,8,9,11,12,15},{3,5,6,8,9,11,13},{3,5,6,8,9,11,13,14},{3,5,6,8,9,11,13,14,15},{3,5,6,8,9,11,13,15},{3,5,6,8,9,11,14},{3,5,6,8,9,11,14,15},{3,5,6,8,9,11,15},{3,5,6,8,9,12},{3,5,6,8,9,12,13},{3,5,6,8,9,12,13,14},{3,5,6,8,9,12,13,14,15},{3,5,6,8,9,12,13,15},{3,5,6,8,9,12,14},{3,5,6,8,9,12,14,15},{3,5,6,8,9,12,15},{3,5,6,8,9,13},{3,5,6,8,9,13,14},{3,5,6,8,9,13,14,15},{3,5,6,8,9,13,15},{3,5,6,8,9,14},{3,5,6,8,9,14,15},{3,5,6,8,9,15},{3,5,6,8,10},{3,5,6,8,10,11},{3,5,6,8,10,11,12},{3,5,6,8,10,11,12,13},{3,5,6,8,10,11,12,13,14},{3,5,6,8,10,11,12,13,14,15},{3,5,6,8,10,11,12,13,15},{3,5,6,8,10,11,12,14},{3,5,6,8,10,11,12,14,15},{3,5,6,8,10,11,12,15},{3,5,6,8,10,11,13},{3,5,6,8,10,11,13,14},{3,5,6,8,10,11,13,14,15},{3,5,6,8,10,11,13,15},{3,5,6,8,10,11,14},{3,5,6,8,10,11,14,15},{3,5,6,8,10,11,15},{3,5,6,8,10,12},{3,5,6,8,10,12,13},{3,5,6,8,10,12,13,14},{3,5,6,8,10,12,13,14,15},{3,5,6,8,10,12,13,15},{3,5,6,8,10,12,14},{3,5,6,8,10,12,14,15},{3,5,6,8,10,12,15},{3,5,6,8,10,13},{3,5,6,8,10,13,14},{3,5,6,8,10,13,14,15},{3,5,6,8,10,13,15},{3,5,6,8,10,14},{3,5,6,8,10,14,15},{3,5,6,8,10,15},{3,5,6,8,11},{3,5,6,8,11,12},{3,5,6,8,11,12,13},{3,5,6,8,11,12,13,14},{3,5,6,8,11,12,13,14,15},{3,5,6,8,11,12,13,15},{3,5,6,8,11,12,14},{3,5,6,8,11,12,14,15},{3,5,6,8,11,12,15},{3,5,6,8,11,13},{3,5,6,8,11,13,14},{3,5,6,8,11,13,14,15},{3,5,6,8,11,13,15},{3,5,6,8,11,14},{3,5,6,8,11,14,15},{3,5,6,8,11,15},{3,5,6,8,12},{3,5,6,8,12,13},{3,5,6,8,12,13,14},{3,5,6,8,12,13,14,15},{3,5,6,8,12,13,15},{3,5,6,8,12,14},{3,5,6,8,12,14,15},{3,5,6,8,12,15},{3,5,6,8,13},{3,5,6,8,13,14},{3,5,6,8,13,14,15},{3,5,6,8,13,15},{3,5,6,8,14},{3,5,6,8,14,15},{3,5,6,8,15},{3,5,6,9},{3,5,6,9,10},{3,5,6,9,10,11},{3,5,6,9,10,11,12},{3,5,6,9,10,11,12,13},{3,5,6,9,10,11,12,13,14},{3,5,6,9,10,11,12,13,14,15},{3,5,6,9,10,11,12,13,15},{3,5,6,9,10,11,12,14},{3,5,6,9,10,11,12,14,15},{3,5,6,9,10,11,12,15},{3,5,6,9,10,11,13},{3,5,6,9,10,11,13,14},{3,5,6,9,10,11,13,14,15},{3,5,6,9,10,11,13,15},{3,5,6,9,10,11,14},{3,5,6,9,10,11,14,15},{3,5,6,9,10,11,15},{3,5,6,9,10,12},{3,5,6,9,10,12,13},{3,5,6,9,10,12,13,14},{3,5,6,9,10,12,13,14,15},{3,5,6,9,10,12,13,15},{3,5,6,9,10,12,14},{3,5,6,9,10,12,14,15},{3,5,6,9,10,12,15},{3,5,6,9,10,13},{3,5,6,9,10,13,14},{3,5,6,9,10,13,14,15},{3,5,6,9,10,13,15},{3,5,6,9,10,14},{3,5,6,9,10,14,15},{3,5,6,9,10,15},{3,5,6,9,11},{3,5,6,9,11,12},{3,5,6,9,11,12,13},{3,5,6,9,11,12,13,14},{3,5,6,9,11,12,13,14,15},{3,5,6,9,11,12,13,15},{3,5,6,9,11,12,14},{3,5,6,9,11,12,14,15},{3,5,6,9,11,12,15},{3,5,6,9,11,13},{3,5,6,9,11,13,14},{3,5,6,9,11,13,14,15},{3,5,6,9,11,13,15},{3,5,6,9,11,14},{3,5,6,9,11,14,15},{3,5,6,9,11,15},{3,5,6,9,12},{3,5,6,9,12,13},{3,5,6,9,12,13,14},{3,5,6,9,12,13,14,15},{3,5,6,9,12,13,15},{3,5,6,9,12,14},{3,5,6,9,12,14,15},{3,5,6,9,12,15},{3,5,6,9,13},{3,5,6,9,13,14},{3,5,6,9,13,14,15},{3,5,6,9,13,15},{3,5,6,9,14},{3,5,6,9,14,15},{3,5,6,9,15},{3,5,6,10},{3,5,6,10,11},{3,5,6,10,11,12},{3,5,6,10,11,12,13},{3,5,6,10,11,12,13,14},{3,5,6,10,11,12,13,14,15},{3,5,6,10,11,12,13,15},{3,5,6,10,11,12,14},{3,5,6,10,11,12,14,15},{3,5,6,10,11,12,15},{3,5,6,10,11,13},{3,5,6,10,11,13,14},{3,5,6,10,11,13,14,15},{3,5,6,10,11,13,15},{3,5,6,10,11,14},{3,5,6,10,11,14,15},{3,5,6,10,11,15},{3,5,6,10,12},{3,5,6,10,12,13},{3,5,6,10,12,13,14},{3,5,6,10,12,13,14,15},{3,5,6,10,12,13,15},{3,5,6,10,12,14},{3,5,6,10,12,14,15},{3,5,6,10,12,15},{3,5,6,10,13},{3,5,6,10,13,14},{3,5,6,10,13,14,15},{3,5,6,10,13,15},{3,5,6,10,14},{3,5,6,10,14,15},{3,5,6,10,15},{3,5,6,11},{3,5,6,11,12},{3,5,6,11,12,13},{3,5,6,11,12,13,14},{3,5,6,11,12,13,14,15},{3,5,6,11,12,13,15},{3,5,6,11,12,14},{3,5,6,11,12,14,15},{3,5,6,11,12,15},{3,5,6,11,13},{3,5,6,11,13,14},{3,5,6,11,13,14,15},{3,5,6,11,13,15},{3,5,6,11,14},{3,5,6,11,14,15},{3,5,6,11,15},{3,5,6,12},{3,5,6,12,13},{3,5,6,12,13,14},{3,5,6,12,13,14,15},{3,5,6,12,13,15},{3,5,6,12,14},{3,5,6,12,14,15},{3,5,6,12,15},{3,5,6,13},{3,5,6,13,14},{3,5,6,13,14,15},{3,5,6,13,15},{3,5,6,14},{3,5,6,14,15},{3,5,6,15},{3,5,7},{3,5,7,8},{3,5,7,8,9},{3,5,7,8,9,10},{3,5,7,8,9,10,11},{3,5,7,8,9,10,11,12},{3,5,7,8,9,10,11,12,13},{3,5,7,8,9,10,11,12,13,14},{3,5,7,8,9,10,11,12,13,14,15},{3,5,7,8,9,10,11,12,13,15},{3,5,7,8,9,10,11,12,14},{3,5,7,8,9,10,11,12,14,15},{3,5,7,8,9,10,11,12,15},{3,5,7,8,9,10,11,13},{3,5,7,8,9,10,11,13,14},{3,5,7,8,9,10,11,13,14,15},{3,5,7,8,9,10,11,13,15},{3,5,7,8,9,10,11,14},{3,5,7,8,9,10,11,14,15},{3,5,7,8,9,10,11,15},{3,5,7,8,9,10,12},{3,5,7,8,9,10,12,13},{3,5,7,8,9,10,12,13,14},{3,5,7,8,9,10,12,13,14,15},{3,5,7,8,9,10,12,13,15},{3,5,7,8,9,10,12,14},{3,5,7,8,9,10,12,14,15},{3,5,7,8,9,10,12,15},{3,5,7,8,9,10,13},{3,5,7,8,9,10,13,14},{3,5,7,8,9,10,13,14,15},{3,5,7,8,9,10,13,15},{3,5,7,8,9,10,14},{3,5,7,8,9,10,14,15},{3,5,7,8,9,10,15},{3,5,7,8,9,11},{3,5,7,8,9,11,12},{3,5,7,8,9,11,12,13},{3,5,7,8,9,11,12,13,14},{3,5,7,8,9,11,12,13,14,15},{3,5,7,8,9,11,12,13,15},{3,5,7,8,9,11,12,14},{3,5,7,8,9,11,12,14,15},{3,5,7,8,9,11,12,15},{3,5,7,8,9,11,13},{3,5,7,8,9,11,13,14},{3,5,7,8,9,11,13,14,15},{3,5,7,8,9,11,13,15},{3,5,7,8,9,11,14},{3,5,7,8,9,11,14,15},{3,5,7,8,9,11,15},{3,5,7,8,9,12},{3,5,7,8,9,12,13},{3,5,7,8,9,12,13,14},{3,5,7,8,9,12,13,14,15},{3,5,7,8,9,12,13,15},{3,5,7,8,9,12,14},{3,5,7,8,9,12,14,15},{3,5,7,8,9,12,15},{3,5,7,8,9,13},{3,5,7,8,9,13,14},{3,5,7,8,9,13,14,15},{3,5,7,8,9,13,15},{3,5,7,8,9,14},{3,5,7,8,9,14,15},{3,5,7,8,9,15},{3,5,7,8,10},{3,5,7,8,10,11},{3,5,7,8,10,11,12},{3,5,7,8,10,11,12,13},{3,5,7,8,10,11,12,13,14},{3,5,7,8,10,11,12,13,14,15},{3,5,7,8,10,11,12,13,15},{3,5,7,8,10,11,12,14},{3,5,7,8,10,11,12,14,15},{3,5,7,8,10,11,12,15},{3,5,7,8,10,11,13},{3,5,7,8,10,11,13,14},{3,5,7,8,10,11,13,14,15},{3,5,7,8,10,11,13,15},{3,5,7,8,10,11,14},{3,5,7,8,10,11,14,15},{3,5,7,8,10,11,15},{3,5,7,8,10,12},{3,5,7,8,10,12,13},{3,5,7,8,10,12,13,14},{3,5,7,8,10,12,13,14,15},{3,5,7,8,10,12,13,15},{3,5,7,8,10,12,14},{3,5,7,8,10,12,14,15},{3,5,7,8,10,12,15},{3,5,7,8,10,13},{3,5,7,8,10,13,14},{3,5,7,8,10,13,14,15},{3,5,7,8,10,13,15},{3,5,7,8,10,14},{3,5,7,8,10,14,15},{3,5,7,8,10,15},{3,5,7,8,11},{3,5,7,8,11,12},{3,5,7,8,11,12,13},{3,5,7,8,11,12,13,14},{3,5,7,8,11,12,13,14,15},{3,5,7,8,11,12,13,15},{3,5,7,8,11,12,14},{3,5,7,8,11,12,14,15},{3,5,7,8,11,12,15},{3,5,7,8,11,13},{3,5,7,8,11,13,14},{3,5,7,8,11,13,14,15},{3,5,7,8,11,13,15},{3,5,7,8,11,14},{3,5,7,8,11,14,15},{3,5,7,8,11,15},{3,5,7,8,12},{3,5,7,8,12,13},{3,5,7,8,12,13,14},{3,5,7,8,12,13,14,15},{3,5,7,8,12,13,15},{3,5,7,8,12,14},{3,5,7,8,12,14,15},{3,5,7,8,12,15},{3,5,7,8,13},{3,5,7,8,13,14},{3,5,7,8,13,14,15},{3,5,7,8,13,15},{3,5,7,8,14},{3,5,7,8,14,15},{3,5,7,8,15},{3,5,7,9},{3,5,7,9,10},{3,5,7,9,10,11},{3,5,7,9,10,11,12},{3,5,7,9,10,11,12,13},{3,5,7,9,10,11,12,13,14},{3,5,7,9,10,11,12,13,14,15},{3,5,7,9,10,11,12,13,15},{3,5,7,9,10,11,12,14},{3,5,7,9,10,11,12,14,15},{3,5,7,9,10,11,12,15},{3,5,7,9,10,11,13},{3,5,7,9,10,11,13,14},{3,5,7,9,10,11,13,14,15},{3,5,7,9,10,11,13,15},{3,5,7,9,10,11,14},{3,5,7,9,10,11,14,15},{3,5,7,9,10,11,15},{3,5,7,9,10,12},{3,5,7,9,10,12,13},{3,5,7,9,10,12,13,14},{3,5,7,9,10,12,13,14,15},{3,5,7,9,10,12,13,15},{3,5,7,9,10,12,14},{3,5,7,9,10,12,14,15},{3,5,7,9,10,12,15},{3,5,7,9,10,13},{3,5,7,9,10,13,14},{3,5,7,9,10,13,14,15},{3,5,7,9,10,13,15},{3,5,7,9,10,14},{3,5,7,9,10,14,15},{3,5,7,9,10,15},{3,5,7,9,11},{3,5,7,9,11,12},{3,5,7,9,11,12,13},{3,5,7,9,11,12,13,14},{3,5,7,9,11,12,13,14,15},{3,5,7,9,11,12,13,15},{3,5,7,9,11,12,14},{3,5,7,9,11,12,14,15},{3,5,7,9,11,12,15},{3,5,7,9,11,13},{3,5,7,9,11,13,14},{3,5,7,9,11,13,14,15},{3,5,7,9,11,13,15},{3,5,7,9,11,14},{3,5,7,9,11,14,15},{3,5,7,9,11,15},{3,5,7,9,12},{3,5,7,9,12,13},{3,5,7,9,12,13,14},{3,5,7,9,12,13,14,15},{3,5,7,9,12,13,15},{3,5,7,9,12,14},{3,5,7,9,12,14,15},{3,5,7,9,12,15},{3,5,7,9,13},{3,5,7,9,13,14},{3,5,7,9,13,14,15},{3,5,7,9,13,15},{3,5,7,9,14},{3,5,7,9,14,15},{3,5,7,9,15},{3,5,7,10},{3,5,7,10,11},{3,5,7,10,11,12},{3,5,7,10,11,12,13},{3,5,7,10,11,12,13,14},{3,5,7,10,11,12,13,14,15},{3,5,7,10,11,12,13,15},{3,5,7,10,11,12,14},{3,5,7,10,11,12,14,15},{3,5,7,10,11,12,15},{3,5,7,10,11,13},{3,5,7,10,11,13,14},{3,5,7,10,11,13,14,15},{3,5,7,10,11,13,15},{3,5,7,10,11,14},{3,5,7,10,11,14,15},{3,5,7,10,11,15},{3,5,7,10,12},{3,5,7,10,12,13},{3,5,7,10,12,13,14},{3,5,7,10,12,13,14,15},{3,5,7,10,12,13,15},{3,5,7,10,12,14},{3,5,7,10,12,14,15},{3,5,7,10,12,15},{3,5,7,10,13},{3,5,7,10,13,14},{3,5,7,10,13,14,15},{3,5,7,10,13,15},{3,5,7,10,14},{3,5,7,10,14,15},{3,5,7,10,15},{3,5,7,11},{3,5,7,11,12},{3,5,7,11,12,13},{3,5,7,11,12,13,14},{3,5,7,11,12,13,14,15},{3,5,7,11,12,13,15},{3,5,7,11,12,14},{3,5,7,11,12,14,15},{3,5,7,11,12,15},{3,5,7,11,13},{3,5,7,11,13,14},{3,5,7,11,13,14,15},{3,5,7,11,13,15},{3,5,7,11,14},{3,5,7,11,14,15},{3,5,7,11,15},{3,5,7,12},{3,5,7,12,13},{3,5,7,12,13,14},{3,5,7,12,13,14,15},{3,5,7,12,13,15},{3,5,7,12,14},{3,5,7,12,14,15},{3,5,7,12,15},{3,5,7,13},{3,5,7,13,14},{3,5,7,13,14,15},{3,5,7,13,15},{3,5,7,14},{3,5,7,14,15},{3,5,7,15},{3,5,8},{3,5,8,9},{3,5,8,9,10},{3,5,8,9,10,11},{3,5,8,9,10,11,12},{3,5,8,9,10,11,12,13},{3,5,8,9,10,11,12,13,14},{3,5,8,9,10,11,12,13,14,15},{3,5,8,9,10,11,12,13,15},{3,5,8,9,10,11,12,14},{3,5,8,9,10,11,12,14,15},{3,5,8,9,10,11,12,15},{3,5,8,9,10,11,13},{3,5,8,9,10,11,13,14},{3,5,8,9,10,11,13,14,15},{3,5,8,9,10,11,13,15},{3,5,8,9,10,11,14},{3,5,8,9,10,11,14,15},{3,5,8,9,10,11,15},{3,5,8,9,10,12},{3,5,8,9,10,12,13},{3,5,8,9,10,12,13,14},{3,5,8,9,10,12,13,14,15},{3,5,8,9,10,12,13,15},{3,5,8,9,10,12,14},{3,5,8,9,10,12,14,15},{3,5,8,9,10,12,15},{3,5,8,9,10,13},{3,5,8,9,10,13,14},{3,5,8,9,10,13,14,15},{3,5,8,9,10,13,15},{3,5,8,9,10,14},{3,5,8,9,10,14,15},{3,5,8,9,10,15},{3,5,8,9,11},{3,5,8,9,11,12},{3,5,8,9,11,12,13},{3,5,8,9,11,12,13,14},{3,5,8,9,11,12,13,14,15},{3,5,8,9,11,12,13,15},{3,5,8,9,11,12,14},{3,5,8,9,11,12,14,15},{3,5,8,9,11,12,15},{3,5,8,9,11,13},{3,5,8,9,11,13,14},{3,5,8,9,11,13,14,15},{3,5,8,9,11,13,15},{3,5,8,9,11,14},{3,5,8,9,11,14,15},{3,5,8,9,11,15},{3,5,8,9,12},{3,5,8,9,12,13},{3,5,8,9,12,13,14},{3,5,8,9,12,13,14,15},{3,5,8,9,12,13,15},{3,5,8,9,12,14},{3,5,8,9,12,14,15},{3,5,8,9,12,15},{3,5,8,9,13},{3,5,8,9,13,14},{3,5,8,9,13,14,15},{3,5,8,9,13,15},{3,5,8,9,14},{3,5,8,9,14,15},{3,5,8,9,15},{3,5,8,10},{3,5,8,10,11},{3,5,8,10,11,12},{3,5,8,10,11,12,13},{3,5,8,10,11,12,13,14},{3,5,8,10,11,12,13,14,15},{3,5,8,10,11,12,13,15},{3,5,8,10,11,12,14},{3,5,8,10,11,12,14,15},{3,5,8,10,11,12,15},{3,5,8,10,11,13},{3,5,8,10,11,13,14},{3,5,8,10,11,13,14,15},{3,5,8,10,11,13,15},{3,5,8,10,11,14},{3,5,8,10,11,14,15},{3,5,8,10,11,15},{3,5,8,10,12},{3,5,8,10,12,13},{3,5,8,10,12,13,14},{3,5,8,10,12,13,14,15},{3,5,8,10,12,13,15},{3,5,8,10,12,14},{3,5,8,10,12,14,15},{3,5,8,10,12,15},{3,5,8,10,13},{3,5,8,10,13,14},{3,5,8,10,13,14,15},{3,5,8,10,13,15},{3,5,8,10,14},{3,5,8,10,14,15},{3,5,8,10,15},{3,5,8,11},{3,5,8,11,12},{3,5,8,11,12,13},{3,5,8,11,12,13,14},{3,5,8,11,12,13,14,15},{3,5,8,11,12,13,15},{3,5,8,11,12,14},{3,5,8,11,12,14,15},{3,5,8,11,12,15},{3,5,8,11,13},{3,5,8,11,13,14},{3,5,8,11,13,14,15},{3,5,8,11,13,15},{3,5,8,11,14},{3,5,8,11,14,15},{3,5,8,11,15},{3,5,8,12},{3,5,8,12,13},{3,5,8,12,13,14},{3,5,8,12,13,14,15},{3,5,8,12,13,15},{3,5,8,12,14},{3,5,8,12,14,15},{3,5,8,12,15},{3,5,8,13},{3,5,8,13,14},{3,5,8,13,14,15},{3,5,8,13,15},{3,5,8,14},{3,5,8,14,15},{3,5,8,15},{3,5,9},{3,5,9,10},{3,5,9,10,11},{3,5,9,10,11,12},{3,5,9,10,11,12,13},{3,5,9,10,11,12,13,14},{3,5,9,10,11,12,13,14,15},{3,5,9,10,11,12,13,15},{3,5,9,10,11,12,14},{3,5,9,10,11,12,14,15},{3,5,9,10,11,12,15},{3,5,9,10,11,13},{3,5,9,10,11,13,14},{3,5,9,10,11,13,14,15},{3,5,9,10,11,13,15},{3,5,9,10,11,14},{3,5,9,10,11,14,15},{3,5,9,10,11,15},{3,5,9,10,12},{3,5,9,10,12,13},{3,5,9,10,12,13,14},{3,5,9,10,12,13,14,15},{3,5,9,10,12,13,15},{3,5,9,10,12,14},{3,5,9,10,12,14,15},{3,5,9,10,12,15},{3,5,9,10,13},{3,5,9,10,13,14},{3,5,9,10,13,14,15},{3,5,9,10,13,15},{3,5,9,10,14},{3,5,9,10,14,15},{3,5,9,10,15},{3,5,9,11},{3,5,9,11,12},{3,5,9,11,12,13},{3,5,9,11,12,13,14},{3,5,9,11,12,13,14,15},{3,5,9,11,12,13,15},{3,5,9,11,12,14},{3,5,9,11,12,14,15},{3,5,9,11,12,15},{3,5,9,11,13},{3,5,9,11,13,14},{3,5,9,11,13,14,15},{3,5,9,11,13,15},{3,5,9,11,14},{3,5,9,11,14,15},{3,5,9,11,15},{3,5,9,12},{3,5,9,12,13},{3,5,9,12,13,14},{3,5,9,12,13,14,15},{3,5,9,12,13,15},{3,5,9,12,14},{3,5,9,12,14,15},{3,5,9,12,15},{3,5,9,13},{3,5,9,13,14},{3,5,9,13,14,15},{3,5,9,13,15},{3,5,9,14},{3,5,9,14,15},{3,5,9,15},{3,5,10},{3,5,10,11},{3,5,10,11,12},{3,5,10,11,12,13},{3,5,10,11,12,13,14},{3,5,10,11,12,13,14,15},{3,5,10,11,12,13,15},{3,5,10,11,12,14},{3,5,10,11,12,14,15},{3,5,10,11,12,15},{3,5,10,11,13},{3,5,10,11,13,14},{3,5,10,11,13,14,15},{3,5,10,11,13,15},{3,5,10,11,14},{3,5,10,11,14,15},{3,5,10,11,15},{3,5,10,12},{3,5,10,12,13},{3,5,10,12,13,14},{3,5,10,12,13,14,15},{3,5,10,12,13,15},{3,5,10,12,14},{3,5,10,12,14,15},{3,5,10,12,15},{3,5,10,13},{3,5,10,13,14},{3,5,10,13,14,15},{3,5,10,13,15},{3,5,10,14},{3,5,10,14,15},{3,5,10,15},{3,5,11},{3,5,11,12},{3,5,11,12,13},{3,5,11,12,13,14},{3,5,11,12,13,14,15},{3,5,11,12,13,15},{3,5,11,12,14},{3,5,11,12,14,15},{3,5,11,12,15},{3,5,11,13},{3,5,11,13,14},{3,5,11,13,14,15},{3,5,11,13,15},{3,5,11,14},{3,5,11,14,15},{3,5,11,15},{3,5,12},{3,5,12,13},{3,5,12,13,14},{3,5,12,13,14,15},{3,5,12,13,15},{3,5,12,14},{3,5,12,14,15},{3,5,12,15},{3,5,13},{3,5,13,14},{3,5,13,14,15},{3,5,13,15},{3,5,14},{3,5,14,15},{3,5,15},{3,6},{3,6,7},{3,6,7,8},{3,6,7,8,9},{3,6,7,8,9,10},{3,6,7,8,9,10,11},{3,6,7,8,9,10,11,12},{3,6,7,8,9,10,11,12,13},{3,6,7,8,9,10,11,12,13,14},{3,6,7,8,9,10,11,12,13,14,15},{3,6,7,8,9,10,11,12,13,15},{3,6,7,8,9,10,11,12,14},{3,6,7,8,9,10,11,12,14,15},{3,6,7,8,9,10,11,12,15},{3,6,7,8,9,10,11,13},{3,6,7,8,9,10,11,13,14},{3,6,7,8,9,10,11,13,14,15},{3,6,7,8,9,10,11,13,15},{3,6,7,8,9,10,11,14},{3,6,7,8,9,10,11,14,15},{3,6,7,8,9,10,11,15},{3,6,7,8,9,10,12},{3,6,7,8,9,10,12,13},{3,6,7,8,9,10,12,13,14},{3,6,7,8,9,10,12,13,14,15},{3,6,7,8,9,10,12,13,15},{3,6,7,8,9,10,12,14},{3,6,7,8,9,10,12,14,15},{3,6,7,8,9,10,12,15},{3,6,7,8,9,10,13},{3,6,7,8,9,10,13,14},{3,6,7,8,9,10,13,14,15},{3,6,7,8,9,10,13,15},{3,6,7,8,9,10,14},{3,6,7,8,9,10,14,15},{3,6,7,8,9,10,15},{3,6,7,8,9,11},{3,6,7,8,9,11,12},{3,6,7,8,9,11,12,13},{3,6,7,8,9,11,12,13,14},{3,6,7,8,9,11,12,13,14,15},{3,6,7,8,9,11,12,13,15},{3,6,7,8,9,11,12,14},{3,6,7,8,9,11,12,14,15},{3,6,7,8,9,11,12,15},{3,6,7,8,9,11,13},{3,6,7,8,9,11,13,14},{3,6,7,8,9,11,13,14,15},{3,6,7,8,9,11,13,15},{3,6,7,8,9,11,14},{3,6,7,8,9,11,14,15},{3,6,7,8,9,11,15},{3,6,7,8,9,12},{3,6,7,8,9,12,13},{3,6,7,8,9,12,13,14},{3,6,7,8,9,12,13,14,15},{3,6,7,8,9,12,13,15},{3,6,7,8,9,12,14},{3,6,7,8,9,12,14,15},{3,6,7,8,9,12,15},{3,6,7,8,9,13},{3,6,7,8,9,13,14},{3,6,7,8,9,13,14,15},{3,6,7,8,9,13,15},{3,6,7,8,9,14},{3,6,7,8,9,14,15},{3,6,7,8,9,15},{3,6,7,8,10},{3,6,7,8,10,11},{3,6,7,8,10,11,12},{3,6,7,8,10,11,12,13},{3,6,7,8,10,11,12,13,14},{3,6,7,8,10,11,12,13,14,15},{3,6,7,8,10,11,12,13,15},{3,6,7,8,10,11,12,14},{3,6,7,8,10,11,12,14,15},{3,6,7,8,10,11,12,15},{3,6,7,8,10,11,13},{3,6,7,8,10,11,13,14},{3,6,7,8,10,11,13,14,15},{3,6,7,8,10,11,13,15},{3,6,7,8,10,11,14},{3,6,7,8,10,11,14,15},{3,6,7,8,10,11,15},{3,6,7,8,10,12},{3,6,7,8,10,12,13},{3,6,7,8,10,12,13,14},{3,6,7,8,10,12,13,14,15},{3,6,7,8,10,12,13,15},{3,6,7,8,10,12,14},{3,6,7,8,10,12,14,15},{3,6,7,8,10,12,15},{3,6,7,8,10,13},{3,6,7,8,10,13,14},{3,6,7,8,10,13,14,15},{3,6,7,8,10,13,15},{3,6,7,8,10,14},{3,6,7,8,10,14,15},{3,6,7,8,10,15},{3,6,7,8,11},{3,6,7,8,11,12},{3,6,7,8,11,12,13},{3,6,7,8,11,12,13,14},{3,6,7,8,11,12,13,14,15},{3,6,7,8,11,12,13,15},{3,6,7,8,11,12,14},{3,6,7,8,11,12,14,15},{3,6,7,8,11,12,15},{3,6,7,8,11,13},{3,6,7,8,11,13,14},{3,6,7,8,11,13,14,15},{3,6,7,8,11,13,15},{3,6,7,8,11,14},{3,6,7,8,11,14,15},{3,6,7,8,11,15},{3,6,7,8,12},{3,6,7,8,12,13},{3,6,7,8,12,13,14},{3,6,7,8,12,13,14,15},{3,6,7,8,12,13,15},{3,6,7,8,12,14},{3,6,7,8,12,14,15},{3,6,7,8,12,15},{3,6,7,8,13},{3,6,7,8,13,14},{3,6,7,8,13,14,15},{3,6,7,8,13,15},{3,6,7,8,14},{3,6,7,8,14,15},{3,6,7,8,15},{3,6,7,9},{3,6,7,9,10},{3,6,7,9,10,11},{3,6,7,9,10,11,12},{3,6,7,9,10,11,12,13},{3,6,7,9,10,11,12,13,14},{3,6,7,9,10,11,12,13,14,15},{3,6,7,9,10,11,12,13,15},{3,6,7,9,10,11,12,14},{3,6,7,9,10,11,12,14,15},{3,6,7,9,10,11,12,15},{3,6,7,9,10,11,13},{3,6,7,9,10,11,13,14},{3,6,7,9,10,11,13,14,15},{3,6,7,9,10,11,13,15},{3,6,7,9,10,11,14},{3,6,7,9,10,11,14,15},{3,6,7,9,10,11,15},{3,6,7,9,10,12},{3,6,7,9,10,12,13},{3,6,7,9,10,12,13,14},{3,6,7,9,10,12,13,14,15},{3,6,7,9,10,12,13,15},{3,6,7,9,10,12,14},{3,6,7,9,10,12,14,15},{3,6,7,9,10,12,15},{3,6,7,9,10,13},{3,6,7,9,10,13,14},{3,6,7,9,10,13,14,15},{3,6,7,9,10,13,15},{3,6,7,9,10,14},{3,6,7,9,10,14,15},{3,6,7,9,10,15},{3,6,7,9,11},{3,6,7,9,11,12},{3,6,7,9,11,12,13},{3,6,7,9,11,12,13,14},{3,6,7,9,11,12,13,14,15},{3,6,7,9,11,12,13,15},{3,6,7,9,11,12,14},{3,6,7,9,11,12,14,15},{3,6,7,9,11,12,15},{3,6,7,9,11,13},{3,6,7,9,11,13,14},{3,6,7,9,11,13,14,15},{3,6,7,9,11,13,15},{3,6,7,9,11,14},{3,6,7,9,11,14,15},{3,6,7,9,11,15},{3,6,7,9,12},{3,6,7,9,12,13},{3,6,7,9,12,13,14},{3,6,7,9,12,13,14,15},{3,6,7,9,12,13,15},{3,6,7,9,12,14},{3,6,7,9,12,14,15},{3,6,7,9,12,15},{3,6,7,9,13},{3,6,7,9,13,14},{3,6,7,9,13,14,15},{3,6,7,9,13,15},{3,6,7,9,14},{3,6,7,9,14,15},{3,6,7,9,15},{3,6,7,10},{3,6,7,10,11},{3,6,7,10,11,12},{3,6,7,10,11,12,13},{3,6,7,10,11,12,13,14},{3,6,7,10,11,12,13,14,15},{3,6,7,10,11,12,13,15},{3,6,7,10,11,12,14},{3,6,7,10,11,12,14,15},{3,6,7,10,11,12,15},{3,6,7,10,11,13},{3,6,7,10,11,13,14},{3,6,7,10,11,13,14,15},{3,6,7,10,11,13,15},{3,6,7,10,11,14},{3,6,7,10,11,14,15},{3,6,7,10,11,15},{3,6,7,10,12},{3,6,7,10,12,13},{3,6,7,10,12,13,14},{3,6,7,10,12,13,14,15},{3,6,7,10,12,13,15},{3,6,7,10,12,14},{3,6,7,10,12,14,15},{3,6,7,10,12,15},{3,6,7,10,13},{3,6,7,10,13,14},{3,6,7,10,13,14,15},{3,6,7,10,13,15},{3,6,7,10,14},{3,6,7,10,14,15},{3,6,7,10,15},{3,6,7,11},{3,6,7,11,12},{3,6,7,11,12,13},{3,6,7,11,12,13,14},{3,6,7,11,12,13,14,15},{3,6,7,11,12,13,15},{3,6,7,11,12,14},{3,6,7,11,12,14,15},{3,6,7,11,12,15},{3,6,7,11,13},{3,6,7,11,13,14},{3,6,7,11,13,14,15},{3,6,7,11,13,15},{3,6,7,11,14},{3,6,7,11,14,15},{3,6,7,11,15},{3,6,7,12},{3,6,7,12,13},{3,6,7,12,13,14},{3,6,7,12,13,14,15},{3,6,7,12,13,15},{3,6,7,12,14},{3,6,7,12,14,15},{3,6,7,12,15},{3,6,7,13},{3,6,7,13,14},{3,6,7,13,14,15},{3,6,7,13,15},{3,6,7,14},{3,6,7,14,15},{3,6,7,15},{3,6,8},{3,6,8,9},{3,6,8,9,10},{3,6,8,9,10,11},{3,6,8,9,10,11,12},{3,6,8,9,10,11,12,13},{3,6,8,9,10,11,12,13,14},{3,6,8,9,10,11,12,13,14,15},{3,6,8,9,10,11,12,13,15},{3,6,8,9,10,11,12,14},{3,6,8,9,10,11,12,14,15},{3,6,8,9,10,11,12,15},{3,6,8,9,10,11,13},{3,6,8,9,10,11,13,14},{3,6,8,9,10,11,13,14,15},{3,6,8,9,10,11,13,15},{3,6,8,9,10,11,14},{3,6,8,9,10,11,14,15},{3,6,8,9,10,11,15},{3,6,8,9,10,12},{3,6,8,9,10,12,13},{3,6,8,9,10,12,13,14},{3,6,8,9,10,12,13,14,15},{3,6,8,9,10,12,13,15},{3,6,8,9,10,12,14},{3,6,8,9,10,12,14,15},{3,6,8,9,10,12,15},{3,6,8,9,10,13},{3,6,8,9,10,13,14},{3,6,8,9,10,13,14,15},{3,6,8,9,10,13,15},{3,6,8,9,10,14},{3,6,8,9,10,14,15},{3,6,8,9,10,15},{3,6,8,9,11},{3,6,8,9,11,12},{3,6,8,9,11,12,13},{3,6,8,9,11,12,13,14},{3,6,8,9,11,12,13,14,15},{3,6,8,9,11,12,13,15},{3,6,8,9,11,12,14},{3,6,8,9,11,12,14,15},{3,6,8,9,11,12,15},{3,6,8,9,11,13},{3,6,8,9,11,13,14},{3,6,8,9,11,13,14,15},{3,6,8,9,11,13,15},{3,6,8,9,11,14},{3,6,8,9,11,14,15},{3,6,8,9,11,15},{3,6,8,9,12},{3,6,8,9,12,13},{3,6,8,9,12,13,14},{3,6,8,9,12,13,14,15},{3,6,8,9,12,13,15},{3,6,8,9,12,14},{3,6,8,9,12,14,15},{3,6,8,9,12,15},{3,6,8,9,13},{3,6,8,9,13,14},{3,6,8,9,13,14,15},{3,6,8,9,13,15},{3,6,8,9,14},{3,6,8,9,14,15},{3,6,8,9,15},{3,6,8,10},{3,6,8,10,11},{3,6,8,10,11,12},{3,6,8,10,11,12,13},{3,6,8,10,11,12,13,14},{3,6,8,10,11,12,13,14,15},{3,6,8,10,11,12,13,15},{3,6,8,10,11,12,14},{3,6,8,10,11,12,14,15},{3,6,8,10,11,12,15},{3,6,8,10,11,13},{3,6,8,10,11,13,14},{3,6,8,10,11,13,14,15},{3,6,8,10,11,13,15},{3,6,8,10,11,14},{3,6,8,10,11,14,15},{3,6,8,10,11,15},{3,6,8,10,12},{3,6,8,10,12,13},{3,6,8,10,12,13,14},{3,6,8,10,12,13,14,15},{3,6,8,10,12,13,15},{3,6,8,10,12,14},{3,6,8,10,12,14,15},{3,6,8,10,12,15},{3,6,8,10,13},{3,6,8,10,13,14},{3,6,8,10,13,14,15},{3,6,8,10,13,15},{3,6,8,10,14},{3,6,8,10,14,15},{3,6,8,10,15},{3,6,8,11},{3,6,8,11,12},{3,6,8,11,12,13},{3,6,8,11,12,13,14},{3,6,8,11,12,13,14,15},{3,6,8,11,12,13,15},{3,6,8,11,12,14},{3,6,8,11,12,14,15},{3,6,8,11,12,15},{3,6,8,11,13},{3,6,8,11,13,14},{3,6,8,11,13,14,15},{3,6,8,11,13,15},{3,6,8,11,14},{3,6,8,11,14,15},{3,6,8,11,15},{3,6,8,12},{3,6,8,12,13},{3,6,8,12,13,14},{3,6,8,12,13,14,15},{3,6,8,12,13,15},{3,6,8,12,14},{3,6,8,12,14,15},{3,6,8,12,15},{3,6,8,13},{3,6,8,13,14},{3,6,8,13,14,15},{3,6,8,13,15},{3,6,8,14},{3,6,8,14,15},{3,6,8,15},{3,6,9},{3,6,9,10},{3,6,9,10,11},{3,6,9,10,11,12},{3,6,9,10,11,12,13},{3,6,9,10,11,12,13,14},{3,6,9,10,11,12,13,14,15},{3,6,9,10,11,12,13,15},{3,6,9,10,11,12,14},{3,6,9,10,11,12,14,15},{3,6,9,10,11,12,15},{3,6,9,10,11,13},{3,6,9,10,11,13,14},{3,6,9,10,11,13,14,15},{3,6,9,10,11,13,15},{3,6,9,10,11,14},{3,6,9,10,11,14,15},{3,6,9,10,11,15},{3,6,9,10,12},{3,6,9,10,12,13},{3,6,9,10,12,13,14},{3,6,9,10,12,13,14,15},{3,6,9,10,12,13,15},{3,6,9,10,12,14},{3,6,9,10,12,14,15},{3,6,9,10,12,15},{3,6,9,10,13},{3,6,9,10,13,14},{3,6,9,10,13,14,15},{3,6,9,10,13,15},{3,6,9,10,14},{3,6,9,10,14,15},{3,6,9,10,15},{3,6,9,11},{3,6,9,11,12},{3,6,9,11,12,13},{3,6,9,11,12,13,14},{3,6,9,11,12,13,14,15},{3,6,9,11,12,13,15},{3,6,9,11,12,14},{3,6,9,11,12,14,15},{3,6,9,11,12,15},{3,6,9,11,13},{3,6,9,11,13,14},{3,6,9,11,13,14,15},{3,6,9,11,13,15},{3,6,9,11,14},{3,6,9,11,14,15},{3,6,9,11,15},{3,6,9,12},{3,6,9,12,13},{3,6,9,12,13,14},{3,6,9,12,13,14,15},{3,6,9,12,13,15},{3,6,9,12,14},{3,6,9,12,14,15},{3,6,9,12,15},{3,6,9,13},{3,6,9,13,14},{3,6,9,13,14,15},{3,6,9,13,15},{3,6,9,14},{3,6,9,14,15},{3,6,9,15},{3,6,10},{3,6,10,11},{3,6,10,11,12},{3,6,10,11,12,13},{3,6,10,11,12,13,14},{3,6,10,11,12,13,14,15},{3,6,10,11,12,13,15},{3,6,10,11,12,14},{3,6,10,11,12,14,15},{3,6,10,11,12,15},{3,6,10,11,13},{3,6,10,11,13,14},{3,6,10,11,13,14,15},{3,6,10,11,13,15},{3,6,10,11,14},{3,6,10,11,14,15},{3,6,10,11,15},{3,6,10,12},{3,6,10,12,13},{3,6,10,12,13,14},{3,6,10,12,13,14,15},{3,6,10,12,13,15},{3,6,10,12,14},{3,6,10,12,14,15},{3,6,10,12,15},{3,6,10,13},{3,6,10,13,14},{3,6,10,13,14,15},{3,6,10,13,15},{3,6,10,14},{3,6,10,14,15},{3,6,10,15},{3,6,11},{3,6,11,12},{3,6,11,12,13},{3,6,11,12,13,14},{3,6,11,12,13,14,15},{3,6,11,12,13,15},{3,6,11,12,14},{3,6,11,12,14,15},{3,6,11,12,15},{3,6,11,13},{3,6,11,13,14},{3,6,11,13,14,15},{3,6,11,13,15},{3,6,11,14},{3,6,11,14,15},{3,6,11,15},{3,6,12},{3,6,12,13},{3,6,12,13,14},{3,6,12,13,14,15},{3,6,12,13,15},{3,6,12,14},{3,6,12,14,15},{3,6,12,15},{3,6,13},{3,6,13,14},{3,6,13,14,15},{3,6,13,15},{3,6,14},{3,6,14,15},{3,6,15},{3,7},{3,7,8},{3,7,8,9},{3,7,8,9,10},{3,7,8,9,10,11},{3,7,8,9,10,11,12},{3,7,8,9,10,11,12,13},{3,7,8,9,10,11,12,13,14},{3,7,8,9,10,11,12,13,14,15},{3,7,8,9,10,11,12,13,15},{3,7,8,9,10,11,12,14},{3,7,8,9,10,11,12,14,15},{3,7,8,9,10,11,12,15},{3,7,8,9,10,11,13},{3,7,8,9,10,11,13,14},{3,7,8,9,10,11,13,14,15},{3,7,8,9,10,11,13,15},{3,7,8,9,10,11,14},{3,7,8,9,10,11,14,15},{3,7,8,9,10,11,15},{3,7,8,9,10,12},{3,7,8,9,10,12,13},{3,7,8,9,10,12,13,14},{3,7,8,9,10,12,13,14,15},{3,7,8,9,10,12,13,15},{3,7,8,9,10,12,14},{3,7,8,9,10,12,14,15},{3,7,8,9,10,12,15},{3,7,8,9,10,13},{3,7,8,9,10,13,14},{3,7,8,9,10,13,14,15},{3,7,8,9,10,13,15},{3,7,8,9,10,14},{3,7,8,9,10,14,15},{3,7,8,9,10,15},{3,7,8,9,11},{3,7,8,9,11,12},{3,7,8,9,11,12,13},{3,7,8,9,11,12,13,14},{3,7,8,9,11,12,13,14,15},{3,7,8,9,11,12,13,15},{3,7,8,9,11,12,14},{3,7,8,9,11,12,14,15},{3,7,8,9,11,12,15},{3,7,8,9,11,13},{3,7,8,9,11,13,14},{3,7,8,9,11,13,14,15},{3,7,8,9,11,13,15},{3,7,8,9,11,14},{3,7,8,9,11,14,15},{3,7,8,9,11,15},{3,7,8,9,12},{3,7,8,9,12,13},{3,7,8,9,12,13,14},{3,7,8,9,12,13,14,15},{3,7,8,9,12,13,15},{3,7,8,9,12,14},{3,7,8,9,12,14,15},{3,7,8,9,12,15},{3,7,8,9,13},{3,7,8,9,13,14},{3,7,8,9,13,14,15},{3,7,8,9,13,15},{3,7,8,9,14},{3,7,8,9,14,15},{3,7,8,9,15},{3,7,8,10},{3,7,8,10,11},{3,7,8,10,11,12},{3,7,8,10,11,12,13},{3,7,8,10,11,12,13,14},{3,7,8,10,11,12,13,14,15},{3,7,8,10,11,12,13,15},{3,7,8,10,11,12,14},{3,7,8,10,11,12,14,15},{3,7,8,10,11,12,15},{3,7,8,10,11,13},{3,7,8,10,11,13,14},{3,7,8,10,11,13,14,15},{3,7,8,10,11,13,15},{3,7,8,10,11,14},{3,7,8,10,11,14,15},{3,7,8,10,11,15},{3,7,8,10,12},{3,7,8,10,12,13},{3,7,8,10,12,13,14},{3,7,8,10,12,13,14,15},{3,7,8,10,12,13,15},{3,7,8,10,12,14},{3,7,8,10,12,14,15},{3,7,8,10,12,15},{3,7,8,10,13},{3,7,8,10,13,14},{3,7,8,10,13,14,15},{3,7,8,10,13,15},{3,7,8,10,14},{3,7,8,10,14,15},{3,7,8,10,15},{3,7,8,11},{3,7,8,11,12},{3,7,8,11,12,13},{3,7,8,11,12,13,14},{3,7,8,11,12,13,14,15},{3,7,8,11,12,13,15},{3,7,8,11,12,14},{3,7,8,11,12,14,15},{3,7,8,11,12,15},{3,7,8,11,13},{3,7,8,11,13,14},{3,7,8,11,13,14,15},{3,7,8,11,13,15},{3,7,8,11,14},{3,7,8,11,14,15},{3,7,8,11,15},{3,7,8,12},{3,7,8,12,13},{3,7,8,12,13,14},{3,7,8,12,13,14,15},{3,7,8,12,13,15},{3,7,8,12,14},{3,7,8,12,14,15},{3,7,8,12,15},{3,7,8,13},{3,7,8,13,14},{3,7,8,13,14,15},{3,7,8,13,15},{3,7,8,14},{3,7,8,14,15},{3,7,8,15},{3,7,9},{3,7,9,10},{3,7,9,10,11},{3,7,9,10,11,12},{3,7,9,10,11,12,13},{3,7,9,10,11,12,13,14},{3,7,9,10,11,12,13,14,15},{3,7,9,10,11,12,13,15},{3,7,9,10,11,12,14},{3,7,9,10,11,12,14,15},{3,7,9,10,11,12,15},{3,7,9,10,11,13},{3,7,9,10,11,13,14},{3,7,9,10,11,13,14,15},{3,7,9,10,11,13,15},{3,7,9,10,11,14},{3,7,9,10,11,14,15},{3,7,9,10,11,15},{3,7,9,10,12},{3,7,9,10,12,13},{3,7,9,10,12,13,14},{3,7,9,10,12,13,14,15},{3,7,9,10,12,13,15},{3,7,9,10,12,14},{3,7,9,10,12,14,15},{3,7,9,10,12,15},{3,7,9,10,13},{3,7,9,10,13,14},{3,7,9,10,13,14,15},{3,7,9,10,13,15},{3,7,9,10,14},{3,7,9,10,14,15},{3,7,9,10,15},{3,7,9,11},{3,7,9,11,12},{3,7,9,11,12,13},{3,7,9,11,12,13,14},{3,7,9,11,12,13,14,15},{3,7,9,11,12,13,15},{3,7,9,11,12,14},{3,7,9,11,12,14,15},{3,7,9,11,12,15},{3,7,9,11,13},{3,7,9,11,13,14},{3,7,9,11,13,14,15},{3,7,9,11,13,15},{3,7,9,11,14},{3,7,9,11,14,15},{3,7,9,11,15},{3,7,9,12},{3,7,9,12,13},{3,7,9,12,13,14},{3,7,9,12,13,14,15},{3,7,9,12,13,15},{3,7,9,12,14},{3,7,9,12,14,15},{3,7,9,12,15},{3,7,9,13},{3,7,9,13,14},{3,7,9,13,14,15},{3,7,9,13,15},{3,7,9,14},{3,7,9,14,15},{3,7,9,15},{3,7,10},{3,7,10,11},{3,7,10,11,12},{3,7,10,11,12,13},{3,7,10,11,12,13,14},{3,7,10,11,12,13,14,15},{3,7,10,11,12,13,15},{3,7,10,11,12,14},{3,7,10,11,12,14,15},{3,7,10,11,12,15},{3,7,10,11,13},{3,7,10,11,13,14},{3,7,10,11,13,14,15},{3,7,10,11,13,15},{3,7,10,11,14},{3,7,10,11,14,15},{3,7,10,11,15},{3,7,10,12},{3,7,10,12,13},{3,7,10,12,13,14},{3,7,10,12,13,14,15},{3,7,10,12,13,15},{3,7,10,12,14},{3,7,10,12,14,15},{3,7,10,12,15},{3,7,10,13},{3,7,10,13,14},{3,7,10,13,14,15},{3,7,10,13,15},{3,7,10,14},{3,7,10,14,15},{3,7,10,15},{3,7,11},{3,7,11,12},{3,7,11,12,13},{3,7,11,12,13,14},{3,7,11,12,13,14,15},{3,7,11,12,13,15},{3,7,11,12,14},{3,7,11,12,14,15},{3,7,11,12,15},{3,7,11,13},{3,7,11,13,14},{3,7,11,13,14,15},{3,7,11,13,15},{3,7,11,14},{3,7,11,14,15},{3,7,11,15},{3,7,12},{3,7,12,13},{3,7,12,13,14},{3,7,12,13,14,15},{3,7,12,13,15},{3,7,12,14},{3,7,12,14,15},{3,7,12,15},{3,7,13},{3,7,13,14},{3,7,13,14,15},{3,7,13,15},{3,7,14},{3,7,14,15},{3,7,15},{3,8},{3,8,9},{3,8,9,10},{3,8,9,10,11},{3,8,9,10,11,12},{3,8,9,10,11,12,13},{3,8,9,10,11,12,13,14},{3,8,9,10,11,12,13,14,15},{3,8,9,10,11,12,13,15},{3,8,9,10,11,12,14},{3,8,9,10,11,12,14,15},{3,8,9,10,11,12,15},{3,8,9,10,11,13},{3,8,9,10,11,13,14},{3,8,9,10,11,13,14,15},{3,8,9,10,11,13,15},{3,8,9,10,11,14},{3,8,9,10,11,14,15},{3,8,9,10,11,15},{3,8,9,10,12},{3,8,9,10,12,13},{3,8,9,10,12,13,14},{3,8,9,10,12,13,14,15},{3,8,9,10,12,13,15},{3,8,9,10,12,14},{3,8,9,10,12,14,15},{3,8,9,10,12,15},{3,8,9,10,13},{3,8,9,10,13,14},{3,8,9,10,13,14,15},{3,8,9,10,13,15},{3,8,9,10,14},{3,8,9,10,14,15},{3,8,9,10,15},{3,8,9,11},{3,8,9,11,12},{3,8,9,11,12,13},{3,8,9,11,12,13,14},{3,8,9,11,12,13,14,15},{3,8,9,11,12,13,15},{3,8,9,11,12,14},{3,8,9,11,12,14,15},{3,8,9,11,12,15},{3,8,9,11,13},{3,8,9,11,13,14},{3,8,9,11,13,14,15},{3,8,9,11,13,15},{3,8,9,11,14},{3,8,9,11,14,15},{3,8,9,11,15},{3,8,9,12},{3,8,9,12,13},{3,8,9,12,13,14},{3,8,9,12,13,14,15},{3,8,9,12,13,15},{3,8,9,12,14},{3,8,9,12,14,15},{3,8,9,12,15},{3,8,9,13},{3,8,9,13,14},{3,8,9,13,14,15},{3,8,9,13,15},{3,8,9,14},{3,8,9,14,15},{3,8,9,15},{3,8,10},{3,8,10,11},{3,8,10,11,12},{3,8,10,11,12,13},{3,8,10,11,12,13,14},{3,8,10,11,12,13,14,15},{3,8,10,11,12,13,15},{3,8,10,11,12,14},{3,8,10,11,12,14,15},{3,8,10,11,12,15},{3,8,10,11,13},{3,8,10,11,13,14},{3,8,10,11,13,14,15},{3,8,10,11,13,15},{3,8,10,11,14},{3,8,10,11,14,15},{3,8,10,11,15},{3,8,10,12},{3,8,10,12,13},{3,8,10,12,13,14},{3,8,10,12,13,14,15},{3,8,10,12,13,15},{3,8,10,12,14},{3,8,10,12,14,15},{3,8,10,12,15},{3,8,10,13},{3,8,10,13,14},{3,8,10,13,14,15},{3,8,10,13,15},{3,8,10,14},{3,8,10,14,15},{3,8,10,15},{3,8,11},{3,8,11,12},{3,8,11,12,13},{3,8,11,12,13,14},{3,8,11,12,13,14,15},{3,8,11,12,13,15},{3,8,11,12,14},{3,8,11,12,14,15},{3,8,11,12,15},{3,8,11,13},{3,8,11,13,14},{3,8,11,13,14,15},{3,8,11,13,15},{3,8,11,14},{3,8,11,14,15},{3,8,11,15},{3,8,12},{3,8,12,13},{3,8,12,13,14},{3,8,12,13,14,15},{3,8,12,13,15},{3,8,12,14},{3,8,12,14,15},{3,8,12,15},{3,8,13},{3,8,13,14},{3,8,13,14,15},{3,8,13,15},{3,8,14},{3,8,14,15},{3,8,15},{3,9},{3,9,10},{3,9,10,11},{3,9,10,11,12},{3,9,10,11,12,13},{3,9,10,11,12,13,14},{3,9,10,11,12,13,14,15},{3,9,10,11,12,13,15},{3,9,10,11,12,14},{3,9,10,11,12,14,15},{3,9,10,11,12,15},{3,9,10,11,13},{3,9,10,11,13,14},{3,9,10,11,13,14,15},{3,9,10,11,13,15},{3,9,10,11,14},{3,9,10,11,14,15},{3,9,10,11,15},{3,9,10,12},{3,9,10,12,13},{3,9,10,12,13,14},{3,9,10,12,13,14,15},{3,9,10,12,13,15},{3,9,10,12,14},{3,9,10,12,14,15},{3,9,10,12,15},{3,9,10,13},{3,9,10,13,14},{3,9,10,13,14,15},{3,9,10,13,15},{3,9,10,14},{3,9,10,14,15},{3,9,10,15},{3,9,11},{3,9,11,12},{3,9,11,12,13},{3,9,11,12,13,14},{3,9,11,12,13,14,15},{3,9,11,12,13,15},{3,9,11,12,14},{3,9,11,12,14,15},{3,9,11,12,15},{3,9,11,13},{3,9,11,13,14},{3,9,11,13,14,15},{3,9,11,13,15},{3,9,11,14},{3,9,11,14,15},{3,9,11,15},{3,9,12},{3,9,12,13},{3,9,12,13,14},{3,9,12,13,14,15},{3,9,12,13,15},{3,9,12,14},{3,9,12,14,15},{3,9,12,15},{3,9,13},{3,9,13,14},{3,9,13,14,15},{3,9,13,15},{3,9,14},{3,9,14,15},{3,9,15},{3,10},{3,10,11},{3,10,11,12},{3,10,11,12,13},{3,10,11,12,13,14},{3,10,11,12,13,14,15},{3,10,11,12,13,15},{3,10,11,12,14},{3,10,11,12,14,15},{3,10,11,12,15},{3,10,11,13},{3,10,11,13,14},{3,10,11,13,14,15},{3,10,11,13,15},{3,10,11,14},{3,10,11,14,15},{3,10,11,15},{3,10,12},{3,10,12,13},{3,10,12,13,14},{3,10,12,13,14,15},{3,10,12,13,15},{3,10,12,14},{3,10,12,14,15},{3,10,12,15},{3,10,13},{3,10,13,14},{3,10,13,14,15},{3,10,13,15},{3,10,14},{3,10,14,15},{3,10,15},{3,11},{3,11,12},{3,11,12,13},{3,11,12,13,14},{3,11,12,13,14,15},{3,11,12,13,15},{3,11,12,14},{3,11,12,14,15},{3,11,12,15},{3,11,13},{3,11,13,14},{3,11,13,14,15},{3,11,13,15},{3,11,14},{3,11,14,15},{3,11,15},{3,12},{3,12,13},{3,12,13,14},{3,12,13,14,15},{3,12,13,15},{3,12,14},{3,12,14,15},{3,12,15},{3,13},{3,13,14},{3,13,14,15},{3,13,15},{3,14},{3,14,15},{3,15},{4,5},{4,5,6},{4,5,6,7},{4,5,6,7,8},{4,5,6,7,8,9},{4,5,6,7,8,9,10},{4,5,6,7,8,9,10,11},{4,5,6,7,8,9,10,11,12},{4,5,6,7,8,9,10,11,12,13},{4,5,6,7,8,9,10,11,12,13,14},{4,5,6,7,8,9,10,11,12,13,14,15},{4,5,6,7,8,9,10,11,12,13,15},{4,5,6,7,8,9,10,11,12,14},{4,5,6,7,8,9,10,11,12,14,15},{4,5,6,7,8,9,10,11,12,15},{4,5,6,7,8,9,10,11,13},{4,5,6,7,8,9,10,11,13,14},{4,5,6,7,8,9,10,11,13,14,15},{4,5,6,7,8,9,10,11,13,15},{4,5,6,7,8,9,10,11,14},{4,5,6,7,8,9,10,11,14,15},{4,5,6,7,8,9,10,11,15},{4,5,6,7,8,9,10,12},{4,5,6,7,8,9,10,12,13},{4,5,6,7,8,9,10,12,13,14},{4,5,6,7,8,9,10,12,13,14,15},{4,5,6,7,8,9,10,12,13,15},{4,5,6,7,8,9,10,12,14},{4,5,6,7,8,9,10,12,14,15},{4,5,6,7,8,9,10,12,15},{4,5,6,7,8,9,10,13},{4,5,6,7,8,9,10,13,14},{4,5,6,7,8,9,10,13,14,15},{4,5,6,7,8,9,10,13,15},{4,5,6,7,8,9,10,14},{4,5,6,7,8,9,10,14,15},{4,5,6,7,8,9,10,15},{4,5,6,7,8,9,11},{4,5,6,7,8,9,11,12},{4,5,6,7,8,9,11,12,13},{4,5,6,7,8,9,11,12,13,14},{4,5,6,7,8,9,11,12,13,14,15},{4,5,6,7,8,9,11,12,13,15},{4,5,6,7,8,9,11,12,14},{4,5,6,7,8,9,11,12,14,15},{4,5,6,7,8,9,11,12,15},{4,5,6,7,8,9,11,13},{4,5,6,7,8,9,11,13,14},{4,5,6,7,8,9,11,13,14,15},{4,5,6,7,8,9,11,13,15},{4,5,6,7,8,9,11,14},{4,5,6,7,8,9,11,14,15},{4,5,6,7,8,9,11,15},{4,5,6,7,8,9,12},{4,5,6,7,8,9,12,13},{4,5,6,7,8,9,12,13,14},{4,5,6,7,8,9,12,13,14,15},{4,5,6,7,8,9,12,13,15},{4,5,6,7,8,9,12,14},{4,5,6,7,8,9,12,14,15},{4,5,6,7,8,9,12,15},{4,5,6,7,8,9,13},{4,5,6,7,8,9,13,14},{4,5,6,7,8,9,13,14,15},{4,5,6,7,8,9,13,15},{4,5,6,7,8,9,14},{4,5,6,7,8,9,14,15},{4,5,6,7,8,9,15},{4,5,6,7,8,10},{4,5,6,7,8,10,11},{4,5,6,7,8,10,11,12},{4,5,6,7,8,10,11,12,13},{4,5,6,7,8,10,11,12,13,14},{4,5,6,7,8,10,11,12,13,14,15},{4,5,6,7,8,10,11,12,13,15},{4,5,6,7,8,10,11,12,14},{4,5,6,7,8,10,11,12,14,15},{4,5,6,7,8,10,11,12,15},{4,5,6,7,8,10,11,13},{4,5,6,7,8,10,11,13,14},{4,5,6,7,8,10,11,13,14,15},{4,5,6,7,8,10,11,13,15},{4,5,6,7,8,10,11,14},{4,5,6,7,8,10,11,14,15},{4,5,6,7,8,10,11,15},{4,5,6,7,8,10,12},{4,5,6,7,8,10,12,13},{4,5,6,7,8,10,12,13,14},{4,5,6,7,8,10,12,13,14,15},{4,5,6,7,8,10,12,13,15},{4,5,6,7,8,10,12,14},{4,5,6,7,8,10,12,14,15},{4,5,6,7,8,10,12,15},{4,5,6,7,8,10,13},{4,5,6,7,8,10,13,14},{4,5,6,7,8,10,13,14,15},{4,5,6,7,8,10,13,15},{4,5,6,7,8,10,14},{4,5,6,7,8,10,14,15},{4,5,6,7,8,10,15},{4,5,6,7,8,11},{4,5,6,7,8,11,12},{4,5,6,7,8,11,12,13},{4,5,6,7,8,11,12,13,14},{4,5,6,7,8,11,12,13,14,15},{4,5,6,7,8,11,12,13,15},{4,5,6,7,8,11,12,14},{4,5,6,7,8,11,12,14,15},{4,5,6,7,8,11,12,15},{4,5,6,7,8,11,13},{4,5,6,7,8,11,13,14},{4,5,6,7,8,11,13,14,15},{4,5,6,7,8,11,13,15},{4,5,6,7,8,11,14},{4,5,6,7,8,11,14,15},{4,5,6,7,8,11,15},{4,5,6,7,8,12},{4,5,6,7,8,12,13},{4,5,6,7,8,12,13,14},{4,5,6,7,8,12,13,14,15},{4,5,6,7,8,12,13,15},{4,5,6,7,8,12,14},{4,5,6,7,8,12,14,15},{4,5,6,7,8,12,15},{4,5,6,7,8,13},{4,5,6,7,8,13,14},{4,5,6,7,8,13,14,15},{4,5,6,7,8,13,15},{4,5,6,7,8,14},{4,5,6,7,8,14,15},{4,5,6,7,8,15},{4,5,6,7,9},{4,5,6,7,9,10},{4,5,6,7,9,10,11},{4,5,6,7,9,10,11,12},{4,5,6,7,9,10,11,12,13},{4,5,6,7,9,10,11,12,13,14},{4,5,6,7,9,10,11,12,13,14,15},{4,5,6,7,9,10,11,12,13,15},{4,5,6,7,9,10,11,12,14},{4,5,6,7,9,10,11,12,14,15},{4,5,6,7,9,10,11,12,15},{4,5,6,7,9,10,11,13},{4,5,6,7,9,10,11,13,14},{4,5,6,7,9,10,11,13,14,15},{4,5,6,7,9,10,11,13,15},{4,5,6,7,9,10,11,14},{4,5,6,7,9,10,11,14,15},{4,5,6,7,9,10,11,15},{4,5,6,7,9,10,12},{4,5,6,7,9,10,12,13},{4,5,6,7,9,10,12,13,14},{4,5,6,7,9,10,12,13,14,15},{4,5,6,7,9,10,12,13,15},{4,5,6,7,9,10,12,14},{4,5,6,7,9,10,12,14,15},{4,5,6,7,9,10,12,15},{4,5,6,7,9,10,13},{4,5,6,7,9,10,13,14},{4,5,6,7,9,10,13,14,15},{4,5,6,7,9,10,13,15},{4,5,6,7,9,10,14},{4,5,6,7,9,10,14,15},{4,5,6,7,9,10,15},{4,5,6,7,9,11},{4,5,6,7,9,11,12},{4,5,6,7,9,11,12,13},{4,5,6,7,9,11,12,13,14},{4,5,6,7,9,11,12,13,14,15},{4,5,6,7,9,11,12,13,15},{4,5,6,7,9,11,12,14},{4,5,6,7,9,11,12,14,15},{4,5,6,7,9,11,12,15},{4,5,6,7,9,11,13},{4,5,6,7,9,11,13,14},{4,5,6,7,9,11,13,14,15},{4,5,6,7,9,11,13,15},{4,5,6,7,9,11,14},{4,5,6,7,9,11,14,15},{4,5,6,7,9,11,15},{4,5,6,7,9,12},{4,5,6,7,9,12,13},{4,5,6,7,9,12,13,14},{4,5,6,7,9,12,13,14,15},{4,5,6,7,9,12,13,15},{4,5,6,7,9,12,14},{4,5,6,7,9,12,14,15},{4,5,6,7,9,12,15},{4,5,6,7,9,13},{4,5,6,7,9,13,14},{4,5,6,7,9,13,14,15},{4,5,6,7,9,13,15},{4,5,6,7,9,14},{4,5,6,7,9,14,15},{4,5,6,7,9,15},{4,5,6,7,10},{4,5,6,7,10,11},{4,5,6,7,10,11,12},{4,5,6,7,10,11,12,13},{4,5,6,7,10,11,12,13,14},{4,5,6,7,10,11,12,13,14,15},{4,5,6,7,10,11,12,13,15},{4,5,6,7,10,11,12,14},{4,5,6,7,10,11,12,14,15},{4,5,6,7,10,11,12,15},{4,5,6,7,10,11,13},{4,5,6,7,10,11,13,14},{4,5,6,7,10,11,13,14,15},{4,5,6,7,10,11,13,15},{4,5,6,7,10,11,14},{4,5,6,7,10,11,14,15},{4,5,6,7,10,11,15},{4,5,6,7,10,12},{4,5,6,7,10,12,13},{4,5,6,7,10,12,13,14},{4,5,6,7,10,12,13,14,15},{4,5,6,7,10,12,13,15},{4,5,6,7,10,12,14},{4,5,6,7,10,12,14,15},{4,5,6,7,10,12,15},{4,5,6,7,10,13},{4,5,6,7,10,13,14},{4,5,6,7,10,13,14,15},{4,5,6,7,10,13,15},{4,5,6,7,10,14},{4,5,6,7,10,14,15},{4,5,6,7,10,15},{4,5,6,7,11},{4,5,6,7,11,12},{4,5,6,7,11,12,13},{4,5,6,7,11,12,13,14},{4,5,6,7,11,12,13,14,15},{4,5,6,7,11,12,13,15},{4,5,6,7,11,12,14},{4,5,6,7,11,12,14,15},{4,5,6,7,11,12,15},{4,5,6,7,11,13},{4,5,6,7,11,13,14},{4,5,6,7,11,13,14,15},{4,5,6,7,11,13,15},{4,5,6,7,11,14},{4,5,6,7,11,14,15},{4,5,6,7,11,15},{4,5,6,7,12},{4,5,6,7,12,13},{4,5,6,7,12,13,14},{4,5,6,7,12,13,14,15},{4,5,6,7,12,13,15},{4,5,6,7,12,14},{4,5,6,7,12,14,15},{4,5,6,7,12,15},{4,5,6,7,13},{4,5,6,7,13,14},{4,5,6,7,13,14,15},{4,5,6,7,13,15},{4,5,6,7,14},{4,5,6,7,14,15},{4,5,6,7,15},{4,5,6,8},{4,5,6,8,9},{4,5,6,8,9,10},{4,5,6,8,9,10,11},{4,5,6,8,9,10,11,12},{4,5,6,8,9,10,11,12,13},{4,5,6,8,9,10,11,12,13,14},{4,5,6,8,9,10,11,12,13,14,15},{4,5,6,8,9,10,11,12,13,15},{4,5,6,8,9,10,11,12,14},{4,5,6,8,9,10,11,12,14,15},{4,5,6,8,9,10,11,12,15},{4,5,6,8,9,10,11,13},{4,5,6,8,9,10,11,13,14},{4,5,6,8,9,10,11,13,14,15},{4,5,6,8,9,10,11,13,15},{4,5,6,8,9,10,11,14},{4,5,6,8,9,10,11,14,15},{4,5,6,8,9,10,11,15},{4,5,6,8,9,10,12},{4,5,6,8,9,10,12,13},{4,5,6,8,9,10,12,13,14},{4,5,6,8,9,10,12,13,14,15},{4,5,6,8,9,10,12,13,15},{4,5,6,8,9,10,12,14},{4,5,6,8,9,10,12,14,15},{4,5,6,8,9,10,12,15},{4,5,6,8,9,10,13},{4,5,6,8,9,10,13,14},{4,5,6,8,9,10,13,14,15},{4,5,6,8,9,10,13,15},{4,5,6,8,9,10,14},{4,5,6,8,9,10,14,15},{4,5,6,8,9,10,15},{4,5,6,8,9,11},{4,5,6,8,9,11,12},{4,5,6,8,9,11,12,13},{4,5,6,8,9,11,12,13,14},{4,5,6,8,9,11,12,13,14,15},{4,5,6,8,9,11,12,13,15},{4,5,6,8,9,11,12,14},{4,5,6,8,9,11,12,14,15},{4,5,6,8,9,11,12,15},{4,5,6,8,9,11,13},{4,5,6,8,9,11,13,14},{4,5,6,8,9,11,13,14,15},{4,5,6,8,9,11,13,15},{4,5,6,8,9,11,14},{4,5,6,8,9,11,14,15},{4,5,6,8,9,11,15},{4,5,6,8,9,12},{4,5,6,8,9,12,13},{4,5,6,8,9,12,13,14},{4,5,6,8,9,12,13,14,15},{4,5,6,8,9,12,13,15},{4,5,6,8,9,12,14},{4,5,6,8,9,12,14,15},{4,5,6,8,9,12,15},{4,5,6,8,9,13},{4,5,6,8,9,13,14},{4,5,6,8,9,13,14,15},{4,5,6,8,9,13,15},{4,5,6,8,9,14},{4,5,6,8,9,14,15},{4,5,6,8,9,15},{4,5,6,8,10},{4,5,6,8,10,11},{4,5,6,8,10,11,12},{4,5,6,8,10,11,12,13},{4,5,6,8,10,11,12,13,14},{4,5,6,8,10,11,12,13,14,15},{4,5,6,8,10,11,12,13,15},{4,5,6,8,10,11,12,14},{4,5,6,8,10,11,12,14,15},{4,5,6,8,10,11,12,15},{4,5,6,8,10,11,13},{4,5,6,8,10,11,13,14},{4,5,6,8,10,11,13,14,15},{4,5,6,8,10,11,13,15},{4,5,6,8,10,11,14},{4,5,6,8,10,11,14,15},{4,5,6,8,10,11,15},{4,5,6,8,10,12},{4,5,6,8,10,12,13},{4,5,6,8,10,12,13,14},{4,5,6,8,10,12,13,14,15},{4,5,6,8,10,12,13,15},{4,5,6,8,10,12,14},{4,5,6,8,10,12,14,15},{4,5,6,8,10,12,15},{4,5,6,8,10,13},{4,5,6,8,10,13,14},{4,5,6,8,10,13,14,15},{4,5,6,8,10,13,15},{4,5,6,8,10,14},{4,5,6,8,10,14,15},{4,5,6,8,10,15},{4,5,6,8,11},{4,5,6,8,11,12},{4,5,6,8,11,12,13},{4,5,6,8,11,12,13,14},{4,5,6,8,11,12,13,14,15},{4,5,6,8,11,12,13,15},{4,5,6,8,11,12,14},{4,5,6,8,11,12,14,15},{4,5,6,8,11,12,15},{4,5,6,8,11,13},{4,5,6,8,11,13,14},{4,5,6,8,11,13,14,15},{4,5,6,8,11,13,15},{4,5,6,8,11,14},{4,5,6,8,11,14,15},{4,5,6,8,11,15},{4,5,6,8,12},{4,5,6,8,12,13},{4,5,6,8,12,13,14},{4,5,6,8,12,13,14,15},{4,5,6,8,12,13,15},{4,5,6,8,12,14},{4,5,6,8,12,14,15},{4,5,6,8,12,15},{4,5,6,8,13},{4,5,6,8,13,14},{4,5,6,8,13,14,15},{4,5,6,8,13,15},{4,5,6,8,14},{4,5,6,8,14,15},{4,5,6,8,15},{4,5,6,9},{4,5,6,9,10},{4,5,6,9,10,11},{4,5,6,9,10,11,12},{4,5,6,9,10,11,12,13},{4,5,6,9,10,11,12,13,14},{4,5,6,9,10,11,12,13,14,15},{4,5,6,9,10,11,12,13,15},{4,5,6,9,10,11,12,14},{4,5,6,9,10,11,12,14,15},{4,5,6,9,10,11,12,15},{4,5,6,9,10,11,13},{4,5,6,9,10,11,13,14},{4,5,6,9,10,11,13,14,15},{4,5,6,9,10,11,13,15},{4,5,6,9,10,11,14},{4,5,6,9,10,11,14,15},{4,5,6,9,10,11,15},{4,5,6,9,10,12},{4,5,6,9,10,12,13},{4,5,6,9,10,12,13,14},{4,5,6,9,10,12,13,14,15},{4,5,6,9,10,12,13,15},{4,5,6,9,10,12,14},{4,5,6,9,10,12,14,15},{4,5,6,9,10,12,15},{4,5,6,9,10,13},{4,5,6,9,10,13,14},{4,5,6,9,10,13,14,15},{4,5,6,9,10,13,15},{4,5,6,9,10,14},{4,5,6,9,10,14,15},{4,5,6,9,10,15},{4,5,6,9,11},{4,5,6,9,11,12},{4,5,6,9,11,12,13},{4,5,6,9,11,12,13,14},{4,5,6,9,11,12,13,14,15},{4,5,6,9,11,12,13,15},{4,5,6,9,11,12,14},{4,5,6,9,11,12,14,15},{4,5,6,9,11,12,15},{4,5,6,9,11,13},{4,5,6,9,11,13,14},{4,5,6,9,11,13,14,15},{4,5,6,9,11,13,15},{4,5,6,9,11,14},{4,5,6,9,11,14,15},{4,5,6,9,11,15},{4,5,6,9,12},{4,5,6,9,12,13},{4,5,6,9,12,13,14},{4,5,6,9,12,13,14,15},{4,5,6,9,12,13,15},{4,5,6,9,12,14},{4,5,6,9,12,14,15},{4,5,6,9,12,15},{4,5,6,9,13},{4,5,6,9,13,14},{4,5,6,9,13,14,15},{4,5,6,9,13,15},{4,5,6,9,14},{4,5,6,9,14,15},{4,5,6,9,15},{4,5,6,10},{4,5,6,10,11},{4,5,6,10,11,12},{4,5,6,10,11,12,13},{4,5,6,10,11,12,13,14},{4,5,6,10,11,12,13,14,15},{4,5,6,10,11,12,13,15},{4,5,6,10,11,12,14},{4,5,6,10,11,12,14,15},{4,5,6,10,11,12,15},{4,5,6,10,11,13},{4,5,6,10,11,13,14},{4,5,6,10,11,13,14,15},{4,5,6,10,11,13,15},{4,5,6,10,11,14},{4,5,6,10,11,14,15},{4,5,6,10,11,15},{4,5,6,10,12},{4,5,6,10,12,13},{4,5,6,10,12,13,14},{4,5,6,10,12,13,14,15},{4,5,6,10,12,13,15},{4,5,6,10,12,14},{4,5,6,10,12,14,15},{4,5,6,10,12,15},{4,5,6,10,13},{4,5,6,10,13,14},{4,5,6,10,13,14,15},{4,5,6,10,13,15},{4,5,6,10,14},{4,5,6,10,14,15},{4,5,6,10,15},{4,5,6,11},{4,5,6,11,12},{4,5,6,11,12,13},{4,5,6,11,12,13,14},{4,5,6,11,12,13,14,15},{4,5,6,11,12,13,15},{4,5,6,11,12,14},{4,5,6,11,12,14,15},{4,5,6,11,12,15},{4,5,6,11,13},{4,5,6,11,13,14},{4,5,6,11,13,14,15},{4,5,6,11,13,15},{4,5,6,11,14},{4,5,6,11,14,15},{4,5,6,11,15},{4,5,6,12},{4,5,6,12,13},{4,5,6,12,13,14},{4,5,6,12,13,14,15},{4,5,6,12,13,15},{4,5,6,12,14},{4,5,6,12,14,15},{4,5,6,12,15},{4,5,6,13},{4,5,6,13,14},{4,5,6,13,14,15},{4,5,6,13,15},{4,5,6,14},{4,5,6,14,15},{4,5,6,15},{4,5,7},{4,5,7,8},{4,5,7,8,9},{4,5,7,8,9,10},{4,5,7,8,9,10,11},{4,5,7,8,9,10,11,12},{4,5,7,8,9,10,11,12,13},{4,5,7,8,9,10,11,12,13,14},{4,5,7,8,9,10,11,12,13,14,15},{4,5,7,8,9,10,11,12,13,15},{4,5,7,8,9,10,11,12,14},{4,5,7,8,9,10,11,12,14,15},{4,5,7,8,9,10,11,12,15},{4,5,7,8,9,10,11,13},{4,5,7,8,9,10,11,13,14},{4,5,7,8,9,10,11,13,14,15},{4,5,7,8,9,10,11,13,15},{4,5,7,8,9,10,11,14},{4,5,7,8,9,10,11,14,15},{4,5,7,8,9,10,11,15},{4,5,7,8,9,10,12},{4,5,7,8,9,10,12,13},{4,5,7,8,9,10,12,13,14},{4,5,7,8,9,10,12,13,14,15},{4,5,7,8,9,10,12,13,15},{4,5,7,8,9,10,12,14},{4,5,7,8,9,10,12,14,15},{4,5,7,8,9,10,12,15},{4,5,7,8,9,10,13},{4,5,7,8,9,10,13,14},{4,5,7,8,9,10,13,14,15},{4,5,7,8,9,10,13,15},{4,5,7,8,9,10,14},{4,5,7,8,9,10,14,15},{4,5,7,8,9,10,15},{4,5,7,8,9,11},{4,5,7,8,9,11,12},{4,5,7,8,9,11,12,13},{4,5,7,8,9,11,12,13,14},{4,5,7,8,9,11,12,13,14,15},{4,5,7,8,9,11,12,13,15},{4,5,7,8,9,11,12,14},{4,5,7,8,9,11,12,14,15},{4,5,7,8,9,11,12,15},{4,5,7,8,9,11,13},{4,5,7,8,9,11,13,14},{4,5,7,8,9,11,13,14,15},{4,5,7,8,9,11,13,15},{4,5,7,8,9,11,14},{4,5,7,8,9,11,14,15},{4,5,7,8,9,11,15},{4,5,7,8,9,12},{4,5,7,8,9,12,13},{4,5,7,8,9,12,13,14},{4,5,7,8,9,12,13,14,15},{4,5,7,8,9,12,13,15},{4,5,7,8,9,12,14},{4,5,7,8,9,12,14,15},{4,5,7,8,9,12,15},{4,5,7,8,9,13},{4,5,7,8,9,13,14},{4,5,7,8,9,13,14,15},{4,5,7,8,9,13,15},{4,5,7,8,9,14},{4,5,7,8,9,14,15},{4,5,7,8,9,15},{4,5,7,8,10},{4,5,7,8,10,11},{4,5,7,8,10,11,12},{4,5,7,8,10,11,12,13},{4,5,7,8,10,11,12,13,14},{4,5,7,8,10,11,12,13,14,15},{4,5,7,8,10,11,12,13,15},{4,5,7,8,10,11,12,14},{4,5,7,8,10,11,12,14,15},{4,5,7,8,10,11,12,15},{4,5,7,8,10,11,13},{4,5,7,8,10,11,13,14},{4,5,7,8,10,11,13,14,15},{4,5,7,8,10,11,13,15},{4,5,7,8,10,11,14},{4,5,7,8,10,11,14,15},{4,5,7,8,10,11,15},{4,5,7,8,10,12},{4,5,7,8,10,12,13},{4,5,7,8,10,12,13,14},{4,5,7,8,10,12,13,14,15},{4,5,7,8,10,12,13,15},{4,5,7,8,10,12,14},{4,5,7,8,10,12,14,15},{4,5,7,8,10,12,15},{4,5,7,8,10,13},{4,5,7,8,10,13,14},{4,5,7,8,10,13,14,15},{4,5,7,8,10,13,15},{4,5,7,8,10,14},{4,5,7,8,10,14,15},{4,5,7,8,10,15},{4,5,7,8,11},{4,5,7,8,11,12},{4,5,7,8,11,12,13},{4,5,7,8,11,12,13,14},{4,5,7,8,11,12,13,14,15},{4,5,7,8,11,12,13,15},{4,5,7,8,11,12,14},{4,5,7,8,11,12,14,15},{4,5,7,8,11,12,15},{4,5,7,8,11,13},{4,5,7,8,11,13,14},{4,5,7,8,11,13,14,15},{4,5,7,8,11,13,15},{4,5,7,8,11,14},{4,5,7,8,11,14,15},{4,5,7,8,11,15},{4,5,7,8,12},{4,5,7,8,12,13},{4,5,7,8,12,13,14},{4,5,7,8,12,13,14,15},{4,5,7,8,12,13,15},{4,5,7,8,12,14},{4,5,7,8,12,14,15},{4,5,7,8,12,15},{4,5,7,8,13},{4,5,7,8,13,14},{4,5,7,8,13,14,15},{4,5,7,8,13,15},{4,5,7,8,14},{4,5,7,8,14,15},{4,5,7,8,15},{4,5,7,9},{4,5,7,9,10},{4,5,7,9,10,11},{4,5,7,9,10,11,12},{4,5,7,9,10,11,12,13},{4,5,7,9,10,11,12,13,14},{4,5,7,9,10,11,12,13,14,15},{4,5,7,9,10,11,12,13,15},{4,5,7,9,10,11,12,14},{4,5,7,9,10,11,12,14,15},{4,5,7,9,10,11,12,15},{4,5,7,9,10,11,13},{4,5,7,9,10,11,13,14},{4,5,7,9,10,11,13,14,15},{4,5,7,9,10,11,13,15},{4,5,7,9,10,11,14},{4,5,7,9,10,11,14,15},{4,5,7,9,10,11,15},{4,5,7,9,10,12},{4,5,7,9,10,12,13},{4,5,7,9,10,12,13,14},{4,5,7,9,10,12,13,14,15},{4,5,7,9,10,12,13,15},{4,5,7,9,10,12,14},{4,5,7,9,10,12,14,15},{4,5,7,9,10,12,15},{4,5,7,9,10,13},{4,5,7,9,10,13,14},{4,5,7,9,10,13,14,15},{4,5,7,9,10,13,15},{4,5,7,9,10,14},{4,5,7,9,10,14,15},{4,5,7,9,10,15},{4,5,7,9,11},{4,5,7,9,11,12},{4,5,7,9,11,12,13},{4,5,7,9,11,12,13,14},{4,5,7,9,11,12,13,14,15},{4,5,7,9,11,12,13,15},{4,5,7,9,11,12,14},{4,5,7,9,11,12,14,15},{4,5,7,9,11,12,15},{4,5,7,9,11,13},{4,5,7,9,11,13,14},{4,5,7,9,11,13,14,15},{4,5,7,9,11,13,15},{4,5,7,9,11,14},{4,5,7,9,11,14,15},{4,5,7,9,11,15},{4,5,7,9,12},{4,5,7,9,12,13},{4,5,7,9,12,13,14},{4,5,7,9,12,13,14,15},{4,5,7,9,12,13,15},{4,5,7,9,12,14},{4,5,7,9,12,14,15},{4,5,7,9,12,15},{4,5,7,9,13},{4,5,7,9,13,14},{4,5,7,9,13,14,15},{4,5,7,9,13,15},{4,5,7,9,14},{4,5,7,9,14,15},{4,5,7,9,15},{4,5,7,10},{4,5,7,10,11},{4,5,7,10,11,12},{4,5,7,10,11,12,13},{4,5,7,10,11,12,13,14},{4,5,7,10,11,12,13,14,15},{4,5,7,10,11,12,13,15},{4,5,7,10,11,12,14},{4,5,7,10,11,12,14,15},{4,5,7,10,11,12,15},{4,5,7,10,11,13},{4,5,7,10,11,13,14},{4,5,7,10,11,13,14,15},{4,5,7,10,11,13,15},{4,5,7,10,11,14},{4,5,7,10,11,14,15},{4,5,7,10,11,15},{4,5,7,10,12},{4,5,7,10,12,13},{4,5,7,10,12,13,14},{4,5,7,10,12,13,14,15},{4,5,7,10,12,13,15},{4,5,7,10,12,14},{4,5,7,10,12,14,15},{4,5,7,10,12,15},{4,5,7,10,13},{4,5,7,10,13,14},{4,5,7,10,13,14,15},{4,5,7,10,13,15},{4,5,7,10,14},{4,5,7,10,14,15},{4,5,7,10,15},{4,5,7,11},{4,5,7,11,12},{4,5,7,11,12,13},{4,5,7,11,12,13,14},{4,5,7,11,12,13,14,15},{4,5,7,11,12,13,15},{4,5,7,11,12,14},{4,5,7,11,12,14,15},{4,5,7,11,12,15},{4,5,7,11,13},{4,5,7,11,13,14},{4,5,7,11,13,14,15},{4,5,7,11,13,15},{4,5,7,11,14},{4,5,7,11,14,15},{4,5,7,11,15},{4,5,7,12},{4,5,7,12,13},{4,5,7,12,13,14},{4,5,7,12,13,14,15},{4,5,7,12,13,15},{4,5,7,12,14},{4,5,7,12,14,15},{4,5,7,12,15},{4,5,7,13},{4,5,7,13,14},{4,5,7,13,14,15},{4,5,7,13,15},{4,5,7,14},{4,5,7,14,15},{4,5,7,15},{4,5,8},{4,5,8,9},{4,5,8,9,10},{4,5,8,9,10,11},{4,5,8,9,10,11,12},{4,5,8,9,10,11,12,13},{4,5,8,9,10,11,12,13,14},{4,5,8,9,10,11,12,13,14,15},{4,5,8,9,10,11,12,13,15},{4,5,8,9,10,11,12,14},{4,5,8,9,10,11,12,14,15},{4,5,8,9,10,11,12,15},{4,5,8,9,10,11,13},{4,5,8,9,10,11,13,14},{4,5,8,9,10,11,13,14,15},{4,5,8,9,10,11,13,15},{4,5,8,9,10,11,14},{4,5,8,9,10,11,14,15},{4,5,8,9,10,11,15},{4,5,8,9,10,12},{4,5,8,9,10,12,13},{4,5,8,9,10,12,13,14},{4,5,8,9,10,12,13,14,15},{4,5,8,9,10,12,13,15},{4,5,8,9,10,12,14},{4,5,8,9,10,12,14,15},{4,5,8,9,10,12,15},{4,5,8,9,10,13},{4,5,8,9,10,13,14},{4,5,8,9,10,13,14,15},{4,5,8,9,10,13,15},{4,5,8,9,10,14},{4,5,8,9,10,14,15},{4,5,8,9,10,15},{4,5,8,9,11},{4,5,8,9,11,12},{4,5,8,9,11,12,13},{4,5,8,9,11,12,13,14},{4,5,8,9,11,12,13,14,15},{4,5,8,9,11,12,13,15},{4,5,8,9,11,12,14},{4,5,8,9,11,12,14,15},{4,5,8,9,11,12,15},{4,5,8,9,11,13},{4,5,8,9,11,13,14},{4,5,8,9,11,13,14,15},{4,5,8,9,11,13,15},{4,5,8,9,11,14},{4,5,8,9,11,14,15},{4,5,8,9,11,15},{4,5,8,9,12},{4,5,8,9,12,13},{4,5,8,9,12,13,14},{4,5,8,9,12,13,14,15},{4,5,8,9,12,13,15},{4,5,8,9,12,14},{4,5,8,9,12,14,15},{4,5,8,9,12,15},{4,5,8,9,13},{4,5,8,9,13,14},{4,5,8,9,13,14,15},{4,5,8,9,13,15},{4,5,8,9,14},{4,5,8,9,14,15},{4,5,8,9,15},{4,5,8,10},{4,5,8,10,11},{4,5,8,10,11,12},{4,5,8,10,11,12,13},{4,5,8,10,11,12,13,14},{4,5,8,10,11,12,13,14,15},{4,5,8,10,11,12,13,15},{4,5,8,10,11,12,14},{4,5,8,10,11,12,14,15},{4,5,8,10,11,12,15},{4,5,8,10,11,13},{4,5,8,10,11,13,14},{4,5,8,10,11,13,14,15},{4,5,8,10,11,13,15},{4,5,8,10,11,14},{4,5,8,10,11,14,15},{4,5,8,10,11,15},{4,5,8,10,12},{4,5,8,10,12,13},{4,5,8,10,12,13,14},{4,5,8,10,12,13,14,15},{4,5,8,10,12,13,15},{4,5,8,10,12,14},{4,5,8,10,12,14,15},{4,5,8,10,12,15},{4,5,8,10,13},{4,5,8,10,13,14},{4,5,8,10,13,14,15},{4,5,8,10,13,15},{4,5,8,10,14},{4,5,8,10,14,15},{4,5,8,10,15},{4,5,8,11},{4,5,8,11,12},{4,5,8,11,12,13},{4,5,8,11,12,13,14},{4,5,8,11,12,13,14,15},{4,5,8,11,12,13,15},{4,5,8,11,12,14},{4,5,8,11,12,14,15},{4,5,8,11,12,15},{4,5,8,11,13},{4,5,8,11,13,14},{4,5,8,11,13,14,15},{4,5,8,11,13,15},{4,5,8,11,14},{4,5,8,11,14,15},{4,5,8,11,15},{4,5,8,12},{4,5,8,12,13},{4,5,8,12,13,14},{4,5,8,12,13,14,15},{4,5,8,12,13,15},{4,5,8,12,14},{4,5,8,12,14,15},{4,5,8,12,15},{4,5,8,13},{4,5,8,13,14},{4,5,8,13,14,15},{4,5,8,13,15},{4,5,8,14},{4,5,8,14,15},{4,5,8,15},{4,5,9},{4,5,9,10},{4,5,9,10,11},{4,5,9,10,11,12},{4,5,9,10,11,12,13},{4,5,9,10,11,12,13,14},{4,5,9,10,11,12,13,14,15},{4,5,9,10,11,12,13,15},{4,5,9,10,11,12,14},{4,5,9,10,11,12,14,15},{4,5,9,10,11,12,15},{4,5,9,10,11,13},{4,5,9,10,11,13,14},{4,5,9,10,11,13,14,15},{4,5,9,10,11,13,15},{4,5,9,10,11,14},{4,5,9,10,11,14,15},{4,5,9,10,11,15},{4,5,9,10,12},{4,5,9,10,12,13},{4,5,9,10,12,13,14},{4,5,9,10,12,13,14,15},{4,5,9,10,12,13,15},{4,5,9,10,12,14},{4,5,9,10,12,14,15},{4,5,9,10,12,15},{4,5,9,10,13},{4,5,9,10,13,14},{4,5,9,10,13,14,15},{4,5,9,10,13,15},{4,5,9,10,14},{4,5,9,10,14,15},{4,5,9,10,15},{4,5,9,11},{4,5,9,11,12},{4,5,9,11,12,13},{4,5,9,11,12,13,14},{4,5,9,11,12,13,14,15},{4,5,9,11,12,13,15},{4,5,9,11,12,14},{4,5,9,11,12,14,15},{4,5,9,11,12,15},{4,5,9,11,13},{4,5,9,11,13,14},{4,5,9,11,13,14,15},{4,5,9,11,13,15},{4,5,9,11,14},{4,5,9,11,14,15},{4,5,9,11,15},{4,5,9,12},{4,5,9,12,13},{4,5,9,12,13,14},{4,5,9,12,13,14,15},{4,5,9,12,13,15},{4,5,9,12,14},{4,5,9,12,14,15},{4,5,9,12,15},{4,5,9,13},{4,5,9,13,14},{4,5,9,13,14,15},{4,5,9,13,15},{4,5,9,14},{4,5,9,14,15},{4,5,9,15},{4,5,10},{4,5,10,11},{4,5,10,11,12},{4,5,10,11,12,13},{4,5,10,11,12,13,14},{4,5,10,11,12,13,14,15},{4,5,10,11,12,13,15},{4,5,10,11,12,14},{4,5,10,11,12,14,15},{4,5,10,11,12,15},{4,5,10,11,13},{4,5,10,11,13,14},{4,5,10,11,13,14,15},{4,5,10,11,13,15},{4,5,10,11,14},{4,5,10,11,14,15},{4,5,10,11,15},{4,5,10,12},{4,5,10,12,13},{4,5,10,12,13,14},{4,5,10,12,13,14,15},{4,5,10,12,13,15},{4,5,10,12,14},{4,5,10,12,14,15},{4,5,10,12,15},{4,5,10,13},{4,5,10,13,14},{4,5,10,13,14,15},{4,5,10,13,15},{4,5,10,14},{4,5,10,14,15},{4,5,10,15},{4,5,11},{4,5,11,12},{4,5,11,12,13},{4,5,11,12,13,14},{4,5,11,12,13,14,15},{4,5,11,12,13,15},{4,5,11,12,14},{4,5,11,12,14,15},{4,5,11,12,15},{4,5,11,13},{4,5,11,13,14},{4,5,11,13,14,15},{4,5,11,13,15},{4,5,11,14},{4,5,11,14,15},{4,5,11,15},{4,5,12},{4,5,12,13},{4,5,12,13,14},{4,5,12,13,14,15},{4,5,12,13,15},{4,5,12,14},{4,5,12,14,15},{4,5,12,15},{4,5,13},{4,5,13,14},{4,5,13,14,15},{4,5,13,15},{4,5,14},{4,5,14,15},{4,5,15},{4,6},{4,6,7},{4,6,7,8},{4,6,7,8,9},{4,6,7,8,9,10},{4,6,7,8,9,10,11},{4,6,7,8,9,10,11,12},{4,6,7,8,9,10,11,12,13},{4,6,7,8,9,10,11,12,13,14},{4,6,7,8,9,10,11,12,13,14,15},{4,6,7,8,9,10,11,12,13,15},{4,6,7,8,9,10,11,12,14},{4,6,7,8,9,10,11,12,14,15},{4,6,7,8,9,10,11,12,15},{4,6,7,8,9,10,11,13},{4,6,7,8,9,10,11,13,14},{4,6,7,8,9,10,11,13,14,15},{4,6,7,8,9,10,11,13,15},{4,6,7,8,9,10,11,14},{4,6,7,8,9,10,11,14,15},{4,6,7,8,9,10,11,15},{4,6,7,8,9,10,12},{4,6,7,8,9,10,12,13},{4,6,7,8,9,10,12,13,14},{4,6,7,8,9,10,12,13,14,15},{4,6,7,8,9,10,12,13,15},{4,6,7,8,9,10,12,14},{4,6,7,8,9,10,12,14,15},{4,6,7,8,9,10,12,15},{4,6,7,8,9,10,13},{4,6,7,8,9,10,13,14},{4,6,7,8,9,10,13,14,15},{4,6,7,8,9,10,13,15},{4,6,7,8,9,10,14},{4,6,7,8,9,10,14,15},{4,6,7,8,9,10,15},{4,6,7,8,9,11},{4,6,7,8,9,11,12},{4,6,7,8,9,11,12,13},{4,6,7,8,9,11,12,13,14},{4,6,7,8,9,11,12,13,14,15},{4,6,7,8,9,11,12,13,15},{4,6,7,8,9,11,12,14},{4,6,7,8,9,11,12,14,15},{4,6,7,8,9,11,12,15},{4,6,7,8,9,11,13},{4,6,7,8,9,11,13,14},{4,6,7,8,9,11,13,14,15},{4,6,7,8,9,11,13,15},{4,6,7,8,9,11,14},{4,6,7,8,9,11,14,15},{4,6,7,8,9,11,15},{4,6,7,8,9,12},{4,6,7,8,9,12,13},{4,6,7,8,9,12,13,14},{4,6,7,8,9,12,13,14,15},{4,6,7,8,9,12,13,15},{4,6,7,8,9,12,14},{4,6,7,8,9,12,14,15},{4,6,7,8,9,12,15},{4,6,7,8,9,13},{4,6,7,8,9,13,14},{4,6,7,8,9,13,14,15},{4,6,7,8,9,13,15},{4,6,7,8,9,14},{4,6,7,8,9,14,15},{4,6,7,8,9,15},{4,6,7,8,10},{4,6,7,8,10,11},{4,6,7,8,10,11,12},{4,6,7,8,10,11,12,13},{4,6,7,8,10,11,12,13,14},{4,6,7,8,10,11,12,13,14,15},{4,6,7,8,10,11,12,13,15},{4,6,7,8,10,11,12,14},{4,6,7,8,10,11,12,14,15},{4,6,7,8,10,11,12,15},{4,6,7,8,10,11,13},{4,6,7,8,10,11,13,14},{4,6,7,8,10,11,13,14,15},{4,6,7,8,10,11,13,15},{4,6,7,8,10,11,14},{4,6,7,8,10,11,14,15},{4,6,7,8,10,11,15},{4,6,7,8,10,12},{4,6,7,8,10,12,13},{4,6,7,8,10,12,13,14},{4,6,7,8,10,12,13,14,15},{4,6,7,8,10,12,13,15},{4,6,7,8,10,12,14},{4,6,7,8,10,12,14,15},{4,6,7,8,10,12,15},{4,6,7,8,10,13},{4,6,7,8,10,13,14},{4,6,7,8,10,13,14,15},{4,6,7,8,10,13,15},{4,6,7,8,10,14},{4,6,7,8,10,14,15},{4,6,7,8,10,15},{4,6,7,8,11},{4,6,7,8,11,12},{4,6,7,8,11,12,13},{4,6,7,8,11,12,13,14},{4,6,7,8,11,12,13,14,15},{4,6,7,8,11,12,13,15},{4,6,7,8,11,12,14},{4,6,7,8,11,12,14,15},{4,6,7,8,11,12,15},{4,6,7,8,11,13},{4,6,7,8,11,13,14},{4,6,7,8,11,13,14,15},{4,6,7,8,11,13,15},{4,6,7,8,11,14},{4,6,7,8,11,14,15},{4,6,7,8,11,15},{4,6,7,8,12},{4,6,7,8,12,13},{4,6,7,8,12,13,14},{4,6,7,8,12,13,14,15},{4,6,7,8,12,13,15},{4,6,7,8,12,14},{4,6,7,8,12,14,15},{4,6,7,8,12,15},{4,6,7,8,13},{4,6,7,8,13,14},{4,6,7,8,13,14,15},{4,6,7,8,13,15},{4,6,7,8,14},{4,6,7,8,14,15},{4,6,7,8,15},{4,6,7,9},{4,6,7,9,10},{4,6,7,9,10,11},{4,6,7,9,10,11,12},{4,6,7,9,10,11,12,13},{4,6,7,9,10,11,12,13,14},{4,6,7,9,10,11,12,13,14,15},{4,6,7,9,10,11,12,13,15},{4,6,7,9,10,11,12,14},{4,6,7,9,10,11,12,14,15},{4,6,7,9,10,11,12,15},{4,6,7,9,10,11,13},{4,6,7,9,10,11,13,14},{4,6,7,9,10,11,13,14,15},{4,6,7,9,10,11,13,15},{4,6,7,9,10,11,14},{4,6,7,9,10,11,14,15},{4,6,7,9,10,11,15},{4,6,7,9,10,12},{4,6,7,9,10,12,13},{4,6,7,9,10,12,13,14},{4,6,7,9,10,12,13,14,15},{4,6,7,9,10,12,13,15},{4,6,7,9,10,12,14},{4,6,7,9,10,12,14,15},{4,6,7,9,10,12,15},{4,6,7,9,10,13},{4,6,7,9,10,13,14},{4,6,7,9,10,13,14,15},{4,6,7,9,10,13,15},{4,6,7,9,10,14},{4,6,7,9,10,14,15},{4,6,7,9,10,15},{4,6,7,9,11},{4,6,7,9,11,12},{4,6,7,9,11,12,13},{4,6,7,9,11,12,13,14},{4,6,7,9,11,12,13,14,15},{4,6,7,9,11,12,13,15},{4,6,7,9,11,12,14},{4,6,7,9,11,12,14,15},{4,6,7,9,11,12,15},{4,6,7,9,11,13},{4,6,7,9,11,13,14},{4,6,7,9,11,13,14,15},{4,6,7,9,11,13,15},{4,6,7,9,11,14},{4,6,7,9,11,14,15},{4,6,7,9,11,15},{4,6,7,9,12},{4,6,7,9,12,13},{4,6,7,9,12,13,14},{4,6,7,9,12,13,14,15},{4,6,7,9,12,13,15},{4,6,7,9,12,14},{4,6,7,9,12,14,15},{4,6,7,9,12,15},{4,6,7,9,13},{4,6,7,9,13,14},{4,6,7,9,13,14,15},{4,6,7,9,13,15},{4,6,7,9,14},{4,6,7,9,14,15},{4,6,7,9,15},{4,6,7,10},{4,6,7,10,11},{4,6,7,10,11,12},{4,6,7,10,11,12,13},{4,6,7,10,11,12,13,14},{4,6,7,10,11,12,13,14,15},{4,6,7,10,11,12,13,15},{4,6,7,10,11,12,14},{4,6,7,10,11,12,14,15},{4,6,7,10,11,12,15},{4,6,7,10,11,13},{4,6,7,10,11,13,14},{4,6,7,10,11,13,14,15},{4,6,7,10,11,13,15},{4,6,7,10,11,14},{4,6,7,10,11,14,15},{4,6,7,10,11,15},{4,6,7,10,12},{4,6,7,10,12,13},{4,6,7,10,12,13,14},{4,6,7,10,12,13,14,15},{4,6,7,10,12,13,15},{4,6,7,10,12,14},{4,6,7,10,12,14,15},{4,6,7,10,12,15},{4,6,7,10,13},{4,6,7,10,13,14},{4,6,7,10,13,14,15},{4,6,7,10,13,15},{4,6,7,10,14},{4,6,7,10,14,15},{4,6,7,10,15},{4,6,7,11},{4,6,7,11,12},{4,6,7,11,12,13},{4,6,7,11,12,13,14},{4,6,7,11,12,13,14,15},{4,6,7,11,12,13,15},{4,6,7,11,12,14},{4,6,7,11,12,14,15},{4,6,7,11,12,15},{4,6,7,11,13},{4,6,7,11,13,14},{4,6,7,11,13,14,15},{4,6,7,11,13,15},{4,6,7,11,14},{4,6,7,11,14,15},{4,6,7,11,15},{4,6,7,12},{4,6,7,12,13},{4,6,7,12,13,14},{4,6,7,12,13,14,15},{4,6,7,12,13,15},{4,6,7,12,14},{4,6,7,12,14,15},{4,6,7,12,15},{4,6,7,13},{4,6,7,13,14},{4,6,7,13,14,15},{4,6,7,13,15},{4,6,7,14},{4,6,7,14,15},{4,6,7,15},{4,6,8},{4,6,8,9},{4,6,8,9,10},{4,6,8,9,10,11},{4,6,8,9,10,11,12},{4,6,8,9,10,11,12,13},{4,6,8,9,10,11,12,13,14},{4,6,8,9,10,11,12,13,14,15},{4,6,8,9,10,11,12,13,15},{4,6,8,9,10,11,12,14},{4,6,8,9,10,11,12,14,15},{4,6,8,9,10,11,12,15},{4,6,8,9,10,11,13},{4,6,8,9,10,11,13,14},{4,6,8,9,10,11,13,14,15},{4,6,8,9,10,11,13,15},{4,6,8,9,10,11,14},{4,6,8,9,10,11,14,15},{4,6,8,9,10,11,15},{4,6,8,9,10,12},{4,6,8,9,10,12,13},{4,6,8,9,10,12,13,14},{4,6,8,9,10,12,13,14,15},{4,6,8,9,10,12,13,15},{4,6,8,9,10,12,14},{4,6,8,9,10,12,14,15},{4,6,8,9,10,12,15},{4,6,8,9,10,13},{4,6,8,9,10,13,14},{4,6,8,9,10,13,14,15},{4,6,8,9,10,13,15},{4,6,8,9,10,14},{4,6,8,9,10,14,15},{4,6,8,9,10,15},{4,6,8,9,11},{4,6,8,9,11,12},{4,6,8,9,11,12,13},{4,6,8,9,11,12,13,14},{4,6,8,9,11,12,13,14,15},{4,6,8,9,11,12,13,15},{4,6,8,9,11,12,14},{4,6,8,9,11,12,14,15},{4,6,8,9,11,12,15},{4,6,8,9,11,13},{4,6,8,9,11,13,14},{4,6,8,9,11,13,14,15},{4,6,8,9,11,13,15},{4,6,8,9,11,14},{4,6,8,9,11,14,15},{4,6,8,9,11,15},{4,6,8,9,12},{4,6,8,9,12,13},{4,6,8,9,12,13,14},{4,6,8,9,12,13,14,15},{4,6,8,9,12,13,15},{4,6,8,9,12,14},{4,6,8,9,12,14,15},{4,6,8,9,12,15},{4,6,8,9,13},{4,6,8,9,13,14},{4,6,8,9,13,14,15},{4,6,8,9,13,15},{4,6,8,9,14},{4,6,8,9,14,15},{4,6,8,9,15},{4,6,8,10},{4,6,8,10,11},{4,6,8,10,11,12},{4,6,8,10,11,12,13},{4,6,8,10,11,12,13,14},{4,6,8,10,11,12,13,14,15},{4,6,8,10,11,12,13,15},{4,6,8,10,11,12,14},{4,6,8,10,11,12,14,15},{4,6,8,10,11,12,15},{4,6,8,10,11,13},{4,6,8,10,11,13,14},{4,6,8,10,11,13,14,15},{4,6,8,10,11,13,15},{4,6,8,10,11,14},{4,6,8,10,11,14,15},{4,6,8,10,11,15},{4,6,8,10,12},{4,6,8,10,12,13},{4,6,8,10,12,13,14},{4,6,8,10,12,13,14,15},{4,6,8,10,12,13,15},{4,6,8,10,12,14},{4,6,8,10,12,14,15},{4,6,8,10,12,15},{4,6,8,10,13},{4,6,8,10,13,14},{4,6,8,10,13,14,15},{4,6,8,10,13,15},{4,6,8,10,14},{4,6,8,10,14,15},{4,6,8,10,15},{4,6,8,11},{4,6,8,11,12},{4,6,8,11,12,13},{4,6,8,11,12,13,14},{4,6,8,11,12,13,14,15},{4,6,8,11,12,13,15},{4,6,8,11,12,14},{4,6,8,11,12,14,15},{4,6,8,11,12,15},{4,6,8,11,13},{4,6,8,11,13,14},{4,6,8,11,13,14,15},{4,6,8,11,13,15},{4,6,8,11,14},{4,6,8,11,14,15},{4,6,8,11,15},{4,6,8,12},{4,6,8,12,13},{4,6,8,12,13,14},{4,6,8,12,13,14,15},{4,6,8,12,13,15},{4,6,8,12,14},{4,6,8,12,14,15},{4,6,8,12,15},{4,6,8,13},{4,6,8,13,14},{4,6,8,13,14,15},{4,6,8,13,15},{4,6,8,14},{4,6,8,14,15},{4,6,8,15},{4,6,9},{4,6,9,10},{4,6,9,10,11},{4,6,9,10,11,12},{4,6,9,10,11,12,13},{4,6,9,10,11,12,13,14},{4,6,9,10,11,12,13,14,15},{4,6,9,10,11,12,13,15},{4,6,9,10,11,12,14},{4,6,9,10,11,12,14,15},{4,6,9,10,11,12,15},{4,6,9,10,11,13},{4,6,9,10,11,13,14},{4,6,9,10,11,13,14,15},{4,6,9,10,11,13,15},{4,6,9,10,11,14},{4,6,9,10,11,14,15},{4,6,9,10,11,15},{4,6,9,10,12},{4,6,9,10,12,13},{4,6,9,10,12,13,14},{4,6,9,10,12,13,14,15},{4,6,9,10,12,13,15},{4,6,9,10,12,14},{4,6,9,10,12,14,15},{4,6,9,10,12,15},{4,6,9,10,13},{4,6,9,10,13,14},{4,6,9,10,13,14,15},{4,6,9,10,13,15},{4,6,9,10,14},{4,6,9,10,14,15},{4,6,9,10,15},{4,6,9,11},{4,6,9,11,12},{4,6,9,11,12,13},{4,6,9,11,12,13,14},{4,6,9,11,12,13,14,15},{4,6,9,11,12,13,15},{4,6,9,11,12,14},{4,6,9,11,12,14,15},{4,6,9,11,12,15},{4,6,9,11,13},{4,6,9,11,13,14},{4,6,9,11,13,14,15},{4,6,9,11,13,15},{4,6,9,11,14},{4,6,9,11,14,15},{4,6,9,11,15},{4,6,9,12},{4,6,9,12,13},{4,6,9,12,13,14},{4,6,9,12,13,14,15},{4,6,9,12,13,15},{4,6,9,12,14},{4,6,9,12,14,15},{4,6,9,12,15},{4,6,9,13},{4,6,9,13,14},{4,6,9,13,14,15},{4,6,9,13,15},{4,6,9,14},{4,6,9,14,15},{4,6,9,15},{4,6,10},{4,6,10,11},{4,6,10,11,12},{4,6,10,11,12,13},{4,6,10,11,12,13,14},{4,6,10,11,12,13,14,15},{4,6,10,11,12,13,15},{4,6,10,11,12,14},{4,6,10,11,12,14,15},{4,6,10,11,12,15},{4,6,10,11,13},{4,6,10,11,13,14},{4,6,10,11,13,14,15},{4,6,10,11,13,15},{4,6,10,11,14},{4,6,10,11,14,15},{4,6,10,11,15},{4,6,10,12},{4,6,10,12,13},{4,6,10,12,13,14},{4,6,10,12,13,14,15},{4,6,10,12,13,15},{4,6,10,12,14},{4,6,10,12,14,15},{4,6,10,12,15},{4,6,10,13},{4,6,10,13,14},{4,6,10,13,14,15},{4,6,10,13,15},{4,6,10,14},{4,6,10,14,15},{4,6,10,15},{4,6,11},{4,6,11,12},{4,6,11,12,13},{4,6,11,12,13,14},{4,6,11,12,13,14,15},{4,6,11,12,13,15},{4,6,11,12,14},{4,6,11,12,14,15},{4,6,11,12,15},{4,6,11,13},{4,6,11,13,14},{4,6,11,13,14,15},{4,6,11,13,15},{4,6,11,14},{4,6,11,14,15},{4,6,11,15},{4,6,12},{4,6,12,13},{4,6,12,13,14},{4,6,12,13,14,15},{4,6,12,13,15},{4,6,12,14},{4,6,12,14,15},{4,6,12,15},{4,6,13},{4,6,13,14},{4,6,13,14,15},{4,6,13,15},{4,6,14},{4,6,14,15},{4,6,15},{4,7},{4,7,8},{4,7,8,9},{4,7,8,9,10},{4,7,8,9,10,11},{4,7,8,9,10,11,12},{4,7,8,9,10,11,12,13},{4,7,8,9,10,11,12,13,14},{4,7,8,9,10,11,12,13,14,15},{4,7,8,9,10,11,12,13,15},{4,7,8,9,10,11,12,14},{4,7,8,9,10,11,12,14,15},{4,7,8,9,10,11,12,15},{4,7,8,9,10,11,13},{4,7,8,9,10,11,13,14},{4,7,8,9,10,11,13,14,15},{4,7,8,9,10,11,13,15},{4,7,8,9,10,11,14},{4,7,8,9,10,11,14,15},{4,7,8,9,10,11,15},{4,7,8,9,10,12},{4,7,8,9,10,12,13},{4,7,8,9,10,12,13,14},{4,7,8,9,10,12,13,14,15},{4,7,8,9,10,12,13,15},{4,7,8,9,10,12,14},{4,7,8,9,10,12,14,15},{4,7,8,9,10,12,15},{4,7,8,9,10,13},{4,7,8,9,10,13,14},{4,7,8,9,10,13,14,15},{4,7,8,9,10,13,15},{4,7,8,9,10,14},{4,7,8,9,10,14,15},{4,7,8,9,10,15},{4,7,8,9,11},{4,7,8,9,11,12},{4,7,8,9,11,12,13},{4,7,8,9,11,12,13,14},{4,7,8,9,11,12,13,14,15},{4,7,8,9,11,12,13,15},{4,7,8,9,11,12,14},{4,7,8,9,11,12,14,15},{4,7,8,9,11,12,15},{4,7,8,9,11,13},{4,7,8,9,11,13,14},{4,7,8,9,11,13,14,15},{4,7,8,9,11,13,15},{4,7,8,9,11,14},{4,7,8,9,11,14,15},{4,7,8,9,11,15},{4,7,8,9,12},{4,7,8,9,12,13},{4,7,8,9,12,13,14},{4,7,8,9,12,13,14,15},{4,7,8,9,12,13,15},{4,7,8,9,12,14},{4,7,8,9,12,14,15},{4,7,8,9,12,15},{4,7,8,9,13},{4,7,8,9,13,14},{4,7,8,9,13,14,15},{4,7,8,9,13,15},{4,7,8,9,14},{4,7,8,9,14,15},{4,7,8,9,15},{4,7,8,10},{4,7,8,10,11},{4,7,8,10,11,12},{4,7,8,10,11,12,13},{4,7,8,10,11,12,13,14},{4,7,8,10,11,12,13,14,15},{4,7,8,10,11,12,13,15},{4,7,8,10,11,12,14},{4,7,8,10,11,12,14,15},{4,7,8,10,11,12,15},{4,7,8,10,11,13},{4,7,8,10,11,13,14},{4,7,8,10,11,13,14,15},{4,7,8,10,11,13,15},{4,7,8,10,11,14},{4,7,8,10,11,14,15},{4,7,8,10,11,15},{4,7,8,10,12},{4,7,8,10,12,13},{4,7,8,10,12,13,14},{4,7,8,10,12,13,14,15},{4,7,8,10,12,13,15},{4,7,8,10,12,14},{4,7,8,10,12,14,15},{4,7,8,10,12,15},{4,7,8,10,13},{4,7,8,10,13,14},{4,7,8,10,13,14,15},{4,7,8,10,13,15},{4,7,8,10,14},{4,7,8,10,14,15},{4,7,8,10,15},{4,7,8,11},{4,7,8,11,12},{4,7,8,11,12,13},{4,7,8,11,12,13,14},{4,7,8,11,12,13,14,15},{4,7,8,11,12,13,15},{4,7,8,11,12,14},{4,7,8,11,12,14,15},{4,7,8,11,12,15},{4,7,8,11,13},{4,7,8,11,13,14},{4,7,8,11,13,14,15},{4,7,8,11,13,15},{4,7,8,11,14},{4,7,8,11,14,15},{4,7,8,11,15},{4,7,8,12},{4,7,8,12,13},{4,7,8,12,13,14},{4,7,8,12,13,14,15},{4,7,8,12,13,15},{4,7,8,12,14},{4,7,8,12,14,15},{4,7,8,12,15},{4,7,8,13},{4,7,8,13,14},{4,7,8,13,14,15},{4,7,8,13,15},{4,7,8,14},{4,7,8,14,15},{4,7,8,15},{4,7,9},{4,7,9,10},{4,7,9,10,11},{4,7,9,10,11,12},{4,7,9,10,11,12,13},{4,7,9,10,11,12,13,14},{4,7,9,10,11,12,13,14,15},{4,7,9,10,11,12,13,15},{4,7,9,10,11,12,14},{4,7,9,10,11,12,14,15},{4,7,9,10,11,12,15},{4,7,9,10,11,13},{4,7,9,10,11,13,14},{4,7,9,10,11,13,14,15},{4,7,9,10,11,13,15},{4,7,9,10,11,14},{4,7,9,10,11,14,15},{4,7,9,10,11,15},{4,7,9,10,12},{4,7,9,10,12,13},{4,7,9,10,12,13,14},{4,7,9,10,12,13,14,15},{4,7,9,10,12,13,15},{4,7,9,10,12,14},{4,7,9,10,12,14,15},{4,7,9,10,12,15},{4,7,9,10,13},{4,7,9,10,13,14},{4,7,9,10,13,14,15},{4,7,9,10,13,15},{4,7,9,10,14},{4,7,9,10,14,15},{4,7,9,10,15},{4,7,9,11},{4,7,9,11,12},{4,7,9,11,12,13},{4,7,9,11,12,13,14},{4,7,9,11,12,13,14,15},{4,7,9,11,12,13,15},{4,7,9,11,12,14},{4,7,9,11,12,14,15},{4,7,9,11,12,15},{4,7,9,11,13},{4,7,9,11,13,14},{4,7,9,11,13,14,15},{4,7,9,11,13,15},{4,7,9,11,14},{4,7,9,11,14,15},{4,7,9,11,15},{4,7,9,12},{4,7,9,12,13},{4,7,9,12,13,14},{4,7,9,12,13,14,15},{4,7,9,12,13,15},{4,7,9,12,14},{4,7,9,12,14,15},{4,7,9,12,15},{4,7,9,13},{4,7,9,13,14},{4,7,9,13,14,15},{4,7,9,13,15},{4,7,9,14},{4,7,9,14,15},{4,7,9,15},{4,7,10},{4,7,10,11},{4,7,10,11,12},{4,7,10,11,12,13},{4,7,10,11,12,13,14},{4,7,10,11,12,13,14,15},{4,7,10,11,12,13,15},{4,7,10,11,12,14},{4,7,10,11,12,14,15},{4,7,10,11,12,15},{4,7,10,11,13},{4,7,10,11,13,14},{4,7,10,11,13,14,15},{4,7,10,11,13,15},{4,7,10,11,14},{4,7,10,11,14,15},{4,7,10,11,15},{4,7,10,12},{4,7,10,12,13},{4,7,10,12,13,14},{4,7,10,12,13,14,15},{4,7,10,12,13,15},{4,7,10,12,14},{4,7,10,12,14,15},{4,7,10,12,15},{4,7,10,13},{4,7,10,13,14},{4,7,10,13,14,15},{4,7,10,13,15},{4,7,10,14},{4,7,10,14,15},{4,7,10,15},{4,7,11},{4,7,11,12},{4,7,11,12,13},{4,7,11,12,13,14},{4,7,11,12,13,14,15},{4,7,11,12,13,15},{4,7,11,12,14},{4,7,11,12,14,15},{4,7,11,12,15},{4,7,11,13},{4,7,11,13,14},{4,7,11,13,14,15},{4,7,11,13,15},{4,7,11,14},{4,7,11,14,15},{4,7,11,15},{4,7,12},{4,7,12,13},{4,7,12,13,14},{4,7,12,13,14,15},{4,7,12,13,15},{4,7,12,14},{4,7,12,14,15},{4,7,12,15},{4,7,13},{4,7,13,14},{4,7,13,14,15},{4,7,13,15},{4,7,14},{4,7,14,15},{4,7,15},{4,8},{4,8,9},{4,8,9,10},{4,8,9,10,11},{4,8,9,10,11,12},{4,8,9,10,11,12,13},{4,8,9,10,11,12,13,14},{4,8,9,10,11,12,13,14,15},{4,8,9,10,11,12,13,15},{4,8,9,10,11,12,14},{4,8,9,10,11,12,14,15},{4,8,9,10,11,12,15},{4,8,9,10,11,13},{4,8,9,10,11,13,14},{4,8,9,10,11,13,14,15},{4,8,9,10,11,13,15},{4,8,9,10,11,14},{4,8,9,10,11,14,15},{4,8,9,10,11,15},{4,8,9,10,12},{4,8,9,10,12,13},{4,8,9,10,12,13,14},{4,8,9,10,12,13,14,15},{4,8,9,10,12,13,15},{4,8,9,10,12,14},{4,8,9,10,12,14,15},{4,8,9,10,12,15},{4,8,9,10,13},{4,8,9,10,13,14},{4,8,9,10,13,14,15},{4,8,9,10,13,15},{4,8,9,10,14},{4,8,9,10,14,15},{4,8,9,10,15},{4,8,9,11},{4,8,9,11,12},{4,8,9,11,12,13},{4,8,9,11,12,13,14},{4,8,9,11,12,13,14,15},{4,8,9,11,12,13,15},{4,8,9,11,12,14},{4,8,9,11,12,14,15},{4,8,9,11,12,15},{4,8,9,11,13},{4,8,9,11,13,14},{4,8,9,11,13,14,15},{4,8,9,11,13,15},{4,8,9,11,14},{4,8,9,11,14,15},{4,8,9,11,15},{4,8,9,12},{4,8,9,12,13},{4,8,9,12,13,14},{4,8,9,12,13,14,15},{4,8,9,12,13,15},{4,8,9,12,14},{4,8,9,12,14,15},{4,8,9,12,15},{4,8,9,13},{4,8,9,13,14},{4,8,9,13,14,15},{4,8,9,13,15},{4,8,9,14},{4,8,9,14,15},{4,8,9,15},{4,8,10},{4,8,10,11},{4,8,10,11,12},{4,8,10,11,12,13},{4,8,10,11,12,13,14},{4,8,10,11,12,13,14,15},{4,8,10,11,12,13,15},{4,8,10,11,12,14},{4,8,10,11,12,14,15},{4,8,10,11,12,15},{4,8,10,11,13},{4,8,10,11,13,14},{4,8,10,11,13,14,15},{4,8,10,11,13,15},{4,8,10,11,14},{4,8,10,11,14,15},{4,8,10,11,15},{4,8,10,12},{4,8,10,12,13},{4,8,10,12,13,14},{4,8,10,12,13,14,15},{4,8,10,12,13,15},{4,8,10,12,14},{4,8,10,12,14,15},{4,8,10,12,15},{4,8,10,13},{4,8,10,13,14},{4,8,10,13,14,15},{4,8,10,13,15},{4,8,10,14},{4,8,10,14,15},{4,8,10,15},{4,8,11},{4,8,11,12},{4,8,11,12,13},{4,8,11,12,13,14},{4,8,11,12,13,14,15},{4,8,11,12,13,15},{4,8,11,12,14},{4,8,11,12,14,15},{4,8,11,12,15},{4,8,11,13},{4,8,11,13,14},{4,8,11,13,14,15},{4,8,11,13,15},{4,8,11,14},{4,8,11,14,15},{4,8,11,15},{4,8,12},{4,8,12,13},{4,8,12,13,14},{4,8,12,13,14,15},{4,8,12,13,15},{4,8,12,14},{4,8,12,14,15},{4,8,12,15},{4,8,13},{4,8,13,14},{4,8,13,14,15},{4,8,13,15},{4,8,14},{4,8,14,15},{4,8,15},{4,9},{4,9,10},{4,9,10,11},{4,9,10,11,12},{4,9,10,11,12,13},{4,9,10,11,12,13,14},{4,9,10,11,12,13,14,15},{4,9,10,11,12,13,15},{4,9,10,11,12,14},{4,9,10,11,12,14,15},{4,9,10,11,12,15},{4,9,10,11,13},{4,9,10,11,13,14},{4,9,10,11,13,14,15},{4,9,10,11,13,15},{4,9,10,11,14},{4,9,10,11,14,15},{4,9,10,11,15},{4,9,10,12},{4,9,10,12,13},{4,9,10,12,13,14},{4,9,10,12,13,14,15},{4,9,10,12,13,15},{4,9,10,12,14},{4,9,10,12,14,15},{4,9,10,12,15},{4,9,10,13},{4,9,10,13,14},{4,9,10,13,14,15},{4,9,10,13,15},{4,9,10,14},{4,9,10,14,15},{4,9,10,15},{4,9,11},{4,9,11,12},{4,9,11,12,13},{4,9,11,12,13,14},{4,9,11,12,13,14,15},{4,9,11,12,13,15},{4,9,11,12,14},{4,9,11,12,14,15},{4,9,11,12,15},{4,9,11,13},{4,9,11,13,14},{4,9,11,13,14,15},{4,9,11,13,15},{4,9,11,14},{4,9,11,14,15},{4,9,11,15},{4,9,12},{4,9,12,13},{4,9,12,13,14},{4,9,12,13,14,15},{4,9,12,13,15},{4,9,12,14},{4,9,12,14,15},{4,9,12,15},{4,9,13},{4,9,13,14},{4,9,13,14,15},{4,9,13,15},{4,9,14},{4,9,14,15},{4,9,15},{4,10},{4,10,11},{4,10,11,12},{4,10,11,12,13},{4,10,11,12,13,14},{4,10,11,12,13,14,15},{4,10,11,12,13,15},{4,10,11,12,14},{4,10,11,12,14,15},{4,10,11,12,15},{4,10,11,13},{4,10,11,13,14},{4,10,11,13,14,15},{4,10,11,13,15},{4,10,11,14},{4,10,11,14,15},{4,10,11,15},{4,10,12},{4,10,12,13},{4,10,12,13,14},{4,10,12,13,14,15},{4,10,12,13,15},{4,10,12,14},{4,10,12,14,15},{4,10,12,15},{4,10,13},{4,10,13,14},{4,10,13,14,15},{4,10,13,15},{4,10,14},{4,10,14,15},{4,10,15},{4,11},{4,11,12},{4,11,12,13},{4,11,12,13,14},{4,11,12,13,14,15},{4,11,12,13,15},{4,11,12,14},{4,11,12,14,15},{4,11,12,15},{4,11,13},{4,11,13,14},{4,11,13,14,15},{4,11,13,15},{4,11,14},{4,11,14,15},{4,11,15},{4,12},{4,12,13},{4,12,13,14},{4,12,13,14,15},{4,12,13,15},{4,12,14},{4,12,14,15},{4,12,15},{4,13},{4,13,14},{4,13,14,15},{4,13,15},{4,14},{4,14,15},{4,15},{5,6},{5,6,7},{5,6,7,8},{5,6,7,8,9},{5,6,7,8,9,10},{5,6,7,8,9,10,11},{5,6,7,8,9,10,11,12},{5,6,7,8,9,10,11,12,13},{5,6,7,8,9,10,11,12,13,14},{5,6,7,8,9,10,11,12,13,14,15},{5,6,7,8,9,10,11,12,13,15},{5,6,7,8,9,10,11,12,14},{5,6,7,8,9,10,11,12,14,15},{5,6,7,8,9,10,11,12,15},{5,6,7,8,9,10,11,13},{5,6,7,8,9,10,11,13,14},{5,6,7,8,9,10,11,13,14,15},{5,6,7,8,9,10,11,13,15},{5,6,7,8,9,10,11,14},{5,6,7,8,9,10,11,14,15},{5,6,7,8,9,10,11,15},{5,6,7,8,9,10,12},{5,6,7,8,9,10,12,13},{5,6,7,8,9,10,12,13,14},{5,6,7,8,9,10,12,13,14,15},{5,6,7,8,9,10,12,13,15},{5,6,7,8,9,10,12,14},{5,6,7,8,9,10,12,14,15},{5,6,7,8,9,10,12,15},{5,6,7,8,9,10,13},{5,6,7,8,9,10,13,14},{5,6,7,8,9,10,13,14,15},{5,6,7,8,9,10,13,15},{5,6,7,8,9,10,14},{5,6,7,8,9,10,14,15},{5,6,7,8,9,10,15},{5,6,7,8,9,11},{5,6,7,8,9,11,12},{5,6,7,8,9,11,12,13},{5,6,7,8,9,11,12,13,14},{5,6,7,8,9,11,12,13,14,15},{5,6,7,8,9,11,12,13,15},{5,6,7,8,9,11,12,14},{5,6,7,8,9,11,12,14,15},{5,6,7,8,9,11,12,15},{5,6,7,8,9,11,13},{5,6,7,8,9,11,13,14},{5,6,7,8,9,11,13,14,15},{5,6,7,8,9,11,13,15},{5,6,7,8,9,11,14},{5,6,7,8,9,11,14,15},{5,6,7,8,9,11,15},{5,6,7,8,9,12},{5,6,7,8,9,12,13},{5,6,7,8,9,12,13,14},{5,6,7,8,9,12,13,14,15},{5,6,7,8,9,12,13,15},{5,6,7,8,9,12,14},{5,6,7,8,9,12,14,15},{5,6,7,8,9,12,15},{5,6,7,8,9,13},{5,6,7,8,9,13,14},{5,6,7,8,9,13,14,15},{5,6,7,8,9,13,15},{5,6,7,8,9,14},{5,6,7,8,9,14,15},{5,6,7,8,9,15},{5,6,7,8,10},{5,6,7,8,10,11},{5,6,7,8,10,11,12},{5,6,7,8,10,11,12,13},{5,6,7,8,10,11,12,13,14},{5,6,7,8,10,11,12,13,14,15},{5,6,7,8,10,11,12,13,15},{5,6,7,8,10,11,12,14},{5,6,7,8,10,11,12,14,15},{5,6,7,8,10,11,12,15},{5,6,7,8,10,11,13},{5,6,7,8,10,11,13,14},{5,6,7,8,10,11,13,14,15},{5,6,7,8,10,11,13,15},{5,6,7,8,10,11,14},{5,6,7,8,10,11,14,15},{5,6,7,8,10,11,15},{5,6,7,8,10,12},{5,6,7,8,10,12,13},{5,6,7,8,10,12,13,14},{5,6,7,8,10,12,13,14,15},{5,6,7,8,10,12,13,15},{5,6,7,8,10,12,14},{5,6,7,8,10,12,14,15},{5,6,7,8,10,12,15},{5,6,7,8,10,13},{5,6,7,8,10,13,14},{5,6,7,8,10,13,14,15},{5,6,7,8,10,13,15},{5,6,7,8,10,14},{5,6,7,8,10,14,15},{5,6,7,8,10,15},{5,6,7,8,11},{5,6,7,8,11,12},{5,6,7,8,11,12,13},{5,6,7,8,11,12,13,14},{5,6,7,8,11,12,13,14,15},{5,6,7,8,11,12,13,15},{5,6,7,8,11,12,14},{5,6,7,8,11,12,14,15},{5,6,7,8,11,12,15},{5,6,7,8,11,13},{5,6,7,8,11,13,14},{5,6,7,8,11,13,14,15},{5,6,7,8,11,13,15},{5,6,7,8,11,14},{5,6,7,8,11,14,15},{5,6,7,8,11,15},{5,6,7,8,12},{5,6,7,8,12,13},{5,6,7,8,12,13,14},{5,6,7,8,12,13,14,15},{5,6,7,8,12,13,15},{5,6,7,8,12,14},{5,6,7,8,12,14,15},{5,6,7,8,12,15},{5,6,7,8,13},{5,6,7,8,13,14},{5,6,7,8,13,14,15},{5,6,7,8,13,15},{5,6,7,8,14},{5,6,7,8,14,15},{5,6,7,8,15},{5,6,7,9},{5,6,7,9,10},{5,6,7,9,10,11},{5,6,7,9,10,11,12},{5,6,7,9,10,11,12,13},{5,6,7,9,10,11,12,13,14},{5,6,7,9,10,11,12,13,14,15},{5,6,7,9,10,11,12,13,15},{5,6,7,9,10,11,12,14},{5,6,7,9,10,11,12,14,15},{5,6,7,9,10,11,12,15},{5,6,7,9,10,11,13},{5,6,7,9,10,11,13,14},{5,6,7,9,10,11,13,14,15},{5,6,7,9,10,11,13,15},{5,6,7,9,10,11,14},{5,6,7,9,10,11,14,15},{5,6,7,9,10,11,15},{5,6,7,9,10,12},{5,6,7,9,10,12,13},{5,6,7,9,10,12,13,14},{5,6,7,9,10,12,13,14,15},{5,6,7,9,10,12,13,15},{5,6,7,9,10,12,14},{5,6,7,9,10,12,14,15},{5,6,7,9,10,12,15},{5,6,7,9,10,13},{5,6,7,9,10,13,14},{5,6,7,9,10,13,14,15},{5,6,7,9,10,13,15},{5,6,7,9,10,14},{5,6,7,9,10,14,15},{5,6,7,9,10,15},{5,6,7,9,11},{5,6,7,9,11,12},{5,6,7,9,11,12,13},{5,6,7,9,11,12,13,14},{5,6,7,9,11,12,13,14,15},{5,6,7,9,11,12,13,15},{5,6,7,9,11,12,14},{5,6,7,9,11,12,14,15},{5,6,7,9,11,12,15},{5,6,7,9,11,13},{5,6,7,9,11,13,14},{5,6,7,9,11,13,14,15},{5,6,7,9,11,13,15},{5,6,7,9,11,14},{5,6,7,9,11,14,15},{5,6,7,9,11,15},{5,6,7,9,12},{5,6,7,9,12,13},{5,6,7,9,12,13,14},{5,6,7,9,12,13,14,15},{5,6,7,9,12,13,15},{5,6,7,9,12,14},{5,6,7,9,12,14,15},{5,6,7,9,12,15},{5,6,7,9,13},{5,6,7,9,13,14},{5,6,7,9,13,14,15},{5,6,7,9,13,15},{5,6,7,9,14},{5,6,7,9,14,15},{5,6,7,9,15},{5,6,7,10},{5,6,7,10,11},{5,6,7,10,11,12},{5,6,7,10,11,12,13},{5,6,7,10,11,12,13,14},{5,6,7,10,11,12,13,14,15},{5,6,7,10,11,12,13,15},{5,6,7,10,11,12,14},{5,6,7,10,11,12,14,15},{5,6,7,10,11,12,15},{5,6,7,10,11,13},{5,6,7,10,11,13,14},{5,6,7,10,11,13,14,15},{5,6,7,10,11,13,15},{5,6,7,10,11,14},{5,6,7,10,11,14,15},{5,6,7,10,11,15},{5,6,7,10,12},{5,6,7,10,12,13},{5,6,7,10,12,13,14},{5,6,7,10,12,13,14,15},{5,6,7,10,12,13,15},{5,6,7,10,12,14},{5,6,7,10,12,14,15},{5,6,7,10,12,15},{5,6,7,10,13},{5,6,7,10,13,14},{5,6,7,10,13,14,15},{5,6,7,10,13,15},{5,6,7,10,14},{5,6,7,10,14,15},{5,6,7,10,15},{5,6,7,11},{5,6,7,11,12},{5,6,7,11,12,13},{5,6,7,11,12,13,14},{5,6,7,11,12,13,14,15},{5,6,7,11,12,13,15},{5,6,7,11,12,14},{5,6,7,11,12,14,15},{5,6,7,11,12,15},{5,6,7,11,13},{5,6,7,11,13,14},{5,6,7,11,13,14,15},{5,6,7,11,13,15},{5,6,7,11,14},{5,6,7,11,14,15},{5,6,7,11,15},{5,6,7,12},{5,6,7,12,13},{5,6,7,12,13,14},{5,6,7,12,13,14,15},{5,6,7,12,13,15},{5,6,7,12,14},{5,6,7,12,14,15},{5,6,7,12,15},{5,6,7,13},{5,6,7,13,14},{5,6,7,13,14,15},{5,6,7,13,15},{5,6,7,14},{5,6,7,14,15},{5,6,7,15},{5,6,8},{5,6,8,9},{5,6,8,9,10},{5,6,8,9,10,11},{5,6,8,9,10,11,12},{5,6,8,9,10,11,12,13},{5,6,8,9,10,11,12,13,14},{5,6,8,9,10,11,12,13,14,15},{5,6,8,9,10,11,12,13,15},{5,6,8,9,10,11,12,14},{5,6,8,9,10,11,12,14,15},{5,6,8,9,10,11,12,15},{5,6,8,9,10,11,13},{5,6,8,9,10,11,13,14},{5,6,8,9,10,11,13,14,15},{5,6,8,9,10,11,13,15},{5,6,8,9,10,11,14},{5,6,8,9,10,11,14,15},{5,6,8,9,10,11,15},{5,6,8,9,10,12},{5,6,8,9,10,12,13},{5,6,8,9,10,12,13,14},{5,6,8,9,10,12,13,14,15},{5,6,8,9,10,12,13,15},{5,6,8,9,10,12,14},{5,6,8,9,10,12,14,15},{5,6,8,9,10,12,15},{5,6,8,9,10,13},{5,6,8,9,10,13,14},{5,6,8,9,10,13,14,15},{5,6,8,9,10,13,15},{5,6,8,9,10,14},{5,6,8,9,10,14,15},{5,6,8,9,10,15},{5,6,8,9,11},{5,6,8,9,11,12},{5,6,8,9,11,12,13},{5,6,8,9,11,12,13,14},{5,6,8,9,11,12,13,14,15},{5,6,8,9,11,12,13,15},{5,6,8,9,11,12,14},{5,6,8,9,11,12,14,15},{5,6,8,9,11,12,15},{5,6,8,9,11,13},{5,6,8,9,11,13,14},{5,6,8,9,11,13,14,15},{5,6,8,9,11,13,15},{5,6,8,9,11,14},{5,6,8,9,11,14,15},{5,6,8,9,11,15},{5,6,8,9,12},{5,6,8,9,12,13},{5,6,8,9,12,13,14},{5,6,8,9,12,13,14,15},{5,6,8,9,12,13,15},{5,6,8,9,12,14},{5,6,8,9,12,14,15},{5,6,8,9,12,15},{5,6,8,9,13},{5,6,8,9,13,14},{5,6,8,9,13,14,15},{5,6,8,9,13,15},{5,6,8,9,14},{5,6,8,9,14,15},{5,6,8,9,15},{5,6,8,10},{5,6,8,10,11},{5,6,8,10,11,12},{5,6,8,10,11,12,13},{5,6,8,10,11,12,13,14},{5,6,8,10,11,12,13,14,15},{5,6,8,10,11,12,13,15},{5,6,8,10,11,12,14},{5,6,8,10,11,12,14,15},{5,6,8,10,11,12,15},{5,6,8,10,11,13},{5,6,8,10,11,13,14},{5,6,8,10,11,13,14,15},{5,6,8,10,11,13,15},{5,6,8,10,11,14},{5,6,8,10,11,14,15},{5,6,8,10,11,15},{5,6,8,10,12},{5,6,8,10,12,13},{5,6,8,10,12,13,14},{5,6,8,10,12,13,14,15},{5,6,8,10,12,13,15},{5,6,8,10,12,14},{5,6,8,10,12,14,15},{5,6,8,10,12,15},{5,6,8,10,13},{5,6,8,10,13,14},{5,6,8,10,13,14,15},{5,6,8,10,13,15},{5,6,8,10,14},{5,6,8,10,14,15},{5,6,8,10,15},{5,6,8,11},{5,6,8,11,12},{5,6,8,11,12,13},{5,6,8,11,12,13,14},{5,6,8,11,12,13,14,15},{5,6,8,11,12,13,15},{5,6,8,11,12,14},{5,6,8,11,12,14,15},{5,6,8,11,12,15},{5,6,8,11,13},{5,6,8,11,13,14},{5,6,8,11,13,14,15},{5,6,8,11,13,15},{5,6,8,11,14},{5,6,8,11,14,15},{5,6,8,11,15},{5,6,8,12},{5,6,8,12,13},{5,6,8,12,13,14},{5,6,8,12,13,14,15},{5,6,8,12,13,15},{5,6,8,12,14},{5,6,8,12,14,15},{5,6,8,12,15},{5,6,8,13},{5,6,8,13,14},{5,6,8,13,14,15},{5,6,8,13,15},{5,6,8,14},{5,6,8,14,15},{5,6,8,15},{5,6,9},{5,6,9,10},{5,6,9,10,11},{5,6,9,10,11,12},{5,6,9,10,11,12,13},{5,6,9,10,11,12,13,14},{5,6,9,10,11,12,13,14,15},{5,6,9,10,11,12,13,15},{5,6,9,10,11,12,14},{5,6,9,10,11,12,14,15},{5,6,9,10,11,12,15},{5,6,9,10,11,13},{5,6,9,10,11,13,14},{5,6,9,10,11,13,14,15},{5,6,9,10,11,13,15},{5,6,9,10,11,14},{5,6,9,10,11,14,15},{5,6,9,10,11,15},{5,6,9,10,12},{5,6,9,10,12,13},{5,6,9,10,12,13,14},{5,6,9,10,12,13,14,15},{5,6,9,10,12,13,15},{5,6,9,10,12,14},{5,6,9,10,12,14,15},{5,6,9,10,12,15},{5,6,9,10,13},{5,6,9,10,13,14},{5,6,9,10,13,14,15},{5,6,9,10,13,15},{5,6,9,10,14},{5,6,9,10,14,15},{5,6,9,10,15},{5,6,9,11},{5,6,9,11,12},{5,6,9,11,12,13},{5,6,9,11,12,13,14},{5,6,9,11,12,13,14,15},{5,6,9,11,12,13,15},{5,6,9,11,12,14},{5,6,9,11,12,14,15},{5,6,9,11,12,15},{5,6,9,11,13},{5,6,9,11,13,14},{5,6,9,11,13,14,15},{5,6,9,11,13,15},{5,6,9,11,14},{5,6,9,11,14,15},{5,6,9,11,15},{5,6,9,12},{5,6,9,12,13},{5,6,9,12,13,14},{5,6,9,12,13,14,15},{5,6,9,12,13,15},{5,6,9,12,14},{5,6,9,12,14,15},{5,6,9,12,15},{5,6,9,13},{5,6,9,13,14},{5,6,9,13,14,15},{5,6,9,13,15},{5,6,9,14},{5,6,9,14,15},{5,6,9,15},{5,6,10},{5,6,10,11},{5,6,10,11,12},{5,6,10,11,12,13},{5,6,10,11,12,13,14},{5,6,10,11,12,13,14,15},{5,6,10,11,12,13,15},{5,6,10,11,12,14},{5,6,10,11,12,14,15},{5,6,10,11,12,15},{5,6,10,11,13},{5,6,10,11,13,14},{5,6,10,11,13,14,15},{5,6,10,11,13,15},{5,6,10,11,14},{5,6,10,11,14,15},{5,6,10,11,15},{5,6,10,12},{5,6,10,12,13},{5,6,10,12,13,14},{5,6,10,12,13,14,15},{5,6,10,12,13,15},{5,6,10,12,14},{5,6,10,12,14,15},{5,6,10,12,15},{5,6,10,13},{5,6,10,13,14},{5,6,10,13,14,15},{5,6,10,13,15},{5,6,10,14},{5,6,10,14,15},{5,6,10,15},{5,6,11},{5,6,11,12},{5,6,11,12,13},{5,6,11,12,13,14},{5,6,11,12,13,14,15},{5,6,11,12,13,15},{5,6,11,12,14},{5,6,11,12,14,15},{5,6,11,12,15},{5,6,11,13},{5,6,11,13,14},{5,6,11,13,14,15},{5,6,11,13,15},{5,6,11,14},{5,6,11,14,15},{5,6,11,15},{5,6,12},{5,6,12,13},{5,6,12,13,14},{5,6,12,13,14,15},{5,6,12,13,15},{5,6,12,14},{5,6,12,14,15},{5,6,12,15},{5,6,13},{5,6,13,14},{5,6,13,14,15},{5,6,13,15},{5,6,14},{5,6,14,15},{5,6,15},{5,7},{5,7,8},{5,7,8,9},{5,7,8,9,10},{5,7,8,9,10,11},{5,7,8,9,10,11,12},{5,7,8,9,10,11,12,13},{5,7,8,9,10,11,12,13,14},{5,7,8,9,10,11,12,13,14,15},{5,7,8,9,10,11,12,13,15},{5,7,8,9,10,11,12,14},{5,7,8,9,10,11,12,14,15},{5,7,8,9,10,11,12,15},{5,7,8,9,10,11,13},{5,7,8,9,10,11,13,14},{5,7,8,9,10,11,13,14,15},{5,7,8,9,10,11,13,15},{5,7,8,9,10,11,14},{5,7,8,9,10,11,14,15},{5,7,8,9,10,11,15},{5,7,8,9,10,12},{5,7,8,9,10,12,13},{5,7,8,9,10,12,13,14},{5,7,8,9,10,12,13,14,15},{5,7,8,9,10,12,13,15},{5,7,8,9,10,12,14},{5,7,8,9,10,12,14,15},{5,7,8,9,10,12,15},{5,7,8,9,10,13},{5,7,8,9,10,13,14},{5,7,8,9,10,13,14,15},{5,7,8,9,10,13,15},{5,7,8,9,10,14},{5,7,8,9,10,14,15},{5,7,8,9,10,15},{5,7,8,9,11},{5,7,8,9,11,12},{5,7,8,9,11,12,13},{5,7,8,9,11,12,13,14},{5,7,8,9,11,12,13,14,15},{5,7,8,9,11,12,13,15},{5,7,8,9,11,12,14},{5,7,8,9,11,12,14,15},{5,7,8,9,11,12,15},{5,7,8,9,11,13},{5,7,8,9,11,13,14},{5,7,8,9,11,13,14,15},{5,7,8,9,11,13,15},{5,7,8,9,11,14},{5,7,8,9,11,14,15},{5,7,8,9,11,15},{5,7,8,9,12},{5,7,8,9,12,13},{5,7,8,9,12,13,14},{5,7,8,9,12,13,14,15},{5,7,8,9,12,13,15},{5,7,8,9,12,14},{5,7,8,9,12,14,15},{5,7,8,9,12,15},{5,7,8,9,13},{5,7,8,9,13,14},{5,7,8,9,13,14,15},{5,7,8,9,13,15},{5,7,8,9,14},{5,7,8,9,14,15},{5,7,8,9,15},{5,7,8,10},{5,7,8,10,11},{5,7,8,10,11,12},{5,7,8,10,11,12,13},{5,7,8,10,11,12,13,14},{5,7,8,10,11,12,13,14,15},{5,7,8,10,11,12,13,15},{5,7,8,10,11,12,14},{5,7,8,10,11,12,14,15},{5,7,8,10,11,12,15},{5,7,8,10,11,13},{5,7,8,10,11,13,14},{5,7,8,10,11,13,14,15},{5,7,8,10,11,13,15},{5,7,8,10,11,14},{5,7,8,10,11,14,15},{5,7,8,10,11,15},{5,7,8,10,12},{5,7,8,10,12,13},{5,7,8,10,12,13,14},{5,7,8,10,12,13,14,15},{5,7,8,10,12,13,15},{5,7,8,10,12,14},{5,7,8,10,12,14,15},{5,7,8,10,12,15},{5,7,8,10,13},{5,7,8,10,13,14},{5,7,8,10,13,14,15},{5,7,8,10,13,15},{5,7,8,10,14},{5,7,8,10,14,15},{5,7,8,10,15},{5,7,8,11},{5,7,8,11,12},{5,7,8,11,12,13},{5,7,8,11,12,13,14},{5,7,8,11,12,13,14,15},{5,7,8,11,12,13,15},{5,7,8,11,12,14},{5,7,8,11,12,14,15},{5,7,8,11,12,15},{5,7,8,11,13},{5,7,8,11,13,14},{5,7,8,11,13,14,15},{5,7,8,11,13,15},{5,7,8,11,14},{5,7,8,11,14,15},{5,7,8,11,15},{5,7,8,12},{5,7,8,12,13},{5,7,8,12,13,14},{5,7,8,12,13,14,15},{5,7,8,12,13,15},{5,7,8,12,14},{5,7,8,12,14,15},{5,7,8,12,15},{5,7,8,13},{5,7,8,13,14},{5,7,8,13,14,15},{5,7,8,13,15},{5,7,8,14},{5,7,8,14,15},{5,7,8,15},{5,7,9},{5,7,9,10},{5,7,9,10,11},{5,7,9,10,11,12},{5,7,9,10,11,12,13},{5,7,9,10,11,12,13,14},{5,7,9,10,11,12,13,14,15},{5,7,9,10,11,12,13,15},{5,7,9,10,11,12,14},{5,7,9,10,11,12,14,15},{5,7,9,10,11,12,15},{5,7,9,10,11,13},{5,7,9,10,11,13,14},{5,7,9,10,11,13,14,15},{5,7,9,10,11,13,15},{5,7,9,10,11,14},{5,7,9,10,11,14,15},{5,7,9,10,11,15},{5,7,9,10,12},{5,7,9,10,12,13},{5,7,9,10,12,13,14},{5,7,9,10,12,13,14,15},{5,7,9,10,12,13,15},{5,7,9,10,12,14},{5,7,9,10,12,14,15},{5,7,9,10,12,15},{5,7,9,10,13},{5,7,9,10,13,14},{5,7,9,10,13,14,15},{5,7,9,10,13,15},{5,7,9,10,14},{5,7,9,10,14,15},{5,7,9,10,15},{5,7,9,11},{5,7,9,11,12},{5,7,9,11,12,13},{5,7,9,11,12,13,14},{5,7,9,11,12,13,14,15},{5,7,9,11,12,13,15},{5,7,9,11,12,14},{5,7,9,11,12,14,15},{5,7,9,11,12,15},{5,7,9,11,13},{5,7,9,11,13,14},{5,7,9,11,13,14,15},{5,7,9,11,13,15},{5,7,9,11,14},{5,7,9,11,14,15},{5,7,9,11,15},{5,7,9,12},{5,7,9,12,13},{5,7,9,12,13,14},{5,7,9,12,13,14,15},{5,7,9,12,13,15},{5,7,9,12,14},{5,7,9,12,14,15},{5,7,9,12,15},{5,7,9,13},{5,7,9,13,14},{5,7,9,13,14,15},{5,7,9,13,15},{5,7,9,14},{5,7,9,14,15},{5,7,9,15},{5,7,10},{5,7,10,11},{5,7,10,11,12},{5,7,10,11,12,13},{5,7,10,11,12,13,14},{5,7,10,11,12,13,14,15},{5,7,10,11,12,13,15},{5,7,10,11,12,14},{5,7,10,11,12,14,15},{5,7,10,11,12,15},{5,7,10,11,13},{5,7,10,11,13,14},{5,7,10,11,13,14,15},{5,7,10,11,13,15},{5,7,10,11,14},{5,7,10,11,14,15},{5,7,10,11,15},{5,7,10,12},{5,7,10,12,13},{5,7,10,12,13,14},{5,7,10,12,13,14,15},{5,7,10,12,13,15},{5,7,10,12,14},{5,7,10,12,14,15},{5,7,10,12,15},{5,7,10,13},{5,7,10,13,14},{5,7,10,13,14,15},{5,7,10,13,15},{5,7,10,14},{5,7,10,14,15},{5,7,10,15},{5,7,11},{5,7,11,12},{5,7,11,12,13},{5,7,11,12,13,14},{5,7,11,12,13,14,15},{5,7,11,12,13,15},{5,7,11,12,14},{5,7,11,12,14,15},{5,7,11,12,15},{5,7,11,13},{5,7,11,13,14},{5,7,11,13,14,15},{5,7,11,13,15},{5,7,11,14},{5,7,11,14,15},{5,7,11,15},{5,7,12},{5,7,12,13},{5,7,12,13,14},{5,7,12,13,14,15},{5,7,12,13,15},{5,7,12,14},{5,7,12,14,15},{5,7,12,15},{5,7,13},{5,7,13,14},{5,7,13,14,15},{5,7,13,15},{5,7,14},{5,7,14,15},{5,7,15},{5,8},{5,8,9},{5,8,9,10},{5,8,9,10,11},{5,8,9,10,11,12},{5,8,9,10,11,12,13},{5,8,9,10,11,12,13,14},{5,8,9,10,11,12,13,14,15},{5,8,9,10,11,12,13,15},{5,8,9,10,11,12,14},{5,8,9,10,11,12,14,15},{5,8,9,10,11,12,15},{5,8,9,10,11,13},{5,8,9,10,11,13,14},{5,8,9,10,11,13,14,15},{5,8,9,10,11,13,15},{5,8,9,10,11,14},{5,8,9,10,11,14,15},{5,8,9,10,11,15},{5,8,9,10,12},{5,8,9,10,12,13},{5,8,9,10,12,13,14},{5,8,9,10,12,13,14,15},{5,8,9,10,12,13,15},{5,8,9,10,12,14},{5,8,9,10,12,14,15},{5,8,9,10,12,15},{5,8,9,10,13},{5,8,9,10,13,14},{5,8,9,10,13,14,15},{5,8,9,10,13,15},{5,8,9,10,14},{5,8,9,10,14,15},{5,8,9,10,15},{5,8,9,11},{5,8,9,11,12},{5,8,9,11,12,13},{5,8,9,11,12,13,14},{5,8,9,11,12,13,14,15},{5,8,9,11,12,13,15},{5,8,9,11,12,14},{5,8,9,11,12,14,15},{5,8,9,11,12,15},{5,8,9,11,13},{5,8,9,11,13,14},{5,8,9,11,13,14,15},{5,8,9,11,13,15},{5,8,9,11,14},{5,8,9,11,14,15},{5,8,9,11,15},{5,8,9,12},{5,8,9,12,13},{5,8,9,12,13,14},{5,8,9,12,13,14,15},{5,8,9,12,13,15},{5,8,9,12,14},{5,8,9,12,14,15},{5,8,9,12,15},{5,8,9,13},{5,8,9,13,14},{5,8,9,13,14,15},{5,8,9,13,15},{5,8,9,14},{5,8,9,14,15},{5,8,9,15},{5,8,10},{5,8,10,11},{5,8,10,11,12},{5,8,10,11,12,13},{5,8,10,11,12,13,14},{5,8,10,11,12,13,14,15},{5,8,10,11,12,13,15},{5,8,10,11,12,14},{5,8,10,11,12,14,15},{5,8,10,11,12,15},{5,8,10,11,13},{5,8,10,11,13,14},{5,8,10,11,13,14,15},{5,8,10,11,13,15},{5,8,10,11,14},{5,8,10,11,14,15},{5,8,10,11,15},{5,8,10,12},{5,8,10,12,13},{5,8,10,12,13,14},{5,8,10,12,13,14,15},{5,8,10,12,13,15},{5,8,10,12,14},{5,8,10,12,14,15},{5,8,10,12,15},{5,8,10,13},{5,8,10,13,14},{5,8,10,13,14,15},{5,8,10,13,15},{5,8,10,14},{5,8,10,14,15},{5,8,10,15},{5,8,11},{5,8,11,12},{5,8,11,12,13},{5,8,11,12,13,14},{5,8,11,12,13,14,15},{5,8,11,12,13,15},{5,8,11,12,14},{5,8,11,12,14,15},{5,8,11,12,15},{5,8,11,13},{5,8,11,13,14},{5,8,11,13,14,15},{5,8,11,13,15},{5,8,11,14},{5,8,11,14,15},{5,8,11,15},{5,8,12},{5,8,12,13},{5,8,12,13,14},{5,8,12,13,14,15},{5,8,12,13,15},{5,8,12,14},{5,8,12,14,15},{5,8,12,15},{5,8,13},{5,8,13,14},{5,8,13,14,15},{5,8,13,15},{5,8,14},{5,8,14,15},{5,8,15},{5,9},{5,9,10},{5,9,10,11},{5,9,10,11,12},{5,9,10,11,12,13},{5,9,10,11,12,13,14},{5,9,10,11,12,13,14,15},{5,9,10,11,12,13,15},{5,9,10,11,12,14},{5,9,10,11,12,14,15},{5,9,10,11,12,15},{5,9,10,11,13},{5,9,10,11,13,14},{5,9,10,11,13,14,15},{5,9,10,11,13,15},{5,9,10,11,14},{5,9,10,11,14,15},{5,9,10,11,15},{5,9,10,12},{5,9,10,12,13},{5,9,10,12,13,14},{5,9,10,12,13,14,15},{5,9,10,12,13,15},{5,9,10,12,14},{5,9,10,12,14,15},{5,9,10,12,15},{5,9,10,13},{5,9,10,13,14},{5,9,10,13,14,15},{5,9,10,13,15},{5,9,10,14},{5,9,10,14,15},{5,9,10,15},{5,9,11},{5,9,11,12},{5,9,11,12,13},{5,9,11,12,13,14},{5,9,11,12,13,14,15},{5,9,11,12,13,15},{5,9,11,12,14},{5,9,11,12,14,15},{5,9,11,12,15},{5,9,11,13},{5,9,11,13,14},{5,9,11,13,14,15},{5,9,11,13,15},{5,9,11,14},{5,9,11,14,15},{5,9,11,15},{5,9,12},{5,9,12,13},{5,9,12,13,14},{5,9,12,13,14,15},{5,9,12,13,15},{5,9,12,14},{5,9,12,14,15},{5,9,12,15},{5,9,13},{5,9,13,14},{5,9,13,14,15},{5,9,13,15},{5,9,14},{5,9,14,15},{5,9,15},{5,10},{5,10,11},{5,10,11,12},{5,10,11,12,13},{5,10,11,12,13,14},{5,10,11,12,13,14,15},{5,10,11,12,13,15},{5,10,11,12,14},{5,10,11,12,14,15},{5,10,11,12,15},{5,10,11,13},{5,10,11,13,14},{5,10,11,13,14,15},{5,10,11,13,15},{5,10,11,14},{5,10,11,14,15},{5,10,11,15},{5,10,12},{5,10,12,13},{5,10,12,13,14},{5,10,12,13,14,15},{5,10,12,13,15},{5,10,12,14},{5,10,12,14,15},{5,10,12,15},{5,10,13},{5,10,13,14},{5,10,13,14,15},{5,10,13,15},{5,10,14},{5,10,14,15},{5,10,15},{5,11},{5,11,12},{5,11,12,13},{5,11,12,13,14},{5,11,12,13,14,15},{5,11,12,13,15},{5,11,12,14},{5,11,12,14,15},{5,11,12,15},{5,11,13},{5,11,13,14},{5,11,13,14,15},{5,11,13,15},{5,11,14},{5,11,14,15},{5,11,15},{5,12},{5,12,13},{5,12,13,14},{5,12,13,14,15},{5,12,13,15},{5,12,14},{5,12,14,15},{5,12,15},{5,13},{5,13,14},{5,13,14,15},{5,13,15},{5,14},{5,14,15},{5,15},{6,7},{6,7,8},{6,7,8,9},{6,7,8,9,10},{6,7,8,9,10,11},{6,7,8,9,10,11,12},{6,7,8,9,10,11,12,13},{6,7,8,9,10,11,12,13,14},{6,7,8,9,10,11,12,13,14,15},{6,7,8,9,10,11,12,13,15},{6,7,8,9,10,11,12,14},{6,7,8,9,10,11,12,14,15},{6,7,8,9,10,11,12,15},{6,7,8,9,10,11,13},{6,7,8,9,10,11,13,14},{6,7,8,9,10,11,13,14,15},{6,7,8,9,10,11,13,15},{6,7,8,9,10,11,14},{6,7,8,9,10,11,14,15},{6,7,8,9,10,11,15},{6,7,8,9,10,12},{6,7,8,9,10,12,13},{6,7,8,9,10,12,13,14},{6,7,8,9,10,12,13,14,15},{6,7,8,9,10,12,13,15},{6,7,8,9,10,12,14},{6,7,8,9,10,12,14,15},{6,7,8,9,10,12,15},{6,7,8,9,10,13},{6,7,8,9,10,13,14},{6,7,8,9,10,13,14,15},{6,7,8,9,10,13,15},{6,7,8,9,10,14},{6,7,8,9,10,14,15},{6,7,8,9,10,15},{6,7,8,9,11},{6,7,8,9,11,12},{6,7,8,9,11,12,13},{6,7,8,9,11,12,13,14},{6,7,8,9,11,12,13,14,15},{6,7,8,9,11,12,13,15},{6,7,8,9,11,12,14},{6,7,8,9,11,12,14,15},{6,7,8,9,11,12,15},{6,7,8,9,11,13},{6,7,8,9,11,13,14},{6,7,8,9,11,13,14,15},{6,7,8,9,11,13,15},{6,7,8,9,11,14},{6,7,8,9,11,14,15},{6,7,8,9,11,15},{6,7,8,9,12},{6,7,8,9,12,13},{6,7,8,9,12,13,14},{6,7,8,9,12,13,14,15},{6,7,8,9,12,13,15},{6,7,8,9,12,14},{6,7,8,9,12,14,15},{6,7,8,9,12,15},{6,7,8,9,13},{6,7,8,9,13,14},{6,7,8,9,13,14,15},{6,7,8,9,13,15},{6,7,8,9,14},{6,7,8,9,14,15},{6,7,8,9,15},{6,7,8,10},{6,7,8,10,11},{6,7,8,10,11,12},{6,7,8,10,11,12,13},{6,7,8,10,11,12,13,14},{6,7,8,10,11,12,13,14,15},{6,7,8,10,11,12,13,15},{6,7,8,10,11,12,14},{6,7,8,10,11,12,14,15},{6,7,8,10,11,12,15},{6,7,8,10,11,13},{6,7,8,10,11,13,14},{6,7,8,10,11,13,14,15},{6,7,8,10,11,13,15},{6,7,8,10,11,14},{6,7,8,10,11,14,15},{6,7,8,10,11,15},{6,7,8,10,12},{6,7,8,10,12,13},{6,7,8,10,12,13,14},{6,7,8,10,12,13,14,15},{6,7,8,10,12,13,15},{6,7,8,10,12,14},{6,7,8,10,12,14,15},{6,7,8,10,12,15},{6,7,8,10,13},{6,7,8,10,13,14},{6,7,8,10,13,14,15},{6,7,8,10,13,15},{6,7,8,10,14},{6,7,8,10,14,15},{6,7,8,10,15},{6,7,8,11},{6,7,8,11,12},{6,7,8,11,12,13},{6,7,8,11,12,13,14},{6,7,8,11,12,13,14,15},{6,7,8,11,12,13,15},{6,7,8,11,12,14},{6,7,8,11,12,14,15},{6,7,8,11,12,15},{6,7,8,11,13},{6,7,8,11,13,14},{6,7,8,11,13,14,15},{6,7,8,11,13,15},{6,7,8,11,14},{6,7,8,11,14,15},{6,7,8,11,15},{6,7,8,12},{6,7,8,12,13},{6,7,8,12,13,14},{6,7,8,12,13,14,15},{6,7,8,12,13,15},{6,7,8,12,14},{6,7,8,12,14,15},{6,7,8,12,15},{6,7,8,13},{6,7,8,13,14},{6,7,8,13,14,15},{6,7,8,13,15},{6,7,8,14},{6,7,8,14,15},{6,7,8,15},{6,7,9},{6,7,9,10},{6,7,9,10,11},{6,7,9,10,11,12},{6,7,9,10,11,12,13},{6,7,9,10,11,12,13,14},{6,7,9,10,11,12,13,14,15},{6,7,9,10,11,12,13,15},{6,7,9,10,11,12,14},{6,7,9,10,11,12,14,15},{6,7,9,10,11,12,15},{6,7,9,10,11,13},{6,7,9,10,11,13,14},{6,7,9,10,11,13,14,15},{6,7,9,10,11,13,15},{6,7,9,10,11,14},{6,7,9,10,11,14,15},{6,7,9,10,11,15},{6,7,9,10,12},{6,7,9,10,12,13},{6,7,9,10,12,13,14},{6,7,9,10,12,13,14,15},{6,7,9,10,12,13,15},{6,7,9,10,12,14},{6,7,9,10,12,14,15},{6,7,9,10,12,15},{6,7,9,10,13},{6,7,9,10,13,14},{6,7,9,10,13,14,15},{6,7,9,10,13,15},{6,7,9,10,14},{6,7,9,10,14,15},{6,7,9,10,15},{6,7,9,11},{6,7,9,11,12},{6,7,9,11,12,13},{6,7,9,11,12,13,14},{6,7,9,11,12,13,14,15},{6,7,9,11,12,13,15},{6,7,9,11,12,14},{6,7,9,11,12,14,15},{6,7,9,11,12,15},{6,7,9,11,13},{6,7,9,11,13,14},{6,7,9,11,13,14,15},{6,7,9,11,13,15},{6,7,9,11,14},{6,7,9,11,14,15},{6,7,9,11,15},{6,7,9,12},{6,7,9,12,13},{6,7,9,12,13,14},{6,7,9,12,13,14,15},{6,7,9,12,13,15},{6,7,9,12,14},{6,7,9,12,14,15},{6,7,9,12,15},{6,7,9,13},{6,7,9,13,14},{6,7,9,13,14,15},{6,7,9,13,15},{6,7,9,14},{6,7,9,14,15},{6,7,9,15},{6,7,10},{6,7,10,11},{6,7,10,11,12},{6,7,10,11,12,13},{6,7,10,11,12,13,14},{6,7,10,11,12,13,14,15},{6,7,10,11,12,13,15},{6,7,10,11,12,14},{6,7,10,11,12,14,15},{6,7,10,11,12,15},{6,7,10,11,13},{6,7,10,11,13,14},{6,7,10,11,13,14,15},{6,7,10,11,13,15},{6,7,10,11,14},{6,7,10,11,14,15},{6,7,10,11,15},{6,7,10,12},{6,7,10,12,13},{6,7,10,12,13,14},{6,7,10,12,13,14,15},{6,7,10,12,13,15},{6,7,10,12,14},{6,7,10,12,14,15},{6,7,10,12,15},{6,7,10,13},{6,7,10,13,14},{6,7,10,13,14,15},{6,7,10,13,15},{6,7,10,14},{6,7,10,14,15},{6,7,10,15},{6,7,11},{6,7,11,12},{6,7,11,12,13},{6,7,11,12,13,14},{6,7,11,12,13,14,15},{6,7,11,12,13,15},{6,7,11,12,14},{6,7,11,12,14,15},{6,7,11,12,15},{6,7,11,13},{6,7,11,13,14},{6,7,11,13,14,15},{6,7,11,13,15},{6,7,11,14},{6,7,11,14,15},{6,7,11,15},{6,7,12},{6,7,12,13},{6,7,12,13,14},{6,7,12,13,14,15},{6,7,12,13,15},{6,7,12,14},{6,7,12,14,15},{6,7,12,15},{6,7,13},{6,7,13,14},{6,7,13,14,15},{6,7,13,15},{6,7,14},{6,7,14,15},{6,7,15},{6,8},{6,8,9},{6,8,9,10},{6,8,9,10,11},{6,8,9,10,11,12},{6,8,9,10,11,12,13},{6,8,9,10,11,12,13,14},{6,8,9,10,11,12,13,14,15},{6,8,9,10,11,12,13,15},{6,8,9,10,11,12,14},{6,8,9,10,11,12,14,15},{6,8,9,10,11,12,15},{6,8,9,10,11,13},{6,8,9,10,11,13,14},{6,8,9,10,11,13,14,15},{6,8,9,10,11,13,15},{6,8,9,10,11,14},{6,8,9,10,11,14,15},{6,8,9,10,11,15},{6,8,9,10,12},{6,8,9,10,12,13},{6,8,9,10,12,13,14},{6,8,9,10,12,13,14,15},{6,8,9,10,12,13,15},{6,8,9,10,12,14},{6,8,9,10,12,14,15},{6,8,9,10,12,15},{6,8,9,10,13},{6,8,9,10,13,14},{6,8,9,10,13,14,15},{6,8,9,10,13,15},{6,8,9,10,14},{6,8,9,10,14,15},{6,8,9,10,15},{6,8,9,11},{6,8,9,11,12},{6,8,9,11,12,13},{6,8,9,11,12,13,14},{6,8,9,11,12,13,14,15},{6,8,9,11,12,13,15},{6,8,9,11,12,14},{6,8,9,11,12,14,15},{6,8,9,11,12,15},{6,8,9,11,13},{6,8,9,11,13,14},{6,8,9,11,13,14,15},{6,8,9,11,13,15},{6,8,9,11,14},{6,8,9,11,14,15},{6,8,9,11,15},{6,8,9,12},{6,8,9,12,13},{6,8,9,12,13,14},{6,8,9,12,13,14,15},{6,8,9,12,13,15},{6,8,9,12,14},{6,8,9,12,14,15},{6,8,9,12,15},{6,8,9,13},{6,8,9,13,14},{6,8,9,13,14,15},{6,8,9,13,15},{6,8,9,14},{6,8,9,14,15},{6,8,9,15},{6,8,10},{6,8,10,11},{6,8,10,11,12},{6,8,10,11,12,13},{6,8,10,11,12,13,14},{6,8,10,11,12,13,14,15},{6,8,10,11,12,13,15},{6,8,10,11,12,14},{6,8,10,11,12,14,15},{6,8,10,11,12,15},{6,8,10,11,13},{6,8,10,11,13,14},{6,8,10,11,13,14,15},{6,8,10,11,13,15},{6,8,10,11,14},{6,8,10,11,14,15},{6,8,10,11,15},{6,8,10,12},{6,8,10,12,13},{6,8,10,12,13,14},{6,8,10,12,13,14,15},{6,8,10,12,13,15},{6,8,10,12,14},{6,8,10,12,14,15},{6,8,10,12,15},{6,8,10,13},{6,8,10,13,14},{6,8,10,13,14,15},{6,8,10,13,15},{6,8,10,14},{6,8,10,14,15},{6,8,10,15},{6,8,11},{6,8,11,12},{6,8,11,12,13},{6,8,11,12,13,14},{6,8,11,12,13,14,15},{6,8,11,12,13,15},{6,8,11,12,14},{6,8,11,12,14,15},{6,8,11,12,15},{6,8,11,13},{6,8,11,13,14},{6,8,11,13,14,15},{6,8,11,13,15},{6,8,11,14},{6,8,11,14,15},{6,8,11,15},{6,8,12},{6,8,12,13},{6,8,12,13,14},{6,8,12,13,14,15},{6,8,12,13,15},{6,8,12,14},{6,8,12,14,15},{6,8,12,15},{6,8,13},{6,8,13,14},{6,8,13,14,15},{6,8,13,15},{6,8,14},{6,8,14,15},{6,8,15},{6,9},{6,9,10},{6,9,10,11},{6,9,10,11,12},{6,9,10,11,12,13},{6,9,10,11,12,13,14},{6,9,10,11,12,13,14,15},{6,9,10,11,12,13,15},{6,9,10,11,12,14},{6,9,10,11,12,14,15},{6,9,10,11,12,15},{6,9,10,11,13},{6,9,10,11,13,14},{6,9,10,11,13,14,15},{6,9,10,11,13,15},{6,9,10,11,14},{6,9,10,11,14,15},{6,9,10,11,15},{6,9,10,12},{6,9,10,12,13},{6,9,10,12,13,14},{6,9,10,12,13,14,15},{6,9,10,12,13,15},{6,9,10,12,14},{6,9,10,12,14,15},{6,9,10,12,15},{6,9,10,13},{6,9,10,13,14},{6,9,10,13,14,15},{6,9,10,13,15},{6,9,10,14},{6,9,10,14,15},{6,9,10,15},{6,9,11},{6,9,11,12},{6,9,11,12,13},{6,9,11,12,13,14},{6,9,11,12,13,14,15},{6,9,11,12,13,15},{6,9,11,12,14},{6,9,11,12,14,15},{6,9,11,12,15},{6,9,11,13},{6,9,11,13,14},{6,9,11,13,14,15},{6,9,11,13,15},{6,9,11,14},{6,9,11,14,15},{6,9,11,15},{6,9,12},{6,9,12,13},{6,9,12,13,14},{6,9,12,13,14,15},{6,9,12,13,15},{6,9,12,14},{6,9,12,14,15},{6,9,12,15},{6,9,13},{6,9,13,14},{6,9,13,14,15},{6,9,13,15},{6,9,14},{6,9,14,15},{6,9,15},{6,10},{6,10,11},{6,10,11,12},{6,10,11,12,13},{6,10,11,12,13,14},{6,10,11,12,13,14,15},{6,10,11,12,13,15},{6,10,11,12,14},{6,10,11,12,14,15},{6,10,11,12,15},{6,10,11,13},{6,10,11,13,14},{6,10,11,13,14,15},{6,10,11,13,15},{6,10,11,14},{6,10,11,14,15},{6,10,11,15},{6,10,12},{6,10,12,13},{6,10,12,13,14},{6,10,12,13,14,15},{6,10,12,13,15},{6,10,12,14},{6,10,12,14,15},{6,10,12,15},{6,10,13},{6,10,13,14},{6,10,13,14,15},{6,10,13,15},{6,10,14},{6,10,14,15},{6,10,15},{6,11},{6,11,12},{6,11,12,13},{6,11,12,13,14},{6,11,12,13,14,15},{6,11,12,13,15},{6,11,12,14},{6,11,12,14,15},{6,11,12,15},{6,11,13},{6,11,13,14},{6,11,13,14,15},{6,11,13,15},{6,11,14},{6,11,14,15},{6,11,15},{6,12},{6,12,13},{6,12,13,14},{6,12,13,14,15},{6,12,13,15},{6,12,14},{6,12,14,15},{6,12,15},{6,13},{6,13,14},{6,13,14,15},{6,13,15},{6,14},{6,14,15},{6,15},{7,8},{7,8,9},{7,8,9,10},{7,8,9,10,11},{7,8,9,10,11,12},{7,8,9,10,11,12,13},{7,8,9,10,11,12,13,14},{7,8,9,10,11,12,13,14,15},{7,8,9,10,11,12,13,15},{7,8,9,10,11,12,14},{7,8,9,10,11,12,14,15},{7,8,9,10,11,12,15},{7,8,9,10,11,13},{7,8,9,10,11,13,14},{7,8,9,10,11,13,14,15},{7,8,9,10,11,13,15},{7,8,9,10,11,14},{7,8,9,10,11,14,15},{7,8,9,10,11,15},{7,8,9,10,12},{7,8,9,10,12,13},{7,8,9,10,12,13,14},{7,8,9,10,12,13,14,15},{7,8,9,10,12,13,15},{7,8,9,10,12,14},{7,8,9,10,12,14,15},{7,8,9,10,12,15},{7,8,9,10,13},{7,8,9,10,13,14},{7,8,9,10,13,14,15},{7,8,9,10,13,15},{7,8,9,10,14},{7,8,9,10,14,15},{7,8,9,10,15},{7,8,9,11},{7,8,9,11,12},{7,8,9,11,12,13},{7,8,9,11,12,13,14},{7,8,9,11,12,13,14,15},{7,8,9,11,12,13,15},{7,8,9,11,12,14},{7,8,9,11,12,14,15},{7,8,9,11,12,15},{7,8,9,11,13},{7,8,9,11,13,14},{7,8,9,11,13,14,15},{7,8,9,11,13,15},{7,8,9,11,14},{7,8,9,11,14,15},{7,8,9,11,15},{7,8,9,12},{7,8,9,12,13},{7,8,9,12,13,14},{7,8,9,12,13,14,15},{7,8,9,12,13,15},{7,8,9,12,14},{7,8,9,12,14,15},{7,8,9,12,15},{7,8,9,13},{7,8,9,13,14},{7,8,9,13,14,15},{7,8,9,13,15},{7,8,9,14},{7,8,9,14,15},{7,8,9,15},{7,8,10},{7,8,10,11},{7,8,10,11,12},{7,8,10,11,12,13},{7,8,10,11,12,13,14},{7,8,10,11,12,13,14,15},{7,8,10,11,12,13,15},{7,8,10,11,12,14},{7,8,10,11,12,14,15},{7,8,10,11,12,15},{7,8,10,11,13},{7,8,10,11,13,14},{7,8,10,11,13,14,15},{7,8,10,11,13,15},{7,8,10,11,14},{7,8,10,11,14,15},{7,8,10,11,15},{7,8,10,12},{7,8,10,12,13},{7,8,10,12,13,14},{7,8,10,12,13,14,15},{7,8,10,12,13,15},{7,8,10,12,14},{7,8,10,12,14,15},{7,8,10,12,15},{7,8,10,13},{7,8,10,13,14},{7,8,10,13,14,15},{7,8,10,13,15},{7,8,10,14},{7,8,10,14,15},{7,8,10,15},{7,8,11},{7,8,11,12},{7,8,11,12,13},{7,8,11,12,13,14},{7,8,11,12,13,14,15},{7,8,11,12,13,15},{7,8,11,12,14},{7,8,11,12,14,15},{7,8,11,12,15},{7,8,11,13},{7,8,11,13,14},{7,8,11,13,14,15},{7,8,11,13,15},{7,8,11,14},{7,8,11,14,15},{7,8,11,15},{7,8,12},{7,8,12,13},{7,8,12,13,14},{7,8,12,13,14,15},{7,8,12,13,15},{7,8,12,14},{7,8,12,14,15},{7,8,12,15},{7,8,13},{7,8,13,14},{7,8,13,14,15},{7,8,13,15},{7,8,14},{7,8,14,15},{7,8,15},{7,9},{7,9,10},{7,9,10,11},{7,9,10,11,12},{7,9,10,11,12,13},{7,9,10,11,12,13,14},{7,9,10,11,12,13,14,15},{7,9,10,11,12,13,15},{7,9,10,11,12,14},{7,9,10,11,12,14,15},{7,9,10,11,12,15},{7,9,10,11,13},{7,9,10,11,13,14},{7,9,10,11,13,14,15},{7,9,10,11,13,15},{7,9,10,11,14},{7,9,10,11,14,15},{7,9,10,11,15},{7,9,10,12},{7,9,10,12,13},{7,9,10,12,13,14},{7,9,10,12,13,14,15},{7,9,10,12,13,15},{7,9,10,12,14},{7,9,10,12,14,15},{7,9,10,12,15},{7,9,10,13},{7,9,10,13,14},{7,9,10,13,14,15},{7,9,10,13,15},{7,9,10,14},{7,9,10,14,15},{7,9,10,15},{7,9,11},{7,9,11,12},{7,9,11,12,13},{7,9,11,12,13,14},{7,9,11,12,13,14,15},{7,9,11,12,13,15},{7,9,11,12,14},{7,9,11,12,14,15},{7,9,11,12,15},{7,9,11,13},{7,9,11,13,14},{7,9,11,13,14,15},{7,9,11,13,15},{7,9,11,14},{7,9,11,14,15},{7,9,11,15},{7,9,12},{7,9,12,13},{7,9,12,13,14},{7,9,12,13,14,15},{7,9,12,13,15},{7,9,12,14},{7,9,12,14,15},{7,9,12,15},{7,9,13},{7,9,13,14},{7,9,13,14,15},{7,9,13,15},{7,9,14},{7,9,14,15},{7,9,15},{7,10},{7,10,11},{7,10,11,12},{7,10,11,12,13},{7,10,11,12,13,14},{7,10,11,12,13,14,15},{7,10,11,12,13,15},{7,10,11,12,14},{7,10,11,12,14,15},{7,10,11,12,15},{7,10,11,13},{7,10,11,13,14},{7,10,11,13,14,15},{7,10,11,13,15},{7,10,11,14},{7,10,11,14,15},{7,10,11,15},{7,10,12},{7,10,12,13},{7,10,12,13,14},{7,10,12,13,14,15},{7,10,12,13,15},{7,10,12,14},{7,10,12,14,15},{7,10,12,15},{7,10,13},{7,10,13,14},{7,10,13,14,15},{7,10,13,15},{7,10,14},{7,10,14,15},{7,10,15},{7,11},{7,11,12},{7,11,12,13},{7,11,12,13,14},{7,11,12,13,14,15},{7,11,12,13,15},{7,11,12,14},{7,11,12,14,15},{7,11,12,15},{7,11,13},{7,11,13,14},{7,11,13,14,15},{7,11,13,15},{7,11,14},{7,11,14,15},{7,11,15},{7,12},{7,12,13},{7,12,13,14},{7,12,13,14,15},{7,12,13,15},{7,12,14},{7,12,14,15},{7,12,15},{7,13},{7,13,14},{7,13,14,15},{7,13,15},{7,14},{7,14,15},{7,15},{8,9},{8,9,10},{8,9,10,11},{8,9,10,11,12},{8,9,10,11,12,13},{8,9,10,11,12,13,14},{8,9,10,11,12,13,14,15},{8,9,10,11,12,13,15},{8,9,10,11,12,14},{8,9,10,11,12,14,15},{8,9,10,11,12,15},{8,9,10,11,13},{8,9,10,11,13,14},{8,9,10,11,13,14,15},{8,9,10,11,13,15},{8,9,10,11,14},{8,9,10,11,14,15},{8,9,10,11,15},{8,9,10,12},{8,9,10,12,13},{8,9,10,12,13,14},{8,9,10,12,13,14,15},{8,9,10,12,13,15},{8,9,10,12,14},{8,9,10,12,14,15},{8,9,10,12,15},{8,9,10,13},{8,9,10,13,14},{8,9,10,13,14,15},{8,9,10,13,15},{8,9,10,14},{8,9,10,14,15},{8,9,10,15},{8,9,11},{8,9,11,12},{8,9,11,12,13},{8,9,11,12,13,14},{8,9,11,12,13,14,15},{8,9,11,12,13,15},{8,9,11,12,14},{8,9,11,12,14,15},{8,9,11,12,15},{8,9,11,13},{8,9,11,13,14},{8,9,11,13,14,15},{8,9,11,13,15},{8,9,11,14},{8,9,11,14,15},{8,9,11,15},{8,9,12},{8,9,12,13},{8,9,12,13,14},{8,9,12,13,14,15},{8,9,12,13,15},{8,9,12,14},{8,9,12,14,15},{8,9,12,15},{8,9,13},{8,9,13,14},{8,9,13,14,15},{8,9,13,15},{8,9,14},{8,9,14,15},{8,9,15},{8,10},{8,10,11},{8,10,11,12},{8,10,11,12,13},{8,10,11,12,13,14},{8,10,11,12,13,14,15},{8,10,11,12,13,15},{8,10,11,12,14},{8,10,11,12,14,15},{8,10,11,12,15},{8,10,11,13},{8,10,11,13,14},{8,10,11,13,14,15},{8,10,11,13,15},{8,10,11,14},{8,10,11,14,15},{8,10,11,15},{8,10,12},{8,10,12,13},{8,10,12,13,14},{8,10,12,13,14,15},{8,10,12,13,15},{8,10,12,14},{8,10,12,14,15},{8,10,12,15},{8,10,13},{8,10,13,14},{8,10,13,14,15},{8,10,13,15},{8,10,14},{8,10,14,15},{8,10,15},{8,11},{8,11,12},{8,11,12,13},{8,11,12,13,14},{8,11,12,13,14,15},{8,11,12,13,15},{8,11,12,14},{8,11,12,14,15},{8,11,12,15},{8,11,13},{8,11,13,14},{8,11,13,14,15},{8,11,13,15},{8,11,14},{8,11,14,15},{8,11,15},{8,12},{8,12,13},{8,12,13,14},{8,12,13,14,15},{8,12,13,15},{8,12,14},{8,12,14,15},{8,12,15},{8,13},{8,13,14},{8,13,14,15},{8,13,15},{8,14},{8,14,15},{8,15},{9,10},{9,10,11},{9,10,11,12},{9,10,11,12,13},{9,10,11,12,13,14},{9,10,11,12,13,14,15},{9,10,11,12,13,15},{9,10,11,12,14},{9,10,11,12,14,15},{9,10,11,12,15},{9,10,11,13},{9,10,11,13,14},{9,10,11,13,14,15},{9,10,11,13,15},{9,10,11,14},{9,10,11,14,15},{9,10,11,15},{9,10,12},{9,10,12,13},{9,10,12,13,14},{9,10,12,13,14,15},{9,10,12,13,15},{9,10,12,14},{9,10,12,14,15},{9,10,12,15},{9,10,13},{9,10,13,14},{9,10,13,14,15},{9,10,13,15},{9,10,14},{9,10,14,15},{9,10,15},{9,11},{9,11,12},{9,11,12,13},{9,11,12,13,14},{9,11,12,13,14,15},{9,11,12,13,15},{9,11,12,14},{9,11,12,14,15},{9,11,12,15},{9,11,13},{9,11,13,14},{9,11,13,14,15},{9,11,13,15},{9,11,14},{9,11,14,15},{9,11,15},{9,12},{9,12,13},{9,12,13,14},{9,12,13,14,15},{9,12,13,15},{9,12,14},{9,12,14,15},{9,12,15},{9,13},{9,13,14},{9,13,14,15},{9,13,15},{9,14},{9,14,15},{9,15},{10,11},{10,11,12},{10,11,12,13},{10,11,12,13,14},{10,11,12,13,14,15},{10,11,12,13,15},{10,11,12,14},{10,11,12,14,15},{10,11,12,15},{10,11,13},{10,11,13,14},{10,11,13,14,15},{10,11,13,15},{10,11,14},{10,11,14,15},{10,11,15},{10,12},{10,12,13},{10,12,13,14},{10,12,13,14,15},{10,12,13,15},{10,12,14},{10,12,14,15},{10,12,15},{10,13},{10,13,14},{10,13,14,15},{10,13,15},{10,14},{10,14,15},{10,15},{11,12},{11,12,13},{11,12,13,14},{11,12,13,14,15},{11,12,13,15},{11,12,14},{11,12,14,15},{11,12,15},{11,13},{11,13,14},{11,13,14,15},{11,13,15},{11,14},{11,14,15},{11,15},{12,13},{12,13,14},{12,13,14,15},{12,13,15},{12,14},{12,14,15},{12,15},{13,14},{13,14,15},{13,15},{14,15}}, + }, + + { + []int{4, 6, 4, 6}, + [][]int{{4, 6}, {4, 6, 6}, {4, 4}, {4, 4, 6}, {6, 6}}, + }, + + { + []int{4, 3, 2, 1}, + [][]int{}, + }, + + { + []int{4, 6, 7, 7}, + [][]int{{4, 6}, {4, 7}, {6, 7}, {4, 6, 7}, {7, 7}, {4, 7, 7}, {6, 7, 7}, {4, 6, 7, 7}}, + }, + + // 可以有多个 testcase +} + +func Test_findSubsequences(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + // fmt.Printf("~~%v~~\n", tc) + ans := findSubsequences(tc.nums) + sort.Sort(intss(ans)) + sort.Sort(intss(tc.ans)) + ast.Equal(tc.ans, ans) + } +} + +func Benchmark_findSubsequences(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findSubsequences(tc.nums) + } + } +} + +// intss 实现了 sort.Interface 接口 +type intss [][]int + +func (iss intss) Len() int { return len(iss) } + +func (iss intss) Less(i, j int) bool { + if len(iss[i]) == len(iss[j]) { + for k := 0; k < len(iss[i]); k++ { + if iss[i][k] != iss[j][k] { + return iss[i][k] < iss[j][k] + } + } + } + return len(iss[i]) < len(iss[j]) +} + +func (iss intss) Swap(i, j int) { iss[i], iss[j] = iss[j], iss[i] } + diff --git a/Algorithms/0492.construct-the-rectangle/README.md b/Algorithms/0492.construct-the-rectangle/README.md new file mode 100755 index 000000000..fc9dd9a1b --- /dev/null +++ b/Algorithms/0492.construct-the-rectangle/README.md @@ -0,0 +1,29 @@ +# [492. Construct the Rectangle](https://leetcode.com/problems/construct-the-rectangle/) + +## 题目 + +For a web developer, it is very important to know how to design a web page's size. So, given a specific rectangular web page’s area, your job by now is to design a rectangular web page, whose length L and width W satisfy the following requirements: + +1. The area of the rectangular web page you designed must equal to the given target area. +1. The width W should not be larger than the length L, which means L >= W. +1. The difference between length L and width W should be as small as possible. + +You need to output the length L and the width W of the web page you designed in sequence. + +Example: + +```text +Input: 4 +Output: [2, 2] +Explanation: The target area is 4, and all the possible ways to construct it are [1,4], [2,2], [4,1]. +But according to requirement 2, [1,4] is illegal; according to requirement 3, [4,1] is not optimal compared to [2,2]. So the length L is 2, and the width W is 2. +``` + +Note: + +1. The given area won't exceed 10,000,000 and is a positive integer +1. The web page's width and length you designed must be positive integers. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0492.construct-the-rectangle/construct-the-rectangle.go b/Algorithms/0492.construct-the-rectangle/construct-the-rectangle.go new file mode 100755 index 000000000..454d703e4 --- /dev/null +++ b/Algorithms/0492.construct-the-rectangle/construct-the-rectangle.go @@ -0,0 +1,15 @@ +package Problem0492 + +import ( + "math" +) + +func constructRectangle(area int) []int { + for i := int(math.Sqrt(float64(area))); i > 1; i-- { + if area%i == 0 { + return []int{area / i, i} + } + } + + return []int{area, 1} +} diff --git a/Algorithms/0492.construct-the-rectangle/construct-the-rectangle_test.go b/Algorithms/0492.construct-the-rectangle/construct-the-rectangle_test.go new file mode 100755 index 000000000..3a3a37fb3 --- /dev/null +++ b/Algorithms/0492.construct-the-rectangle/construct-the-rectangle_test.go @@ -0,0 +1,49 @@ +package Problem0492 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + area int + ans []int +}{ + + { + 10000000, + []int{3200, 3125}, + }, + + { + 2, + []int{2, 1}, + }, + + { + 4, + []int{2, 2}, + }, + + // 可以有多个 testcase +} + +func Test_constructRectangle(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, constructRectangle(tc.area), "输入:%v", tc) + } +} + +func Benchmark_constructRectangle(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + constructRectangle(tc.area) + } + } +} diff --git a/Algorithms/0493.reverse-pairs/493.100.png b/Algorithms/0493.reverse-pairs/493.100.png new file mode 100644 index 000000000..a31739b52 Binary files /dev/null and b/Algorithms/0493.reverse-pairs/493.100.png differ diff --git a/Algorithms/0493.reverse-pairs/README.md b/Algorithms/0493.reverse-pairs/README.md new file mode 100755 index 000000000..d880523d0 --- /dev/null +++ b/Algorithms/0493.reverse-pairs/README.md @@ -0,0 +1,32 @@ +# [493. Reverse Pairs](https://leetcode.com/problems/reverse-pairs/) + +## 题目 + +Given an array nums, we call (i, j) an important reverse pair if i < j and nums[i] > 2*nums[j]. + +You need to return the number of important reverse pairs in the given array. + +Example1: + +```text +Input: [1,3,2,3,1] +Output: 2 +``` + +Example2: + +```text +Input: [2,4,3,5,1] +Output: 3 +``` + +Note: + +1. The length of the given array will not exceed 50,000. +1. All the numbers in the input array are in the range of 32-bit integer. + +## 解题思路 + +见程序注释 + +![100](493.100.png) \ No newline at end of file diff --git a/Algorithms/0493.reverse-pairs/reverse-pairs.go b/Algorithms/0493.reverse-pairs/reverse-pairs.go new file mode 100755 index 000000000..bcf274362 --- /dev/null +++ b/Algorithms/0493.reverse-pairs/reverse-pairs.go @@ -0,0 +1,63 @@ +package Problem0493 + +func reversePairs(nums []int) int { + return count(nums, 0, len(nums)) +} + +func count(nums []int, beg, end int) int { + if beg+1 >= end { + // 当 nums[beg:end] 中只有 1 或 0 个 元素时 + // 直接返回 0 + return 0 + } + + // 把 nums[beg:end] 按照 mid 切分成两段 + // 分别统计两段中符合题意的元素对 + mid := beg + (end-beg)/2 + res := count(nums, beg, mid) + count(nums, mid, end) + + i, j := beg, mid + for i < mid && j < end { + if nums[i] > 2*nums[j] { + // nums[i] 是 nums[i:mid] 中最小的数 + // nums[i] > 2*nums[j] 的话, + // nums[i:mid] 中的任意一个数和 nums[j] 都是满足题意的 pair + // 所以,一次就找到了 mid - i 对 pair + res += mid - i + j++ + } else { + i++ + } + } + + copy(nums[beg:end], merge(nums[beg:mid], nums[mid:end])) + + return res +} + +// a, b 都是升序的切片 +// merge 把 a,b 合并起来,并保持升序 +func merge(a, b []int) []int { + lenA, lenB := len(a), len(b) + res := make([]int, lenA+lenB) + + var i, j, k int + for i < lenA && j < lenB { + if a[i] < b[j] { + res[k] = a[i] + i++ + } else { + res[k] = b[j] + j++ + } + k++ + } + + if i == lenA { + copy(res[k:], b[j:]) + } else { + copy(res[k:], a[i:]) + } + + return res +} diff --git a/Algorithms/0493.reverse-pairs/reverse-pairs_test.go b/Algorithms/0493.reverse-pairs/reverse-pairs_test.go new file mode 100755 index 000000000..9f4c34c8e --- /dev/null +++ b/Algorithms/0493.reverse-pairs/reverse-pairs_test.go @@ -0,0 +1,54 @@ +package Problem0493 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans int +}{ + + { + []int{2566,5469,1898,127,2441,4612,2554,5269,2785,5093,3931,2532,1195,1101,1334,2124,1156,3400,747,5046,3325,4039,1858,3655,4904,2255,1822,972,5175,2880,2776,4900,2172,3808,3441,4153,3969,3116,1913,5129,4839,4586,752,1804,1970,4052,5016,3781,5000,4331,2762,4886,826,1888,1175,2729,1610,1634,2773,543,2617,4990,3225,2962,4963,3575,3742,3424,3246,5067,133,2713,2667,4043,663,3442,1714,386,3864,1978,1363,27,630,4652,1537,1770,893,2676,2608,3842,4852,5248,832,1689,1033,3849,1471,3373,2764,2453,5272,1313,1005,5083,2191,4525,2706,915,5230,3833,5011,4531,2864,1581,3300,1367,4668,5104,1005,2842,2654,2108,5046,1398,5278,3665,2488,4944,3173,2897,4970,2618,749,248,2707,4509,4603,2647,2957,2157,2997,829,2689,3513,3033,5177,3201,5463,369,2779,906,4386,3631,4773,3718,2782,2240,3210,5158,2737,4020,3453,3208,1344,4100,1183,704,3205,2798,3386,1970,4734,3055,2182,990,5189,2419,1860,3998,972,1687,441,2217,2254,4634,2791,2487,98,5358,4433,4023,4328,3953,2461,974,731,869,5382,3699,1748,3629,723,962,600,2736,1413,3146,2955,2386,4834,4467,2814,2822,5137,3101,111,1059,2144,2664,287,4904,1612,4336,1301,3691,1391,717,127,1128,2624,449,2349,2759,1592,369,2359,5064,4392,1137,1682,987,4092,1283,4272,846,4355,1495,1828,2190,1813,4226,3995,2809,1111,3692,5481,1538,509,3008,4781,5259,501,2086,4545,5250,2524,4374,3539,3973,4357,2018,3894,3958,102,3179,5146,823,4168,528,893,1756,113,3042,3235,2954,482,2707,3309,1038,3280,4185,559,4648,4346,192,3214,1263,3062,85,523,141,2822,5218,3192,5426,793,623,2340,3312,2513,5439,4042,5203,4931,2179,626,4858,115,1932,3298,3070,3043,888,918,5227,1828,843,4764,2843,645,4774,1946,3343,3061,5241,4715,4966,1423,3503,5365,3183,1824,624,2389,2860,5025,5102,3,3950,5321,4704,275,1581,3687,3342,4982,2391,2758,3092,4966,444,642,2481,4993,2493,1715,4007,2121,3267,3607,1372,1081,3215,1691,1625,406,2118,4982,3175,1821,5135,3722,3656,4059,189,5024,4553,527,4028,2012,1560,2609,2652,3384,1935,1590,5390,3622,3973,1892,2971,492,3960,3581,981,4313,4958,4455,5517,1320,488,3982,2004,3458,2513,3434,1077,3196,2103,2920,2027,4303,2020,2595,3067,5479,5381,530,3920,354,232,1679,3416,3344,355,3836,844,4041,4597,2924,4956,3060,681,1483,2820,5263,366,1135,4424,3273,2087,4718,2649,4412,2720,2330,5435,1747,3968,765,881,1112,2376,5469,3402,3491,4200,1135,512,3592,3811,5446,3343,2604,1855,2826,4035,1887,4406,4933,937,4165,2984,5225,2975,4334,963,3233,3772,4446,1552,2329,1277,4094,5334,2000,2018,948,3872,64,4593,3832,3677,1789,1288,4783,5063,1610,898,3875,1457,4816,2617,2550,1144,4939,180,929,5200,3627,3382,2675,151,5394,5344,4684,4329,577,3694,2435,978,4904,3740,4165,2908,1358,5058,3176,1306,3786,2239,10,324,3317,4250,129,3402,2458,3282,3123,2956,2870,3835,2228,2417,1278,3039,2713,4504,484,1717,1462,3586,4586,2376,4402,2060,4131,2567,4876,1852,4513,2055,809,1927,3280,1805,127,1612,1663,419,651,671,3310,2649,4032,1297,2654,4814,661,1709,1625,4860,3208,4753,1263,4660,5104,4686,2520,392,2548,447,878,652,638,3727,2050,5091,1609,1467,1101,3699,2328,3672,2390,2510,3772,153,3962,2508,1012,4370,258,77,3115,5294,2659,2464,4636,3437,2683,4394,1943,3055,2544,3604,3624,5482,2178,3014,1537,690,5097,4336,1376,2733,3714,423,4959,3211,3449,486,2017,3823,3364,3894,394,2235,5008,2832,972,860,535,776,2724,1417,3746,5449,3025,1779,3561,4562,5230,5308,315,645,2163,3180,438,3181,316,5167,3119,1569,3057,4787,4545,2235,748,308,1544,1279,2538,2567,1775,3964,2497,3044,3260,4630,4309,4361,1038,5438,928,515,2724,1149,5015,5492,1803,3381,313,3874,1240,3378,625,1355,3619,172,234,3404,294,17,2353,747,1935,2747,4466,353,4491,4339,1110,2267,968,310,4077,4755,3833,3910,4234,5253,614,4917,2079,1684,175,4519,3039,1638,1298,1881,4848,1232,4199,28,1695,4249,1227,1880,5139,4869,1070,4633,3815,1966,1046,3156,3279,4811,2348,2346,2039,2028,2697,4052,1976,1378,4336,4655,689,5480,1673,2859,4334,5224,1884,3534,4250,2058,957,3493,3100,979,376,2776,514,4795,3349,2256,3998,2586,5437,589,1390,4131,2243,837,5507,1167,2084,457,2943,261,2616,1787,776,986,5161,1794,3249,505,1208,1402,1797,222,1605,4625,5433,3965,1637,4910,2120,3334,4539,1835,377,22,232,3037,1884,410,3774,4753,4450,3712,3317,1787,3440,4832,4886,2413,425,1835,2655,4756,70,544,3623,2859,5031,3617,3945,317,2808,3637,1449,1051,419,1848,4259,2300,3179,1066,4689,2055,472,1750,743,296,5381,1288,85,3609,1036,156,3082,2645,3103,3499,4260,3789,636,329,4476,5390,992,244,1329,2150,118,2863,4647,4483,2961,3316,1440,3402,922,2274,416,874,5154,3097,2766,3665,2401,3415,500,4999,435,836,5473,1525,5258,3279,1190,1014,929,5349,4033,506,573,1611,5142,386,3446,4749,5165,2740,4599,2576,4868,4756,5233,2677,3735,3327,3077,1844,778,2368,4991,673,1030,2931,1967,4355,2822,4897,2405,2009,645,650,3202,4827,2649,2254,1939,1474,4498,4652,1439,1080,670,4055,801,3870,563,4710,750,2141,3667,2529,3193,1530,3847,2202,5009,3720,4397,1767,5286,2111,4038,2595,3041,4343,2364,4602,3066,4453,4653,2711,5430,4101,3788,4312,4176,2129,4965,3733,2788,2017,3957,4811,1356,2618,3418,5304,1360,4425,4573,567,759,3128,5343,2441,381,1983,4420,5159,3230,2740,4529,2912,31,3676,4813,3070,2152,5110,5107,1392,879,4509,1796,3138,2132,314,2309,3230,235,3172,3441,914,2097,2684,3186,2524,2851,5094,2195,1304,4458,4993,1012,1849,2546,5278,82,513,1800,232,783,4470,4722,1983,3312,4710,2269,4249,3816,3908,4916,5393,2181,4056,3322,4031,760,2245,512,1260,3666,645,3096,580,4491,1741,2372,4714,5379,5390,2945,5271,5224,1088,2532,725,985,702,3600,199,3600,5356,4484,77,5197,587,1108,4988,4401,5364,3892,2768,3497,2367,2464,4241,4943,1397,4692,2700,1712,4002,4083,4888,4968,435,4366,2642,1677,3976,737,98,4911,5073,2764,5312,4003,2824,482,1181,5313,2473,4748,4968,4624,1313,2510,3412,5357,3482,4361,2854,3285,3996,340,4730,3919,406,4989,1555,4183,3425,4218,2179,152,5126,2807,1319,2764,981,3486,244,1548,5200,1756,99,1746,1170,3808,4734,1746,1746,3687,5331,5170,5364,1118,561,429,2318,1391,4168,4967,5519,2553,3536,1307,2409,169,4045,686,2012,1586,1321,3467,1894,3287,5489,599,2428,2950,4113,862,2271,2648,1816,3051,2190,338,1249,2963,1804,3812,3513,4298,2288,4807,3383,5283,4524,5421,777,772,2387,1378,533,2630,3941,592,2069,3556,870,1304,795,268,842,20,5523,4782,263,2668,389,2496,3641,168,3261,662,1880,2784,5519,4084,3486,1113,3072,4877,400,3094,208,3990,1216,561,2644,1773,377,997,4691,3305,1291,3908,5181,1327,4767,409,4780,1255,144,323,4159,5070,4061,4612,2126,109,5081,3146,301,4994,1369,4318,689,2276,353,3543,1185,4906,14,3745,5135,3579,1105,1633,4292,1494,4075,2207,1269,4566,189,3038,4808,1077,3397,2168,857,1480,4975,4461,2501,90,5521,1928,4909,900,3703,1618,1327,3017,2606,2710,4810,495,4810,4306,2610,5239,4396,2479,962,5141,4481,4976,3747,3930,949,5092,4973,887,233,4277,4189,3648,4845,3085,2891,4278,4679,4079,1357,4256,3454,2019,4212,1121,4847,4071,3370,4349,2677,1490,1276,29,65,2329,3372,4134,4260,1829,3104,1122,4821,4033,3645,4042,3367,1730,5093,2117,4352,4352,1580,4766,4796,1935,4823,1020,4184,2203,3263,2782,4414,1423,1251,4269,1950,1275,3377,3684,3748,3029,1495,2467,4768,3396,1003,4537,3163,2836,1965,1581,5077,1093,1606,4437,4410,4966,4230,2738,3993,141,1182,3559,1925,2532,785,813,1836,661,59,2029,3547,4946,282,2774,4971,1926,2425,2270,3539,4243,5113,3685,5168,2912,4751,2475,2782,4741,3185,2336,4813,812,5222,2588,4480,2225,2334,5287,1790,1799,510,1161,2647,952,2490,4916,1856,3805,2627,4356,1642,4268,63,3833,5258,5353,3380,4267,5237,3740,3924,3735,3201,1269,2638,2207,2477,275,2219,848,3045,877,4305,5017,3535,5367,1033,4363,252,5502,4698,878,584,4087,5255,1862,3755,4579,1096,1793,2855,3976,4822,2664,3006,3304,4390,4606,4416,3980,5037,4901,2855,1578,3552,845,4246,2804,5096,2442,3871,1919,1577,2916,2468,379,2410,3588,3556,4934,716,2072,2186,4220,4972,4485,1823,2779,1551,133,3466,2967,1275,3040,2763,4424,4372,1369,996,3315,5000,2520,591,4822,1019,4253,937,2994,2157,2503,2139,3081,1147,700,958,3838,1927,111,4257,4258,2493,5397,5486,1933,663,2997,693,3569,5170,5075,4874,4164,4514,3016,2598,3057,5421,3759,3248,1715,4081,1331,4635,2603,1342,295,3627,2508,3439,3044,5197,5270,1057,2894,5044,3782,3267,1137,693,3183,2142,4932,3385,2822,2015,3510,4728,3773,4665,3331,1502,4120,1198,113,3706,4567,3940,802,2732,1082,488,3739,2482,1144,480,4894,1330,4954,3228,3591,5266,3999,41,348,4287,3185,278,1554,2168,5492,109,1263,1015,3837,3580,825,792,5287,2135,4236,2448,4272,5290,4650,5030,5088,5260,5385,2717,1501,1860,1056,4810,5311,5027,3776,4340,2184,192,2311,4756,2859,1780,972,2755,3725,458,246,2721,2461,3673,4907,2855,2211,1398,98,141,3610,3901,3548,4725,4911,4759,567,1680,1613,1274,497,4439,5420,3290,5523,4047,3758,1050,1657,5232,3378,672,1692,4415,4397,63,1707,333,1742,3922,2527,5355,3773,175,4089,214,4343,3056,3240,5310,2367,5403,681,2469,2857,581,4333,1988,4028,2279,4634,5031,4283,640,195,3494,375,3509,5414,4557,369,1533,3839,4898,2851,1495,1770,2115,4263,4994,3923,3303,299,1984,4643,2301,4417,3093,272,2795,3980,873,2241,2653,1569,1509,67,2682,20,1213,1363,805,5351,3300,4177,3939,5034,4746,530,1298,2438,1840,2394,2274,2010,2172,3840,3598,5435,3507,4724,526,704,5494,2100,580,1443,3910,1948,1094,85,843,2229,4646,5466,2197,1829,3,3552,4211,2250,3043,4443,4895,5299,1809,1944,3695,4238,288,5457,2225,4690,701,4917,1860,2417,1452,3021,2988,4022,2734,2297,300,1015,1961,2196,4718,2434,3814,175,4319,5504,3689,2015,4220,151,5027,1861,841,939,4719,245,1792,3775,1116,3188,2944,4172,3689,2857,268,2190,1009,1556,4672,5090,5131,996,2192,5482,1337,5521,988,643,373,2248,3424,5134,129,2749,3237,1617,21,4650,5343,5358,835,5510,428,3720,2626,4093,3082,13,158,1683,3170,2549,4592,2701,3203,3499,1246,1504,4165,2757,2073,3231,151,3614,5460,2957,5101,4615,3564,4817,2301,1806,2247,3033,820,1070,3986,5436,3471,1067,408,3331,4501,4815,4192,2162,5398,1363,1021,2883,2845,3711,3851,3680,2380,2487,4919,3524,531,1726,5269,3366,2654,2068,68,1519,2936,4965,2958,3655,2924,3352,16,781,3572,2439,2497,2714,2002,5347,4630,354,2338,5044,1409,1014,1538,834,5284,1210,1786,4022,957,1020,1700,391,3913,1599,3327,1885,3030,2706,2227,298,3242,2081,5389,209,3346,4441,3933,15,2949,1285,3360,727,5013,1527,250,38,4888,2499,3030,400,4573,2257,1784,4046,1632,3162,3165,4835,5496,3656,3538,2970,4503,5422,5256,1770,2322,5292,3902,5297,4812,5459,3674,3608,11,559,4982,3595,2900,1216,4554,1742,3356,3565,1798,5027,4448,5352,22,2998,5142,1320,1881,1754,3740,1615,4346,3299,530,1781,5006,1817,2467,1686,437,3139,283,3639,2858,2930,2133,5135,3154,4871,4982,2124,3796,1528,3145,921,3924,2301,3476,2685,378,1657,5288,3860,2847,3095,4699,4980,3496,1818,4487,5322,2774,1699,3041,5306,568,638,2477,1140,2165,313,692,4734,1640,2242,1360,3013,3007,1836,3592,176,2028,3865,3222,1589,3702,1377,2081,119,2719,2770,791,2545,3717,1872,3491,3843,4084,2698,879,1054,4287,1639,3168,5009,3020,279,474,1,2751,1561,3066,1418,2090,1042,2730,3698,22,3502,4945,1413,4672,803,4737,1107,4887,2170,310,861,341,4374,3519,5104,29,5195,1760,3341,2591,2381,3298,2739,4319,2951,5402,3634,4011,3173,4373,2534,1702,4687,3465,4079,3243,1634,2267,2960,4539,4596,4844,1127,94,5454,5027,3333,2020,2215,5286,1019,1255,4179,2246,3138,5131,609,2649,3294,3590,4536,533,2243,5138,3747,3328,2488,3091,1116,2462,784,4419,93,1875,4938,3170,2683,4222,437,4216,1606,2303,841,4443,1570,1475,1674,4432,856,4702,5283,4034,3993,3997,1884,476,4762,2094,1862,4286,5232,4170,3409,2278,2280,1195,5312,1496,4572,4669,1012,4778,1822,5247,4574,3156,3008,1177,4224,1751,1303,3978,3517,687,3765,4787,2027,2527,727,3660,3714,2818,5386,1696,2495,2341,67,5413,85,593,4591,5159,4609,3695,5040,4164,1938,1293,2774,2376,4382,2765,1739,2981,2678,3312,4783,3527,4107,4782,2553,5048,1805,3540,279,2711,658,1146,3210,1594,3327,2794,4813,1611,1830,2308,1403,3287,1379,1233,1650,645,1299,560,2020,4077,1880,1585,3548,4126,1922,2732,4390,423,964,5060,1386,4274,139,5520,1610,4844,756,2639,4102,5418,3639,309,4670,5145,4632,2302,1345,3226,5332,1205,3315,502,1462,4448,3297,2669,2472,1832,4214,5454,4067,516,4097,1165,4748,1907,4038,1854,2256,3548,2043,2822,2147,5290,1491,3010,410,868,3860,3810,2043,3048,1699,2720,3320,4807,2170,5118,299,4610,1620,918,1526,1586,5381,5088,4828,3766,2580,1925,2640,497,2281,312,304,223,1655,89,3278,275,1921,2908,924,807,4379,5311,4741,4833,377,4532,2337,4818,633,2518,4305,486,1089,493,4208,2183,1734,4425,2282,1742,2969,4633,1040,4624,3901,4299,4680,3165,1668,1823,4896,1960,3709,511,655,229,3945,1085,575,5320,1224,2455,4860,719,1172,2214,1461,351,3405,3166,3727,4676,47,1291,2179,901,3852,5006,3684,2884,3718,697,167,4919,2460,2252,484,56,1428,2575,3669,4637,1071,1987,5414,2351,5082,1286,1911,3697,2008,2897,2210,4708,1312,4942,5381,3095,1163,2450,5464,852,708,5399,4721,2486,897,1012,2948,1073,23,5125,352,3889,5202,5280,1724,3969,4332,2536,858,316,2200,1293,1172,2982,2126,463,5050,3925,4923,2753,1820,4537,2095,3546,2732,212,3296,1781,246,4321,3309,4348,4296,3934,3631,1543,988,935,3804,708,4514,4451,2425,3156,1087,963,2383,5268,5087,2695,226,4357,4782,4155,3413,331,2491,3098,1183,5047,620,323,2046,2719,599,2658,1437,1311,572,1569,1889,2053,2942,4345,3108,1720,3543,3541,657,5217,4474,624,399,4302,3928,5388,5094,2697,770,1497,4438,3102,93,1941,5319,718,1205,2844,4063,2577,1745,2797,4526,3406,2152,1471,4893,4915,509,5251,3241,536,4000,1661,3266,1713,1698,5118,2422,3851,3125,481,5183,619,937,5264,323,1320,5330,2156,3439,5232,61,2735,2827,2537,4989,1402,774,2201,3815,1102,1572,1745,1943,2490,1589,2669,2095,2066,4804,502,1667,3330,5377,2350,829,451,996,4322,3557,1392,3121,5417,3743,2223,4245,911,2970,3698,829,212,2771,2440,3141,934,651,1737,364,537,4456,1653,2240,1870,366,3774,2646,4758,303,3014,5258,4143,364,4818,2128,4453,4954,3244,2870,2802,5037,4325,3850,2545,1039,3626,4317,3556,1392,4040,4090,3534,4961,1014,4833,749,3973,1779,1498,615,2747,4221,4184,1570,2678,374,4540,1114,4360,3220,4021,324,814,547,1029,2105,521,3906,3336,3668,4372,2910,3910,32,1990,1804,404,1270,1995,352,4340,2953,1566,1048,4223,2224,368,1840,3309,2008,2380,358,328,676,2721,1012,1625,4227,3556,2151,5315,1673,781,3331,3007,3859,1869,3809,933,3851,1395,3716,2590,5339,3755,851,600,3923,4769,958,1309,3143,1718,2310,1966,556,5174,3796,985,5135,2865,3116,4775,143,2643,293,2639,2206,2322,361,5128,1063,5251,1678,1717,1757,1867,5053,1592,2237,1664,3499,118,2127,634,1745,2777,175,3813,3198,3323,1784,4985,2898,902,975,1494,2988,3043,5110,3709,448,2205,2461,3134,2479,2212,1928,4486,2461,368,2191,5185,1668,4056,2713,2394,1889,1894,3555,1729,1505,1095,4131,1448,4978,4508,1617,1970,1152,1249,85,2118,2970,1198,1618,2931,387,766,3888,3551,1156,4824,10,4990,4762,2599,3592,4227,2079,4215,2172,3272,5043,977,1406,3683,2866,3133,2552,1976,3003,3457,2554,1831,3780,308,2147,2137,4503,3795,5246,4979,814,4753,3823,3939,647,3273,5074,4558,3637,3839,594,5515,947,1373,3725,1243,1599,2098,2245,507,2267,1592,1701,1715,1504,1790,5208,3114,2777,571,4097,1812,1506,4121,1236,1403,3732,1549,5018,1175,4299,2794,1745,4985,2562,4340,5151,4642,4626,4659,3545,2427,5497,3769,1453,3383,1111,3187,2792,855,1801,1071,5273,2341,5187,2787,543,4433,4936,1297,5479,1589,2515,1941,4178,1287,5121,5132,3927,4140,3497,1475,1457,3019,2060,3274,554,5525,1444,3256,4271,933,607,486,2001,1524,2893,5023,1077,2323,3983,1133,1810,4973,3205,3742,1213,975,1948,327,4641,4692,2876,2638,1598,311,363,1064,549,1965,3573,2503,2147,5289,49,4994,3763,4754,4609,2713,1569,2857,3155,4771,5445,3503,2679,1537,3461,3430,4598,2560,864,4043,799,2547,1184,1567,492,614,1707,2075,3496,5136,5398,512,1993,755,755,1984,7,5043,3838,5286,3841,4778,3526,5399,4039,5461,4510,544,494,4282,4179,2207,1434,4710,3954,4131,5338,511,3241,711,2037,737,1698,37,2303,3723,3671,4656,3404,1124,5085,5285,2392,2302,4752,5152,2165,2339,2247,2231,1678,1430,3078,5026,2028,5110,4684,4041,5042,396,1499,282,660,5420,3400,4554,1376,704,1834,3237,4845,848,65,2525,4374,2535,596,3616,3787,4042,5146,4010,1939,5149,3286,1057,5116,1294,1267,4645,3524,5256,5040,2816,2996,2448,59,812,3840,1160,2540,1321,3821,1056,4717,442,726,2710,3229,1660,4689,3829,4977,588,1065,239,701,834,838,1170,4326,5215,2048,792,1003,1544,3421,4436,3362,2514,701,4171,2637,4368,1086,2086,4190,5057,2269,2182,1004,4645,1752,3579,2781,2869,5438,4742,5391,2152,2109,4863,5075,4556,1329,3585,733,4484,1016,5367,3434,4325,1693,1133,4131,105,2234,1073,2226,2867,3874,1589,2607,2592,4469,5317,2307,1055,5427,896,1511,2190,1210,2091,5408,5175,1484,4394,4741,579,1941,2473,4209,4420,743,3550,926,4036,4680,1985,3594,1677,383,5133,1211,2159,1632,368,1311,1269,2890,3128,5312,5362,798,1333,274,4670,3457,791,1639,4927,940,4504,4176,4505,2361,2680,729,1925,1218,3951,175,4453,5271,3945,1286,229,4066,217,3895,4253,1854,4139,2034,1678,4482,2335,1426,3401,2439,4416,2842,2663,4470,3279,4615,1620,616,5062,1571,2204,4050,5163,2390,3542,2819,4155,3072,4580,3991,3346,4246,3977,4998,5103,2738,2124,3421,3728,4520,4218,2788,238,5178,1867,790,979,3327,3117,3058,1954,4051,4729,5370,2304,4178,397,2779,2839,876,4434,5315,4601,3209,976,658,3554,4179,4756,2322,426,5270,2785,3900,218,3382,2653,4142,20,3676,2575,2107,3033,1134,3256,29,3825,1283,1805,3734,4234,534,907,5243,2112,2913,299,1488,3254,4501,655,3380,4556,2077,5377,3249,2643,3838,1990,2281,1519,5016,4444,1085,260,2695,1590,4466,2917,4349,1780,2101,4936,1072,999,1200,3711,2735,2126,3362,2845,921,5341,3100,4092,3464,3048,2323,1028,3830,5097,1790,2615,1873,1382,1662,4218,881,1431,1460,2010,1863,3867,908,3390,3315,1352,1269,4208,4864,2655,166,271,4304,2511,1792,3547,3318,1784,1182,1613,1288,619,1807,835,474,775,4480,855,4359,4865,3963,4607,2906,3052,1471,698,2670,5323,2577,4369,1324,5486,5396,1583,222,565,394,5348,3288,1638,1994,3429,5198,4105,2281,2532,3275,1172,3064,3685,2047,2209,245,3498,3579,5250,3494,3526,3054,1050,5477,168,2994,286,1174,613,886,3382,2187,1433,3343,801,3891,1300,2435,5192,453,1458,3356,2195,1106,5062,878,5167,503,4643,1206,5358,441,585,1053,2075,2591,5449,2141,4387,5483,616,4244,5093,4352,567,4627,254,119,544,724,4309,976,4733,2849,3177,5064,2268,654,1717,4504,1,2036,694,1382,791,1457,1016,3278,4432,802,734,3691,4986,2414,2373,347,368,2754,3415,632,568,1336,254,656,1350,3084,2718,3667,4593,4929,4750,1245,5395,660,753,5084,3558,3225,359,3490,1002,2657,1742,1173,3434,966,132,1287,836,375,5127,3717,1071,2082,4628,3877,4321,609,2702,1160,1914,2883,2922,2694,3544,206,245,1993,4832,5310,1213,2913,5459,1475,2314,5228,4856,2272,1688,4076,3728,4824,1112,3642,1624,2617,4109,3378,1609,2402,3702,4215,3314,4063,1437,1639,3243,3518,2665,3570,3478,4948,1188,3934,914,2004,3267,4453,4509,1616,734,5218,656,1338,3965,3756,5134,5452,259,3779,2810,3299,5376,4157,202,1733,5387,4205,1387,728,1010,2336,39,4852,4779,4786,644,2812,5177,1484,4347,499,1590,497,3000,4378,4007,4628,1782,2397,2425,4734,1966,5168,1015,2556,3159,3033,1989,5124,2801,1175,2838,1975,1415,3461,4815,4770,4621,4156,1055,4738,229,5108,2898,1637,2732,915,2361,4503,5183,287,1348,146,2444,1058,2906,675,3425,1368,4396,575,307,3467,5059,3428,246,1386,4790,1733,5355,4459,4822,4333,4160,1245,552,1096,1801,1288,1253,4448,4161,4275,4402,5414,1403,3327,2508,3231,2383,2047,2913,1418,2271,1542,1257,2508,5312,2841,4026,3923,4031,2463,1669,3685,5146,4401,1106,5303,5244,2885,4761,1876,2206,37,401,2413,1637,1639,2201,4213,2075,1506,3402,1179,3950,936,1403,626,5142,2681,4989,2379,2965,4435,1811,169,5155,1609,338,1681,5104,2556,4171,823,63,214,3114,4093,3498,5251,1188,2251,2987,1887,2543,971,2384,3240,3060,2497,2295,1166,1043,2125,836,3432,3695,754,1459,582,1134,352,2331,5272,5263,2010,3957,4216,193,4747,1453,5471,5063,599,367,4633,2456,1157,4328,3502,2345,568,1478,3088,5188,840,4622,4650,5285,5479,1204,2025,3076,4981,4222,2633,1817,3681,954,5180,1446,5440,90,4862,1347,1955,3246,3477,4251,57,3614,2441,617,2837,5354,2979,2054,3911,3201,1395,4994,2964,2609,2826,1789,2295,4565,2741,3238,766,2424,727,3931,3114,2123,4690,4946,2072,1706,3513,1787,3476,2240,4250,4111,4083,435,212,3823,3406,3084,2141,103,5347,884,4561,1875,2132,1339,3854,1050,5110,5509,234,3434,3008,3246,4964,739,1646,1238,334,4889,2658,617,5036,2610,2388,3265,803,4559,2812,2811,430,1892,4292,1990,408,2966,2980,2803,5071,3556,4328,2106,717,5351,4390,412,3439,5507,2904,2824,3505,4947,3553,2170,2894,73,1099,5123,4995,4340,4160,2181,601,3463,128,4170,2036,4848,4939,3066,1646,4141,4618,3697,3061,5253,2353,5254,2838,5345,3192,4150,505,1690,629,2784,523,3280,1302,3779,2706,3529,597,4437,3875,1140,2916,805,1277,4729,4661,1065,392,2270,2009,3814,2599,3842,2575,1493,2163,3061,4819,3354,4260,1958,2287,70,1599,4044,5247,1014,4017,4623,5365,1102,4279,1633,26,434,1989,4786,3266,4962,5231,4903,292,306,2271,412,2083,1710,233,2614,4539,4256,4357,3460,3495,5522,595,886,1893,4584,460,5008,419,2013,3944,2486,4798,1284,5256,3724,2454,2675,5411,3573,3445,4134,193,4461,3228,42,1098,3554,4373,3681,1197,2085,1409,2292,1723,611,3263,4680,848,2162,2099,433,2704,5021,4804,1246,64,3065,1168,2958,5455,2721,3801,1721,1788,5304,5434,3888,5299,165,4052,3330,4060,2097,4154,5375,3039,651,5252,2553,3845,4663,2677,1493,2948,4854,3563,4690,3320,2316,5140,1498,2162,2916,4478,4306,2084,1606,640,5107,5307,5145,5072,370,4992,3887,4698,175,5106,3678,309,224,4020,447,4534,3537,4328,2957,1355,1697,5260,1600,982,1985,2700,2202,1858,266,3405,2491,4674,692,2655,2622,1479,3996,2245,4462,2332,2072,2281,4848,2797,3914,730,4711,133,3728,3373,892,1629,2024,4762,169,2913,2233,2066,447,999,4444,3684,1188,230,3171,3500,75,3785,4450,3833,162,5265,530,1019,3691,596,135,2366,1741,4339,2883,4242,2661,462,3692,2331,5204,4452,940,4543,824,5042,5174,5248,2325,4804,3430,1652,3629,5013,3065,1414,1387,294,3495,629,3682,4248,5480,3165,5354,4254,4457,866,967,3839,5235,8,4799,5294,3279,5375,906,3317,671,398,1188,5262,4233,2631,4654,4692,5215,1099,3987,4483,2163,74,3302,247,916,4225,2544,2146,4814,1001,4820,1210,3970,1165,224,5524,769,2235,2594,2620,3533,4573,3228,2718,5125,3277,3427,5008,516,4877,3114,2860,5130,2942,5299,2204,1397,2880,3118,1423,1859,2691,2288,1637,2287,2233,359,4960,1237,3769,73,353,1855,94,3775,524,4700,1640,5435,1043,1918,5181,288,4443,511,1249,5117,2425,568,1785,1776,3302,4362,4175,1088,4146,5071,4389,290,3691,2376,1200,1007,2198,3957,1330,2896,5010,3115,2601,2164,3835,1576,4042,3441,1543,3758,4544,3494,701,4351,729,3711,4050,4118,2716,1211,5493,2444,129,5444,1867,5479,2691,423,2016,4205,1950,442,4787,3371,3959,1009,1633,2730,3584,2696,5488,185,3717,2120,2394,1413,936,2596,82,2307,1033,5047,2552,2977,2010,3183,3353,1173,2243,3139,1676,4990,91,1639,2554,1037,1783,4786,3301,3330,3956,2205,1414,1331,4276,3127,4690,1071,4820,1673,3138,1001,1082,4731,5457,1654,2090,2586,2793,5191,3083,5499,116,3757,5109,1796,5238,5140,5178,5317,2,1012,1641,4024,2913,5518,3677,1951,926,1604,4267,2603,983,3125,4644,198,2867,3919,3528,3562,3480,4802,5246,5057,854,1524,2840,3256,1530,2216,4730,308,4693,5073,414,1720,2201,3601,4773,5355,1503,1280,4675,4861,3563,2861,4964,2769,2077,1120,772,3737,3989,3218,1711,306,3675,369,3098,2403,3909,1035,3756,1230,3782,849,2515,4874,3148,5053,4262,3279,1321,1552,1915,1980,4870,672,435,4856,761,837,534,1378,2437,2530,4082,4391,25,1137,4597,2573,4979,4374,2130,911,410,2731,1104,2076,1986,5152,858,1393,25,4844,1099,71,4653,4533,2298,2591,4380,1546,4132,199,623,3013,1332,5518,1191,4295,3348,1108,1522,4100,4793,819,985,1837,1156,1641,4753,3843,3645,2230,476,3821,620,2138,1949,2884,4516,1922,1866,4453,3710,2025,564,2632,4746,2455,2871,723,1991,3982,3932,4501,2276,664,1762,2323,1358,968,2232,5063,4940,2290,4879,1931,188,841,3038,4790,2201,2624,2316,5057,744,4832,3169,5461,1912,3290,5071,2004,3504,2215,2880,4429,4543,1324,4485,1611,281,3234,5089,4191,1428,3600,1254,2992,4014,2642,3924,5291,3900,3843,2463,3204,4402,476,3776,1857,4305,3435,330,5369,2959,1228,4319,658,3671,4987,4212,558,1150,3349,1504,2175,2726,3592,312,1000,468,1604,252,634,2005,4374,3603,1448,3731,4922,1521,5021,1284,3647,2868,2920,4206,4622,2731,1285,1088,1413,3980,914,3964,4722,1499,2722,3078,5359,3325,3625,4656,3324,4640,5193,2400,1874,2299,3724,132,2233,747,4698,5408,3520,5523,2578,2822,3741,4778,877,5164,5095,5131,4055,1164,2422,1839,4061,3266,1626,2997,3572,2221,1167,3785,4600,103,3012,2502,4064,3086,4393,1915,2478,3032,2379,3768,929,751,238,1821,4822,1705,291,1370,2272,3565,4407,6,1663,2996,3353,1504,2870,3687,1454,4009,4363,2552,3954,2905,2599,4346,4766,503,1099,4418,5260,3651,1872,425,1710,938,5162,1796,1938,1606,1549,4810,4352,5336,3571,1192,188,549,140,3482,369,5135,5525,4355,3401,4623,1285,2755,2282,2209,4933,378,1972,5359,1881,2498,4517,1660,5212,2266,2333,1314,4786,3729,1902,3467,4090,5400,24,885,5520,2453,1327,4749,2610,1073,925,2137,4359,4995,1682,4535,548,1399,3302,1545,1521,1623,4163,2393,2966,4676,3996,1465,4467,3623,1161,1672,657,3579,2627,1183,1032,531,950,3132,2532,110,5461,2362,2619,5417,2666,1226,68,2438,2353,4226,161,2961,5150,1006,4560,599,2763,3922,1934,3260,5415,1746,3482,5128,1733,3039,5462,625,960,3696,871,722,3745,92,5277,3838,1932,1317,689,2570,5350,833,2861,3075,2042,1846,3816,908,1073,3398,2597,4715,194,3128,5334,3858,5410,1728,5189,599,1276,420,4088,128,5131,706,3751,4010,1940,987,2550,5144,2620,1122,1854,4698,4982,3679,3449,718,4480,4204,3719,5097,3310,724,2059,3041,518,4889,3411,2072,3612,5438,795,4644,3435,3232,920,1841,1081,962,2103,1464,5231,4995,873,3135,2128,94,3533,3399,2350,2504,889,19,2135,3919,2432,4401,2156,3500,4007,4049,3803,255,4243,3303,2490,2817,105,4643,1685,3324,1320,691,2282,4535,4369,209,1743,2872,3411,2393,135,1078,3415,5307,615,3535,4729,2873,1519,2769,490,2657,2753,760,3650,3092,5414,2075,4091,4611,1930,85,3595,3930,3227,4515,3240,3107,4170,3481,4652,1846,4989,4167,216,3609,5152,2181,3913,3758,4551,3302,4552,1026,1542,555,4504,2164,1540,3923,2889,717,1343,2147,4037,2292,3889,421,1969,132,3180,5002,2436,5351,1412,1609,5040,2825,1453,2488,531,3036,4789,517,2094,313,5382,3058,43,1608,238,4745,3969,1609,3302,2864,1723,5327,1024,15,3484,2768,1837,5207,3783,1500,3363,4208,2840,2185,4147,1864,415,3123,1470,4707,3591,1892,2151,4276,1397,4572,4332,972,4761,1414,2877,4265,274,5111,635,5222,5343,1650,167,4501,1026,2045,3158,4007,3512,3067,883,4481,799,5312,548,4223,3743,3083,4625,3578,157,1689,5397,2012,1467,2267,37,882,1801,1243,1209,1971,2570,102,292,2365,5040,5337,3998,2566,1982,4702,2988,4571,697,83,3700,3286,2127,1135,2382,1495,1643,1393,2192,1810,1186,4623,521,7,2954,1938,3334,3695,5298,2100,133,4844,4246,1018,2597,5397,861,257,4980,2678,103,2179,3501,4560,154,3141,4531,1127,2266,1457,871,1855,3255,2642,3381,86,5175,4083,3501,54,5490,3488,4764,2791,2074,407,3914,2819,4387,2981,505,482,1185,2227,463,3549,3776,2675,3211,5286,2368,3893,893,4057,5011,1333,820,4740,5206,3815,4186,379,5000,3964,5001,1645,4235,3224,1176,1651,4655,262,5126,1736,1767,1737,3536,3125,1012,4089,1429,2832,1798,4913,3839,5128,4762,3076,2435,4321,2145,4180,3983,1945,4649,4617,1956,3213,5171,274,3048,82,2380,2010,5125,3978,3409,3818,2297,785,2384,5206,1101,4435,2699,2825,713,3759,3497,3959,641,798,5113,873,2373,269,5184,785,1356,4428,2374,3992,4021,1170,986,278,5276,3036,2621,1221,1575,3527,2183,668,5339,3396,3603,2865,3527,2744,2410,1813,1014,5408,1414,2628,4701,258,1082,3211,4446,543,259,4438,4213,4475,1107,2847,822,3388,3954,4654,4349,3197,3463,610,29,4478,2647,366,2031,3829,5474,5299,2871,3176,4359,2312,4536,1072,4549,5137,2549,487,3194,4773,4453,4946,1199,1898,387,2021,3232,4777,4203,582,4195,2289,3896,1724,1407,4760,305,5163,1946,998,3214,3310,5213,2202,82,1253,3886,2117,1204,2759,2906,4554,4013,3097,1281,4283,2315,4893,5115,3100,3084,1892,5199,5057,3592,4687,3021,4892,280,4816,1392,4573,3537,1081,2545,1016,4158,3629,1772,2962,4250,2187,602,1267,1071,3774,668,1532,1825,2115,2904,4533,991,5483,819,1767,2639,352,3687,845,692,2760,4774,4506,4310,5469,3377,2657,2254,1023,3044,465,76,1089,1090,2192,2823,4967,4381,4198,3495,3835,894,5481,4425,2087,1967,4155,231,1538,3754,2872,5114,4245,4464,3519,4981,1566,2228,3933,3050,4279,15,1997,591,5161,3021,3418,248,2616,2002,3928,2461,1510,2246,716,1778,4462,3668,3017,3679,4561,1375,194,4214,5129,1595,3325,3614,450,5110,3024,1814,4414,5338,3074,1960,2509,4149,3407,5374,5049,1977,3661,5508,1528,634,1831,2190,5507,1037,3743,4546,4108,4656,2095,1839,3947,4733,4292,3321,1698,1225,146,4219,1705,1111,680,1183,191,288,869,3474,93,3372,415,489,3451,2386,1114,3418,5094,2575,788,3764,2762,1952,2572,1561,42,2380,4410,4119,3630,4162,4147,4343,14,751,3466,2648,2920,1570,4833,3070,2884,1227,4474,1422,5399,3924,2596,969,1630,4417,4021,3554,246,3994,1136,1389,609,314,2162,3561,610,5079,2643,4877,4298,5014,916,3956,5062,5463,858,4912,4588,124,2445,5179,3112,3835,186,380,3036,2658,1918,4796,2163,4172,1243,4394,4931,4137,1992,2794,4615,512,186,4611,994,3652,1034,1320,3193,4669,2534,3428,1588,5438,4215,4088,3216,5345,4953,85,1921,1033,997,1589,4971,784,2433,1092,4738,1615,3180,284,2968,1503,4161,2920,4442,2785,5058,2509,4172,317,1953,1984,5475,45,3745,3959,258,2407,2230,4363,3145,175,1951,4720,3499,1352,1404,3807,549,2636,1037,4212,2750,1082,375,2888,1431,3967,1221,1261,3214,3335,4626,1897,2666,2254,4895,2144,3980,2859,1653,1664,5352,731,5514,24,4062,4173,4588,4440,1457,5091,4790,284,4306,2093,1433,3296,2374,446,1518,2441,426,3563,1317,2895,1214,4922,1262,1046,2383,3547,5510,4810,82,3457,2459,2225,3733,1366,2910,2655,2224,3393,3271,3983,3526,1063,306,4051,3816,1065,1318,3860,3715,464,2928,5214,344,227,5000,594,3620,3957,3859,4704,2289,4032,3938,4467,335,5366,4405,1826,776,3617,172,4426,124,4013,4808,1629,3784,173,4342,1706,2977,2156,44,1140,4278,1446,88,2085,5465,3349,4475,989,1071,2260,4748,4126,3868,3369,777,2244,942,3579,1272,5379,3996,4708,4534,1163,4449,4704,133,3529,5211,1178,3590,2155,3948,620,4297,5264,698,1082,1965,3293,3976,447,5314,371,4314,3797,2334,5507,1296,4557,2041,4137,2224,2507,5464,1256,3674,1825,598,1955,134,1035,4709,279,1232,3132,3401,3333,171,1873,4740,4457,96,4665,2638,3865,1206,4652,2229,2684,916,1275,4063,5444,4783,3580,2780,2455,5043,5069,2425,4569,597,5280,3667,2753,5217,1889,2113,4047,2101,4944,419,255,4155,369,3427,3277,873,301,2987,3896,4473,3335,5016,1824,2785,249,138,5017,4723,734,4194,4828,322,109,581,3431,3836,393,342,4374,1982,4575,2873,5136,4772,1981,3309,2004,2823,1924,3937,231,1024,3241,2878,2919,3763,1944,1970,4238,852,4607,4116,5435,2874,4139,3644,3673,2342,2366,5057,3514,2959,4911,640,2892,2602,3938,559,1351,2469,5198,3902,4299,1407,5118,423,2453,5072,162,3250,1874,1682,1574,4124,161,4308,1033,1665,3618,1336,4012,3840,1513,160,1158,1717,375,2264,1446,4181,2540,1622,790,2032,5169,3935,2260,3813,463,5159,2321,742,1669,1439,4192,3234,1558,4903,479,2329,17,3862,713,712,3033,4551,1328,3644,5420,646,2782,488,1072,4056,2655,2800,992,4452,2902,2427,2118,4660,1479,3066,4755,1254,2403,1339,3041,785,4384,2127,3151,2280,2135,3523,3825,2380,5047,3865,1471,2270,975,3127,3351,4202,2978,513,3963,5188,4054,659,4524,3559,126,620,4997,3053,4279,3361,5022,4031,2601,4835,2673,5079,3953,3657,1632,5448,4770,1068,2863,2985,1167,3885,2799,5096,1756,4783,1664,2551,3419,3233,4005,1907,1859,3234,2104,2882,305,1940,841,5411,5507,1854,652,3561,2391,4680,2264,672,2252,3690,762,1663,3805,2843,2573,5258,778,3380,2874,1898,2035,2686,4709,604,1824,3561,1364,351,1548,4343,4199,3948,4680,4689,4912,3785,3097,827,326,1935,3486,4640,4106,4950,2464,4612,3941,3121,627,4140,5155,3346,3887,2343,4208,12,1810,4527,2126,4619,4299,192,1181,3276,4392,2470,5193,4401,2743,3132,231,2100,2970,2133,851,2059,4397,595,5223,3674,376,1452,2200,1007,267,1009,2723,3207,510,3899,5081,536,3595,1961,3870,1197,3454,1647,5319,3390,4202,1223,3521,4743,317,304,2460,5088,1635,2473,3771,971,4727,3264,1262,2680,5084,902,577,1842,1728,1187,3173,883,1105,3225,4960,5311,4117,4426,2180,4233,2571,2942,1617,1806,3131,3460,5373,5304,4912,5264,2862,2235,349,3878,3631,2441,523,3525,5088,3097,2254,462,436,3717,3669,2360,1780,5125,1198,967,3059,858,3423,3021,33,3876,495,4640,5236,4672,2130,2883,4145,145,604,5152,770,4729,3275,5295,1721,2402,304,3848,4319,457,5227,648,2014,402,2707,226,1882,4777,1061,1182,1569,4233,1709,2543,2828,1344,2445,2046,1292,1755,5338,5441,2113,1002,2241,2152,3630,1664,3745,3251,1427,3331,2792,1325,2250,4825,645,3920,243,1965,3109,801,2670,433,3420,1408,4346,363,3937,5221,3551,1264,2119,5068,703,4469,3369,5437,3865,631,3269,2197,3232,1346,2152,428,3454,4495,4641,564,4375,3289,2385,4042,2379,3883,848,4158,3794,306,4140,1037,3256,3654,267,3886,2777,5333,4525,80,766,3144,2652,307,2477,3973,730,4295,1894,82,3327,2634,4184,535,3147,1249,1777,1541,3729,824,1835,3929,528,3768,2331,852,3061,3801,2749,3103,836,3277,4331,2561,1260,1672,3222,5219,4315,1216,2846,1645,903,625,5400,3583,1728,53,4912,4450,267,1077,2050,2147,1087,1994,1935,4705,1472,1696,2391,217,1440,1396,1760,2471,4244,4445,3454,1304,2953,916,1674,841,4653,81,2915,3124,907,4999,2340,2870,2601,1811,2299,4326,4926,900,378,3438,5026,475,2426,4477,707,3522,116,5320,3380,2488,788,3376,2236,4468,2118,3323,2005,3797,1516,1223,4028,2095,2314,2782,5242,2401,4329,384,1925,4941,50,2301,5236,1135,2470,1723,383,4717,4852,3484,4106,2964,4810,4402,1197,2157,2036,5120,2953,2103,5426,4337,3847,4764,5129,1976,4336,2797,1342,500,3238,2342,808,423,4562,4165,680,1094,3777,2972,5519,4699,2774,999,1869,4147,1693,1713,3626,2904,5064,4268,2106,5106,1898,351,4065,2317,4361,568,4445,802,2044,3948,1341,1664,746,465,2036,3555,2220,2417,3060,1743,9,3161,4438,2516,5134,2601,2633,325,4484,4960,4276,2839,3037,2379,4454,2700,3849,4790,1318,4057,3605,794,3099,2594,3552,5084,1773,1909,849,2914,3325,5522,3131,4970,1751,3149,3255,4557,1010,4515,5325,4632,750,1935,2477,5002,5393,1926,2373,3514,473,3413,81,808,4968,2970,1001,5148,4488,2869,831,850,1506,2551,2828,4603,1909,4658,436,4812,1451,21,2218,2502,4820,5195,601,522,4905,339,400,1066,1532,591,2616,3559,3678,4894,4206,1308,4989,1999,1201,187,5063,2721,2530,3509,4900,1679,4624,2092,304,2919,1801,1765,5070,495,1681,1643,4679,4797,513,4978,5457,776,547,1987,3911,1591,3109,4565,4405,4111,791,4761,1468,1867,4725,3566,1141,2639,1543,3946,2953,4898,1430,3145,2622,4565,1852,1660,1053,4591,4508,5422,2711,4673,3859,1658,336,4222,5374,1141,4877,22,4440,1712,3572,540,3533,4830,984,646,606,3799,3543,3944,3776,4498,3024,5291,1892,3307,2795,3739,2303,4224,4978,3046,5071,1117,4233,2173,1214,2993,4366,303,1606,4526,628,4363,1150,1636,3228,2949,5006,3171,778,3634,387,1385,4880,4106,893,239,515,749,5003,3986,2061,3386,5218,2750,66,4286,5175,2916,47,4427,86,1355,4709,331,3963,4536,2940,5353,4575,2258,4763,844,4223,5140,2041,2526,3029,1214,1147,2946,2367,3405,2487,3729,4052,4009,4480,3815,1810,2313,3698,2981,5363,4390,1168,2302,1131,3333,4442,2714,4896,4208,3320,2000,3279,623,4030,1243,4240,4111,5,2096,3486,3673,1744,627,97,1013,3402,3900,2095,482,63,2263,4770,324,4988,3865,3316,1367,4431,906,3151,3371,3621,2207,144,3796,2628,3473,583,397,603,5406,1034,4331,1056,5152,2523,229,780,3686,1217,4705,3680,4264,1804,1140,1804,4604,3237,2535,5184,772,1987,4894,5493,1031,826,3792,331,557,5418,5262,2050,4395,2300,1937,3900,611,4041,1839,4371,576,1900,2060,1871,1276,5229,2336,4731,2440,3297,3435,1308,3679,4237,8,4629,2393,1420,1996,2716,4448,3637,3637,2318,221,3565,4564,2413,3233,2597,4003,2154,4930,3130,1989,1318,4630,5128,138,10,4847,4498,15,1329,2297,4480,4886,3505,236,1864,1788,956,2238,3857,2540,28,177,4734,1644,1988,130,496,920,640,1182,1279,677,2111,3606,3052,3111,3034,3875,3071,4724,5150,135,5449,83,384,4526,895,1911,3572,3267,484,1209,1384,3682,665,2232,3052,4309,395,3985,5053,2109,3223,3087,2663,2732,2892,1295,4539,1045,4118,890,4042,730,2627,5439,5487,3308,1279,3235,4021,3038,4496,39,1201,1201,2939,1975,506,4232,1997,822,3132,2721,1852,4405,3424,887,1267,2599,4843,516,1389,4606,4273,3324,3932,92,3854,2445,2250,4365,2064,4867,1079,694,5225,3412,3051,1853,2456,2687,2736,1555,3108,1625,624,3378,3766,1930,1352,1388,4606,1765,5210,3732,2976,5002,966,3969,246,5109,2514,2636,1535,616,2973,3376,873,4391,5353,3414,2948,1291,872,4718,1490,4188,1090,1707,251,5058,3336,240,3097,3875,3272,3168,3963,5176,2922,1369,3507,4148,3819,3576,3299,4693,2777,2811,3128,1106,5481,1792,5380,1094,88,2378,4534,1517,4399,2130,1315,4653,4148,1756,384,2349,2072,1869,4130,2460,1559,3232,763,4564,2036,3204,3053,3693,2162,1275,3117,4178,2243,3281,2685,2980,1614,4361,297,2765,2081,3761,1507,5228,3214,4995,3544,2062,920,2092,3414,5001,3492,4824,186,5435,3022,5246,5174,2802,3451,2067,4917,560,1819,3342,4431,4616,3146,4374,3615,763,612,1885,539,4932,1820,5013,4537,1109,533,4707,4498,4478,3156,4207,2019,931,3642,5168,3639,343,4302,3334,1503,1039,261,2595,3134,1865,5302,3320,2455,1942,4612,2606,4917,4378,2647,4931,3135,4434,3215,649,2002,1093,2826,2433,1708,4084,3807,197,3434,3173,1310,500,2420,4191,490,2377,1261,3782,4877,818,5120,1335,3589,1068,1891,2726,3558,10,3139,3398,3137,4025,2864,2100,5504,2308,2584,5116,3002,2171,3604,2238,1969,1127,2633,1102,527,4954,2710,4739,2535,4330,4347,4874,3678,1610,1287,3974,4941,3238,5219,984,510,1849,2942,4348,4636,916,3076,65,5139,4797,3023,1671,4544,2882,3466,2206,3967,1527,4951,1402,781,4555,5146,5045,1640,3940,1018,4306,1340,3868,1197,5514,691,1266,5104,838,2653,1831,5331,2777,2787,923,608,3779,2262,5149,5192,3393,3315,79,4537,1149,1947,2596,3065,2579,4207,4082,1769,5218,3652,2389,1495,1568,2884,5390,4045,865,5202,4927,3160,5106,1352,2157,2967,3519,4182,4947,445,3009,1093,461,2444,464,1438,4082,1069,286,2584,3992,2094,788,3669,4699,2117,2639,4070,5135,1900,988,3372,2921,934,4407,2222,5018,1743,2673,5523,4876,1455,2539,108,3150,5351,4872,3544,2619,344,1380,1029,2225,3604,118,2975,3242,5060,4853,3737,4836,735,316,1010,1136,579,391,110,4038,177,5304,1099,1715,1072,1988,4797,4749,1107,1934,759,2671,1683,3881,91,3800,5133,4492,3158,1249,3863,951,2287,3223,427,465,3364,2077,3444,1492,2321,3195,1605,1643,2413,1880,1353,2621,3691,3398,866,2389,1144,3001,844,518,3120,4128,4809,4670,4171,2966,4839,2992,331,2612,1416,2045,2499,1209,3704,5060,1927,4234,349,2142,3937,2777,2535,790,4821,2078,4680,476,2736,1690,3373,871,2510,5493,3905,5267,3771,106,1731,3817,3867,734,2209,5170,3514,1633,4768,1430,871,676,4872,4980,183,3364,1415,2886,3687,899,1088,3755,3291,4380,2505,2050,2730,429,233,4770,3236,5320,4910,3550,1348,204,299,3824,5432,5071,3071,2074,760,2426,3866,1690,951,4147,1682,1286,3148,4250,4322,1516,3347,188,4410,1097,62,4462,4085,877,1295,4432,2394,2224,364,262,3097,3694,3242,4757,2942,1093,1697,2088,1914,5351,2564,5486,1992,4138,462,5395,3513,4335,3851,93,3491,1353,3177,2602,4663,1932,884,4631,595,2417,18,531,3156,5374,3637,1688,4395,2064,2941,3971,2835,4281,3118,1545,1512,2481,2735,4945,2863,489,107,4503,1581,2706,5166,2068,166,2268,4084,1075,4057,1536,5399,2382,598,1721,2375,1294,916,78,5257,4141,4262,4009,3767,3019,5116,2269,2643,5102,946,2208,2646,4927,5404,2073,2799,2585,3410,5362,4861,5492,2781,4593,2516,143,3525,3022,2086,2382,5306,5454,1315,1387,3932,4636,4847,262,3405,2673,3207,94,2303,4793,4672,2987,525,2157,1004,947,1605,2135,1691,5159,4860,4211,3827,1499,2222,5378,1340,4193,4276,2498,2907,3933,188,900,4707,1749,1484,3070,4332,3584,5513,5092,2511,3952,3866,3803,4046,1553,784,1829,3093,425,4642,4322,1510,4937,670,827,781,2278,1998,3326,4745,4152,4338,5431,5281,3186,732,4503,2201,5173,5099,2094,4200,5332,3076,2186,123,3339,2401,5210,4421,2888,5398,4635,2793,4737,5259,4912,3125,5234,4404,4841,2957,4348,3297,4665,3090,1796,3285,994,590,4628,870,1629,1191,5461,215,5370,607,2161,5000,2586,4751,106,2503,5512,5323,1975,2129,1587,4193,1651,1374,5270,4845,31,1546,923,1785,207,1202,4099,1545,2908,3032,3569,5194,5063,309,2670,2631,367,4846,4194,5195,652,3836,3339,765,3645,1236,2154,4757,4812,1428,3181,3101,1531,1509,3124,2175,1099,562,4288,4350,3504,4996,1597,4579,255,2675,846,163,5171,3793,1082,937,1153,1240,5491,1092,33,4591,70,5143,4311,5474,629,2150,3330,1202,4941,1542,2349,2471,4051,5378,4486,3824,1119,1124,912,392,5027,738,3003,2488,1550,4428,3323,390,3846,3919,2195,5044,2914,4210,1569,3593,5421,2402,382,3755,1066,5044,3736,5353,3924,2986,4601,5053,56,1777,3351,135,2379,1769,1482,1488,3195,3920,2825,2094,5481,1237,1245,900,3047,4426,4873,1293,3123,1046,2735,3160,2565,2646,1564,5167,257,1362,166,3085,3280,5458,4183,477,2921,206,2835,614,5406,18,3260,2558,4370,1326,5504,935,4007,4878,1178,685,1638,4337,85,2012,4469,1665,1873,3803,638,2745,2084,4849,903,566,4342,2528,5315,2728,4981,3455,4635,1370,3307,1108,4586,240,5474,5141,4933,1685,4950,210,2509,5508,1710,1325,2688,2019,4273,992,3728,2575,3435,3972,4294,2411,1909,1828,660,2557,1329,1694,1401,4430,3470,2392,5065,5255,2751,4311,988,3968,1025,4440,5233,1762,2720,3839,4657,3737,1580,3679,3552,3073,1871,3294,486,4898,3149,1648,1092,1553,139,3743,2917,237,3076,4093,3716,1714,3252,4220,4223,4412,14,2518,5088,4640,4021,3629,1775,2872,5095,818,1925,1574,4794,3656,4295,4437,2756,2970,4483,2559,1920,2798,1039,1634,1039,2489,3725,4689,3541,3539,3168,5412,621,3693,1146,408,3828,4108,2189,3221,3264,3645,2774,2178,3635,4913,1487,5355,2656,3712,3117,2109,3069,4828,3253,4038,988,579,2154,3404,3372,4970,3445,4375,4026,5027,2702,973,4962,4054,1143,846,1303,1054,3748,4800,5087,509,3886,1664,606,3698,2610,5280,1467,746,4646,1701,2311,3635,1450,2051,4734,4464,1132,4079,1983,1950,4883,390,5,3053,2610,519,2899,2794,2514,3276,1328,1822,3496,4955,5505,1778,2073,2943,2388,1399,2853,2636,1413,5490,42,1341,2676,1190,3729,4243,3557,2505,3258,3980,4175,3029,1156,3437,3990,3064,860,5283,2418,4014,4683,3716,4962,4788,1169,3864,5210,1395,3979,2284,4013,5321,2251,1738,4329,670,3448,401,5187,5247,1786,1282,3815,4042,3659,4139,89,2720,1156,4198,158,4949,3367,4685,2215,2627,3039,371,3083,111,4692,250,1412,5129,5134,3552,5290,679,3210,4211,3390,1583,619,5152,2196,1517,2360,2890,444,772,2976,5389,524,2347,2979,1400,3370,4324,3127,4801,3117,1126,1724,3606,4366,2118,4000,3742,4257,844,1966,4033,2593,3683,3217,4939,4750,5005,2328,158,3956,839,2833,4256,961,1065,751,5333,974,346,3943,2981,2751,5122,5146,4348,1215,881,3837,474,924,2136,3973,2646,3084,852,3607,2920,5046,3545,5440,3094,4483,1357,494,395,2016,5148,5449,1876,4493,3432,5014,1104,4060,2545,396,292,744,1016,176,446,2681,2159,5438,2103,4874,5061,2611,3701,2846,5135,5023,392,4566,160,3957,5095,1779,410,1778,1067,3548,2116,2063,4707,5470,5455,4825,1769,2489,1285,5432,5008,3525,3887,5356,4026,4743,3204,4380,37,1664,3151,4833,1973,723,2642,2370,4174,164,3372,3042,3638,2798,4369,1827,4173,1960,1711,4053,4959,5513,3841,1225,2840,1596,2201,2860,3333,3921,443,3285,1320,5059,1812,5108,3527,1277,131,2143,4528,1047,4046,3810,4378,675,663,3043,2993,3837,4729,5403,1012,5313,259,3555,4765,3774,1278,1920,2948,5200,3078,3731,3550,2568,4892,1004,4551,2307,3289,100,5104,285,4944,2432,4288,5276,3817,1711,1841,543,661,3547,330,4995,1478,1203,5284,4814,1640,3175,511,3457,5116,4035,850,796,5174,2171,5095,578,441,1950,3677,4008,652,3152,1254,1719,5520,3812,1666,1351,1632,3483,4211,524,2700,1284,5308,3768,4205,3912,4811,1297,2167,4999,2255,461,2783,4757,4765,3530,3620,4123,2036,3818,1377,4286,4383,1378,2857,2199,3517,492,1307,447,3151,3025,2540,5314,1846,2383,1159,3547,2970,4537,3018,2794,5467,4217,4377,3211,1432,72,2741,832,5257,4575,4057,5132,4629,2814,791,292,1290,1364,1092,3814,3812,1638,344,1390,3856,4985,1673,2318,3575,1429,3401,2158,2889,3881,1886,3257,1215,1148,915,97,1923,868,1276,4750,5521,2860,1800,1217,1173,4882,5403,1031,1526,1459,425,1355,3036,3543,2584,2332,744,2497,349,4093,3963,1396,4140,549,2380,148,1069,812,143,671,748,4835,602,1115,5385,4942,3587,161,2890,1331,247,5070,2241,3103,2875,4264,1940,3480,5321,2805,2462,5388,4818,3316,1156,2979,3130,3914,4653,4212,4620,2764,4152,4480,74,3933,1172,2891,1133,5350,98,1230,4111,5295,76,1828,4084,2939,1540,994,5215,1885,4561,3385,5313,4175,4129,4708,1541,1843,4460,5036,4036,4291,476,3464,4050,3660,3869,2389,718,4326,5020,267,4759,2507,4181,679,4397,1489,2681,2917,4305,502,3592,173,3791,2643,4680,3031,1642,1086,200,2770,2848,165,1626,4195,52,3024,2057,571,4194,1641,5253,1524,4311,765,3190,4465,4239,3759,3195,2972,3420,194,4427,2144,502,5338,251,500,3368,5269,4856,3520,436,2772,1028,1615,1589,188,3465,1025,2646,4912,501,2954,1118,667,5459,1802,1026,805,126,3045,95,4780,5286,578,2748,2467,4828,2484,5003,5435,3106,1272,1944,5301,739,523,428,3496,58,1836,1557,3654,3840,4655,4968,4617,2112,3978,101,970,4927,5086,1955,4256,519,2763,5236,5053,5084,2249,3348,1144,825,1942,262,797,3773,1938,976,3084,2518,3441,2511,681,3140,5333,2965,3592,957,363,109,3724,657,4672,2222,1321,4552,4807,4523,2032,4753,2402,1851,3732,316,2745,3356,139,420,4153,2761,378,4593,2351,3219,4934,2172,478,4081,4147,1050,4649,2366,355,3702,1821,572,2474,1243,2188,2219,2916,2465,5336,3956,3233,715,1037,3060,1760,656,2457,5022,4241,4092,426,5224,4982,5428,2834,975,405,4101,347,130,1870,4296,3745,3680,1389,359,4016,1859,419,1568,69,3606,2103,643,3994,710,1822,732,3339,2307,4214,5152,4442,4621,3692,3180,1859,32,3827,1417,4927,3362,1709,1497,4976,5380,3901,1603,422,3314,66,3870,751,4344,960,4651,1734,247,2664,3508,3969,1982,5214,4052,3767,819,1088,2763,532,921,1104,4785,4603,1317,4956,5072,2769,427,5347,1930,3623,3298,2997,223,148,3029,5358,1133,2991,4496,4476,2240,4932,3701,4146,559,1399,1953,195,649,219,4867,1038,1277,3508,3239,73,3235,1094,5243,4179,869,1917,4851,4798,3895,243,3367,4898,4963,1516,4800,623,3147,2402,3332,3172,1030,2511,951,5310,3299,1746,2130,1221,3461,4277,2037,2413,639,2894,1586,2173,1313,2963,5039,5305,1603,3031,458,1845,4559,403,589,5114,1976,2488,4915,3322,5461,2220,3416,2407,3879,685,5000,3802,714,4318,4978,50,3942,4835,5492,2970,1853,1380,1333,2021,5383,4359,5232,710,308,1292,3152,3970,3329,4897,1163,1734,4029,2716,1662,3999,263,602,3764,153,2128,1406,5434,179,3115,1182,2845,2574,1505,2123,1944,4897,3780,3433,815,763,1025,3238,2386,2634,3326,2517,1423,4942,3450,269,3360,1559,3560,4093,1279,1853,713,1653,1072,672,4235,4872,1660,4242,4195,1521,2213,2628,412,2817,615,1450,3444,578,5050,3281,1135,2242,220,3884,2468,5466,4159,39,3993,2680,4255,33,1145,2162,3125,2269,2375,1711,1263,5301,1172,5283,5525,3277,4178,2265,2580,2326,3538,149,4872,4546,2472,1055,3785,2405,938,2396,2867,98,5192,1348,3922,5448,3863,5078,1341,5238,4138,3112,1879,912,3686,1042,5032,3764,748,4975,4505,3128,5123,5156,4483,4785,4186,1366,5417,1788,27,4654,1562,270,1598,1956,2558,4617,4239,2417,1508,4824,3837,2543,3000,1514,894,3563,1619,2820,3085,5464,5147,3773,3880,4088,4718,2820,2722,3696,1193,2481,2379,4624,2840,4113,4557,3581,660,2812,2660,553,1988,1837,495,4194,267,3546,1931,3448,4934,482,4113,2889,3543,722,1104,4231,2454,4579,2143,1882,4309,5417,4785,5100,5432,663,4751,2687,2863,3965,3675,1675,4275,706,4738,2739,1268,1990,1802,1140,1155,2712,1249,2362,4855,5498,476,5017,2089,3174,2769,1665,2160,1919,2421,2066,3283,1621,3137,5223,1768,5265,3812,1439,2389,4341,2722,3205,3716,1276,1354,4340,5228,4917,2657,2737,3924,3460,2912,110,3141,318,639,1510,4125,4512,5370,2481,4736,2235,5516,1970,644,3517,948,3055,875,636,1044,1619,5084,3370,3121,2876,348,4411,3982,2471,1121,5433,3464,1085,2527,4445,4090,3102,3764,4814,1349,1656,183,5172,437,4630,1340,4337,3898,4284,4111,5506,1269,4649,3582,1159,1160,4477,2757,3381,2414,5300,5234,4063,5518,3860,4065,4655,166,5355,295,5267,2542,3086,2172,2069,2771,3115,777,5003,4183,1033,100,923,3640,5421,4528,4363,5497,3649,198,3434,1158,4901,590,5414,3979,1474,4765,2396,4463,3984,646,3082,5113,4629,23,687,303,268,4650,2237,4898,4091,1477,67,2941,1778,3260,3793,2276,421,2718,4258,4922,4901,2866,4477,4395,1449,1436,1705,842,755,1628,3746,2536,4438,2377,2003,1775,2026,2021,2845,3032,1351,4785,2629,2038,1395,3553,1092,5359,4580,4786,82,2056,791,2931,1733,1340,798,4852,2205,2268,10,3925,1266,1716,5433,2024,259,3135,4689,2118,336,1343,1744,4012,2202,273,512,681,5424,3895,4030,1557,4072,3623,5149,593,1169,3597,2650,3824,3692,1852,1375,798,318,2755,1954,3180,1043,4306,5190,2725,3202,2655,1660,1145,5379,4476,2184,3325,3454,4055,170,106,3767,578,564,5343,3388,1420,2569,2422,4066,4863,5497,1342,1487,5472,2735,5414,982,1128,402,1434,3616,2310,3341,755,1012,4811,2218,2195,3985,4846,3582,5269,5426,2109,2732,4925,2913,1888,2046,445,811,4420,4746,1955,2488,2230,2859,1950,4617,4084,1569,1185,262,5156,3491,4254,2327,1636,2251,3105,1720,3765,4143,2129,4019,5095,4502,2531,4507,372,1564,5419,3484,4549,5010,5425,5475,4002,2785,641,3985,2481,2227,3745,1604,3880,965,2745,980,4842,2003,695,2999,4813,52,1946,2516,2333,2735,4265,3285,1808,394,3602,4846,2926,3510,1505,2246,5141,1163,5445,5473,4844,1167,3921,3642,5220,41,4035,835,3525,4168,680,206,2457,5121,5473,5197,5057,3228,4212,4393,4261,2231,350,2223,466,3449,2205,420,1399,2625,3013,4519,3078,1510,277,548,2141,5074,1956,160,1985,3777,775,3833,1321,1677,4435,4812,3307,1107,1508,4227,3743,2153,1283,3200,3561,60,666,2277,4468,1223,5175,5506,2651,1946,3994,1656,2622,126,4151,3815,3886,2235,3391,3195,2006,931,2321,165,600,2881,3839,1591,3688,5457,1166,3783,5252,1393,3630,259,3445,1196,1997,4602,3339,1903,4487,675,3879,3552,4259,4166,4375,730,1583,3028,1641,373,4528,549,5477,4549,4565,3856,4264,3747,3222,1089,5129,2184,1296,4280,1666,4481,5367,3051,1078,4008,4822,4633,2848,2928,1585,5422,1782,4476,4552,3561,2093,474,326,1596,2409,3991,1073,4227,4132,4865,4622,2975,450,1338,221,1705,897,117,621,1501,4982,4581,1405,3751,5144,4587,475,5240,829,4579,3402,1864,2832,5514,5476,2972,3360,229,3616,3982,2740,4051,3364,3808,4090,3336,5021,5194,355,3438,4120,1959,3691,4849,5213,4133,2697,4947,4044,469,2321,4701,5373,3305,1893,2721,2605,5312,449,4997,5383,3598,1639,3377,202,267,3699,1150,5062,4758,2533,1728,4196,4992,3582,2054,5371,3307,1463,4716,776,831,4372,5239,4385,1116,65,3525,3945,4147,1685,4705,2028,1943,1363,704,909,3918,2646,1786,2249,1791,5310,4174,466,4422,2825,2868,1262,4963,920,1377,2625,2069,951,118,2426,967,1334,4759,2527,3931,1471,2312,1379,4460,1842,2919,291,1094,4638,689,2927,1587,1715,1410,265,2215,3864,1501,762,1132,5051,743,1239,4775,4973,162,137,1366,3959,1564,1930,4263,3017,4245,3797,4446,1142,1271,4056,1862,5339,5360,2713,2284,4179,3239,884,927,4085,4169,889,3085,3872,4064,4654,5084,1308,5172,5346,5186,2812,1164,4031,604,4515,3848,3535,1727,780,1423,4950,3293,577,4882,1311,4857,1748,2211,3179,3682,5076,236,2792,3175,5455,112,5117,343,3809,852,1754,4387,1519,3567,1108,1720,554,58,5134,4676,2634,2915,2053,3994,4763,4183,4209,335,1245,867,2377,5281,3260,3799,2359,5088,864,1813,953,5271,1626,4204,4572,2712,2772,1877,750,5209,1629,2187,582,1439,1527,2247,2168,3013,5233,397,4382,1384,5195,3086,715,4442,4034,5348,115,4215,759,2322,3331,4251,5293,5447,3166,579,2476,1580,4872,4970,3774,4657,2913,2180,3656,225,2236,4858,4007,1452,4434,1284,3227,3395,1404,3852,3217,4188,5139,3567,3425,419,3612,378,1232,3195,1244,3991,4775,4053,4814,1144,2530,2181,2369,5257,1097,7,936,892,3321,4393,129,679,722,1491,3500,2445,2967,4481,4990,2474,2666,4980,2170,3441,5368,1096,3215,704,3640,3391,1106,58,5483,3161,5131,512,3897,4982,183,1937,417,1081,286,2200,384,5096,2963,1493,3024,1729,1679,5507,3827,847,1748,4328,2518,2249,5463,2700,3477,164,3605,3664,2668,931,4986,3839,2486,230,1865,4677,3829,4410,2061,3850,2804,1716,4127,3245,539,4472,3443,5169,559,981,2840,2056,2540,3397,693,767,5183,1839,2779,5356,2014,3932,3725,3785,2209,2216,3411,5510,3028,1045,3039,4271,492,4835,2116,1891,436,5383,5446,4977,1252,4803,1098,2626,5266,4124,2302,2699,2825,439,1562,4138,2629,3294,3406,4444,5410,4873,998,1799,3866,3952,4119,3764,4677,5510,4742,2732,1400,410,1680,592,4597,2682,5137,1490,3070,4251,2549,3855,2957,289,1249,5048,579,860,5039,4408,5268,800,5077,3648,4598,3755,269,2711,936,2430,3730,4209,2595,926,770,430,2759,3650,3310,5123,2040,1555,1130,2393,1154,1785,3404,5361,4488,1220,2536,1765,496,3332,5145,70,2037,5280,4062,4615,5048,1410,4761,3102,5175,1873,366,125,5257,452,1647,4089,4188,425,1291,4943,2313,2315,1858,2145,3877,1221,743,2341,1669,3034,4667,5079,2030,5327,754,4426,3285,1185,3217,2811,3996,4882,174,3118,5510,3508,2015,832,638,3193,1624,849,5146,4149,2505,2299,4237,628,2573,5120,4019,856,1190,2945,646,2245,2321,5029,4935,4347,2749,1331,5218,3696,799,4148,850,4026,5069,2625,2970,4346,3352,935,2,4914,3895,1926,1490,91,4117,4875,2166,1407,1069,4696,4598,3075,1838,4084,2235,2192,554,5219,1851,4210,1489,3271,4025,4752,778,2400,1232,1699,2031,4000,2488,3457,1888,1905,5034,904,2749,5223,5356,1162,1904,1653,3576,1790,5197,4116,3157,4410,1088,602,4471,1040,3827,4936,44,4259,3533,603,4349,3703,3885,4561,4964,2922,3328,889,994,2693,2964,2922,2826,346,1363,883,398,2749,2452,2241,370,3394,3376,4394,1289,826,5011,261,2517,4304,2184,237,2444,2522,1011,2775,3752,2413,4865,171,4693,2796,3751,3586,4324,179,469,195,838,5481,1066,2480,4367,329,1479,3685,4285,962,2936,1616,900,1707,1274,3560,3305,2870,3694,773,4391,2652,5363,1010,4078,3325,1532,5501,794,4032,3566,5359,4015,8,5045,5222,4647,1923,3863,3976,1823,5419,5331,2988,4650,573,305,1729,4719,1507,2154,3259,476,883,4763,5463,4054,3228,2190,4523,3221,2528,4747,3688,1534,3945,4238,5195,5331,4787,899,2210,2490,1384,1844,691,1239,2289,1917,3041,4950,1154,3541,5128,2390,2213,3036,3801,794,2724,3654,2456,4707,5226,4421,4350,4442,2122,5131,756,2651,515,4057,3113,2878,1146,4812,1980,788,3668,3642,5039,148,2618,915,187,275,95,3052,2733,5379,151,1398,1620,2378,2846,1240,3043,3961,2311,4987,164,3445,3027,2985,126,2661,4789,2724,5167,687,897,3194,5120,5495,1181,4552,4969,2473,3040,4408,2481,3288,1788,4671,2743,684,5395,5510,1805,5093,4299,3308,570,797,5208,3908,814,4997,1011,4463,927,605,3135,1520,4570,4467,2224,2795,3553,3484,265,3042,4251,2278,2242,3768,1617,2049,902,1014,3857,1018,4265,2463,5255,303,1247,3029,5041,3216,3650,1371,3472,70,1175,658,2831,4180,2245,3453,2490,1307,1388,3614,4191,2865,3361,1140,983,51,3749,3816,4468,1363,3474,3241,1460,3550,2624,244,654,1428,3674,993,4542,3966,1660,4806,3745,3223,2100,3138,592,4590,5306,4938,4355,342,1676,3164,3544,3911,1247,922,356,2485,5288,3827,4154,3676,1614,5036,4654,5051,2948,3349,1792,338,2069,2658,1653,120,5108,3035,3483,4508,316,26,2051,4032,3625,4800,4900,3146,3183,2268,5052,3935,1844,3675,4052,1988,5123,3481,4182,5439,4631,4432,4392,1887,5044,3970,1291,4286,1740,1789,3478,876,4109,3450,1677,1616,2213,4835,324,4628,1585,1796,2614,1283,2137,1757,3291,345,2851,3267,3173,2177,2168,3905,1439,579,3816,2726,3440,3338,640,297,339,944,1328,3951,1073,3337,3333,101,3423,5015,4000,737,1636,3573,2625,2666,5353,4811,2383,2417,3819,4025,39,4126,254,3756,2645,4303,2019,2963,1668,4496,1725,2384,2108,2320,26,4839,4770,1984,4924,3014,920,5232,1444,1030,4918,2510,402,519,169,2013,2538,4723,2019,5053,361,4817,1156,2774,151,2692,1939,745,4860,2180,1595,5069,1985,5224,3011,2687,5462,2657,1003,4989,2578,4362,2670,5239,2635,4660,3131,4976,3322,4073,4066,4503,2018,1952,1571,2095,5106,2107,4756,1263,5467,2706,3722,3114,355,3088,4926,3680,2746,1556,1307,396,3479,5333,1292,1278,2261,3685,3439,3551,1957,981,1422,4556,4469,216,2179,5180,2793,2000,3530,1457,4223,4175,1471,368,1753,2243,1868,4933,147,1369,5294,1497,1893,2034,262,3426,1859,4796,562,3129,4111,158,2070,3790,4646,4544,1319,2904,2878,5437,362,3901,4224,4687,1390,5066,1731,1652,5436,165,2095,1174,903,2488,3577,4338,71,5005,2325,5500,914,2849,180,3759,2689,3357,4344,4928,3615,1632,5445,4708,4356,3671,85,3127,3704,3173,2078,2816,5088,4854,3429,4,174,1935,31,1398,2625,712,3544,2626,5326,1439,3102,255,835,2670,5457,2344,4625,595,1495,3785,5142,2256,3977,1309,1925,5077,1524,2701,1805,3436,4562,548,3259,3260,724,2661,429,5106,4683,1297,3429,4154,5262,2062,1826,2766,3604,2127,3950,975,4125,31,1147,2383,1439,42,3672,1431,265,1954,4193,4128,773,2364,4596,4441,980,4726,357,2522,5114,3695,4848,2556,1358,2312,1643,884,3833,5296,3372,2469,3144,1658,5283,4496,968,395,3240,3989,5392,3318,4249,2961,748,963,3808,795,2359,2613,4723,3842,5317,4639,4368,1008,4078,48,912,5383,5502,3301,1972,499,1944,3764,2179,4486,2141,109,1196,3889,4099,1944,2373,1894,2695,4466,1035,3267,4627,2596,570,955,96,5417,3158,641,3024,4203,1845,1694,5327,547,1846,2715,4046,1539,1861,5174,472,627,2724,2959,399,900,1250,3947,4349,4315,2319,4576,46,2652,1287,5518,4441,4147,4416,2172,426,595,1210,362,1720,3094,3836,420,3416,3776,4176,4637,4156,3842,4952,1345,4682,1388,696,2773,2728,5251,569,34,783,3052,2329,1958,5325,1666,4619,2585,3628,2236,590,2395,3249,1797,4284,4115,3608,752,452,1724,4349,503,4409,3521,2732,4649,508,3388,4558,92,3940,1651,2074,1841,4520,3393,4896,3970,1699,994,1056,764,1070,1219,1223,2458,1044,2227,3369,4031,5225,3884,4248,2326,1474,297,910,5287,70,4819,4828,798,2473,2075,3146,4195,4855,2529,1337,3135,3164,2599,4509,660,4414,4871,4556,3512,5008,5429,2562,3848,3201,583,5120,1281,2656,425,288,1087,1547,4744,4121,1112,4922,4289,5187,3312,2253,5311,1028,1419,3337,1319,1214,5162,4982,877,1767,4086,5338,2073,1754,4913,2187,3836,5208,3148,3619,4219,3289,4516,4055,1502,5066,4485,4431,3245,672,2845,1003,1433,83,4266,4602,5058,1335,2950,3287,2394,2735,1311,1753,4827,1687,2801,2629,4797,2819,1281,1392,3353,2302,782,5270,356,4052,3179,2832,87,2818,2074,4706,5107,1719,335,5082,2583,3765,1686,893,5453,695,5302,2953,249,247,3154,2904,5277,3315,4694,4674,3809,4604,3563,4228,1900,4621,4443,2473,4574,1707,1093,4063,2046,1107,1439,2370,4815,4249,177,3076,1057,4815,76,2439,599,4396,4848,834,2149,185,3199,4537,3364,1554,132,455,3880,2569,2121,4728,114,1288,385,2023,3205,4673,552,2436,3373,3446,5067,4221,407,3920,896,3466,4190,199,167,5388,982,3475,1800,3322,1401,251,4013,2777,5334,859,396,3420,3742,3085,2924,425,1092,2739,4729,3113,4443,2471,2575,933,4502,2551,3136,2046,1928,3690,3143,4914,2373,4675,1993,630,385,2000,5155,97,2786,684,352,4325,2299,2982,2961,623,464,5437,4281,3460,970,2124,4379,874,3021,4893,941,1736,200,2099,2267,4628,1664,1546,2379,2212,1037,3052,4556,1139,223,4127,5436,3330,4516,3556,3512,1198,4422,4665,1499,2577,593,463,2420,3945,2206,296,3710,596,5358,3279,4113,603,2075,1483,1995,5487,4840,2360,2760,4124,3796,3381,2951,4959,4697,1460,2020,4475,5355,5316,3552,4317,333,2959,3707,2382,1183,3836,748,5469,1026,2061,464,4313,4324,4212,774,2528,162,3611,2439,4991,3574,850,4320,5280,5258,3652,5115,2530,2774,1111,1260,4853,884,4237,5101,3918,1118,2823,514,4807,2401,4529,77,4012,4405,2675,3760,2435,3222,446,440,3237,1421,2772,3049,139,4321,1264,3663,275,1868,2203,2253,3445,1927,488,5315,2006,3311,4785,4199,3681,5085,5079,3423,423,2916,5447,2001,1867,2576,1971,3605,2705,2851,269,4738,2153,4758,3831,508,578,435,5013,1543,3630,4738,4418,778,3301,1440,2431,5377,4201,3196,5390,3136,3194,1629,2291,1566,278,4553,5161,2022,2476,2767,5463,1534,214,1341,4746,533,3229,2218,2394,2410,2011,2505,47,1657,108,344,2576,1491,814,3549,4136,4215,4914,2350,2916,2669,1392,4552,3744,5225,3187,3764,3868,4121,2859,5428,5369,4354,1451,303,4473,598,1333,1649,1571,895,3477,5340,4274,2865,3465,2579,3748,4249,1512,4226,283,4509,735,750,1345,5363,3563,4423,2267,4355,5432,252,3332,627,1960,1292,2617,1288,4139,2097,2164,58,4529,2400,1595,3208,5504,2710,808,3132,4136,774,2368,3567,4641,5480,212,3384,3001,2560,3534,2583,2185,5096,2026,1786,1005,4484,4306,4087,4911,5057,4969,1537,1962,3837,3646,1010,3104,2536,880,4412,1244,4163,685,5430,4262,2258,5314,566,2812,463,4804,3327,3883,480,4659,1041,5225,1948,379,495,1307,3534,169,1040,2325,1813,4314,4693,1665,5067,2033,2586,4258,5293,5176,4055,5187,1991,492,360,759,1828,1221,5439,3117,2986,1460,1247,772,1843,1845,1394,5362,2242,1564,2233,2939,1454,4838,2530,4157,3037,4873,2686,2820,2009,4795,2977,4577,3010,2564,967,1,4142,4274,3330,3174,1995,295,1398,3778,1323,3466,209,427,3054,321,2937,2297,135,4983,4580,913,1761,4542,168,3469,3218,825,1755,4161,526,4006,4391,4621,4136,4858,3873,2088,2079,191,2501,261,4286,3987,2101,1164,2048,4152,3488,1127,3725,4970,142,1867,2814,642,5523,2907,3789,1173,4433,2393,2128,1375,660,2604,3809,2229,3504,2865,3660,2820,182,5455,5127,2216,4975,2610,1881,2941,3102,419,551,4907,2582,5324,2148,3155,2501,4940,1502,3020,3979,1358,4470,803,2776,4672,4718,4746,2528,3271,4440,3607,1443,44,803,4223,5239,2903,4409,2072,2705,221,3132,2021,5222,1122,5416,3771,311,1816,5404,3005,3332,3644,58,2309,1313,5430,2621,16,3196,2476,3888,1346,1263,1978,5158,1813,2438,1492,306,2655,167,1387,5150,2491,5219,2833,3217,3672,2116,191,3609,25,1176,2659,2252,2456,1000,2184,4909,3628,353,1771,2321,4741,987,4523,1101,5018,783,5112,5056,2769,5050,4391,1636,2157,1380,2014,4788,1661,3283,5136,1462,565,3589,5316,2065,1481,3205,4575,1824,3066,3660,3883,3933,4044,4896,211,4613,4167,3549,5337,5065,4049,3515,212,2612,4400,2978,5436,1895,3290,505,1590,2559,1704,3441,3161,1450,2311,5180,3358,2144,2620,3384,1861,226,2380,5430,1819,4227,385,4610,3208,2740,3707,148,1395,4345,5117,1947,2852,1478,178,367,427,1487,339,4852,2951,4796,5094,2801,4985,4730,3499,467,327,4397,1508,5079,1726,216,4136,918,1897,4885,5456,1925,1469,3175,3307,396,3041,977,2350,1965,2954,4202,199,4991,374,1230,3177,1926,1148,2683,803,1080,4234,1648,2301,1299,1767,2302,508,4272,4393,1042,3218,4300,1331,658,3846,3857,890,3911,1676,3771,2119,1578,1439,2347,1161,3604,4325,2714,4139,5184,2413,5310,3032,1559,4443,302,1822,3525,3240,2406,3777,2797,2411,1180,2671,3050,1820,4737,3213,1312,3704,473,5303,1724,5012,2525,5055,3914,4194,285,3151,618,3831,5122,1964,843,4936,4819,2283,818,1771,1557,1057,3923,1290,5234,2049,3489,2020,1875,1220,2329,4104,2816,1777,1515,831,2036,1040,2037,2303,5361,5048,1298,2139,3528,4423,2215,4037,1484,5182,2602,5396,3163,5284,5092,4945,2630,5049,4261,5521,4973,505,1441,121,899,5145,1953,3025,503,1226,232,818,1517,4773,2167,4292,4418,1427,4527,2710,699,4462,594,5342,1419,3722,584,1273,5261,2774,2014,939,156,3261,4473,2275,2456,3198,4564,2353,244,2900,1345,5347,3277,1597,354,5308,2683,3509,5056,412,4082,5073,5278,877,2979,4345,441,5385,4134,905,1161,4925,1848,824,4815,1826,4902,2395,2052,4890,3955,1193,2977,1395,2540,1708,2350,1230,4099,180,998,5506,3736,2838,769,4485,5240,670,754,5441,941,3578,1752,3304,4187,632,2828,3493,3018,4487,739,3460,1039,4510,4348,2425,1943,3883,4114,1916,1852,3734,889,261,1836,1655,5073,1817,3807,271,2492,305,5271,4419,1218,2619,1563,4800,2338,5254,1001,4000,3647,1797,4260,1706,3901,3864,5305,1142,2657,3464,5164,3248,4945,2151,3452,1860,2029,2747,2233,4890,588,4930,1885,2422,2870,5430,2429,2065,2391,2133,2798,3683,400,734,940,3731,2164,262,318,3908,85,3271,72,3085,139,2314,3121,1463,5405,4878,837,3094,3089,1632,657,4721,2826,5026,2264,4091,2897,5040,1127,4242,3720,4041,5447,1854,5222,1837,2848,1852,1508,1329,2016,1883,916,3227,3799,1531,2774,239,751,4,2570,4344,2319,1896,1988,1652,316,3746,742,3584,1281,296,69,3583,4038,5403,1242,3652,1243,1006,5266,910,1194,4068,2880,641,2702,3044,5421,1557,1781,427,3337,5232,1478,1606,4976,1782,199,2462,3700,2587,5240,3518,154,4210,2043,4254,39,430,1144,2944,4180,4946,2307,4823,1526,764,330,1084,811,2470,4104,791,3285,3841,221,5004,2571,3430,1157,2079,225,34,763,3831,2578,4847,3251,4119,837,697,2058,1005,4613,4303,5493,327,5109,4874,3721,4363,879,822,2098,3455,2172,5136,294,4708,4092,781,705,5012,3575,5410,1289,13,4291,1135,3649,4003,474,3012,2635,979,4978,2438,712,1588,3411,1188,5143,4768,2853,3182,1291,764,95,3948,4041,4665,2099,5346,3076,2725,604,5005,553,3553,3621,1837,2621,4293,4139,2283,2382,4286,1669,2630,2445,2597,618,186,5347,4278,267,3530,5439,2917,2760,2221,2525,4688,405,4941,1643,40,3047,3641,2732,3237,2636,532,1194,4124,3828,436,3752,1915,3124,284,3651,5292,4881,2166,4550,1319,4418,2714,3099,5065,3186,4443,3449,3028,1950,4003,4150,1232,184,3381,3508,2103,4569,96,2896,2685,4247,4748,3655,4246,4478,1053,2847,3764,3447,5442,691,1168,3215,2745,186,2478,973,2101,3420,4252,5481,1719,4514,5283,1668,804,410,1552,3536,5053,5053,1802,2377,3518,1643,3741,1483,4123,5198,4597,2366,5160,2556,3077,3369,4409,1736,5484,1262,1713,2141,3248,2781,861,5391,174,4472,738,5485,5506,741,4117,988,4433,1086,2122,2068,1694,4599,4364,561,2002,4419,4794,3043,229,1270,2079,2574,3465,125,1267,2341,818,1737,5186,5168,4850,4194,1974,4200,3161,3814,3353,887,1997,4301,1314,3726,4667,3915,3302,2249,2416,4072,1622,2659,3479,1881,3956,758,129,4612,5400,90,3757,2119,3530,9,3236,3069,122,4380,2675,1668,2379,2256,4406,801,4363,143,3534,2756,1591,4786,3686,2003,3095,2874,929,1897,31,3041,293,1601,3309,1567,2226,1429,4877,462,1790,3982,5020,4622,1004,607,2395,1090,4341,1383,1554,4187,107,4716,4148,2549,2431,592,5390,2756,3307,4582,3501,5343,1617,1940,2702,271,688,4119,2534,889,4648,548,3885,884,2008,5068,4244,4356,2635,3106,4994,917,1109,2554,1832,1595,4824,1919,2717,727,890,2948,285,2550,4702,691,1055,4699,5065,1175,1765,4366,2276,4492,4003,2004,3467,3402,1600,1089,662,4,3506,4682,3073,4568,4349,343,4239,498,3523,3902,2592,2500,626,5464,4240,1224,1658,2005,5513,309,1087,4795,265,444,5050,5035,516,4524,3188,2671,1951,5388,3359,2568,3133,4881,4961,965,2001,3653,4590,27,837,5011,933,102,5355,2316,3214,3387,4352,4925,1149,1864,2238,367,989,3590,1652,3984,4751,2237,2594,704,4592,4222,1825,1548,4980,4615,1461,2987,1247,1007,2680,3125,1392,3025,4550,1883,78,2413,5227,1397,4922,3604,3529,3792,3317,680,2986,5439,615,3508,1270,2533,5169,2519,4176,4567,2652,1799,919,3960,3168,4836,3903,4502,476,4789,1252,3851,5260,4755,1835,116,3712,1138,2686,1269,5059,1046,1327,3220,2209,2959,2905,1600,1050,5228,1896,1316,492,738,1364,4640,4915,1938,2419,3287,2920,2570,1295,1092,4053,4935,4792,2630,1203,3081,5188,1703,1810,4998,1204,4295,3607,2392,1816,4761,885,2188,4410,2746,3502,5105,3715,5371,2258,3035,1663,1696,3347,1471,867,909,3992,857,4680,5335,5421,4861,4117,957,1769,3261,3983,4156,3296,3797,3923,2697,2625,3891,5244,5108,617,5350,1106,4353,779,3852,524,4970,449,5282,186,2303,3184,1443,726,2688,5418,1119,4113,5002,1234,4458,4530,4527,2013,1688,545,920,1094,4987,266,1523,1009,4867,4728,5478,4230,587,1935,4620,3645,2852,253,4466,460,4297,2211,4770,5133,5479,732,1916,1732,3960,5140,269,849,770,1267,906,2557,2173,2062,756,1906,1061,1718,4831,818,669,3512,3988,112,2725,1529,3698,5132,285,2850,2768,3548,895,715,830,5262,4403,3526,925,2925,18,3622,2011,4082,4318,506,2253,4073,25,1820,1117,682,2646,1530,5261,5397,2449,99,3979,993,1461,2534,3673,3675,1354,2896,1895,5160,4489,1399,88,2939,1161,2708,2477,3167,2912,5368,161,5352,1349,1951,2003,721,630,1239,3429,4336,3373,3053,2539,1967,1659,3405,975,984,3494,1631,1345,2885,2230,4372,70,4749,1729,3410,1963,535,125,4721,2113,4922,4541,1204,4813,3007,1148,203,432,2265,3107,1797,1032,4451,3557,4370,2468,188,1315,3714,1124,5215,4218,1906,3250,1477,3561,2687,850,820,2127,2183,630,4281,862,770,1041,1217,2607,4929,2363,1664,4486,183,4528,3741,4654,491,4845,3145,3781,3605,1802,740,1314,2821,1149,2423,1381,853,1742,3135,1455,1937,851,1020,4195,1501,490,1763,2271,5314,751,4997,973,3949,1150,879,2642,4003,181,1700,1151,5290,697,5032,2435,4126,501,2298,3745,2484,4765,3274,4522,2453,3374,4228,3947,4633,2932,2448,2883,4680,2165,4255,4349,3988,309,5073,921,4187,2324,93,2797,2463,5266,2292,2607,1449,4164,1005,1006,2355,421,1183,2867,1898,1499,5291,4327,614,5426,5450,4399,2171,1480,4794,5449,3074,3945,2622,4883,212,4245,2080,4137,3304,1382,1279,3488,3183,2927,3749,2105,1359,3110,4847,2339,5446,3163,448,3359,4592,5350,3164,3089,2217,629,3355,754,1164,2360,4435,4151,945,3577,4081,268,1680,4143,4398,1720,4911,1789,3957,467,922,4479,3359,859,5280,1680,5104,3279,4925,4867,81,1742,4628,1624,4200,3296,2743,2209,3352,455,2722,4042,2877,2197,1265,2526,4127,3555,2842,2068,3248,4483,2478,5338,3727,367,4399,3087,1672,1755,997,4462,893,3928,4270,3140,5413,4834,4154,4439,3042,1626,1550,4763,2837,2543,5342,3653,2644,5327,3641,3650,187,1788,4400,793,2262,3212,1676,3973,5388,1511,2406,2854,5337,1909,2820,1672,3752,166,4279,3131,4162,1423,3523,1218,4389,4642,2136,4907,2110,1136,5461,4561,3251,4661,292,2629,1405,3560,677,3672,2765,5022,5465,901,2214,742,2307,754,171,3851,2973,87,253,3321,2227,260,3731,5098,5393,2751,3922,2240,2590,1484,3644,709,767,1700,5266,3904,5076,2200,3116,2180,1204,1668,169,1975,3697,1886,5065,1799,3774,1017,1916,5296,2837,3688,5177,618,3148,511,3022,837,3521,3032,5221,4132,2560,1466,2171,5204,1347,4513,2917,4772,2706,1991,247,20,1581,2868,777,2735,3353,3864,2867,4543,3720,3330,1909,2530,2158,2024,5075,4892,3758,1138,2081,1891,2449,3209,4133,4217,2986,1242,3481,990,2690,5409,938,555,1624,390,1952,2930,1875,3620,1253,768,4922,1919,3562,3092,238,1336,1902,5167,95,4167,691,1896,3950,1572,4944,2064,4941,1233,1088,1096,1599,5292,3584,519,3700,2182,5477,1560,1012,5345,5076,1720,2831,2932,1813,5055,3935,4931,693,4910,4456,1622,423,966,419,625,812,2441,3127,2017,996,1129,5096,3363,3692,1083,1737,5105,4940,5384,3359,67,1666,1440,1766,3136,2351,2644,27,565,2352,3886,2940,2915,4249,718,1818,2887,5203,2696,5524,3667,4632,2536,503,393,1646,158,30,2690,3459,3535,2392,578,401,1961,1467,4106,187,2489,1280,4648,1461,4148,1157,1163,1521,4856,2354,4994,2398,3451,1350,1770,1165,2378,2984,1645,3279,3125,410,2589,1509,3228,3496,4697,1573,784,3416,264,2789,701,4830,109,3732,1503,2248,791,4108,3942,1967,4036,3057,396,2579,5083,4655,1268,3929,1088,1673,1606,131,1192,2678,42,3937,2191,5433,1711,1414,3239,546,4886,4031,3321,4069,3285,5003,1854,273,282,2331,5220,2443,2634,2331,2531,2645,4910,4862,4518,525,3557,2918,721,3824,1435,357,3059,3237,529,3257,5247,3901,4392,3216,2591,4117,2459,5251,366,1175,2847,4948,1078,4022,1595,3966,1884,1711,3482,964,557,2124,4450,1036,1322,3062,4784,410,1561,3544,3912,1290,1512,1799,2690,3799,1727,1770,4104,2993,1247,1381,2888,2639,5158,4042,1042,308,2784,2427,4242,2319,2114,2989,5481,2015,2779,5415,4838,5078,616,634,2894,2232,3822,4860,2131,580,2173,1130,3865,1589,3591,1137,3438,2804,4432,2080,2847,1935,4499,2292,1041,2513,3937,149,3381,4596,4256,4295,3280,434,129,2944,4829,3000,108,4545,5452,2895,3035,5319,5285,3409,1117,212,5110,764,327,4005,1706,3415,4421,5432,5409,1862,4343,1219,2487,3842,4970,1909,4111,789,93,4840,1382,5375,1362,1134,1970,2729,3362,3165,4082,1735,1885,953,3485,4257,4158,722,2650,3528,630,2317,4262,3755,3541,2943,3191,4711,131,4257,593,1861,4437,2875,2631,2180,2461,5358,2490,1608,1921,3897,2892,4114,3374,3497,1399,4334,3642,2662,481,1481,2703,449,2376,5093,3860,3717,2504,828,4886,1732,2029,4213,3440,240,3332,1481,158,4448,1649,1578,88,3402,3686,1869,4679,2041,539,2168,1078,3379,2358,5061,2377,79,3872,3357,188,5205,2752,3605,2386,66,2061,4244,593,4030,4309,3819,2801,1886,3341,350,1508,3334,2975,1145,1281,4625,3369,393,864,2861,1899,4247,3148,4413,979,2724,5024,2341,2640,4653,4291,3700,174,4882,3650,4058,3954,2546,2053,2685,515,3629,4678,3044,3045,1411,619,32,188,2269,770,4039,2032,98,1728,796,5298,4593,539,3911,1316,2231,3259,4514,3734,3571,3505,3109,2909,4348,4615,3477,3751,2161,1676,2036,4074,5438,5372,2024,3002,2189,3620,116,5495,3390,4320,4972,2156,3609,3284,1858,968,3156,2377,3013,1001,246,2633,2766,2085,3524,2023,516,3709,2264,515,2536,3410,3283,4962,2739,4325,543,5492,4751,1506,4343,2645,5067,3834,2485,3539,404,154,4890,1425,2333,4005,4137,2638,316,62,410,5,5062,3718,4661,4611,71,1669,3326,2690,2546,781,3068,4394,1205,962,1371,154,3460,1653,5184,4502,5115,1424,2681,3714,4029,417,3464,491,3561,597,2764,2975,1586,902,876,5088,4305,4659,2869,3683,4715,5222,5362,1102,1525,2211,1542,1271,3589,3422,117,419,2603,862,480,4495,3749,2507,4924,2427,3183,1960,2690,3709,1702,2920,5082,2245,3142,3501,2446,4167,1079,2226,3515,3436,462,2177,1116,3879,4411,3319,4095,870,5203,1148,4505,3471,1767,4185,2895,5290,2287,3620,2571,4921,4201,5012,2971,2614,256,3571,1612,264,4888,3925,4059,4256,797,875,2287,3596,984,3436,5390,2803,2959,1307,2381,4610,2208,2973,4176,629,3112,5337,2125,5482,1059,5129,4521,278,5282,1842,2297,2961,2974,3958,2973,2861,4218,2347,632,5117,5134,553,3111,3924,5007,2748,5454,889,210,4311,672,5,4533,1737,3625,2848,1474,4612,4317,2637,2308,2375,3735,2007,3517,1621,4976,5103,3674,3687,2981,5498,628,1417,5328,3849,5013,945,4452,4500,3119,4151,5359,1961,4782,1080,1061,1534,2459,753,1477,181,2821,4248,832,2010,4237,833,1699,3122,1296,1562,1880,1435,1204,2408,3284,4747,4786,2254,3833,579,2877,2411,2309,2424,4767,1123,4860,36,4863,897,4527,1221,4125,1693,84,4356,125,2575,1720,3886,4630,3666,2970,491,3892,2638,2454,3103,189,3632,65,4651,3251,2688,2114,1740,2937,403,4535,2143,2055,4033,987,990,2264,2537,5078,5230,4511,2353,4710,4315,3900,309,2369,3230,3948,4854,5459,3866,1163,3501,2745,2146,4137,2754,3709,499,859,4012,2349,5331,460,516,2794,5283,3133,2997,4426,678,1961,5399,5388,1367,1104,3862,3863,688,5358,271,3458,455,2803,1161,4279,3112,265,1611,946,5190,5522,1383,1723,1208,3079,1236,2069,660,3655,1982,2050,974,1714,374,1029,2316,4020,1553,2591,2966,2859,5025,1787,2540,2450,2364,2840,1699,4967,2125,40,5446,3292,2055,1826,1471,4863,4977,3274,346,8,649,1098,1519,304,1032,2907,2295,5007,3930,3488,1758,4983,4541,2107,2612,1548,3688,5111,4871,4390,5265,63,2168,2121,721,3636,3422,1954,487,0,1283,3412,670,897,5020,4980,3339,3120,3191,4510,4574,4653,1790,5,659,16,670,2281,2140,912,2995,4557,3128,251,1244,773,4273,2075,1988,690,4479,4242,5148,1910,1690,5469,3441,1424,5492,5319,3185,3055,1443,1638,2501,2880,2199,1066,5209,1541,3251,3023,2350,1381,4783,4959,4753,4633,2802,2634,1379,5483,2158,1841,2413,4978,952,2916,1326,2823,4537,5472,1633,3790,207,4974,3249,4375,3246,2623,664,4947,2840,53,2000,228,2745,401,3417,5247,4608,5079,5359,3711,364,1976,4225,3967,2188,2390,4598,1639,5003,4344,5414,2040,2521,1828,4319,2140,4823,1434,4373,2637,4649,2998,1985,4649,932,4890,2190,4313,4921,723,1347,2556,4085,951,2204,833,2257,1160,2999,3653,1736,4042,3726,3819,4283,2694,2972,5188,4753,1118,5421,792,1959,3649,1406,435,4369,4103,4184,3898,5072,1721,80,4874,5385,4100,70,3465,3071,1553,1935,1814,4257,1369,622,2593,3478,2936,5433,4339,5213,2969,2862,2230,1586,4792,651,3930,4129,635,3194,4646,1999,2327,437,2630,25,625,4762,4679,2257,2579,2729,1262,4950,5193,5428,2079,1000,1184,4664,5374,3446,1015,89,1250,666,4242,382,1074,3587,2280,2515,3477,404,781,4511,2702,286,794,3835,1903,1829,3345,3378,106,4281,5203,4099,1822,4286,5482,316,5002,4859,2588,103,5048,4526,3310,1285,5137,2748,3083,2142,3678,4465,628,1791,2682,4143,4778,1067,1697,1300,1469,1015,1241,3173,898,3243,3939,4727,3156,1491,287,3593,4810,5347,1347,1168,2515,1788,299,2790,4086,5,4390,959,4559,4767,2720,339,4924,2549,3894,2973,4897,3881,5495,5413,2745,1976,3320,5235,3562,1623,442,972,3171,4592,149,3948,4467,3151,3273,4345,1126,1713,1573,3797,2986,3734,2919,3794,2199,1992,4419,94,3195,4993,1019,1727,1016,3443,1082,39,4908,3969,3097,3338,3265,1550,1889,4377,964,3896,2854,1958,3074,5043,714,3200,3949,1282,1441,3708,4163,4588,1546,4798,1539,4037,2607,314,3573,4140,2408,1085,1647,3971,972,4468,1523,961,738,3512,4297,540,1132,4586,1582,691,1420,4958,3802,3350,5047,2028,5241,851,3688,2124,319,334,4476,5073,2812,769,3,3554,5374,3339,5451,2486,3846,2078,3314,474,567,847,4844,340,221,2749,425,1724,3829,2572,262,4524,1391,508,2584,4320,1578,3078,913,4699,5307,513,3999,27,2772,1716,1303,2349,601,3039,1113,410,2068,3990,5100,4228,3526,2160,4155,1292,2786,4753,5201,2923,4784,1548,4842,1375,5358,3262,1571,2829,4877,3598,1692,2435,1496,5122,1065,2327,2632,2154,2016,569,25,3003,267,2237,4556,2504,3299,2377,4195,2984,1200,5337,940,5399,4086,4984,165,3288,3125,1599,1689,2181,485,1217,2588,4733,4218,3963,4116,2653,1379,57,3655,5234,5012,4951,4634,1576,3121,4545,895,2559,1254,2535,3060,1562,2533,3680,4598,1797,635,5323,2223,3064,155,4286,3980,2097,2237,4100,3462,351,3791,5431,1047,51,4900,1129,2169,782,3192,759,2370,539,5011,1363,2113,192,4603,1814,4622,3371,1970,3504,1503,1527,589,1707,3614,4962,2030,2146,2211,3418,4250,3410,3783,219,3886,5442,3755,3082,2314,122,894,2868,5455,4361,4383,3079,5160,4836,472,3413,4520,2262,5139,2321,1424,1851,2262,903,2698,419,2266,2569,2727,1125,1585,4281,4265,4697,4051,4589,3832,4411,4369,393,1502,399,1250,385,1301,2279,2790,2790,1758,772,1766,2647,3272,4123,2339,2620,3114,4662,2966,4700,4506,3041,3756,5356,1927,2000,3311,4866,2391,2496,1694,4618,3283,4767,3297,3107,4041,3769,4663,4264,1636,3699,2575,3550,3880,112,4649,2182,1899,1050,1166,3306,4925,4695,1884,523,3337,4436,1220,394,3894,4224,4136,2279,2381,909,4853,1194,2369,914,3741,724,5291,4961,5365,2976,2209,3541,1205,935,1006,1688,4727,635,866,2500,1913,5368,4489,4830,2676,2741,2145,4950,22,169,2292,2984,3843,2302,1244,4051,2786,5461,664,611,1720,1181,5342,562,887,2851,5471,14,4420,4436,455,5287,2588,2691,1770,3847,3275,5309,1466,2805,1002,2110,1281,5048,5502,2286,4986,461,925,3001,4825,4454,4433,3470,153,1639,2997,3742,2690,4900,4781,2022,2020,4343,4371,3156,4457,2466,875,1599,677,4039,4305,3156,5018,2202,130,5123,4621,716,4396,2425,625,5071,610,1551,778,2692,88,2294,2860,1260,419,5089,402,5525,3130,4602,425,2033,3813,1799,3465,2928,1167,4073,753,5257,1313,3202,3001,1527,1135,371,4828,1549,733,1407,3168,2128,3080,1776,1522,7,215,1741,2576,2809,4556,954,4086,1549,4231,3597,2726,5000,159,888,2609,3504,1152,4252,5256,1070,5203,4066,1822,4813,4068,5235,1549,4459,2820,5335,5427,3197,3677,2065,4644,2735,4973,2749,1613,5026,4793,3678,4528,4467,2565,2392,2004,283,237,2205,4904,4448,1249,5246,3758,2364,2148,2802,4925,1629,1635,2161,3940,3461,4202,1315,2884,823,1097,3122,3536,2540,311,4858,287,4989,3799,5299,1830,4987,1772,228,5204,2115,1684,4027,1289,370,1864,5090,4302,4850,2365,2796,3588,2021,2129,1393,4006,5027,86,72,1930,390,2734,512,1423,5423,3789,4853,2669,4798,395,3345,889,5090,308,3277,2066,1308,1814,3539,2017,1981,4843,2001,3151,2159,2344,2594,325,232,2616,4389,2765,1057,4679,4143,912,3490,2927,3157,2614,104,1800,1849,3307,2645,5363,4183,4114,4415,3992,1655,3492,1209,486,1978,2926,4975,3013,2191,4448,4552,5396,1276,4158,4209,4909,977,732,4591,1067,2587,15,4736,4508,5413,3854,1979,4245,1097,1112,4876,2385,2394,4593,325,3611,3731,1582,2702,800,115,3542,433,4491,2296,237,5438,2429,3488,4302,2777,2231,461,3207,4105,3438,346,2257,4744,1978,3942,2004,3641,1970,5416,417,3328,4969,1225,3948,527,1649,4980,3965,2713,2751,480,4833,3558,3760,4733,3672,4496,2507,377,847,1740,4637,920,1288,4445,1819,5123,4502,4353,2256,852,405,3092,1919,4033,3850,2646,754,3750,2183,4918,2079,3393,230,2858,3789,2588,853,4768,1241,4174,2396,4703,1767,1286,2006,3577,4252,1198,2777,4380,3666,487,2819,1591,405,1156,3217,3670,3374,691,2266,4538,2773,5484,2175,714,4665,2774,1227,748,1571,4114,391,860,5157,5370,4055,3645,4864,605,366,4424,4496,5475,3652,5212,4169,295,2387,5002,5160,2470,1384,1464,2680,4843,2199,2536,4211,2397,3045,1664,5362,1193,4154,847,526,2471,3274,1111,93,3087,3913,1225,3882,2511,2695,861,2870,1389,3891,2011,3008,1029,2036,1518,1515,3907,774,812,4874,4812,5275,5285,488,4493,3691,4766,406,1344,629,1963,700,3663,5284,960,2375,4018,4967,585,3180,2942,5154,2332,4565,485,3251,1817,1863,1596,5253,70,2545,5436,2718,3939,1119,4866,3022,1733,5173,4660,2492,4071,4045,1859,763,5239,882,1680,697,4273,5,5199,2803,4842,400,4652,2477,4348,81,1739,5414,1387,1020,747,4921,4643,5394,3872,2306,5183,1690,8,1429,4187,4945,1675,873,4620,444,350,3699,3497,4291,445,1662,4862,490,1552,956,4532,5298,4181,4422,5058,0,3151,3324,4424,1039,5119,4904,5276,4318,1878,443,4062,2400,1584,4543,797,554,1104,2704,2679,2380,3605,466,4344,901,1313,4106,4855,622,4358,3889,310,4960,357,4583,1166,2126,2191,2140,1686,3303,1600,4050,4548,3842,3473,2868,1959,1772,4173,158,3449,1388,306,4452,3559,4899,775,3482,1688,5333,1207,231,1086,1304,397,1438,647,1767,2050,5209,1305,2852,3172,16,249,4168,5482,830,74,1188,3050,4447,5125,965,5209,281,1805,4342,439,1335,3599,2740,3147,344,3989,1941,2520,571,1352,3416,865,545,1047,798,5391,4100,3076,1195,4535,4450,1784,3662,1603,4344,366,4090,5384,2444,3908,5349,5504,1246,3784,2578,1785,4217,4941,1143,4783,4583,2524,2363,2804,5073,4599,4643,3901,757,5435,1854,2375,3894,1128,5226,3304,2694,3909,3548,1636,3310,925,3930,4167,24,2216,3001,2387,4820,4547,3208,5167,3991,4991,2525,4591,1942,5016,2581,5129,3522,476,2063,2837,83,198,55,2005,2875,5087,2389,1855,3504,4745,611,150,2288,1184,1330,4640,5280,494,3627,3610,4456,4026,2461,3314,5353,4768,4901,3981,2683,2173,1146,1053,45,1216,1015,4828,4479,3968,2222,4797,2672,3574,5303,4168,3748,3583,531,2187,998,5193,427,1135,2214,4054,5097,3022,152,4913,651,507,433,4532,1310,1370,1907,4598,4008,2066,895,4018,573,2543,1348,4841,3940,4608,3320,1748,585,114,3970,3414,4867,5272,4593,1069,2900,1993,2466,4804,3152,5424,2993,1766,5273,2325,2947,558,4687,4408,90,1141,5115,2927,2494,3205,1996,5443,200,4989,191,5125,1420,85,5244,663,4273,233,4078,227,1737,4604,1886,4730,4654,5394,595,5172,2777,1035,1106,4417,2914,2952,1956,147,3434,129,3669,4925,385,338,3786,2841,1717,2909,5352,641,359,4175,3197,4508,921,2043,2609,3840,5202,769,1016,1676,5108,1534,2605,4506,3086,4470,1979,3717,3060,1889,790,857,1539,2195,1329,1306,1012,3940,4117,4899,4360,2685,4296,3331,2899,2878,5069,5523,874,2145,2888,2654,1496,2559,4293,2349,2811,3579,2303,1907,4547,2123,1647,2962,4032,1945,802,4545,2724,3332,5420,152,531,2346,5019,3756,5306,266,3900,265,4130,2640,458,1924,5027,4228,731,1981,1927,1398,1948,4623,3888,2096,1653,1048,695,5337,4841,4438,3455,3572,2057,2746,3342,2377,4952,1153,1053,4556,5318,106,1806,5087,2264,4794,1140,4014,2461,4427,4032,2137,4431,4060,945,473,816,2999,4362,269,1979,111,5174,3323,5193,5320,4318,3848,3141,844,4801,3624,5144,3509,4232,5402,382,2052,4673,4026,1684,546,1963,5171,2772,2780,4345,3451,5226,2962,1374,1976,2353,1811,1046,4720,42,4431,733,3301,1818,2107,2510,2271,2310,4909,40,5396,3911,3371,602,5452,4331,2024,4018,1302,3062,284,251,3233,1772,722,37,2552,159,5113,5325,1286,5146,5342,4334,2191,1957,5005,1789,2649,677,1506,3969,2804,9,5342,5083,1535,3169,2052,2073,2922,852,2932,1916,5115,194,2739,120,5091,1922,1041,1594,4,1265,3406,2525,940,3209,3418,2547,3590,452,1019,4751,2334,3222,5193,1173,3663,1772,2930,3290,510,901,513,719,4612,5461,4650,2700,243,1456,1504,1020,1152,2996,5262,2144,1823,625,997,66,1962,3204,437,2370,719,4202,4581,1549,4650,869,2197,887,1921,1315,5387,817,2766,2947,340,3838,4815,4478,3685,3701,3657,3967,4959,2992,2213,644,4113,4645,3250,1312,3417,4448,2600,2973,10,5182,4930,258,1605,1204,2622,4258,4500,3936,5161,3169,1579,4327,861,2676,2686,3871,2403,3107,1937,3325,3877,4515,5123,4139,4128,1357,1412,650,2677,4683,2306,1387,135,5333,5188,3860,213,1893,5215,5482,599,3043,1720,3037,21,3388,4363,1335,1267,2125,3756,2308,758,937,1635,3517,3617,1141,2480,1282,2449,3122,3400,1673,2387,4336,2621,1186,627,2253,239,5507,5257,2684,5410,940,1376,401,2977,228,2599,227,5514,4353,1355,1647,5150,5162,4753,4261,1422,5505,2007,2512,233,4643,2984,3365,2358,2020,782,226,4765,2697,5474,147,4944,1278,5507,4802,1612,775,1723,4558,3296,4516,1497,2549,2305,2400,464,5268,3581,3646,4741,3577,783,2734,3625,5240,766,603,108,1053,4226,1625,2084,708,3366,4106,2405,2469,2194,1120,2883,2797,2813,1503,3900,4193,569,2354,1824,5081,3663,147,1103,5068,3152,503,4736,127,3039,2572,4252,4808,2548,5344,1856,2266,2301,4407,3042,823,5115,4065,97,5169,38,3155,2526,1192,5317,2850,2507,4669,3998,5249,1545,4575,4593,769,3527,1765,1614,2599,5459,3230,4969,1442,2459,3924,2745,2208,4565,1550,5000,3119,2984,3593,4990,4453,5387,5180,268,497,3109,742,1671,303,4496,3375,5167,3080,4114,3171,674,4345,470,772,5289,3717,5373,2112,1434,2762,1680,4902,4866,2637,858,2527,255,2396,3709,4189,4535,663,2721,3788,1290,1378,152,146,4691,2021,5120,1449,1037,5412,2606,175,358,2036,4545,2484,4050,934,2771,4147,1182,5152,5190,343,608,3758,3350,231,1400,3897,1504,1985,3280,4399,2484,1010,3235,1042,3711,645,5176,2809,2150,3483,2701,3128,345,3591,4831,1600,1815,5050,1357,404,5289,3373,4393,5432,2799,2591,3160,4064,633,2425,713,1176,4798,3907,4810,3577,2502,2651,3920,5261,4163,3827,3091,388,2715,3035,5457,2710,3968,4706,409,5380,3413,1197,2558,1905,3885,2193,1415,1484,751,2209,4073,4251,1477,1851,3537,3443,4856,1969,5455,142,3993,2228,443,1758,2796,4072,1745,3487,5040,2480,4457,1372,1996,2057,3534,404,926,1470,2072,4034,3157,759,4931,2759,2416,3263,4227,2467,2798,4999,2572,355,1850,884,636,2096,3725,1972,2725,827,4754,1752,403,3016,5346,634,784,2752,372,4724,4032,3433,442,4788,1711,4337,600,92,2192,2368,649,2005,1277,342,423,4361,4581,4922,748,5367,735,4195,4740,3761,2464,1728,3828,796,5003,5231,1369,1353,4519,2268,3876,5118,5368,3785,4453,1189,4920,32,1332,1917,5411,4661,2226,2819,5256,4183,4649,3596,1770,4680,1121,626,3947,4971,5243,4655,879,1354,3112,2999,5302,1711,333,2163,2686,1030,2196,4263,2024,244,1878,3282,600,247,2448,4614,255,5092,5284,4040,3294,1299,4023,1404,1356,2764,1756,2811,3129,5124,1726,1944,2573,3815,3699,75,442,4170,5474,4597,825,4841,1895,1980,1799,1371,4600,817,4639,1308,3411,5343,2121,4371,1523,3875,382,5518,2820,4779,187,1377,2448,1581,2101,1554,639,1038,2062,3765,2037,2421,275,537,3360,3836,2596,2111,4050,1225,1377,1487,820,1275,4596,42,5111,1544,2238,5434,704,2863,1367,29,452,525,424,3985,3376,1319,4796,5151,4510,1221,910,542,3546,125,122,5204,43,3536,5308,662,2742,1691,3731,3427,452,4646,5524,1473,1320,2900,1732,3132,3981,3831,238,1750,2761,2430,4523,4113,1099,3523,3051,403,4492,3991,1264,5381,4931,4786,790,2908,4328,4292,3464,4508,1289,1468,2721,1972,1744,434,2303,1857,4026,3811,2275,3163,5232,3634,4052,3886,3382,2553,154,419,1365,5385,881,2275,3112,3939,1292,23,2177,5325,4229,2350,622,2627,2703,888,2981,5173,2194,2443,4863,743,398,4995,1899,3798,2022,1925,4333,33,3775,2871,3596,2414,2190,872,2956,3480,1184,5432,4229,4258,4313,181,1341,4984,3575,960,4812,4246,1962,2900,4420,3853,4966,1899,5190,1395,2518,2727,1432,743,2511,2893,2774,4129,3250,4341,2632,356,2693,168,5450,5066,4146,3561,5261,2913,3054,2685,193,5368,4000,2094,4380,3572,1316,1883,3795,3970,4402,811,1380,3816,4201,491,1716,2503,4785,5086,2138,2669,2581,4818,5140,4091,1049,2254,4616,4870,5486,3805,3304,445,1298,4798,3736,1381,2139,271,4900,2499,1713,2512,3649,1584,1354,2677,2828,467,5401,2554,4352,293,2763,4017,3846,976,1431,4744,1831,3196,2470,500,696,1924,1639,4911,2342,3017,4655,846,3786,4448,3968,5463,736,1162,2813,2170,5079,3462,3737,398,882,2823,1731,813,4520,2921,3029,1142,5165,3654,2888,1474,4688,2658,3237,3466,2032,3182,857,2427,2849,3988,4973,2113,2776,2523,1391,1136,2333,2522,1924,1091,2205,4963,5432,5189,4710,3642,3985,4352,1794,1291,4458,607,5363,2285,3320,4400,4753,2789,3337,577,4583,3813,1135,327,4279,794,4710,305,2715,4878,312,4919,3865,5380,823,2709,2008,1627,5329,1569,5063,1388,5152,2731,5139,4465,1428,2017,1519,4759,2013,4558,1265,948,4677,208,1177,5196,1192,343,2552,4650,2969,3662,13,3077,1867,4432,170,843,1035,3474,2562,5156,4327,389,2208,5493,2541,972,153,3161,4275,4919,3694,5186,3432,3024,1328,1740,1071,3097,4031,3008,5420,1308,2133,1816,4735,4668,2061,4066,5466,1103,5504,2074,4747,1097,1123,3360,2680,2737,5252,3070,3265,2708,3773,2946,4839,2412,81,3806,120,784,5068,153,2421,4280,4957,3843,3094,4677,2562,1628,1033,2872,1031,2357,100,2078,2042,5391,3715,2534,4514,2504,4976,5047,2067,3440,207,2266,4861,3231,185,3764,4611,4992,1991,3109,2033,4978,4623,4223,5030,167,5197,557,430,5093,3333,2214,4012,1654,3770,388,3476,2571,361,5036,1089,2215,3554,3987,1279,4200,83,4180,5122,3037,4500,2007,4571,1185,4316,1005,3828,2025,4917,1582,3850,475,3306,1187,2279,1497,3395,3288,3976,1630,3768,4161,5247,3314,570,1856,1118,398,5142,3726,2035,3139,2161,2658,4352,1194,1087,2808,3527,386,2724,3075,1316,4002,1447,517,1650,4435,39,361,438,181,2739,2989,5224,4988,5448,2096,495,182,3793,812,4826,3022,4400,3255,807,2166,930,3577,3865,3413,4916,4989,3782,4045,2741,2670,3621,2981,3357,5220,75,1165,753,4892,1950,2645,1378,2359,2353,2108,4273,2806,2922,1432,4004,1787,4488,2762,740,4404,12,2986,4406,2321,4571,3542,2519,1758,1115,1915,2741,5287,3092,1010,5259,4958,2553,5166,28,2175,4671,152,5055,5180,1278,2336,3867,2707,4088,5043,1332,448,2247,226,993,4365,4755,4958,2648,3640,1737,5251,1394,950,4306,5501,2247,2058,4500,3340,3089,4434,4908,4682,5292,301,4039,1357,3351,3782,478,4864,77,2266,2639,1784,643,932,66,57,2258,2438,2924,5049,1648,3449,4083,339,2710,5261,4727,2185,4506,2136,5405,2489,2540,938,4890,3438,559,5346,2519,2709,556,2434,2209,2710,2227,49,5177,3068,2500,3388,1268,1176,1861,2489,4447,3513,4281,4939,3911,1128,3933,3439,1265,955,4888,4643,1716,3975,4343,1712,5450,244,3572,70,3343,1557,5511,5091,5339,1408,815,2881,3494,1160,4495,4809,1910,4640,4405,4069,2467,3288,2389,1135,4751,786,5320,1668,3193,3959,4354,2376,4600,2278,3785,2015,2003,325,3444,4312,1165,1168,2955,2299,1292,1466,2432,700,3509,3383,3491,1820,222,3666,1802,4619,2679,1326,262,707,5480,3636,4898,1550,569,4336,1405,3461,644,437,4663,1721,5095,3849,5142,1601,3467,4483,2006,2120,4319,4952,5253,5483,1168,3957,3773,3810,1126,1481,3411,4610,3533,3258,4178,1162,3815,1886,587,2083,4528,1779,3661,1133,2464,1250,5357,1639,4939,4230,5249,5374,3354,3799,718,2176,4600,681,2299,3317,5210,592,4794,4737,1662,4706,2297,5198,5463,3795,2610,2614,241,4,2883,3530,1101,5009,1108,1006,2824,838,884,3480,4167,134,5511,5424,2387,4914,5402,1003,1375,2854,4646,4406,1932,4335,3064,2996,1254,2666,3853,1392,3452,3686,597,4936,5463,1015,1445,4003,3417,4324,1803,780,443,4600,1432,4808,3184,3300,5212,1893,1561,5440,3573,965,106,1603,1853,3336,470,4564,3593,4083,3211,536,4109,4569,2597,2264,70,1907,2431,1609,2447,2258,4909,2080,3002,570,2095,1960,929,5205,2483,2936,518,3630,1612,3823,2304,1671,1001,1999,694,4993,1678,3267,4712,2958,517,834,5259,4292,5462,5130,1185,1511,2807,3149,2166,3912,5039,1179,5068,4467,1285,4157,1698,3644,1568,3269,132,4055,854,3346,4157,1837,2600,4500,2757,2925,5130,1153,2161,874,4911,3716,5468,1035,1700,2154,2617,4195,30,5346,1540,2794,3332,5128,3313,4744,5138,3832,4101,4309,587,2828,4385,4702,2964,4002,3722,622,2675,4611,930,2672,595,339,1576,3036,3650,1113,739,2472,3681,3734,4935,5235,368,3041,3071,2014,2705,1809,1778,1080,4253,2040,3891,273,4857,599,539,5521,2282,4730,5465,3223,3263,5199,2915,3426,1757,2543,4686,2971,1315,4986,1000,1817,1015,594,2029,1155,1350,2484,1519,3356,1536,3549,3837,2194,1143,3502,2493,1220,4608,1205,396,2668,5287,1770,898,3553,3940,3608,4341,3739,4452,2828,774,721,2123,5372,4810,1489,3872,3187,2950,340,3157,3317,849,4571,4213,4447,2591,1656,907,4222,2807,844,2867,5122,2632,2435,4017,1283,2571,4069,4401,4540,4433,1820,5524,2238,2016,1242,4574,3276,1435,2842,3637,3712,1223,24,2170,442,1638,5362,1038,1755,1705,2882,778,2906,5233,987,1992,3875,2049,313,2181,4554,2150,3773,472,2245,2226,2869,3275,4224,2991,2440,936,4794,2814,700,620,4851,1739,1222,4319,3515,5174,4191,423,5447,4968,3419,776,4,4936,1071,2644,1949,4660,3444,2263,3973,4061,1403,1358,319,4659,3755,4325,3309,109,651,1226,2922,111,3646,2284,3251,4543,3361,2492,3931,3107,3333,5349,4778,5286,673,326,470,1826,3302,1395,5510,2097,1299,4883,3531,3604,2515,5479,3936,4309,3987,120,3154,2914,2637,1474,252,640,5001,3660,396,4716,2444,5103,3129,2712,3143,531,5498,3138,1552,75,2723,409,5395,2305,1327,1304,4467,478,2665,3502,2608,110,4285,4093,5011,4245,201,3650,2858,3010,4324,4073,2166,4434,2508,4955,5390,3558,4751,254,3029,5502,814,176,3189,2498,1230,4024,1068,4056,1627,1400,3599,133,1440,2082,607,518,622,2860,3443,1768,4301,4214,24,2654,2960,1737,3806,3896,4395,2140,4058,2356,4382,697,5232,4193,1674,2600,4759,4985,5088,5349,1148,3714,92,383,5261,214,3523,1392,2272,4387,1645,4168,994,5375,4476,3647,976,3090,2479,1778,1859,1166,2240,2086,800,1561,2352,3962,5067,1677,181,5421,159,2103,4681,2063,4514,5381,5167,4167,1657,366,4276,887,148,3493,3148,4834,4921,1915,2874,4060,463,1942,3120,992,4304,3394,1421,451,2117,1756,4948,4447,1581,957,5463,405,1327,5424,1389,17,1641,2159,2026,4508,5463,4090,4400,257,1354,3158,1487,2319,4440,619,4806,4576,954,4270,4324,4880,967,1340,1422,2464,2107,1581,856,4463,5052,4933,3957,152,385,3312,1378,3693,2990,628,4575,2053,4608,1795,3595,5038,3450,2301,1386,3570,4329,3291,1928,3522,4762,2610,55,2744,499,3338,2804,628,3184,3452,2519,5375,4106,4484,980,4058,2847,3710,3854,4842,2337,440,4076,4225,911,4074,2291,587,5419,4530,4540,4602,710,3195,2803,5422,3733,586,2915,3946,1313,2784,4606,1922,2239,1516,2153,4449,3721,824,275,5024,1626,907,2695,2192,3460,4913,4621,4716,1529,4499,2832,1909,1585,1538,214,1281,4174,5455,651,2504,135,1501,5489,3432,1722,4686,3003,3441,1861,5153,2552,4809,187,2760,2960,526,5270,1063,5479,2456,115,1777,2328,4786,5209,2454,4935,21,1876,5353,1987,1139,3167,552,241,4989,3926,3271,4369,3034,1268,4258,3254,5344,2264,1876,5385,3554,2609,1758,415,1565,2647,4489,2631,2729,2042,1495,4109,1923,3579,4219,4749,595,2443,5207,3481,1405,4669,3171,3648,1182,5315,3579,4942,2546,2442,419,5405,2122,1544,4702,2910,2177,1869,2295,2385,4874,2625,1482,2744,5099,3040,2279,2687,5369,764,2252,1196,4958,16,4200,986,2238,1461,2633,1537,709,3483,338,3413,5119,139,1444,677,4385,2528,3859,1013,5466,1198,4444,1403,4627,1933,4407,3431,4760,1734,95,4628,4955,3736,3916,1535,4372,271,2845,1230,3774,3508,3321,4382,4351,3390,4804,2930,580,1252,2234,3217,3233,2984,178,271,2858,710,2049,3395,5140,2418,878,3297,3133,3963,4517,2811,4057,959,2446,1883,2106,1970,2407,1089,5206,1049,1822,3145,947,2643,3382,2167,920,2411,2298,1986,5069,3994,3223,720,4479,5358,3889,4360,412,2922,5269,2748,2105,4757,916,4646,4743,4252,1085,5294,4557,3465,1790,5107,5164,4563,1082,3562,589,3064,2187,335,3582,1655,3885,5510,414,4068,5374,1101,1579,2875,2208,5503,423,5272,4703,2743,673,2055,4887,4504,4164,1548,4738,1013,5185,1429,1441,1665,4515,3882,4788,4566,3115,3359,2338,2288,1146,5343,3706,1275,3821,3604,1435,1363,1329,2754,1337,1298,1863,2263,2868,32,4621,198,3297,267,4214,2065,4178,496,2886,3189,4136,2333,3995,444,5130,775,938,4575,3852,1527,3104,3296,1580,729,2569,2574,3653,2235,4338,2420,3639,4967,3307,2382,5092,779,5421,2887,5367,3963,1054,4926,2255,4058,2878,1318,1795,3613,4299,2478,1835,57,4863,3856,4504,1408,375,1215,3840,4876,4380,5445,1302,3731,857,1729,1078,5464,3639,193,3235,1081,4797,2053,4466,4006,5253,915,2493,165,3869,94,4342,5321,4228,1749,4274,4423,4912,1872,4536,1437,3712,612,4605,1132,96,1592,979,515,2950,4669,3200,323,3705,3008,2159,2502,654,2460,1122,4471,664,4629,1978,1880,5469,5253,4315,3401,4266,3164,2615,2911,4228,2662,284,5207,2179,4204,2318,2822,1540,5360,81,5483,4219,5040,5334,5102,3735,4399,4626,2864,1978,3912,4831,2128,1662,3573,1107,5442,1723,2373,303,4879,4379,5062,943,3155,583,4096,245,3046,4849,5112,5291,3273,3208,2015,4203,840,595,3381,90,1016,1977,3765,1166,5449,3387,425,1241,728,5443,931,3284,2985,5362,108,2459,834,217,3390,3674,921,3915,1138,430,3314,4265,3566,4627,536,3088,3047,3674,1636,2291,1088,4028,3887,3904,3763,4983,5004,794,3112,3299,633,4069,2865,4139,1519,1311,4234,5315,3733,2320,5492,44,4567,2116,410,1529,4664,4938,3684,1586,4312,1169,2394,4901,3168,3173,2980,4599,4719,1968,4686,1708,181,1632,2509,4895,5465,4816,3293,1646,192,3774,1737,2823,2688,2850,1671,2723,5383,715,1713,1745,1617,4557,4782,3868,115,3733,4019,3416,1757,2699,5166,4693,1334,4640,1041,2375,919,2901,181,1158,967,2761,3662,772,99,5487,5317,4419,6,3448,63,2328,1329,2229,1948,2488,4988,4051,1595,5065,1562,3673,5148,5478,161,4077,2588,3055,572,2852,3817,593,5002,1385,4265,1446,5492,3321,3429,3433,2872,1159,4928,424,3915,1639,5257,4485,786,172,4586,1257,4748,1497,4205,3439,4648,143,1228,4817,4816,5494,583,4335,4348,3194,2710,5510,1848,4855,2151,3423,4456,4435,1840,1948,1058,3210,4157,2472,5499,1319,4345,586,4013,1490,3605,2277,1666,903,1500,1037,3221,4190,1123,3622,1861,3548,4743,3058,2252,2731,1141,1603,2147,1034,86,215,2512,4380,2385,4915,4929,5251,3629,851,1849,1222,635,1425,2794,1407,2744,500,4991,455,851,167,3871,3786,1402,4028,3298,1973,3632,1835,3951,168,2295,1859,3958,1095,1484,4556,4175,3717,433,2323,4103,563,743,1433,2675,4598,2290,3735,1402,4609,4653,5088,907,102,1421,2181,1110,423,1899,1254,2755,1485,2774,3405,2168,3816,3337,1924,3231,194,4790,2454,579,202,3868,1315,3863,5309,2758,5078,477,3758,2665,4839,1697,1124,2316,3936,2829,4105,1007,4739,642,2988,1616,1210,979,5084,1531,3848,763,816,1668,1055,2728,3875,2622,4738,5133,1637,3695,2628,4641,293,271,5049,1158,2099,529,2220,2092,2542,1272,1838,741,4054,1520,4998,3768,2332,2368,3718,2923,4513,3347,724,391,2337,5388,1276,3738,2249,1312,4579,2047,1289,1803,5314,4283,4080,1251,2556,306,3504,3155,5384,976,3974,1163,3720,1831,4666,3982,3760,959,2786,3869,3619,5235,2942,4219,819,3178,3022,4231,1263,5338,1702,2552,1297,14,3936,4257,697,3311,3739,2705,4132,4680,5427,4651,58,2250,1676,1100,1053,4684,2700,5189,1628,1109,4185,2861,2334,4762,2116,1572,275,3407,1937,4125,2615,1569,3074,1666,2642,3858,731,3279,374,184,3386,2749,2595,2094,3763,2514,548,4471,4530,2754,5142,1584,4301,3861,1223,3220,3995,4288,2416,1856,2794,2755,2723,1682,4970,5364,4244,4206,1568,853,2762,4614,5314,3965,3951,645,2015,4290,1288,4405,620,137,5122,2764,3486,183,2832,2137,860,4646,792,3885,4055,3191,5234,5038,639,3720,1116,5428,5395,5353,4791,3499,1899,4693,3742,4547,484,1308,1750,4513,3824,3312,1521,2465,2154,4615,2785,1771,2308,4721,5294,2514,571,3343,4645,4123,5358,2332,3807,267,63,1535,4945,980,2414,5029,460,625,4092,4870,2221,4591,1990,3,1308,5227,1521,4520,5244,4776,1302,2429,2586,5421,4071,5289,4022,4938,2284,2233,1051,152,3341,1095,4334,1188,4904,3704,624,1068,770,2131,3604,5253,4889,4634,3761,1987,4451,4269,4324,3356,5137,273,2497,191,492,2795,3729,4136,1190,5437,3922,3710,4964,698,4242,5375,2645,2181,4046,854,2646,317,2394,502,881,4307,2611,491,2583,3623,1876,773,2250,3728,3736,295,4306,3387,3210,2857,5290,4796,4245,4932,4293,1220,2721,2629,2332,2676,143,3958,1512,4870,2172,4046,4736,2463,3999,4762,4908,1112,1061,1456,2430,3202,3618,4602,1185,1404,166,3884,628,4995,2795,1456,1959,5416,5123,4003,4342,4979,4392,1946,1916,1526,3788,3754,4502,5112,633,5372,1308,4950,1631,1170,2953,4676,3800,2743,5482,740,4091,3051,5031,3928,3197,2155,3596,3924,4357,4377,4866,365,2958,3479,2675,168,4168,4602,2921,632,4893,5068,2093,2616,2994,114,3917,5152,3542,3242,3804,3497,3485,1257,2802,808,1793,4310,5104,4532,3062,269,8,997,1302,1880,1325,3709,5025,5326,3300,1278,4534,2768,2865,722,5327,5510,2476,1280,1017,4662,3050,5523,679,5009,2022,383,851,4181,2840,5503,4877,851,3347,3134,4344,2425,3613,4199,655,3955,3474,3994,3052,4646,1027,2079,4891,2756,4103,1017,5085,2751,3764,5261,4684,1253,3434,4793,1601,5307,971,899,2555,2573,3948,3501,4019,1882,1427,4775,2557,138,3715,1552,2046,3991,3240,508,148,4072,2611,3580,2100,3117,647,1815,5387,3266,3489,1533,176,3556,259,4471,3458,5258,1212,2705,3881,4971,3306,247,2932,3860,207,3142,1285,246,4081,4893,136,178,4474,545,5168,2090,2124,3516,4552,264,2237,4415,2937,642,184,3113,4492,3412,5513,2156,2894,2980,758,1362,3332,449,1633,1061,479,439,524,2506,1215,5008,141,274,5024,1542,5155,2596,4578,4819,3804,976,2449,1596,3505,2134,730,653,4187,1853,1563,1989,1873,3043,4720,1432,768,1058,2314,3886,5523,3498,3559,3057,5356,2070,1501,229,1015,2306,2960,1507,2613,849,2943,744,4832,815,3404,458,1132,4859,1445,3507,3853,2014,4217,5409,707,3772,3417,4484,5338,4418,435,3437,2763,3776,424,4967,5100,3045,3858,4310,2599,714,2446,3203,193,2126,530,5004,1947,4256,373,3000,998,4459,1063,1865,1910,2177,5436,3240,390,385,3155,929,4022,4003,3736,1650,2386,3728,5244,5504,5365,245,4753,4363,3871,4826,3438,2502,1698,2595,2522,3886,3687,3724,417,1696,4704,1928,3867,3283,1609,4629,2165,3422,1036,4070,3526,4882,2798,2511,1218,4287,1053,344,5328,3866,4246,1099,4846,1115,3619,857,1418,4014,2987,2112,3851,3417,2642,4604,2641,981,1885,3739,495,3377,2218,4743,2817,5170,971,765,2788,5160,4677,1966,104,1166,4919,1363,1642,718,1926,4349,1339,89,5002,51,4564,3345,2626,1185,2503,847,3114,4867,4335,3335,2914,1521,1608,5256,547,1917,1282,1476,3231,1549,2341,1754,4492,5033,2394,4304,4962,3678,3222,2879,5071,1103,1068,2566,3389,1760,4391,1269,480,726,4043,2902,887,2889,1066,5110,353,1355,1787,2646,5185,716,1193,996,506,5487,1763,459,2271,1449,2806,2260,3813,3224,3911,407,2195,1092,1949,4613,1967,1679,4443,452,4832,435,3783,1475,5105,3174,3390,270,4490,643,4333,4796,2484,432,2275,604,2476,374,3845,2081,4965,1057,2592,3372,5173,161,2572,4252,2306,4277,4314,3744,2632,4104,3824,2457,837,1373,821,5140,1074,2555,1079,5080,5171,1674,4877,3521,806,131,708,4305,3473,4697,5523,2596,1639,906,4458,68,2465,1526,2405,3438,3476,3216,3844,1299,5141,4302,3192,3784,159,3154,1825,3680,4159,4834,1297,641,5389,1450,2164,4168,234,1766,1282,1969,864,1396,4899,5318,4491,5366,5217,4128,772,2125,561,1725,3581,5448,49,4658,5113,4937,697,2417,3579,109,2289,3469,5364,3161,2974,2383,990,330,3169,2292,2684,1846,2999,564,1138,3002,1453,1132,787,298,1374,2835,2353,4655,1648,3398,4204,5508,4397,3136,5128,2137,4865,4943,1197,2175,1982,10,4989,1336,4431,2870,5311,5455,4021,3474,1475,1417,4777,4797,3253,295,1419,3693,3509,4305,2900,3174,653,159,2229,2643,1158,3355,4920,3421,3116,3258,393,4483,4183,2094,526,3700,5209,4766,4497,3745,2130,2442,3121,3972,5379,5394,607,2544,5001,2530,41,4321,4505,1220,2642,4852,5323,4656,1699,748,3301,5250,4323,4058,3253,62,4972,5400,3652,4725,1452,964,967,1342,4465,315,1669,3321,751,338,953,1252,1532,2737,5433,1431,3690,4777,734,1511,5250,4259,1727,708,200,1549,1648,871,994,4783,858,2501,396,1527,1504,2174,4234,4664,160,964,3273,3519,5238,4726,4878,616,3819,1938,3543,1649,1297,763,2262,3802,3920,2411,2675,2770,620,5453,1281,4769,3309,902,2139,4064,3521,126,353,5154,5025,4209,556,4299,2437,3428,4243,4601,3639,4956,2140,2087,1906,120,5359,390,864,4615,810,887,2801,1993,5031,163,3307,1465,4058,5169,3726,4928,3797,2993,3131,2053,2852,937,1314,576,1241,1797,3166,3693,4633,2667,1277,1367,4463,2869,2096,119,4567,652,4337,3110,4735,3481,1892,387,2435,1863,440,1434,3746,5159,3111,240,959,3995,4899,2295,3064,1941,1988,1622,2795,78,4126,2970,3471,701,5040,3084,1453,208,4605,3406,1372,4456,335,2262,485,3918,5402,3688,3526,2178,4641,4652,4101,2697,2319,1067,1804,3608,3138,179,5062,1792,2360,1665,1501,1997,2602,3453,4575,2318,4169,3567,2349,2030,858,3004,5079,890,4947,4529,4059,1214,5096,2306,2197,1963,5281,2092,4022,2953,1031,1871,572,3027,5359,734,1511,3699,5440,436,539,1727,4577,1729,4560,2268,1278,3915,1491,3576,308,2161,2885,2174,1540,1017,2877,2067,3609,5160,5111,2986,33,1126,3987,3915,965,3541,3611,412,2453,5255,3631,5196,3297,3062,2498,289,1932,5014,4354,1958,4210,4674,901,668,5072,3157,2574,4638,2322,2217,5333,3889,3201,162,356,3868,4046,2925,4578,3413,3554,1642,1965,4947,5365,3244,3760,492,685,78,4429,1072,2104,1798,2069,2767,808,5494,3475,3340,2003,601,745,1223,3114,4491,4804,2781,5219,2109,2546,2338,438,991,1669,1665,2941,269,381,2028,500,2992,4587,5294,3676,1875,669,3810,5022,1424,3255,687,926,2697,3244,3728,1612,1711,2472,4503,3585,3426,393,2560,4165,2560,5481,1301,1152,1083,5491,2821,2888,3704,1166,1389,293,267,240,2078,5067,4257,713,1713,4464,953,5071,2488,4094,3847,2473,2510,2051,576,551,2364,2795,4890,1011,397,1307,2870,5059,662,2982,562,3500,348,3130,5445,1094,457,3378,3545,1626,1997,5474,3359,3283,4255,5409,4190,767,3386,3699,2596,2003,5219,1747,3833,2443,4661,3063,344,5337,1853,1487,939,3020,1107,493,5020,2531,2327,621,1693,5313,3013,3980,517,5510,30,4220,76,115,5405,3129,2799,5290,2217,3604,2311,870,998,266,3486,624,2564,2655,2902,1890,4954,359,4931,2267,114,3781,1750,1832,2296,2252,1799,634,4323,3434,448,3282,2507,5176,1213,2043,239,3929,4574,1924,5208,3529,4071,2471,1462,4560,1959,95,3975,2651,4943,4355,2209,361,4648,700,1725,1518,968,3257,1630,1628,357,1507,4630,3018,247,212,1568,1641,5346,3510,847,2104,252,3109,3824,3738,2483,3657,1405,1893,1759,1390,2022,4431,4963,2371,883,2914,3441,776,3713,1383,419,3118,1836,521,405,3394,1877,3050,1103,1253,1742,3886,4238,1318,3826,1444,1484,1243,2094,4462,3965,2176,2959,134,4629,2114,4083,940,2353,2795,3396,5204,1269,2711,2166,888,5194,1467,4162,2209,1580,2816,4206,4113,2928,5040,4004,3537,4660,3079,942,1517,1824,4003,2168,5189,2858,1188,1930,57,4257,1674,2552,1359,1523,4278,681,5122,269,492,4348,4529,2402,859,3323,4787,1813,2786,3913,204,1346,1574,3702,1835,4551,1856,3232,619,497,1796,2659,3285,2971,3954,4245,4822,5506,2656,528,1351,140,4771,4523,5238,766,239,5159,2425,3595,3576,301,1539,2102,4018,686,3187,2577,5113,5110,18,2929,4289,1990,1296,4286,831,6,4573,4116,2099,5289,471,2783,3872,3688,4120,4579,1040,2725,5348,2763,1279,3222,692,1356,157,3765,2406,4243,3034,4249,4948,2224,2342,5431,1758,221,153,1691,4103,843,3989,3784,1350,1118,2801,3761,5489,3585,2566,2234,1067,259,1785,4906,3243,4478,4146,1103,5107,4512,1265,3385,2654,806,239,4713,2834,729,3801,4752,223,2118,1415,4569,4157,566,1675,1337,52,3134,2532,474,410,990,3250,3466,1606,395,1332,2526,4072,825,5304,1811,240,3785,4444,3339,4673,3976,3743,4783,1707,2254,346,3176,3073,2110,305,5465,2008,5229,4857,5097,5272,2395,2379,2377,3409,208,4477,1294,4627,1933,1050,4106,3416,4910,4473,1721,851,2832,2167,1886,3853,3694,2963,2435,3171,4953,3138,4093,1042,2222,2117,3004,5513,2869,2935,3667,5019,1668,817,3206,556,3091,2342,1026,4581,4618,2107,2249,5154,3867,415,1793,4350,4086,1612,4772,445,4107,5329,3477,863,348,3861,931,3431,3594,2376,2308,2988,1468,299,2894,4385,299,4914,468,1175,2381,3,4194,37,2020,4131,2465,2916,474,4311,2750,1815,573,1062,2922,3458,5222,51,3858,5525,3246,3594,4300,3853,2399,2479,2674,3759,4055,3618,1468,2827,5325,4635,1678,1764,458,1983,4194,2916,4510,4315,4309,4411,608,4298,561,2371,363,1078,3784,4560,45,3923,4804,1451,4183,1232,2030,4679,3483,1506,1169,64,5116,4427,5171,2696,1604,5035,1732,3992,256,540,479,4577,3921,2412,2117,567,2343,5393,721,1929,4319,5069,4255,4593,2194,2500,4703,4963,742,2079,598,3282,5024,2613,1727,1103,3765,4435,3021,5265,1781,4130,293,3516,553,2215,2694,1790,1569,276,1699,373,1448,1166,5299,1798,3083,3752,3652,3390,4262,3886,522,2365,4437,4675,5478,2611,3914,4454,4236,3110,5233,3679,1567,5103,876,1684,61,1545,4221,3606,1006,2398,2822,5352,5113,1798,4786,4342,4706,676,5138,2263,3160,4344,5071,5063,370,1042,509,414,1465,5119,5277,2254,3583,3352,5264,4697,3039,314,5016,4617,2164,2416,4444,4572,4803,2056,1656,342,2938,1246,769,4292,2594,839,5405,5019,5112,3640,5499,2736,2535,3843,1741,4284,5264,2334,959,3811,1635,3703,1622,2642,252,36,4256,4994,2114,2554,1805,1641,23,3646,931,4983,3185,4854,4451,688,3223,2914,259,2249,3040,1077,1731,3082,2373,1447,3720,4145,4384,3505,2864,1488,3624,4996,4071,688,2382,3552,5011,3683,3883,2818,3625,1708,1146,677,1258,132,468,5270,3721,925,3699,2739,964,1876,4143,2354,4794,4863,5502,2067,4109,4677,647,646,2458,5206,3595,4954,5344,145,2318,2771,3008,4613,5190,5227,2902,4543,2425,4038,2435,1257,4606,547,4457,2088,1218,309,3212,3011,815,3154,122,5455,4382,4794,791,1883,5095,1141,3042,4936,2581,3545,5369,3113,2385,2158,4065,2087,2458,3120,376,2545,903,5461,4220,3791,361,1751,559,5100,1603,263,3738,5483,3858,2658,2299,1891,1090,1001,4463,3833,617,4468,2097,4400,550,1530,3808,2848,1466,4691,5257,3029,1103,1655,2727,654,3458,4057,4696,3283,1734,4329,5320,758,3569,5128,4201,3425,5041,1747,4746,5060,1465,989,1638,3478,3253,1000,4119,2343,1752,288,4248,947,4753,1448,949,3549,926,987,5441,405,701,579,4026,3406,29,3444,2974,449,3439,5479,1834,20,5252,5260,154,1883,69,462,659,1323,5129,1332,2569,1221,1665,1383,3041,1034,228,2649,4390,1885,60,3046,3875,5385,2832,4929,459,3674,4539,827,3724,2380,1233,806,1769,5364,4203,5466,2632,1060,1923,4284,2259,990,3153,876,4633,4906,5173,1058,4104,3014,4667,4632,1804,951,2949,4869,44,5410,3999,1103,4400,1945,2360,2428,27,345,4852,3873,1029,3326,3701,3699,1532,3262,2468,867,4637,831,4478,1445,2786,5105,1853,3654,2276,4446,5208,2801,4668,4381,506,485,4081,2592,4891,4461,633,2850,5230,3311,1072,1729,141,1430,5016,3951,565,4047,4951,5092,1433,2320,1022,4457,4947,2999,4485,2437,2724,3951,5135,1242,1179,1605,1715,2618,771,965,1143,3559,5342,2610,4462,2028,1743,667,1349,1555,3784,251,5082,1581,4116,184,4566,5220,2173,4091,3391,625,5167,2147,3083,439,4254,4135,2268,3739,2221,1936,114,5356,4203,1796,3977,831,704,3705,1849,1302,2826,363,1806,970,3113,488,1059,2485,5300,5026,2976,4304,4266,1519,583,5497,5100,4682,4855,3812,4749,3805,4061,4936,3963,1316,2008,2536,857,5403,4135,1693,2567,1824,3217,4096,1875,738,3568,737,4845,4215,4641,3305,2211,2702,1471,3594,351,2265,969,2250,255,3109,3280,4760,2638,2445,4775,4062,4822,3,1450,1891,4634,4429,570,3519,1223,873,1116,1043,4670,1090,805,3572,4173,4604,1539,4624,629,5003,161,3846,2378,2535,1992,858,1475,4804,3233,4027,999,4361,4044,2550,3379,521,5252,5461,2240,1438,4288,5353,2530,844,145,3773,1090,5104,2385,2763,3846,5281,1156,1123,160,5366,4789,1655,2721,1163,5237,5341,2735,5140,4781,4568,2387,5294,4338,1441,426,1134,4989,3111,3727,1812,909,1407,725,3838,3196,3238,4263,2495,2331,4250,4783,1013,847,5131,2376,1913,1592,4783,425,4359,2450,3571,1375,4075,4795,2044,3820,2475,5503,4770,1989,1818,4558,2538,941,4510,923,194,636,3087,3440,592,2612,940,3989,5308,5260,3798,64,3872,987,4374,3719,4097,1855,5380,2831,1161,179,3386,2588,4895,1498,2616,729,319,2822,2395,3064,4179,3032,266,3893,328,1892,1460,3009,4489,1050,1999,3443,4404,1947,4136,3230,3909,855,3906,403,5305,399,5502,2189,3610,3074,3216,2377,2618,4161,756,5106,4127,158,3247,1417,4299,4657,3427,1279,1665,2230,3134,3394,4437,4032,5227,1692,3359,4418,4443,1690,4610,3911,1379,2839,5165,5506,1778,4222,5208,5122,4375,3958,3624,712,2129,3293,5489,3679,116,1363,4451,4547,67,2160,5449,4235,228,3752,1323,883,5023,2730,1896,2830,3163,5319,3945,2659,24,1,1118,2245,3910,3992,1255,4180,5202,1190,5221,1001,3842,3688,4214,245,911,5127,476,4473,457,822,5492,5346,4279,4801,3390,4361,2039,1469,630,1358,1258,3434,5287,2423,5434,57,3466,3888,700,4729,4766,4,4197,2522,3194,2573,4145,2251,4561,3905,553,1506,3687,2100,732,4594,3272,4564,5454,3399,4435,3300,2398,785,3781,803,3566,1405,2920,2705,1845,1755,930,1066,4368,2301,438,412,2946,53,4768,1667,5284,5328,3530,3368,5208,4789,1194,659,2830,638,3116,420,5508,4287,859,1689,4170,429,5425,669,5379,293,1286,492,3667,3949,5072,3368,325,3430,5052,5277,3405,1366,3852,2632,2939,4357,1024,79,2040,3688,5400,1796,2362,2697,2833,362,3258,1360,1230,5008,2374,4620,2726,4978,4047,3589,2900,960,830,5415,857,3892,4361,3586,2582,5439,3881,2832,5389,4029,3079,3460,333,3318,3927,4030,3241,2497,5413,119,4655,5044,1751,3552,1851,3789,4816,1165,2228,459,1041,2828,3412,440,2617,4961,2175,2130,3893,1461,3697,5142,2395,760,1070,4455,4917,2593,4244,40,1206,4101,3236,1849,438,217,1165,4020,746,4304,5385,5289,1657,692,1898,4923,1742,2566,1917,2343,1569,43,744,3747,941,2770,5188,5224,2809,2109,4136,1129,4445,397,4972,3280,1638,4065,520,4156,2241,3983,1328,2921,4177,4185,4218,1118,2613,4401,1950,3117,2986,4706,4514,4476,2652,2626,2309,2005,1695,4981,4088,2470,1403,727,1019,4144,2404,4655,4983,4982,2309,3246,4222,4982,1861,1145,657,4903,3717,2596,4503,1380,4732,943,3185,1217,1939,3444,5053,1695,3119,4514,4910,3535,2878,4011,3171,1389,82,5155,2239,1479,3547,3151,2972,558,4495,2552,1092,3579,1698,893,3940,4888,422,5086,1895,4839,4102,636,4608,4146,2981,1369,522,2580,2215,4860,5231,1797,4640,5028,4551,4767,5331,3217,3161,4922,3709,1380,99,2729,494,3252,4381,2130,4830,909,5235,5331,4796,5234,3199,407,865,5249,3476,4566,3686,1099,1171,791,1742,875,1867,2502,3187,3144,3629,262,1661,3702,1749,641,254,3833,2313,2541,3890,1390,1569,3415,919,4277,2651,4712,5096,3824,4203,597,2202,4318,413,5201,3934,4782,3638,4585,3206,3668,5448,2706,5380,3101,844,1590,3440,3846,400,1478,1506,4141,4980,1203,953,588,1629,2609,2080,1822,4776,4208,4795,3293,1926,3216,1744,1204,422,2784,1081,163,4344,2736,633,1941,4313,4680,258,4852,58,1033,3168,710,1631,777,410,706,2749,1396,5160,3179,5247,1482,3318,3478,3315,2627,785,1954,1918,1273,2899,5260,3307,1954,1938,294,411,2644,4175,304,4276,3679,1490,2289,105,2045,2836,4347,5408,1387,783,3059,982,4305,4392,550,2794,1550,506,1970,3541,1430,1499,3982,1955,711,4595,5001,504,2935,1389,2102,4399,4521,4543,29,3868,3810,905,237,1141,4749,2555,2862,940,1005,1062,5050,2480,4797,1944,4367,5132,4485,5076,3789,5436,3351,2381,3788,4019,2042,5106,2990,3671,4812,512,1805,1617,1597,3567,2191,5247,871,4046,2063,3058,2663,2858,4863,1114,4989,3408,288,2953,2958,154,202,4123,2846,4961,2780,1371,3983,3723,2989,1287,2922,3564,1421,3552,4983,4904,5241,2019,4024,5144,1569,199,2501,4934,2892,1263,829,5362,1963,2421,3514,5366,463,1922,1005,1606,3617,451,23,2025,4676,3138,764,2743,4473,5517,400,288,4314,4352,4030,1783,1459,2015,1090,543,2507,1421,1448,760,856,2530,186,3704,3394,5069,1824,1987,512,3065,5465,3181,3255,4024,2581,3109,1565,288,2762,1848,4090,3676,3572,3104,4190,170,1153,5207,4138,3729,1586,2417,2217,1344,4129,1970,4085,3391,1794,5331,4485,1063,1154,4035,5373,630,1329,5475,2121,4318,5337,74,4988,94,4276,4185,5147,4761,4743,403,2208,4000,2024,4923,1400,5510,5078,4202,3737,2580,2721,1440,3358,5144,5512,401,1706,4307,4347,5108,2107,1023,2596,3905,910,630,3778,1361,1748,2275,2871,5436,2807,4802,4052,3537,4164,5332,1041,5142,4003,663,531,1980,4751,1129,4588,5298,1433,5172,4546,918,3262,4911,1041,936,3034,5371,1055,4272,1676,2972,385,4512,975,2305,391,2121,2374,940,4916,3480,174,4526,3277,693,4744,4747,4199,801,2704,3015,697,2983,4847,1335,792,2957,2968,4668,4654,4152,2674,5087,771,1653,3333,5433,4102,3139,4184,672,5008,4741,3481,2881,4361,278,478,2013,2647,2257,60,639,2993,4865,466,3119,1547,3347,3272,844,4468,2715,5497,2255,4926,658,1421,5172,2376,2913,4605,4898,965,608,4922,4795,9,2638,4561,5082,3440,252,1037,1301,1184,4005,5178,4273,3043,51,1757,4306,1917,2657,3022,1362,460,5443,2622,2320,3495,2696,4129,4917,3189,1926,5135,414,671,4169,706,1167,745,1249,3443,5476,4958,477,3634,591,3181,198,1703,3218,537,2315,2670,2371,983,4145,401,612,779,1616,2386,4500,495,3344,4983,992,634,427,3621,5381,5442,607,4935,3780,3341,4809,4008,1429,2770,2458,5246,545,1036,1130,573,4897,337,2674,3573,1949,3322,5204,1869,4066,5507,117,1111,4069,1390,4460,1570,4161,1784,2849,4588,313,1985,776,3281,1522,4609,4581,3717,1292,4407,2918,4397,4261,1364,429,319,3099,3566,2849,1178,1908,2731,2139,1366,4429,2424,2032,2778,985,5192,4589,1068,415,861,597,696,4721,3377,177,2801,2981,3540,2630,4869,3330,3148,311,3936,1226,2947,2359,4734,5429,303,3285,5372,5012,3422,3415,2050,5326,5481,3696,4070,4145,4249,1893,4008,4549,5166,1049,4026,1537,4852,676,261,1805,2744,1205,3179,1119,142,2923,5402,6,230,5483,508,4869,175,1018,32,992,3451,3836,1776,3830,3343,5107,2049,1208,3427,2580,2058,2512,4586,2368,3282,2287,677,1133,5296,4617,4331,2724,2140,5322,2189,1120,4614,2962,5321,5096,954,2739,3782,1471,3717,3881,1653,2165,4912,2383,4617,2654,1127,1681,560,3721,2283,2692,3876,1359,3355,5461,3714,3765,2094,3342,515,1540,4932,51,2095,4115,327,2466,4267,2675,1007,287,5286,5201,2369,1377,3172,3537,1507,4603,5470,3688,701,1506,3201,3797,487,1483,731,3711,2393,132,4947,306,4112,4612,3988,4309,2824,2008,1076,2009,4130,2905,3402,1114,3060,5457,1778,2295,4019,2930,1970,3167,3058,2381,4867,3492,2129,5002,1713,940,3279,110,788,3008,4236,35,2811,4577,45,2571,4014,5376,4780,4663,4008,1750,3350,3210,120,5112,3003,3951,4042,2676,1928,1436,2361,5155,3606,5355,1858,181,1066,2818,741,662,1858,1127,2184,3618,4307,1960,1911,1392,4989,3523,4308,5155,5006,3686,1815,711,449,1491,3272,2137,4685,5093,3053,3698,1532,154,2304,1798,2452,1824,4409,3909,1104,2315,4601,674,4263,2083,2657,3833,5239,3743,3410,3533,2600,2226,5182,4571,2281,590,3120,1735,2121,208,3895,4615,4416,1915,2263,2430,880,1777,2512,1580,4775,1495,3174,1413,2143,3803,555,3660,2740,1211,3322,832,4418,213,1147,2635,5425,4415,5284,4457,4008,978,2369,635,2633,539,1405,4780,1105,4622,1423,5367,5402,4254,2821,648,235,1001,937,3993,142,470,2616,4902,4671,4428,2579,1719,1914,3243,257,228,569,736,338,2336,2238,2230,2149,4795,2815,1101,2002,226,888,1247,3403,2602,3332,320,5108,731,3746,1446,245,4751,1990,2849,2780,1428,5444,4224,3271,1570,2776,2674,4507,4041,102,2417,785,4799,390,213,494,3429,5476,3616,2284,4648,610,3099,94,5359,1101,4265,4262,90,2798,3242,257,1025,1281,1729,480,2174,2543,1927,666,4280,911,5250,90,3605,433,2945,4002,2012,2064,3345,2551,4575,3832,3524,4576,5262,4579,873,341,4127,2431,3681,2949,351,4307,1866,704,5331,2967,4720,2197,2689,1049,4254,3303,1485,3809,82,4756,2578,4698,465,4002,3550,3561,5133,331,667,5056,2384,729,4448,2169,46,3883,5325,4109,1617,1288,3457,2507,2101,2777,659,1427,2123,117,1900,3472,5117,2739,2506,4936,1584,4354,1875,1287,1143,5181,1318,1143,4427,1934,1380,2468,4300,3587,5349,4573,815,1557,2019,4335,4185,3772,2937,1919,1148,522,4631,5141,1108,2941,2901,2249,3935,2068,3756,4228,1943,4202,566,3618,1046,2136,1448,2686,192,1989,2801,3623,4344,3532,1713,4218,3472,702,5100,2737,541,2995,1581,687,3885,516,1976,2480,4539,336,1998,640,2140,2204,2440,222,1553,5310,4279,3099,1259,5089,5511,381,1187,3692,3831,4359,1132,4826,2929,3321,1436,1178,1904,413,2110,1363,2691,1304,3751,3610,3787,5278,1999,3276,477,514,1952,1043,1904,4241,4351,1044,1957,3738,3119,2479,5035,2992,626,501,3362,1398,3263,2122,1099,2115,32,5415,1122,1406,3419,2482,4520,3769,2739,3185,5371,2335,4313,2488,2347,1235,597,3313,4040,2696,1518,962,5043,31,2161,78,4490,4574,5350,3688,3131,1045,5407,136,475,4388,1358,4733,567,4438,2202,3622,3040,2745,2180,4894,1698,1951,4867,3168,977,2340,4605,4795,435,4233,956,1318,4397,2689,1382,3349,1154,564,2511,5410,5452,543,4476,116,3701,2469,3692,811,5418,4990,890,142,3595,100,1848,5176,4474,1260,3592,902,1893,5169,10,5231,4938,707,4428,2274,4797,2186,2717,762,5402,686,3321,993,3263,5500,5273,4725,1108,2608,3362,2535,2319,3886,2645,3279,39,4327,3691,5417,2902,5474,3326,855,783,2757,69,4199,3580,5514,5058,1153,4898,3221,4696,5509,1165,4187,3611,4861,4824,5149,4977,2458,1537,1400,5498,3879,5380,3109,5454,712,5511,69,2992,4179,21,915,1627,357,2700,2817,2168,4315,5380,2882,89,1084,1960,1244,3333,321,4276,1857,584,56,5021,1836,2331,501,4553,2686,3575,4153,4691,1070,5409,1229,512,1070,4435,2724,4455,2788,4013,385,5165,5374,1815,1659,1656,1401,3234,791,4266,4767,5350,1314,776,5457,3933,57,440,2473,361,4783,2327,2297,3443,258,2079,4963,4453,888,4431,4484,500,1811,2906,2568,4997,4244,1181,618,2358,3034,5350,2887,4350,3401,487,2404,767,1304,4423,1676,4174,1674,4395,4423,3732,1492,4038,2693,3124,1930,2095,1774,4749,2037,5361,315,3060,1648,3486,242,4638,1616,3927,311,140,3791,2211,5367,563,4506,101,1351,4239,3710,1980,520,155,472,1125,1604,3200,2945,466,2739,3836,4558,3319,4680,5476,2627,5035,4675,315,1755,584,3235,5029,483,5297,878,72,3767,3,1731,2604,1137,1042,1742,1754,5004,5353,4803,4435,587,1594,3276,87,646,75,537,427,1960,4477,1661,2599,1966,4060,796,1740,632,2507,141,4294,2000,4876,2823,1609,4473,2003,3106,3771,4206,1183,4823,1224,1535,4593,1519,1226,5071,3238,2174,69,5477,2336,4433,3227,1364,2418,2480,1318,4843,4908,293,3937,2874,5125,3289,3153,1080,622,444,547,2327,552,4833,5344,1462,2375,4370,2337,5376,5411,1124,1493,1403,2957,2690,5279,2612,834,5092,91,1832,3587,3194,4842,3275,2925,1658,3064,898,3780,2913,119,3577,114,507,351,2377,4679,953,4530,1455,3628,479,2450,959,956,836,2009,2979,3853,2044,4096,4402,2597,5030,5395,991,1302,1354,5250,3634,2525,1050,1981,266,2437,1193,2243,3845,2383,896,3920,985,2582,4859,1832,3946,4221,313,3790,4744,3809,337,2860,4206,2178,1907,4603,4078,1206,4887,349,4421,697,4154,4456,5517,5394,4663,2250,2964,4027,4412,2465,4508,1768,3065,2279,2621,3970,1549,4380,1390,5521,1545,4649,3318,305,2431,5062,2313,5449,4528,4164,4311,5049,3189,1677,2821,3549,2557,3504,5280,325,606,1728,641,3569,2280,3254,1948,1102,2071,3573,1629,161,441,3084,1679,5486,1591,4802,4375,2570,503,2730,4459,2238,3319,2709,1588,2358,3022,4610,4801,353,1061,2871,4650,2248,2090,3205,428,895,1476,1247,2156,4978,1246,5122,1958,4650,2272,1749,697,388,1170,1882,1371,3290,3114,4371,396,2716,1951,5299,2070,4254,4542,832,3439,2878,3789,1762,568,5506,4219,3718,2250,5009,1055,449,3210,3052,2755,3605,5062,736,5142,1954,2253,2201,1511,1420,5308,3544,497,4710,2455,4001,2055,4244,1033,914,3433,94,87,2397,1141,2,1241,3579,5160,782,5023,204,3048,3535,3308,3394,1963,2863,3563,3145,3307,3384,1025,4424,95,3787,2151,4459,3056,1692,4565,4368,1897,977,5051,2303,1891,3258,4872,4,880,347,3014,1102,4631,1120,2150,4013,3781,2885,3993,1333,2898,5399,2238,991,1651,3474,3396,2919,5303,4530,4889,4634,389,946,3647,927,5458,2687,2885,4737,3383,5438,4369,2950,2766,1944,3346,3462,3822,2189,4370,5195,4627,4073,3022,878,1269,1237,916,2831,4044,3958,5395,1084,523,2168,1992,2149,592,1145,2381,3813,560,4244,3755,997,2047,2337,932,4564,1911,1213,1262,3377,2226,1751,4415,605,4672,4329,1142,3505,3929,531,1920,4375,3970,3283,2778,2624,1145,2746,1418,2316,4828,1822,1292,4831,1052,3484,454,4466,1789,3269,720,1920,1051,1810,2862,1121,506,3958,2424,538,1630,3239,1025,2867,1100,2887,3447,620,4703,2971,33,4341,3572,2601,1602,5226,4791,4512,2053,5425,2335,4132,1181,1788,1125,3201,3805,5179,4536,4716,1324,2719,2323,3041,3873,638,4226,236,4035,2945,1110,3614,4202,4828,942,4308,1062,3718,4401,2296,952,1978,1983,2435,5164,1663,3596,1399,1699,5295,1017,4253,3260,2172,4514,1809,2401,278,3979,4813,628,3039,16,3697,1888,3800,3716,2253,5147,5028,2565,5022,3198,2586,3317,4219,2580,860,1176,612,4520,3383,4,3066,3838,4484,3518,2698,1549,4016,1596,259,2431,1699,936,1162,4943,808,192,4766,3449,4279,804,1463,4197,2066,4418,532,2796,868,547,4975,3372,4758,5044,5200,963,5336,2304,4417,4022,4204,629,4327,3293,3715,5214,3286,5068,4175,2166,585,2828,3266,2694,344,5305,5279,22,3090,1329,5330,3130,1267,1191,3489,1018,4195,837,5091,2998,4109,4584,4872,5498,3621,3180,2663,4375,90,4751,3672,1462,61,1080,2217,3058,3177,2383,936,3039,3268,5393,2937,3263,4131,5309,3895,4326,3190,2749,1086,1776,4037,4783,523,3883,4632,3426,358,605,444,2584,4505,1972,4798,2308,1173,29,188,5515,3101,1798,5405,1085,1883,2345,4918,1051,4025,992,4463,1915,3763,582,292,3090,3389,458,1664,4444,131,4144,12,3194,2791,2166,3560,2476,5036,5211,4064,3045,3347,5310,2928,3958,339,2081,3145,4467,705,3111,80,5049,887,4916,3604,586,3098,3162,1087,2159,813,16,1791,4282,5472,4789,5089,2195,81,356,1652,221,4062,4626,3713,591,4074,2806,2760,647,4286,1571,2832,749,700,2988,3466,4097,386,1276,1007,4190,1994,3814,1080,1060,3101,4456,773,733,895,2922,5043,5424,749,4599,4270,2330,1298,5044,5407,2677,106,3497,962,4211,4900,5371,3248,4317,2280,4446,33,1420,4524,1035,3840,2523,71,3449,4831,3541,4555,2625,1670,1638,2649,3861,3272,412,1102,314,514,2829,5127,4115,4624,4565,2718,2678,4838,1506,5123,4535,2254,4042,4940,866,2166,2194,5387,329,3015,196,5196,3712,2731,2938,2097,1544,315,1722,2612,280,193,3821,4934,2682,4558,2578,3965,4986,953,599,912,3646,1601,1690,5423,260,4692,2158,4552,359,492,5199,2998,3599,3073,4178,795,1198,3843,4195,3149,1840,4628,600,3497,4125,1172,4812,129,442,347,582,2177,1506,4017,3306,2199,1439,2187,3489,4725,2318,2985,2020,830,5432,364,717,4114,1531,3272,5063,609,3031,3937,1489,885,5105,3446,1952,3701,1462,816,3942,647,364,4819,4784,4898,4907,3262,4225,891,2488,3946,3547,292,4681,4100,1044,471,808,1378,4437,2612,2012,2307,1934,5059,2682,5050,5017,3124,195,5016,3959,2355,649,395,3413,3850,3482,3307,4841,81,1176,355,4865,1798,1398,3604,1223,1341,347,2436,3973,5271,155,4082,374,4636,3450,1108,2059,1949,4956,2712,2346,4190,3161,2545,5471,1101,4380,724,4137,4448,4343,3193,4742,1901,3762,1551,883,4115,2518,4920,1536,2272,1474,1833,3117,338,3315,5447,1743,4856,54,224,1032,2733,3631,4166,3899,113,2353,351,1488,677,1721,3753,2891,4908,2389,4838,3802,3489,424,1254,4177,5056,357,3247,3330,4318,2398,943,3329,2038,4438,285,1329,4479,3095,2218,3752,4316,610,4390,4556,2814,1279,5006,614,1013,409,2274,4437,1057,205,1315,1403,2275,4436,2923,1909,621,3154,3911,4852,1171,1048,927,2344,5367,757,4845,3644,3200,5488,4358,922,1919,2640,2395,199,3181,2832,4367,3549,4765,350,1248,5501,1093,4169,2553,3385,3647,4885,910,3963,4669,4019,3236,5264,1197,5190,3910,5469,2019,81,3983,1622,1648,1997,3187,2533,1999,679,4339,3094,5180,1112,1198,60,3275,5410,3254,5206,3625,1731,1173,4979,3078,2277,5411,3582,1295,1538,4458,4733,362,3746,822,2751,4016,338,3270,3586,5066,4897,3857,5244,4318,3355,3424,5026,1694,746,3850,3656,983,1921,5368,2348,2068,5071,4418,444,817,2894,1883,5015,3987,3478,1852,5176,705,414,1516,4243,4101,2101,4959,2557,969,3922,3740,801,4664,5129,878,237,2301,1181,4044,3673,1346,2885,4557,757,4143,2820,3058,3086,827,2556,2592,2607,3800,4564,4876,1969,3881,1433,3603,4023,3253,2701,3261,891,1479,736,4237,5106,2885,4939,989,2851,1552,2872,1241,1553,85,504,4605,1720,3202,372,4292,2361,5480,715,3159,4220,685,3210,5470,4382,483,627,235,1821,4222,1242,1003,4391,5006,4215,1849,5453,2764,1519,1892,322,542,3590,3768,2751,1687,377,1511,1329,3012,2504,3887,4132,869,1890,4083,3065,4141,3942,3794,1981,5118,3164,3191,5410,2263,4777,598,933,187,5399,3540,3022,551,3,4047,1782,1537,702,1251,2494,3794,4804,401,460,2469,866,2794,5104,4995,746,818,4712,433,2167,3212,2493,2947,2547,5112,5109,2804,4049,4237,1675,4143,2405,2578,3644,4943,5375,442,3636,2812,2991,569,1106,1588,4602,855,3648,4018,3246,982,4359,2020,5210,361,405,3827,978,4581,3763,3274,426,5249,2252,5384,4697,687,5053,896,4205,1599,2704,4238,4966,1224,133,1531,2372,4428,3034,3339,2574,3861,2578,556,2023,805,5209,3627,1051,4520,443,512,4937,4268,4651,726,3324,2478,3452,3188,2831,704,287,499,1259,85,3724,944,4343,2637,2918,3174,1206,26,2923,3867,3623,4613,5126,4780,5141,5503,5319,2384,3256,2132,2894,3585,4518,4531,4719,4978,4057,420,18,3923,4506,5058,4770,1316,3787,2333,2785,5319,4275,3121,2021,2381,2862,2866,3306,1325,937,2152,2678,1181,2338,752,3384,3220,2645,4368,1021,2214,4852,4782,5122,5079,1363,3881,5240,4763,794,71,2463,1966,1730,2891,2604,2467,394,933,3706,1686,4814,4757,2418,1129,4464,922,3743,5053,5376,4066,3110,2317,4878,3900,3792,4664,24,5501,1862,1516,2293,3992,3615,2171,3313,3836,1155,2201,4810,4730,1092,3638,2423,4352,822,4274,4937,4977,1049,3057,3953,3810,2872,471,991,1812,5434,3747,3452,3618,197,214,3666,2381,973,518,1268,4083,3400,1016,5304,476,15,232,3711,1579,5032,4908,3779,1508,1723,2033,3114,2769,3426,5505,2593,2586,3225,4186,4145,2564,4154,2225,298,2604,4935,4559,3774,5107,2583,1412,445,2518,455,693,1348,3233,3445,1544,839,3637,4161,1879,2396,3710,1926,1930,2349,1848,589,558,4185,5094,1761,2257,1759,2416,5083,2908,751,3629,763,5322,1466,4870,5475,5140,4123,3815,1594,4370,4962,2987,3376,2696,1920,3446,131,391,2820,2489,5021,1300,953,3174,3732,5351,4513,3461,648,4913,621,4748,745,1731,1734,3201,2297,5041,5077,1160,2089,3500,4547,3085,4276,5394,3083,1563,4955,2853,2455,506,2059,4600,2282,1443,2318,795,4513,2642,3402,1,4518,2239,3349,2801,3089,483,1213,3137,3097,4305,4254,5327,2899,4380,3573,4179,4993,813,2077,245,90,3435,634,1567,3205,4320,2984,415,102,3693,1769,1497,395,5041,4969,693,1931,3715,4155,2527,307,227,50,532,5142,4870,3926,44,1231,626,4075,606,2536,1913,2221,1192,4482,1343,1957,5261,5454,3577,3004,2047,3497,533,540,2072,2675,3107,2544,4728,5354,2404,2873,4543,4642,5089,141,3430,3555,4352,4838,1367,4298,4061,4247,1290,2168,253,5102,5152,4743,1316,2471,4273,4022,1376,2012,3508,4594,3494,2194,330,539,51,1061,3850,2333,1761,2114,3990,520,3669,5050,4652,5434,4787,3482,4873,4503,2975,684,2739,704,4676,307,5046,4219,4243,980,3367,4415,2669,893,4086,2541,4910,4353,2032,4280,3790,5042,4084,3146,1096,2678,3384,4518,5145,3087,4780,4307,1666,5475,5051,3441,2611,4736,2273,1729,3396,4994,3283,2659,535,4975,4289,5518,3983,2010,3118,1190,3199,4514,3063,581,1796,5349,1590,4022,3878,283,4538,23,3128,391,913,1124,2720,2120,1568,2816,330,5123,3383,3492,2533,3167,2625,4420,3124,4506,3888,1743,4077,3263,3511,1635,1959,3858,3187,4084,5008,4423,5247,753,434,422,2450,281,4162,5051,1959,637,4381,1352,4029,2170,4960,3638,2584,4143,498,3308,2919,4635,4807,3350,4006,60,4918,4014,4562,2407,2360,4917,1783,3904,1875,4284,3647,5473,5304,1428,180,233,613,5358,4762,1873,2406,1406,2647,3274,5145,1255,2942,3318,5127,4752,2608,1269,1485,3994,3981,2015,2050,2479,3966,1379,4230,1393,2185,4356,2235,1033,1866,3535,216,3889,2872,1849,2588,278,2219,3328,270,2,2138,3227,1981,2321,4587,1122,5022,4772,3590,1996,3706,5319,2380,3244,2455,2648,82,5108,2039,360,3266,3907,2001,2058,4526,2899,825,3819,3706,5145,1669,5215,5249,4219,4282,1474,1172,4275,63,3425,3627,3334,2310,3164,2029,616,62,4312,4750,4698,4850,1977,2755,2410,1819,564,1871,302,3881,753,923,4861,958,4145,1211,4324,5511,4868,656,3812,552,1763,556,1038,1477,2990,165,4330,2308,4228,4955,5187,1797,364,4661,2486,4131,4424,3984,2797,232,2490,2374,894,2738,4016,4939,1268,1387,478,1555,3123,654,431,3225,4230,1381,3203,2388,4803,2637,54,1260,854,3709,3575,3387,740,1097,320,381,2998,3490,1168,4798,5500,3178,2464,3691,3972,5060,3734,3154,578,3546,2352,3641,4295,2659,5019,3597,4105,4223,122,4562,2459,2282,338,4222,708,2668,4915,904,3094,2682,636,148,1681,205,900,457,2370,696,1629,5482,830,3250,4310,2581,5069,3224,2069,4370,4453,697,2207,1359,3921,4893,1861,3143,1871,193,3190,959,3568,5219,1683,473,1694,1448,244,1534,821,2563,4494,4978,1934,2256,1105,1199,1325,2428,4667,4570,3123,4419,4222,5138,2,2526,1525,548,1104,357,5241,5483,4909,1364,4798,1302,1767,3220,2377,3631,3845,4215,3067,5188,5424,3927,5401,5108,4233,3609,3023,1369,1484,3384,3631,418,3190,1761,3058,4171,1582,2337,1637,4640,1486,2471,2063,2634,3711,1660,678,717,1489,4475,4441,5073,5251,5028,1453,175,5031,1997,2721,1230,331,1398,3973,1161,2159,3237,390,263,4098,4395,3990,4435,4885,2948,795,830,1002,3833,818,3656,380,1063,3403,1120,4123,4056,3258,1578,254,3585,2862,3260,5477,1515,1986,1852,2835,1574,58,5519,5022,4239,3673,4333,5490,1267,2098,3247,3739,3586,5134,1851,2913,3610,937,3849,4710,3820,4834,2515,4555,2913,436,3804,2303,1691,2370,4568,3205,3489,3865,2882,4870,1708,1056,1048,5409,4793,803,4286,1324,2077,2448,3151,4292,4112,3726,503,189,2411,4036,3635,612,704,801,2389,4295,4782,5056,5231,967,1774,77,1116,2138,3122,1106,4285,3362,5106,4390,4027,2658,4102,3893,833,2619,4133,5492,1499,4403,3488,4782,1804,5367,1360,299,887,3226,503,2304,2856,1710,2118,486,2410,1314,718,1188,1594,4627,4088,848,1178,1659,143,394,3893,2434,1282,3798,1970,3158,2047,728,531,3430,1771,799,976,3255,4792,692,1608,4872,3209,1706,3448,4680,5386,3879,124,2059,3932,4776,2284,2043,1879,3156,2189,2435,1765,3544,663,2021,1295,4300,5385,3928,5504,3768,2483,5362,293,1894,1812,5277,3498,494,4198,4511,4695,2600,4,2070,1170,4325,2755,5048,4795,3705,956,2214,4550,3314,3039,2685,3941,4948,4627,1716,518,4457,3080,620,4443,3269,3452,3320,4885,2347,1566,417,4512,5361,4083,95,1935,5267,4456,4999,5298,5299,2886,2993,162,19,471,4704,1173,5384,1956,608,2324,3362,4196,939,229,3372,4277,2229,3281,1402,186,2800,3672,3650,847,1546,4827,1101,243,1012,37,1324,5355,2930,2130,4740,477,622,1460,3302,2511,5424,1481,3089,3521,4571,1768,3662,3724,5117,4568,1669,3832,3264,5207,3434,3089,5491,3712,2512,2309,2048,5373,3089,2740,4052,3133,2201,648,2211,499,176,2828,2877,2473,4425,2559,81,1974,2790,3654,810,3772,1484,1998,4419,561,1028,2053,1544,5411,4149,3120,2679,222,4093,468,3217,4222,326,619,955,961,2887,5288,719,2287,1552,3103,4283,2853,190,1603,2174,1410,3298,2949,1742,2419,3329,4264,4135,3733,5066,437,2273,4458,4941,3729,1693,4921,4488,1781,5144,1356,2429,2061,4455,2663,3662,3754,2701,5272,5120,2224,96,4707,3579,4846,2623,5134,3358,4633,1256,1290,489,5044,4985,3733,1336,4112,2365,3676,3940,1652,1965,1038,2559,2021,148,2569,5097,4874,874,3577,4685,1513,3894,4820,4065,1275,3857,4791,4061,497,2098,4797,2197,2881,1106,489,993,2447,3985,3659,5149,4634,958,4863,3187,2040,3089,1527,5375,3374,4055,1199,1808,2231,713,2729,3988,2269,173,2002,1459,2913,3331,3456,7,382,1856,3601,2637,1175,1255,4124,2440,2282,1996,1526,1197,1170,746,1070,3431,2604,835,1210,3182,1601,3404,2450,4421,5146,270,1070,3649,951,2157,1318,2526,3381,1634,394,4925,1481,5284,2908,4042,3454,1023,4716,1748,5313,1580,878,636,2040,5083,2529,1432,191,3235,1657,1711,1846,883,5028,3070,3580,5196,887,2677,511,1450,3620,2163,255,4076,971,4611,5319,4756,4145,2467,4192,3980,96,1564,3869,5385,1103,3821,927,5142,2973,1402,102,2936,2715,3543,4473,4421,2301,5366,231,5440,4550,5106,106,3617,729,5060,4871,3949,473,2691,5299,3464,1888,2456,1462,906,3571,2022,4072,4484,242,1769,1072,4513,3813,3089,252,1680,2555,2054,4450,40,5002,3968,2098,1224,2694,3618,5279,846,1657,3910,3736,1765,3989,3994,1686,3574,4901,4578,86,3956,741,944,637,4020,4555,1919,4657,4290,3675,3290,921,2320,2573,1622,4442,993,2354,2836,4378,1347,1342,3285,742,520,3194,3321,1825,1066,227,785,1160,4155,4570,5344,3939,1233,2862,708,4009,5282,4523,4828,3972,2426,3298,4423,3547,2453,535,1316,4099,2231,5353,5455,3939,4358,2763,5116,4594,5264,2438,4482,2547,3539,780,3327,3503,3824,954,969,3453,3667,759,2057,4377,5115,2746,4881,1204,1055,1296,3895,3489,868,3265,3787,3960,1914,120,4691,3221,938,2325,1002,4268,5171,1285,3516,2288,2755,5048,1549,3121,5461,1405,3769,2399,870,389,524,3093,5096,1767,4629,3285,3093,1253,4661,972,3973,177,908,1102,4004,4249,405,145,4707,3363,3613,4094,724,2262,1967,3512,5447,5220,184,701,1886,4639,2506,568,718,708,613,2088,3720,5461,5142,3984,741,4583,3638,185,3789,4357,2283,1423,1889,3984,3266,1034,286,2669,668,4773,3620,271,5481,2233,3021,2532,4243,3425,1058,1408,1591,3526,3591,5428,2908,4634,1864,3575,5367,2941,1303,4366,2359,3995,2964,597,5372,1635,3044,3721,1758,3562,21,4383,115,3977,8,3227,3717,5328,1524,5268,755,3153,1566,487,4254,3424,3249,1968,965,1834,3094,1702,345,4738,3401,482,798,1681,3850,3229,5282,1284,2623,418,4168,2914,1493,268,1892,1389,4912,1649,5516,835,4550,239,4525,5232,1517,1689,3590,1182,1044,1946,1627,3798,5261,3316,5429,5179,1435,4655,1663,1224,4504,3055,620,5297,664,527,2189,3346,4766,4810,1861,1429,3371,4174,5057,1288,5157,2624,4569,411,2086,4242,123,45,2137,3064,66,784,256,4138,2238,3535,2332,3056,2462,4657,5368,1861,3311,2362,4930,3992,3931,3162,1418,4877,3284,3207,2533,2457,2968,1664,4637,3984,452,1329,5111,5273,4716,4424,3085,706,2244,258,613,236,3479,3290,215,2557,3010,194,3473,3992,5377,33,1734,5444,2519,4298,2391,1773,3294,2631,4719,5397,4838,3452,3336,1403,1131,4518,3248,3065,3109,4199,4710,4577,1589,383,3584,5024,5054,405,1560,1186,1137,2898,659,369,5230,3943,226,2498,4526,3837,4746,2,2376,2431,1051,1781,4510,2005,4422,5519,2780,18,1610,1933,4853,5239,1637,4705,2583,615,4119,4580,4848,5444,2775,2652,4591,444,3030,1757,1654,2579,4900,5361,2742,3625,745,4156,4227,2470,4666,2217,1817,5436,2565,1474,1764,1338,162,654,268,1042,179,5230,1050,4158,1247,3934,816,5171,5058,1354,3949,1827,3101,4934,3423,280,3063,2054,2881,4695,2499,1573,1677,5417,1528,1328,2498,271,4618,2280,4268,1856,4037,445,1201,246,3227,4141,3736,5491,820,5187,1860,4751,4303,914,1969,309,3464,4643,3131,469,3833,3300,2847,290,1619,2877,3058,1499,2764,4348,4283,605,1949,2730,1871,4983,1320,3486,1262,524,417,3501,170,5115,5409,726,5056,3374,3025,1553,441,3505,4015,1743,4489,4314,1444,838,79,3062,5386,4937,1140,3837,1048,4378,981,4294,306,267,4474,4543,4070,1906,3858,3267,5287,2868,3165,5290,3270,4365,1583,4939,3895,1845,1218,4099,2570,4668,2124,2105,4043,1454,4878,2915,3842,936,895,470,960,674,549,1606,4704,2961,1813,2908,3029,3189,1550,3117,462,4249,1951,5094,3340,884,5422,1209,2553,5397,4665,1503,1253,5406,4131,2266,1637,4089,4070,4234,3654,949,1777,4964,4590,1060,3158,2945,204,2196,1699,2185,630,1484,5457,4853,1882,4411,1048,2925,5139,2908,601,5201,4827,5221,4020,3358,3779,4072,148,5188,3158,3693,3558,68,5150,705,3342,1771,4243,2111,4209,4580,1905,1778,1550,4080,4285,753,1751,1223,3519,2444,1936,733,574,3497,2952,2632,794,1301,255,2712,2609,3214,5006,1069,1615,4928,3542,48,48,1549,1972,3574,2475,3182,2698,3818,4297,1278,5031,739,2242,3036,2398,2201,973,1522,1810,3431,1070,4817,857,5476,1511,3681,5213,240,4489,1438,1722,3215,1852,1039,3277,909,1199,4383,4211,3080,2104,5196,1907,721,767,1205,2917,3900,184,2340,4975,5383,1636,4773,1067,2617,5146,4375,1513,5341,2959,3777,2383,2570,2901,3119,4288,5432,3220,3524,2338,2404,1456,3126,5013,1419,2833,5228,4851,196,5329,464,4010,1947,3948,3674,5294,4640,1606,4951,818,4368,1270,5213,262,2715,823,3743,1211,4271,446,1395,4903,4184,1854,2768,570,3369,1781,2923,2650,2350,2975,3790,5009,5117,1530,4178,4087,1669,4833,2937,2808,3455,832,152,382,363,2614,3789,1790,5080,1287,1923,1408,4354,3093,3454,1929,4446,69,2881,978,5054,3256,2073,3849,175,2380,4793,1951,56,796,2503,4810,1312,2174,1721,2065,2955,5121,507,4879,4502,1308,1530,3312,2144,4894,748,580,5025,4917,3303,788,412,4162,3230,2110,1008,736,5278,4901,37,1975,2688,2562,595,3235,2144,4713,5437,137,2704,519,4752,4410,3169,2396,3997,4154,4571,4163,780,1746,4516,2310,2599,1759,1069,1035,1458,2405,4035,2548,302,5074,5469,24,450,952,3552,1847,4169,977,3465,1322,5266,522,1808,3529,574,657,90,2662,21,276,4575,4300,397,2275,1814,2590,1581,3939,2076,500,3362,1588,4182,1382,2132,3664,1841,2439,2687,4499,4379,2326,260,241,171,751,2285,4187,5368,3134,3441,4715,3903,911,5072,3753,745,4833,2759,4998,3211,2027,3933,2328,5100,396,1273,2962,1800,3564,1165,3392,2437,3497,481,3061,3997,3777,2440,3476,1425,1819,5028,4089,4957,4697,3983,3597,1033,3184,1932,4876,2809,4777,4215,2795,5031,3965,2269,3916,3992,5460,2623,4986,1633,1247,1919,17,3252,2220,3593,4771,3380,3475,3629,3562,206,1453,2499,3582,2589,3271,4810,4254,3569,756,206,3431,4174,398,2197,2613,3104,3812,302,228,1483,2241,4597,4097,4651,213,2643,3599,1807,2042,497,2251,4290,482,2064,1644,977,2375,1722,2308,2109,2717,3346,3130,4840,2390,2698,1359,3175,1088,2838,2335,4839,4422,18,583,5495,2731,630,3954,1739,476,5311,1212,1152,2611,3906,162,3837,1110,431,4311,4891,4918,5433,3881,3668,2431,4153,3280,550,1853,5395,800,5411,3104,1762,1505,1649,1405,2714,1867,2424,4083,1266,4731,899,1538,5379,4769,798,250,2366,1978,5384,621,398,3330,4932,585,4542,1766,4239,4003,2293,847,2617,204,4234,4938,336,1388,2680,5016,3200,3097,2348,1243,1116,2976,5091,1022,4870,300,3093,418,1407,1001,2001,4270,5522,3181,3992,4586,4064,5134,1816,629,1946,5098,5031,67,5342,530,2085,2629,3268,4224,830,3425,4997,1668,4107,1300,4413,1493,1505,1627,4275,1065,2808,1539,2424,2479,920,1021,2448,4832,3014,2196,2496,4174,3771,875,4134,758,1159,2178,1381,2247,2470,240,2545,4162,4592,3710,561,2796,5291,2404,518,1614,3950,3390,4217,130,5367,266,3711,2824,3537,2480,2917,4723,951,4804,386,4270,166,34,2393,4499,4164,3271,770,4082,4829,1742,2131,4622,180,4653,5195,1194,5519,4188,4466,299,2270,2328,1943,3577,1427,996,1453,4157,4102,230,1031,5152,4399,928,3868,5068,4971,744,4591,957,1176,2376,32,2522,1130,4135,4851,3182,4586,3284,2715,3588,2300,4518,696,2600,1301,3783,2512,1124,4789,5047,5030,4432,22,1335,29,1807,2702,2590,683,2764,2535,1364,3822,3862,695,4201,3537,4628,372,5210,4778,3707,4411,783,1606,1883,3115,2508,937,276,5214,2140,819,5281,3353,4282,3605,1459,2912,3288,2866,4090,3020,3345,175,5021,747,5402,5230,187,1762,2305,5243,1630,3149,5190,944,2657,1165,3624,2131,993,628,4388,5223,1057,4340,4343,5254,2389,3886,3108,5290,2718,5185,55,1896,2321,2287,3292,115,4244,2612,2850,4716,4060,4353,1846,3192,5161,5285,4310,381,4761,3212,5431,851,1936,182,2662,4208,450,536,3781,5418,746,1868,692,2342,135,841,675,278,2046,2386,634,4880,2584,222,1538,3927,5098,1798,4163,2583,2941,4910,2628,1954,566,4854,2637,5406,4809,2580,203,4519,3025,1834,2653,1011,4611,835,4265,3944,2400,2568,5257,441,5066,879,2581,35,4841,163,4345,4526,3487,422,1881,5114,3064,2635,1896,4043,5138,635,420,5326,983,2990,3350,65,473,2408,2805,1333,2659,3077,1214,3068,1609,2546,1440,4060,3696,2002,3263,4469,195,2445,4723,3607,1197,1149,135,1119,4298,3982,1129,137,1420,791,3412,2198,3698,5416,5098,5334,4117,2386,3245,2084,4607,336,2556,229,5505,60,2465,1302,1047,1114,4272,5298,107,2283,1915,3266,4950,1256,2770,2118,895,438,3368,3068,667,4257,4747,5488,4174,1711,417,3519,1537,2256,2290,4795,653,89,544,4397,3681,1399,357,2383,4063,46,810,2237,2584,868,3572,2886,3948,370,4431,4177,3696,2955,206,1123,2448,776,669,759,1711,946,3135,3979,1247,3360,2233,161,1315,2113,4330,3092,3576,206,4620,1708,535,1386,4859,4804,3869,2986,4306,1035,813,1676,572,4770,5468,1199,750,3673,680,405,4198,3015,1381,971,1908,4636,1475,2304,5255,4159,2678,383,40,4483,2630,1431,4780,2289,2382,3916,5090,2153,831,5310,5444,5394,976,3544,4012,2639,3165,2139,1023,2533,66,2979,920,3074,330,2578,1767,4793,2457,2573,797,3467,2071,5259,943,843,1143,1176,4315,184,3329,3053,1161,2872,1464,2124,2349,3800,5307,273,4443,4396,506,4002,5475,5090,4209,5296,3955,997,4451,329,930,4515,4496,5329,4696,323,2192,4958,2172,3504,1843,1681,660,4141,2924,243,3373,3112,1036,983,2396,483,520,70,5417,253,4236,4271,635,5502,5284,2492,3175,3763,2847,287,3741,3030,2142,2607,1134,1865,1384,5210,1308,4016,2989,4183,4630,2186,4039,830,5216,3835,1123,1627,4654,36,4091,2759,1952,891,5078,95,913,4102,2071,2070,125,1401,1046,2881,3789,1551,4712,5192,786,5187,5523,1707,1157,1612,4061,960,4716,1743,4788,4040,4083,3930,3162,4891,2480,1413,3783,4237,2856,4773,632,5196,2526,2150,1449,2180,2134,1575,5313,4667,4366,3203,4226,5325,2498,5061,786,1271,3054,3286,1250,2044,176,4697,2284,5266,1766,203,3662,4184,3109,3474,439,3772,3083,2948,2788,4573,1070,4561,501,5011,1514,4570,5488,648,2874,2736,2094,5251,3694,390,748,1966,2686,429,4174,3010,610,424,744,5016,1240,1649,202,368,2063,2011,1204,4314,1101,5393,4446,2970,2427,170,3482,5512,30,3992,2474,4839,4916,607,1165,5460,1161,1822,4681,2503,4218,1499,2543,2038,2183,5071,158,5219,1906,1129,293,168,1965,3170,2478,2057,1673,140,3706,3529,5469,3637,4517,290,5068,1169,3007,3789,121,158,4830,1274,3336,5456,1264,869,4099,2378,3001,619,109,3620,2053,3300,1428,2292,1875,2767,1121,1319,3279,4124,4202,3179,4209,579,2501,197,1755,4729,5355,2061,1942,5453,3937,1284,2033,3774,2845,2576,358,364,3610,4768,2710,2600,2827,1113,3901,442,4213,4825,575,3323,1126,2485,2524,257,4236,3800,3715,1755,3474,5256,1985,429,577,2201,5168,2483,2631,3992,1377,4769,2728,4599,114,2337,2718,586,5030,4484,4981,4339,1239,3452,3867,1097,3463,4273,779,3467,3084,401,1000,3463,3238,3021,4859,3663,78,2100,2677,880,292,1176,2091,3941,5132,2021,3492,1111,2239,4627,2320,4831,2083,3439,475,1872,1599,689,3021,747,588,731,4014,2405,1802,2118,13,2858,4273,5332,1444,3557,4349,5499,979,1360,1458,2003,540,3376,613,114,5381,4815,4887,4881,2061,3416,2802,3454,674,2678,2007,2416,2875,3501,2744,2777,2872,5338,3171,453,340,4974,5508,2858,3898,4308,4377,2791,279,4033,4960,5305,2124,2408,2434,4000,4794,4949,4116,3814,2155,487,1285,1046,1209,4886,4833,3770,1080,2362,550,5225,2546,2444,5468,475,3987,1145,3626,3321,766,3272,4479,1161,4323,1033,4975,5030,4086,2398,4661,3485,4755,3182,1066,792,722,3111,808,1276,1381,3498,4374,365,5023,3085,3314,2051,1770,1601,1781,3881,2639,3694,3650,1943,981,139,4605,129,2210,6,3262,2258,383,441,1998,4864,4743,4777,818,920,2281,511,409,120,3531,41,1256,4295,952,860,1302,136,4497,1990,3450,1883,4227,4834,3006,4764,5377,3981,5230,5074,1738,2335,1278,1609,5047,5468,1171,2567,78,3139,1861,3833,2992,4586,4385,2812,1643,857,4538,3630,4140,5044,2621,729,4936,1039,3490,778,2169,4871,4586,2377,1987,3588,5256,2960,1261,4662,4733,4923,863,3412,1537,1558,1215,1353,3139,2469,645,3586,3485,3834,2136,3096,4377,4786,4814,29,1837,2322,3945,5517,3524,2041,3767,2791,5493,5375,231,3727,5408,80,3597,746,3117,4202,5122,3104,205,2177,3153,3170,3779,5415,2759,390,5276,4831,1815,2695,2873,3692,88,2961,734,1703,2394,3032,770,1483,537,5315,1716,2120,3781,5191,1432,3628,2486,1396,3714,1515,5181,2431,3042,4287,1707,3224,1863,1285,79,757,3600,4066,6,2287,3447,3602,2515,3779,388,3577,2542,3036,922,3160,185,4294,1231,4579,3995,1664,58,2661,3217,3964,754,1584,689,984,5372,4159,2698,363,3820,1045,2707,3209,3516,1068,295,417,2493,345,4004,5181,653,2470,678,768,3311,5015,1065,1755,4857,4021,4192,1034,2723,2275,4363,369,4759,5335,666,3822,3693,4159,3061,4426,3380,3619,1548,2293,5084,3963,1848,2689,4484,1613,1356,549,887,2000,584,290,5482,4930,4038,2863,4885,4001,1800,1710,5350,870,1785,3096,2862,4585,5503,3879,5463,2057,5121,3249,2347,5314,4220,4738,2273,5021,3049,1889,2250,3791,5417,2457,992,4653,1953,1033,523,4085,3737,1842,1524,3973,460,885,563,5426,1841,618,1864,2412,4779,685,146,3948,3804,126,5359,4062,2155,2458,4951,2460,4014,504,5458,534,534,5371,3212,3389,2978,2368,2445,1849,3134,1973,2745,4592,3270,3289,4804,4772,2458,2470,821,2960,4362,603,4929,4486,2526,2272,5210,332,1246,5362,3594,141,3950,2974,2073,974,5259,5207,1895,3644,2006,3361,5032,314,3694,3554,3689,4342,2030,2586,1763,826,3748,2547,1050,2940,2707,2174,3952,1954,3664,596,3601,1993,2987,3385,4999,1911,965,2707,2276,1682,3307,869,3744,5235,2568,858,4032,1623,3481,1256,195,1715,1126,3132,4216,4394,4847,2389,4620,1865,1924,1289,5110,4270,3182,2253,1494,1553,2557,1876,793,1726,2323,4975,4381,369,2077,1155,1657,2449,1781,601,2771,3796,2278,3879,5176,2993,1816,542,151,4361,1687,3677,2954,3035,106,4800,2977,2776,2700,1409,2713,265,259,896,3406,2282,4731,1011,2017,2531,1957,4693,218,458,452,4603,4485,4156,4799,175,5337,4077,1165,2739,799,5422,2825,2136,1710,1993,4143,4106,2479,3378,4121,983,4662,2749,3361,2825,1405,4677,5157,852,3425,830,4080,2986,2396,2399,3984,470,4247,3914,762,745,4020,2298,827,1399,2224,4695,4573,5129,5210,2692,3949,1015,4759,1560,1321,4256,1364,3703,696,1933,3379,1635,4366,4784,233,1636,2435,843,312,5207,3442,3865,79,3634,5112,1860,4923,4721,624,4910,239,5071,235,1319,4027,923,1027,3279,3333,2707,1053,581,4215,149,2904,5013,1502,5223,555,4156,3244,3753,2172,1460,542,3324,996,4243,4081,3824,4234,2321,2638,3876,4120,1685,5136,706,218,3152,3207,676,1132,5169,5432,2789,2222,4988,3630,928,3951,459,231,5053,554,331,896,3171,1049,450,173,3271,259,3472,5414,3523,3246,4275,2448,3057,350,4709,4396,2134,3829,4348,2162,569,5160,5121,868,1650,2833,3569,313,3627,1891,86,1144,977,3139,221,1101,4312,472,1155,4910,1823,2143,1578,338,218,4951,4649,4717,3786,4202,1775,869,4829,5372,3336,5221,375,1773,1267,5149,3601,2020,1664,3195,1340,4858,3952,3515,1120,5037,4103,3640,5120,4783,2919,4656,3397,4366,1216,5515,2511,5472,5488,818,3221,139,4292,77,3154,3630,4535,4826,2592,3681,1230,5438,554,3905,4743,1375,4747,1025,2195,1091,2317,371,3667,3549,771,4166,1272,2912,1417,5512,3745,5060,2568,346,155,3016,2439,4758,1934,153,1311,796,1909,2546,1907,5202,3902,4857,2691,4722,3535,275,2934,756,3987,2326,203,1615,1063,1030,736,2066,33,2635,2343,2948,5314,1322,2678,4407,2280,5297,4028,2617,1212,1890,5374,1908,1128,3731,2250,4035,4926,5049,3332,3895,4808,5441,5465,357,2496,1080,4932,4207,2347,493,4684,498,2249,2956,2686,3684,654,2032,3372,3182,5065,1950,3855,2973,2240,5091,2085,3968,5115,1672,3272,5466,3273,1229,1315,255,4665,2232,5070,5425,553,1934,4883,686,2445,1079,1373,304,986,3505,3299,1792,2957,1422,5341,203,1808,1574,5255,329,5148,1768,2883,2617,2811,1966,4862,5009,297,368,5225,1028,1056,321,919,1925,4973,1499,4604,640,5257,5293,326,1119,3237,428,2461,3577,5376,4068,5013,3223,766,4703,5419,5181,1114,3048,2567,3687,239,3507,5293,1078,5155,298,1641,4214,3010,1030,1107,2193,2165,3769,3825,2569,3917,5316,1441,227,2561,558,4612,4626,3476,5272,366,3534,614,740,3311,3389,3918,2548,367,4272,2639,1798,3456,5116,446,4033,2620,3570,2960,3601,3295,573,1148,5030,1524,187,4482,2976,2002,5014,568,591,3295,1688,1234,2253,3741,3501,3766,5289,4867,637,4687,5316,4414,4501,693,1551,2355,1515,3375,2525,5199,3658,1258,287,4477,1473,2828,2079,3132,1984,1164,2465,1616,3629,158,818,1510,809,1092,4412,2046,2850,4768,2483,4297,3145,2076,1730,4381,5091,2642,353,958,857,619,2128,4368,3770,5075,4914,1858,66,4319,2880,1257,2862,2168,3919,4748,289,5446,1427,4407,974,1414,5402,46,93,1710,3310,2801,2753,1078,5389,759,4735,395,2689,4045,2422,418,2565,4428,3625,1788,258,2140,4956,4138,3716,1566,3881,208,814,2454,306,413,3693,1357,4088,3204,5016,532,2074,4339,939,2014,2652,3136,1422,4116,4232,1420,2862,5481,4971,3116,4458,3514,1987,3101,4212,3252,5456,3767,4968,674,4675,495,5325,905,1659,3298,3190,4890,1757,2984,1790,1918,5227,1585,1917,3023,1225,319,4069,3258,2625,3060,4582,4520,3533,4302,4187,4788,604,5219,1597,3451,4261,4931,4639,2261,228,1540,1748,169,4910,3956,813,1023,4597,1006,544,3702,4004,585,4139,268,1239,2708,825,3352,395,1421,158,2611,3461,3786,5030,4167,246,1134,2088,5460,3013,2681,339,4795,3126,2292,1527,1023,4004,3008,1328,2780,2981,1114,2648,3940,3382,762,4629,1080,4477,555,689,2160,2775,1493,5081,378,3318,2972,2467,612,4299,603,3314,1374,3523,490,1070,770,5486,293,3457,1634,4788,339,1742,5255,3477,1204,3905,4620,2505,5085,1040,2609,885,0,4172,3991,2293,4196,1503,4209,1812,4045,102,2701,5398,2201,2172,3371,964,3354,5224,3725,1694,1304,630,1038,4582,4939,154,4771,3315,3455,5394,3711,1419,2245,5220,4915,3854,5335,4819,189,728,124,2782,574,2436,5335,3155,1851,4489,1054,401,533,3187,463,4481,5038,1488,3073,3938,5092,418,1488,3716,865,1149,4709,4948,622,860,4708,3448,4281,4174,5436,3960,5424,3194,2438,160,3511,2728,3971,3089,1261,2610,2449,3787,4212,2665,446,3757,3650,3147,4902,1525,1629,1221,3001,1710,5426,3382,1485,1393,2227,3483,1420,3118,4427,5248,3900,5314,368,5022,4808,3911,1505,4051,955,3662,612,1687,1265,1621,4773,3420,3565,654,3891,3550,4748,120,3669,4547,3130,1951,4098,3600,5429,83,1895,673,2659,2338,4423,2419,3272,3132,4260,4680,5468,3054,5287,1375,564,5061,1285,1874,3934,4702,3512,1108,3986,3941,2017,5280,4966,969,2396,2568,1797,3758,5290,1318,1324,3987,229,4452,2501,1725,3068,3342,5491,4348,3488,2055,2343,3741,3334,568,4453,371,155,585,2446,2771,1009,728,2373,655,846,3722,2735,3279,283,3003,472,153,5468,2986,38,4960,4673,3040,1784,2222,1780,2220,500,2470,711,5054,2262,5028,4250,773,509,4308,1748,4690,1231,2144,1240,628,4802,2018,4693,2446,2110,5465,1536,812,4736,310,371,405,2805,2907,4070,1294,2859,2419,5023,1722,3707,2559,5176,3751,2915,194,1525,4561,622,5087,1177,378,1652,2516,1367,3784,4603,4863,1659,1604,3970,1338,3590,4679,4361,1291,284,3433,2089,388,2257,4936,5059,4589,1507,3648,2512,5270,2910,4799,1243,4564,5415,4060,5291,3891,1407,2448,203,3861,2413,2355,3967,866,1919,4200,312,866,246,265,5335,4250,377,4463,1483,3158,2459,1764,5117,330,1742,2445,2570,3277,3449,2901,2305,1841,3331,1654,3433,1899,5121,3454,1003,517,3548,4237,2166,3711,2690,1490,2808,4667,3997,3343,2160,521,3154,2668,2469,2978,4562,4872,3384,2519,2992,3501,469,4308,5370,1877,3628,5224,3097,3048,3947,584,2545,4867,2358,437,3760,5425,4527,3594,3617,2540,4540,802,1634,5211,662,1492,2661,410,4651,3374,1014,5404,1309,2483,4066,2679,4531,5130,1678,5466,2623,3006,5150,4833,3527,822,4711,3491,5254,3919,2183,5263,2887,4917,1121,3879,1222,2120,685,4919,3974,3902,5468,1408,1317,2210,696,2347,474,2878,2609,242,3125,405,2534,1242,1539,2471,1250,1181,4335,3959,4261,2633,3171,2070,4337,3216,3828,1091,3910,3318,72,3301,1243,2456,343,3080,4797,4625,706,5425,4875,489,832,3914,421,3117,3845,1745,5508,1891,2906,5444,1488,316,3373,2824,4087,4069,3953,3046,661,3474,963,1978,1515,232,5384,3541,2779,4141,3192,2068,2521,1951,4192,4596,1855,4055,2672,1616,4955,5216,4124,661,4980,756,5302,5129,4085,5109,521,2139,2051,909,1256,2802,3337,3053,38,1777,3209,2142,1985,5303,2065,1844,5414,2783,5339,2780,1448,216,3884,5430,1437,4935,4592,1616,3125,3656,2581,1610,1924,3157,2198,325,1238,4513,249,3131,158,4322,3824,2160,2348,1765,2764,1616,4834,1087,1845,2532,2166,621,3271,736,1837,4102,835,738,2862,622,4333,5342,889,1165,1806,4335,1948,4544,2717,80,353,2998,2808,364,5149,2070,930,2230,1701,1221,4709,660,4982,2627,5429,3752,1314,5187,3735,344,3808,1304,4316,660,3686,1219,3088,1805,5298,3151,4639,4014,173,3025,5006,703,1328,1791,2227,2919,4276,1289,3302,936,1024,5223,4643,847,1703,716,1940,4115,5048,4524,2821,5047,1230,1529,2597,2744,751,1313,2662,4831,1328,311,1138,1803,2576,365,5209,3992,214,2838,2499,4000,1839,3930,1177,4504,5075,5249,739,1490,621,1618,3769,2419,561,256,3793,3691,757,2506,4591,5417,4729,4281,4024,1275,5359,49,2133,3595,5483,522,1716,2149,2529,4465,1199,3310,4777,82,5168,2885,3161,5203,2268,4450,3042,1717,278,2176,2744,1353,1810,5314,1862,2121,5117,3899,2040,4223,4977,2575,3544,1569,4897,2149,2319,898,5401,2492,3983,5105,4487,3372,5156,2264,2808,436,3822,5495,5374,5427,4610,2991,2937,4655,343,1653,5061,3252,5143,4733,2053,3648,1606,4400,4801,874,908,2120,4594,3690,2067,1006,45,1796,40,1985,1151,430,1145,1710,5305,4457,830,2208,5212,4656,2753,1237,3840,113,3376,3909,1341,5518,3794,5220,1527,632,3227,267,590,4174,4271,5374,455,3528,861,1506,2342,3949,1879,4285,787,2808,617,4581,1660,4083,2846,3738,4385,5285,2162,2138,5435,1525,2848,1014,2441,2338,4446,4237,838,5385,4911,845,741,3982,4809,2426,3758,1379,3823,534,1353,2417,3042,2608,1438,727,5457,1991,2678,1471,1919,2012,929,322,4877,3594,4637,2272,609,2949,1845,2753,1785,1431,4892,4104,2607,525,4433,3839,5058,1526,3168,824,4879,1792,3327,2328,2422,3497,1709,571,977,345,1084,5287,1923,254,4844,2022,3561,4814,899,4814,4761,554,2838,3327,4900,3322,4642,2542,3221,1238,602,3494,2158,4739,3744,5090,479,1646,3967,343,3678,4763,3542,5391,206,4155,2950,3254,4578,2810,3699,5154,3310,1828,5286,1589,3475,5154,2259,494,4059,1365,2153,5216,3551,30,4163,569,4543,4592,3824,5042,4067,3902,1722,3809,348,4771,3971,5355,2420,2969,924,1769,3103,1341,1047,4807,3002,2466,2152,1793,3206,3409,1610,799,855,3645,66,1688,4031,5490,10,5100,1650,189,2660,3722,4455,3439,724,4034,5280,3768,2109,3966,4972,3809,1461,3646,2102,3315,5219,1998,1632,4370,4622,3037,2514,3657,3753,147,4578,5455,4177,3425,2156,3475,1089,3289,3142,790,2664,48,3233,5116,3332,4354,1403,3721,4875,1340,4705,1624,3837,1376,2922,3039,2957,3258,1543,65,5481,521,4651,1376,4182,2464,2703,403,2896,1819,5402,1291,1015,3901,2528,3109,4058,4473,2248,4723,2414,5098,466,284,3411,2590,1191,2132,5195,5511,1739,3297,1500,3585,1642,5323,3578,2569,4384,4985,1580,5403,430,4444,3121,2958,4109,3816,4877,2215,5018,2151,4304,4699,420,2558,221,389,4329,2091,3323,2958,407,574,1102,4420,5468,3888,1292,3550,983,3798,4622,4243,2068,953,4883,2188,323,4958,3162,385,3215,2959,2977,1957,4177,2558,4678,4443,1737,5069,5511,1559,5264,399,3636,1585,4706,84,3363,4622,4569,2218,140,1354,55,4379,4923,4015,2267,356,2405,5103,4951,1919,1974,3117,1215,222,5262,3108,207,5297,2952,386,3686,2928,3280,5347,4306,4846,4369,71,1005,5040,4716,3672,4434,1472,4471,666,2694,4223,2843,4343,2,3183,3323,2723,1265,3742,834,1871,5308,4669,171,4535,4584,2906,4818,3735,3488,4830,5056,1563,2594,644,3017,824,2200,4325,1785,4201,832,4215,4722,4599,4350,1893,4191,3243,1482,2484,4986,1742,798,1925,2067,1957,3387,3538,3951,1798,3503,3706,4504,2851,5086,2633,3619,5159,3454,722,1492,2858,1647,4591,4124,263,1368,2874,1514,1510,133,3343,4974,1107,319,3839,4386,4489,3668,2253,1879,1229,1807,2435,3343,385,3109,3470,5209,4625,2846,2274,2231,4889,3494,3981,2446,110,1741,2864,1035,935,1329,3205,5217,3250,4618,4532,3421,2906,3592,3135,2582,413,4808,4082,4945,2026,1661,5151,1280,4017,4589,4789,1044,5007,1836,3609,5272,1415,4927,4471,1301,548,3221,855,1423,1932,4945,1831,2312,4401,5167,1896,1642,453,5115,4952,2196,812,4927,3759,5145,4291,1839,5303,2112,227,1281,1853,4190,1829,757,2696,1320,5067,2340,3961,4868,1591,4666,4330,185,3584,3528,3909,2294,4963,1402,2977,3496,1738,4102,1364,972,4317,5347,41,3159,3201,1051,3477,1110,3731,3733,2136,89,667,3541,14,743,3956,5462,3772,2440,4318,3676,1113,1390,397,1390,4472,4390,2107,2350,3174,2226,1394,2515,46,2339,1028,954,108,4648,4287,3031,1745,5473,4115,2258,2046,1486,5388,2102,1791,3800,1052,1398,1636,3985,4346,271,2072,5344,1741,3017,4092,3893,4287,1499,4184,3203,4392,3639,4132,2407,4468,4574,1504,2038,5525,2669,2662,2736,1758,4184,1941,1924,3359,1899,4840,2819,3252,1990,3829,5425,1738,2495,3262,902,3748,1293,4029,1720,2925,286,3023,1640,5503,2446,3908,1342,4640,325,3501,4822,5057,4554,5295,992,4703,3888,4013,2928,3468,995,1272,1963,4553,2541,4192,5264,3525,1888,2748,514,2103,2830,2002,5453,155,4530,4962,2073,2256,4901,5367,1221,2705,4807,1094,3094,5438,5396,458,4371,3211,4622,1854,4319,348,5402,1128,605,367,4193,2889,2033,2527,3533,4677,2768,1826,3355,2100,1338,2142,3751,4180,2957,3588,2264,5226,4917,2763,5061,3085,1353,2977,3653,4889,5142,956,1476,588,4599,3753,2562,3941,4957,5183,2286,999,4144,199,102,2411,550,4265,1683,3924,1204,3758,1446,1815,3389,1778,3319,2701,3166,1618,4554,1325,96,880,1710,1015,503,747,2129,262,3153,116,2375,3818,2376,2752,4529,3805,4097,401,3144,4703,2900,1129,2152,1212,3805,5223,1121,3510,2639,5045,3339,4414,2707,5165,899,921,1286,209,3098,3728,4220,1973,5067,977,5505,1541,1620,3282,2979,1850,1637,3634,3727,196,4968,310,2575,3090,3771,5246,3093,2840,5367,5150,5398,973,879,4335,2980,3587,4223,888,5171,4823,121,5194,989,1512,2662,2095,3684,842,4842,1178,2540,1071,450,4430,1269,3851,1080,155,5220,4388,4701,3721,588,3977,4128,3310,1979,4375,5497,5227,126,2661,2894,4246,3027,1684,2235,3493,4367,4705,430,629,504,1655,326,3512,4537,4001,482,1388,1623,3573,1896,1266,4427,100,5334,4091,5003,5237,2814,4503,21,2524,1273,2801,4374,2482,2060,2937,2398,4766,1858,1677,3377,1653,1790,3270,3460,3643,3946,2125,15,3002,4285,320,4897,1962,444,4892,4210,2659,4403,5469,3136,597,4888,2048,1363,3858,1186,1464,274,1372,4587,2346,632,3164,788,4618,2855,743,901,854,179,3386,4002,4037,4531,2200,4713,4121,985,2316,277,3864,2467,4158,1931,2814,1930,2513,4392,3953,3749,3490,2216,3716,2432,2756,1571,2534,4623,3058,5093,4144,3807,2700,2340,2870,295,1459,2542,565,533,2268,43,2426,5262,4673,5437,1253,4650,3584,1414,2796,2886,1800,2127,5105,2490,3796,3118,711,436,4232,3488,1057,82,2841,4742,3130,567,5364,3444,3173,3382,1620,2369,954,3123,3141,617,3474,2213,1611,4976,5122,4477,1625,2415,4977,1973,3062,3316,4643,2188,3440,4268,469,3846,2262,2843,539,5285,4178,485,1730,2114,2268,5412,3180,5098,2300,1734,3827,3089,5314,2210,1648,2697,4540,2578,5370,1492,3556,3133,1698,4781,2641,1472,5299,1292,1980,2893,2878,2870,4299,710,5089,365,746,2483,5236,2527,3401,4244,2932,485,3953,2845,1214,1867,4401,1470,2136,3130,4338,3601,231,2294,381,3815,1750,2289,1962,4647,2783,5194,569,4275,1353,2851,3170,1327,4674,3827,4757,3801,486,4748,957,4166,3015,2462,3794,2032,2847,673,3445,3837,1841,1687,3429,5472,4873,782,1369,206,5231,4852,154,4994,4219,3315,2695,2192,3597,4590,2879,2618,4387,3195,4588,3825,3098,2515,3248,3925,113,1505,5482,3583,3495,2478,4616,2871,4155,2601,5439,1753,2729,1585,1477,765,3494,4605,2834,3323,4126,469,1397,310,2955,3303,3514,703,3055,1466,3652,669,3563,2727,3524,2890,2717,5029,4136,5115,1111,4580,605,2560,196,2780,5187,4629,4264,787,5512,3160,5495,629,4576,629,2131,2046,3928,874,5327,800,2244,3473,872,3773,5460,4642,5386,1195,1188,3951,3926,2577,3780,3705,243,4468,4995,3018,2756,1977,874,4687,3302,2170,4232,4842,4287,4920,1058,1036,3912,2538,3569,958,2320,4703,4690,4662,2178,4955,431,997,2837,5218,3326,1033,4012,3913,2379,1497,5104,3291,4499,2229,5152,1258,4328,1790,2561,3113,3910,5386,2849,1559,2238,3022,1514,1657,2559,83,2859,2029,2875,429,1379,1891,3676,4792,175,289,3170,4514,3996,4584,232,3431,1279,132,1591,4851,4783,147,2468,2137,2066,155,4971,2133,552,253,1898,934,4155,4506,115,2965,5027,2927,201,2022,2217,1679,3088,2146,3999,739,886,5398,3299,1659,320,4294,3340,4212,4774,1630,3355,2064,3930,95,2053,3205,4357,505,514,1890,5060,4245,2291,5452,4086,2361,2095,2722,4757,4077,1477,1423,938,2252,4111,4112,5460,2225,3602,5351,4656,3451,1035,5134,1221,2157,2682,2572,938,511,5058,2106,1234,2765,5216,4571,1505,2843,1452,2180,3063,2664,304,2331,1260,4677,1261,1516,531,3643,270,1836,1826,5189,3139,5406,5024,273,1210,479,1192,5003,2811,3013,5303,1886,4709,3114,1748,4199,2188,3247,2147,2026,5473,2402,4726,2290,3757,4821,3715,1617,2462,5227,3931,378,4686,2360,29,5062,1684,2726,4475,3794,3807,4704,4337,245,2719,1614,3960,1542,9,2894,816,1226,4785,2685,3993,954,2635,2935,2309,4475,4395,1814,4241,765,1916,3452,1958,5332,5508,2207,984,3404,3882,2258,4540,736,1649,5138,2980,1270,1682,215,3263,101,4503,533,490,1625,4161,684,2869,4238,2991,2294,2872,1115,404,1331,3657,3549,3277,1524,3463,5152,2972,1766,5142,3475,457,3476,4764,47,4265,2254,2197,32,4202,1027,2852,3938,3512,1822,2719,429,3314,3985,4369,3255,3045,3680,2373,2624,2639,2136,3206,2601,2766,460,498,3248,4838,239,4784,853,2134,1249,1780,5219,247,3942,2057,223,3246,1810,4241,4519,1046,542,3311,5406,2445,4636,657,1799,2880,1816,62,5314,835,4210,85,4454,5481,2207,882,2247,216,2219,1538,798,1199,2998,3465,3898,4842,3637,3466,3342,4053,114,748,2900,3212,4883,3319,3608,2469,413,2933,2404,1826,1600,3968,5173,1966,1747,2187,5320,4170,313,455,3160,2861,2599,3035,2360,5445,216,3285,4118,4212,1623,3354,3051,954,4547,176,4487,3240,1148,3901,4743,5066,1315,2332,244,2143,4875,527,4925,1871,699,2198,242,2627,4079,3906,5403,2494,3234,3364,4998,1341,4050,617,3906,601,2880,3151,1682,4656,1161,3393,4879,5000,4522,4327,4876,1207,131,4156,2695,1463,2256,4589,1183,4861,3970,2565,4292,4257,4867,3719,2394,5377,5184,5355,3544,661,2472,2446,1657,1214,2513,2863,5358,3298,5523,3860,399,231,4312,102,5501,106,4696,912,2391,1698,5059,2500,3630,880,81,2407,4315,1861,888,2612,379,1048,2595,3796,1764,5498,175,201,1728,662,2892,863,1980,3519,435,4622,4412,4127,4163,4958,964,96,2168,1387,2153,4495,3260,2340,1748,1216,1024,4229,3545,1315,5506,3247,3348,374,811,2537,3910,5442,359,5347,4822,1144,4349,1567,4013,3090,3365,3823,375,611,4427,4104,4374,1477,4070,4581,1861,4000,4569,932,3417,95,4590,4101,3254,1795,854,5096,3241,3025,4805,242,550,4181,3155,3357,518,2832,513,5424,5396,2954,4839,4516,3727,441,178,5172,2375,1934,3596,493,966,4180,3719,4503,3674,47,374,501,3872,5419,835,4451,217,3353,79,1954,566,2637,257,2210,3396,5226,3866,3435,1053,5324,3418,4911,1112,1587,4804,4769,57,2574,5161,4420,3668,308,611,581,85,2995,4870,3861,1042,4663,125,3789,2735,5367,5501,660,1504,4558,2476,3870,2196,976,2767,2502,887,4903,5057,4960,4294,1508,3988,2483,4848,3422,5485,1478,4004,1723,869,1532,471,3930,1413,4366,5278,4497,2949,972,1413,350,971,3797,1473,5229,1849,3624,170,657,4762,2521,5051,2933,4202,2818,2830,338,1863,3430,4819,1228,4905,399,698,4999,4751,4501,4685,1550,5057,135,5031,4534,4235,4666,4512,4585,4715,2146,5125,3010,231,4625,87,2342,2397,2865,3694,1297,2553,1875,4778,2463,2855,1927,3451,5167,4876,4232,1699,4507,2471,3574,5062,4325,3236,5121,263,251,1288,1126,1583,2351,370,376,2004,3919,2432,4871,4955,4132,2531,2163,3603,1172,2122,3708,1332,4088,5335,4559,2382,2625,3926,255,4508,4944,1279,3666,608,4916,2872,3662,1539,4515,4461,5258,2916,3852,4850,2201,3894,3809,3534,2033,4856,3975,246,4132,3299,426,3495,5040,1094,385,2233,4422,3593,3744,1009,4658,2388,3741,872,2238,1245,304,2589,4389,5276,2438,2366,3917,754,3741,2312,210,4100,1585,823,5225,546,992,2079,3081,954,4642,4846,3025,989,284,4693,2395,4807,494,4045,5292,398,2776,3479,4455,2706,2876,2738,4098,3655,9,4072,2324,130,3949,4084,2231,4656,3738,5225,259,1943,490,5360,5116,4090,75,2795,1828,1189,5223,910,433,3403,4725,1485,2696,3831,3017,1603,2607,3527,5108,2297,1542,2045,2953,1439,1481,813,2174,2243,4512,2337,4042,2464,5282,289,1301,1250,2032,3352,1341,2350,622,2242,1765,4049,2793,1773,2810,5365,2423,2068,650,622,5509,2401,4090,16,304,3804,3829,3470,3850,4364,4996,1338,1274,1026,91,3218,4890,4974,2048,1863,1025,5370,1498,3321,3551,5299,5389,974,4186,2886,5214,3313,4078,4424,3564,1311,1071,2335,699,2505,4993,389,2318,5224,131,2723,2491,11,3499,3471,4456,5423,697,3727,4454,1003,1747,2006,175,2107,5278,3973,2300,5194,3271,1617,2961,2077,5328,5136,672,3155,5449,4294,609,2026,2882,4278,1140,5418,216,4778,989,5232,213,4702,3192,3610,1743,731,375,2591,2453,890,4618,5261,1660,2426,2706,3237,527,1413,5266,5502,198,2181,3103,4362,5412,3255,5158,764,790,4317,983,723,4502,1173,2009,853,249,2633,4439,5487,1349,5067,4083,5058,3568,1100,1317,105,1897,2310,1674,4391,3186,5249,2148,3945,1932,2015,1764,486,2864,3979,2760,3886,5081,4937,2037,2878,759,4184,4119,1397,3784,1674,4961,1227,308,57,327,4668,5005,3526,1220,207,4854,1402,823,1180,3217,574,563,493,3662,2305,3777,1689,5201,377,2337,3420,5463,5105,3681,1427,3655,1261,3987,4884,3653,646,5323,2758,3655,2948,3673,4099,4344,2311,3415,323,3012,3265,3815,3083,2898,4451,283,2657,3244,954,1555,4334,3165,1602,3533,3745,4008,1284,4523,4403,1091,1131,3739,5106,4246,1988,4462,2818,2544,3201,3932,2988,3619,884,3874,1560,2290,2010,2072,4845,1319,1023,4489,676,63,5018,1514,2885,4392,2223,122,507,1989,2877,4510,5267,3589,3468,807,783,699,1729,2919,2117,1083,869,4290,1045,1719,4496,4523,4320,2813,3819,4244,2474,1838,4687,480,4302,429,3351,22,2338,3363,4641,2333,2237,984,956,633,933,5506,5236,2063,437,1492,1130,323,5168,4453,3930,665,3048,5374,5272,1271,934,1346,3231,904,3492,1438,3716,1452,5030,1468,1067,3633,4455,4419,271,5500,3569,3637,3907,2867,4749,2408,5429,1522,1179,1155,2515,3502,1771,5405,3881,4681,549,4234,3173,3293,5402,129,4034,4225,3906,3335,5176,2601,75,3874,5520,3905,4107,4496,4143,3763,568,1987,2765,976,824,2808,3202,523,209,117,477,528,3773,4496,869,3234,341,1613,2402,2898,4173,2719,4474,3419,2188,748,5285,2844,1606,4694,2851,4122,5056,3822,1821,3609,2010,4391,3874,1639,1825,3346,1131,4390,333,3082,423,3085,4815,3921,2503,2929,5003,2799,3517,1167,3110,1120,2837,4935,3416,1104,2201,1353,2342,4189,3304,2984,4415,481,3668,2154,4670,4834,417,1048,4261,1065,522,4320,1037,4121,654,5124,3332,673,1725,3300,1752,413,2382,3567,1338,137,290,1121,4245,1235,3060,2641,3401,5082,1244,3469,3057,5268,898,3735,30,138,3131,4247,3077,1808,5332,1014,5044,1942,3951,3960,5244,235,3547,1763,2997,2266,4593,3138,4428,2503,669,3061,1307,1556,1133,5015,4848,1328,143,2028,1745,2570,2255,2969,4587,4721,2756,2671,4346,3572,1211,3166,1688,243,2298,2467,1629,2633,5096,4165,554,1307,823,3481,1638,4939,3935,4336,1699,2188,3990,4965,2978,2602,478,3787,760,821,1593,3658,235,3602,4234,54,2624,1577,1204,149,4664,4418,4683,639,448,1761,2667,3061,1245,2068,5252,4988,1959,1117,162,3904,1064,3979,3644,5194,572,1894,719,1185,1564,325,4844,4205,2004,1464,719,4218,2420,4533,1877,999,4910,4165,1791,4277,5073,2180,5394,2496,4814,2761,4369,4494,508,4052,1504,3549,5251,2613,3641,5018,5316,622,5194,3059,1140,3579,3430,2063,3027,2612,2045,2551,3015,3909,112,2365,1599,4582,4005,2041,3299,270,4307,1656,2467,562,876,4049,3770,5126,1288,1150,302,2454,1909,3603,3339,1760,4575,4566,1744,4405,3590,56,3955,259,4394,2650,1706,4036,498,186,2325,3775,2265,5519,3737,4613,27,3901,2139,5375,4694,454,2699,382,2549,4332,4742,864,1214,5511,2179,1846,4483,3353,427,4497,1268,2809,1417,4299,1015,5368,2101,5299,1645,1210,2474,2237,1650,1071,2398,1429,2372,4783,3712,2743,2175,226,421,723,2210,5481,1225,446,1889,4404,111,3822,5353,586,4175,125,475,4434,5150,2895,4088,117,4430,3557,212,1938,1681,2153,2489,3824,3023,691,3457,4660,2361,3063,2943,1753,1402,4116,1220,3044,1673,3417,1232,4456,301,5136,3063,853,2031,34,1334,1434,1734,5092,3102,5162,302,3011,5034,4558,304,3011,498,2653,1262,4912,3876,5256,4873,4204,1928,2214,2529,322,4213,526,607,546,1433,5183,4640,3800,2385,5031,3011,4117,3265,4213,1417,2041,1294,662,1625,172,2875,3111,385,1849,5337,1118,3346,4007,2047,5338,4200,2610,2730,595,2522,2059,4817,464,4214,2185,2864,2642,4881,2805,3845,3535,5169,3713,455,5517,2204,297,1153,504,1537,2122,21,742,352,3125,5204,2641,1064,85,2299,4747,1873,5203,1534,852,4953,122,3758,4042,464,4515,3814,883,4305,3241,3578,1296,1101,5359,1975,4434,3858,1370,194,5123,1386,500,2928,98,4137,790,4540,155,35,1542,3123,2505,4423,1415,1927,3389,901,4576,5333,2676,1030,1401,2608,1324,2320,3054,2098,494,4086,3495,5212,2326,2553,969,4393,660,4548,948,2365,4751,728,4571,2110,2617,4220,857,4183,4314,3379,2799,3431,1569,4765,1098,627,2192,309,2858,3738,644,2352,1137,1963,2111,5312,1039,4676,2129,1381,31,2894,1912,661,97,3346,1036,2152,2604,4873,4738,1928,2706,4598,3102,4886,5233,968,3210,4872,4538,5053,266,5207,4998,5378,2428,2097,3467,4771,4810,2503,3991,231,2057,1520,2942,3870,102,4954,2769,2825,5203,1924,4876,4214,1150,1268,2530,2326,3396,750,3943,4486,4737,2537,58,518,1457,4308,3068,1004,3553,5294,3222,1164,873,581,5356,3211,510,3428,2635,4998,1785,4725,2680,3389,1184,3561,1220,0,4691,5451,3764,2121,1661,2376,3949,3409,1364,4402,1488,3269,143,1247,5494,2297,2302,372,2069,3396,3942,1895,4305,393,2553,1067,1759,4230,1379,3336,2133,2089,4202,941,3646,4114,510,2209,4193,4821,2881,1985,3944,5250,4134,5066,998,4137,1736,1357,2604,2699,2113,4527,1387,3035,3900,3371,3409,2470,579,4155,4806,1357,3418,1715,2248,5117,1687,4016,2328,629,1287,934,2260,724,2356,3170,2603,798,4086,1141,4347,1159,4220,1260,4560,2670,4440,2648,4332,2388,2297,1792,1970,2282,4139,1583,3324,2530,5106,4683,2848,5091,2762,2748,3378,1641,5368,2598,853,4612,761,5135,5060,2366,1726,728,2102,1270,3257,1195,317,4103,1523,388,4256,5179,4451,4457,4354,3724,278,5109,19,671,1221,138,5317,3959,3968,1262,762,683,764,5218,1839,5137,3343,193,80,639,331,1501,2079,3543,3181,4369,1317,2525,4272,1433,3728,2764,2823,859,3902,4047,3073,1202,1437,1960,2257,892,2314,1450,3728,1823,3907,5244,3731,2157,1139,3381,4209,2677,4139,1307,2607,2526,4484,5244,4625,3516,4448,3544,123,4443,2016,63,1746,4317,1579,5082,3079,2530,3254,4827,4458,2529,4206,48,1056,1237,563,18,4646,2910,1172,1636,623,3400,3651,2648,4853,2039,944,3306,3535,1492,5058,952,1809,872,3430,266,3884,2478,1645,2721,5420,1829,2872,2275,4246,2078,5290,2063,1729,3095,3776,1772,4139,1407,1724,83,2008,4015,78,2070,3742,913,3486,978,297,544,888,1601,3694,1757,3484,489,4411,3112,2640,1055,3909,2258,1422,5088,5072,3412,4849,2523,5310,684,5385,1484,1175,3178,1870,3848,630,3627,262,3651,2601,4575,4851,5260,5452,298,5165,4668,5409,1421,1572,2782,4698,1195,41,3027,144,2140,2308,3683,5068,4478,3196,3922,4875,4157,5460,115,3378,5114,4529,5498,2741,685,610,3818,4682,1468,763,5325,4459,2843,565,4800,5388,2001,4911,5069,1064,1613,4208,3933,2424,178,2122,2534,4359,2067,3844,945,2618,1910,232,5504,299,932,1919,874,2171,5223,858,1270,3642,1737,5367,3451,997,5334,325,499,3062,2557,740,3194,2537,5253,3600,1183,476,3656,3019,766,3562,1980,5244,2456,150,1659,3772,2848,5083,5421,711,43,2844,1022,3140,504,3871,461,5454,3614,3412,1355,471,3043,3367,447,2710,5177,1280,1411,2710,319,2761,1751,4377,4592,2802,2389,2582,991,2367,460,1441,4330,4336,5391,2226,5357,1605,1406,1975,3935,1404,1221,193,5001,4011,2779,592,5283,1873,2843,1400,3002,4429,216,3354,5368,3347,3480,5351,4886,4962,5488,3814,5090,1764,4722,1880,5191,612,4470,4968,2488,1041,1068,2671,2395,5097,4254,2852,2098,4000,4043,471,287,3952,1251,3733,3126,2718,894,1344,1252,1657,1478,2320,5115,4331,5090,5011,1977,2450,1113,1099,2187,1525,2991,3824,2505,817,2948,4504,4154,5139,505,2511,4479,4081,3610,5496,92,4598,1860,969,2349,3856,5304,616,228,5324,2574,4347,3838,155,4493,4676,726,1237,4987,2314,3780,752,4495,3823,4075,4460,1331,954,2659,14,2778,2636,5105,3163,132,895,3577,3787,2159,190,2506,3404,3901,4123,3354,2915,772,2485,4999,4700,2675,2508,1106,4363,4942,1476,3540,5301,2767,3918,1795,796,4954,633,4182,1492,560,853,3725,4051,4289,4596,3860,4618,4459,1141,5270,2139,1977,0,4855,2939,1558,418,2173,455,178,4501,240,3962,3307,3412,4997,2627,4046,2766,616,249,4373,4486,871,4079,2141,4126,4846,2075,2213,4707,5178,2435,30,1139,5247,2037,1113,1214,4401,538,4986,5175,4286,2682,4575,4650,1623,4235,3157,2788,1481,3390,960,137,2852,153,689,3177,2719,3047,4712,4545,327,3989,606,3657,3870,818,4357,5433,1473,4172,4862,2837,1681,1986,5350,2823,468,2037,4860,1495,1225,4234,773,3170,5342,2546,3663,475,2575,3621,82,4474,3569,4343,4973,2831,518,4103,3204,309,210,2269,5508,4216,4731,5494,2199,3918,661,3205,5350,2837,4447,4102,1323,2769,5029,271,967,1119,1514,584,1667,1577,5021,4517,5480,3368,4213,2190,5404,2117,4429,4886,2935,5426,2830,5440,4551,5408,1177,2116,4115,3360,2241,1403,4575,4365,2834,2446,1745,3996,2866,1842,3013,1698,4920,3544,698,1392,5497,4175,4016,3046,4171,5064,2106,80,4317,2338,1897,1191,824,1045,3976,2838,40,1249,4078,2360,1151,836,610,2529,1394,1639,1468,839,3462,324,606,4605,1213,1131,3250,3114,2737,2810,3487,898,666,219,4910,4246,1952,1528,771,846,2226,5332,5431,1869,3074,4017,3042,2203,1694,2122,4229,2604,1699,4104,3797,64,3170,696,1384,3258,2394,3468,3075,3305,1703,5022,150,1839,665,1478,4201,1698,3060,2653,1713,4695,1160,4978,2032,3616,3683,2862,19,5237,4674,4528,4258,3275,477,1237,23,5087,1922,2926,3182,1258,2659,1783,4674,2437,2557,4243,805,3572,1012,355,1468,2151,2931,4504,1831,2515,3534,5300,2202,4223,1262,3554,478,394,4712,4344,47,2097,1966,947,4674,4389,5317,2059,3292,1959,4875,2550,3938,3684,156,3615,2821,1247,4297,3284,3860,2946,1566,1526,473,2890,1625,99,802,2614,1523,4306,2769,1384,555,4206,3558,4926,1796,3170,2011,445,1351,2179,228,5162,5172,4890,218,2736,593,4247,392,534,5502,3809,2617,5307,2497,520,5423,2188,3618,1745,3117,277,3385,115,224,2816,2522,421,1619,4443,440,4977,450,2015,3746,1555,3027,942,2758,4214,1484,1683,436,4780,1142,2872,2119,4843,2948,4793,202,934,3516,4619,5348,2784,2908,2157,4701,1162,1200,2105,3580,4910,1274,1885,2660,3865,3290,5165,3337,22,4020,1373,1782,1397,2521,2683,1346,3457,1992,868,2255,4850,4127,2964,5204,703,1728,5200,2902,2405,3300,1672,28,3950,1765,3956,5286,551,3712,1282,2652,2714,1586,1293,2597,4172,1918,1482,4606,742,4154,2150,4691,3884,4659,3530,2262,4856,4228,4064,1251,2778,105,4581,4477,1333,3115,2519,1290,3639,1393,2758,2578,5249,579,3955,1419,3395,1942,315,3112,2188,763,2889,4289,5471,4679,4597,546,3377,1108,2347,4424,1870,3838,5309,4049,5283,4316,3746,3822,2893,1501,572,1427,5377,333,3594,2227,2098,3783,4843,1559,1070,3382,4628,1384,4311,4543,946,3873,1216,2092,4326,2127,3984,4919,2728,1805,1506,2038,3816,867,2059,2265,602,2546,5200,2681,4533,2071,2615,2392,2420,1879,525,3595,5512,358,119,2596,739,5249,5332,1658,1285,3518,945,3077,5441,1543,1284,5063,3169,4546,5213,1186,4330,90,3356,2831,3622,4407,3989,2809,5500,661,2536,1283,2357,1474,2841,2609,3853,4012,2215,704,3765,3150,5186,3092,1782,2128,3992,3073,3797,84,5148,3088,970,2773,934,355,4286,2690,4374,223,5276,2844,1420,2862,4752,1691,5428,2753,2768,5400,5189,5502,2552,2447,3084,401,4435,1540,5351,1298,2747,1554,4603,4420,4547,2912,784,256,2391,5500,971,4969,3816,3082,4490,3958,230,235,4690,1135,1977,5167,445,1681,4447,5414,4752,3571,2660,5389,4254,4868,5242,5224,1418,3712,1256,2578,573,2877,2766,15,598,23,852,4955,5049,3550,1583,2995,982,3291,1390,3950,3960,4690,4367,2816,2942,3399,4200,2874,2992,1247,5350,4226,4861,459,825,788,8,256,3889,2126,1808,5111,129,1306,2390,2639,4154,2497,4586,65,1474,412,5263,5085,1649,604,4540,4016,4763,2777,2530,2826,3794,3802,5378,4667,1770,716,1596,155,322,4788,4748,3669,1696,1066,3152,3769,1106,2822,4212,1624,1983,4499,4890,5168,3072,1268,2693,1655,5384,3952,5201,3469,1142,2250,4515,1843,2909,2904,5472,647,3479,9,1648,3749,4581,1322,2090,2045,2970,4658,4719,3917,5041,3517,345,150,4565,2233,5362,1526,4922,3847,2377,3938,4006,2396,1585,3617,912,4776,4491,345,1103,5346,3074,2380,4469,2220,2488,1216,2825,1241,3617,1240,4867,1048,2005,212,3982,2127,4982,4682,2327,352,769,4601,5132,1679,4263,3944,1614,3682,2168,5209,1879,1383,2157,925,5450,4012,411,2438,1168,3051,2422,3682,3620,4410,763,2364,3416,1848,598,1088,976,4797,2404,2411,4537,3406,4582,3383,1457,3305,1973,4516,4068,3484,1612,5402,4362,3758,922,3335,5443,5135,4919,700,4065,1369,874,3925,2661,2957,3244,5189,1213,3501,4919,2543,5464,5245,121,257,1569,3079,1251,2793,2232,3232,3086,966,3925,4964,3873,1066,1036,1293,3896,367,162,238,71,1023,5045,531,3197,2959,3912,3873,622,1042,4507,252,1860,4289,2139,3749,1281,1430,2046,716,3686,1358,364,4688,1833,3613,3807,3818,3095,4967,3437,1256,3681,1555,171,544,5020,3982,1970,3430,4166,197,3940,1633,1725,3684,4146,508,5110,1839,909,850,4273,2937,4400,2650,1899,5198,1042,4907,293,3990,1273,601,894,4527,4193,4259,93,2127,2310,2888,3455,351,2844,3319,205,829,5454,1404,96,5223,4111,962,5410,2785,5407,254,1326,1751,3880,136,2683,897,3619,3715,1946,4824,3974,3179,4843,1277,118,161,5299,2813,1272,3297,4128,185,1749,4867,3683,1877,5266,3566,4316,1495,885,2992,4256,5422,4661,3246,2399,5458,243,3283,3405,909,4715,1278,76,296,801,2750,544,2498,3851,398,550,758,4804,5525,2347,511,55,3049,4024,132,2852,599,2782,4314,681,2234,136,43,3513,3534,2305,1201,2183,5074,2892,2711,2623,3134,4612,4250,2761,3038,1128,2042,250,2040,5204,3349,565,1516,1936,4672,2922,4480,5103,5388,4674,1081,2358,422,4587,2672,3558,2819,3174,4770,1209,4666,323,1627,3015,3002,4388,4433,1089,4934,3838,497,2371,2580,5153,3219,177,3565,2568,1462,147,3995,2315,4849,5240,1670,2879,457,3211,5188,4928,3208,4430,1545,4250,5204,706,2186,4913,251,3705,3987,2862,1248,1346,2353,3269,4542,4337,2072,2829,2713,1564,4001,758,1402,1966,4442,4200,3917,593,3006,767,4301,5058,4426,1272,4843,1134,5251,4716,4057,4247,399,3288,1118,4211,1022,3094,1561,245,4929,4793,415,5170,1345,3519,5308,2299,2266,1126,5359,4959,3017,4391,1587,3085,4193,4836,829,246,3132,1226,3226,4219,2996,3219,1604,2590,1617,1954,3916,1088,763,4003,235,279,5263,5439,178,3988,5351,3147,4425,5173,3269,3710,253,286,3325,2686,3649,3222,1043,3506,4697,4800,565,973,1639,4091,2954,5354,1574,829,657,4810,3767,4028,4547,1160,393,4261,4873,4486,433,2910,15,2819,4373,2781,1702,1455,5391,4709,5046,3188,1734,4872,2097,4084,3157,2115,1233,1468,3537,259,2420,3171,4115,107,458,3238,2957,2602,1076,2691,4327,2761,2416,4253,2322,3425,4699,2851,5175,3966,1142,4462,3120,5278,2686,1574,1037,4431,4978,1655,5060,4206,3074,1586,632,1123,689,2761,3214,4682,3892,134,1003,1702,4257,4356,4641,3971,2326,4467,4810,460,2581,3914,3275,2933,4877,524,4361,5360,4189,322,5016,3420,3954,4369,1655,372,1989,5017,5412,2556,4784,4571,4507,820,1037,4730,5433,2048,314,785,123,793,546,2476,1629,4895,4292,3374,3876,5489,713,2704,52,5368,162,1353,4069,2391,4662,3055,2143,26,4585,1927,416,3352,4314,5503,5162,3001,3415,4184,1289,3301,4261,4505,3599,2317,2891,126,3351,2723,4775,5513,3706,1626,1629,1615,1330,1602,4887,5350,1860,1261,3207,33,1773,2777,1601,1404,2838,1081,2336,2411,3631,5364,2074,2681,2973,3303,547,3315,686,551,5146,937,3774,801,4632,4169,4727,536,4390,829,2039,2940,4464,3760,2685,4835,1114,6,4253,5263,4322,4744,4063,5071,3952,3938,1395,399,5338,5019,4379,4848,5177,1996,1362,4242,528,4390,5069,5331,554,250,1471,4100,377,3215,4904,5137,3815,5306,3492,877,4006,450,2284,2094,4038,2929,2164,1068,3266,2677,978,2444,4929,5442,886,4907,1147,1855,1307,102,3405,2377,4394,1094,415,3385,1243,3595,2512,157,1709,2190,607,23,3510,1626,2415,5272,2886,3894,4482,4452,3467,5321,740,672,5041,1976,4549,5064,895,3154,4071,2202,1674,1999,3772,2928,2033,250,3083,4674,5333,2870,1550,1147,3427,1618,3334,3799,71,2394,657,1670,862,1475,2723,3726,1500,2411,2374,2170,805,1615,2317,4580,4750,4421,2273,1657,2162,2373,3163,4741,83,1296,4143,438,4561,3331,2707,3909,5280,304,4126,3145,1915,1998,104,703,3952,1447,3595,4582,3749,1744,3759,3288,1645,5366,3744,282,5357,287,1717,4503,780,2511,2854,2484,2850,4102,2564,451,1079,2404,2950,5140,3033,1532,1479,431,3188,2804,3089,1353,4220,3482,4152,3290,2016,3870,1433,1021,718,3285,2734,4064,2325,3591,4083,5064,2441,308,5351,4745,2504,4668,2615,4379,4651,4791,614,5307,3768,4924,346,4875,2829,5265,4794,4214,3088,2147,3313,3575,4641,1055,3747,2972,2707,3329,1336,2940,818,3109,1281,738,2827,5141,2134,3226,910,3174,225,2124,5049,1001,4463,2952,4153,693,4341,395,1979,1031,3024,587,2376,5370,3147,1401,4207,4439,5253,1902,3987,3424,3943,736,915,3346,5397,2411,4500,4756,4075,1922,48,1808,1920,795,3715,1143,5032,3951,1938,5119,351,5082,1465,260,57,823,2415,4906,5427,4567,864,965,4611,4456,1239,559,3542,3387,5364,1668,2746,2038,1056,4841,4563,5098,1384,3230,5362,1564,4840,3910,4379,4825,5365,1649,4255,1452,3392,5284,1303,2524,1429,4299,5080,1851,2898,1472,223,4082,1339,920,3447,3785,3978,2980,4874,4253,4437,3034,5,1625,1580,2870,4739,2102,2546,2816,5057,1657,2926,2767,434,3558,5050,450,2941,857,2421,2962,2766,2574,1752,1986,4561,196,3825,5061,990,4000,3704,4809,897,596,1670,2191,1387,4147,2140,5518,3339,1261,3209,863,5266,128,1865,2256,1196,3425,4903,391,2375,631,5423,2226,1911,3031,4036,3554,5118,3605,969,999,1993,3726,5506,5046,1818,3185,1803,4774,5188,5525,1466,1741,4137,10,1784,5377,3721,5006,5035,5460,2715,3135,810,4247,833,1832,1029,3919,3705,134,4917,2146,968,1368,3653,929,5507,4884,4825,4155,3900,4325,1287,924,999,1342,5198,4814,3720,3031,969,305,3969,563,3985,2597,4939,1748,3371,285,4496,1545,3152,3137,1208,5266,5362,4889,3949,3047,1493,2390,698,940,486,2504,1821,2044,1088,1686,3099,4260,880,4767,767,2063,2678,2709,753,936,1650,626,1910,1764,93,1339,4519,1059,3723,3253,1960,5448,4009,2820,1118,3909,1097,1223,3702,1886,2202,3296,2557,436,3335,3722,5069,882,2010,2480,2101,5029,4242,4741,1399,170,5364,176,1339,1247,5346,4547,97,5270,627,2160,1303,3427,823,3711,1254,5388,3318,993,5487,1684,2545,59,5171,934,4401,1380,4691,4146,4432,2418,1183,278,3786,4661,461,3755,4809,5235,2131,5191,281,2148,5498,2980,4225,2857,658,4271,2770,1430,2099,888,5205,4988,988,4006,1554,407,1736,3087,638,624,2729,4968,1816,1639,291,1328,1868,4915,3233,1289,4350,5258,2678,477,1154,2759,4263,3475,1541,957,5087,4457,590,3892,1894,948,2461,4478,2960,359,162,2716,4909,4822,2476,4127,4627,3029,1762,1566,3326,792,1271,4113,2039,3266,846,4431,195,3803,3657,1136,1420,3336,701,4293,4777,3556,260,2674,3999,3748,1769,4835,3969,1168,3433,5352,4106,4655,5056,4845,3695,1776,5444,5487,5164,3427,718,282,1605,299,3938,952,2739,2252,3115,3480,3269,162,2794,219,4405,1635,2864,906,2970,3604,5344,2070,2022,831,1797,3559,2468,1878,4757,3725,3019,3029,710,5382,1070,5120,1965,4882,1644,499,1876,521,2983,2689,824,5163,3237,4423,3858,698,2609,4072,4097,3049,1985,3794,2906,2416,902,330,4533,3567,1543,3649,1347,250,4014,3817,666,179,1949,3649,548,4427,5043,192,812,2809,5376,4302,3897,1036,404,5009,4787,4451,2442,3829,1319,2325,3152,3874,5142,2264,2665,2956,313,217,1469,4393,4412,2989,2244,2927,5243,825,3475,353,212,3666,3568,4843,3181,3649,1824,1432,1766,351,1797,1801,3419,5104,5075,2952,1472,501,3671,2937,3805,2235,2452,4361,5075,5344,904,5151,2282,1727,2878,1107,1131,1833,2922,4757,3764,2769,4047,3422,2922,2455,4786,1172,3414,5233,2383,4608,2853,4933,5192,4465,1470,1618,5140,3087,1584,2815,942,1545,810,5310,5398,2879,2279,4798,4329,4220,2810,4217,5361,4258,1515,4115,295,1491,874,671,4947,5060,2676,3637,5329,4887,670,959,3579,708,3268,3098,776,3777,3440,767,3621,3929,1400,268,930,3083,130,3141,1657,2075,2610,3424,1795,598,3111,5045,968,1229,5304,3316,2226,1200,4882,5035,4915,1877,2974,2470,4336,5412,2278,1694,3545,4682,4897,230,155,5112,2052,1475,5417,237,4565,5371,5420,4147,248,4944,2142,3952,5326,5123,1017,1898,2500,4838,4314,3535,3479,4709,3998,2782,3019,5312,599,264,5439,945,2138,4508,1399,3005,3500,933,3420,2802,4619,1751,3855,1545,4053,1916,3925,3276,5147,4055,1475,5301,2703,1724,1770,2035,4959,5265,2780,4883,2964,2260,710,3296,1312,1724,415,1993,1082,4323,732,3287,3403,2251,2063,3296,2322,328,2652,1412,902,2003,3804,5390,1337,4639,5166,349,3676,1443,4054,3058,4663,1271,4807,2761,2619,4670,5029,3001,319,237,257,2160,2420,145,639,3261,1697,4975,3899,1005,4096,5279,4923,231,4739,104,4489,1070,1827,2987,405,447,2655,2665,2944,4903,1529,1725,2176,503,2827,3477,4140,1120,2689,2310,213,78,1011,4123,4149,369,2642,4038,3742,5512,4448,264,3623,407,463,2561,3653,3494,1884,1180,3059,878,3114,2888,459,4474,1682,2536,5198,1278,3766,3228,665,3131,1990,2181,1995,1696,4754,1568,189,1563,3652,2267,1905,5199,911,3994,5215,2458,421,209,3966,157,5060,3786,4867,315,3735,505,4025,1887,3270,1549,3950,1670,1111,2238,3452,549,1996,4890,718,2390,1332,165,719,4789,3806,1078,543,3424,2181,387,3096,168,3910,1081,3801,2435,1446,2991,166,1492,3372,1446,178,5408,5398,3543,2915,5176,3672,5471,781,3036,1213,1037,2454,718,1175,556,4424,2729,4660,3692,2728,5268,3522,5208,1124,3012,154,1098,2725,1809,2484,1787,2842,3026,394,301,3153,648,5225,915,1948,4564,2478,92,4952,3783,1151,914,5436,5009,4248,3722,2358,1570,3533,2583,3515,2960,4960,3756,3505,4494,1667,1741,2191,905,3706,4250,4594,603,5323,5188,5145,3944,445,2593,1314,2742,2265,2932,1924,4403,4051,2679,329,2348,4887,60,4076,3521,1226,1558,1627,1445,330,2494,5082,2205,3760,3767,4277,2971,4231,748,748,1855,2716,4330,5233,590,1639,892,1645,4253,4928,3076,2043,2306,597,1981,2197,4175,2550,5137,4378,649,404,5046,4329,802,3470,3889,542,5417,3519,5318,4508,487,4513,4712,5180,3766,3912,4316,2712,866,766,1357,2679,475,1508,776,2749,556,1244,3148,2696,5441,670,1143,1498,1029,3680,4125,35,4483,1396,792,281,603,5348,1688,1852,5038,1259,920,1530,2510,4401,2680,570,4448,4322,3948,2228,1261,801,4324,4368,3697,1596,1039,4928,4205,34,43,559,1066,4905,2215,4271,2097,4143,2187,3809,3911,374,3061,4576,4850,930,4801,2088,1660,3467,4581,3092,5184,1097,2316,2346,2572,457,4103,2286,3637,4892,4423,3042,4698,1775,3178,1042,2152,4544,2773,2320,1329,5440,4193,2277,1378,4021,1275,5048,3499,4507,569,599,4695,658,3217,1178,46,4253,2315,934,3691,650,4362,4439,3371,890,4296,2566,5290,3301,5349,2202,2808,4842,1179,4208,438,133,4928,2089,3040,781,235,4082,485,2722,3134,4753,3688,1505,3569,2731,2626,2884,364,5524,5463,4613,4070,552,617,1892,226,2836,3136,4377,709,3701,4829,1065,5435,2330,760,4554,3832,291,2402,190,4316,1161,4719,2938,5396,468,1413,2647,2792,873,2287,4431,3905,3128,2305,3614,3089,967,389,101,5183,119,3304,3460,3485,5212,3348,624,1480,1336,1075,5398,1174,2895,902,183,82,3412,598,22,3774,2326,2404,415,2846,503,1448,1778,4159,5403,928,3546,5060,4712,5439,194,3878,2493,1377,5072,2592,1686,3235,404,2042,5452,262,4922,3911,3150,1712,5239,398,361,3994,4149,2902,4262,1438,5338,937,4281,655,2217,2151,95,3009,2438,4849,778,4053,846,3198,1616,1859,1509,220,1505,4159,2880,5014,3982,2806,472,1447,398,3873,3153,959,557,2844,3214,4375,3457,2439,3126,4786,3053,589,4882,4902,5113,3459,4217,5213,2192,4769,282,5503,1205,4616,2705,3887,4247,255,5302,2855,5248,797,3569,3569,5128,5478,2890,1447,3429,346,4640,715,4520,2864,2186,5180,2248,692,570,2485,262,2271,4960,2799,3500,2815,2263,1818,1295,71,5281,18,3775,2566,3243,720,688,1586,303,2059,3025,4685,4650,278,5329,2771,1170,930,3923,149,3586,902,2581,471,558,3792,5449,4589,393,2450,4375,4045,715,2514,3550,3673,2921,1559,1259,5002,2768,965,2666,3462,2788,1039,5432,5104,3389,270,4928,5506,5017,2589,4575,246,2990,2693,5414,105,2185,5462,1369,371,2762,3236,2577,3028,3492,127,1403,4179,4536,5303,2592,5309,5458,3556,4624,160,1214,4945,5112,2293,5034,1103,352,1323,3519,159,248,1950,2024,1840,223,5229,31,3289,1228,169,3402,3896,2949,3922,4132,3893,595,1324,3140,5462,5379,1408,1979,3034,2091,3689,2645,4177,337,1531,37,1612,3303,1001,2009,4043,2842,3213,3557,3201,1908,375,5178,4599,4222,2968,1579,1569,1031,1674,5120,3568,1665,1983,5336,1764,721,1140,537,4239,4145,4320,504,3490,4110,471,3933,2889,3063,4660,1455,2130,5115,2045,446,2650,494,401,2717,3302,3643,2278,3586,3923,5277,3616,3762,654,4270,2717,3950,2613,3074,3726,1327,1273,2136,249,1374,3369,2309,412,3005,2192,1843,1582,1571,2775,4540,3528,504,4536,4053,3884,3047,5055,519,2527,2202,1381,1764,2197,4078,3754,2090,259,2433,97,777,1656,4439,4708,3007,1166,3395,4115,5322,3149,1583,3163,5241,3701,1153,295,2384,2727,3038,3910,2534,1538,4982,3291,2586,1318,3358,4175,3627,1008,157,1107,2041,2793,2143,1488,846,4046,2344,2886,1065,85,4267,5283,2794,3608,5116,2720,2152,2872,1309,3563,1868,1081,2700,4100,4688,3775,4027,3725,1817,4227,2908,3344,5292,3252,3166,4315,5413,3263,847,1035,2818,4260,4137,692,4476,395,901,3848,271,4562,2801,2044,3026,4105,3481,2799,4242,4298,4287,4321,4861,1937,140,2068,1956,2699,3629,4919,3028,204,4802,4252,454,257,1724,4064,1251,87,1498,5142,528,4592,5099,2263,3364,5200,3000,1396,121,2269,26,501,392,3989,1308,5096,2412,1549,54,4355,5521,1448,1178,4355,3724,2990,5115,3774,4456,3107,4724,1259,51,5110,4422,1296,2241,5339,1072,133,2066,4710,3959,2302,821,1378,3315,4743,1510,789,672,3948,3932,3230,2835,5157,3580,2303,2583,3902,4335,3064,5017,189,4589,5389,3665,224,4522,2996,1384,4967,4755,2159,739,5333,2968,1015,2404,267,4152,4798,1262,4802,5422,4288,5054,3548,518,2570,544,3091,5202,4812,4514,1511,4269,5417,3621,2104,1309,3660,1075,3319,4436,1548,2517,4132,3439,2993,5118,5357,3177,2246,3565,5133,5123,770,425,139,2550,4808,2682,2620,3061,1825,1093,2409,4503,1104,40,2601,3854,1947,5032,1684,1132,4328,1273,2612,4027,2010,591,4935,3332,3468,161,2917,2910,982,1583,1637,1156,4552,1600,269,142,4003,1716,4834,1260,4745,4067,585,3933,1158,3572,1477,1889,4743,2191,1739,5433,4344,3443,2060,3901,1596,3527,2451,2038,561,3906,858,396,1108,3547,1315,3002,2340,4704,4706,183,3537,4504,1914,3358,1679,1608,3567,2604,5034,4866,3680,5251,1688,4655,3258,259,585,2559,5099,1940,4938,3128,1809,2773,1314,1449,3336,4765,4775,11,4975,1705,3212,1351,3644,2410,4432,2980,2420,1317,4129,4011,5350,446,3044,4216,2253,5057,3171,5116,5169,3908,2158,2798,2614,4576,4472,2716,2989,539,3210,3751,5357,4241,173,1015,1849,1595,4079,3605,6,3276,5293,3422,29,4895,2798,4987,4882,2251,3127,5002,3034,6,4444,5481,4702,1703,3120,1561,1684,4376,3205,4833,3280,1199,4748,4651,3546,3249,1997,5461,2806,2069,305,3051,2536,4924,4733,4864,1681,3008,3824,3918,3958,3261,3648,2636,3924,2681,802,536,649,476,880,1881,705,1078,2426,1292,2803,4682,437,4294,173,4533,2179,2201,560,1113,4515,5287,624,1971,2607,4415,636,2084,4351,4166,2747,2517,1408,3030,545,847,3082,187,321,844,1658,3844,2695,499,2732,289,1080,3604,1295,1957,1112,5191,1727,2661,1030,2725,5352,4533,2440,4507,5296,2096,3654,1595,3152,788,4399,3640,5362,2237,369,2338,3102,5018,3123,1254,4688,1965,3631,2116,3714,3328,2863,284,5474,2958,5494,2667,2738,180,2048,1930,1982,660,3404,3976,141,1265,808,1033,1519,1338,2637,2928,3558,1094,2763,3460,2742,4482,3546,5029,5338,1881,3788,2392,5067,4597,1618,4523,1544,5369,5159,929,1695,1089,5238,1006,3548,273,1349,4902,356,1476,3629,653,1890,4892,3769,4796,1427,4789,325,3658,359,4947,2612,1022,340,2772,2490,5434,1863,5197,2747,4662,3994,3683,2806,4597,2599,3624,131,1029,4548,1450,4581,4005,2627,4376,3213,897,326,5285,4706,5188,581,4348,4733,4535,3779,4431,694,1323,1883,567,2662,1442,1839,2945,1912,2164,239,780,3075,5180,4654,443,1371,5411,3339,1496,1940,4030,2391,3445,1660,2544,2735,5061,4972,3878,1286,1576,2451,1990,1140,3262,2737,2254,2196,2006,2894,522,4246,1020,721,3041,4839,3949,3164,2575,1360,3819,311,1438,1298,765,15,1641,1299,499,4470,1738,5436,3430,3193,4429,5010,3269,5246,4629,4381,5226,964,2099,1690,2889,751,3677,3689,1505,3190,4319,4957,4383,4551,3896,3240,3024,5207,2098,5338,4178,4869,2334,1509,1199,998,2972,4094,3783,2496,4865,3643,1994,5380,2985,4587,3740,1771,4826,5021,3392,4118,2204,5218,2371,3993,1432,3142,2743,1073,2318,346,696,1547,4634,1570,3845,2070,1366,2636,5392,4788,2633,4804,3177,2283,1075,486,227,1242,3654,4834,3251,703,5310,1469,253,2802,4624,803,1328,661,4726,1744,4812,3827,2062,4701,4877,1446,3977,3853,4368,430,5457,5477,4354,3595,1299,5370,3953,1803,5336,747,2328,1248,5040,3084,2926,275,2284,4965,3265,918,5359,2683,4616,2197,5215,2195,5454,3476,3222,2391,494,1456,2520,3834,2261,5357,1202,3324,2068,4156,1578,2783,1747,3288,1179,910,1960,3052,941,2923,4422,185,4936,4992,4835,198,3882,572,444,5050,3621,1374,1491,3604,1530,3675,1699,3438,5355,3448,5446,3752,84,5041,3615,3537,4170,4216,4995,4968,1329,3360,1831,1911,2363,201,1157,4680,17,556,2485,3791,596,2392,1237,982,4915,4647,1649,3080,3759,3526,1970,871,3438,1824,151,3773,872,4392,2469,2726,4292,3882,3425,1509,3830,2349,2536,5133,1806,4399,2095,1855,1620,5021,4852,5238,1603,462,1430,2398,4108,1320,2156,1640,1632,2934,5426,1673,3906,389,4572,4444,4534,1724,587,2426,2508,1198,1494,2452,5126,1270,253,434,679,4733,3437,3581,5158,2293,1731,9,3808,2654,398,551,194,2758,5235,600,733,4985,835,1974,5119,1927,4073,954,2624,217,3195,5524,3567,3279,4772,1869,3574,4482,2783,566,5116,2014,4136,2890,2445,5483,4107,3484,64,2866,4890,2502,2712,3643,2402,3091,2252,609,1684,207,1445,5453,2458,2929,114,2956,549,2418,2013,109,2262,2442,307,825,649,3021,3969,647,3986,3231,3304,1550,3354,1507,1987,790,2920,5127,3303,2107,3297,2340,2934,5258,1526,4354,3119,3117,4879,2695,4890,2415,95,1841,981,2711,4820,5412,541,2094,285,3509,2542,1627,2775,3309,3554,3909,5473,722,5040,2349,29,3909,2080,2568,4924,3456,4122,3127,4920,3859,369,5128,480,1734,2702,3289,5032,2981,210,1849,5295,2883,5371,1489,980,4034,3555,3357,799,5499,4788,4349,4863,443,981,2715,3178,450,4138,4993,3122,2210,2460,3663,1463,1665,4945,2599,3721,3983,1277,2509,1142,1248,265,1540,2860,1570,2937,3957,2077,1351,1804,2639,646,993,4623,4849,4608,854,4390,2667,4460,3775,4387,2226,75,2861,736,1353,540,3499,5009,5302,5366,1558,5093,1672,3786,3092,1215,29,654,5267,3107,5314,2759,4545,2406,3144,3889,2122,2540,5064,5400,3183,1284,2865,1381,5179,2341,2442,5327,3164,3819,4541,1452,2232,1290,4689,330,1338,2588,4208,1794,4204,4270,1658,493,1662,5032,3461,873,2982,2909,1323,3709,4191,2052,4040,4966,2,1185,2779,1579,4834,2266,1923,1959,5094,666,970,350,1058,3716,1559,4347,1397,655,288,3652,34,790,839,1719,5079,4602,1763,2775,2478,53,2974,1165,5137,3749,1764,4538,2284,68,4652,581,3625,5056,400,3283,3379,1109,2088,4771,2879,3430,2988,1524,3746,347,1903,3179,5271,1992,4894,2767,5048,710,1113,4608,3205,1037,1529,396,4551,1604,3573,3902,565,1224,56,2348,3123,2649,1280,1953,1217,3572,1405,3309,1786,3662,827,5191,3689,941,2482,500,57,4998,3196,5234,1490,3591,2684,2656,3609,4815,1808,3457,976,1559,2211,566,3968,5037,2661,4705,4274,3352,3613,4107,4527,3713,5240,3773,667,3641,164,1683,450,3566,3646,4392,1172,3903,89,1305,2323,4367,4945,3543,667,998,2925,4708,5122,3536,2979,975,3180,4319,3007,1224,3400,4203,381,3034,3933,4164,3941,3732,1391,3449,1005,1504,5221,1063,913,476,4161,3198,4571,4644,4539,8,952,2994,2447,1140,1530,908,32,2748,4391,1839,2626,4586,1581,2817,1505,2171,1247,3691,1557,308,1226,406,5145,2035,379,3444,1029,2220,710,2347,5114,4997,2767,3441,920,5230,1647,3763,3694,1579,3971,33,911,2304,2854,3993,4711,1357,4990,2222,716,1258,4784,5466,4299,2132,3863,4071,3802,5350,958,3701,3175,3052,5316,299,2467,2636,1730,4229,448,5386,4987,1087,5188,924,5156,5279,65,4266,1166,2952,3757,520,4468,2535,1183,5147,3668,2535,410,2861,2754,1133,3151,4870,1182,2161,1296,1808,2615,2152,4578,314,4112,313,5297,997,5063,862,1475,2449,1529,2141,1081,5027,4778,2979,3309,4817,2626,4208,4659,4869,1348,3552,3058,4652,104,4512,2418,4803,4608,2532,4024,971,2676,4587,2706,3038,2298,2167,4773,2392,4734,1064,213,3441,4213,1217,4384,5384,5424,4211,4070,3053,2691,2283,2311,2617,3758,3882,2259,2958,2549,4852,2207,4708,564,56,991,4476,1792,2779,2320,1233,6,3075,1993,1438,3556,1626,1666,265,4680,3063,770,1321,1913,4982,3560,2374,3879,1545,4025,43,3409,4860,788,4443,284,2398,1041,4670,3946,2661,2344,5307,4845,3967,5120,1036,5151,2640,4732,2220,2102,4281,4903,4593,1570,635,5312,919,3092,4237,199,3903,3747,1504,2836,1705,861,3986,722,1735,2846,1581,3428,1251,5339,430,665,4397,4444,1202,3696,3722,3482,3152,4241,1019,721,3960,3512,897,376,2027,5282,1598,3269,2388,5267,1452,322,5404,4549,4261,5411,4591,3913,2771,3057,2726,1635,384,4969,2530,652,1502,3997,3590,3726,667,305,4459,3146,2109,1936,3253,2559,616,4904,3241,5035,4938,464,4355,479,5010,1197,84,1284,3772,2364,4023,3673,486,3438,4379,1970,3474,1872,952,5489,2735,2178,3617,1388,2891,5450,1992,301,5408,4841,4119,3627,2035,922,5359,2804,247,3406,1682,2847,2155,1984,3272,3332,3953,4084,4932,2836,1220,4100,5494,194,2,4728,638,2622,3077,2667,5343,395,1278,4358,4677,1136,5055,377,4464,1663,742,2160,5397,3643,5135,3797,4789,5462,465,527,539,3461,2383,4886,754,2349,3002,5022,4332,3490,194,2647,3522,4733,213,5139,3778,2042,5011,5131,362,2908,1481,1563,1561,4045,3002,2826,5509,3222,4324,1507,4991,3172,1682,1752,4588,69,4704,5310,2612,1905,1198,978,4215,4616,5291,5468,848,4748,3325,838,2347,3315,668,5043,75,3587,327,460,3495,3128,529,1714,4361,2724,1302,1817,2327,1547,2813,4060,4557,3102,3775,3479,3373,969,5413,2757,4737,3024,2786,1912,1352,3337,3010,4784,4941,3744,5441,5379,3035,4613,4426,584,5096,2132,1823,3167,534,2771,4751,2142,3106,2507,468,726,3687,1167,4405,797,3249,3047,1156,455,4886,3918,4639,850,4764,551,5282,1933,2768,142,4460,3037,3053,5082,4445,700,3981,2156,4445,737,3856,1629,5004,1419,1178,2982,1849,4352,4962,4596,4617,485,2754,1740,1530,1935,101,866,1334,3362,1404,1466,1658,4934,1499,3328,3846,2643,3184,2893,3135,5364,705,3857,4614,1826,4909,970,121,345,1386,5471,1432,3378,858,4538,1845,2350,3781,276,3199,205,3592,5432,3141,5266,467,2594,3593,2395,5377,4735,1272,1702,4656,1134,3850,4795,4344,1968,3262,3259,2695,4359,3990,1464,4579,3866,3851,3726,2678,4330,469,1794,1436,2901,2107,5265,1736,1384,5515,1328,5271,2117,2847,815,5346,3037,88,377,4424,1870,4660,848,2126,1064,2043,1448,303,3177,2370,3751,3213,1820,914,4521,900,203,4842,2336,2007,3230,4245,3010,4788,2392,1382,4485,426,4902,5196,1341,4054,3868,3741,1687,4783,5208,2500,4923,94,2508,2916,2723,374,879,2071,2832,2924,2069,2215,1972,3625,3964,600,2474,2721,278,4693,3083,109,1042,2606,277,4280,1424,3655,4033,4565,874,4490,2246,3959,2452,4638,320,2475,4287,3007,3789,5510,481,1046,3372,478,1234,2351,4479,2586,1401,2650,3501,4170,4887,2748,5064,751,1315,5431,3328,4214,721,3686,286,3334,1221,5284,1780,2037,3878,1881,1932,973,2655,498,2073,1097,5284,3530,5014,4999,3564,1641,2399,4606,1868,1173,849,3277,4845,6,316,1502,3516,4339,3797,4881,3963,3434,972,2236,4889,3588,2149,588,859,3350,4208,3936,4644,3871,1495,2029,4687,3242,536,5435,5045,2246,3816,5301,4598,4640,1938,198,4933,3790,929,3413,208,3410,3801,3148,1909,2089,3362,4768,469,1916,356,2441,1038,1405,412,1390,5350,2310,2474,5494,1517,3129,2728,4761,1251,3004,379,2182,1130,2426,1961,3450,3275,757,2584,1400,637,5028,3621,4527,5434,3677,4713,5506,3604,4219,2729,5319,916,3514,4421,4081,4110,5013,3837,2258,4285,5049,1957,4895,4157,2746,4461,2157,446,862,2714,186,4098,3474,3336,4986,2647,4083,4032,4867,4742,3920,1549,4101,4997,808,3583,4056,578,348,4154,4068,405,2616,2790,1060,1155,2201,509,3536,190,2911,3774,126,2155,4171,3697,4485,2366,4975,3106,383,1532,3469,4515,4285,5361,3524,5449,3245,1163,5515,1769,84,5271,3779,11,2271,3533,3637,4774,1222,3275,4550,4151,2004,2844,5422,3097,76,789,455,1532,2342,2072,3280,3029,1526,2981,5271,3476,743,2914,827,3784,1649,1436,674,757,4166,3302,234,3235,504,5212,99,2950,2134,2997,2399,1508,5030,2473,1300,5305,597,116,248,4972,4274,4949,798,1611,418,2719,2398,4648,1503,2683,2265,3818,279,472,2621,1894,3100,2071,1538,4911,4054,5484,2110,3940,1488,3944,3249,2321,5207,2090,1109,815,4178,836,1163,4428,3086,3261,3521,774,4908,1349,2654,3588,5513,1005,259,1805,4734,2787,479,2646,5148,4542,704,2630,1008,3976,3203,343,2038,1439,4102,1847,4225,156,5239,15,4824,3174,588,1886,732,2673,2577,3387,1495,4921,2948,1427,795,3616,5137,794,1866,3560,3208,1764,482,1438,2477,5007,799,1687,1326,5041,1245,713,554,3881,791,4139,481,1289,5407,283,2772,58,3107,650,5375,188,3221,5243,5500,2700,4330,1084,4576,3167,4143,4472,2355,4641,2293,4406,2912,1395,5132,2558,3843,2388,2319,1417,4307,5033,887,4742,3245,3506,494,1990,4900,1953,1036,970,4578,2611,4930,121,3538,2690,3500,861,2186,181,1656,1150,3403,3392,3907,2362,4503,4597,4736,3931,713,1091,923,1605,1889,4210,790,1946,2854,521,4864,1293,1331,4649,4158,3888,4866,2556,3258,1789,233,3977,1737,419,310,5323,2551,1075,2378,1008,5104,711,806,4531,776,2618,714,3549,1968,3316,2234,1439,5348,4714,3067,295,1638,2153,2883,1820,5319,621,2120,1410,1125,4882,847,531,3196,370,316,3531,3845,5389,2620,1549,505,4423,4222,4530,3405,3204,1813,454,1218,953,3898,358,5359,466,5486,1222,434,4136,2642,2343,1674,3409,3357,4684,5226,3789,2505,5066,981,1458,4285,375,3974,2221,3048,2270,2233,5353,1126,4699,5064,2753,2982,2861,5270,4453,3046,4472,2840,2431,1832,5442,4041,97,2284,1766,5024,755,2869,5118,3876,4603,4649,2588,4462,3556,1383,5183,1396,1077,4400,1790,5487,3286,5226,1495,4484,5312,4766,2231,3663,1680,3489,2932,4327,2156,14,5440,2832,1660,5330,1825,4041,5127,3201,4318,3702,4803,494,189,82,2465,4815,5101,4715,2026,4418,1929,4522,3473,3791,4368,387,5406,3712,2577,3073,2596,5215,4413,252,4049,543,5330,2015,315,3694,2483,780,1307,3241,2558,4066,3303,4242,2719,1000,932,4857,4074,1255,1646,907,5518,232,714,1140,201,3557,3330,10,3303,3980,122,5465,5451,3227,3347,2982,4365,1006,5069,524,5338,2487,2406,5037,1341,2850,2919,742,799,3170,2325,1476,1576,2960,4480,4548,4166,4625,4,4593,600,4174,1561,3281,395,145,1798,4988,3284,5192,2646,3191,5299,535,1668,3301,2938,2729,2179,2601,542,2318,1327,1774,5386,4348,1352,762,4147,4614,4925,3866,467,2223,2096,330,1922,4812,3384,5087,160,5475,1109,110,527,2734,3181,4976,577,4263,4283,3420,4928,2889,2111,957,3243,2231,5307,801,1614,502,3120,397,43,1153,3537,1449,4461,179,2002,2914,4507,3504,658,1383,5258,2126,4739,3655,2010,692,2622,1412,2073,3104,3197,59,3920,1802,5091,3832,2590,1411,2700,620,4261,1516,4402,3429,949,864,1207,2472,4986,3610,1010,603,2346,2430,3149,5097,113,2099,2960,2805,2156,2897,4500,1347,1456,4116,2664,514,4880,3600,3462,3554,682,3945,901,1101,3684,1219,1162,448,4061,1456,501,3634,4938,2300,376,4138,1344,1099,1957,3371,3389,3645,986,5201,3815,931,3488,4104,742,2851,5328,161,1027,5316,3283,5210,4873,3606,4482,2524,4334,3069,5110,2665,4977,3027,5402,3124,934,1944,1602,4476,648,433,1489,3834,1663,2796,703,2746,1204,2575,5331,3892,1607,3587,4894,3623,2510,1138,2271,1318,3815,3123,4645,5462,3907,1380,2394,4616,3309,4584,2067,5057,2309,2030,3884,5144,1535,230,5079,1869,5047,3135,1320,1935,4582,2861,2515,4988,3972,3866,4235,2556,783,3283,985,203,3578,3702,3139,476,1218,3585,436,2867,2674,3950,368,279,1208,2400,2970,1993,2200,692,5300,4577,1454,4341,1254,428,2213,5018,4622,5222,1106,1366,4925,3265,3807,2296,3564,528,4997,3859,4270,5459,3713,4557,1742,4274,5434,3840,4479,2095,5201,910,4408,2885,2875,3132,5097,3438,2962,4787,2664,2336,1130,3077,1163,624,3102,4737,3265,279,20,2188,4227,3045,2755,5486,1234,3117,5088,4950,4766,1980,2951,4974,4881,5454,2318,1342,3475,447,194,3604,966,4373,3941,4815,1605,967,1518,2752,2646,1292,5465,5407,3559,4582,5208,1019,1715,3707,3781,3739,4408,4026,5126,4419,3910,1476,4257,4414,2899,4478,347,4146,2394,2081,3957,2535,1882,328,300,3875,4529,3749,5377,4889,3765,5457,4641,524,3039,4152,1904,4551,3434,1835,1519,1287,3905,2625,731,2315,5092,1519,4013,2927,660,4683,3441,368,5465,2468,4154,726,2267,2534,3151,2497,2830,3785,3197,3616,2057,3243,447,1480,2951,1300,5192,5087,366,273,3888,4647,3367,604,1060,4318,258,3683,1256,2704,5227,2696,3216,5061,5137,2086,2451,1696,5307,5077,4468,1965,2483,4110,4035,4635,2453,412,562,2496,4107,4976,3151,3546,3553,5287,716,1123,4578,4462,5428,4835,1633,4446,5401,4289,5225,243,4896,665,1604,4469,3988,1658,427,1677,4959,3096,3334,2003,2714,5461,3279,2154,2707,378,4108,97,4716,1117,687,621,4620,4855,68,3031,2690,1100,3077,2467,1749,5294,54,4869,1,5226,2210,2053,387,1538,2489,3133,4780,5512,4431,4055,5198,1826,2893,2427,3224,4009,2089,306,3811,370,3431,4136,1968,1234,593,1925,4747,3642,570,1384,1257,315,2702,1404,2896,2859,2941,3495,2766,1076,4685,4052,4879,2827,1751,1654,3748,5064,5016,722,1657,526,5394,2589,60,2394,2402,495,5417,3962,1823,564,4783,3643,4939,3180,1800,3282,1549,3244,5212,3057,2003,2424,2238,1277,65,3553,244,2958,3930,2458,2978,3890,4604,2333,2387,2858,2558,4165,3077,4153,922,3803,1513,5122,4151,5091,3034,1380,1428,5469,202,4889,2041,2657,3112,1117,2292,3408,1977,4072,2963,1627,1303,202,3811,1808,2765,4496,3453,4478,4780,5443,3466,3654,1175,4897,495,2962,4625,4510,4802,3606,1855,4901,2304,1086,1714,1910,2585,3891,2137,1929,3709,2738,2949,3197,1937,3295,356,1937,4055,3832,4248,243,4528,1514,3689,3013,567,2183,4901,4848,4347,1162,92,3888,330,3701,4198,3438,4543,1068,3855,1632,3768,2793,5174,1681,4670,1066,1283,231,2471,2231,3991,3196,1251,3257,1232,1340,1811,2352,3273,4796,5432,1729,4248,3447,1462,3301,2303,4268,3388,173,1510,4942,3912,3436,3319,4820,2791,921,4711,2562,2366,479,4647,228,2398,4696,4163,3485,4069,360,1838,179,2636,1595,159,5373,2603,1191,540,4527,4377,1697,3761,3432,3918,1943,2736,1243,4683,1967,3693,5273,1579,3176,3641,2760,813,912,1866,629,3517,2672,2927,543,4619,772,2123,4595,10,2627,1194,1470,3072,3605,2086,1848,494,1000,3000,5006,3604,1437,1567,1676,458,171,2347,4927,165,4564,2891,5283,5460,4619,1743,2613,3811,1801,729,4571,5107,1357,2966,1341,2823,5234,1663,3030,2363,3710,1231,5166,4523,1594,1504,416,1132,5274,3683,1750,776,296,2171,5385,692,1536,4119,5450,693,2266,4432,3132,3480,4282,649,1122,3869,1929,431,1605,4968,304,2477,5076,3322,1333,3978,1865,250,5265,5173,1923,3939,3738,1991,4105,1455,4553,4365,1064,3686,2406,3668,4675,420,4466,1699,742,3599,1868,4874,4071,3942,96,1449,2736,2392,5293,1432,2348,3292,3031,2371,954,134,1261,4572,4375,2951,4993,4725,2650,2574,1612,1392,168,2788,4881,1285,5395,4463,4540,286,4944,3867,2146,4256,394,2471,4004,2761,4274,620,4782,3602,1788,836,228,2375,1438,993,264,2107,563,3216,4110,5411,2993,5149,4731,1209,4178,5051,5242,1903,1381,4020,3124,3259,53,3795,851,5077,4192,3998,2011,3099,2311,1062,2606,846,2467,1755,4056,521,371,257,2623,5419,1059,1767,4671,1394,3294,1145,512,4191,2021,2190,4073,3344,631,2684,3306,618,4077,4976,691,3125,2243,1642,1961,830,5256,526,2250,357,4744,2826,4870,2587,81,3041,4532,142,1745,3894,1102,1066,4084,2270,1167,4598,4254,4925,3524,4673,3133,901,505,5184,238,2179,2508,3712,3877,2609,5356,1060,458,5126,4718,4835,4668,2826,5043,905,642,3861,3378,1056,3057,3623,931,1782,3537,4837,4640,2731,4144,1307,4707,756,2246,3854,2580,3870,4511,3968,1748,1767,1438,1789,4394,1523,4996,170,3440,1803,5397,4308,3656,627,2551,1954,185,4461,5310,4722,4057,5428,2639,4102,2516,5397,137,5378,1710,3763,967,3688,1834,1212,827,3174,4981,2650,379,3928,4976,3177,1647,95,3770,1630,2937,2255,2500,3692,3614,2072,3455,2487,2853,1784,62,3356,213,3061,1102,2885,4214,3384,4517,3877,848,4239,1986,4647,749,3259,433,2472,3491,4229,4817,1709,3929,2373,1640,1455,5059,3588,1619,4775,621,2646,442,554,4058,927,2040,1600,293,2880,1653,2676,3509,1470,352,3952,1468,3340,4259,4093,759,2704,3552,3739,24,4366,2074,2363,3858,4711,1054,3020,1496,2931,3319,2947,3412,4392,3856,4072,1136,5374,2218,3646,2599,1242,5387,3600,3086,3553,12,92,2965,1082,966,193,2357,3113,2725,5421,2200,1758,1832,1850,3938,3924,108,4930,3244,44,5455,1552,1846,593,532,557,3379,163,3583,983,3349,4788,2936,1448,3459,5161,220,4203,882,2335,5104,685,547,1008,2112,5109,4981,4878,1498,737,5494,3202,2248,1427,776,3087,3870,719,3717,2405,1798,4445,3520,1763,4779,3050,1749,3890,3524,641,4825,1404,4936,28,2156,981,3005,4909,4558,2425,3110,5375,4414,43,1741,2268,4763,4397,1174,4890,4312,950,3797,324,1869,9,2675,4436,4555,1156,934,3885,5497,712,1412,3436,3044,3128,1710,2392,4293,4356,4107,369,488,2947,1344,1082,2920,1136,4268,4224,1253,2534,5161,1294,2662,5486,1364,910,2131,2224,3237,2121,2589,465,4522,2954,5092,4492,3231,1175,2285,950,1287,2750,792,5180,4683,212,3085,721,3834,2104,1662,947,473,4367,3133,3839,2417,2900,1780,2494,3700,1780,4614,2753,590,2359,3820,815,663,1604,52,3580,709,4198,2678,2481,3425,2331,520,4960,3149,4852,5232,3389,1706,1963,4802,4248,3947,1645,5081,4551,2411,823,4672,3714,1247,3826,3399,4835,2338,4577,722,1891,2538,1781,2904,5434,1199,3532,4165,1968,3347,2285,2252,2134,2813,4147,3591,5087,3507,1259,812,3480,1445,4696,4907,4932,3786,1425,535,4819,570,795,281,1273,430,5149,4544,4986,420,960,2416,408,4342,5435,4641,1371,3787,4468,1326,1989,4024,4964,564,3394,890,5398,1684,5298,123,1610,3999,475,4788,3420,3115,5000,1593,4303,3640,1113,4674,688,2839,3707,2506,370,759,1535,3747,2616,2353,474,40,4459,4478,3549,5399,3883,3101,500,3371,5512,3297,1682,2381,1178,329,658,3862,4668,2261,2800,1285,4232,3394,2948,2865,5107,5108,5221,4061,2990,1242,3432,2481,561,1043,3314,5447,2388,4175,3169,1632,3137,3737,3424,609,4506,2128,2338,896,2321,935,4030,2536,1707,1431,3476,298,2759,4284,1036,4353,342,94,1466,3156,3733,5507,3271,3272,873,2683,2154,480,109,1712,5165,2528,1879,5404,5090,1034,3279,364,1880,3358,2107,43,558,3388,66,3544,1593,3205,3061,3398,4893,845,1402,1018,1895,2263,3397,5322,3277,4291,481,2653,1200,3877,2444,5075,301,1107,3851,2426,3612,4529,5256,4273,362,2032,1415,3806,1330,1024,4049,190,4949,743,4333,2922,5513,4792,2957,1995,4044,2553,461,3082,3343,4933,2948,2923,5001,929,5483,5088,2130,251,197,3904,2467,877,947,2070,3421,3705,3775,1382,4598,126,1579,3067,1451,1963,5001,667,1050,3791,1998,4436,1400,1273,2925,3209,1139,5402,1275,1532,4313,3621,3208,365,3108,4050,3876,3833,60,5318,5006,618,4656,4291,3223,728,4648,153,4921,2325,1674,1775,4787,488,5040,3808,1232,332,4033,3955,2903,5303,4767,878,2488,2703,2822,3548,3146,3060,5337,3077,3959,2404,5165,1860,4203,1053,1637,3968,3646,2576,486,3331,4092,4762,707,5113,1763,3642,5149,1489,2795,1446,1986,1876,3,15,306,208,2198,2265,371,5034,3553,3561,688,2813,4588,1454,2537,1504,1227,434,2483,4072,3447,2217,252,5321,4735,1999,2017,562,1523,1466,3593,4208,5198,690,3288,3176,1008,1930,5388,1403,5385,5519,3457,3532,2240,62,1940,2603,2725,5060,2061,2039,2595,5188,3228,5171,4665,3323,3491,5254,3190,4429,4732,1182,1488,1851,441,5355,1420,3202,1393,4933,4820,2333,738,2816,1209,591,969,1704,2535,3764,725,1591,878,2807,628,4591,3264,3107,2669,1541,931,1871,4263,2567,5053,445,4885,1322,750,351,2851,2046,5193,2371,1779,3415,3378,1424,4503,2670,986,2543,2632,2896,131,4048,26,3324,4421,933,3672,2317,4076,561,1273,3156,862,4959,1082,2959,1959,2699,2630,2015,2011,4143,2090,4543,748,3992,795,3312,781,183,2350,2921,4619,2820,2855,929,1808,3280,3649,4115,875,4095,1737,738,5523,20,4291,4917,1628,2723,3956,191,1661,2796,5454,397,4959,2712,4234,3338,2856,2101,267,4499,2335,4641,4552,1660,3121,162,34,3464,3629,1254,4624,844,3862,4575,4258,526,777,2581,175,4247,380,4591,1293,4967,1255,4262,2630,4089,1973,270,2044,3309,3878,890,3509,691,1477,2899,4365,569,508,911,518,1099,892,4535,2232,4014,4702,2620,1926,3780,4551,2710,5331,4998,1289,4476,4508,3301,5251,587,1386,1734,473,2723,2680,1435,1037,4462,251,892,131,3488,888,1110,3922,2263,1177,182,1653,1383,2078,5032,2173,4131,2758,1326,1033,2511,5056,1312,664,2715,2649,3799,2500,1957,1805,4386,3886,519,4335,3197,355,2326,565,2130,4494,4084,908,2069,3316,381,341,129,2389,4077,224,2346,5304,1061,2282,2841,2921,3266,4748,4942,1012,3644,3487,647,3944,884,4471,4748,4554,4187,5144,5226,910,4401,2411,3832,1709,3200,2187,300,2893,862,4523,5321,121,143,1493,7,2406,1856,5030,412,1014,2529,4646,363,4130,4166,1715,2789,1357,2403,3374,1310,1237,632,587,4889,3250,5227,1387,1762,3248,403,970,1935,4232,5484,3962,2571,1072,1882,2532,3670,3386,3844,3334,4635,877,1221,1517,3248,5424,724,4124,856,5210,3496,2507,5006,5511,2650,2475,295,1109,113,922,2568,4747,129,2242,22,387,5084,2760,3292,5367,5508,5109,4411,4690,4204,3805,2360,2951,2732,1589,1560,5390,2224,1745,644,1653,582,4041,1332,2770,727,1354,3643,2841,3848,1042,2187,1987,299,661,709,2269,1677,1306,3019,5303,439,2695,3115,5184,2140,3352,2182,2945,1652,2188,1461,3083,215,4736,4543,491,2786,391,3415,3833,1778,2235,5357,2520,992,605,5388,1778,4403,2684,4603,4215,4677,2597,3516,5222,554,4292,4353,3095,2105,5251,2826,1059,4509,5507,3594,499,2232,28,548,427,4542,2256,1629,2566,1163,5309,4210,1236,5331,2329,2718,1039,3770,5223,5233,1866,1335,4431,3926,978,3504,4661,258,4093,3635,4125,4577,5516,1173,4370,712,2809,1846,2077,3861,107,1470,1532,3373,1224,2906,2955,2190,1345,3985,2225,912,2538,5272,34,655,3912,3971,1097,5519,1258,2704,2234,3846,3343,499,4721,962,3042,4899,3646,4304,548,5005,4134,3088,685,3121,5010,2033,2833,294,2943,4025,383,4710,2302,4234,4416,176,1848,2919,4659,150,3458,3604,4302,3431,2150,672,2965,4197,4595,2728,2698,2974,624,414,836,3047,1543,1486,648,4330,2489,3599,231,1641,1519,3525,4483,3649,5025,3978,3055,4715,4635,478,1549,5516,1691,5380,2055,2659,2504,5365,2781,1431,1933,5282,3924,2043,1154,1435,501,1282,2071,3846,552,62,1610,409,3023,2419,943,2579,4424,310,2294,90,1900,1264,321,1726,5438,4947,4458,2072,1897,3594,5173,4860,3395,565,3147,2765,3172,3133,3471,2078,809,479,5265,4612,440,2420,3176,3367,5345,4667,5117,4665,2090,130,97,1033,3367,3121,1880,2410,1440,394,5401,762,4124,638,3221,4115,3221,3770,303,5179,3611,3117,5235,4678,5316,3088,198,4446,3549,4459,2245,3985,2701,456,4355,3886,2491,2259,1877,2021,334,2595,7,1886,3847,4814,646,3746,1648,686,874,2417,1505,1831,338,4770,657,2932,2708,246,920,1192,4459,1949,1227,426,1622,2097,2575,1281,3144,2030,1548,3499,800,5281,5370,118,4403,5153,4699,1262,2185,440,5292,5455,1959,3967,1857,2100,3283,2529,5092,4810,4641,899,3060,1268,2940,60,1281,1032,1676,922,2617,1294,1565,2174,3771,2183,208,5000,2859,3400,3336,4313,1507,951,1516,812,1058,3899,120,2623,2868,2199,4274,5464,3308,1598,842,4384,2683,1984,4793,5115,3408,2363,4990,673,1949,1604,1758,1567,2274,3293,2867,4967,1595,1936,1046,5134,886,5504,175,2415,1825,286,780,944,4493,680,759,910,1147,981,5235,2331,2315,4565,971,1084,1946,4342,87,2466,3331,4895,1519,5307,3383,1547,4955,2283,4621,5269,3898,781,5086,2486,2477,5467,4839,3891,879,3071,1796,4743,1425,1352,1924,3030,351,3025,2209,4354,3702,231,1518,1176,3796,3976,2504,243,5199,4515,1935,2091,2781,1756,4420,4189,1184,3590,1193,923,3556,4406,4563,4950,1765,800,689,163,1907,3800,4819,1018,61,5136,3474,5366,439,1397,3239,14,3735,4810,1933,4066,388,3326,1504,3634,2804,2103,894,4965,580,329,1391,2454,2751,591,2767,4532,1318,4785,5495,3808,2782,1266,663,179,609,3369,2254,2005,5101,2630,4195,870,5487,5472,3520,3591,5446,4064,2140,695,1249,5322,2169,426,1953,2646,4371,2973,3553,1353,4634,4478,3935,3293,5390,1610,1756,1878,4308,4346,112,3421,908,3373,980,3560,3819,4412,4575,3636,4269,2913,3121,155,2273,2327,1286,1021,4175,4918,3630,406,3858,3134,81,5254,3206,5103,900,1813,3195,4980,177,4969,930,1606,4363,673,4755,1144,4634,1759,198,3534,3529,4332,4100,3417,5163,1642,3641,2670,4156,3450,2663,3126,3124,955,53,599,5422,1158,505,1522,2170,4571,119,2739,3068,451,4704,741,4031,2726,3635,485,726,1043,4722,4095,4406,2470,4840,3672,4842,2633,848,1104,5273,3791,3484,4605,4389,1229,1052,4766,1791,3548,845,2970,2986,753,1363,4550,886,4744,3776,4449,1402,2602,4830,2839,401,621,991,5210,4861,5353,268,97,2117,4686,4948,3898,664,4430,4423,1959,794,1810,1790,2348,5480,3147,3165,522,3973,3859,4800,1213,3026,5089,690,4221,5151,2766,751,1132,2632,3737,3150,1754,2756,2522,3666,1568,3954,376,4433,2283,184,1058,2224,4316,5073,5488,3186,2665,1145,1714,750,2033,254,4920,5367,3546,5189,2466,846,5,3473,5236,2151,3885,5406,4697,1905,5292,3215,1936,3942,4836,2289,293,2275,776,4589,4532,830,5334,3194,3275,3030,1863,1428,1764,66,708,2463,2406,5324,1012,3265,1833,4890,2724,1356,533,590,5480,196,348,643,1036,1246,5184,3874,2546,3545,4077,2273,2562,4140,1583,2268,1337,1531,4043,538,5156,544,557,915,4904,4490,5173,3834,2629,3220,432,4373,2912,415,1425,1372,4047,1023,3160,4391,348,3479,4082,4984,4141,1273,4949,1873,5021,3756,2983,1088,1543,959,1025,5443,469,3337,5357,2344,2642,3921,1613,1856,3568,2241,4227,4527,2434,1866,3716,794,1168,5294,223,1350,5395,5150,1420,2051,4843,1846,3306,4630,355,4265,4892,3674,2010,2147,2336,1980,4964,783,4286,3916,2453,2188,5223,5502,3279,2673,858,1386,5229,4511,237,2434,1135,3855,148,180,5445,4501,5340,5091,4038,4731,3916,3082,1010,4053,4112,1393,5327,999,4903,4983,3929,1563,2847,5139,2917,683,4018,3539,5055,4595,4004,5418,2716,4718,1710,5304,909,4701,2688,1017,49,4468,4457,285,3391,3986,5396,1535,5246,3901,4297,2718,1334,82,4571,2517,574,4127,5307,1401,2147,2778,4272,3376,2075,3522,3781,1155,4937,2787,1795,5288,4885,558,4750,4742,5325,2774,1829,3388,3962,4549,2473,2027,2781,1682,4333,3327,4924,3118,1811,3603,1398,1659,4948,3541,2210,1168,2678,673,424,612,338,3205,542,5102,550,499,144,2553,5271,5274,1550,5445,2608,1492,4436,1042,1140,1076,3306,3826,4965,4789,1549,4783,5057,3670,1496,924,5191,5146,2636,25,2891,2675,1611,5237,5278,839,4549,3382,3947,1363,5069,4245,4346,4826,3547,2068,737,4105,2059,2611,1394,3735,1836,4615,5411,4000,4254,2471,2457,1907,2629,3522,3706,1436,5359,18,350,2234,227,366,4480,2761,5270,4702,4083,1872,4548,4257,1658,1178,4930,1613,1177,4965,249,2256,2456,1014,4253,1254,1174,1632,986,3578,3351,671,2739,112,2953,482,3763,4502,4613,3920,969,494,1340,1011,2655,2634,4984,487,5313,5349,3208,4842,379,5329,1211,96,4036,2406,2863,548,1365,2271,404,3920,1451,1664,2510,5149,1570,4844,5118,5169,2662,2889,5489,941,717,2728,3474,4759,509,5513,186,1140,5224,758,3225,2915,1739,3570,1648,5135,1909,4764,3430,3645,2386,5342,3072,5334,3538,1039,2558,4083,5297,3148,1199,1751,855,2073,3397,4724,5498,1479,5438,1935,1315,4912,2127,541,2535,1183,4751,3510,4378,4853,214,1745,2382,404,379,1564,2398,4841,4020,4127,1478,2078,1043,2413,2900,3998,1678,4485,3796,1090,3323,1248,513,854,2464,4408,2067,682,4944,3205,5434,3719,4388,3559,1564,3914,4822,3787,3679,3148,5437,2000,618,3823,4894,718,5165,4996,2965,5244,2808,3531,5439,569,3229,5463,2054,851,285,5325,1289,4512,1446,5232,791,3038,1872,5017,1306,5497,4815,3794,2536,2391,285,811,2388,206,4392,4132,3512,1675,4064,2818,743,1751,2989,1060,103,4259,2295,1299,5309,2350,5057,1045,1468,1023,856,2100,1199,5070,77,5514,955,1928,41,2808,3157,2833,5315,2823,3988,4999,1443,2604,1241,2907,5414,346,148,3686,2837,5311,911,1007,4039,3923,4416,4204,1746,4036,4849,2841,1771,2295,444,2090,315,3300,3210,1862,4971,213,4682,196,2234,2807,32,498,68,4513,4331,1016,4467,2388,4876,1541,3381,3455,184,786,4954,2066,1284,5146,2261,4316,3346,3859,5041,2603,3563,3705,2641,3517,2797,2971,514,5487,4822,3210,2473,4913,3983,2455,5416,2998,3825,256,3361,1550,5,2147,1755,1443,1277,3291,471,3060,4632,4282,659,4223,457,2040,1278,5078,3230,1997,3614,1728,1638,3026,3838,5000,571,1528,4194,2247,2723,408,315,2341,1113,1784,218,2019,5052,1869,363,1004,55,2956,4607,4242,4837,4890,3948,1811,33,4640,1951,2787,1272,914,129,4898,4480,3730,2510,559,3881,2828,2490,2460,2121,1497,3415,3245,1907,1976,1747,3271,2679,1006,399,5396,5024,4467,5433,5062,4346,2363,2942,3242,4628,2697,3952,2174,2433,1467,2479,4841,2394,2128,4279,1615,961,4851,3728,3309,5423,2317,1583,4996,3661,3424,4613,1059,2959,2678,2960,2135,5523,3300,517,1230,3822,1578,1859,3622,687,183,2448,2778,1714,2206,2460,1084,1244,2981,3140,2504,3561,5396,824,83,274,150,2452,3935,1833,4736,2674,473,4089,180,5333,850,2036,3831,2141,2292,857,1762,2836,3738,3249,1901,5175,2486,3562,1381,3325,2755,3474,3995,1392,2181,618,538,4353,1540,4739,3060,651,4902,4910,1702,2326,5239,1586,4552,29,260,664,2108,4725,5134,4593,3627,2323,4870,2340,4452,2086,2315,3109,4116,3534,3310,2907,1239,4421,148,1738,4083,3337,819,2589,2627,4046,2629,939,4674,945,1628,2175,5166,225,5296,3869,4567,5095,3242,3602,3130,4477,3305,4270,67,1674,4307,3803,3628,1148,4307,5011,914,3093,4186,2621,1678,3203,1089,2075,1946,3106,2823,4009,1650,1929,5331,3707,1487,1221,2858,110,2452,4381,1424,2076,5132,4231,2722,164,2410,5336,1066,316,53,539,823,1557,1910,5254,1452,2354,73,4552,1003,2259,1249,5518,2716,427,5486,4058,1655,4015,949,926,5414,4530,3713,658,1052,804,2137,2985,3762,3842,5441,1727,3604,1786,2210,2785,1079,1453,97,1341,351,2404,1598,4805,5358,458,5285,2965,4980,5440,2514,661,1954,1510,112,3839,1979,3411,5229,4140,2875,1550,4598,920,3787,3750,3873,4322,3873,5270,3278,1644,4332,3580,5075,1825,2345,3068,1007,4618,4800,4987,1573,2532,3110,880,3085,333,5403,670,2923,4369,176,1347,398,1157,3386,5087,2512,2213,4949,4712,2588,5333,4355,3238,1585,1706,764,1417,2465,2193,997,5258,4664,1969,2868,428,4313,3418,4893,4327,5420,5522,5166,1433,4540,4870,2217,3620,4414,579,4122,2389,2631,4767,4015,2244,1410,5175,1259,4611,2861,3677,4545,4560,467,2245,4908,5169,5522,234,3889,2211,4813,5502,441,2580,4911,816,1771,3010,308,980,1052,3581,2300,4652,130,2417,1041,2013,2802,736,4819,1444,4210,461,3574,4161,2285,1062,3787,4363,2746,5085,4081,762,5078,5182,4146,2683,4188,5113,1961,292,3859,4234,837,327,3310,5379,4343,1157,3258,2916,1999,5044,3689,3121,1807,4990,243,5405,316,1982,992,3130,562,1804,4955,3407,1210,3129,4275,5341,3382,743,2808,1475,167,2575,850,3248,2532,3525,4132,3342,3830,4932,4333,4029,1925,789,3382,3354,4339,2785,1961,3364,3658,4585,1965,2555,4589,5123,763,2305,470,5424,4909,4486,3360,1164,3911,4146,3969,681,3544,4305,383,163,3960,2085,306,792,3467,352,2788,4561,2484,2751,1226,4855,2349,3304,2034,372,2542,3892,2692,5208,2266,4140,4150,2428,3670,856,2423,5166,3332,728,5129,2846,510,3088,4228,1665,1915,2778,1113,1426,385,3303,5286,2247,5290,4140,402,2197,1198,1632,3190,2958,5491,4500,4504,285,3677,2552,1502,4470,1336,261,1526,3394,5347,332,2039,2738,48,3773,706,822,3379,911,4846,5141,704,1585,3536,2309,1244,4739,4417,878,4914,268,4658,3416,70,2191,4886,3082,1205,452,3091,3854,3001,1890,3544,3661,5227,5312,401,1867,1622,1162,3890,3704,3378,4861,593,3686,2918,5265,1023,2483,1773,3424,3219,2900,974,2229,4931,3730,2758,739,916,4455,4070,2789,271,3019,4828,1012,4109,50,373,40,4761,3914,1951,4712,1557,514,5399,3909,3082,4856,1691,1754,529,1298,3024,2917,5337,4390,680,4990,2458,2384,4650,4085,4331,930,3333,4097,340,5520,5249,3981,2850,3487,41,4727,2419,3220,2966,4548,4645,3472,2873,2948,2428,5113,4753,4066,781,3574,4342,3403,4128,2805,1448,5147,1444,5411,223,737,4486,3736,2512,4191,369,3774,4508,127,4746,3526,406,2468,1341,2744,4888,1325,4369,2566,690,412,689,2137,4632,1975,4243,4710,3316,5419,1290,482,3841,2662,4622,417,2115,3116,3870,3428,456,3147,82,5341,1125,4970,2411,5187,3098,3844,3708,4217,2771,2657,1264,5463,346,4514,584,1907,5367,2314,2548,680,3195,1287,4027,2141,3527,4504,4972,2080,3573,3762,3813,3514,1401,5270,1853,4840,2069,4413,1739,4057,2070,3334,2047,32,1822,584,596,2780,2844,12,3185,4530,45,4361,129,4854,5419,4758,3626,4691,2879,5488,51,3339,434,253,4966,3145,4348,5489,3868,5045,5492,3519,4332,4315,2139,4374,3796,1204,897,523,3854,836,2715,3505,713,4060,1554,1381,1933,136,5140,4580,2027,4432,2746,4598,4540,4553,506,2144,1550,1632,3634,250,1767,4704,850,2853,4978,2471,168,1147,4401,3147,1120,1051,5064,5099,1750,1184,5158,215,5173,1772,5124,2027,5124,4937,4086,2228,4847,3234,1655,4658,1585,2783,125,2071,1380,1462,1596,169,3683,2314,1003,4779,2438,2508,1843,1616,596,1171,5204,313,3974,2726,4708,4749,3116,5211,2733,356,2136,4571,77,1058,2270,28,1622,2302,3870,2801,4603,386,1090,1925,97,1857,1901,187,892,3640,375,1715,4767,600,1093,3442,5410,5422,1804,2428,1740,3540,4285,2703,2341,4571,2571,3950,4799,4925,4703,3200,898,2538,221,1567,37,4324,3128,184,3981,1358,1536,195,3075,4928,5054,1808,4454,4131,4171,4271,3427,382,818,2013,3275,3601,4659,2988,2478,2138,3652,824,2716,4128,2830,3774,4987,5518,1073,3914,575,4744,4643,258,2448,3002,1454,653,3445,3801,3489,614,4856,3437,563,1906,5056,354,357,5491,1903,3173,3304,910,400,4421,1393,4947,590,4398,2727,1247,5013,2154,3846,5179,4233,1802,4255,5376,3324,3703,500,3485,3908,3637,3100,827,4842,5337,3994,2158,2147,773,1085,2514,2722,2499,4767,1488,4090,3412,1004,2100,4448,5294,4925,3897,4349,1271,4678,632,3537,1482,4583,456,4897,3274,2208,1995,1191,3435,818,3802,750,2411,2887,1567,5479,1147,2055,4971,874,3276,2053,3543,2341,3425,5199,4319,2184,4902,2073,5290,5215,4145,3131,3836,3627,867,675,311,3641,2730,1208,1273,4861,701,4412,3557,4789,1913,2830,2529,220,1557,4066,4954,2467,5480,3198,498,3399,544,3886,1731,2640,1580,1355,885,5512,3217,812,2117,4810,3591,4449,1035,5511,1261,921,4150,776,3840,4992,1699,1488,3033,5078,3290,189,3908,2074,2993,5425,4641,1864,3500,1332,3296,3538,1362,255,32,3274,66,4786,458,2316,1942,1157,2850,1148,3146,2873,1841,2581,2830,4898,4430,5441,5451,1160,3644,4626,1121,2099,3592,1556,5184,3578,572,3139,4961,1075,4278,1566,2557,4463,3198,13,3255,4474,4079,1287,883,3869,2150,1342,753,2455,660,4774,4527,1475,2597,4605,4790,4825,5263,4134,1331,591,5125,3248,2777,1304,4114,3783,1344,4567,2188,1233,4959,4324,781,1088,3651,4876,3344,2803,3332,2686,891,2030,4241,3058,1693,2696,4971,4126,1108,3505,4620,4626,5321,2911,5471,411,2530,1260,2411,890,2679,5442,1132,34,3459,472,506,353,2164,626,1870,2445,238,1796,3784,3233,4993,2759,1637,2249,2389,254,2750,474,3563,2294,2532,1835,1897,5334,5220,3087,3442,3165,347,2553,1679,4246,4178,4308,4190,1042,4730,5468,4817,3810,2242,3823,3951,4955,3002,96,4591,726,1987,4296,5364,4184,2631,1013,1228,2696,1419,2217,493,5179,1437,81,3117,2899,4521,838,2595,197,2146,5498,1280,3360,4808,4739,4504,3221,4519,5173,3708,658,3401,5508,2010,1216,3878,2509,4631,3789,5022,275,5421,1690,2660,1437,1616,122,25,3228,2193,1013,2179,4032,416,982,2445,133,177,752,4860,3597,980,1017,5257,2784,2536,151,4426,4986,2485,3220,36,1039,1633,2484,3682,2264,4192,1798,2706,355,2720,578,3708,5362,1503,4303,1468,3970,833,4018,667,5012,684,966,750,1918,2078,4124,3390,2487,1274,851,1573,4806,4508,1705,4082,4676,5395,853,3207,3966,1462,3707,2101,0,4534,3503,247,4677,1323,3436,64,3210,3927,4525,3036,888,915,2141,3387,2681,2819,4437,1344,205,2356,4389,4265,623,550,120,1373,3509,935,4269,2175,2731,2037,3518,3909,4715,3143,2643,1355,1968,259,1660,4340,5340,2827,4689,4810,3623,775,1239,4779,666,4525,3668,838,1813,1142,2531,490,5394,225,5073,5045,1884,4363,63,4289,1269,620,132,4260,465,497,4369,4742,1965,552,5063,3968,3863,3186,1570,1753,1466,1532,5195,250,2851,1045,1545,3589,366,315,4507,4569,3728,1359,654,4105,3110,5359,4606,1466,5425,168,5238,2627,1228,480,5278,1966,3565,2074,762,824,3707,5027,447,5204,4497,3212,3094,4086,471,3202,3576,1285,2390,4266,1262,3889,3079,4155,961,3584,2567,4088,4383,3743,3379,595,2578,2045,414,3300,1404,5006,4267,4858,5165,2799,672,4916,2661,2332,1884,4076,5496,2780,737,1871,1438,5518,1002,854,1002,4705,1445,4829,1881,2223,2003,5040,3080,541,714,2670,5512,1969,3752,4760,1533,2188,2620,3000,2502,3763,2623,1572,1861,1416,3018,2516,3517,136,5383,2699,1576,4750,2757,5134,3288,1412,3064,1982,1879,5092,4737,2909,4814,325,87,738,2129,3433,646,518,2294,5338,4214,2277,1698,3207,2174,5124,529,318,1593,5036,3383,3730,5153,5330,3601,3302,381,2156,4548,5020,5240,2253,3705,826,2200,3490,4390,1826,3917,561,4592,4939,816,3719,1216,571,5197,2336,1770,1867,5101,4100,1646,224,3990,3944,5376,3588,4898,958,1870,3397,1935,2789,1380,2337,1682,5424,3780,2908,3310,1211,4972,291,3211,217,2190,3792,3575,3154,103,3194,2567,4458,585,1889,4750,4486,2145,3678,2437,5046,266,1699,847,3334,2959,5108,1833,3623,5483,2044,4541,2492,996,5143,12,5147,4846,2148,836,2728,5150,3552,1626,5220,5365,4886,3210,4490,5183,3156,4324,3212,1325,4403,3397,5118,1129,5181,5439,388,1289,1332,2276,2459,157,212,795,1924,2235,5432,4941,3923,1288,3468,3663,3176,4645,3106,4925,152,264,941,583,1077,1277,1823,866,5026,1394,26,4012,2225,5278,3263,3783,2066,2932,4875,3319,5390,1173,3235,1590,832,2625,5272,300,377,2598,1829,5087,5465,4442,1157,982,418,3506,113,3215,398,4854,3694,2467,28,861,1841,2241,1514,214,4207,1793,5158,3948,3618,4479,4869,3355,4045,2136,2674,1998,5096,3316,3155,731,3471,1227,4757,3901,3131,3693,3826,816,4389,2705,3339,612,40,4936,478,960,5465,3848,2069,4699,2977,3626,3847,1212,4686,3845,825,4290,3239,3221,4832,4947,914,4899,3544,1596,746,3675,963,4677,3263,1062,3658,409,5331,1247,2136,2237,4240,4948,428,3449,3026,2549,1368,1083,4227,3717,3904,3001,5141,1007,4510,5351,3653,1138,3324,3889,5230,2856,0,2620,3767,4612,2385,2807,4517,3997,1503,1978,3070,707,113,2953,4526,4506,1007,1066,3687,1658,546,1612,2170,2357,5259,4728,3518,891,1600,2900,5050,2448,983,3730,665,3483,4886,1446,1383,2721,1093,639,4107,3768,154,3062,876,3169,1275,3073,731,216,2545,5071,246,2475,5102,108,3474,4094,4205,11,94,535,175,4213,2221,943,4944,4946,4232,1355,4326,1007,4117,4100,864,4322,4491,2251,5171,4093,2120,2181,2655,2261,1847,3176,4171,5058,4636,3477,4841,4596,501,1010,4742,3354,2117,428,93,1031,1206,1381,3842,4555,1829,4480,4047,1249,965,5083,5139,2387,1076,4328,3096,3346,52,2193,4493,4353,3029,5288,4167,2553,193,4888,3034,3954,789,808,155,2130,5224,108,1512,4718,5017,4800,69,2153,4325,3653,1911,3922,3464,1557,4727,2186,2998,1064,31,5208,5261,4549,2587,2029,3212,3578,2303,2219,3427,181,2433,1442,1249,5420,1282,3577,1348,2397,3379,2534,1668,4659,5118,3525,580,71,1889,3724,3975,801,2408,3214,3462,825,3919,214,5343,4511,4110,1695,1564,216,2184,3292,34,2695,4472,4897,2827,209,5471,2887,1945,1372,891,4387,1511,4005,580,2421,4541,2611,1934,2305,1846,1898,2821,2457,373,748,3936,5332,4921,898,2641,1436,4856,3822,2837,4661,4665,1885,1459,3178,2085,3036,144,2585,4621,1681,5314,3895,1052,2813,3915,3956,2990,849,1907,3021,4386,3563,1486,2470,273,5306,5230,1249,2927,754,3706,2637,1431,260,5326,713,2430,5128,2747,1396,4052,3234,1102,997,4122,1820,2560,2495,2792,4965,3506,2190,1203,955,5300,2992,3806,2573,4377,5047,5381,1108,2378,5204,3280,3838,2430,349,5166,151,3810,55,2051,3188,3120,242,3640,2127,999,3806,5050,4101,1130,5224,2191,3170,3886,757,1507,1269,4943,5344,5454,3133,49,568,2192,3442,3483,4918,1000,2525,4354,686,2117,3009,3751,567,3413,4299,1018,2869,5143,446,4298,1707,3589,5471,3583,4159,5283,143,3713,213,4950,4194,1710,4130,775,1274,1126,3139,5430,3254,2433,1520,338,2739,3403,2108,1070,115,5054,2219,4307,2813,1480,257,85,3192,204,4153,1549,2147,3325,1143,4784,980,2719,800,1180,4528,4438,2181,2278,2839,2096,4599,3288,5218,3119,2813,2718,5165,3403,2631,3168,1566,2872,4467,1687,53,4119,1259,5426,4152,2972,3708,1784,3240,3884,1697,79,4766,3517,2784,1522,3963,985,3876,2676,1928,4930,1363,4757,1175,3835,618,515,3886,554,1367,1532,1079,2474,2555,3526,3941,5503,3177,3828,70,3117,2149,2658,1701,3853,640,3376,564,1316,4865,4313,2258,3656,4828,175,29,1765,4878,3806,1308,929,1596,2333,1468,2153,4612,1029,3877,1554,4746,3862,540,4415,1407,2811,4018,5003,880,1753,2509,1746,3966,5229,2739,4086,175,3871,3614,5285,5512,4102,2770,3517,2100,4430,2239,919,4624,2209,4343,1243,1598,2466,3529,2207,1294,3446,2732,3681,3981,4950,3719,1754,1820,5275,4173,3003,3879,2227,1198,853,3453,585,5210,608,3788,856,4866,1239,836,4439,975,3004,4740,5021,2892,1425,863,5184,4850,1814,720,99,2401,51,220,5276,3081,1055,3954,4386,5396,1542,3033,448,1892,4678,1431,1081,1781,4468,4155,1859,5366,1901,4957,349,5284,2519,449,3651,2999,4545,1991,1661,1653,3665,5007,1978,4241,3614,2695,358,1081,4344,4024,3208,4351,4649,3705,5433,18,2981,5273,1130,3797,3417,469,1011,1746,4619,1752,5371,2202,3175,3680,1486,321,2261,2061,1459,5317,4769,751,546,2299,264,3708,255,3768,3939,940,3904,4124,1565,316,4646,4427,981,721,2431,3237,3240,4982,4023,58,1585,723,3461,908,4741,3185,2869,1965,70,1524,2567,4185,5415,1471,239,2385,1913,2292,414,5394,931,3226,2021,4532,3188,3365,582,2818,3770,1443,3827,4814,3223,5249,4611,1926,1683,3822,2464,4711,1487,4275,2,4635,766,2806,1207,3900,427,4223,3387,3517,3292,142,2673,4004,610,2534,979,1790,2525,3340,3269,916,4347,657,2337,5128,2192,644,4119,5472,1861,4975,3509,1626,162,476,1288,3264,1463,724,1243,3958,5239,4853,4862,2900,3499,3825,3137,1991,2069,4435,1849,2700,2230,4964,1038,3041,4546,5061,1199,4304,2107,3941,2404,1455,3083,4423,5502,2628,1191,4268,2580,2058,1768,2273,5220,3428,3983,3485,2390,902,3869,692,3594,2674,5159,4026,3209,5376,2044,3984,3590,5166,5468,3561,2924,2106,3719,4542,3561,3585,1344,1469,2589,3781,1798,4899,5319,3531,3162,4087,3981,3873,3203,5122,2454,4077,4905,3760,3692,109,3302,984,5305,5149,3702,588,1734,49,2039,3617,2515,1426,2123,5226,3026,3842,4198,473,3136,4973,671,3,3016,2352,61,272,4846,103,499,702,2075,3578,3519,3860,823,534,4074,477,3410,318,2056,2798,2684,994,3199,92,2600,4891,3878,5325,3874,1276,1060,4869,2412,398,4488,709,297,1936,57,142,1376,2013,101,5391,521,447,552,5469,3363,4537,3311,1408,2392,286,2300,2899,4630,4912,2650,5200,499,203,1720,3959,3527,3884,2301,95,152,1268,3241,1415,5312,653,4232,1505,5519,3717,606,93,270,5508,5138,1967,3677,146,141,1082,2473,3249,393,2887,179,4790,3974,1242,4684,1182,692,3943,1633,1899,3240,3514,106,4453,4496,3054,549,4111,853,3838,1001,1434,2856,729,5034,1181,4845,681,1316,4463,3039,1577,91,2610,1397,3036,15,3328,3032,2428,2336,3983,2606,5523,364,4927,1938,2257,4060,2447,983,5060,4055,891,1330,1263,1393,82,4273,3445,2798,2505,2867,168,485,4846,2610,2271,4822,2624,726,5141,4351,4055,5287,3296,2936,5514,792,3054,1979,3461,5117,1723,5262,353,5461,1348,3729,4149,3642,4782,2788,2165,3591,748,123,2168,4069,3176,1751,2864,4399,393,2670,2482,3851,4199,4055,2387,2031,3037,3662,386,3967,2434,3306,1518,3983,1954,2695,5466,1968,679,3072,860,3020,4378,2085,1081,5084,2738,4052,3968,5122,3023,1809,1310,306,5331,885,3490,1874,5231,4735,2122,480,3529,4876,4440,1905,1048,3816,2838,2446,3106,2992,2633,1257,2574,304,66,3649,3290,4989,5046,721,569,4818,4341,2039,5260,4402,4944,876,3504,3524,3042,5061,5042,5452,791,1573,23,660,186,3063,4498,3505,1122,5460,1966,4535,4594,1665,403,2706,889,4079,1783,1254,2,1036,5397,658,380,5377,5224,351,223,5187,1922,3088,4019,4318,183,3005,936,757,1890,1740,2160,1266,2667,3249,3766,1487,2948,1515,5394,3695,5327,1525,2188,2148,3224,4280,5116,4163,5516,4680,509,4820,5503,5176,3475,4415,2570,1256,1009,5439,9,1104,463,433,1870,5167,1905,4744,4029,1812,1211,1983,4281,3982,4650,4445,4520,527,1516,2839,5206,4805,4328,4051,4076,2396,1156,1575,4024,1457,446,4837,3876,3751,489,5523,4850,2743,1724,4281,1798,1452,4137,4738,959,3649,3489,4776,3537,5369,3574,2415,5179,5423,1881,3253,1512,1204,3548,4863,4368,3473,4554,4308,3403,5163,1033,3015,2357,291,5268,809,1169,5094,5141,243,4442,2567,4346,2593,4135,763,554,1410,3178,3715,728,1706,3736,4175,2623,1221,5185,4586,1832,4791,4169,3251,4941,899,1506,3475,1223,4222,1279,4513,1497,1879,1697,4465,615,2637,4420,3606,1172,153,842,5505,2397,2791,1301,83,1010,325,1003,985,362,1011,4072,5273,2806,1376,4948,5079,2286,3388,87,298,2373,3973,436,238,1993,2353,4889,2520,157,3528,1576,4934,539,252,5442,4537,4991,3992,3605,3201,2567,1289,202,1784,5070,1117,1110,2976,5368,5502,4958,5155,556,2686,473,955,2566,3198,2627,2527,3271,3005,223,5306,3467,43,2060,3021,4816,4493,303,4098,5437,656,1551,2135,1324,2072,1175,1661,843,697,2588,4243,299,2606,2673,682,4376,5046,3977,5301,4430,3020,5002,5249,1919,5175,2628,4238,4458,5317,4855,3118,4619,2529,5193,5458,4571,5374,1744,209,4670,2825,2340,4587,4383,5242,5393,3136,5193,5044,2309,5506,3810,4417,2368,1864,1223,616,5229,657,5025,527,2386,4950,4688,5308,4725,2933,3443,2283,2381,1937,727,1430,1162,5219,1403,2235,3907,3135,45,4288,1695,1643,3856,3952,1980,3112,5117,5506,4776,240,3296,5135,1830,5495,318,1823,2905,4251,549,1604,1509,874,4533,5117,5401,2487,3062,1881,1326,2740,948,3906,4008,3196,80,1353,4127,982,82,607,5287,1235,4467,2464,526,851,5100,4689,2890,1620,925,5368,4700,3780,4864,3791,5434,4725,2095,2492,1351,1146,657,1234,5512,511,4050,1752,1925,4416,1801,436,3666,3860,4991,4957,3187,1598,3573,3583,4472,897,1171,3612,311,3558,4589,890,36,131,1151,281,1331,2663,1311,1274,1653,2214,2766,1030,2718,4223,4851,3121,3712,1609,1638,488,1741,713,1194,4951,4145,1068,3742,1521,5217,1779,306,724,4766,4558,4541,5053,5433,2085,5108,3148,4475,5049,5105,2650,4170,5350,632,2326,2339,1957,2650,418,3885,3133,2794,2802,1494,1943,2758,1349,3673,3825,5386,427,2925,1216,2741,3605,1577,2804,5435,684,284,4391,723,3515,2914,2797,482,2204,2068,178,4814,2516,2282,3052,4510,719,5086,1562,436,5453,5306,2207,3605,2417,1472,3774,3731,4510,133,5012,1413,893,4292,581,3094,3400,2901,1777,3604,1869,684,699,1847,1279,429,1050,4581,3176,3775,4226,1628,1050,2527,5122,4369,5211,4873,4830,2705,3454,2885,5504,4420,3804,3333,2673,1284,2715,3560,3510,1130,1422,4787,5490,2581,361,4743,932,4918,2790,4318,2542,1886,3789,360,467,2683,2239,265,852,4464,4674,3916,1371,673,1089,2046,2839,2457,2747,1978,1612,5435,4895,383,4277,244,3349,2397,2351,131,1481,3293,3304,2244,2407,2874,1333,5318,383,2773,2820,1394,5370,571,4679,312,3939,3652,3196,629,4439,1329,678,4387,5518,3311,5099,4075,2402,5415,4719,4140,3454,4326,617,1414,3513,5323,4111,1794,393,518,2661,4313,4198,5017,1423,5150,84,1739,4174,1801,198,761,280,655,1007,967,2088,3414,1693,2676,2926,2202,1911,749,378,3328,5362,5100,286,2697,1190,3183,3155,141,2974,5053,4508,5,4157,474,2523,4892,5,3868,5307,3192,130,1179,1478,2492,4393,4253,4357,1161,2473,2684,1807,3042,2407,1521,1847,2737,2959,2342,1886,2799,4193,659,2316,795,2794,3950,1913,4604,394,366,4509,4799,1654,3359,2874,5135,1730,2858,5506,1076,1995,5144,3688,4998,855,2120,4189,3920,2526,4526,4297,1169,3126,1359,4264,5016,1019,1697,1796,4742,916,3142,3677,4238,2037,1622,151,3215,4359,3255,3734,1312,510,4471,4955,1882,1428,1642,25,2050,3298,1964,4368,2446,2179,2995,1177,5405,545,4820,1945,2688,2667,3850,4264,75,1931,3246,988,611,83,243,1239,1427,5297,4671,1924,262,2887,4350,1517,1229,1582,2659,4732,821,2596,848,4056,342,3717,2819,695,3698,671,4991,3666,3248,1349,822,5333,1658,3312,4979,4881,3457,4089,1597,2501,5470,2112,5504,1469,576,1580,2119,2282,2734,4607,605,2207,270,2591,4851,1549,2324,3994,4405,2318,1812,171,4718,4274,1590,436,2478,3652,375,1468,836,4703,4013,4124,2431,3947,2760,5378,4252,2678,2163,2441,3514,5191,4706,2262,4235,2473,5074,3774,2131,4450,980,3483,1331,3654,4446,1781,1510,5298,5014,1872,217,1641,1391,4918,434,4729,4204,3549,3688,2188,3990,2063,2053,2430,1186,352,5417,5012,3936,2266,1641,3224,1410,4533,3812,3034,1835,2456,5369,4233,564,4481,3537,4182,3668,4396,189,1092,3286,1063,2190,422,5429,3987,5116,4428,5214,3286,3047,5240,243,1892,3398,968,4701,3471,648,2932,1808,5059,1910,3414,4486,2055,5093,982,1466,829,1700,3473,876,2190,1423,2885,2051,4624,758,2361,776,5500,3573,5474,1757,3763,1542,3324,2285,3626,3034,3057,867,1790,4783,1236,4116,3585,5132,3447,546,1103,5280,731,4139,4196,1354,24,4269,3185,4374,2193,1367,923,3162,3097,4994,4388,4578,250,2125,2953,3441,4617,4183,810,1261,2050,3448,4093,4814,1897,809,3161,140,359,4377,4378,448,3037,616,4336,962,1430,1745,1667,2850,1494,1569,289,246,1525,252,137,2398,1474,4574,346,5484,3511,3047,4269,4742,3028,1364,1101,191,3992,15,4583,5000,2729,5211,3292,3356,4636,3689,869,3887,4196,4751,3254,5236,1131,3683,3695,1918,487,3950,2292,3923,3832,3420,5491,4554,4678,2425,2986,662,1965,4782,3463,678,4471,1544,2764,4755,1363,3701,926,2129,2379,1948,1452,5181,2108,1111,1150,5122,3294,2486,80,1542,1894,1588,2435,4570,2453,983,2477,4749,3729,3766,2090,3336,3364,464,3116,2542,2885,297,2149,2128,4459,2757,2969,4720,1166,1849,84,1936,1725,1790,3901,2501,3677,2715,4140,1395,1342,2789,2995,619,1293,5500,4011,2272,2544,2678,3944,1287,1602,2520,4594,544,5264,2447,4642,116,337,2067,3325,4659,3041,1014,134,5041,2943,478,3618,4235,4427,957,3305,46,4408,3422,1738,5309,2512,520,5498,5079,3822,3060,5247,276,4641,2993,4815,3931,2365,4885,4274,5246,4343,3946,3369,2193,3367,3633,5346,1826,2022,3186,614,710,1674,69,989,3032,2585,4077,4835,3145,4929,4816,2096,216,5340,742,4141,1719,4281,4258,4897,4333,4510,4285,4308,1771,2603,3287,1652,2247,3474,5227,3030,4016,3905,4430,2863,2447,4782,2742,202,5399,1857,4429,2559,217,4847,3459,3796,1863,3921,823,5049,2725,1807,4786,2207,1627,2241,133,2623,2309,4914,4793,2072,2827,1402,4261,4860,1075,346,2183,2351,764,2399,454,2709,492,2923,2184,3949,2232,4681,1092,3776,2221,4795,3779,3264,1567,2300,1002,888,3747,2595,4899,2276,5359,2847,3999,1312,2809,4553,4878,4932,5067,2057,805,4355,1602,1297,3512,1962,2458,3768,3251,4217,1105,5192,4587,5368,2290,5353,4776,2723,2511,2282,389,3013,1936,2984,143,2010,378,5429,5374,4426,3464,2480,2554,5353,1106,152,4869,5369,4797,4511,2932,1068,4650,4827,1384,690,3272,2091,2966,3682,4449,752,4035,797,1042,3272,4548,586,2442,4923,2630,2676,2678,2751,2630,5179,3346,902,3799,4333,266,2787,1997,266,727,5137,1184,2815,1457,1690,2203,279,1327,862,2797,892,2566,1524,1273,509,2197,956,2475,2685,3424,4040,4799,3481,2040,3115,246,3773,2065,2290,3232,5132,4455,4605,3876,4116,3816,5198,1181,3530,2786,1104,761,734,89,4181,4947,2915,501,4858,685,3212,1358,4662,3351,745,4917,2897,2626,2677,5257,1248,2246,1504,4240,2554,403,1403,3049,565,5102,727,3944,1191,476,2862,5393,3740,1582,4087,502,2060,676,4447,1947,178,3244,3364,3169,1238,2239,516,3322,2654,4321,5178,2027,2652,4994,3230,4715,3459,3016,447,118,5067,2447,1942,1564,4601,3190,1809,717,835,3205,4967,3591,3353,1752,3383,1161,2612,685,2791,4489,4637,281,4784,4413,3760,1715,1845,95,5321,1204,235,3733,4565,3901,2350,4325,1356,1504,462,2840,4622,3812,3801,4552,3554,4443,3604,989,221,5170,1688,2776,4192,2064,2584,2071,2276,1948,5343,4040,798,3200,965,3373,233,1992,939,1140,3686,3047,5125,2752,5167,3923,3314,1181,862,4469,3418,2199,3730,5276,3530,3591,3088,2920,2208,95,4642,1180,4201,4234,3184,363,1029,282,5109,3146,5284,4149,1920,2949,1586,1210,1010,3714,2776,263,2395,5304,1256,2923,1929,586,5218,3696,1254,2548,4705,4401,2782,4503,3056,4750,3709,1990,2826,4193,2730,1909,3550,1960,1081,343,2447,1299,2072,2185,2086,2459,5155,5421,4999,4385,1516,5358,3458,1570,1279,4166,2350,4122,3167,397,5400,1319,3997,4009,5521,2870,4671,3186,5480,2699,668,2325,3054,4472,921,4050,3435,3357,72,602,5225,835,5464,1829,2436,5100,2266,2755,4500,3825,3844,1934,4742,38,925,3753,1329,4296,3183,4679,557,3809,31,4207,2549,660,4136,4409,5101,4500,4204,2341,4307,4193,2556,110,866,1231,1281,3367,1735,3538,5323,4578,3073,3119,4474,5517,4581,708,4603,1550,3812,1168,3267,4203,1079,1222,2640,3809,418,597,1938,3301,1071,1224,3701,4344,4826,2032,2585,5486,1642,969,1002,3058,3232,1745,5455,3477,188,2853,1965,5011,1974,5027,2349,1195,987,451,2386,1011,4831,3376,2446,2920,2633,4601,4714,1822,3811,318,4938,1204,4705,4846,1342,3018,3801,3417,3296,2491,4537,3184,5072,693,4480,1309,425,3968,5441,4872,5124,1685,4755,5299,5313,346,3744,5411,3957,3670,3554,1422,2400,1264,3662,976,748,751,1902,555,1219,4458,3755,4058,5213,1662,302,1310,4282,740,1797,259,1284,653,4719,1927,3718,3855,4243,1168,5418,1035,2576,4422,3881,5319,3632,4095,2751,3607,2099,1581,3186,2035,1066,724,5448,1261,2552,1622,5477,2867,4316,3052,5054,2943,5515,3795,3401,1222,3158,237,3630,2848,813,1247,3993,5320,3523,4902,3377,1015,2338,2088,1742,4326,378,972,110,1559,848,1851,160,2484,779,3565,783,4410,2888,947,3788,1463,4811,1522,3349,1462,5413,2135,4279,804,4272,4654,1849,1425,1300,2550,951,2156,3355,1796,1350,4940,4748,1983,3193,4912,2052,3246,5319,1358,2808,667,2933,2140,1956,2312,3686,77,613,3725,546,3180,1784,4684,2905,3723,1553,1639,3771,2980,250,3638,5485,3508,804,2766,3447,2226,3147,706,4367,169,4473,2841,1340,2477,5224,2153,5084,5265,2269,1845,5076,5486,3837,4468,1331,1711,3852,1596,967,533,178,5369,5178,2409,2414,903,1330,479,657,3942,5428,2994,1134,4208,4835,2882,1482,3816,3872,3592,407,1946,2542,1104,1632,264,1086,3616,4841,3743,4163,3696,2838,819,3918,1740,4728,1865,222,2174,3434,1747,2716,909,2089,3287,4971,2139,1061,2984,5490,1396,792,1569,4814,229,4265,2225,3560,2182,2075,3046,3771,1718,1150,4586,3071,977,2393,450,4184,5228,2403,1977,109,20,2733,1756,60,4291,1284,5221,4534,5507,1770,299,1978,1055,4938,2668,1548,988,4723,530,862,4038,3737,3973,4894,2421,144,1346,1984,2258,785,227,3579,2921,1727,1261,3587,2341,3252,2632,380,453,2212,2285,3558,4736,5004,3641,3091,2987,1485,4641,1331,5149,1521,3148,3330,5480,678,2066,3524,3892,138,4931,4318,197,2872,2143,2936,5431,4002,4842,5149,3220,5003,1489,4452,5099,4842,3250,762,5274,869,2182,2595,4001,4121,2368,4379,884,2798,4988,4788,321,786,4462,4213,4736,304,3993,1885,5146,2339,4963,2753,4609,3467,1775,3685,3191,869,3808,3850,4413,4593,2596,3637,2864,4744,2375,3525,4421,593,4658,1874,2473,2188,4260,2697,2916,2223,387,2544,3779,1883,3413,2661,259,2557,1090,889,2496,2215,3447,865,2678,872,1747,1732,3974,2864,1737,2307,3022,4325,3199,1996,1412,377,1311,1910,279,2399,2592,20,1062,3155,4413,1848,558,2254,110,5346,3868,417,3369,4660,5139,3480,4835,3140,3734,2078,2259,3780,3625,2149,4672,647,3039,845,265,126,2578,1592,2522,4562,7,4987,4389,3811,1248,3827,1838,5364,1488,4165,4752,2389,2124,3566,1294,3683,4173,4420,977,3859,2627,2339,2782,4584,2925,158,4235,4231,2087,5423,3113,172,2696,265,5072,3542,2372,4532,4362,1837,923,2766,5304,5431,3234,4984,4386,2875,1876,462,3472,1659,4565,1312,666,4207,1681,4753,1228,3379,3391,3211,1211,4894,732,250,2990,5135,3113,531,562,5382,2833,2888,1299,4149,2468,3775,4187,1793,3697,4391,1037,5427,5129,1827,2490,69,2476,412,5384,3951,1379,5143,2263,2251,5244,640,5460,3886,2881,4829,1581,441,3972,3547,2205,355,4281,2472,651,5024,1779,2417}, + 312836170, + }, + + { + []int{5, 4, 3, 2, 1}, + 4, + }, + + { + []int{1, 3, 2, 3, 1}, + 2, + }, + + { + []int{2, 4, 3, 5, 1}, + 3, + }, + + // 可以有多个 testcase +} + +func Test_reversePairs(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, reversePairs(tc.nums)) + } +} + +func Benchmark_reversePairs(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + reversePairs(tc.nums) + } + } +} diff --git a/Algorithms/0494.target-sum/README.md b/Algorithms/0494.target-sum/README.md new file mode 100755 index 000000000..6ca627770 --- /dev/null +++ b/Algorithms/0494.target-sum/README.md @@ -0,0 +1,33 @@ +# [494. Target Sum](https://leetcode.com/problems/target-sum/) + +## 题目 + +You are given a list of non-negative integers, a1, a2, ..., an, and a target, S. Now you have 2 symbols + and -. For each integer, you should choose one from + and - as its new symbol. + +Find out how many ways to assign symbols to make sum of integers equal to target S. + +Example 1: + +```text +Input: nums is [1, 1, 1, 1, 1], S is 3. +Output: 5 +Explanation: + +-1+1+1+1+1 = 3 ++1-1+1+1+1 = 3 ++1+1-1+1+1 = 3 ++1+1+1-1+1 = 3 ++1+1+1+1-1 = 3 + +There are 5 ways to assign symbols to make the sum of nums be target 3. +``` + +Note: + +1. The length of the given array is positive and will not exceed 20. +1. The sum of elements in the given array will not exceed 1000. +1. Your output answer is guaranteed to be fitted in a 32-bit integer. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0494.target-sum/target-sum.go b/Algorithms/0494.target-sum/target-sum.go new file mode 100755 index 000000000..4849f4072 --- /dev/null +++ b/Algorithms/0494.target-sum/target-sum.go @@ -0,0 +1,40 @@ +package Problem0494 + +func findTargetSumWays(nums []int, S int) int { + sum := 0 + + for i := 0; i < len(nums); i++ { + sum += nums[i] + } + + if sum < S { + return 0 + } + // sum 和 S 必须同为奇数或者偶数 + if (sum+S)%2 == 1 { + return 0 + } + + return calcSumWays(nums, (sum+S)/2) +} + +// nums 被分为两个部分 P 和 N +// P 中的元素前面放的是 + +// N 中的元素前面放的是 - +// 可得 +// sum(P) - sum(N) = target +// sum(P) + sum(N) + sum(P) - sum(N) = target + sum(P) + sum(N) +// 2 * sum(P) = target + sum(nums) +// 于是,题目就被转换成了 +// nums 有多少个子集,其和为 (target + sum(nums))/2 +func calcSumWays(nums []int, target int) int { + // dp[i] 表示 nums 中和为 i 的子集个数 + dp := make([]int, target+1) + dp[0] = 1 + for i := 0; i < len(nums); i++ { + for j := target; j >= nums[i]; j-- { + dp[j] += dp[j-nums[i]] + } + } + return dp[target] +} diff --git a/Algorithms/0494.target-sum/target-sum_test.go b/Algorithms/0494.target-sum/target-sum_test.go new file mode 100755 index 000000000..7de45e140 --- /dev/null +++ b/Algorithms/0494.target-sum/target-sum_test.go @@ -0,0 +1,53 @@ +package Problem0494 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + S int + ans int +}{ + + { + []int{1, 1, 1, 1, 1}, + 8, + 0, + }, + + { + []int{1, 1, 1, 1, 1}, + 4, + 0, + }, + + { + []int{1, 1, 1, 1, 1}, + 3, + 5, + }, + + // 可以有多个 testcase +} + +func Test_findTargetSumWays(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findTargetSumWays(tc.nums, tc.S), "输入:%v", tc) + } +} + +func Benchmark_findTargetSumWays(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findTargetSumWays(tc.nums, tc.S) + } + } +} diff --git a/Algorithms/0496.next-greater-element-i/README.md b/Algorithms/0496.next-greater-element-i/README.md new file mode 100755 index 000000000..08c295af5 --- /dev/null +++ b/Algorithms/0496.next-greater-element-i/README.md @@ -0,0 +1,37 @@ +# [496. Next Greater Element I](https://leetcode.com/problems/next-greater-element-i/) + +## 题目 + +You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all the next greater numbers for nums1's elements in the corresponding places of nums2. + +The Next Greater Number of a number x in nums1 is the first greater number to its right in nums2. If it does not exist, output -1 for this number. + +Example 1: + +```text +Input: nums1 = [4,1,2], nums2 = [1,3,4,2]. +Output: [-1,3,-1] +Explanation: + For number 4 in the first array, you cannot find the next greater number for it in the second array, so output -1. + For number 1 in the first array, the next greater number for it in the second array is 3. + For number 2 in the first array, there is no next greater number for it in the second array, so output -1. +``` + +Example 2: + +```text +Input: nums1 = [2,4], nums2 = [1,2,3,4]. +Output: [3,-1] +Explanation: + For number 2 in the first array, the next greater number for it in the second array is 3. + For number 4 in the first array, there is no next greater number for it in the second array, so output -1. +``` + +Note: + +1. All elements in nums1 and nums2 are unique. +1. The length of both nums1 and nums2 would not exceed 1000. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0496.next-greater-element-i/next-greater-element-i.go b/Algorithms/0496.next-greater-element-i/next-greater-element-i.go new file mode 100755 index 000000000..b79e50431 --- /dev/null +++ b/Algorithms/0496.next-greater-element-i/next-greater-element-i.go @@ -0,0 +1,21 @@ +package Problem0496 + +func nextGreaterElement(findNums []int, nums []int) []int { + indexOf := make(map[int]int) + for i, n := range nums { + indexOf[n] = i + } + + res := make([]int, len(findNums)) + for i, n := range findNums { + res[i] = -1 + for j := indexOf[n] + 1; j < len(nums); j++ { + if n < nums[j] { + res[i] = nums[j] + break + } + } + } + + return res +} diff --git a/Algorithms/0496.next-greater-element-i/next-greater-element-i_test.go b/Algorithms/0496.next-greater-element-i/next-greater-element-i_test.go new file mode 100755 index 000000000..27ccbfef0 --- /dev/null +++ b/Algorithms/0496.next-greater-element-i/next-greater-element-i_test.go @@ -0,0 +1,47 @@ +package Problem0496 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + findNums []int + nums []int + ans []int +}{ + + { + []int{4, 1, 2}, + []int{1, 3, 4, 2}, + []int{-1, 3, -1}, + }, + + { + []int{2, 4}, + []int{1, 2, 3, 4}, + []int{3, -1}, + }, + + // 可以有多个 testcase +} + +func Test_nextGreaterElement(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, nextGreaterElement(tc.findNums, tc.nums), "输入:%v", tc) + } +} + +func Benchmark_nextGreaterElement(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + nextGreaterElement(tc.findNums, tc.nums) + } + } +} diff --git a/Algorithms/0498.diagonal-traverse/README.md b/Algorithms/0498.diagonal-traverse/README.md new file mode 100755 index 000000000..4549458cb --- /dev/null +++ b/Algorithms/0498.diagonal-traverse/README.md @@ -0,0 +1,29 @@ +# [498. Diagonal Traverse](https://leetcode.com/problems/diagonal-traverse/) + +## 题目 + +Given a matrix of M x N elements (M rows, N columns), return all elements of the matrix in diagonal order as shown in the below image. + +Example: + +```text +Input: +[ + [ 1, 2, 3 ], + [ 4, 5, 6 ], + [ 7, 8, 9 ] +] +Output: [1,2,4,7,5,3,6,8,9] +``` + +Explanation: + +![pic](https://leetcode.com/static/images/problemset/diagonal_traverse.png) + +Note: + +1. The total number of elements of the given matrix will not exceed 10,000. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0498.diagonal-traverse/diagonal-traverse.go b/Algorithms/0498.diagonal-traverse/diagonal-traverse.go new file mode 100755 index 000000000..272303967 --- /dev/null +++ b/Algorithms/0498.diagonal-traverse/diagonal-traverse.go @@ -0,0 +1,50 @@ +package Problem0498 + +func findDiagonalOrder(mat [][]int) []int { + if len(mat) == 0 || len(mat[0]) == 0 { + return []int{} + } + m, n := len(mat), len(mat[0]) + + isUpping := true + next := func(i, j int) (int, int) { + if isUpping { + i-- + j++ + if 0 <= i && j < n { + return i, j + } + + isUpping = false + + if i < 0 && j < n { + return 0, j + } + return i + 2, j - 1 + } + + i++ + j-- + if i < m && 0 <= j { + return i, j + } + + isUpping = true + + if i < m && j < 0 { + return i, 0 + } + return i - 1, j + 2 + } + + mn := m * n + res := make([]int, mn) + + i, j := 0, 0 + for k := 0; k < mn; k++ { + res[k] = mat[i][j] + i, j = next(i, j) + } + + return res +} diff --git a/Algorithms/0498.diagonal-traverse/diagonal-traverse_test.go b/Algorithms/0498.diagonal-traverse/diagonal-traverse_test.go new file mode 100755 index 000000000..590af532c --- /dev/null +++ b/Algorithms/0498.diagonal-traverse/diagonal-traverse_test.go @@ -0,0 +1,48 @@ +package Problem0498 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + matrix [][]int + ans []int +}{ + + { + [][]int{}, + []int{}, + }, + + { + [][]int{ + {1, 2, 3}, + {4, 5, 6}, + {7, 8, 9}, + }, + []int{1, 2, 4, 7, 5, 3, 6, 8, 9}, + }, + + // 可以有多个 testcase +} + +func Test_findDiagonalOrder(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findDiagonalOrder(tc.matrix), "输入:%v", tc) + } +} + +func Benchmark_findDiagonalOrder(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findDiagonalOrder(tc.matrix) + } + } +} diff --git a/Algorithms/0500.keyboard-row/README.md b/Algorithms/0500.keyboard-row/README.md new file mode 100755 index 000000000..3795bab01 --- /dev/null +++ b/Algorithms/0500.keyboard-row/README.md @@ -0,0 +1,23 @@ +# [500. Keyboard Row](https://leetcode.com/problems/keyboard-row/) + +## 题目 + +Given a List of words, return the words that can be typed using letters of alphabet on only one row's of American keyboard like the image below. + +![pic](https://leetcode.com/static/images/problemset/keyboard.png) + +Example 1: + +```text +Input: ["Hello", "Alaska", "Dad", "Peace"] +Output: ["Alaska", "Dad"] +``` + +Note: + +1. You may use one character in the keyboard more than once. +1. You may assume the input string will only contain letters of alphabet. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0500.keyboard-row/keyboard-row.go b/Algorithms/0500.keyboard-row/keyboard-row.go new file mode 100755 index 000000000..29dd04062 --- /dev/null +++ b/Algorithms/0500.keyboard-row/keyboard-row.go @@ -0,0 +1,62 @@ +package Problem0500 + +import ( + "strings" +) + +var qRow = map[byte]bool{ + 'q': true, + 'w': true, + 'e': true, + 'r': true, + 't': true, + 'y': true, + 'u': true, + 'i': true, + 'o': true, + 'p': true, +} + +var aRow = map[byte]bool{ + 'a': true, + 's': true, + 'd': true, + 'f': true, + 'g': true, + 'h': true, + 'j': true, + 'k': true, + 'l': true, +} + +var zRow = map[byte]bool{ + 'z': true, + 'x': true, + 'c': true, + 'v': true, + 'b': true, + 'n': true, + 'm': true, +} + +func isAllIn(s string, isInRow map[byte]bool) bool { + for i := range s { + if !isInRow[s[i]] { + return false + } + } + return true +} + +func findWords(words []string) []string { + res := make([]string, 0, len(words)) + + for _, word := range words { + w := strings.ToLower(word) + if isAllIn(w, qRow) || isAllIn(w, aRow) || isAllIn(w, zRow) { + res = append(res, word) + } + } + + return res +} diff --git a/Algorithms/0500.keyboard-row/keyboard-row_test.go b/Algorithms/0500.keyboard-row/keyboard-row_test.go new file mode 100755 index 000000000..e087323dd --- /dev/null +++ b/Algorithms/0500.keyboard-row/keyboard-row_test.go @@ -0,0 +1,39 @@ +package Problem0500 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + words []string + ans []string +}{ + + { + []string{"Hello", "Alaska", "Dad", "Peace"}, + []string{"Alaska", "Dad"}, + }, + + // 可以有多个 testcase +} + +func Test_findWords(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findWords(tc.words), "输入:%v", tc) + } +} + +func Benchmark_findWords(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findWords(tc.words) + } + } +} diff --git a/Algorithms/0501.find-mode-in-binary-search-tree/README.md b/Algorithms/0501.find-mode-in-binary-search-tree/README.md new file mode 100755 index 000000000..e2914e50d --- /dev/null +++ b/Algorithms/0501.find-mode-in-binary-search-tree/README.md @@ -0,0 +1,34 @@ +# [501. Find Mode in Binary Search Tree](https://leetcode.com/problems/find-mode-in-binary-search-tree/) + +## 题目 + +Given a binary search tree (BST) with duplicates, find all the mode(s) (the most frequently occurred element) in the given BST. + +Assume a BST is defined as follows: + +1. The left subtree of a node contains only nodes with keys less than or equal to the node's key. +1. The right subtree of a node contains only nodes with keys greater than or equal to the node's key. +1. Both the left and right subtrees must also be binary search trees. + +For example: + +```text +Given BST [1,null,2,2], + 1 + \ + 2 + / + 2 + +return [2]. +``` + +Note: +If a tree has more than one mode, you can return them in any order. + +Follow up: +Could you do that without using any extra space? (Assume that the implicit stack space incurred due to recursion does not count). + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0501.find-mode-in-binary-search-tree/find-mode-in-binary-search-tree.go b/Algorithms/0501.find-mode-in-binary-search-tree/find-mode-in-binary-search-tree.go new file mode 100755 index 000000000..a7b84282c --- /dev/null +++ b/Algorithms/0501.find-mode-in-binary-search-tree/find-mode-in-binary-search-tree.go @@ -0,0 +1,37 @@ +package Problem0501 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" +) + +type TreeNode = kit.TreeNode + +func findMode(root *TreeNode) []int { + r := map[int]int{} + search(root, r) + + max := -1 + res := []int{} + for n, v := range r { + if max <= v { + if max < v { + max = v + res = res[0:0] + } + res = append(res, n) + } + } + + return res +} + +func search(root *TreeNode, rec map[int]int) { + if root == nil { + return + } + + rec[root.Val]++ + + search(root.Left, rec) + search(root.Right, rec) +} diff --git a/Algorithms/0501.find-mode-in-binary-search-tree/find-mode-in-binary-search-tree_test.go b/Algorithms/0501.find-mode-in-binary-search-tree/find-mode-in-binary-search-tree_test.go new file mode 100755 index 000000000..77c5400ae --- /dev/null +++ b/Algorithms/0501.find-mode-in-binary-search-tree/find-mode-in-binary-search-tree_test.go @@ -0,0 +1,47 @@ +package Problem0501 + +import ( + "fmt" + "sort" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + pre, in []int + ans []int +}{ + + { + []int{1, 2, 1, 2}, + []int{1, 1, 2, 2}, + []int{1, 2}, + }, + + // 可以有多个 testcase +} + +func Test_findMode(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + root := kit.PreIn2Tree(tc.pre, tc.in) + ans := findMode(root) + sort.Ints(ans) + ast.Equal(tc.ans, ans, "输入:%v", tc) + } +} + +func Benchmark_findMode(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + root := kit.PreIn2Tree(tc.pre, tc.in) + findMode(root) + } + } +} diff --git a/Algorithms/0502.ipo/README.md b/Algorithms/0502.ipo/README.md new file mode 100755 index 000000000..4c256a977 --- /dev/null +++ b/Algorithms/0502.ipo/README.md @@ -0,0 +1,33 @@ +# [502. IPO](https://leetcode.com/problems/ipo/) + +## 题目 + +Suppose LeetCode will start its IPO soon. In order to sell a good price of its shares to Venture Capital, LeetCode would like to work on some projects to increase its capital before the IPO. Since it has limited resources, it can only finish at most k distinct projects before the IPO. Help LeetCode design the best way to maximize its total capital after finishing at most k distinct projects. + +You are given several projects. For each project i, it has a pure profit Pi and a minimum capital of Ci is needed to start the corresponding project. Initially, you have W capital. When you finish a project, you will obtain its pure profit and the profit will be added to your total capital. + +To sum up, pick a list of at most k distinct projects from given projects to maximize your final capital, and output your final maximized capital. + +Example 1: + +```text +Input: k=2, W=0, Profits=[1,2,3], Capital=[0,1,1]. + +Output: 4 + +Explanation: Since your initial capital is 0, you can only start the project indexed 0. + After finishing it you will obtain profit 1 and your capital becomes 1. + With capital 1, you can either start the project indexed 1 or the project indexed 2. + Since you can choose at most 2 projects, you need to finish the project indexed 2 to get the maximum capital. + Therefore, output the final maximized capital, which is 0 + 1 + 3 = 4. +``` + +Note: + +1. You may assume all numbers in the input are non-negative integers. +1. The length of Profits array and Capital array will not exceed 50,000. +1. The answer is guaranteed to fit in a 32-bit signed integer. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0502.ipo/ipo.go b/Algorithms/0502.ipo/ipo.go new file mode 100755 index 000000000..1822f62b9 --- /dev/null +++ b/Algorithms/0502.ipo/ipo.go @@ -0,0 +1,90 @@ +package Problem0502 + +import ( + "container/heap" + "sort" +) + +func findMaximizedCapital(k int, W int, Profits []int, Capital []int) int { + size := len(Profits) + + // caps 按照 capital 的升序排列 project + caps := make(capQueue, size) + for i := range Profits { + p := &project{ + profit: Profits[i], + capital: Capital[i], + } + caps[i] = p + } + sort.Sort(caps) + + // pros 是高 profit 优先的队列 + pros := make(proPQ, 0, size) + var i int + for { + // 把所有可以做的 project 存入 pros + for i < len(caps) && caps[i].capital <= W { + heap.Push(&pros, caps[i]) + i++ + } + + // 无 project 可做了 + // 或 + // 已经达到工作量的上限 + if len(pros) == 0 || k == 0 { + break + } + + // 从 pros 中挑选一件 profit 最大的工作来做 + // 并更新 W + W += heap.Pop(&pros).(*project).profit + k-- + } + + return W +} + +// entry 是 priorityQueue 中的元素 +type project struct { + profit, capital int +} + +// PQ implements heap.Interface and holds entries. +type capQueue []*project + +func (q capQueue) Len() int { return len(q) } + +func (q capQueue) Less(i, j int) bool { + return q[i].capital < q[j].capital +} + +func (q capQueue) Swap(i, j int) { + q[i], q[j] = q[j], q[i] +} + +// PQ implements heap.Interface and holds entries. +type proPQ []*project + +func (pq proPQ) Len() int { return len(pq) } + +func (pq proPQ) Less(i, j int) bool { + return pq[i].profit > pq[j].profit +} + +func (pq proPQ) Swap(i, j int) { + pq[i], pq[j] = pq[j], pq[i] +} + +// Push 往 pq 中放 entry +func (pq *proPQ) Push(x interface{}) { + entry := x.(*project) + *pq = append(*pq, entry) +} + +// Pop 从 pq 中取出最优先的 entry +func (pq *proPQ) Pop() interface{} { + temp := (*pq)[len(*pq)-1] + *pq = (*pq)[:len(*pq)-1] + return temp +} diff --git a/Algorithms/0502.ipo/ipo_test.go b/Algorithms/0502.ipo/ipo_test.go new file mode 100755 index 000000000..ad2ffa210 --- /dev/null +++ b/Algorithms/0502.ipo/ipo_test.go @@ -0,0 +1,61 @@ +package Problem0502 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + k int + W int + Profits []int + Capital []int + ans int +}{ + + { + 111, + 12, + []int{319, 178, 37, 756, 152, 763, 481, 1055, 594, 825, 759, 494, 1087, 696, 717, 358, 1091, 1145, 1043, 245, 779, 957, 3, 1060, 1141, 926, 226, 657, 869, 740, 1170, 746, 889, 416, 634, 209, 1189, 1076, 819, 1144, 40, 807, 561, 400, 283, 133, 186, 839, 1043, 491, 936, 559, 70, 9, 854, 1172, 9, 739, 871, 436, 1087, 1029, 66, 561, 798, 1141, 701, 1020, 1072, 92, 636, 509, 392, 77, 84, 202, 843, 563, 329, 906, 101, 997, 1162, 105, 876, 460, 285, 446, 753, 516, 60, 932, 323, 659, 9, 639, 1041, 861, 1199, 343, 792, 1114, 536, 405, 542, 805, 929, 589, 538, 410, 143, 114, 24, 1064, 682, 536, 1016, 1141, 843, 472, 817, 196, 673, 189, 915, 196, 755, 203, 956, 283, 833, 836, 22, 899, 232, 655, 572, 207, 819, 639, 1024, 887, 407, 385, 251, 896, 165, 290, 193, 357, 870, 678, 411, 697, 998, 344, 628, 866, 1004, 894, 547, 574, 36, 847, 691, 601, 896, 363, 21, 1133, 115, 658, 855, 1042, 2, 189, 230, 215, 747, 971, 581, 809, 832, 311, 35, 639, 1127, 701, 167, 672, 763, 997, 1061, 1170, 289, 806, 91, 198, 720, 67, 273, 863, 437, 152, 671, 635, 968, 107, 58, 453, 392, 236, 875, 719, 44, 850, 176, 580, 937, 227, 125, 851, 1188, 915, 747, 1175, 69, 743, 250, 275, 290, 787, 780, 516, 775, 279, 256, 649, 83, 1180, 372, 655, 813, 750, 381, 807, 988, 977, 430, 282, 1067, 551, 726, 756, 372, 17, 1016, 550, 1128, 223, 174, 85, 1039, 1, 27, 178, 822, 243, 440, 79, 772, 211, 640, 454, 1141, 654, 351, 54, 794, 711, 157, 492, 307, 1156, 937, 212, 461, 417, 741, 1104, 642, 1147, 833, 1194, 1066, 1070, 876, 1045, 341, 854, 1014, 787, 518, 404, 1068, 385, 756, 998, 298, 439, 917, 183, 71, 363, 38, 828, 372, 1071, 195, 481, 1153, 871, 712, 803, 849, 145, 1144, 410, 420, 561, 678, 241, 498, 548, 436, 871, 810, 180, 635, 119, 665, 551, 1132, 807, 408, 685, 489, 274, 459, 28, 987, 935, 310, 284, 1163, 924, 812, 267, 1123, 782, 1065, 1075, 1199, 1047, 289, 280, 1044, 931, 1056, 625, 672, 150, 41, 1084, 998, 151, 483, 226, 548, 277, 1187, 1010, 262, 1048, 493, 1084, 845, 1127, 1009, 773, 129, 547, 798, 118, 559, 463, 972, 666, 1155, 519, 381, 405, 819, 201, 790, 729, 1100, 614, 691, 3, 386, 206, 514, 387, 612, 1073, 158, 67, 1116, 164, 496, 1056, 1159, 348, 530, 28, 1177, 774, 1139, 559, 563, 310, 916, 897, 36, 1060, 173, 952, 123, 635, 911, 711, 304, 611, 481, 645, 532, 1033, 385, 402, 797, 117, 307, 969, 1147, 1127, 434, 1099, 1043, 104, 74, 257, 778, 934, 901, 106, 84, 525, 138, 698, 877, 1009, 487, 450, 649, 736, 802, 1032, 456, 757, 10, 2, 720, 1155, 234, 844, 880, 1053, 1134, 821, 1094, 970, 1095, 976, 101, 1163, 104, 38, 198, 350, 896, 345, 867, 1129, 1064, 403, 228, 1103, 416, 561, 722, 915, 1161, 252, 45, 632, 1163, 232, 174, 964, 876, 1126, 479, 432, 984, 815, 544, 1005, 620, 497, 1021, 763, 169, 1028, 706, 1112, 150, 368, 483, 251, 721, 492, 686, 1105, 38, 1140, 1085, 153, 366, 428, 296, 28, 648, 873, 21, 236, 393, 581, 1043, 1086, 747, 402, 201, 1196, 416, 788, 318, 257, 815, 735, 1023, 1143, 1100, 922, 1033, 884, 824, 963, 159, 904, 21, 1168, 511, 723, 400, 239, 338, 89, 1099, 572, 674, 54, 891, 426, 277, 91, 504, 302, 616, 468, 506, 917, 491, 744, 1091, 1051, 594, 465, 850, 338, 417, 320, 1160, 364, 480, 855, 86, 305, 225, 833, 637, 760, 1147, 613, 236, 460, 664, 1183, 38, 806, 100, 654, 852, 975, 816, 506, 1092, 275, 6, 229, 972, 53, 554, 370, 63, 651, 701, 304, 1011, 672, 353, 118, 1111, 448, 549, 151, 1087, 909, 420, 1095, 663, 1119, 1124, 729, 578, 733, 861, 1154, 1195, 387, 1182, 850, 189, 463, 1129, 1185, 541, 546, 1159, 314, 137, 479, 59, 841, 514, 548, 496, 642, 341, 151, 999, 1036, 1186, 704, 550, 1039, 723, 779, 584, 382, 371, 712, 176, 665, 180, 440, 697, 1102, 408, 728, 157, 1050, 558, 692, 336, 384, 107, 839, 477, 204, 862, 345, 429, 1144, 1069, 207, 449, 594, 963, 988, 843, 334, 200, 865, 281, 296, 1040, 914, 995, 743, 1134, 1050, 484, 602, 1001, 570, 1052, 1106, 922, 77, 1099, 681, 360, 955, 1184, 669, 411, 760, 46, 599, 815, 231, 86, 694, 469, 1079, 1161, 1105, 519, 1010, 681, 603, 376, 534, 145, 361, 448, 1006, 91, 397, 671, 597, 238, 119, 467, 587, 723, 162, 804, 638, 568, 195, 460, 610, 868, 806, 995, 1178, 490, 406, 933, 232, 17, 37, 2, 114, 1004, 871, 531, 209, 267, 37, 750, 1196, 940, 89, 725, 377, 898, 6, 685, 210, 1127, 1160, 432, 391, 931, 681, 937, 275, 1190, 137, 743, 652, 430, 566, 180, 1192, 718, 253, 133, 998, 1067, 764, 747, 1159, 827, 143, 506, 641, 327, 468, 731, 50, 15, 569, 80, 310, 1086, 1092, 989, 245, 520, 711, 788, 1144, 938, 1152, 1169, 563, 1053, 1182, 331, 838, 112, 361, 1049, 717, 979, 956, 434, 534, 1083, 117, 280, 1104, 293, 1137, 592, 1019, 606, 526, 216, 924, 197, 137, 1041, 2, 910, 274, 1178, 267, 521, 626, 764, 691, 124, 446, 337, 676, 325, 288, 1120, 924, 512, 777, 1063, 979, 86, 677, 1183, 777, 418, 41, 852, 929, 712, 1132, 1030, 339, 943, 475, 851, 340, 894, 1091, 230, 654, 229, 945, 69, 182, 110, 255, 895, 645, 1061, 793, 1016, 807, 440, 330, 519, 73, 108, 660, 209, 1077, 1191, 938, 415, 1162, 579, 258, 14, 273, 561, 834, 371, 134, 1118, 1139, 1163, 667, 979, 483, 436, 42, 593, 139, 846, 875, 571, 808, 76, 713, 1198, 352, 299, 156, 793, 509, 245, 697, 1106, 236, 287, 236, 644, 683}, + []int{487, 13, 943, 31, 661, 656, 690, 175, 1147, 760, 96, 290, 755, 504, 1111, 219, 187, 641, 380, 886, 781, 214, 714, 594, 41, 1154, 908, 977, 1183, 28, 464, 524, 895, 1177, 28, 225, 1180, 206, 387, 25, 166, 207, 394, 418, 771, 719, 153, 836, 970, 589, 114, 67, 1180, 1136, 863, 1144, 21, 9, 957, 861, 981, 849, 1031, 361, 541, 649, 220, 718, 263, 390, 24, 830, 103, 955, 233, 1174, 521, 580, 83, 869, 321, 712, 1011, 130, 297, 835, 406, 543, 849, 681, 337, 355, 867, 863, 552, 883, 155, 762, 982, 129, 605, 125, 1111, 442, 89, 1139, 1084, 870, 183, 1142, 78, 12, 893, 677, 817, 348, 1036, 482, 76, 619, 563, 435, 529, 311, 1148, 629, 786, 288, 112, 995, 854, 844, 1002, 948, 570, 736, 1088, 354, 618, 876, 926, 150, 1108, 412, 707, 233, 137, 775, 751, 1137, 481, 349, 150, 518, 1165, 191, 223, 754, 419, 1025, 817, 1001, 278, 692, 403, 1023, 106, 78, 124, 679, 598, 727, 1026, 966, 564, 726, 1148, 643, 806, 1182, 645, 300, 867, 613, 458, 844, 679, 907, 437, 1012, 902, 18, 843, 190, 43, 705, 818, 957, 146, 1175, 130, 744, 941, 975, 692, 1066, 541, 335, 20, 311, 606, 377, 558, 113, 545, 1115, 228, 29, 2, 1180, 331, 1072, 151, 692, 1156, 347, 293, 1135, 959, 865, 1031, 40, 425, 1191, 1178, 87, 989, 92, 1186, 1072, 105, 1058, 369, 401, 1117, 220, 484, 181, 901, 321, 923, 263, 72, 685, 820, 1123, 736, 942, 37, 419, 631, 545, 761, 227, 230, 25, 636, 1048, 834, 736, 899, 530, 217, 669, 278, 653, 657, 857, 724, 782, 146, 780, 615, 1156, 751, 463, 625, 707, 355, 92, 718, 855, 624, 504, 359, 744, 793, 868, 462, 985, 1087, 517, 886, 83, 221, 383, 601, 709, 683, 1097, 544, 411, 28, 1129, 781, 13, 752, 347, 1150, 1030, 269, 701, 658, 658, 1188, 222, 1160, 480, 953, 203, 132, 17, 723, 927, 911, 448, 977, 1126, 219, 118, 1033, 919, 1041, 712, 930, 963, 772, 264, 523, 479, 735, 919, 72, 1019, 131, 15, 628, 331, 408, 578, 37, 1123, 125, 527, 887, 54, 1043, 259, 654, 557, 872, 505, 700, 1077, 202, 368, 628, 29, 66, 199, 611, 730, 1108, 682, 705, 628, 1001, 705, 21, 266, 428, 1093, 800, 742, 701, 715, 845, 1151, 300, 460, 1134, 708, 443, 706, 819, 296, 199, 671, 452, 626, 386, 569, 999, 326, 1081, 202, 384, 783, 541, 811, 1058, 684, 146, 288, 1149, 480, 0, 658, 547, 773, 588, 758, 189, 489, 257, 436, 362, 417, 180, 671, 141, 657, 864, 808, 1026, 504, 827, 1125, 977, 1161, 699, 360, 689, 520, 796, 147, 746, 978, 833, 82, 102, 254, 736, 88, 525, 1037, 659, 1061, 333, 663, 520, 6, 439, 823, 1151, 395, 188, 32, 513, 34, 805, 1017, 1193, 157, 942, 87, 630, 915, 807, 215, 482, 1132, 23, 1008, 1175, 724, 1070, 339, 1139, 22, 455, 306, 369, 151, 1031, 1119, 846, 1195, 49, 1169, 773, 706, 45, 747, 875, 944, 1161, 1025, 258, 765, 1039, 459, 641, 1169, 211, 894, 556, 253, 831, 1115, 458, 351, 1138, 58, 1169, 1190, 743, 611, 392, 1015, 54, 831, 330, 1138, 681, 1012, 750, 967, 1179, 398, 564, 5, 2, 143, 787, 197, 590, 144, 589, 588, 493, 524, 748, 1123, 707, 585, 641, 293, 871, 331, 1173, 280, 218, 931, 11, 663, 1005, 1118, 555, 1000, 699, 720, 81, 527, 71, 458, 462, 1056, 447, 491, 1068, 1078, 842, 455, 497, 959, 745, 654, 1011, 939, 787, 430, 535, 594, 940, 1176, 656, 207, 815, 1133, 610, 1113, 596, 1018, 961, 840, 555, 582, 1187, 828, 161, 983, 686, 870, 800, 525, 34, 1013, 385, 870, 953, 59, 518, 521, 151, 633, 561, 848, 310, 712, 108, 1148, 446, 480, 983, 110, 442, 182, 119, 463, 909, 690, 48, 1040, 631, 17, 1027, 158, 353, 108, 524, 335, 1046, 514, 1027, 746, 917, 378, 437, 606, 829, 743, 462, 1013, 525, 290, 477, 749, 896, 12, 351, 13, 42, 819, 334, 912, 30, 1041, 815, 307, 1138, 168, 209, 1134, 100, 276, 292, 283, 1074, 123, 561, 857, 92, 879, 58, 706, 532, 75, 49, 385, 342, 887, 646, 301, 54, 483, 589, 1084, 1092, 178, 845, 243, 873, 611, 340, 712, 115, 157, 63, 773, 800, 844, 167, 384, 522, 877, 183, 368, 709, 501, 905, 512, 756, 246, 197, 463, 47, 232, 256, 37, 883, 1048, 774, 431, 943, 868, 111, 163, 336, 648, 313, 858, 536, 416, 680, 951, 320, 499, 199, 234, 482, 529, 676, 26, 1180, 721, 877, 586, 628, 1152, 835, 1145, 447, 763, 750, 188, 1169, 596, 1125, 310, 519, 1165, 488, 1063, 59, 292, 701, 1078, 1088, 663, 512, 172, 477, 187, 215, 1192, 22, 827, 279, 607, 286, 179, 744, 569, 500, 510, 1038, 570, 1159, 520, 1070, 759, 831, 906, 644, 753, 574, 257, 983, 1023, 227, 460, 710, 169, 595, 249, 111, 73, 991, 933, 448, 655, 559, 183, 244, 44, 644, 935, 466, 97, 605, 460, 800, 229, 977, 675, 236, 946, 73, 456, 623, 499, 423, 162, 342, 914, 386, 1082, 407, 954, 1081, 1099, 142, 539, 416, 791, 1195, 1099, 885, 965, 971, 796, 1198, 449, 768, 792, 541, 18, 476, 303, 137, 319, 1008, 343, 733, 128, 641, 709, 175, 691, 227, 307, 1177, 1198, 1075, 747, 944, 1038, 933, 643, 613, 1166, 1153, 120, 288, 1167, 246, 1103, 185, 85, 1008, 1060, 1051, 421, 150, 601, 376, 183, 1028, 146, 297, 515, 688, 886, 1090, 552, 969, 903, 1086, 931, 946, 1099, 546, 17, 851, 908, 1170, 418, 94, 61, 233, 1069, 510, 783, 302, 701, 564, 1195, 57, 1007, 994, 205, 1019, 694, 1020, 137, 1041, 803, 673, 1162, 14, 904, 418, 1076, 514, 79, 944, 242, 491, 867, 934, 40, 1059, 776, 817, 468, 516, 550, 906, 790, 459, 273, 924, 185, 1183, 337, 435, 699, 316, 768}, + 126981, + }, + + { + 2, + 1, + []int{1, 2, 3}, + []int{1, 1, 1}, + 6, + }, + + { + 2, + 0, + []int{1, 2, 3}, + []int{0, 1, 1}, + 4, + }, + + // 可以有多个 testcase +} + +func Test_findMaximizedCapital(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findMaximizedCapital(tc.k, tc.W, tc.Profits, tc.Capital), "输入:%v", tc) + } +} + +func Benchmark_findMaximizedCapital(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findMaximizedCapital(tc.k, tc.W, tc.Profits, tc.Capital) + } + } +} diff --git a/Algorithms/0503.next-greater-element-ii/README.md b/Algorithms/0503.next-greater-element-ii/README.md new file mode 100755 index 000000000..583cbbd49 --- /dev/null +++ b/Algorithms/0503.next-greater-element-ii/README.md @@ -0,0 +1,20 @@ +# [503. Next Greater Element II](https://leetcode.com/problems/next-greater-element-ii/) + +## 题目 + +Given a circular array (the next element of the last element is the first element of the array), print the Next Greater Number for every element. The Next Greater Number of a number x is the first greater number to its traversing-order next in the array, which means you could search circularly to find its next greater number. If it doesn't exist, output -1 for this number. + +Example 1: + +```text +Input: [1,2,1] +Output: [2,-1,2] +Explanation: The first 1's next greater number is 2; The number 2 can't find next greater number; The second 1's next greater number needs to search circularly, which is also 2. +``` + +Note: +The length of given array won't exceed 10000. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0503.next-greater-element-ii/next-greater-element-ii.go b/Algorithms/0503.next-greater-element-ii/next-greater-element-ii.go new file mode 100755 index 000000000..1287d5f40 --- /dev/null +++ b/Algorithms/0503.next-greater-element-ii/next-greater-element-ii.go @@ -0,0 +1,30 @@ +package Problem0503 + +func nextGreaterElements(nums []int) []int { + size := len(nums) + + res := make([]int, size) + for i := range res { + res[i] = -1 + } + + // stack 中存放的是 nums 的递减子序列的索引号,例如 + // nums = {9,8,7,3,2,1,6} + // 在遇到 6 以前,stack = {9,8,7,3,2,1} 的索引号 + // 在遇到 6 以后,stack = {9,8,7,6} 的索引号, + // 此次已经得知了,{3,2,1} 的 nextGreater 是 6 + stack := make([]int, 0, size) + + // i < size*2 是为了避免 stack 中留有的最大值无法取出导致的无限循环。因为 + // 当 i < size 时,如果存在 nums[i] < nums[j%size], 定有 j < i+size < size*2 + // size*2 内找不到,就永远也找不到了 + for i := 0; i < size*2; i++ { + for len(stack) > 0 && nums[stack[len(stack)-1]] < nums[i%size] { + res[stack[len(stack)-1]] = nums[i%size] + stack = stack[:len(stack)-1] + } + stack = append(stack, i%size) + } + + return res +} diff --git a/Algorithms/0503.next-greater-element-ii/next-greater-element-ii_test.go b/Algorithms/0503.next-greater-element-ii/next-greater-element-ii_test.go new file mode 100755 index 000000000..e75b6b24a --- /dev/null +++ b/Algorithms/0503.next-greater-element-ii/next-greater-element-ii_test.go @@ -0,0 +1,64 @@ +package Problem0503 + +import ( + // "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans []int +}{ + + { + []int{5,4,3,2,4,3,2}, + []int{-1,5,4,4,5,5,5}, + }, + + { + []int{100000, 99999, 99998, 99997, 99996, 99995, 99994, 99993, 99992, 99991, 99990, 99989, 99988, 99987, 99986, 99985, 99984, 99983, 99982, 99981, 99980, 99979, 99978, 99977, 99976, 99975, 99974, 99973, 99972, 99971, 99970, 99969, 99968, 99967, 99966, 99965, 99964, 99963, 99962, 99961, 99960, 99959, 99958, 99957, 99956, 99955, 99954, 99953, 99952, 99951, 99950, 99949, 99948, 99947, 99946, 99945, 99944, 99943, 99942, 99941, 99940, 99939, 99938, 99937, 99936, 99935, 99934, 99933, 99932, 99931, 99930, 99929, 99928, 99927, 99926, 99925, 99924, 99923, 99922, 99921, 99920, 99919, 99918, 99917, 99916, 99915, 99914, 99913, 99912, 99911, 99910, 99909, 99908, 99907, 99906, 99905, 99904, 99903, 99902, 99901, 99900, 99899, 99898, 99897, 99896, 99895, 99894, 99893, 99892, 99891, 99890, 99889, 99888, 99887, 99886, 99885, 99884, 99883, 99882, 99881, 99880, 99879, 99878, 99877, 99876, 99875, 99874, 99873, 99872, 99871, 99870, 99869, 99868, 99867, 99866, 99865, 99864, 99863, 99862, 99861, 99860, 99859, 99858, 99857, 99856, 99855, 99854, 99853, 99852, 99851, 99850, 99849, 99848, 99847, 99846, 99845, 99844, 99843, 99842, 99841, 99840, 99839, 99838, 99837, 99836, 99835, 99834, 99833, 99832, 99831, 99830, 99829, 99828, 99827, 99826, 99825, 99824, 99823, 99822, 99821, 99820, 99819, 99818, 99817, 99816, 99815, 99814, 99813, 99812, 99811, 99810, 99809, 99808, 99807, 99806, 99805, 99804, 99803, 99802, 99801, 99800, 99799, 99798, 99797, 99796, 99795, 99794, 99793, 99792, 99791, 99790, 99789, 99788, 99787, 99786, 99785, 99784, 99783, 99782, 99781, 99780, 99779, 99778, 99777, 99776, 99775, 99774, 99773, 99772, 99771, 99770, 99769, 99768, 99767, 99766, 99765, 99764, 99763, 99762, 99761, 99760, 99759, 99758, 99757, 99756, 99755, 99754, 99753, 99752, 99751, 99750, 99749, 99748, 99747, 99746, 99745, 99744, 99743, 99742, 99741, 99740, 99739, 99738, 99737, 99736, 99735, 99734, 99733, 99732, 99731, 99730, 99729, 99728, 99727, 99726, 99725, 99724, 99723, 99722, 99721, 99720, 99719, 99718, 99717, 99716, 99715, 99714, 99713, 99712, 99711, 99710, 99709, 99708, 99707, 99706, 99705, 99704, 99703, 99702, 99701, 99700, 99699, 99698, 99697, 99696, 99695, 99694, 99693, 99692, 99691, 99690, 99689, 99688, 99687, 99686, 99685, 99684, 99683, 99682, 99681, 99680, 99679, 99678, 99677, 99676, 99675, 99674, 99673, 99672, 99671, 99670, 99669, 99668, 99667, 99666, 99665, 99664, 99663, 99662, 99661, 99660, 99659, 99658, 99657, 99656, 99655, 99654, 99653, 99652, 99651, 99650, 99649, 99648, 99647, 99646, 99645, 99644, 99643, 99642, 99641, 99640, 99639, 99638, 99637, 99636, 99635, 99634, 99633, 99632, 99631, 99630, 99629, 99628, 99627, 99626, 99625, 99624, 99623, 99622, 99621, 99620, 99619, 99618, 99617, 99616, 99615, 99614, 99613, 99612, 99611, 99610, 99609, 99608, 99607, 99606, 99605, 99604, 99603, 99602, 99601, 99600, 99599, 99598, 99597, 99596, 99595, 99594, 99593, 99592, 99591, 99590, 99589, 99588, 99587, 99586, 99585, 99584, 99583, 99582, 99581, 99580, 99579, 99578, 99577, 99576, 99575, 99574, 99573, 99572, 99571, 99570, 99569, 99568, 99567, 99566, 99565, 99564, 99563, 99562, 99561, 99560, 99559, 99558, 99557, 99556, 99555, 99554, 99553, 99552, 99551, 99550, 99549, 99548, 99547, 99546, 99545, 99544, 99543, 99542, 99541, 99540, 99539, 99538, 99537, 99536, 99535, 99534, 99533, 99532, 99531, 99530, 99529, 99528, 99527, 99526, 99525, 99524, 99523, 99522, 99521, 99520, 99519, 99518, 99517, 99516, 99515, 99514, 99513, 99512, 99511, 99510, 99509, 99508, 99507, 99506, 99505, 99504, 99503, 99502, 99501, 99500, 99499, 99498, 99497, 99496, 99495, 99494, 99493, 99492, 99491, 99490, 99489, 99488, 99487, 99486, 99485, 99484, 99483, 99482, 99481, 99480, 99479, 99478, 99477, 99476, 99475, 99474, 99473, 99472, 99471, 99470, 99469, 99468, 99467, 99466, 99465, 99464, 99463, 99462, 99461, 99460, 99459, 99458, 99457, 99456, 99455, 99454, 99453, 99452, 99451, 99450, 99449, 99448, 99447, 99446, 99445, 99444, 99443, 99442, 99441, 99440, 99439, 99438, 99437, 99436, 99435, 99434, 99433, 99432, 99431, 99430, 99429, 99428, 99427, 99426, 99425, 99424, 99423, 99422, 99421, 99420, 99419, 99418, 99417, 99416, 99415, 99414, 99413, 99412, 99411, 99410, 99409, 99408, 99407, 99406, 99405, 99404, 99403, 99402, 99401, 99400, 99399, 99398, 99397, 99396, 99395, 99394, 99393, 99392, 99391, 99390, 99389, 99388, 99387, 99386, 99385, 99384, 99383, 99382, 99381, 99380, 99379, 99378, 99377, 99376, 99375, 99374, 99373, 99372, 99371, 99370, 99369, 99368, 99367, 99366, 99365, 99364, 99363, 99362, 99361, 99360, 99359, 99358, 99357, 99356, 99355, 99354, 99353, 99352, 99351, 99350, 99349, 99348, 99347, 99346, 99345, 99344, 99343, 99342, 99341, 99340, 99339, 99338, 99337, 99336, 99335, 99334, 99333, 99332, 99331, 99330, 99329, 99328, 99327, 99326, 99325, 99324, 99323, 99322, 99321, 99320, 99319, 99318, 99317, 99316, 99315, 99314, 99313, 99312, 99311, 99310, 99309, 99308, 99307, 99306, 99305, 99304, 99303, 99302, 99301, 99300, 99299, 99298, 99297, 99296, 99295, 99294, 99293, 99292, 99291, 99290, 99289, 99288, 99287, 99286, 99285, 99284, 99283, 99282, 99281, 99280, 99279, 99278, 99277, 99276, 99275, 99274, 99273, 99272, 99271, 99270, 99269, 99268, 99267, 99266, 99265, 99264, 99263, 99262, 99261, 99260, 99259, 99258, 99257, 99256, 99255, 99254, 99253, 99252, 99251, 99250, 99249, 99248, 99247, 99246, 99245, 99244, 99243, 99242, 99241, 99240, 99239, 99238, 99237, 99236, 99235, 99234, 99233, 99232, 99231, 99230, 99229, 99228, 99227, 99226, 99225, 99224, 99223, 99222, 99221, 99220, 99219, 99218, 99217, 99216, 99215, 99214, 99213, 99212, 99211, 99210, 99209, 99208, 99207, 99206, 99205, 99204, 99203, 99202, 99201, 99200, 99199, 99198, 99197, 99196, 99195, 99194, 99193, 99192, 99191, 99190, 99189, 99188, 99187, 99186, 99185, 99184, 99183, 99182, 99181, 99180, 99179, 99178, 99177, 99176, 99175, 99174, 99173, 99172, 99171, 99170, 99169, 99168, 99167, 99166, 99165, 99164, 99163, 99162, 99161, 99160, 99159, 99158, 99157, 99156, 99155, 99154, 99153, 99152, 99151, 99150, 99149, 99148, 99147, 99146, 99145, 99144, 99143, 99142, 99141, 99140, 99139, 99138, 99137, 99136, 99135, 99134, 99133, 99132, 99131, 99130, 99129, 99128, 99127, 99126, 99125, 99124, 99123, 99122, 99121, 99120, 99119, 99118, 99117, 99116, 99115, 99114, 99113, 99112, 99111, 99110, 99109, 99108, 99107, 99106, 99105, 99104, 99103, 99102, 99101, 99100, 99099, 99098, 99097, 99096, 99095, 99094, 99093, 99092, 99091, 99090, 99089, 99088, 99087, 99086, 99085, 99084, 99083, 99082, 99081, 99080, 99079, 99078, 99077, 99076, 99075, 99074, 99073, 99072, 99071, 99070, 99069, 99068, 99067, 99066, 99065, 99064, 99063, 99062, 99061, 99060, 99059, 99058, 99057, 99056, 99055, 99054, 99053, 99052, 99051, 99050, 99049, 99048, 99047, 99046, 99045, 99044, 99043, 99042, 99041, 99040, 99039, 99038, 99037, 99036, 99035, 99034, 99033, 99032, 99031, 99030, 99029, 99028, 99027, 99026, 99025, 99024, 99023, 99022, 99021, 99020, 99019, 99018, 99017, 99016, 99015, 99014, 99013, 99012, 99011, 99010, 99009, 99008, 99007, 99006, 99005, 99004, 99003, 99002, 99001, 99000, 98999, 98998, 98997, 98996, 98995, 98994, 98993, 98992, 98991, 98990, 98989, 98988, 98987, 98986, 98985, 98984, 98983, 98982, 98981, 98980, 98979, 98978, 98977, 98976, 98975, 98974, 98973, 98972, 98971, 98970, 98969, 98968, 98967, 98966, 98965, 98964, 98963, 98962, 98961, 98960, 98959, 98958, 98957, 98956, 98955, 98954, 98953, 98952, 98951, 98950, 98949, 98948, 98947, 98946, 98945, 98944, 98943, 98942, 98941, 98940, 98939, 98938, 98937, 98936, 98935, 98934, 98933, 98932, 98931, 98930, 98929, 98928, 98927, 98926, 98925, 98924, 98923, 98922, 98921, 98920, 98919, 98918, 98917, 98916, 98915, 98914, 98913, 98912, 98911, 98910, 98909, 98908, 98907, 98906, 98905, 98904, 98903, 98902, 98901, 98900, 98899, 98898, 98897, 98896, 98895, 98894, 98893, 98892, 98891, 98890, 98889, 98888, 98887, 98886, 98885, 98884, 98883, 98882, 98881, 98880, 98879, 98878, 98877, 98876, 98875, 98874, 98873, 98872, 98871, 98870, 98869, 98868, 98867, 98866, 98865, 98864, 98863, 98862, 98861, 98860, 98859, 98858, 98857, 98856, 98855, 98854, 98853, 98852, 98851, 98850, 98849, 98848, 98847, 98846, 98845, 98844, 98843, 98842, 98841, 98840, 98839, 98838, 98837, 98836, 98835, 98834, 98833, 98832, 98831, 98830, 98829, 98828, 98827, 98826, 98825, 98824, 98823, 98822, 98821, 98820, 98819, 98818, 98817, 98816, 98815, 98814, 98813, 98812, 98811, 98810, 98809, 98808, 98807, 98806, 98805, 98804, 98803, 98802, 98801, 98800, 98799, 98798, 98797, 98796, 98795, 98794, 98793, 98792, 98791, 98790, 98789, 98788, 98787, 98786, 98785, 98784, 98783, 98782, 98781, 98780, 98779, 98778, 98777, 98776, 98775, 98774, 98773, 98772, 98771, 98770, 98769, 98768, 98767, 98766, 98765, 98764, 98763, 98762, 98761, 98760, 98759, 98758, 98757, 98756, 98755, 98754, 98753, 98752, 98751, 98750, 98749, 98748, 98747, 98746, 98745, 98744, 98743, 98742, 98741, 98740, 98739, 98738, 98737, 98736, 98735, 98734, 98733, 98732, 98731, 98730, 98729, 98728, 98727, 98726, 98725, 98724, 98723, 98722, 98721, 98720, 98719, 98718, 98717, 98716, 98715, 98714, 98713, 98712, 98711, 98710, 98709, 98708, 98707, 98706, 98705, 98704, 98703, 98702, 98701, 98700, 98699, 98698, 98697, 98696, 98695, 98694, 98693, 98692, 98691, 98690, 98689, 98688, 98687, 98686, 98685, 98684, 98683, 98682, 98681, 98680, 98679, 98678, 98677, 98676, 98675, 98674, 98673, 98672, 98671, 98670, 98669, 98668, 98667, 98666, 98665, 98664, 98663, 98662, 98661, 98660, 98659, 98658, 98657, 98656, 98655, 98654, 98653, 98652, 98651, 98650, 98649, 98648, 98647, 98646, 98645, 98644, 98643, 98642, 98641, 98640, 98639, 98638, 98637, 98636, 98635, 98634, 98633, 98632, 98631, 98630, 98629, 98628, 98627, 98626, 98625, 98624, 98623, 98622, 98621, 98620, 98619, 98618, 98617, 98616, 98615, 98614, 98613, 98612, 98611, 98610, 98609, 98608, 98607, 98606, 98605, 98604, 98603, 98602, 98601, 98600, 98599, 98598, 98597, 98596, 98595, 98594, 98593, 98592, 98591, 98590, 98589, 98588, 98587, 98586, 98585, 98584, 98583, 98582, 98581, 98580, 98579, 98578, 98577, 98576, 98575, 98574, 98573, 98572, 98571, 98570, 98569, 98568, 98567, 98566, 98565, 98564, 98563, 98562, 98561, 98560, 98559, 98558, 98557, 98556, 98555, 98554, 98553, 98552, 98551, 98550, 98549, 98548, 98547, 98546, 98545, 98544, 98543, 98542, 98541, 98540, 98539, 98538, 98537, 98536, 98535, 98534, 98533, 98532, 98531, 98530, 98529, 98528, 98527, 98526, 98525, 98524, 98523, 98522, 98521, 98520, 98519, 98518, 98517, 98516, 98515, 98514, 98513, 98512, 98511, 98510, 98509, 98508, 98507, 98506, 98505, 98504, 98503, 98502, 98501, 98500, 98499, 98498, 98497, 98496, 98495, 98494, 98493, 98492, 98491, 98490, 98489, 98488, 98487, 98486, 98485, 98484, 98483, 98482, 98481, 98480, 98479, 98478, 98477, 98476, 98475, 98474, 98473, 98472, 98471, 98470, 98469, 98468, 98467, 98466, 98465, 98464, 98463, 98462, 98461, 98460, 98459, 98458, 98457, 98456, 98455, 98454, 98453, 98452, 98451, 98450, 98449, 98448, 98447, 98446, 98445, 98444, 98443, 98442, 98441, 98440, 98439, 98438, 98437, 98436, 98435, 98434, 98433, 98432, 98431, 98430, 98429, 98428, 98427, 98426, 98425, 98424, 98423, 98422, 98421, 98420, 98419, 98418, 98417, 98416, 98415, 98414, 98413, 98412, 98411, 98410, 98409, 98408, 98407, 98406, 98405, 98404, 98403, 98402, 98401, 98400, 98399, 98398, 98397, 98396, 98395, 98394, 98393, 98392, 98391, 98390, 98389, 98388, 98387, 98386, 98385, 98384, 98383, 98382, 98381, 98380, 98379, 98378, 98377, 98376, 98375, 98374, 98373, 98372, 98371, 98370, 98369, 98368, 98367, 98366, 98365, 98364, 98363, 98362, 98361, 98360, 98359, 98358, 98357, 98356, 98355, 98354, 98353, 98352, 98351, 98350, 98349, 98348, 98347, 98346, 98345, 98344, 98343, 98342, 98341, 98340, 98339, 98338, 98337, 98336, 98335, 98334, 98333, 98332, 98331, 98330, 98329, 98328, 98327, 98326, 98325, 98324, 98323, 98322, 98321, 98320, 98319, 98318, 98317, 98316, 98315, 98314, 98313, 98312, 98311, 98310, 98309, 98308, 98307, 98306, 98305, 98304, 98303, 98302, 98301, 98300, 98299, 98298, 98297, 98296, 98295, 98294, 98293, 98292, 98291, 98290, 98289, 98288, 98287, 98286, 98285, 98284, 98283, 98282, 98281, 98280, 98279, 98278, 98277, 98276, 98275, 98274, 98273, 98272, 98271, 98270, 98269, 98268, 98267, 98266, 98265, 98264, 98263, 98262, 98261, 98260, 98259, 98258, 98257, 98256, 98255, 98254, 98253, 98252, 98251, 98250, 98249, 98248, 98247, 98246, 98245, 98244, 98243, 98242, 98241, 98240, 98239, 98238, 98237, 98236, 98235, 98234, 98233, 98232, 98231, 98230, 98229, 98228, 98227, 98226, 98225, 98224, 98223, 98222, 98221, 98220, 98219, 98218, 98217, 98216, 98215, 98214, 98213, 98212, 98211, 98210, 98209, 98208, 98207, 98206, 98205, 98204, 98203, 98202, 98201, 98200, 98199, 98198, 98197, 98196, 98195, 98194, 98193, 98192, 98191, 98190, 98189, 98188, 98187, 98186, 98185, 98184, 98183, 98182, 98181, 98180, 98179, 98178, 98177, 98176, 98175, 98174, 98173, 98172, 98171, 98170, 98169, 98168, 98167, 98166, 98165, 98164, 98163, 98162, 98161, 98160, 98159, 98158, 98157, 98156, 98155, 98154, 98153, 98152, 98151, 98150, 98149, 98148, 98147, 98146, 98145, 98144, 98143, 98142, 98141, 98140, 98139, 98138, 98137, 98136, 98135, 98134, 98133, 98132, 98131, 98130, 98129, 98128, 98127, 98126, 98125, 98124, 98123, 98122, 98121, 98120, 98119, 98118, 98117, 98116, 98115, 98114, 98113, 98112, 98111, 98110, 98109, 98108, 98107, 98106, 98105, 98104, 98103, 98102, 98101, 98100, 98099, 98098, 98097, 98096, 98095, 98094, 98093, 98092, 98091, 98090, 98089, 98088, 98087, 98086, 98085, 98084, 98083, 98082, 98081, 98080, 98079, 98078, 98077, 98076, 98075, 98074, 98073, 98072, 98071, 98070, 98069, 98068, 98067, 98066, 98065, 98064, 98063, 98062, 98061, 98060, 98059, 98058, 98057, 98056, 98055, 98054, 98053, 98052, 98051, 98050, 98049, 98048, 98047, 98046, 98045, 98044, 98043, 98042, 98041, 98040, 98039, 98038, 98037, 98036, 98035, 98034, 98033, 98032, 98031, 98030, 98029, 98028, 98027, 98026, 98025, 98024, 98023, 98022, 98021, 98020, 98019, 98018, 98017, 98016, 98015, 98014, 98013, 98012, 98011, 98010, 98009, 98008, 98007, 98006, 98005, 98004, 98003, 98002, 98001, 98000, 97999, 97998, 97997, 97996, 97995, 97994, 97993, 97992, 97991, 97990, 97989, 97988, 97987, 97986, 97985, 97984, 97983, 97982, 97981, 97980, 97979, 97978, 97977, 97976, 97975, 97974, 97973, 97972, 97971, 97970, 97969, 97968, 97967, 97966, 97965, 97964, 97963, 97962, 97961, 97960, 97959, 97958, 97957, 97956, 97955, 97954, 97953, 97952, 97951, 97950, 97949, 97948, 97947, 97946, 97945, 97944, 97943, 97942, 97941, 97940, 97939, 97938, 97937, 97936, 97935, 97934, 97933, 97932, 97931, 97930, 97929, 97928, 97927, 97926, 97925, 97924, 97923, 97922, 97921, 97920, 97919, 97918, 97917, 97916, 97915, 97914, 97913, 97912, 97911, 97910, 97909, 97908, 97907, 97906, 97905, 97904, 97903, 97902, 97901, 97900, 97899, 97898, 97897, 97896, 97895, 97894, 97893, 97892, 97891, 97890, 97889, 97888, 97887, 97886, 97885, 97884, 97883, 97882, 97881, 97880, 97879, 97878, 97877, 97876, 97875, 97874, 97873, 97872, 97871, 97870, 97869, 97868, 97867, 97866, 97865, 97864, 97863, 97862, 97861, 97860, 97859, 97858, 97857, 97856, 97855, 97854, 97853, 97852, 97851, 97850, 97849, 97848, 97847, 97846, 97845, 97844, 97843, 97842, 97841, 97840, 97839, 97838, 97837, 97836, 97835, 97834, 97833, 97832, 97831, 97830, 97829, 97828, 97827, 97826, 97825, 97824, 97823, 97822, 97821, 97820, 97819, 97818, 97817, 97816, 97815, 97814, 97813, 97812, 97811, 97810, 97809, 97808, 97807, 97806, 97805, 97804, 97803, 97802, 97801, 97800, 97799, 97798, 97797, 97796, 97795, 97794, 97793, 97792, 97791, 97790, 97789, 97788, 97787, 97786, 97785, 97784, 97783, 97782, 97781, 97780, 97779, 97778, 97777, 97776, 97775, 97774, 97773, 97772, 97771, 97770, 97769, 97768, 97767, 97766, 97765, 97764, 97763, 97762, 97761, 97760, 97759, 97758, 97757, 97756, 97755, 97754, 97753, 97752, 97751, 97750, 97749, 97748, 97747, 97746, 97745, 97744, 97743, 97742, 97741, 97740, 97739, 97738, 97737, 97736, 97735, 97734, 97733, 97732, 97731, 97730, 97729, 97728, 97727, 97726, 97725, 97724, 97723, 97722, 97721, 97720, 97719, 97718, 97717, 97716, 97715, 97714, 97713, 97712, 97711, 97710, 97709, 97708, 97707, 97706, 97705, 97704, 97703, 97702, 97701, 97700, 97699, 97698, 97697, 97696, 97695, 97694, 97693, 97692, 97691, 97690, 97689, 97688, 97687, 97686, 97685, 97684, 97683, 97682, 97681, 97680, 97679, 97678, 97677, 97676, 97675, 97674, 97673, 97672, 97671, 97670, 97669, 97668, 97667, 97666, 97665, 97664, 97663, 97662, 97661, 97660, 97659, 97658, 97657, 97656, 97655, 97654, 97653, 97652, 97651, 97650, 97649, 97648, 97647, 97646, 97645, 97644, 97643, 97642, 97641, 97640, 97639, 97638, 97637, 97636, 97635, 97634, 97633, 97632, 97631, 97630, 97629, 97628, 97627, 97626, 97625, 97624, 97623, 97622, 97621, 97620, 97619, 97618, 97617, 97616, 97615, 97614, 97613, 97612, 97611, 97610, 97609, 97608, 97607, 97606, 97605, 97604, 97603, 97602, 97601, 97600, 97599, 97598, 97597, 97596, 97595, 97594, 97593, 97592, 97591, 97590, 97589, 97588, 97587, 97586, 97585, 97584, 97583, 97582, 97581, 97580, 97579, 97578, 97577, 97576, 97575, 97574, 97573, 97572, 97571, 97570, 97569, 97568, 97567, 97566, 97565, 97564, 97563, 97562, 97561, 97560, 97559, 97558, 97557, 97556, 97555, 97554, 97553, 97552, 97551, 97550, 97549, 97548, 97547, 97546, 97545, 97544, 97543, 97542, 97541, 97540, 97539, 97538, 97537, 97536, 97535, 97534, 97533, 97532, 97531, 97530, 97529, 97528, 97527, 97526, 97525, 97524, 97523, 97522, 97521, 97520, 97519, 97518, 97517, 97516, 97515, 97514, 97513, 97512, 97511, 97510, 97509, 97508, 97507, 97506, 97505, 97504, 97503, 97502, 97501, 97500, 97499, 97498, 97497, 97496, 97495, 97494, 97493, 97492, 97491, 97490, 97489, 97488, 97487, 97486, 97485, 97484, 97483, 97482, 97481, 97480, 97479, 97478, 97477, 97476, 97475, 97474, 97473, 97472, 97471, 97470, 97469, 97468, 97467, 97466, 97465, 97464, 97463, 97462, 97461, 97460, 97459, 97458, 97457, 97456, 97455, 97454, 97453, 97452, 97451, 97450, 97449, 97448, 97447, 97446, 97445, 97444, 97443, 97442, 97441, 97440, 97439, 97438, 97437, 97436, 97435, 97434, 97433, 97432, 97431, 97430, 97429, 97428, 97427, 97426, 97425, 97424, 97423, 97422, 97421, 97420, 97419, 97418, 97417, 97416, 97415, 97414, 97413, 97412, 97411, 97410, 97409, 97408, 97407, 97406, 97405, 97404, 97403, 97402, 97401, 97400, 97399, 97398, 97397, 97396, 97395, 97394, 97393, 97392, 97391, 97390, 97389, 97388, 97387, 97386, 97385, 97384, 97383, 97382, 97381, 97380, 97379, 97378, 97377, 97376, 97375, 97374, 97373, 97372, 97371, 97370, 97369, 97368, 97367, 97366, 97365, 97364, 97363, 97362, 97361, 97360, 97359, 97358, 97357, 97356, 97355, 97354, 97353, 97352, 97351, 97350, 97349, 97348, 97347, 97346, 97345, 97344, 97343, 97342, 97341, 97340, 97339, 97338, 97337, 97336, 97335, 97334, 97333, 97332, 97331, 97330, 97329, 97328, 97327, 97326, 97325, 97324, 97323, 97322, 97321, 97320, 97319, 97318, 97317, 97316, 97315, 97314, 97313, 97312, 97311, 97310, 97309, 97308, 97307, 97306, 97305, 97304, 97303, 97302, 97301, 97300, 97299, 97298, 97297, 97296, 97295, 97294, 97293, 97292, 97291, 97290, 97289, 97288, 97287, 97286, 97285, 97284, 97283, 97282, 97281, 97280, 97279, 97278, 97277, 97276, 97275, 97274, 97273, 97272, 97271, 97270, 97269, 97268, 97267, 97266, 97265, 97264, 97263, 97262, 97261, 97260, 97259, 97258, 97257, 97256, 97255, 97254, 97253, 97252, 97251, 97250, 97249, 97248, 97247, 97246, 97245, 97244, 97243, 97242, 97241, 97240, 97239, 97238, 97237, 97236, 97235, 97234, 97233, 97232, 97231, 97230, 97229, 97228, 97227, 97226, 97225, 97224, 97223, 97222, 97221, 97220, 97219, 97218, 97217, 97216, 97215, 97214, 97213, 97212, 97211, 97210, 97209, 97208, 97207, 97206, 97205, 97204, 97203, 97202, 97201, 97200, 97199, 97198, 97197, 97196, 97195, 97194, 97193, 97192, 97191, 97190, 97189, 97188, 97187, 97186, 97185, 97184, 97183, 97182, 97181, 97180, 97179, 97178, 97177, 97176, 97175, 97174, 97173, 97172, 97171, 97170, 97169, 97168, 97167, 97166, 97165, 97164, 97163, 97162, 97161, 97160, 97159, 97158, 97157, 97156, 97155, 97154, 97153, 97152, 97151, 97150, 97149, 97148, 97147, 97146, 97145, 97144, 97143, 97142, 97141, 97140, 97139, 97138, 97137, 97136, 97135, 97134, 97133, 97132, 97131, 97130, 97129, 97128, 97127, 97126, 97125, 97124, 97123, 97122, 97121, 97120, 97119, 97118, 97117, 97116, 97115, 97114, 97113, 97112, 97111, 97110, 97109, 97108, 97107, 97106, 97105, 97104, 97103, 97102, 97101, 97100, 97099, 97098, 97097, 97096, 97095, 97094, 97093, 97092, 97091, 97090, 97089, 97088, 97087, 97086, 97085, 97084, 97083, 97082, 97081, 97080, 97079, 97078, 97077, 97076, 97075, 97074, 97073, 97072, 97071, 97070, 97069, 97068, 97067, 97066, 97065, 97064, 97063, 97062, 97061, 97060, 97059, 97058, 97057, 97056, 97055, 97054, 97053, 97052, 97051, 97050, 97049, 97048, 97047, 97046, 97045, 97044, 97043, 97042, 97041, 97040, 97039, 97038, 97037, 97036, 97035, 97034, 97033, 97032, 97031, 97030, 97029, 97028, 97027, 97026, 97025, 97024, 97023, 97022, 97021, 97020, 97019, 97018, 97017, 97016, 97015, 97014, 97013, 97012, 97011, 97010, 97009, 97008, 97007, 97006, 97005, 97004, 97003, 97002, 97001, 97000, 96999, 96998, 96997, 96996, 96995, 96994, 96993, 96992, 96991, 96990, 96989, 96988, 96987, 96986, 96985, 96984, 96983, 96982, 96981, 96980, 96979, 96978, 96977, 96976, 96975, 96974, 96973, 96972, 96971, 96970, 96969, 96968, 96967, 96966, 96965, 96964, 96963, 96962, 96961, 96960, 96959, 96958, 96957, 96956, 96955, 96954, 96953, 96952, 96951, 96950, 96949, 96948, 96947, 96946, 96945, 96944, 96943, 96942, 96941, 96940, 96939, 96938, 96937, 96936, 96935, 96934, 96933, 96932, 96931, 96930, 96929, 96928, 96927, 96926, 96925, 96924, 96923, 96922, 96921, 96920, 96919, 96918, 96917, 96916, 96915, 96914, 96913, 96912, 96911, 96910, 96909, 96908, 96907, 96906, 96905, 96904, 96903, 96902, 96901, 96900, 96899, 96898, 96897, 96896, 96895, 96894, 96893, 96892, 96891, 96890, 96889, 96888, 96887, 96886, 96885, 96884, 96883, 96882, 96881, 96880, 96879, 96878, 96877, 96876, 96875, 96874, 96873, 96872, 96871, 96870, 96869, 96868, 96867, 96866, 96865, 96864, 96863, 96862, 96861, 96860, 96859, 96858, 96857, 96856, 96855, 96854, 96853, 96852, 96851, 96850, 96849, 96848, 96847, 96846, 96845, 96844, 96843, 96842, 96841, 96840, 96839, 96838, 96837, 96836, 96835, 96834, 96833, 96832, 96831, 96830, 96829, 96828, 96827, 96826, 96825, 96824, 96823, 96822, 96821, 96820, 96819, 96818, 96817, 96816, 96815, 96814, 96813, 96812, 96811, 96810, 96809, 96808, 96807, 96806, 96805, 96804, 96803, 96802, 96801, 96800, 96799, 96798, 96797, 96796, 96795, 96794, 96793, 96792, 96791, 96790, 96789, 96788, 96787, 96786, 96785, 96784, 96783, 96782, 96781, 96780, 96779, 96778, 96777, 96776, 96775, 96774, 96773, 96772, 96771, 96770, 96769, 96768, 96767, 96766, 96765, 96764, 96763, 96762, 96761, 96760, 96759, 96758, 96757, 96756, 96755, 96754, 96753, 96752, 96751, 96750, 96749, 96748, 96747, 96746, 96745, 96744, 96743, 96742, 96741, 96740, 96739, 96738, 96737, 96736, 96735, 96734, 96733, 96732, 96731, 96730, 96729, 96728, 96727, 96726, 96725, 96724, 96723, 96722, 96721, 96720, 96719, 96718, 96717, 96716, 96715, 96714, 96713, 96712, 96711, 96710, 96709, 96708, 96707, 96706, 96705, 96704, 96703, 96702, 96701, 96700, 96699, 96698, 96697, 96696, 96695, 96694, 96693, 96692, 96691, 96690, 96689, 96688, 96687, 96686, 96685, 96684, 96683, 96682, 96681, 96680, 96679, 96678, 96677, 96676, 96675, 96674, 96673, 96672, 96671, 96670, 96669, 96668, 96667, 96666, 96665, 96664, 96663, 96662, 96661, 96660, 96659, 96658, 96657, 96656, 96655, 96654, 96653, 96652, 96651, 96650, 96649, 96648, 96647, 96646, 96645, 96644, 96643, 96642, 96641, 96640, 96639, 96638, 96637, 96636, 96635, 96634, 96633, 96632, 96631, 96630, 96629, 96628, 96627, 96626, 96625, 96624, 96623, 96622, 96621, 96620, 96619, 96618, 96617, 96616, 96615, 96614, 96613, 96612, 96611, 96610, 96609, 96608, 96607, 96606, 96605, 96604, 96603, 96602, 96601, 96600, 96599, 96598, 96597, 96596, 96595, 96594, 96593, 96592, 96591, 96590, 96589, 96588, 96587, 96586, 96585, 96584, 96583, 96582, 96581, 96580, 96579, 96578, 96577, 96576, 96575, 96574, 96573, 96572, 96571, 96570, 96569, 96568, 96567, 96566, 96565, 96564, 96563, 96562, 96561, 96560, 96559, 96558, 96557, 96556, 96555, 96554, 96553, 96552, 96551, 96550, 96549, 96548, 96547, 96546, 96545, 96544, 96543, 96542, 96541, 96540, 96539, 96538, 96537, 96536, 96535, 96534, 96533, 96532, 96531, 96530, 96529, 96528, 96527, 96526, 96525, 96524, 96523, 96522, 96521, 96520, 96519, 96518, 96517, 96516, 96515, 96514, 96513, 96512, 96511, 96510, 96509, 96508, 96507, 96506, 96505, 96504, 96503, 96502, 96501, 96500, 96499, 96498, 96497, 96496, 96495, 96494, 96493, 96492, 96491, 96490, 96489, 96488, 96487, 96486, 96485, 96484, 96483, 96482, 96481, 96480, 96479, 96478, 96477, 96476, 96475, 96474, 96473, 96472, 96471, 96470, 96469, 96468, 96467, 96466, 96465, 96464, 96463, 96462, 96461, 96460, 96459, 96458, 96457, 96456, 96455, 96454, 96453, 96452, 96451, 96450, 96449, 96448, 96447, 96446, 96445, 96444, 96443, 96442, 96441, 96440, 96439, 96438, 96437, 96436, 96435, 96434, 96433, 96432, 96431, 96430, 96429, 96428, 96427, 96426, 96425, 96424, 96423, 96422, 96421, 96420, 96419, 96418, 96417, 96416, 96415, 96414, 96413, 96412, 96411, 96410, 96409, 96408, 96407, 96406, 96405, 96404, 96403, 96402, 96401, 96400, 96399, 96398, 96397, 96396, 96395, 96394, 96393, 96392, 96391, 96390, 96389, 96388, 96387, 96386, 96385, 96384, 96383, 96382, 96381, 96380, 96379, 96378, 96377, 96376, 96375, 96374, 96373, 96372, 96371, 96370, 96369, 96368, 96367, 96366, 96365, 96364, 96363, 96362, 96361, 96360, 96359, 96358, 96357, 96356, 96355, 96354, 96353, 96352, 96351, 96350, 96349, 96348, 96347, 96346, 96345, 96344, 96343, 96342, 96341, 96340, 96339, 96338, 96337, 96336, 96335, 96334, 96333, 96332, 96331, 96330, 96329, 96328, 96327, 96326, 96325, 96324, 96323, 96322, 96321, 96320, 96319, 96318, 96317, 96316, 96315, 96314, 96313, 96312, 96311, 96310, 96309, 96308, 96307, 96306, 96305, 96304, 96303, 96302, 96301, 96300, 96299, 96298, 96297, 96296, 96295, 96294, 96293, 96292, 96291, 96290, 96289, 96288, 96287, 96286, 96285, 96284, 96283, 96282, 96281, 96280, 96279, 96278, 96277, 96276, 96275, 96274, 96273, 96272, 96271, 96270, 96269, 96268, 96267, 96266, 96265, 96264, 96263, 96262, 96261, 96260, 96259, 96258, 96257, 96256, 96255, 96254, 96253, 96252, 96251, 96250, 96249, 96248, 96247, 96246, 96245, 96244, 96243, 96242, 96241, 96240, 96239, 96238, 96237, 96236, 96235, 96234, 96233, 96232, 96231, 96230, 96229, 96228, 96227, 96226, 96225, 96224, 96223, 96222, 96221, 96220, 96219, 96218, 96217, 96216, 96215, 96214, 96213, 96212, 96211, 96210, 96209, 96208, 96207, 96206, 96205, 96204, 96203, 96202, 96201, 96200, 96199, 96198, 96197, 96196, 96195, 96194, 96193, 96192, 96191, 96190, 96189, 96188, 96187, 96186, 96185, 96184, 96183, 96182, 96181, 96180, 96179, 96178, 96177, 96176, 96175, 96174, 96173, 96172, 96171, 96170, 96169, 96168, 96167, 96166, 96165, 96164, 96163, 96162, 96161, 96160, 96159, 96158, 96157, 96156, 96155, 96154, 96153, 96152, 96151, 96150, 96149, 96148, 96147, 96146, 96145, 96144, 96143, 96142, 96141, 96140, 96139, 96138, 96137, 96136, 96135, 96134, 96133, 96132, 96131, 96130, 96129, 96128, 96127, 96126, 96125, 96124, 96123, 96122, 96121, 96120, 96119, 96118, 96117, 96116, 96115, 96114, 96113, 96112, 96111, 96110, 96109, 96108, 96107, 96106, 96105, 96104, 96103, 96102, 96101, 96100, 96099, 96098, 96097, 96096, 96095, 96094, 96093, 96092, 96091, 96090, 96089, 96088, 96087, 96086, 96085, 96084, 96083, 96082, 96081, 96080, 96079, 96078, 96077, 96076, 96075, 96074, 96073, 96072, 96071, 96070, 96069, 96068, 96067, 96066, 96065, 96064, 96063, 96062, 96061, 96060, 96059, 96058, 96057, 96056, 96055, 96054, 96053, 96052, 96051, 96050, 96049, 96048, 96047, 96046, 96045, 96044, 96043, 96042, 96041, 96040, 96039, 96038, 96037, 96036, 96035, 96034, 96033, 96032, 96031, 96030, 96029, 96028, 96027, 96026, 96025, 96024, 96023, 96022, 96021, 96020, 96019, 96018, 96017, 96016, 96015, 96014, 96013, 96012, 96011, 96010, 96009, 96008, 96007, 96006, 96005, 96004, 96003, 96002, 96001, 96000, 95999, 95998, 95997, 95996, 95995, 95994, 95993, 95992, 95991, 95990, 95989, 95988, 95987, 95986, 95985, 95984, 95983, 95982, 95981, 95980, 95979, 95978, 95977, 95976, 95975, 95974, 95973, 95972, 95971, 95970, 95969, 95968, 95967, 95966, 95965, 95964, 95963, 95962, 95961, 95960, 95959, 95958, 95957, 95956, 95955, 95954, 95953, 95952, 95951, 95950, 95949, 95948, 95947, 95946, 95945, 95944, 95943, 95942, 95941, 95940, 95939, 95938, 95937, 95936, 95935, 95934, 95933, 95932, 95931, 95930, 95929, 95928, 95927, 95926, 95925, 95924, 95923, 95922, 95921, 95920, 95919, 95918, 95917, 95916, 95915, 95914, 95913, 95912, 95911, 95910, 95909, 95908, 95907, 95906, 95905, 95904, 95903, 95902, 95901, 95900, 95899, 95898, 95897, 95896, 95895, 95894, 95893, 95892, 95891, 95890, 95889, 95888, 95887, 95886, 95885, 95884, 95883, 95882, 95881, 95880, 95879, 95878, 95877, 95876, 95875, 95874, 95873, 95872, 95871, 95870, 95869, 95868, 95867, 95866, 95865, 95864, 95863, 95862, 95861, 95860, 95859, 95858, 95857, 95856, 95855, 95854, 95853, 95852, 95851, 95850, 95849, 95848, 95847, 95846, 95845, 95844, 95843, 95842, 95841, 95840, 95839, 95838, 95837, 95836, 95835, 95834, 95833, 95832, 95831, 95830, 95829, 95828, 95827, 95826, 95825, 95824, 95823, 95822, 95821, 95820, 95819, 95818, 95817, 95816, 95815, 95814, 95813, 95812, 95811, 95810, 95809, 95808, 95807, 95806, 95805, 95804, 95803, 95802, 95801, 95800, 95799, 95798, 95797, 95796, 95795, 95794, 95793, 95792, 95791, 95790, 95789, 95788, 95787, 95786, 95785, 95784, 95783, 95782, 95781, 95780, 95779, 95778, 95777, 95776, 95775, 95774, 95773, 95772, 95771, 95770, 95769, 95768, 95767, 95766, 95765, 95764, 95763, 95762, 95761, 95760, 95759, 95758, 95757, 95756, 95755, 95754, 95753, 95752, 95751, 95750, 95749, 95748, 95747, 95746, 95745, 95744, 95743, 95742, 95741, 95740, 95739, 95738, 95737, 95736, 95735, 95734, 95733, 95732, 95731, 95730, 95729, 95728, 95727, 95726, 95725, 95724, 95723, 95722, 95721, 95720, 95719, 95718, 95717, 95716, 95715, 95714, 95713, 95712, 95711, 95710, 95709, 95708, 95707, 95706, 95705, 95704, 95703, 95702, 95701, 95700, 95699, 95698, 95697, 95696, 95695, 95694, 95693, 95692, 95691, 95690, 95689, 95688, 95687, 95686, 95685, 95684, 95683, 95682, 95681, 95680, 95679, 95678, 95677, 95676, 95675, 95674, 95673, 95672, 95671, 95670, 95669, 95668, 95667, 95666, 95665, 95664, 95663, 95662, 95661, 95660, 95659, 95658, 95657, 95656, 95655, 95654, 95653, 95652, 95651, 95650, 95649, 95648, 95647, 95646, 95645, 95644, 95643, 95642, 95641, 95640, 95639, 95638, 95637, 95636, 95635, 95634, 95633, 95632, 95631, 95630, 95629, 95628, 95627, 95626, 95625, 95624, 95623, 95622, 95621, 95620, 95619, 95618, 95617, 95616, 95615, 95614, 95613, 95612, 95611, 95610, 95609, 95608, 95607, 95606, 95605, 95604, 95603, 95602, 95601, 95600, 95599, 95598, 95597, 95596, 95595, 95594, 95593, 95592, 95591, 95590, 95589, 95588, 95587, 95586, 95585, 95584, 95583, 95582, 95581, 95580, 95579, 95578, 95577, 95576, 95575, 95574, 95573, 95572, 95571, 95570, 95569, 95568, 95567, 95566, 95565, 95564, 95563, 95562, 95561, 95560, 95559, 95558, 95557, 95556, 95555, 95554, 95553, 95552, 95551, 95550, 95549, 95548, 95547, 95546, 95545, 95544, 95543, 95542, 95541, 95540, 95539, 95538, 95537, 95536, 95535, 95534, 95533, 95532, 95531, 95530, 95529, 95528, 95527, 95526, 95525, 95524, 95523, 95522, 95521, 95520, 95519, 95518, 95517, 95516, 95515, 95514, 95513, 95512, 95511, 95510, 95509, 95508, 95507, 95506, 95505, 95504, 95503, 95502, 95501, 95500, 95499, 95498, 95497, 95496, 95495, 95494, 95493, 95492, 95491, 95490, 95489, 95488, 95487, 95486, 95485, 95484, 95483, 95482, 95481, 95480, 95479, 95478, 95477, 95476, 95475, 95474, 95473, 95472, 95471, 95470, 95469, 95468, 95467, 95466, 95465, 95464, 95463, 95462, 95461, 95460, 95459, 95458, 95457, 95456, 95455, 95454, 95453, 95452, 95451, 95450, 95449, 95448, 95447, 95446, 95445, 95444, 95443, 95442, 95441, 95440, 95439, 95438, 95437, 95436, 95435, 95434, 95433, 95432, 95431, 95430, 95429, 95428, 95427, 95426, 95425, 95424, 95423, 95422, 95421, 95420, 95419, 95418, 95417, 95416, 95415, 95414, 95413, 95412, 95411, 95410, 95409, 95408, 95407, 95406, 95405, 95404, 95403, 95402, 95401, 95400, 95399, 95398, 95397, 95396, 95395, 95394, 95393, 95392, 95391, 95390, 95389, 95388, 95387, 95386, 95385, 95384, 95383, 95382, 95381, 95380, 95379, 95378, 95377, 95376, 95375, 95374, 95373, 95372, 95371, 95370, 95369, 95368, 95367, 95366, 95365, 95364, 95363, 95362, 95361, 95360, 95359, 95358, 95357, 95356, 95355, 95354, 95353, 95352, 95351, 95350, 95349, 95348, 95347, 95346, 95345, 95344, 95343, 95342, 95341, 95340, 95339, 95338, 95337, 95336, 95335, 95334, 95333, 95332, 95331, 95330, 95329, 95328, 95327, 95326, 95325, 95324, 95323, 95322, 95321, 95320, 95319, 95318, 95317, 95316, 95315, 95314, 95313, 95312, 95311, 95310, 95309, 95308, 95307, 95306, 95305, 95304, 95303, 95302, 95301, 95300, 95299, 95298, 95297, 95296, 95295, 95294, 95293, 95292, 95291, 95290, 95289, 95288, 95287, 95286, 95285, 95284, 95283, 95282, 95281, 95280, 95279, 95278, 95277, 95276, 95275, 95274, 95273, 95272, 95271, 95270, 95269, 95268, 95267, 95266, 95265, 95264, 95263, 95262, 95261, 95260, 95259, 95258, 95257, 95256, 95255, 95254, 95253, 95252, 95251, 95250, 95249, 95248, 95247, 95246, 95245, 95244, 95243, 95242, 95241, 95240, 95239, 95238, 95237, 95236, 95235, 95234, 95233, 95232, 95231, 95230, 95229, 95228, 95227, 95226, 95225, 95224, 95223, 95222, 95221, 95220, 95219, 95218, 95217, 95216, 95215, 95214, 95213, 95212, 95211, 95210, 95209, 95208, 95207, 95206, 95205, 95204, 95203, 95202, 95201, 95200, 95199, 95198, 95197, 95196, 95195, 95194, 95193, 95192, 95191, 95190, 95189, 95188, 95187, 95186, 95185, 95184, 95183, 95182, 95181, 95180, 95179, 95178, 95177, 95176, 95175, 95174, 95173, 95172, 95171, 95170, 95169, 95168, 95167, 95166, 95165, 95164, 95163, 95162, 95161, 95160, 95159, 95158, 95157, 95156, 95155, 95154, 95153, 95152, 95151, 95150, 95149, 95148, 95147, 95146, 95145, 95144, 95143, 95142, 95141, 95140, 95139, 95138, 95137, 95136, 95135, 95134, 95133, 95132, 95131, 95130, 95129, 95128, 95127, 95126, 95125, 95124, 95123, 95122, 95121, 95120, 95119, 95118, 95117, 95116, 95115, 95114, 95113, 95112, 95111, 95110, 95109, 95108, 95107, 95106, 95105, 95104, 95103, 95102, 95101, 95100, 95099, 95098, 95097, 95096, 95095, 95094, 95093, 95092, 95091, 95090, 95089, 95088, 95087, 95086, 95085, 95084, 95083, 95082, 95081, 95080, 95079, 95078, 95077, 95076, 95075, 95074, 95073, 95072, 95071, 95070, 95069, 95068, 95067, 95066, 95065, 95064, 95063, 95062, 95061, 95060, 95059, 95058, 95057, 95056, 95055, 95054, 95053, 95052, 95051, 95050, 95049, 95048, 95047, 95046, 95045, 95044, 95043, 95042, 95041, 95040, 95039, 95038, 95037, 95036, 95035, 95034, 95033, 95032, 95031, 95030, 95029, 95028, 95027, 95026, 95025, 95024, 95023, 95022, 95021, 95020, 95019, 95018, 95017, 95016, 95015, 95014, 95013, 95012, 95011, 95010, 95009, 95008, 95007, 95006, 95005, 95004, 95003, 95002, 95001, 95000, 94999, 94998, 94997, 94996, 94995, 94994, 94993, 94992, 94991, 94990, 94989, 94988, 94987, 94986, 94985, 94984, 94983, 94982, 94981, 94980, 94979, 94978, 94977, 94976, 94975, 94974, 94973, 94972, 94971, 94970, 94969, 94968, 94967, 94966, 94965, 94964, 94963, 94962, 94961, 94960, 94959, 94958, 94957, 94956, 94955, 94954, 94953, 94952, 94951, 94950, 94949, 94948, 94947, 94946, 94945, 94944, 94943, 94942, 94941, 94940, 94939, 94938, 94937, 94936, 94935, 94934, 94933, 94932, 94931, 94930, 94929, 94928, 94927, 94926, 94925, 94924, 94923, 94922, 94921, 94920, 94919, 94918, 94917, 94916, 94915, 94914, 94913, 94912, 94911, 94910, 94909, 94908, 94907, 94906, 94905, 94904, 94903, 94902, 94901, 94900, 94899, 94898, 94897, 94896, 94895, 94894, 94893, 94892, 94891, 94890, 94889, 94888, 94887, 94886, 94885, 94884, 94883, 94882, 94881, 94880, 94879, 94878, 94877, 94876, 94875, 94874, 94873, 94872, 94871, 94870, 94869, 94868, 94867, 94866, 94865, 94864, 94863, 94862, 94861, 94860, 94859, 94858, 94857, 94856, 94855, 94854, 94853, 94852, 94851, 94850, 94849, 94848, 94847, 94846, 94845, 94844, 94843, 94842, 94841, 94840, 94839, 94838, 94837, 94836, 94835, 94834, 94833, 94832, 94831, 94830, 94829, 94828, 94827, 94826, 94825, 94824, 94823, 94822, 94821, 94820, 94819, 94818, 94817, 94816, 94815, 94814, 94813, 94812, 94811, 94810, 94809, 94808, 94807, 94806, 94805, 94804, 94803, 94802, 94801, 94800, 94799, 94798, 94797, 94796, 94795, 94794, 94793, 94792, 94791, 94790, 94789, 94788, 94787, 94786, 94785, 94784, 94783, 94782, 94781, 94780, 94779, 94778, 94777, 94776, 94775, 94774, 94773, 94772, 94771, 94770, 94769, 94768, 94767, 94766, 94765, 94764, 94763, 94762, 94761, 94760, 94759, 94758, 94757, 94756, 94755, 94754, 94753, 94752, 94751, 94750, 94749, 94748, 94747, 94746, 94745, 94744, 94743, 94742, 94741, 94740, 94739, 94738, 94737, 94736, 94735, 94734, 94733, 94732, 94731, 94730, 94729, 94728, 94727, 94726, 94725, 94724, 94723, 94722, 94721, 94720, 94719, 94718, 94717, 94716, 94715, 94714, 94713, 94712, 94711, 94710, 94709, 94708, 94707, 94706, 94705, 94704, 94703, 94702, 94701, 94700, 94699, 94698, 94697, 94696, 94695, 94694, 94693, 94692, 94691, 94690, 94689, 94688, 94687, 94686, 94685, 94684, 94683, 94682, 94681, 94680, 94679, 94678, 94677, 94676, 94675, 94674, 94673, 94672, 94671, 94670, 94669, 94668, 94667, 94666, 94665, 94664, 94663, 94662, 94661, 94660, 94659, 94658, 94657, 94656, 94655, 94654, 94653, 94652, 94651, 94650, 94649, 94648, 94647, 94646, 94645, 94644, 94643, 94642, 94641, 94640, 94639, 94638, 94637, 94636, 94635, 94634, 94633, 94632, 94631, 94630, 94629, 94628, 94627, 94626, 94625, 94624, 94623, 94622, 94621, 94620, 94619, 94618, 94617, 94616, 94615, 94614, 94613, 94612, 94611, 94610, 94609, 94608, 94607, 94606, 94605, 94604, 94603, 94602, 94601, 94600, 94599, 94598, 94597, 94596, 94595, 94594, 94593, 94592, 94591, 94590, 94589, 94588, 94587, 94586, 94585, 94584, 94583, 94582, 94581, 94580, 94579, 94578, 94577, 94576, 94575, 94574, 94573, 94572, 94571, 94570, 94569, 94568, 94567, 94566, 94565, 94564, 94563, 94562, 94561, 94560, 94559, 94558, 94557, 94556, 94555, 94554, 94553, 94552, 94551, 94550, 94549, 94548, 94547, 94546, 94545, 94544, 94543, 94542, 94541, 94540, 94539, 94538, 94537, 94536, 94535, 94534, 94533, 94532, 94531, 94530, 94529, 94528, 94527, 94526, 94525, 94524, 94523, 94522, 94521, 94520, 94519, 94518, 94517, 94516, 94515, 94514, 94513, 94512, 94511, 94510, 94509, 94508, 94507, 94506, 94505, 94504, 94503, 94502, 94501, 94500, 94499, 94498, 94497, 94496, 94495, 94494, 94493, 94492, 94491, 94490, 94489, 94488, 94487, 94486, 94485, 94484, 94483, 94482, 94481, 94480, 94479, 94478, 94477, 94476, 94475, 94474, 94473, 94472, 94471, 94470, 94469, 94468, 94467, 94466, 94465, 94464, 94463, 94462, 94461, 94460, 94459, 94458, 94457, 94456, 94455, 94454, 94453, 94452, 94451, 94450, 94449, 94448, 94447, 94446, 94445, 94444, 94443, 94442, 94441, 94440, 94439, 94438, 94437, 94436, 94435, 94434, 94433, 94432, 94431, 94430, 94429, 94428, 94427, 94426, 94425, 94424, 94423, 94422, 94421, 94420, 94419, 94418, 94417, 94416, 94415, 94414, 94413, 94412, 94411, 94410, 94409, 94408, 94407, 94406, 94405, 94404, 94403, 94402, 94401, 94400, 94399, 94398, 94397, 94396, 94395, 94394, 94393, 94392, 94391, 94390, 94389, 94388, 94387, 94386, 94385, 94384, 94383, 94382, 94381, 94380, 94379, 94378, 94377, 94376, 94375, 94374, 94373, 94372, 94371, 94370, 94369, 94368, 94367, 94366, 94365, 94364, 94363, 94362, 94361, 94360, 94359, 94358, 94357, 94356, 94355, 94354, 94353, 94352, 94351, 94350, 94349, 94348, 94347, 94346, 94345, 94344, 94343, 94342, 94341, 94340, 94339, 94338, 94337, 94336, 94335, 94334, 94333, 94332, 94331, 94330, 94329, 94328, 94327, 94326, 94325, 94324, 94323, 94322, 94321, 94320, 94319, 94318, 94317, 94316, 94315, 94314, 94313, 94312, 94311, 94310, 94309, 94308, 94307, 94306, 94305, 94304, 94303, 94302, 94301, 94300, 94299, 94298, 94297, 94296, 94295, 94294, 94293, 94292, 94291, 94290, 94289, 94288, 94287, 94286, 94285, 94284, 94283, 94282, 94281, 94280, 94279, 94278, 94277, 94276, 94275, 94274, 94273, 94272, 94271, 94270, 94269, 94268, 94267, 94266, 94265, 94264, 94263, 94262, 94261, 94260, 94259, 94258, 94257, 94256, 94255, 94254, 94253, 94252, 94251, 94250, 94249, 94248, 94247, 94246, 94245, 94244, 94243, 94242, 94241, 94240, 94239, 94238, 94237, 94236, 94235, 94234, 94233, 94232, 94231, 94230, 94229, 94228, 94227, 94226, 94225, 94224, 94223, 94222, 94221, 94220, 94219, 94218, 94217, 94216, 94215, 94214, 94213, 94212, 94211, 94210, 94209, 94208, 94207, 94206, 94205, 94204, 94203, 94202, 94201, 94200, 94199, 94198, 94197, 94196, 94195, 94194, 94193, 94192, 94191, 94190, 94189, 94188, 94187, 94186, 94185, 94184, 94183, 94182, 94181, 94180, 94179, 94178, 94177, 94176, 94175, 94174, 94173, 94172, 94171, 94170, 94169, 94168, 94167, 94166, 94165, 94164, 94163, 94162, 94161, 94160, 94159, 94158, 94157, 94156, 94155, 94154, 94153, 94152, 94151, 94150, 94149, 94148, 94147, 94146, 94145, 94144, 94143, 94142, 94141, 94140, 94139, 94138, 94137, 94136, 94135, 94134, 94133, 94132, 94131, 94130, 94129, 94128, 94127, 94126, 94125, 94124, 94123, 94122, 94121, 94120, 94119, 94118, 94117, 94116, 94115, 94114, 94113, 94112, 94111, 94110, 94109, 94108, 94107, 94106, 94105, 94104, 94103, 94102, 94101, 94100, 94099, 94098, 94097, 94096, 94095, 94094, 94093, 94092, 94091, 94090, 94089, 94088, 94087, 94086, 94085, 94084, 94083, 94082, 94081, 94080, 94079, 94078, 94077, 94076, 94075, 94074, 94073, 94072, 94071, 94070, 94069, 94068, 94067, 94066, 94065, 94064, 94063, 94062, 94061, 94060, 94059, 94058, 94057, 94056, 94055, 94054, 94053, 94052, 94051, 94050, 94049, 94048, 94047, 94046, 94045, 94044, 94043, 94042, 94041, 94040, 94039, 94038, 94037, 94036, 94035, 94034, 94033, 94032, 94031, 94030, 94029, 94028, 94027, 94026, 94025, 94024, 94023, 94022, 94021, 94020, 94019, 94018, 94017, 94016, 94015, 94014, 94013, 94012, 94011, 94010, 94009, 94008, 94007, 94006, 94005, 94004, 94003, 94002, 94001, 94000, 93999, 93998, 93997, 93996, 93995, 93994, 93993, 93992, 93991, 93990, 93989, 93988, 93987, 93986, 93985, 93984, 93983, 93982, 93981, 93980, 93979, 93978, 93977, 93976, 93975, 93974, 93973, 93972, 93971, 93970, 93969, 93968, 93967, 93966, 93965, 93964, 93963, 93962, 93961, 93960, 93959, 93958, 93957, 93956, 93955, 93954, 93953, 93952, 93951, 93950, 93949, 93948, 93947, 93946, 93945, 93944, 93943, 93942, 93941, 93940, 93939, 93938, 93937, 93936, 93935, 93934, 93933, 93932, 93931, 93930, 93929, 93928, 93927, 93926, 93925, 93924, 93923, 93922, 93921, 93920, 93919, 93918, 93917, 93916, 93915, 93914, 93913, 93912, 93911, 93910, 93909, 93908, 93907, 93906, 93905, 93904, 93903, 93902, 93901, 93900, 93899, 93898, 93897, 93896, 93895, 93894, 93893, 93892, 93891, 93890, 93889, 93888, 93887, 93886, 93885, 93884, 93883, 93882, 93881, 93880, 93879, 93878, 93877, 93876, 93875, 93874, 93873, 93872, 93871, 93870, 93869, 93868, 93867, 93866, 93865, 93864, 93863, 93862, 93861, 93860, 93859, 93858, 93857, 93856, 93855, 93854, 93853, 93852, 93851, 93850, 93849, 93848, 93847, 93846, 93845, 93844, 93843, 93842, 93841, 93840, 93839, 93838, 93837, 93836, 93835, 93834, 93833, 93832, 93831, 93830, 93829, 93828, 93827, 93826, 93825, 93824, 93823, 93822, 93821, 93820, 93819, 93818, 93817, 93816, 93815, 93814, 93813, 93812, 93811, 93810, 93809, 93808, 93807, 93806, 93805, 93804, 93803, 93802, 93801, 93800, 93799, 93798, 93797, 93796, 93795, 93794, 93793, 93792, 93791, 93790, 93789, 93788, 93787, 93786, 93785, 93784, 93783, 93782, 93781, 93780, 93779, 93778, 93777, 93776, 93775, 93774, 93773, 93772, 93771, 93770, 93769, 93768, 93767, 93766, 93765, 93764, 93763, 93762, 93761, 93760, 93759, 93758, 93757, 93756, 93755, 93754, 93753, 93752, 93751, 93750, 93749, 93748, 93747, 93746, 93745, 93744, 93743, 93742, 93741, 93740, 93739, 93738, 93737, 93736, 93735, 93734, 93733, 93732, 93731, 93730, 93729, 93728, 93727, 93726, 93725, 93724, 93723, 93722, 93721, 93720, 93719, 93718, 93717, 93716, 93715, 93714, 93713, 93712, 93711, 93710, 93709, 93708, 93707, 93706, 93705, 93704, 93703, 93702, 93701, 93700, 93699, 93698, 93697, 93696, 93695, 93694, 93693, 93692, 93691, 93690, 93689, 93688, 93687, 93686, 93685, 93684, 93683, 93682, 93681, 93680, 93679, 93678, 93677, 93676, 93675, 93674, 93673, 93672, 93671, 93670, 93669, 93668, 93667, 93666, 93665, 93664, 93663, 93662, 93661, 93660, 93659, 93658, 93657, 93656, 93655, 93654, 93653, 93652, 93651, 93650, 93649, 93648, 93647, 93646, 93645, 93644, 93643, 93642, 93641, 93640, 93639, 93638, 93637, 93636, 93635, 93634, 93633, 93632, 93631, 93630, 93629, 93628, 93627, 93626, 93625, 93624, 93623, 93622, 93621, 93620, 93619, 93618, 93617, 93616, 93615, 93614, 93613, 93612, 93611, 93610, 93609, 93608, 93607, 93606, 93605, 93604, 93603, 93602, 93601, 93600, 93599, 93598, 93597, 93596, 93595, 93594, 93593, 93592, 93591, 93590, 93589, 93588, 93587, 93586, 93585, 93584, 93583, 93582, 93581, 93580, 93579, 93578, 93577, 93576, 93575, 93574, 93573, 93572, 93571, 93570, 93569, 93568, 93567, 93566, 93565, 93564, 93563, 93562, 93561, 93560, 93559, 93558, 93557, 93556, 93555, 93554, 93553, 93552, 93551, 93550, 93549, 93548, 93547, 93546, 93545, 93544, 93543, 93542, 93541, 93540, 93539, 93538, 93537, 93536, 93535, 93534, 93533, 93532, 93531, 93530, 93529, 93528, 93527, 93526, 93525, 93524, 93523, 93522, 93521, 93520, 93519, 93518, 93517, 93516, 93515, 93514, 93513, 93512, 93511, 93510, 93509, 93508, 93507, 93506, 93505, 93504, 93503, 93502, 93501, 93500, 93499, 93498, 93497, 93496, 93495, 93494, 93493, 93492, 93491, 93490, 93489, 93488, 93487, 93486, 93485, 93484, 93483, 93482, 93481, 93480, 93479, 93478, 93477, 93476, 93475, 93474, 93473, 93472, 93471, 93470, 93469, 93468, 93467, 93466, 93465, 93464, 93463, 93462, 93461, 93460, 93459, 93458, 93457, 93456, 93455, 93454, 93453, 93452, 93451, 93450, 93449, 93448, 93447, 93446, 93445, 93444, 93443, 93442, 93441, 93440, 93439, 93438, 93437, 93436, 93435, 93434, 93433, 93432, 93431, 93430, 93429, 93428, 93427, 93426, 93425, 93424, 93423, 93422, 93421, 93420, 93419, 93418, 93417, 93416, 93415, 93414, 93413, 93412, 93411, 93410, 93409, 93408, 93407, 93406, 93405, 93404, 93403, 93402, 93401, 93400, 93399, 93398, 93397, 93396, 93395, 93394, 93393, 93392, 93391, 93390, 93389, 93388, 93387, 93386, 93385, 93384, 93383, 93382, 93381, 93380, 93379, 93378, 93377, 93376, 93375, 93374, 93373, 93372, 93371, 93370, 93369, 93368, 93367, 93366, 93365, 93364, 93363, 93362, 93361, 93360, 93359, 93358, 93357, 93356, 93355, 93354, 93353, 93352, 93351, 93350, 93349, 93348, 93347, 93346, 93345, 93344, 93343, 93342, 93341, 93340, 93339, 93338, 93337, 93336, 93335, 93334, 93333, 93332, 93331, 93330, 93329, 93328, 93327, 93326, 93325, 93324, 93323, 93322, 93321, 93320, 93319, 93318, 93317, 93316, 93315, 93314, 93313, 93312, 93311, 93310, 93309, 93308, 93307, 93306, 93305, 93304, 93303, 93302, 93301, 93300, 93299, 93298, 93297, 93296, 93295, 93294, 93293, 93292, 93291, 93290, 93289, 93288, 93287, 93286, 93285, 93284, 93283, 93282, 93281, 93280, 93279, 93278, 93277, 93276, 93275, 93274, 93273, 93272, 93271, 93270, 93269, 93268, 93267, 93266, 93265, 93264, 93263, 93262, 93261, 93260, 93259, 93258, 93257, 93256, 93255, 93254, 93253, 93252, 93251, 93250, 93249, 93248, 93247, 93246, 93245, 93244, 93243, 93242, 93241, 93240, 93239, 93238, 93237, 93236, 93235, 93234, 93233, 93232, 93231, 93230, 93229, 93228, 93227, 93226, 93225, 93224, 93223, 93222, 93221, 93220, 93219, 93218, 93217, 93216, 93215, 93214, 93213, 93212, 93211, 93210, 93209, 93208, 93207, 93206, 93205, 93204, 93203, 93202, 93201, 93200, 93199, 93198, 93197, 93196, 93195, 93194, 93193, 93192, 93191, 93190, 93189, 93188, 93187, 93186, 93185, 93184, 93183, 93182, 93181, 93180, 93179, 93178, 93177, 93176, 93175, 93174, 93173, 93172, 93171, 93170, 93169, 93168, 93167, 93166, 93165, 93164, 93163, 93162, 93161, 93160, 93159, 93158, 93157, 93156, 93155, 93154, 93153, 93152, 93151, 93150, 93149, 93148, 93147, 93146, 93145, 93144, 93143, 93142, 93141, 93140, 93139, 93138, 93137, 93136, 93135, 93134, 93133, 93132, 93131, 93130, 93129, 93128, 93127, 93126, 93125, 93124, 93123, 93122, 93121, 93120, 93119, 93118, 93117, 93116, 93115, 93114, 93113, 93112, 93111, 93110, 93109, 93108, 93107, 93106, 93105, 93104, 93103, 93102, 93101, 93100, 93099, 93098, 93097, 93096, 93095, 93094, 93093, 93092, 93091, 93090, 93089, 93088, 93087, 93086, 93085, 93084, 93083, 93082, 93081, 93080, 93079, 93078, 93077, 93076, 93075, 93074, 93073, 93072, 93071, 93070, 93069, 93068, 93067, 93066, 93065, 93064, 93063, 93062, 93061, 93060, 93059, 93058, 93057, 93056, 93055, 93054, 93053, 93052, 93051, 93050, 93049, 93048, 93047, 93046, 93045, 93044, 93043, 93042, 93041, 93040, 93039, 93038, 93037, 93036, 93035, 93034, 93033, 93032, 93031, 93030, 93029, 93028, 93027, 93026, 93025, 93024, 93023, 93022, 93021, 93020, 93019, 93018, 93017, 93016, 93015, 93014, 93013, 93012, 93011, 93010, 93009, 93008, 93007, 93006, 93005, 93004, 93003, 93002, 93001, 93000, 92999, 92998, 92997, 92996, 92995, 92994, 92993, 92992, 92991, 92990, 92989, 92988, 92987, 92986, 92985, 92984, 92983, 92982, 92981, 92980, 92979, 92978, 92977, 92976, 92975, 92974, 92973, 92972, 92971, 92970, 92969, 92968, 92967, 92966, 92965, 92964, 92963, 92962, 92961, 92960, 92959, 92958, 92957, 92956, 92955, 92954, 92953, 92952, 92951, 92950, 92949, 92948, 92947, 92946, 92945, 92944, 92943, 92942, 92941, 92940, 92939, 92938, 92937, 92936, 92935, 92934, 92933, 92932, 92931, 92930, 92929, 92928, 92927, 92926, 92925, 92924, 92923, 92922, 92921, 92920, 92919, 92918, 92917, 92916, 92915, 92914, 92913, 92912, 92911, 92910, 92909, 92908, 92907, 92906, 92905, 92904, 92903, 92902, 92901, 92900, 92899, 92898, 92897, 92896, 92895, 92894, 92893, 92892, 92891, 92890, 92889, 92888, 92887, 92886, 92885, 92884, 92883, 92882, 92881, 92880, 92879, 92878, 92877, 92876, 92875, 92874, 92873, 92872, 92871, 92870, 92869, 92868, 92867, 92866, 92865, 92864, 92863, 92862, 92861, 92860, 92859, 92858, 92857, 92856, 92855, 92854, 92853, 92852, 92851, 92850, 92849, 92848, 92847, 92846, 92845, 92844, 92843, 92842, 92841, 92840, 92839, 92838, 92837, 92836, 92835, 92834, 92833, 92832, 92831, 92830, 92829, 92828, 92827, 92826, 92825, 92824, 92823, 92822, 92821, 92820, 92819, 92818, 92817, 92816, 92815, 92814, 92813, 92812, 92811, 92810, 92809, 92808, 92807, 92806, 92805, 92804, 92803, 92802, 92801, 92800, 92799, 92798, 92797, 92796, 92795, 92794, 92793, 92792, 92791, 92790, 92789, 92788, 92787, 92786, 92785, 92784, 92783, 92782, 92781, 92780, 92779, 92778, 92777, 92776, 92775, 92774, 92773, 92772, 92771, 92770, 92769, 92768, 92767, 92766, 92765, 92764, 92763, 92762, 92761, 92760, 92759, 92758, 92757, 92756, 92755, 92754, 92753, 92752, 92751, 92750, 92749, 92748, 92747, 92746, 92745, 92744, 92743, 92742, 92741, 92740, 92739, 92738, 92737, 92736, 92735, 92734, 92733, 92732, 92731, 92730, 92729, 92728, 92727, 92726, 92725, 92724, 92723, 92722, 92721, 92720, 92719, 92718, 92717, 92716, 92715, 92714, 92713, 92712, 92711, 92710, 92709, 92708, 92707, 92706, 92705, 92704, 92703, 92702, 92701, 92700, 92699, 92698, 92697, 92696, 92695, 92694, 92693, 92692, 92691, 92690, 92689, 92688, 92687, 92686, 92685, 92684, 92683, 92682, 92681, 92680, 92679, 92678, 92677, 92676, 92675, 92674, 92673, 92672, 92671, 92670, 92669, 92668, 92667, 92666, 92665, 92664, 92663, 92662, 92661, 92660, 92659, 92658, 92657, 92656, 92655, 92654, 92653, 92652, 92651, 92650, 92649, 92648, 92647, 92646, 92645, 92644, 92643, 92642, 92641, 92640, 92639, 92638, 92637, 92636, 92635, 92634, 92633, 92632, 92631, 92630, 92629, 92628, 92627, 92626, 92625, 92624, 92623, 92622, 92621, 92620, 92619, 92618, 92617, 92616, 92615, 92614, 92613, 92612, 92611, 92610, 92609, 92608, 92607, 92606, 92605, 92604, 92603, 92602, 92601, 92600, 92599, 92598, 92597, 92596, 92595, 92594, 92593, 92592, 92591, 92590, 92589, 92588, 92587, 92586, 92585, 92584, 92583, 92582, 92581, 92580, 92579, 92578, 92577, 92576, 92575, 92574, 92573, 92572, 92571, 92570, 92569, 92568, 92567, 92566, 92565, 92564, 92563, 92562, 92561, 92560, 92559, 92558, 92557, 92556, 92555, 92554, 92553, 92552, 92551, 92550, 92549, 92548, 92547, 92546, 92545, 92544, 92543, 92542, 92541, 92540, 92539, 92538, 92537, 92536, 92535, 92534, 92533, 92532, 92531, 92530, 92529, 92528, 92527, 92526, 92525, 92524, 92523, 92522, 92521, 92520, 92519, 92518, 92517, 92516, 92515, 92514, 92513, 92512, 92511, 92510, 92509, 92508, 92507, 92506, 92505, 92504, 92503, 92502, 92501, 92500, 92499, 92498, 92497, 92496, 92495, 92494, 92493, 92492, 92491, 92490, 92489, 92488, 92487, 92486, 92485, 92484, 92483, 92482, 92481, 92480, 92479, 92478, 92477, 92476, 92475, 92474, 92473, 92472, 92471, 92470, 92469, 92468, 92467, 92466, 92465, 92464, 92463, 92462, 92461, 92460, 92459, 92458, 92457, 92456, 92455, 92454, 92453, 92452, 92451, 92450, 92449, 92448, 92447, 92446, 92445, 92444, 92443, 92442, 92441, 92440, 92439, 92438, 92437, 92436, 92435, 92434, 92433, 92432, 92431, 92430, 92429, 92428, 92427, 92426, 92425, 92424, 92423, 92422, 92421, 92420, 92419, 92418, 92417, 92416, 92415, 92414, 92413, 92412, 92411, 92410, 92409, 92408, 92407, 92406, 92405, 92404, 92403, 92402, 92401, 92400, 92399, 92398, 92397, 92396, 92395, 92394, 92393, 92392, 92391, 92390, 92389, 92388, 92387, 92386, 92385, 92384, 92383, 92382, 92381, 92380, 92379, 92378, 92377, 92376, 92375, 92374, 92373, 92372, 92371, 92370, 92369, 92368, 92367, 92366, 92365, 92364, 92363, 92362, 92361, 92360, 92359, 92358, 92357, 92356, 92355, 92354, 92353, 92352, 92351, 92350, 92349, 92348, 92347, 92346, 92345, 92344, 92343, 92342, 92341, 92340, 92339, 92338, 92337, 92336, 92335, 92334, 92333, 92332, 92331, 92330, 92329, 92328, 92327, 92326, 92325, 92324, 92323, 92322, 92321, 92320, 92319, 92318, 92317, 92316, 92315, 92314, 92313, 92312, 92311, 92310, 92309, 92308, 92307, 92306, 92305, 92304, 92303, 92302, 92301, 92300, 92299, 92298, 92297, 92296, 92295, 92294, 92293, 92292, 92291, 92290, 92289, 92288, 92287, 92286, 92285, 92284, 92283, 92282, 92281, 92280, 92279, 92278, 92277, 92276, 92275, 92274, 92273, 92272, 92271, 92270, 92269, 92268, 92267, 92266, 92265, 92264, 92263, 92262, 92261, 92260, 92259, 92258, 92257, 92256, 92255, 92254, 92253, 92252, 92251, 92250, 92249, 92248, 92247, 92246, 92245, 92244, 92243, 92242, 92241, 92240, 92239, 92238, 92237, 92236, 92235, 92234, 92233, 92232, 92231, 92230, 92229, 92228, 92227, 92226, 92225, 92224, 92223, 92222, 92221, 92220, 92219, 92218, 92217, 92216, 92215, 92214, 92213, 92212, 92211, 92210, 92209, 92208, 92207, 92206, 92205, 92204, 92203, 92202, 92201, 92200, 92199, 92198, 92197, 92196, 92195, 92194, 92193, 92192, 92191, 92190, 92189, 92188, 92187, 92186, 92185, 92184, 92183, 92182, 92181, 92180, 92179, 92178, 92177, 92176, 92175, 92174, 92173, 92172, 92171, 92170, 92169, 92168, 92167, 92166, 92165, 92164, 92163, 92162, 92161, 92160, 92159, 92158, 92157, 92156, 92155, 92154, 92153, 92152, 92151, 92150, 92149, 92148, 92147, 92146, 92145, 92144, 92143, 92142, 92141, 92140, 92139, 92138, 92137, 92136, 92135, 92134, 92133, 92132, 92131, 92130, 92129, 92128, 92127, 92126, 92125, 92124, 92123, 92122, 92121, 92120, 92119, 92118, 92117, 92116, 92115, 92114, 92113, 92112, 92111, 92110, 92109, 92108, 92107, 92106, 92105, 92104, 92103, 92102, 92101, 92100, 92099, 92098, 92097, 92096, 92095, 92094, 92093, 92092, 92091, 92090, 92089, 92088, 92087, 92086, 92085, 92084, 92083, 92082, 92081, 92080, 92079, 92078, 92077, 92076, 92075, 92074, 92073, 92072, 92071, 92070, 92069, 92068, 92067, 92066, 92065, 92064, 92063, 92062, 92061, 92060, 92059, 92058, 92057, 92056, 92055, 92054, 92053, 92052, 92051, 92050, 92049, 92048, 92047, 92046, 92045, 92044, 92043, 92042, 92041, 92040, 92039, 92038, 92037, 92036, 92035, 92034, 92033, 92032, 92031, 92030, 92029, 92028, 92027, 92026, 92025, 92024, 92023, 92022, 92021, 92020, 92019, 92018, 92017, 92016, 92015, 92014, 92013, 92012, 92011, 92010, 92009, 92008, 92007, 92006, 92005, 92004, 92003, 92002, 92001, 92000, 91999, 91998, 91997, 91996, 91995, 91994, 91993, 91992, 91991, 91990, 91989, 91988, 91987, 91986, 91985, 91984, 91983, 91982, 91981, 91980, 91979, 91978, 91977, 91976, 91975, 91974, 91973, 91972, 91971, 91970, 91969, 91968, 91967, 91966, 91965, 91964, 91963, 91962, 91961, 91960, 91959, 91958, 91957, 91956, 91955, 91954, 91953, 91952, 91951, 91950, 91949, 91948, 91947, 91946, 91945, 91944, 91943, 91942, 91941, 91940, 91939, 91938, 91937, 91936, 91935, 91934, 91933, 91932, 91931, 91930, 91929, 91928, 91927, 91926, 91925, 91924, 91923, 91922, 91921, 91920, 91919, 91918, 91917, 91916, 91915, 91914, 91913, 91912, 91911, 91910, 91909, 91908, 91907, 91906, 91905, 91904, 91903, 91902, 91901, 91900, 91899, 91898, 91897, 91896, 91895, 91894, 91893, 91892, 91891, 91890, 91889, 91888, 91887, 91886, 91885, 91884, 91883, 91882, 91881, 91880, 91879, 91878, 91877, 91876, 91875, 91874, 91873, 91872, 91871, 91870, 91869, 91868, 91867, 91866, 91865, 91864, 91863, 91862, 91861, 91860, 91859, 91858, 91857, 91856, 91855, 91854, 91853, 91852, 91851, 91850, 91849, 91848, 91847, 91846, 91845, 91844, 91843, 91842, 91841, 91840, 91839, 91838, 91837, 91836, 91835, 91834, 91833, 91832, 91831, 91830, 91829, 91828, 91827, 91826, 91825, 91824, 91823, 91822, 91821, 91820, 91819, 91818, 91817, 91816, 91815, 91814, 91813, 91812, 91811, 91810, 91809, 91808, 91807, 91806, 91805, 91804, 91803, 91802, 91801, 91800, 91799, 91798, 91797, 91796, 91795, 91794, 91793, 91792, 91791, 91790, 91789, 91788, 91787, 91786, 91785, 91784, 91783, 91782, 91781, 91780, 91779, 91778, 91777, 91776, 91775, 91774, 91773, 91772, 91771, 91770, 91769, 91768, 91767, 91766, 91765, 91764, 91763, 91762, 91761, 91760, 91759, 91758, 91757, 91756, 91755, 91754, 91753, 91752, 91751, 91750, 91749, 91748, 91747, 91746, 91745, 91744, 91743, 91742, 91741, 91740, 91739, 91738, 91737, 91736, 91735, 91734, 91733, 91732, 91731, 91730, 91729, 91728, 91727, 91726, 91725, 91724, 91723, 91722, 91721, 91720, 91719, 91718, 91717, 91716, 91715, 91714, 91713, 91712, 91711, 91710, 91709, 91708, 91707, 91706, 91705, 91704, 91703, 91702, 91701, 91700, 91699, 91698, 91697, 91696, 91695, 91694, 91693, 91692, 91691, 91690, 91689, 91688, 91687, 91686, 91685, 91684, 91683, 91682, 91681, 91680, 91679, 91678, 91677, 91676, 91675, 91674, 91673, 91672, 91671, 91670, 91669, 91668, 91667, 91666, 91665, 91664, 91663, 91662, 91661, 91660, 91659, 91658, 91657, 91656, 91655, 91654, 91653, 91652, 91651, 91650, 91649, 91648, 91647, 91646, 91645, 91644, 91643, 91642, 91641, 91640, 91639, 91638, 91637, 91636, 91635, 91634, 91633, 91632, 91631, 91630, 91629, 91628, 91627, 91626, 91625, 91624, 91623, 91622, 91621, 91620, 91619, 91618, 91617, 91616, 91615, 91614, 91613, 91612, 91611, 91610, 91609, 91608, 91607, 91606, 91605, 91604, 91603, 91602, 91601, 91600, 91599, 91598, 91597, 91596, 91595, 91594, 91593, 91592, 91591, 91590, 91589, 91588, 91587, 91586, 91585, 91584, 91583, 91582, 91581, 91580, 91579, 91578, 91577, 91576, 91575, 91574, 91573, 91572, 91571, 91570, 91569, 91568, 91567, 91566, 91565, 91564, 91563, 91562, 91561, 91560, 91559, 91558, 91557, 91556, 91555, 91554, 91553, 91552, 91551, 91550, 91549, 91548, 91547, 91546, 91545, 91544, 91543, 91542, 91541, 91540, 91539, 91538, 91537, 91536, 91535, 91534, 91533, 91532, 91531, 91530, 91529, 91528, 91527, 91526, 91525, 91524, 91523, 91522, 91521, 91520, 91519, 91518, 91517, 91516, 91515, 91514, 91513, 91512, 91511, 91510, 91509, 91508, 91507, 91506, 91505, 91504, 91503, 91502, 91501, 91500, 91499, 91498, 91497, 91496, 91495, 91494, 91493, 91492, 91491, 91490, 91489, 91488, 91487, 91486, 91485, 91484, 91483, 91482, 91481, 91480, 91479, 91478, 91477, 91476, 91475, 91474, 91473, 91472, 91471, 91470, 91469, 91468, 91467, 91466, 91465, 91464, 91463, 91462, 91461, 91460, 91459, 91458, 91457, 91456, 91455, 91454, 91453, 91452, 91451, 91450, 91449, 91448, 91447, 91446, 91445, 91444, 91443, 91442, 91441, 91440, 91439, 91438, 91437, 91436, 91435, 91434, 91433, 91432, 91431, 91430, 91429, 91428, 91427, 91426, 91425, 91424, 91423, 91422, 91421, 91420, 91419, 91418, 91417, 91416, 91415, 91414, 91413, 91412, 91411, 91410, 91409, 91408, 91407, 91406, 91405, 91404, 91403, 91402, 91401, 91400, 91399, 91398, 91397, 91396, 91395, 91394, 91393, 91392, 91391, 91390, 91389, 91388, 91387, 91386, 91385, 91384, 91383, 91382, 91381, 91380, 91379, 91378, 91377, 91376, 91375, 91374, 91373, 91372, 91371, 91370, 91369, 91368, 91367, 91366, 91365, 91364, 91363, 91362, 91361, 91360, 91359, 91358, 91357, 91356, 91355, 91354, 91353, 91352, 91351, 91350, 91349, 91348, 91347, 91346, 91345, 91344, 91343, 91342, 91341, 91340, 91339, 91338, 91337, 91336, 91335, 91334, 91333, 91332, 91331, 91330, 91329, 91328, 91327, 91326, 91325, 91324, 91323, 91322, 91321, 91320, 91319, 91318, 91317, 91316, 91315, 91314, 91313, 91312, 91311, 91310, 91309, 91308, 91307, 91306, 91305, 91304, 91303, 91302, 91301, 91300, 91299, 91298, 91297, 91296, 91295, 91294, 91293, 91292, 91291, 91290, 91289, 91288, 91287, 91286, 91285, 91284, 91283, 91282, 91281, 91280, 91279, 91278, 91277, 91276, 91275, 91274, 91273, 91272, 91271, 91270, 91269, 91268, 91267, 91266, 91265, 91264, 91263, 91262, 91261, 91260, 91259, 91258, 91257, 91256, 91255, 91254, 91253, 91252, 91251, 91250, 91249, 91248, 91247, 91246, 91245, 91244, 91243, 91242, 91241, 91240, 91239, 91238, 91237, 91236, 91235, 91234, 91233, 91232, 91231, 91230, 91229, 91228, 91227, 91226, 91225, 91224, 91223, 91222, 91221, 91220, 91219, 91218, 91217, 91216, 91215, 91214, 91213, 91212, 91211, 91210, 91209, 91208, 91207, 91206, 91205, 91204, 91203, 91202, 91201, 91200, 91199, 91198, 91197, 91196, 91195, 91194, 91193, 91192, 91191, 91190, 91189, 91188, 91187, 91186, 91185, 91184, 91183, 91182, 91181, 91180, 91179, 91178, 91177, 91176, 91175, 91174, 91173, 91172, 91171, 91170, 91169, 91168, 91167, 91166, 91165, 91164, 91163, 91162, 91161, 91160, 91159, 91158, 91157, 91156, 91155, 91154, 91153, 91152, 91151, 91150, 91149, 91148, 91147, 91146, 91145, 91144, 91143, 91142, 91141, 91140, 91139, 91138, 91137, 91136, 91135, 91134, 91133, 91132, 91131, 91130, 91129, 91128, 91127, 91126, 91125, 91124, 91123, 91122, 91121, 91120, 91119, 91118, 91117, 91116, 91115, 91114, 91113, 91112, 91111, 91110, 91109, 91108, 91107, 91106, 91105, 91104, 91103, 91102, 91101, 91100, 91099, 91098, 91097, 91096, 91095, 91094, 91093, 91092, 91091, 91090, 91089, 91088, 91087, 91086, 91085, 91084, 91083, 91082, 91081, 91080, 91079, 91078, 91077, 91076, 91075, 91074, 91073, 91072, 91071, 91070, 91069, 91068, 91067, 91066, 91065, 91064, 91063, 91062, 91061, 91060, 91059, 91058, 91057, 91056, 91055, 91054, 91053, 91052, 91051, 91050, 91049, 91048, 91047, 91046, 91045, 91044, 91043, 91042, 91041, 91040, 91039, 91038, 91037, 91036, 91035, 91034, 91033, 91032, 91031, 91030, 91029, 91028, 91027, 91026, 91025, 91024, 91023, 91022, 91021, 91020, 91019, 91018, 91017, 91016, 91015, 91014, 91013, 91012, 91011, 91010, 91009, 91008, 91007, 91006, 91005, 91004, 91003, 91002, 91001, 91000, 90999, 90998, 90997, 90996, 90995, 90994, 90993, 90992, 90991, 90990, 90989, 90988, 90987, 90986, 90985, 90984, 90983, 90982, 90981, 90980, 90979, 90978, 90977, 90976, 90975, 90974, 90973, 90972, 90971, 90970, 90969, 90968, 90967, 90966, 90965, 90964, 90963, 90962, 90961, 90960, 90959, 90958, 90957, 90956, 90955, 90954, 90953, 90952, 90951, 90950, 90949, 90948, 90947, 90946, 90945, 90944, 90943, 90942, 90941, 90940, 90939, 90938, 90937, 90936, 90935, 90934, 90933, 90932, 90931, 90930, 90929, 90928, 90927, 90926, 90925, 90924, 90923, 90922, 90921, 90920, 90919, 90918, 90917, 90916, 90915, 90914, 90913, 90912, 90911, 90910, 90909, 90908, 90907, 90906, 90905, 90904, 90903, 90902, 90901, 90900, 90899, 90898, 90897, 90896, 90895, 90894, 90893, 90892, 90891, 90890, 90889, 90888, 90887, 90886, 90885, 90884, 90883, 90882, 90881, 90880, 90879, 90878, 90877, 90876, 90875, 90874, 90873, 90872, 90871, 90870, 90869, 90868, 90867, 90866, 90865, 90864, 90863, 90862, 90861, 90860, 90859, 90858, 90857, 90856, 90855, 90854, 90853, 90852, 90851, 90850, 90849, 90848, 90847, 90846, 90845, 90844, 90843, 90842, 90841, 90840, 90839, 90838, 90837, 90836, 90835, 90834, 90833, 90832, 90831, 90830, 90829, 90828, 90827, 90826, 90825, 90824, 90823, 90822, 90821, 90820, 90819, 90818, 90817, 90816, 90815, 90814, 90813, 90812, 90811, 90810, 90809, 90808, 90807, 90806, 90805, 90804, 90803, 90802, 90801, 90800, 90799, 90798, 90797, 90796, 90795, 90794, 90793, 90792, 90791, 90790, 90789, 90788, 90787, 90786, 90785, 90784, 90783, 90782, 90781, 90780, 90779, 90778, 90777, 90776, 90775, 90774, 90773, 90772, 90771, 90770, 90769, 90768, 90767, 90766, 90765, 90764, 90763, 90762, 90761, 90760, 90759, 90758, 90757, 90756, 90755, 90754, 90753, 90752, 90751, 90750, 90749, 90748, 90747, 90746, 90745, 90744, 90743, 90742, 90741, 90740, 90739, 90738, 90737, 90736, 90735, 90734, 90733, 90732, 90731, 90730, 90729, 90728, 90727, 90726, 90725, 90724, 90723, 90722, 90721, 90720, 90719, 90718, 90717, 90716, 90715, 90714, 90713, 90712, 90711, 90710, 90709, 90708, 90707, 90706, 90705, 90704, 90703, 90702, 90701, 90700, 90699, 90698, 90697, 90696, 90695, 90694, 90693, 90692, 90691, 90690, 90689, 90688, 90687, 90686, 90685, 90684, 90683, 90682, 90681, 90680, 90679, 90678, 90677, 90676, 90675, 90674, 90673, 90672, 90671, 90670, 90669, 90668, 90667, 90666, 90665, 90664, 90663, 90662, 90661, 90660, 90659, 90658, 90657, 90656, 90655, 90654, 90653, 90652, 90651, 90650, 90649, 90648, 90647, 90646, 90645, 90644, 90643, 90642, 90641, 90640, 90639, 90638, 90637, 90636, 90635, 90634, 90633, 90632, 90631, 90630, 90629, 90628, 90627, 90626, 90625, 90624, 90623, 90622, 90621, 90620, 90619, 90618, 90617, 90616, 90615, 90614, 90613, 90612, 90611, 90610, 90609, 90608, 90607, 90606, 90605, 90604, 90603, 90602, 90601, 90600, 90599, 90598, 90597, 90596, 90595, 90594, 90593, 90592, 90591, 90590, 90589, 90588, 90587, 90586, 90585, 90584, 90583, 90582, 90581, 90580, 90579, 90578, 90577, 90576, 90575, 90574, 90573, 90572, 90571, 90570, 90569, 90568, 90567, 90566, 90565, 90564, 90563, 90562, 90561, 90560, 90559, 90558, 90557, 90556, 90555, 90554, 90553, 90552, 90551, 90550, 90549, 90548, 90547, 90546, 90545, 90544, 90543, 90542, 90541, 90540, 90539, 90538, 90537, 90536, 90535, 90534, 90533, 90532, 90531, 90530, 90529, 90528, 90527, 90526, 90525, 90524, 90523, 90522, 90521, 90520, 90519, 90518, 90517, 90516, 90515, 90514, 90513, 90512, 90511, 90510, 90509, 90508, 90507, 90506, 90505, 90504, 90503, 90502, 90501, 90500, 90499, 90498, 90497, 90496, 90495, 90494, 90493, 90492, 90491, 90490, 90489, 90488, 90487, 90486, 90485, 90484, 90483, 90482, 90481, 90480, 90479, 90478, 90477, 90476, 90475, 90474, 90473, 90472, 90471, 90470, 90469, 90468, 90467, 90466, 90465, 90464, 90463, 90462, 90461, 90460, 90459, 90458, 90457, 90456, 90455, 90454, 90453, 90452, 90451, 90450, 90449, 90448, 90447, 90446, 90445, 90444, 90443, 90442, 90441, 90440, 90439, 90438, 90437, 90436, 90435, 90434, 90433, 90432, 90431, 90430, 90429, 90428, 90427, 90426, 90425, 90424, 90423, 90422, 90421, 90420, 90419, 90418, 90417, 90416, 90415, 90414, 90413, 90412, 90411, 90410, 90409, 90408, 90407, 90406, 90405, 90404, 90403, 90402, 90401, 90400, 90399, 90398, 90397, 90396, 90395, 90394, 90393, 90392, 90391, 90390, 90389, 90388, 90387, 90386, 90385, 90384, 90383, 90382, 90381, 90380, 90379, 90378, 90377, 90376, 90375, 90374, 90373, 90372, 90371, 90370, 90369, 90368, 90367, 90366, 90365, 90364, 90363, 90362, 90361, 90360, 90359, 90358, 90357, 90356, 90355, 90354, 90353, 90352, 90351, 90350, 90349, 90348, 90347, 90346, 90345, 90344, 90343, 90342, 90341, 90340, 90339, 90338, 90337, 90336, 90335, 90334, 90333, 90332, 90331, 90330, 90329, 90328, 90327, 90326, 90325, 90324, 90323, 90322, 90321, 90320, 90319, 90318, 90317, 90316, 90315, 90314, 90313, 90312, 90311, 90310, 90309, 90308, 90307, 90306, 90305, 90304, 90303, 90302, 90301, 90300, 90299, 90298, 90297, 90296, 90295, 90294, 90293, 90292, 90291, 90290, 90289, 90288, 90287, 90286, 90285, 90284, 90283, 90282, 90281, 90280, 90279, 90278, 90277, 90276, 90275, 90274, 90273, 90272, 90271, 90270, 90269, 90268, 90267, 90266, 90265, 90264, 90263, 90262, 90261, 90260, 90259, 90258, 90257, 90256, 90255, 90254, 90253, 90252, 90251, 90250, 90249, 90248, 90247, 90246, 90245, 90244, 90243, 90242, 90241, 90240, 90239, 90238, 90237, 90236, 90235, 90234, 90233, 90232, 90231, 90230, 90229, 90228, 90227, 90226, 90225, 90224, 90223, 90222, 90221, 90220, 90219, 90218, 90217, 90216, 90215, 90214, 90213, 90212, 90211, 90210, 90209, 90208, 90207, 90206, 90205, 90204, 90203, 90202, 90201, 90200, 90199, 90198, 90197, 90196, 90195, 90194, 90193, 90192, 90191, 90190, 90189, 90188, 90187, 90186, 90185, 90184, 90183, 90182, 90181, 90180, 90179, 90178, 90177, 90176, 90175, 90174, 90173, 90172, 90171, 90170, 90169, 90168, 90167, 90166, 90165, 90164, 90163, 90162, 90161, 90160, 90159, 90158, 90157, 90156, 90155, 90154, 90153, 90152, 90151, 90150, 90149, 90148, 90147, 90146, 90145, 90144, 90143, 90142, 90141, 90140, 90139, 90138, 90137, 90136, 90135, 90134, 90133, 90132, 90131, 90130, 90129, 90128, 90127, 90126, 90125, 90124, 90123, 90122, 90121, 90120, 90119, 90118, 90117, 90116, 90115, 90114, 90113, 90112, 90111, 90110, 90109, 90108, 90107, 90106, 90105, 90104, 90103, 90102, 90101, 90100, 90099, 90098, 90097, 90096, 90095, 90094, 90093, 90092, 90091, 90090, 90089, 90088, 90087, 90086, 90085, 90084, 90083, 90082, 90081, 90080, 90079, 90078, 90077, 90076, 90075, 90074, 90073, 90072, 90071, 90070, 90069, 90068, 90067, 90066, 90065, 90064, 90063, 90062, 90061, 90060, 90059, 90058, 90057, 90056, 90055, 90054, 90053, 90052, 90051, 90050, 90049, 90048, 90047, 90046, 90045, 90044, 90043, 90042, 90041, 90040, 90039, 90038, 90037, 90036, 90035, 90034, 90033, 90032, 90031, 90030, 90029, 90028, 90027, 90026, 90025, 90024, 90023, 90022, 90021, 90020, 90019, 90018, 90017, 90016, 90015, 90014, 90013, 90012, 90011, 90010, 90009, 90008, 90007, 90006, 90005, 90004, 90003, 90002, 90001}, + []int{-1,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000,100000}, + }, + + { + []int{}, + []int{}, + }, + + { + []int{1, 1, 1, 1, 1}, + []int{-1, -1, -1, -1, -1}, + }, + + { + []int{4, 3, 2, 1}, + []int{-1, 4, 4, 4}, + }, + + { + []int{1, 2, 1}, + []int{2, -1, 2}, + }, + + // 可以有多个 testcase +} + +func Test_nextGreaterElements(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + // fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, nextGreaterElements(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_nextGreaterElements(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + nextGreaterElements(tc.nums) + } + } +} diff --git a/Algorithms/0504.base-7/README.md b/Algorithms/0504.base-7/README.md new file mode 100755 index 000000000..34ba10fb2 --- /dev/null +++ b/Algorithms/0504.base-7/README.md @@ -0,0 +1,26 @@ +# [504. Base 7](https://leetcode.com/problems/base-7/) + +## 题目 + +Given an integer, return its base 7 string representation. + +Example 1: + +```text +Input: 100 +Output: "202" +``` + +Example 2: + +```text +Input: -7 +Output: "-10" +``` + +Note: +The input will be in range of [-1e7, 1e7]. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0504.base-7/base-7.go b/Algorithms/0504.base-7/base-7.go new file mode 100755 index 000000000..82f0e0c68 --- /dev/null +++ b/Algorithms/0504.base-7/base-7.go @@ -0,0 +1,24 @@ +package Problem0504 + +import "fmt" + +func convertToBase7(num int) string { + if num == 0 { + return "0" + } + + minus := "" + if num < 0 { + minus = "-" + num *= -1 + } + + s := "" + + for num > 0 { + s = fmt.Sprintf("%d", num%7) + s + num /= 7 + } + + return minus + s +} diff --git a/Algorithms/0504.base-7/base-7_test.go b/Algorithms/0504.base-7/base-7_test.go new file mode 100755 index 000000000..d9b682f11 --- /dev/null +++ b/Algorithms/0504.base-7/base-7_test.go @@ -0,0 +1,49 @@ +package Problem0504 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + num int + ans string +}{ + + { + 0, + "0", + }, + + { + 100, + "202", + }, + + { + -7, + "-10", + }, + + // 可以有多个 testcase +} + +func Test_convertToBase7(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, convertToBase7(tc.num), "输入:%v", tc) + } +} + +func Benchmark_convertToBase7(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + convertToBase7(tc.num) + } + } +} diff --git a/Algorithms/0506.relative-ranks/README.md b/Algorithms/0506.relative-ranks/README.md new file mode 100755 index 000000000..970bc5171 --- /dev/null +++ b/Algorithms/0506.relative-ranks/README.md @@ -0,0 +1,22 @@ +# [506. Relative Ranks](https://leetcode.com/problems/relative-ranks/) + +## 题目 + +Given scores of N athletes, find their relative ranks and the people with the top three highest scores, who will be awarded medals: "Gold Medal", "Silver Medal" and "Bronze Medal". + +Example 1: + +```text +Input: [5, 4, 3, 2, 1] +Output: ["Gold Medal", "Silver Medal", "Bronze Medal", "4", "5"] +Explanation: The first three athletes got the top three highest scores, so they got "Gold Medal", "Silver Medal" and "Bronze Medal". For the left two athletes, you just need to output their relative ranks according to their scores. +``` + +Note: + +1. N is a positive integer and won't exceed 10,000. +1. All the scores of athletes are guaranteed to be unique. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0506.relative-ranks/relative-ranks.go b/Algorithms/0506.relative-ranks/relative-ranks.go new file mode 100755 index 000000000..6bbf04b30 --- /dev/null +++ b/Algorithms/0506.relative-ranks/relative-ranks.go @@ -0,0 +1,48 @@ +package Problem0506 + +import ( + "sort" + "strconv" +) + +func findRelativeRanks(nums []int) []string { + res := make([]string, len(nums)) + as := make(athletes, len(nums)) + + for i := range nums { + as[i] = athlete{ + sorce: nums[i], + index: i, + } + } + + sort.Sort(as) + + for i, a := range as { + switch i { + case 0: + res[a.index] = "Gold Medal" + case 1: + res[a.index] = "Silver Medal" + case 2: + res[a.index] = "Bronze Medal" + default: + res[a.index] = strconv.Itoa(i + 1) + } + } + + return res +} + +// athlete 实现了 sort.Interface 接口 +type athlete struct { + sorce, index int +} + +type athletes []athlete + +func (a athletes) Len() int { return len(a) } + +func (a athletes) Less(i, j int) bool { return a[i].sorce > a[j].sorce } + +func (a athletes) Swap(i, j int) { a[i], a[j] = a[j], a[i] } diff --git a/Algorithms/0506.relative-ranks/relative-ranks_test.go b/Algorithms/0506.relative-ranks/relative-ranks_test.go new file mode 100755 index 000000000..e2f25a055 --- /dev/null +++ b/Algorithms/0506.relative-ranks/relative-ranks_test.go @@ -0,0 +1,44 @@ +package Problem0506 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans []string +}{ + + { + []int{0, 4, 3, 2, 1}, + []string{"5", "Gold Medal", "Silver Medal", "Bronze Medal", "4"}, + }, + + { + []int{5, 4, 3, 2, 1}, + []string{"Gold Medal", "Silver Medal", "Bronze Medal", "4", "5"}, + }, + + // 可以有多个 testcase +} + +func Test_findRelativeRanks(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findRelativeRanks(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_findRelativeRanks(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findRelativeRanks(tc.nums) + } + } +} diff --git a/Algorithms/0507.perfect-number/README.md b/Algorithms/0507.perfect-number/README.md new file mode 100755 index 000000000..6170f8944 --- /dev/null +++ b/Algorithms/0507.perfect-number/README.md @@ -0,0 +1,22 @@ +# [507. Perfect Number](https://leetcode.com/problems/perfect-number/) + +## 题目 + +We define the Perfect Number is a positive integer that is equal to the sum of all its positive divisors except itself. + +Now, given an integer n, write a function that returns true when it is a perfect number and false when it is not. + +Example: + +```text +Input: 28 +Output: True +Explanation: 28 = 1 + 2 + 4 + 7 + 14 +``` + +Note: +The input number n will not exceed 100,000,000. (1e8) + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0507.perfect-number/perfect-number.go b/Algorithms/0507.perfect-number/perfect-number.go new file mode 100755 index 000000000..b933272fd --- /dev/null +++ b/Algorithms/0507.perfect-number/perfect-number.go @@ -0,0 +1,22 @@ +package Problem0507 + +import ( + "math" +) + +func checkPerfectNumber(num int) bool { + if num == 1 { + return false + } + + sum := 1 + root := int(math.Sqrt(float64(num))) + + for i := 2; i <= root; i++ { + if num%i == 0 { + sum += i + (num / i) + } + } + + return sum == num +} diff --git a/Algorithms/0507.perfect-number/perfect-number_test.go b/Algorithms/0507.perfect-number/perfect-number_test.go new file mode 100755 index 000000000..33da103f5 --- /dev/null +++ b/Algorithms/0507.perfect-number/perfect-number_test.go @@ -0,0 +1,54 @@ +package Problem0507 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + num int + ans bool +}{ + + { + 100000000, + false, + }, + + { + 1, + false, + }, + + { + 132049, + false, + }, + + { + 28, + true, + }, + + // 可以有多个 testcase +} + +func Test_checkPerfectNumber(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, checkPerfectNumber(tc.num), "输入:%v", tc) + } +} + +func Benchmark_checkPerfectNumber(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + checkPerfectNumber(tc.num) + } + } +} diff --git a/Algorithms/0508.most-frequent-subtree-sum/README.md b/Algorithms/0508.most-frequent-subtree-sum/README.md new file mode 100755 index 000000000..930e651a3 --- /dev/null +++ b/Algorithms/0508.most-frequent-subtree-sum/README.md @@ -0,0 +1,34 @@ +# [508. Most Frequent Subtree Sum](https://leetcode.com/problems/most-frequent-subtree-sum/) + +## 题目 + +Given the root of a tree, you are asked to find the most frequent subtree sum. The subtree sum of a node is defined as the sum of all the node values formed by the subtree rooted at that node (including the node itself). So what is the most frequent subtree sum value? If there is a tie, return all the values with the highest frequency in any order. + +Examples 1 + +```text +Input: + 5 + / \ +2 -3 + +return [2, -3, 4], since all the values happen only once, return all of them in any order. +``` + +Examples 2 + +```text +Input: + 5 + / \ +2 -5 + +return [2], since 2 happens twice, however -5 only occur once. +``` + +Note: +You may assume the sum of values in any subtree is in the range of 32-bit signed integer. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0508.most-frequent-subtree-sum/most-frequent-subtree-sum.go b/Algorithms/0508.most-frequent-subtree-sum/most-frequent-subtree-sum.go new file mode 100755 index 000000000..03c260089 --- /dev/null +++ b/Algorithms/0508.most-frequent-subtree-sum/most-frequent-subtree-sum.go @@ -0,0 +1,38 @@ +package Problem0508 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" +) + +type TreeNode = kit.TreeNode + +func findFrequentTreeSum(root *TreeNode) []int { + rec := make(map[int]int) + sum(root, rec) + + res := make([]int, 0, len(rec)) + max := -1 + for s, c := range rec { + if max <= c { + if max < c { + max = c + res = res[0:0] + } + res = append(res , s) + } + } + + return res +} + +// 递归求子树的和,并统计各个和出现的次数 +func sum(root *TreeNode, r map[int]int) int { + if root == nil { + return 0 + } + + s := root.Val + sum(root.Left, r) + sum(root.Right, r) + r[s]++ + + return s +} diff --git a/Algorithms/0508.most-frequent-subtree-sum/most-frequent-subtree-sum_test.go b/Algorithms/0508.most-frequent-subtree-sum/most-frequent-subtree-sum_test.go new file mode 100755 index 000000000..bafdc4742 --- /dev/null +++ b/Algorithms/0508.most-frequent-subtree-sum/most-frequent-subtree-sum_test.go @@ -0,0 +1,54 @@ +package Problem0508 + +import ( + "fmt" + "sort" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + pre, in []int + ans []int +}{ + + { + []int{5, 2, -5}, + []int{2, 5, -5}, + []int{2}, + }, + + { + []int{5, 2, -3}, + []int{2, 5, -3}, + []int{2, -3, 4}, + }, + + // 可以有多个 testcase +} + +func Test_findFrequentTreeSum(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + root := kit.PreIn2Tree(tc.pre, tc.in) + ans := findFrequentTreeSum(root) + sort.Ints(ans) + sort.Ints(tc.ans) + ast.Equal(tc.ans, ans, "输入:%v", tc) + } +} + +func Benchmark_findFrequentTreeSum(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + root := kit.PreIn2Tree(tc.pre, tc.in) + findFrequentTreeSum(root) + } + } +} diff --git a/Algorithms/0513.find-bottom-left-tree-value/README.md b/Algorithms/0513.find-bottom-left-tree-value/README.md new file mode 100755 index 000000000..d8b01bcc6 --- /dev/null +++ b/Algorithms/0513.find-bottom-left-tree-value/README.md @@ -0,0 +1,41 @@ +# [513. Find Bottom Left Tree Value](https://leetcode.com/problems/find-bottom-left-tree-value/) + +## 题目 + +Given a binary tree, find the leftmost value in the last row of the tree. + +Example 1: + +```text +Input: + + 2 + / \ + 1 3 + +Output: +1 +``` + +Example 2: + +```text +Input: + 1 + / \ + 2 3 + / / \ + 4 5 6 + / + 7 + +Output: +7 +``` + +Note: +You may assume the tree (i.e., the given root node) is not NULL. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0513.find-bottom-left-tree-value/find-bottom-left-tree-value.go b/Algorithms/0513.find-bottom-left-tree-value/find-bottom-left-tree-value.go new file mode 100755 index 000000000..3b6884581 --- /dev/null +++ b/Algorithms/0513.find-bottom-left-tree-value/find-bottom-left-tree-value.go @@ -0,0 +1,27 @@ +package Problem0513 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" +) + +type TreeNode = kit.TreeNode + +func findBottomLeftValue(root *TreeNode) int { + queue := []*TreeNode{root} + + for len(queue) > 0 { + root = queue[0] + queue = queue[1:] + + // 先把 Right 边的节点放入 queue 才能保证 + // 最后剩下的 root 是 bottom left + if root.Right != nil { + queue = append(queue, root.Right) + } + if root.Left != nil { + queue = append(queue, root.Left) + } + } + + return root.Val +} diff --git a/Algorithms/0513.find-bottom-left-tree-value/find-bottom-left-tree-value_test.go b/Algorithms/0513.find-bottom-left-tree-value/find-bottom-left-tree-value_test.go new file mode 100755 index 000000000..6353dbbdb --- /dev/null +++ b/Algorithms/0513.find-bottom-left-tree-value/find-bottom-left-tree-value_test.go @@ -0,0 +1,68 @@ +package Problem0513 + +import ( + "fmt" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + pre, in []int + ans int +}{ + + { + []int{0, -1}, + []int{0, -1}, + -1, + }, + + { + []int{1}, + []int{1}, + 1, + }, + + { + []int{2, 1, 3}, + []int{1, 2, 3}, + 1, + }, + + { + []int{1, 2, 4, 3, 5, 6}, + []int{4, 2, 1, 5, 3, 6}, + 4, + }, + + { + []int{1, 2, 4, 3, 5, 7, 6}, + []int{4, 2, 1, 7, 5, 3, 6}, + 7, + }, + + // 可以有多个 testcase +} + +func Test_findBottomLeftValue(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + root := kit.PreIn2Tree(tc.pre, tc.in) + ast.Equal(tc.ans, findBottomLeftValue(root), "输入:%v", tc) + } +} + +func Benchmark_findBottomLeftValue(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + root := kit.PreIn2Tree(tc.pre, tc.in) + findBottomLeftValue(root) + } + } +} diff --git a/Algorithms/0514.freedom-trail/514.100.png b/Algorithms/0514.freedom-trail/514.100.png new file mode 100644 index 000000000..d398b2112 Binary files /dev/null and b/Algorithms/0514.freedom-trail/514.100.png differ diff --git a/Algorithms/0514.freedom-trail/README.md b/Algorithms/0514.freedom-trail/README.md new file mode 100755 index 000000000..3ae7e2310 --- /dev/null +++ b/Algorithms/0514.freedom-trail/README.md @@ -0,0 +1,36 @@ +# [514. Freedom Trail](https://leetcode.com/problems/freedom-trail/) + +## 题目 + +In the video game Fallout 4, the quest "Road to Freedom" requires players to reach a metal dial called the "Freedom Trail Ring", and use the dial to spell a specific keyword in order to open the door. + +Given a string ring, which represents the code engraved on the outer ring and another string key, which represents the keyword needs to be spelled. You need to find the minimum number of steps in order to spell all the characters in the keyword. + +Initially, the first character of the ring is aligned at 12:00 direction. You need to spell all the characters in the string key one by one by rotating the ring clockwise or anticlockwise to make each character of the string key aligned at 12:00 direction and then by pressing the center button. + +At the stage of rotating the ring to spell the key character key[i]: + +1. You can rotate the ring clockwise or anticlockwise one place, which counts as 1 step. The final purpose of the rotation is to align one of the string ring's characters at the 12:00 direction, where this character must equal to the character key[i]. +1. If the character key[i] has been aligned at the 11:00 direction, you need to press the center button to spell, which also counts as 1 step. After the pressing, you could begin to spell the next character in the key (next stage), otherwise, you've finished all the spelling. + +Example: + +![pic](https://leetcode.com/static/images/problemset/ring.jpg) + +```text +Input: ring = "godding", key = "gd" +Output: 4 +Explanation: For the first key character 'g', since it is already in place, we just need 1 step to spell this character. For the second key character 'd', we need to rotate the ring "godding" anticlockwise by two steps to make it become "ddinggo". Also, we need 1 more step for spelling. So the final output is 4. +``` + +Note: + +1. Length of both ring and key will be in range 1 to 100. +1. There are only lowercase letters in both strings and might be some duplcate characters in both strings. +1. It's guaranteed that string key could always be spelled by rotating the string ring. + +## 解题思路 + +见程序注释 + +![100](514.100.png) \ No newline at end of file diff --git a/Algorithms/0514.freedom-trail/freedom-trail.go b/Algorithms/0514.freedom-trail/freedom-trail.go new file mode 100755 index 000000000..77ec48b6f --- /dev/null +++ b/Algorithms/0514.freedom-trail/freedom-trail.go @@ -0,0 +1,76 @@ +package Problem0514 + +func findRotateSteps(ring string, key string) int { + // m 中记录了每个字符所有出现过的位置 + m := make(map[rune][]int, 26) + for i, r := range ring { + m[r] = append(m[r], i) + } + + // ss 记录了到达同一个字符的各个位置的最佳状态 + // 0123456789 + // 例如, ring = "acbcccccbd", + // key = "ab" 时,0 → 2 是最优解 + // key = "abd" 时,0 → 8 → 9 才是最优解 + // 所以,需要记录达到同一个字符的各个位置的状态 + ss := make([]status, 1, len(ring)) + ss[0] = status{ + index: 0, + steps: 0, + } + + size := len(ring) + + for _, r := range key { + temp := make([]status, len(m[r])) + for i, d := range m[r] { + // 寻找到达 r 字符的 d 位置的 steps 最小的解 + s := fromTo(ss[0], d, size) + for i := 1; i < len(ss); i++ { + // s.d 都是一样的,更新 s.steps即可 + s.steps = min(s.steps, fromTo(ss[i], d, size).steps) + } + temp[i] = s + } + ss = temp + } + + res := ss[0].steps + for i := 1; i < len(ss); i++ { + res = min(res, ss[i].steps) + } + + return res +} + +// status 记录了当前的 12:00 方向对应的 ring 中字符的 index +// 和 +// 已经操作的 steps +type status struct { + index, steps int +} + +// 从 s 状态到转动到 ring 的 d 位置,所生成的新状态 +func fromTo(s status, d, size int) status { + a := min(s.index, d) + b := max(s.index, d) + + return status{ + index: d, + steps: s.steps + min(b-a, size-(b-a)) + 1, // +1 表示按下 + } +} + +func min(a, b int) int { + if a < b { + return a + } + return b +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} diff --git a/Algorithms/0514.freedom-trail/freedom-trail_test.go b/Algorithms/0514.freedom-trail/freedom-trail_test.go new file mode 100755 index 000000000..2c5aad00b --- /dev/null +++ b/Algorithms/0514.freedom-trail/freedom-trail_test.go @@ -0,0 +1,47 @@ +package Problem0514 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + ring string + key string + ans int +}{ + + { + "acbcccccbd", + "abd", + 6, + }, + + { + "godding", + "gd", + 4, + }, + + // 可以有多个 testcase +} + +func Test_findRotateSteps(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findRotateSteps(tc.ring, tc.key), "输入:%v", tc) + } +} + +func Benchmark_findRotateSteps(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findRotateSteps(tc.ring, tc.key) + } + } +} diff --git a/Algorithms/0515.find-largest-value-in-each-tree-row/README.md b/Algorithms/0515.find-largest-value-in-each-tree-row/README.md new file mode 100755 index 000000000..aca5d09fe --- /dev/null +++ b/Algorithms/0515.find-largest-value-in-each-tree-row/README.md @@ -0,0 +1,23 @@ +# [515. Find Largest Value in Each Tree Row](https://leetcode.com/problems/find-largest-value-in-each-tree-row/) + +## 题目 + +You need to find the largest value in each row of a binary tree. + +Example: + +```text +Input: + + 1 + / \ + 3 2 + / \ \ + 5 3 9 + +Output: [1, 3, 9] +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0515.find-largest-value-in-each-tree-row/find-largest-value-in-each-tree-row.go b/Algorithms/0515.find-largest-value-in-each-tree-row/find-largest-value-in-each-tree-row.go new file mode 100755 index 000000000..121653bd0 --- /dev/null +++ b/Algorithms/0515.find-largest-value-in-each-tree-row/find-largest-value-in-each-tree-row.go @@ -0,0 +1,47 @@ +package Problem0515 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" + "math" +) + +type TreeNode = kit.TreeNode + +func largestValues(root *TreeNode) []int { + res := []int{} + if root == nil { + return res + } + + // 进行 BFS + queue := make([]*TreeNode, 1, 1024) + queue[0] = root + n := 1 // 同一个 row 剩余的 node 个数 + max := math.MinInt64 + for len(queue) > 0 { + // 取出当前 row 的 node + node := queue[0] + queue = queue[1:] + n-- + // 更新当前行的 max + if max < node.Val { + max = node.Val + } + // 把下一个 row 的节点,添加入 queue + if node.Left != nil { + queue = append(queue, node.Left) + } + if node.Right != nil { + queue = append(queue, node.Right) + } + // 当同一个 row 的 node 检查完毕后, + // 保存数据,并开启新的一轮检查 + if n == 0 { + n = len(queue) + res = append(res, max) + max = math.MinInt64 + } + } + + return res +} diff --git a/Algorithms/0515.find-largest-value-in-each-tree-row/find-largest-value-in-each-tree-row_test.go b/Algorithms/0515.find-largest-value-in-each-tree-row/find-largest-value-in-each-tree-row_test.go new file mode 100755 index 000000000..d5cd7c649 --- /dev/null +++ b/Algorithms/0515.find-largest-value-in-each-tree-row/find-largest-value-in-each-tree-row_test.go @@ -0,0 +1,50 @@ +package Problem0515 + +import ( + "fmt" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + pre, in []int + ans []int +}{ + + { + []int{}, + []int{}, + []int{}, + }, + + { + []int{1, 3, 5, 6, 2, 9}, + []int{5, 3, 6, 1, 2, 9}, + []int{1, 3, 9}, + }, + + // 可以有多个 testcase +} + +func Test_largestValues(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + root := kit.PreIn2Tree(tc.pre, tc.in) + ast.Equal(tc.ans, largestValues(root), "输入:%v", tc) + } +} + +func Benchmark_largestValues(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + root := kit.PreIn2Tree(tc.pre, tc.in) + largestValues(root) + } + } +} diff --git a/Algorithms/0516.longest-palindromic-subsequence/README.md b/Algorithms/0516.longest-palindromic-subsequence/README.md new file mode 100755 index 000000000..49aede2a1 --- /dev/null +++ b/Algorithms/0516.longest-palindromic-subsequence/README.md @@ -0,0 +1,33 @@ +# [516. Longest Palindromic Subsequence](https://leetcode.com/problems/longest-palindromic-subsequence/) + +## 题目 + +Given a string s, find the longest palindromic subsequence's length in s. You may assume that the maximum length of s is 1000. + +Example 1: + +```text +Input: +"bbbab" + +Output: +4 + +One possible longest palindromic subsequence is "bbbb". +``` + +Example 2: + +```text +Input: +"cbbd" + +Output: +2 + +One possible longest palindromic subsequence is "bb". +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0516.longest-palindromic-subsequence/longest-palindromic-subsequence.go b/Algorithms/0516.longest-palindromic-subsequence/longest-palindromic-subsequence.go new file mode 100755 index 000000000..8e1215af6 --- /dev/null +++ b/Algorithms/0516.longest-palindromic-subsequence/longest-palindromic-subsequence.go @@ -0,0 +1,34 @@ +package Problem0516 + +func longestPalindromeSubseq(s string) int { + n := len(s) + + // dp[i][j] 表示 s[i:j+1] 中最长的回文子字符串 + dp := make([][]int, n) + for i := range dp { + dp[i] = make([]int, n) + dp[i][i] = 1 + } + + for Len := 2; Len <= n; Len++ { + for i := 0; i+Len-1 < n; i++ { + j := i + Len - 1 + if s[i] == s[j] { + // 首位相等,则在原先的长度长 +2 + dp[i][j] = dp[i+1][j-1] + 2 + } else { + // 首位不等,则在等于去除首尾后的较长者 + dp[i][j] = max(dp[i+1][j], dp[i][j-1]) + } + } + } + + return dp[0][n-1] +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} diff --git a/Algorithms/0516.longest-palindromic-subsequence/longest-palindromic-subsequence_test.go b/Algorithms/0516.longest-palindromic-subsequence/longest-palindromic-subsequence_test.go new file mode 100755 index 000000000..2a888afb8 --- /dev/null +++ b/Algorithms/0516.longest-palindromic-subsequence/longest-palindromic-subsequence_test.go @@ -0,0 +1,44 @@ +package Problem0516 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + ans int +}{ + + { + "bbbab", + 4, + }, + + { + "cbbd", + 2, + }, + + // 可以有多个 testcase +} + +func Test_longestPalindromeSubseq(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, longestPalindromeSubseq(tc.s), "输入:%v", tc) + } +} + +func Benchmark_longestPalindromeSubseq(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + longestPalindromeSubseq(tc.s) + } + } +} diff --git a/Algorithms/0517.super-washing-machines/README.md b/Algorithms/0517.super-washing-machines/README.md new file mode 100755 index 000000000..4bcca1af9 --- /dev/null +++ b/Algorithms/0517.super-washing-machines/README.md @@ -0,0 +1,54 @@ +# [517. Super Washing Machines](https://leetcode.com/problems/super-washing-machines/) + +## 题目 + +You have n super washing machines on a line. Initially, each washing machine has some dresses or is empty. + +For each move, you could choose any m (1 ≤ m ≤ n) washing machines, and pass one dress of each washing machine to one of its adjacent washing machines at the same time . + +Given an integer array representing the number of dresses in each washing machine from left to right on the line, you should find the minimum number of moves to make all the washing machines have the same number of dresses. If it is not possible to do it, return -1. + +Example1 + +```text +Input: [1,0,5] + +Output: 3 + +Explanation: +1st move: 1 0 <-- 5 => 1 1 4 +2nd move: 1 <-- 1 <-- 4 => 2 1 3 +3rd move: 2 1 <-- 3 => 2 2 2 +``` + +Example2 + +```text +Input: [0,3,0] + +Output: 2 + +Explanation: +1st move: 0 <-- 3 0 => 1 2 0 +2nd move: 1 2 --> 0 => 1 1 1 +``` + +Example3 + +```text +Input: [0,2,0] + +Output: -1 + +Explanation: +It's impossible to make all the three washing machines have the same number of dresses. +``` + +Note: + +1. The range of n is [1, 10000]. +1. The range of dresses number in a super washing machine is [0, 1e5]. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0517.super-washing-machines/super-washing-machines.go b/Algorithms/0517.super-washing-machines/super-washing-machines.go new file mode 100755 index 000000000..808ad1284 --- /dev/null +++ b/Algorithms/0517.super-washing-machines/super-washing-machines.go @@ -0,0 +1,42 @@ +package Problem0517 + +func findMinMoves(machines []int) int { + ok, avg := isOK(machines) + if !ok { + return -1 + } + + cnt := 0 + res := 0 + + for _, m := range machines { + cnt += m - avg + res = max(max(res, abs(cnt)), m-avg) + } + // 解题思路 + // https://leetcode.com/problems/super-washing-machines/discuss/ + + return res +} + +func abs(a int) int { + if a < 0 { + return -a + } + return a +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} + +func isOK(machines []int) (bool, int) { + sum := 0 + for _, m := range machines { + sum += m + } + return sum%len(machines) == 0, sum / len(machines) +} diff --git a/Algorithms/0517.super-washing-machines/super-washing-machines_test.go b/Algorithms/0517.super-washing-machines/super-washing-machines_test.go new file mode 100755 index 000000000..4cd83e798 --- /dev/null +++ b/Algorithms/0517.super-washing-machines/super-washing-machines_test.go @@ -0,0 +1,64 @@ +package Problem0517 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + machines []int + ans int +}{ + + { + []int{6, 3, 6}, + 1, + }, + + { + []int{4, 0, 0, 4}, + 2, + }, + + { + []int{1, 0, 5, 7, 8, 9}, + 9, + }, + + { + []int{1, 0, 5}, + 3, + }, + + { + []int{0, 3, 0}, + 2, + }, + + { + []int{0, 2, 0}, + -1, + }, + + // 可以有多个 testcase +} + +func Test_findMinMoves(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findMinMoves(tc.machines), "输入:%v", tc) + } +} + +func Benchmark_findMinMoves(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findMinMoves(tc.machines) + } + } +} diff --git a/Algorithms/0520.detect-capital/README.md b/Algorithms/0520.detect-capital/README.md new file mode 100755 index 000000000..1aa1eed46 --- /dev/null +++ b/Algorithms/0520.detect-capital/README.md @@ -0,0 +1,34 @@ +# [520. Detect Capital](https://leetcode.com/problems/detect-capital/) + +## 题目 + +Given a word, you need to judge whether the usage of capitals in it is right or not. + +We define the usage of capitals in a word to be right when one of the following cases holds: + +1. All letters in this word are capitals, like "USA". +1. All letters in this word are not capitals, like "leetcode". +1. Only the first letter in this word is capital if it has more than one letter, like "Google". + +Otherwise, we define that this word doesn't use capitals in a right way. + +Example 1: + +```text +Input: "USA" +Output: True +``` + +Example 2: + +```text +Input: "FlaG" +Output: False +``` + +Note: +The input will be a non-empty word consisting of uppercase and lowercase latin letters. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0520.detect-capital/detect-capital.go b/Algorithms/0520.detect-capital/detect-capital.go new file mode 100755 index 000000000..1ba2793c7 --- /dev/null +++ b/Algorithms/0520.detect-capital/detect-capital.go @@ -0,0 +1,19 @@ +package Problem0520 + +func detectCapitalUse(word string) bool { + head := word[:1] + tail := word[1:] + if isIn(head, 'A', 'Z') { + return isIn(tail, 'A', 'Z') || isIn(tail, 'a', 'z') + } + return isIn(tail, 'a', 'z') +} + +func isIn(s string, first, last byte) bool { + for i := range s { + if !(first <= s[i] && s[i] <= last) { + return false + } + } + return true +} diff --git a/Algorithms/0520.detect-capital/detect-capital_test.go b/Algorithms/0520.detect-capital/detect-capital_test.go new file mode 100755 index 000000000..cb2e95532 --- /dev/null +++ b/Algorithms/0520.detect-capital/detect-capital_test.go @@ -0,0 +1,54 @@ +package Problem0520 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + word string + ans bool +}{ + + { + "leetcode", + true, + }, + + { + "USA", + true, + }, + + { + "aG", + false, + }, + + { + "FlaG", + false, + }, + + // 可以有多个 testcase +} + +func Test_detectCapitalUse(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, detectCapitalUse(tc.word), "输入:%v", tc) + } +} + +func Benchmark_detectCapitalUse(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + detectCapitalUse(tc.word) + } + } +} diff --git a/Algorithms/0521.longest-uncommon-subsequence-i/README.md b/Algorithms/0521.longest-uncommon-subsequence-i/README.md new file mode 100755 index 000000000..01aaf8fde --- /dev/null +++ b/Algorithms/0521.longest-uncommon-subsequence-i/README.md @@ -0,0 +1,28 @@ +# [521. Longest Uncommon Subsequence I](https://leetcode.com/problems/longest-uncommon-subsequence-i/) + +## 题目 + +Given a group of two strings, you need to find the longest uncommon subsequence of this group of two strings. + +The longest uncommon subsequence is defined as the longest subsequence of one of these strings and this subsequence should not be any subsequence of the other strings. + +A subsequence is a sequence that can be derived from one sequence by deleting some characters without changing the order of the remaining elements. Trivially, any string is a subsequence of itself and an empty string is a subsequence of any string. + +The input will be two strings, and the output needs to be the length of the longest uncommon subsequence. If the longest uncommon subsequence doesn't exist, return -1. + +Example 1: + +```text +Input: "aba", "cdc" +Output: 3 +Explanation: The longest uncommon subsequence is "aba" (or "cdc"), because "aba" is a subsequence of "aba", but not a subsequence of any other strings in the group of two strings. +``` + +Note: + +1. Both strings' lengths will not exceed 100. +1. Only letters from a ~ z will appear in input strings. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0521.longest-uncommon-subsequence-i/longest-uncommon-subsequence-i.go b/Algorithms/0521.longest-uncommon-subsequence-i/longest-uncommon-subsequence-i.go new file mode 100755 index 000000000..e7f043d4d --- /dev/null +++ b/Algorithms/0521.longest-uncommon-subsequence-i/longest-uncommon-subsequence-i.go @@ -0,0 +1,15 @@ +package Problem0521 + +func findLUSlength(a string, b string) int { + if a == b { + return -1 + } + return max(len(a), len(b)) +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} diff --git a/Algorithms/0521.longest-uncommon-subsequence-i/longest-uncommon-subsequence-i_test.go b/Algorithms/0521.longest-uncommon-subsequence-i/longest-uncommon-subsequence-i_test.go new file mode 100755 index 000000000..7d7166097 --- /dev/null +++ b/Algorithms/0521.longest-uncommon-subsequence-i/longest-uncommon-subsequence-i_test.go @@ -0,0 +1,59 @@ +package Problem0521 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + a string + b string + ans int +}{ + + { + "cdc", + "cdc", + -1, + }, + + { + "cdc", + "abba", + 4, + }, + + { + "abba", + "cdc", + 4, + }, + + { + "aba", + "cdc", + 3, + }, + + // 可以有多个 testcase +} + +func Test_findLUSlength(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findLUSlength(tc.a, tc.b), "输入:%v", tc) + } +} + +func Benchmark_findLUSlength(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findLUSlength(tc.a, tc.b) + } + } +} diff --git a/Algorithms/0522.longest-uncommon-subsequence-ii/README.md b/Algorithms/0522.longest-uncommon-subsequence-ii/README.md new file mode 100755 index 000000000..56a619953 --- /dev/null +++ b/Algorithms/0522.longest-uncommon-subsequence-ii/README.md @@ -0,0 +1,25 @@ +# [522. Longest Uncommon Subsequence II](https://leetcode.com/problems/longest-uncommon-subsequence-ii/) + +## 题目 + +Given a list of strings, you need to find the longest uncommon subsequence among them. The longest uncommon subsequence is defined as the longest subsequence of one of these strings and this subsequence should not be any subsequence of the other strings. + +A subsequence is a sequence that can be derived from one sequence by deleting some characters without changing the order of the remaining elements. Trivially, any string is a subsequence of itself and an empty string is a subsequence of any string. + +The input will be a list of strings, and the output needs to be the length of the longest uncommon subsequence. If the longest uncommon subsequence doesn't exist, return -1. + +Example 1: + +```text +Input: "aba", "cdc", "eae" +Output: 3 +``` + +Note: + +1. All the given strings' lengths will not exceed 10. +1. The length of the given list will be in the range of [2, 50]. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0522.longest-uncommon-subsequence-ii/longest-uncommon-subsequence-ii.go b/Algorithms/0522.longest-uncommon-subsequence-ii/longest-uncommon-subsequence-ii.go new file mode 100755 index 000000000..9edc5da52 --- /dev/null +++ b/Algorithms/0522.longest-uncommon-subsequence-ii/longest-uncommon-subsequence-ii.go @@ -0,0 +1,72 @@ +package Problem0522 + +import ( + "sort" +) + +func findLUSlength(strs []string) int { + // 统计每个单词出现的次数 + count := make(map[string]int, len(strs)) + for _, s := range strs { + count[s]++ + } + + // 让 strs 中的每个单词只出现一次 + // 这样的话,后面检查是否为子字符串的时候,可以避免重复检查 + strs = strs[:0] + for s := range count { + strs = append(strs, s) + } + + // 按照字符串的长度进行降序排列 + // 后面检查是否为子字符串的时候,不用每个都检查一遍 + sort.Sort(stringSlice(strs)) + + for i, s := range strs { + // 筛掉重复的字符串 + if count[s] > 1 { + continue + } + // s 必须不是比 Ta 长的字符串的子字符串才能是要找的解答 + if !isSubOf(s, strs[:i]) { + return len(s) + } + } + + return -1 +} + +// 如果 s 是 ss 中某一个比 s 长的字符串的子字符串,返回 true +// ss 是排序过的 +func isSubOf(s string, ss []string) bool { + for i := range ss { + if isSub(s, ss[i]) { + return true + } + } + return false +} + +// 如果 a 是 b 的子字符串,返回 true +func isSub(a, b string) bool { + aLen, bLen := len(a), len(b) + i, j := 0, 0 + + for i < aLen && j < bLen { + if a[i] == b[j] { + i++ + } + j++ + } + + return i == aLen +} + +// stringSlice 实现了 sort.Interface 接口 +type stringSlice []string + +func (ss stringSlice) Len() int { return len(ss) } + +func (ss stringSlice) Less(i, j int) bool { return len(ss[i]) > len(ss[j]) } + +func (ss stringSlice) Swap(i, j int) { ss[i], ss[j] = ss[j], ss[i] } diff --git a/Algorithms/0522.longest-uncommon-subsequence-ii/longest-uncommon-subsequence-ii_test.go b/Algorithms/0522.longest-uncommon-subsequence-ii/longest-uncommon-subsequence-ii_test.go new file mode 100755 index 000000000..73e761f28 --- /dev/null +++ b/Algorithms/0522.longest-uncommon-subsequence-ii/longest-uncommon-subsequence-ii_test.go @@ -0,0 +1,69 @@ +package Problem0522 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + strs []string + ans int +}{ + + { + []string{"aabbcc", "aabbcc", "c", "e", "aabbcd"}, + 6, + }, + + { + []string{"aaa", "aaa", "bb", "c", "c", "d", "d"}, + 2, + }, + + { + []string{"a", "b", "c", "d", "e", "f", "a", "b", "c", "d", "e", "f"}, + -1, + }, + + { + []string{"aabbcc", "aabbcc", "bc", "bcc", "aabbccc"}, + 7, + }, + + { + []string{"abcd", "abcd", "abc", "bc"}, + -1, + }, + + { + []string{"abcd", "abcd", "abc", "cde"}, + 3, + }, + + { + []string{"aba", "cdc", "eae"}, + 3, + }, + + // 可以有多个 testcase +} + +func Test_findLUSlength(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findLUSlength(tc.strs), "输入:%v", tc) + } +} + +func Benchmark_findLUSlength(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findLUSlength(tc.strs) + } + } +} diff --git a/Algorithms/0523.continuous-subarray-sum/README.md b/Algorithms/0523.continuous-subarray-sum/README.md new file mode 100755 index 000000000..b8ca023ae --- /dev/null +++ b/Algorithms/0523.continuous-subarray-sum/README.md @@ -0,0 +1,49 @@ +# [523. Continuous Subarray Sum](https://leetcode.com/problems/continuous-subarray-sum/) + +## 题目 + +Given a list of non-negative numbers and a target integer k, write a function to check if the array has a continuous subarray of size at least 2 that sums up to the multiple of k, that is, sums up to n*k where n is also an integer. + +Example 1: + +```text +Input: [23, 2, 4, 6, 7], k=6 +Output: True +Explanation: Because [2, 4] is a continuous subarray of size 2 and sums up to 6. +``` + +Example 2: + +```text +Input: [23, 2, 6, 4, 7], k=6 +Output: True +Explanation: Because [23, 2, 6, 4, 7] is an continuous subarray of size 5 and sums up to 42. +``` + +Note: + +1. The length of the array won't exceed 10,000. +1. You may assume the sum of all the numbers is in the range of a signed 32-bit integer. + +## 解题思路 + +[来源:LeetCode 523. Continuous Subarray Sum 解题报告](http://blog.csdn.net/camellhf/article/details/58590647) +在讨论里有个大神给出了时间复杂度是O(n)的解法,他的思路非常巧妙,用了数学上的知识,下面给出他的解法的原理: +假设: + +a[i]+a[i+1]+...+a[j]=n1k+q; + +如果存在一个n + +n>j且a[i]+a[i+1]+...+a[j]+...+a[n]=n2k+q; + +那么 + +a[j+1]+...+a[n]=(n2−n1)k + +因此利用这一结果,可以从序列第一个元素开始遍历,不断累加上当前的元素,并求出当前和除以k后的余数,用一个映射记录该余数出现时的下标,如果同一个余数出现了两次,并且两次出现的下标之差大于1,那么就表示在这两个坐标之间的元素之和是k的倍数,因此就可以返回true,否则最后返回false。 + +需要注意的两个地方: + +1. k可能取0,所以只有当k不为0时才对当前的和求余,同时针对于nums = [0, 0], k = 0的情况,需要添加一个初始映射(0, -1)来确保结果的正确。 +1. 下标之差至少为2才算是正确的情况,因为题目要求子序列长度至少为2,以上面的例子就是n至少等于j+2。 \ No newline at end of file diff --git a/Algorithms/0523.continuous-subarray-sum/continuous-subarray-sum.go b/Algorithms/0523.continuous-subarray-sum/continuous-subarray-sum.go new file mode 100755 index 000000000..a06d1495a --- /dev/null +++ b/Algorithms/0523.continuous-subarray-sum/continuous-subarray-sum.go @@ -0,0 +1,37 @@ +package Problem0523 + +func checkSubarraySum(nums []int, k int) bool { + n := len(nums) + + // index 中记录了,每个不同的余数,最早出现的位置 + index := make(map[int]int, n) + // index[0] = -1 是为了以下情况准备的 + // { + // []int{0, 0}, + // 0, + // true, + // }, + index[0] = -1 + + sum := 0 + + for i := 0; i < n; i++ { + sum += nums[i] + if k != 0 { + sum %= k + } + + idx, ok := index[sum] + if ok { + if i-idx > 1 { + return true + } + } else { + // 这个 if - else 结构确保了 index 中记录的值是最早出现的 + index[sum] = i + } + + } + + return false +} diff --git a/Algorithms/0523.continuous-subarray-sum/continuous-subarray-sum_test.go b/Algorithms/0523.continuous-subarray-sum/continuous-subarray-sum_test.go new file mode 100755 index 000000000..4fae0c196 --- /dev/null +++ b/Algorithms/0523.continuous-subarray-sum/continuous-subarray-sum_test.go @@ -0,0 +1,71 @@ +package Problem0523 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + k int + ans bool +}{ + + { + []int{1, 2}, + 4, + false, + }, + + { + []int{0, 0}, + 0, + true, + }, + + { + []int{23, 2, 4, 6, 7}, + 6, + true, + }, + + { + []int{1, 2, 3, 4}, + 5, + true, + }, + + { + []int{23, 2, 6, 4, 7}, + 6, + true, + }, + + { + []int{23, 2, 6, 4, 7}, + 42, + true, + }, + + // 可以有多个 testcase +} + +func Test_checkSubarraySum(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, checkSubarraySum(tc.nums, tc.k), "输入:%v", tc) + } +} + +func Benchmark_checkSubarraySum(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + checkSubarraySum(tc.nums, tc.k) + } + } +} diff --git a/Algorithms/0524.longest-word-in-dictionary-through-deleting/README.md b/Algorithms/0524.longest-word-in-dictionary-through-deleting/README.md new file mode 100755 index 000000000..ed86ea45e --- /dev/null +++ b/Algorithms/0524.longest-word-in-dictionary-through-deleting/README.md @@ -0,0 +1,35 @@ +# [524. Longest Word in Dictionary through Deleting](https://leetcode.com/problems/longest-word-in-dictionary-through-deleting/) + +## 题目 + +Given a string and a string dictionary, find the longest string in the dictionary that can be formed by deleting some characters of the given string. If there are more than one possible results, return the longest word with the smallest lexicographical order. If there is no possible result, return the empty string. + +Example 1: + +```text +Input: +s = "abpcplea", d = ["ale","apple","monkey","plea"] + +Output: +"apple" +``` + +Example 2: + +```text +Input: +s = "abpcplea", d = ["a","b","c"] + +Output: +"a" +``` + +Note: + +1. All the strings in the input will only contain lower-case letters. +1. The size of the dictionary won't exceed 1,000. +1. The length of all the strings in the input won't exceed 1,000. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0524.longest-word-in-dictionary-through-deleting/longest-word-in-dictionary-through-deleting.go b/Algorithms/0524.longest-word-in-dictionary-through-deleting/longest-word-in-dictionary-through-deleting.go new file mode 100755 index 000000000..3e28660ca --- /dev/null +++ b/Algorithms/0524.longest-word-in-dictionary-through-deleting/longest-word-in-dictionary-through-deleting.go @@ -0,0 +1,45 @@ +package Problem0524 + +import ( + "sort" +) + +func findLongestWord(s string, d []string) string { + // 排序后,第一个符合条件的字符串,就是答案 + sort.Sort(stringSlice(d)) + for i := range d { + if isSub(s, d[i]) { + return d[i] + } + } + return "" +} + +// stringSlice 实现了 sort.Interface 接口 +type stringSlice []string + +func (s stringSlice) Len() int { return len(s) } + +func (s stringSlice) Less(i, j int) bool { + if len(s[i]) == len(s[j]) { + return s[i] < s[j] + } + return len(s[i]) > len(s[j]) +} + +func (s stringSlice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } + +// return true if sub is sub of s +func isSub(s, sub string) bool { + if len(s) < len(sub) { + return false + } + i, j := 0, 0 + for i < len(s) && j < len(sub) { + if s[i] == sub[j] { + j++ + } + i++ + } + return j == len(sub) +} diff --git a/Algorithms/0524.longest-word-in-dictionary-through-deleting/longest-word-in-dictionary-through-deleting_test.go b/Algorithms/0524.longest-word-in-dictionary-through-deleting/longest-word-in-dictionary-through-deleting_test.go new file mode 100755 index 000000000..b77701ad9 --- /dev/null +++ b/Algorithms/0524.longest-word-in-dictionary-through-deleting/longest-word-in-dictionary-through-deleting_test.go @@ -0,0 +1,59 @@ +package Problem0524 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + d []string + ans string +}{ + + { + "abpcplea", + []string{"ale", "apple", "monkey", "plea"}, + "apple", + }, + + { + "a", + []string{"bc", "c"}, + "", + }, + + { + "a", + []string{"a", "bc", "c"}, + "a", + }, + + { + "abpcplea", + []string{"a", "b", "c"}, + "a", + }, + + // 可以有多个 testcase +} + +func Test_findLongestWord(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findLongestWord(tc.s, tc.d), "输入:%v", tc) + } +} + +func Benchmark_findLongestWord(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findLongestWord(tc.s, tc.d) + } + } +} diff --git a/Algorithms/0525.contiguous-array/README.md b/Algorithms/0525.contiguous-array/README.md new file mode 100755 index 000000000..c216f2a24 --- /dev/null +++ b/Algorithms/0525.contiguous-array/README.md @@ -0,0 +1,27 @@ +# [525. Contiguous Array](https://leetcode.com/problems/contiguous-array/) + +## 题目 + +Given a binary array, find the maximum length of a contiguous subarray with equal number of 0 and 1. + +Example 1: + +```text +Input: [0,1] +Output: 2 +Explanation: [0, 1] is the longest contiguous subarray with equal number of 0 and 1. +``` + +Example 2: + +```text +Input: [0,1,0] +Output: 2 +Explanation: [0, 1] (or [1, 0]) is a longest contiguous subarray with equal number of 0 and 1. +``` + +Note: The length of the given binary array will not exceed 50,000. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0525.contiguous-array/contiguous-array.go b/Algorithms/0525.contiguous-array/contiguous-array.go new file mode 100755 index 000000000..56f46afdb --- /dev/null +++ b/Algorithms/0525.contiguous-array/contiguous-array.go @@ -0,0 +1,31 @@ +package Problem0525 + +func findMaxLength(nums []int) int { + delta := make(map[int]int, len(nums)/2) + delta[0] = -1 + + ones, zeros, res := 0, 0, 0 + + for i := range nums { + if nums[i] == 1 { + ones++ + } else { + zeros++ + } + + if j, ok := delta[ones-zeros]; ok { + res = max(res, i-j) + } else { + delta[ones-zeros] = i + } + } + + return res +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} diff --git a/Algorithms/0525.contiguous-array/contiguous-array_test.go b/Algorithms/0525.contiguous-array/contiguous-array_test.go new file mode 100755 index 000000000..bae4a3aff --- /dev/null +++ b/Algorithms/0525.contiguous-array/contiguous-array_test.go @@ -0,0 +1,48 @@ +package Problem0525 + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans int +}{ + + { +[]int { 0,1,0,1,0,1,0,1,0,0,1,1,1,0,1,1,0,0,1,1,1,1,1,0,1,1,0,0,1,0,1,1,0,0,0,1,0,0,0,1,1,0,1,0,1,1,0,1,0,0,0,0,1,1,0,1,0,1,1,1,1,0,0,0,1,1,1,0,1,1,1,0,1,0,1,0,1,0,0,1,0,0,0,0,0,0,1,0,0,1,1,1,1,0,0,0,1,0,0,1,1,1,1,0,0,1,0,0,0,0,0,1,0,1,0,1,1,1,0,1,1,0,0,0,0,1,0,0,1,0,0,0,0,0,1,0,0,1,1,0,1,0,1,0,0,0,1,1,0,1,1,0,0,0,1,1,1,1,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1,1,1,0,1,0,1,0,0,0,1,0,0,0,1,0,1,1,0,1,0,0,0,0,0,1,0,0,0,1,0,0,1,1,0,1,0,0,0,1,0,0,0,0,0,1,0,1,1,1,0,0,0,0,1,1,1,0,1,0,1,1,0,1,1,0,1,1,1,1,0,0,1,1,1,0,1,0,0,1,0,0,0,1,1,0,1,0,0,0,0,1,1,1,1,0,1,0,1,1,1,1,1,1,0,1,0,1,1,0,0,1,1,1,0,1,0,1,1,1,0,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,0,1,1,0,1,1,1,1,1,1,1,0,0,1,0,0,1,0,1,0,1,1,0,1,0,1,0,0,0,0,1,1,0,0,1,1,1,1,1,1,0 }, + 17698, + }, + + { + []int{0, 1}, + 2, + }, + + { + []int{0, 1, 0}, + 2, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + // fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findMaxLength(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findMaxLength(tc.nums) + } + } +} diff --git a/Algorithms/0529.minesweeper/README.md b/Algorithms/0529.minesweeper/README.md new file mode 100755 index 000000000..8e57bcf38 --- /dev/null +++ b/Algorithms/0529.minesweeper/README.md @@ -0,0 +1,73 @@ +# [529. Minesweeper](https://leetcode.com/problems/minesweeper/) + +## 题目 + +Let's play the minesweeper game (Wikipedia, online game)! + +You are given a 2D char matrix representing the game board. 'M' represents an unrevealed mine, 'E' represents an unrevealed empty square, 'B' represents a revealed blank square that has no adjacent (above, below, left, right, and all 4 diagonals) mines, digit ('1' to '8') represents how many mines are adjacent to this revealed square, and finally 'X' represents a revealed mine. + +Now given the next click position (row and column indices) among all the unrevealed squares ('M' or 'E'), return the board after revealing this position according to the following rules: + +1. If a mine ('M') is revealed, then the game is over - change it to 'X'. +1. If an empty square ('E') with no adjacent mines is revealed, then change it to revealed blank ('B') and all of its adjacent unrevealed squares should be revealed recursively. +1. If an empty square ('E') with at least one adjacent mine is revealed, then change it to a digit ('1' to '8') representing the number of adjacent mines. +1. Return the board when no more squares will be revealed. + +Example 1: + +```text +Input: + +[['E', 'E', 'E', 'E', 'E'], + ['E', 'E', 'M', 'E', 'E'], + ['E', 'E', 'E', 'E', 'E'], + ['E', 'E', 'E', 'E', 'E']] + +Click : [3,0] + +Output: + +[['B', '1', 'E', '1', 'B'], + ['B', '1', 'M', '1', 'B'], + ['B', '1', '1', '1', 'B'], + ['B', 'B', 'B', 'B', 'B']] +``` + +Explanation: + +![p1](https://leetcode.com/static/images/problemset/minesweeper_example_1.png) + +Example 2: + +```text +Input: + +[['B', '1', 'E', '1', 'B'], + ['B', '1', 'M', '1', 'B'], + ['B', '1', '1', '1', 'B'], + ['B', 'B', 'B', 'B', 'B']] + +Click : [1,2] + +Output: + +[['B', '1', 'E', '1', 'B'], + ['B', '1', 'X', '1', 'B'], + ['B', '1', '1', '1', 'B'], + ['B', 'B', 'B', 'B', 'B']] +``` + +Explanation: + +![p2](https://leetcode.com/static/images/problemset/minesweeper_example_2.png) + +Note: + +1. The range of the input matrix's height and width is [1,50]. +1. The click position will only be an unrevealed square ('M' or 'E'), which also means the input board contains at least one clickable square. +1. The input board won't be a stage when game is over (some mines have been revealed). +1. For simplicity, not mentioned rules should be ignored in this problem. For example, you don't need to reveal all the unrevealed mines when the game is over, consider any cases that you will win the game or flag any squares. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0529.minesweeper/minesweeper.go b/Algorithms/0529.minesweeper/minesweeper.go new file mode 100755 index 000000000..7edad1871 --- /dev/null +++ b/Algorithms/0529.minesweeper/minesweeper.go @@ -0,0 +1,77 @@ +package Problem0529 + +var dx = []int{-1, -1, -1, 0, 0, 1, 1, 1} +var dy = []int{-1, 0, 1, -1, 1, -1, 0, 1} + +func updateBoard(board [][]byte, click []int) [][]byte { + x, y := click[0], click[1] + + // 如果点击的是 'M' 点,修改后,可以直接返回 + if board[x][y] == 'M' { + board[x][y] = 'X' + return board + } + + return bfs(board, x, y) +} + +// 如果 (x,y) 点是 'E' 点,则修改所有与 (x,y) 相邻的 'E',并返回修改后的 board +// 使用 bfs 搜索 +func bfs(board [][]byte, x, y int) [][]byte { + m, n := len(board), len(board[0]) + isAdded := make([]bool, m*n) + + xs := make([]int, 1, m*n) + ys := make([]int, 1, m*n) + xs[0] = x + ys[0] = y + isAdded[x*n+y] = true + + for len(xs) > 0 { + x = xs[0] + y = ys[0] + xs = xs[1:] + ys = ys[1:] + + bombs := getBumbs(board, x, y) + + if bombs > 0 { + board[x][y] = byte(bombs) + '0' + continue + } + + board[x][y] = 'B' + + // 把 (x,y) 周围的 'E' 点,放入队列 + for k := 0; k < 8; k++ { + i := x + dx[k] + j := y + dy[k] + if 0 <= i && i < m && + 0 <= j && j < n && + board[i][j] == 'E' && + !isAdded[i*n+j] { + xs = append(xs, i) + ys = append(ys, j) + isAdded[i*n+j] = true + } + } + } + + return board +} + +// 获取 (x,y) 点周围的炸弹个数 +func getBumbs(board [][]byte, x, y int) int { + m, n := len(board), len(board[0]) + bombs := 0 + for k := 0; k < 8; k++ { + i := x + dx[k] + j := y + dy[k] + if 0 <= i && i < m && + 0 <= j && j < n && + board[i][j] == 'M' { + bombs++ + } + } + return bombs +} diff --git a/Algorithms/0529.minesweeper/minesweeper_test.go b/Algorithms/0529.minesweeper/minesweeper_test.go new file mode 100755 index 000000000..8e3a96650 --- /dev/null +++ b/Algorithms/0529.minesweeper/minesweeper_test.go @@ -0,0 +1,63 @@ +package Problem0529 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + board [][]byte + click []int + ans [][]byte +}{ + + { + [][]byte{ + {'E', 'E', 'E', 'E', 'E'}, + {'E', 'E', 'M', 'E', 'E'}, + {'E', 'E', 'E', 'E', 'E'}, + {'E', 'E', 'E', 'E', 'E'}}, + []int{3, 0}, + [][]byte{ + {'B', '1', 'E', '1', 'B'}, + {'B', '1', 'M', '1', 'B'}, + {'B', '1', '1', '1', 'B'}, + {'B', 'B', 'B', 'B', 'B'}}, + }, + + { + [][]byte{ + {'B', '1', 'E', '1', 'B'}, + {'B', '1', 'M', '1', 'B'}, + {'B', '1', '1', '1', 'B'}, + {'B', 'B', 'B', 'B', 'B'}}, + []int{1, 2}, + [][]byte{ + {'B', '1', 'E', '1', 'B'}, + {'B', '1', 'X', '1', 'B'}, + {'B', '1', '1', '1', 'B'}, + {'B', 'B', 'B', 'B', 'B'}}, + }, + + // 可以有多个 testcase +} + +func Test_updateBoard(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, updateBoard(tc.board, tc.click), "输入:%v", tc) + } +} + +func Benchmark_updateBoard(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + updateBoard(tc.board, tc.click) + } + } +} diff --git a/Algorithms/0530.minimum-absolute-difference-in-bst/README.md b/Algorithms/0530.minimum-absolute-difference-in-bst/README.md new file mode 100755 index 000000000..3cc70c3e4 --- /dev/null +++ b/Algorithms/0530.minimum-absolute-difference-in-bst/README.md @@ -0,0 +1,30 @@ +# [530. Minimum Absolute Difference in BST](https://leetcode.com/problems/minimum-absolute-difference-in-bst/) + +## 题目 + +Given a binary search tree with non-negative values, find the minimum absolute difference between values of any two nodes. + +Example: + +```text +Input: + + 1 + \ + 3 + / + 2 + +Output: +1 + +Explanation: +The minimum absolute difference is 1, which is the difference between 2 and 1 (or between 2 and 3). +``` + +Note: +There are at least two nodes in this BST. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0530.minimum-absolute-difference-in-bst/minimum-absolute-difference-in-bst.go b/Algorithms/0530.minimum-absolute-difference-in-bst/minimum-absolute-difference-in-bst.go new file mode 100755 index 000000000..4ae13f4a6 --- /dev/null +++ b/Algorithms/0530.minimum-absolute-difference-in-bst/minimum-absolute-difference-in-bst.go @@ -0,0 +1,42 @@ +package Problem0530 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" +) +type TreeNode = kit.TreeNode + +type state struct{ + minDiff , previous int +} + +func getMinimumDifference(root *TreeNode) int { + st:=state{1024,1024} + search(root, &st) + return st.minDiff +} + +// NOTICE: BST 的递归遍历方法 +// 特别好 +func search(root *TreeNode, st *state){ + if root == nil{ + return + } + + search(root.Left, st) + + newDiff:=diff(st.previous, root.Val) + if st.minDiff> newDiff{ + st.minDiff = newDiff + } + + st.previous = root.Val + + search(root.Right, st) +} + +func diff(a, b int) int{ + if a > b{ + return a - b + } + return b - a +} diff --git a/Algorithms/0530.minimum-absolute-difference-in-bst/minimum-absolute-difference-in-bst_test.go b/Algorithms/0530.minimum-absolute-difference-in-bst/minimum-absolute-difference-in-bst_test.go new file mode 100755 index 000000000..ffb86ed7a --- /dev/null +++ b/Algorithms/0530.minimum-absolute-difference-in-bst/minimum-absolute-difference-in-bst_test.go @@ -0,0 +1,44 @@ +package Problem0530 + +import ( + "fmt" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + pre, in []int + ans int +}{ + + { + []int{1, 3, 2}, + []int{1, 2, 3}, + 1, + }, + + // 可以有多个 testcase +} + +func Test_getMinimumDifference(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + root := kit.PreIn2Tree(tc.pre, tc.in) + ast.Equal(tc.ans, getMinimumDifference(root), "输入:%v", tc) + } +} + +func Benchmark_getMinimumDifference(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + root := kit.PreIn2Tree(tc.pre, tc.in) + getMinimumDifference(root) + } + } +} diff --git a/Algorithms/0537.complex-number-multiplication/README.md b/Algorithms/0537.complex-number-multiplication/README.md new file mode 100755 index 000000000..6977ff379 --- /dev/null +++ b/Algorithms/0537.complex-number-multiplication/README.md @@ -0,0 +1,32 @@ +# [537. Complex Number Multiplication](https://leetcode.com/problems/complex-number-multiplication/) + +## 题目 + +Given two strings representing two complex numbers. + +You need to return a string representing their multiplication. Note i2 = -1 according to the definition. + +Example 1: + +```text +Input: "1+1i", "1+1i" +Output: "0+2i" +Explanation: (1 + i) * (1 + i) = 1 + i2 + 2 * i = 2i, and you need convert it to the form of 0+2i. +``` + +Example 2: + +```text +Input: "1+-1i", "1+-1i" +Output: "0+-2i" +Explanation: (1 - i) * (1 - i) = 1 + i2 - 2 * i = -2i, and you need convert it to the form of 0+-2i. +``` + +Note: + +1. The input strings will not have extra blank. +1. The input strings will be given in the form of a+bi, where the integer a and b will both belong to the range of [-100, 100]. And the output should be also in this form. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0537.complex-number-multiplication/complex-number-multiplication.go b/Algorithms/0537.complex-number-multiplication/complex-number-multiplication.go new file mode 100755 index 000000000..5f7224d56 --- /dev/null +++ b/Algorithms/0537.complex-number-multiplication/complex-number-multiplication.go @@ -0,0 +1,26 @@ +package Problem0537 + +import ( + "fmt" + "strconv" + "strings" +) + +// c1 = a + b*i +// c2 = c + d*i +// res = (a*c-b*d) + (a*d+b*c)*i +func complexNumberMultiply(c1 string, c2 string) string { + a, b := analyze(c1) + c, d := analyze(c2) + + return fmt.Sprintf("%d+%di", a*c-b*d, a*d+b*c) +} + +// c == re + im*i +// 返回 re 和 im +func analyze(c string) (re, im int) { + ss := strings.Split(c, "+") + re, _ = strconv.Atoi(ss[0]) + im, _ = strconv.Atoi(ss[1][:len(ss[1])-1]) + return +} diff --git a/Algorithms/0537.complex-number-multiplication/complex-number-multiplication_test.go b/Algorithms/0537.complex-number-multiplication/complex-number-multiplication_test.go new file mode 100755 index 000000000..49368b32a --- /dev/null +++ b/Algorithms/0537.complex-number-multiplication/complex-number-multiplication_test.go @@ -0,0 +1,47 @@ +package Problem0537 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + a string + b string + ans string +}{ + + { + "1+1i", + "1+1i", + "0+2i", + }, + + { + "1+-1i", + "1+-1i", + "0+-2i", + }, + + // 可以有多个 testcase +} + +func Test_complexNumberMultiply(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, complexNumberMultiply(tc.a, tc.b), "输入:%v", tc) + } +} + +func Benchmark_complexNumberMultiply(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + complexNumberMultiply(tc.a, tc.b) + } + } +} diff --git a/Algorithms/0538.convert-bst-to-greater-tree/README.md b/Algorithms/0538.convert-bst-to-greater-tree/README.md new file mode 100755 index 000000000..2662663cf --- /dev/null +++ b/Algorithms/0538.convert-bst-to-greater-tree/README.md @@ -0,0 +1,23 @@ +# [538. Convert BST to Greater Tree](https://leetcode.com/problems/convert-bst-to-greater-tree/) + +## 题目 + +Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus sum of all keys greater than the original key in BST. + +Example: + +```text +Input: The root of a Binary Search Tree like this: + 5 + / \ + 2 13 + +Output: The root of a Greater Tree like this: + 18 + / \ + 20 13 +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0538.convert-bst-to-greater-tree/convert-bst-to-greater-tree.go b/Algorithms/0538.convert-bst-to-greater-tree/convert-bst-to-greater-tree.go new file mode 100755 index 000000000..fc152454f --- /dev/null +++ b/Algorithms/0538.convert-bst-to-greater-tree/convert-bst-to-greater-tree.go @@ -0,0 +1,24 @@ +package Problem0538 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" +) + +type TreeNode = kit.TreeNode + +func convertBST(root *TreeNode) *TreeNode { + sum :=0 + travel(root, &sum) + return root +} + +// 从大到小遍历 BST 并沿路更新 sum 和 节点值 +func travel(root *TreeNode, sum *int) { + if root == nil { + return + } + travel(root.Right, sum) + *sum += root.Val + root.Val= *sum + travel(root.Left, sum) +} \ No newline at end of file diff --git a/Algorithms/0538.convert-bst-to-greater-tree/convert-bst-to-greater-tree_test.go b/Algorithms/0538.convert-bst-to-greater-tree/convert-bst-to-greater-tree_test.go new file mode 100755 index 000000000..799309b4e --- /dev/null +++ b/Algorithms/0538.convert-bst-to-greater-tree/convert-bst-to-greater-tree_test.go @@ -0,0 +1,45 @@ +package Problem0538 + +import ( + "fmt" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + pre, in []int + ansPost []int +}{ + + { + []int{5, 2, 13}, + []int{2, 5, 13}, + []int{20, 13, 18}, + }, + + // 可以有多个 testcase +} + +func Test_convertBST(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + root := kit.PreIn2Tree(tc.pre, tc.in) + ans := kit.Tree2Postorder(convertBST(root)) + ast.Equal(tc.ansPost, ans) + } +} + +func Benchmark_convertBST(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + root := kit.PreIn2Tree(tc.pre, tc.in) + convertBST(root) + } + } +} diff --git a/Algorithms/0539.minimum-time-difference/539.100.png b/Algorithms/0539.minimum-time-difference/539.100.png new file mode 100644 index 000000000..2a6b6c02d Binary files /dev/null and b/Algorithms/0539.minimum-time-difference/539.100.png differ diff --git a/Algorithms/0539.minimum-time-difference/README.md b/Algorithms/0539.minimum-time-difference/README.md new file mode 100755 index 000000000..7aa511f46 --- /dev/null +++ b/Algorithms/0539.minimum-time-difference/README.md @@ -0,0 +1,23 @@ +# [539. Minimum Time Difference](https://leetcode.com/problems/minimum-time-difference/) + +## 题目 + +Given a list of 24-hour clock time points in "Hour:Minutes" format, find the minimum minutes difference between any two time points in the list. + +Example 1: + +```text +Input: ["23:59","00:00"] +Output: 1 +``` + +Note: + +1. The number of time points in the given list is at least 2 and won't exceed 20000. +1. The input time is legal and ranges from 00:00 to 23:59. + +## 解题思路 + +见程序注释 + +![100](539.100.png) \ No newline at end of file diff --git a/Algorithms/0539.minimum-time-difference/minimum-time-difference.go b/Algorithms/0539.minimum-time-difference/minimum-time-difference.go new file mode 100755 index 000000000..e013e37b7 --- /dev/null +++ b/Algorithms/0539.minimum-time-difference/minimum-time-difference.go @@ -0,0 +1,41 @@ +package Problem0539 + +import ( + "sort" + "strconv" +) + +func findMinDifference(timePoints []string) int { + n := len(timePoints) + // 把时间按升序排列 + sort.Strings(timePoints) + + // 把 minDiff 设置为 timePoints[n-1] 到 timePoints[0] 的分钟数 + minDiff := 24*60 - diff(timePoints[0], timePoints[n-1]) + + for i := 1; i < n; i++ { + minDiff = min(minDiff, diff(timePoints[i-1], timePoints[i])) + } + + return minDiff +} + +// 返回从 a 到 b 的分钟数 +func diff(a, b string) int { + ha, ma := getHourAndMintueOf(a) + hb, mb := getHourAndMintueOf(b) + return (hb-ha)*60 + (mb - ma) +} + +func getHourAndMintueOf(s string) (hour, minute int) { + hour, _ = strconv.Atoi(s[:2]) + minute, _ = strconv.Atoi(s[3:]) + return +} + +func min(a, b int) int { + if a < b { + return a + } + return b +} diff --git a/Algorithms/0539.minimum-time-difference/minimum-time-difference_test.go b/Algorithms/0539.minimum-time-difference/minimum-time-difference_test.go new file mode 100755 index 000000000..add849549 --- /dev/null +++ b/Algorithms/0539.minimum-time-difference/minimum-time-difference_test.go @@ -0,0 +1,44 @@ +package Problem0539 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + timePoints []string + ans int +}{ + + { + []string{"12:08", "13:15", "23:59"}, + 67, + }, + + { + []string{"23:59", "00:00"}, + 1, + }, + + // 可以有多个 testcase +} + +func Test_findMinDifference(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findMinDifference(tc.timePoints), "输入:%v", tc) + } +} + +func Benchmark_findMinDifference(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findMinDifference(tc.timePoints) + } + } +} diff --git a/Algorithms/0540.single-element-in-a-sorted-array/README.md b/Algorithms/0540.single-element-in-a-sorted-array/README.md new file mode 100755 index 000000000..1b3772057 --- /dev/null +++ b/Algorithms/0540.single-element-in-a-sorted-array/README.md @@ -0,0 +1,26 @@ +# [540. Single Element in a Sorted Array](https://leetcode.com/problems/single-element-in-a-sorted-array/) + +## 题目 + +Given a sorted array consisting of only integers where every element appears twice except for one element which appears once. Find this single element that appears only once. + +Example 1: + +```text +Input: [1,1,2,3,3,4,4,8,8] +Output: 2 +``` + +Example 2: + +```text +Input: [3,3,7,7,10,11,11] +Output: 10 +``` + +Note: +Your solution should run in O(log n) time and O(1) space. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0540.single-element-in-a-sorted-array/single-element-in-a-sorted-array.go b/Algorithms/0540.single-element-in-a-sorted-array/single-element-in-a-sorted-array.go new file mode 100755 index 000000000..7f79ea075 --- /dev/null +++ b/Algorithms/0540.single-element-in-a-sorted-array/single-element-in-a-sorted-array.go @@ -0,0 +1,31 @@ +package Problem0540 + +func singleNonDuplicate(nums []int) int { + n := len(nums) - 1 + lo, hi := 0, n-1 + + // 二分查找 + for lo < hi { + mid := lo + (hi-lo)/2 + // 为了简化后面的判断 + // 让 mid 总是落在偶数位上 + // 这样的话,在遇到单独的数之前,总有 nums[mid] == nums[mid+1] + if mid%2 == 1 { + mid-- + } + + if nums[mid] != nums[mid+1] { + // 单独的数,在 mid 之前 + hi = mid + // hi 没有 -1 是因为 + // 此时的 mid 可能就是答案,-1 的话,有可能会漏掉答案 + } else { + // 单独的数,在 mid 之后 + lo = mid + 2 + // nums[:mid+2] 中肯定没有包含答案,所以,把 mid + 2 放入 lo + } + + } + + return nums[lo] +} diff --git a/Algorithms/0540.single-element-in-a-sorted-array/single-element-in-a-sorted-array_test.go b/Algorithms/0540.single-element-in-a-sorted-array/single-element-in-a-sorted-array_test.go new file mode 100755 index 000000000..18827dfab --- /dev/null +++ b/Algorithms/0540.single-element-in-a-sorted-array/single-element-in-a-sorted-array_test.go @@ -0,0 +1,49 @@ +package Problem0540 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans int +}{ + + { + []int{1, 1, 2}, + 2, + }, + + { + []int{1, 1, 2, 3, 3, 4, 4, 8, 8}, + 2, + }, + + { + []int{3, 3, 7, 7, 10, 11, 11}, + 10, + }, + + // 可以有多个 testcase +} + +func Test_singleNonDuplicate(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, singleNonDuplicate(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_singleNonDuplicate(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + singleNonDuplicate(tc.nums) + } + } +} diff --git a/Algorithms/0541.reverse-string-ii/README.md b/Algorithms/0541.reverse-string-ii/README.md new file mode 100755 index 000000000..4b8cff902 --- /dev/null +++ b/Algorithms/0541.reverse-string-ii/README.md @@ -0,0 +1,21 @@ +# [541. Reverse String II](https://leetcode.com/problems/reverse-string-ii/) + +## 题目 + +Given a string and an integer k, you need to reverse the first k characters for every 2k characters counting from the start of the string. If there are less than k characters left, reverse all of them. If there are less than 2k but greater than or equal to k characters, then reverse the first k characters and left the other as original. + +Example: + +```text +Input: s = "abcdefg", k = 2 +Output: "bacdfeg" +``` + +Restrictions: + +1. The string consists of lower English letters only. +1. Length of the given string and k will in the range [1, 10000] + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0541.reverse-string-ii/reverse-string-ii.go b/Algorithms/0541.reverse-string-ii/reverse-string-ii.go new file mode 100755 index 000000000..d0f1f6f6e --- /dev/null +++ b/Algorithms/0541.reverse-string-ii/reverse-string-ii.go @@ -0,0 +1,28 @@ +package Problem0541 + +func reverseStr(s string, k int) string { + bytes := []byte(s) + + for i := 0; i < len(s); i += 2 * k { + j := min(i+k, len(s)) + reverse(bytes[i:j]) + } + + return string(bytes) +} + +func reverse(bytes []byte) { + i, j := 0, len(bytes)-1 + for i < j { + bytes[i], bytes[j] = bytes[j], bytes[i] + i++ + j-- + } +} + +func min(a, b int) int { + if a < b { + return a + } + return b +} diff --git a/Algorithms/0541.reverse-string-ii/reverse-string-ii_test.go b/Algorithms/0541.reverse-string-ii/reverse-string-ii_test.go new file mode 100755 index 000000000..2a32f9767 --- /dev/null +++ b/Algorithms/0541.reverse-string-ii/reverse-string-ii_test.go @@ -0,0 +1,47 @@ +package Problem0541 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + k int + ans string +}{ + + { + "abcdefg", + 3, + "cbadefg", + }, + + { + "abcdefg", + 2, + "bacdfeg", + }, + + // 可以有多个 testcase +} + +func Test_reverseStr(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, reverseStr(tc.s, tc.k), "输入:%v", tc) + } +} + +func Benchmark_reverseStr(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + reverseStr(tc.s, tc.k) + } + } +} diff --git a/Algorithms/0542.01-matrix/01-matrix.go b/Algorithms/0542.01-matrix/01-matrix.go new file mode 100755 index 000000000..6873daf59 --- /dev/null +++ b/Algorithms/0542.01-matrix/01-matrix.go @@ -0,0 +1,49 @@ +package Problem0542 + +func updateMatrix(matrix [][]int) [][]int { + m, n := len(matrix), len(matrix[0]) + MIN := m * n + + // 根据 左方 和 上方 的格子,更新 (i,j) + for i := 0; i < m; i++ { + for j := 0; j < n; j++ { + if matrix[i][j] == 0 { + continue + } + + matrix[i][j] = MIN + + if 0 <= i-1 { + matrix[i][j] = min(matrix[i][j], matrix[i-1][j]+1) + } + if 0 <= j-1 { + matrix[i][j] = min(matrix[i][j], matrix[i][j-1]+1) + } + } + } + + // 根据 右方 和 下方 的格子,更新 (i,j) + for i := m - 1; 0 <= i; i-- { + for j := n - 1; 0 <= j; j-- { + if matrix[i][j] == 0 { + continue + } + + if i+1 < m { + matrix[i][j] = min(matrix[i][j], matrix[i+1][j]+1) + } + if j+1 < n { + matrix[i][j] = min(matrix[i][j], matrix[i][j+1]+1) + } + } + } + + return matrix +} + +func min(a, b int) int { + if a < b { + return a + } + return b +} diff --git a/Algorithms/0542.01-matrix/01-matrix_test.go b/Algorithms/0542.01-matrix/01-matrix_test.go new file mode 100755 index 000000000..8b3d8fc39 --- /dev/null +++ b/Algorithms/0542.01-matrix/01-matrix_test.go @@ -0,0 +1,60 @@ +package Problem0542 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + matrix [][]int + ans [][]int +}{ + + { + [][]int{ + {0, 0, 0}, + {0, 1, 0}, + {0, 0, 0}, + }, + [][]int{ + {0, 0, 0}, + {0, 1, 0}, + {0, 0, 0}, + }, + }, + + { + [][]int{ + {0, 0, 0}, + {0, 1, 0}, + {1, 1, 1}, + }, + [][]int{ + {0, 0, 0}, + {0, 1, 0}, + {1, 2, 1}, + }, + }, + + // 可以有多个 testcase +} + +func Test_updateMatrix(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, updateMatrix(tc.matrix), "输入:%v", tc) + } +} + +func Benchmark_updateMatrix(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + updateMatrix(tc.matrix) + } + } +} diff --git a/Algorithms/0542.01-matrix/README.md b/Algorithms/0542.01-matrix/README.md new file mode 100755 index 000000000..bb45a4c8d --- /dev/null +++ b/Algorithms/0542.01-matrix/README.md @@ -0,0 +1,45 @@ +# [542. 01 Matrix](https://leetcode.com/problems/01-matrix/) + +## 题目 + +Given a matrix consists of 0 and 1, find the distance of the nearest 0 for each cell. + +The distance between two adjacent cells is 1. + +Example 1: + +```text +Input: +0 0 0 +0 1 0 +0 0 0 + +Output: +0 0 0 +0 1 0 +0 0 0 +``` + +Example 2: + +```text +Input: +0 0 0 +0 1 0 +1 1 1 + +Output: +0 0 0 +0 1 0 +1 2 1 +``` + +Note: + +1. The number of elements of the given matrix will not exceed 10,000. +1. There are at least one 0 in the given matrix. +1. The cells are adjacent in only four directions: up, down, left and right. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0543.diameter-of-binary-tree/README.md b/Algorithms/0543.diameter-of-binary-tree/README.md new file mode 100755 index 000000000..f53bc106b --- /dev/null +++ b/Algorithms/0543.diameter-of-binary-tree/README.md @@ -0,0 +1,27 @@ +# [543. Diameter of Binary Tree](https://leetcode.com/problems/diameter-of-binary-tree/) + +## 题目 + +Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longest path between any two nodes in a tree. This path may or may not pass through the root. + +Example: + +```text +Given a binary tree + 1 + / \ + 2 3 + / \ + 4 5 + + + +Return 3, which is the length of the path [4,2,1,3] or [5,2,1,3]. +``` + +Note: +The length of path between two nodes is represented by the number of edges between them. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0543.diameter-of-binary-tree/diameter-of-binary-tree.go b/Algorithms/0543.diameter-of-binary-tree/diameter-of-binary-tree.go new file mode 100755 index 000000000..c8c24efd5 --- /dev/null +++ b/Algorithms/0543.diameter-of-binary-tree/diameter-of-binary-tree.go @@ -0,0 +1,32 @@ +package Problem0543 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" +) + +type TreeNode = kit.TreeNode + +func diameterOfBinaryTree(root *TreeNode) int { + _, res := helper(root) + return res +} + +func helper(root *TreeNode) (length, diameter int) { + if root == nil { + return + } + + leftLen, leftDia := helper(root.Left) + rightLen, rightDia := helper(root.Right) + + length = max(leftLen, rightLen) + 1 + diameter = max(leftLen+rightLen, max(leftDia, rightDia)) + return +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} diff --git a/Algorithms/0543.diameter-of-binary-tree/diameter-of-binary-tree_test.go b/Algorithms/0543.diameter-of-binary-tree/diameter-of-binary-tree_test.go new file mode 100755 index 000000000..8aa33e7b1 --- /dev/null +++ b/Algorithms/0543.diameter-of-binary-tree/diameter-of-binary-tree_test.go @@ -0,0 +1,50 @@ +package Problem0543 + +import ( + "fmt" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + pre, in []int + ans int +}{ + + { + []int{}, + []int{}, + 0, + }, + + { + []int{1, 2, 4, 5, 3}, + []int{4, 2, 5, 1, 3}, + 3, + }, + + // 可以有多个 testcase +} + +func Test_diameterOfBinaryTree(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + root := kit.PreIn2Tree(tc.pre, tc.in) + ast.Equal(tc.ans, diameterOfBinaryTree(root), "输入:%v", tc) + } +} + +func Benchmark_diameterOfBinaryTree(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + root := kit.PreIn2Tree(tc.pre, tc.in) + diameterOfBinaryTree(root) + } + } +} diff --git a/Algorithms/0546.remove-boxes/546.100.png b/Algorithms/0546.remove-boxes/546.100.png new file mode 100644 index 000000000..f34d97675 Binary files /dev/null and b/Algorithms/0546.remove-boxes/546.100.png differ diff --git a/Algorithms/0546.remove-boxes/README.md b/Algorithms/0546.remove-boxes/README.md new file mode 100755 index 000000000..30d8b8937 --- /dev/null +++ b/Algorithms/0546.remove-boxes/README.md @@ -0,0 +1,33 @@ +# [546. Remove Boxes](https://leetcode.com/problems/remove-boxes/) + +## 题目 + +Given several boxes with different colors represented by different positive numbers. +You may experience several rounds to remove boxes until there is no box left. Each time you can choose some continuous boxes with the same color (composed of k boxes, k >= 1), remove them and get k*k points. +Find the maximum points you can get. + +Example 1: + +```text +Input: +[1, 3, 2, 2, 2, 3, 4, 3, 1] + +Output: +23 + +Explanation: +[1, 3, 2, 2, 2, 3, 4, 3, 1] +----> [1, 3, 3, 4, 3, 1] (3*3=9 points) +----> [1, 3, 3, 3, 1] (1*1=1 points) +----> [1, 1] (3*3=9 points) +----> [] (2*2=4 points) +``` + +Note: +The number of boxes n would not exceed 100. + +## 解题思路 + +见程序注释 + +![100](546.100.png) \ No newline at end of file diff --git a/Algorithms/0546.remove-boxes/remove-boxes.go b/Algorithms/0546.remove-boxes/remove-boxes.go new file mode 100755 index 000000000..1490e943b --- /dev/null +++ b/Algorithms/0546.remove-boxes/remove-boxes.go @@ -0,0 +1,62 @@ +package Problem0546 + +func removeBoxes(boxes []int) int { + n := len(boxes) + + // dp[l][r][k] 的值是, + // 在 boxes[l:r+1] 右侧有 k 个和 boxes[r] 一样颜色的 box 再加上 boxes[l:r+1] 可以获取的最大值 + // 所以,题目要求的是 dp[0][n-1][0] 的值 + dp := make([][][]int, n) + for i := 0; i < n; i++ { + dp[i] = make([][]int, n) + for j := 0; j < n; j++ { + dp[i][j] = make([]int, n) + } + } + + return remove(boxes, dp, 0, n-1, 0) +} + +func remove(boxes []int, dp [][][]int, l, r, k int) int { + if l > r { + return 0 + } + + // 已经计算过的情况,直接返回 + if dp[l][r][k] > 0 { + return dp[l][r][k] + } + + // 缩短 boxes[l:r+1] 直到 boxes[r-1] != boxes[r] + // 这是一种优化行为,因为 + // 4*4 > 3*3 + 1*1,同时消除尽可能多的元素,肯定比分开消除好 + // 把下列 for 循环注释掉,也可以得到正确的解答,只是慢一些 + for l < r && boxes[r-1] == boxes[r] { + r-- + k++ + } + + // 第一种选择,把右侧的 k 个元素和 boxes[r] 现在就清除掉 + res := (k+1)*(k+1) + remove(boxes, dp, l, r-1, 0) + + // 第二种选择,把右侧的 k 个元素 和 boxes[r] 留着,等着与 boxes[l:r] 中和 boxes[r]相同颜色的 box 汇合,变得更多了以后,再消除 + for m := r - 1; l <= m; m-- { + if boxes[r] == boxes[m] { + // 此时,boxes[m] 与 boxes[r] 的颜色相同 + // remove(boxes, dp, m+1, r-1, 0)+remove(boxes, dp, l, m, k+1) 的含义是 + // 先把 boxes[m+1:r] 清除掉 → remove(boxes, dp, m+1, r-1, 0) + // boxes[l:m+1] 右侧就有了 k+1 个和 boxes[m] 一样颜色的盒子了,继续递归搜索 + res = max(res, remove(boxes, dp, m+1, r-1, 0)+remove(boxes, dp, l, m, k+1)) + } + } + + dp[l][r][k] = res + return res +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} diff --git a/Algorithms/0546.remove-boxes/remove-boxes_test.go b/Algorithms/0546.remove-boxes/remove-boxes_test.go new file mode 100755 index 000000000..04f529a84 --- /dev/null +++ b/Algorithms/0546.remove-boxes/remove-boxes_test.go @@ -0,0 +1,49 @@ +package Problem0546 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + boxes []int + ans int +}{ + + { + []int{}, + 0, + }, + + { + []int{1, 3, 2, 2, 2, 3, 4, 3, 1}, + 23, + }, + + { + []int{3, 8, 8, 5, 5, 3, 9, 2, 4, 4, 6, 5, 8, 4, 8, 6, 9, 6, 2, 8, 6, 4, 1, 9, 5, 3, 10, 5, 3, 3, 9, 8, 8, 6, 5, 3, 7, 4, 9, 6, 3, 9, 4, 3, 5, 10, 7, 6, 10, 7}, + 136, + }, + + // 可以有多个 testcase +} + +func Test_removeBoxes(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, removeBoxes(tc.boxes), "输入:%v", tc) + } +} + +func Benchmark_removeBoxes(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + removeBoxes(tc.boxes) + } + } +} diff --git a/Algorithms/0547.friend-circles/README.md b/Algorithms/0547.friend-circles/README.md new file mode 100755 index 000000000..5051ea8e3 --- /dev/null +++ b/Algorithms/0547.friend-circles/README.md @@ -0,0 +1,39 @@ +# [547. Friend Circles](https://leetcode.com/problems/friend-circles/) + +## 题目 + +There are N students in a class. Some of them are friends, while some are not. Their friendship is transitive in nature. For example, if A is a direct friend of B, and B is a direct friend of C, then A is an indirect friend of C. And we defined a friend circle is a group of students who are direct or indirect friends. + +Given a N*N matrix M representing the friend relationship between students in the class. If `M[i][j] = 1`, then the ith and jth students are direct friends with each other, otherwise not. And you have to output the total number of friend circles among all the students. + +Example 1: + +```text +Input: +[[1,1,0], + [1,1,0], + [0,0,1]] +Output: 2 +Explanation:The 0th and 1st students are direct friends, so they are in a friend circle. The 2nd student himself is in a friend circle. So return 2. +``` + +Example 2: + +```text +Input: +[[1,1,0], + [1,1,1], + [0,1,1]] +Output: 1 +Explanation:The 0th and 1st students are direct friends, the 1st and 2nd students are direct friends, so the 0th and 2nd students are indirect friends. All of them are in the same friend circle, so return 1. +``` + +Note: + +1. N is in range [1,200]. +1. `M[i][i] = 1` for all students. +1. If `M[i][j] = 1`, then `M[j][i] = 1`. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0547.friend-circles/friend-circles.go b/Algorithms/0547.friend-circles/friend-circles.go new file mode 100755 index 000000000..5bd1c121a --- /dev/null +++ b/Algorithms/0547.friend-circles/friend-circles.go @@ -0,0 +1,34 @@ +package Problem0547 + +func findCircleNum(M [][]int) int { + N := len(M) + res := N + + friend := make([]int, res) + for i := 0; i < res; i++ { + friend[i] = i + } + + // s 和 d 是朋友关系 + // 所以,s 的所有朋友都是 d 的朋友 + union := func(s, d int) { + for i := range friend { + if friend[i] == s { + friend[i] = d + } + } + } + + for i := 0; i < N; i++ { + for j := i + 1; j < N; j++ { + if M[i][j] == 1 { + if friend[i] != friend[j] { + res-- + union(friend[i], friend[j]) + } + } + } + } + + return res +} diff --git a/Algorithms/0547.friend-circles/friend-circles_test.go b/Algorithms/0547.friend-circles/friend-circles_test.go new file mode 100755 index 000000000..b8009022f --- /dev/null +++ b/Algorithms/0547.friend-circles/friend-circles_test.go @@ -0,0 +1,79 @@ +package Problem0547 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + M [][]int + ans int +}{ + + { + [][]int{ + {1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0}, + {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0}, + {0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0}, + {1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0}, + {0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1}, + {0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0}, + {0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1}}, + 3, + }, + + { + [][]int{{1, 1, 1}, {1, 1, 1}, {1, 1, 1}}, + 1, + }, + + { + [][]int{{1, 0, 0, 1}, {0, 1, 1, 0}, {0, 1, 1, 1}, {1, 0, 1, 1}}, + 1, + }, + + { + [][]int{{1, 0, 0, 1}, {0, 1, 1, 0}, {0, 1, 1, 1}, {1, 0, 1, 1}}, + 1, + }, + + { + [][]int{{1, 1, 0}, {1, 1, 0}, {0, 0, 1}}, + 2, + }, + + { + [][]int{{1, 1, 0}, {1, 1, 1}, {0, 1, 1}}, + 1, + }, + + // 可以有多个 testcase +} + +func Test_findCircleNum(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findCircleNum(tc.M), "输入:%v", tc) + } +} + +func Benchmark_findCircleNum(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findCircleNum(tc.M) + } + } +} diff --git a/Algorithms/0551.student-attendance-record-i/README.md b/Algorithms/0551.student-attendance-record-i/README.md new file mode 100755 index 000000000..1ff49927d --- /dev/null +++ b/Algorithms/0551.student-attendance-record-i/README.md @@ -0,0 +1,31 @@ +# [551. Student Attendance Record I](https://leetcode.com/problems/student-attendance-record-i/) + +## 题目 + +You are given a string representing an attendance record for a student. The record only contains the following three characters: + +1. 'A' : Absent. +1. 'L' : Late. +1. 'P' : Present. + +A student could be rewarded if his attendance record doesn't contain more than one 'A' (absent) or more than two continuous 'L' (late). + +You need to return whether the student could be rewarded according to his attendance record. + +Example 1: + +```text +Input: "PPALLP" +Output: True +``` + +Example 2: + +```text +Input: "PPALLL" +Output: False +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0551.student-attendance-record-i/student-attendance-record-i.go b/Algorithms/0551.student-attendance-record-i/student-attendance-record-i.go new file mode 100755 index 000000000..e1001bd38 --- /dev/null +++ b/Algorithms/0551.student-attendance-record-i/student-attendance-record-i.go @@ -0,0 +1,9 @@ +package Problem0551 + +import ( + "strings" +) + +func checkRecord(s string) bool { + return !(strings.Count(s, "A") > 1 || strings.Contains(s, "LLL")) +} diff --git a/Algorithms/0551.student-attendance-record-i/student-attendance-record-i_test.go b/Algorithms/0551.student-attendance-record-i/student-attendance-record-i_test.go new file mode 100755 index 000000000..77c1216e1 --- /dev/null +++ b/Algorithms/0551.student-attendance-record-i/student-attendance-record-i_test.go @@ -0,0 +1,44 @@ +package Problem0551 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + ans bool +}{ + + { + "PPALLP", + true, + }, + + { + "PPALLL", + false, + }, + + // 可以有多个 testcase +} + +func Test_checkRecord(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, checkRecord(tc.s), "输入:%v", tc) + } +} + +func Benchmark_checkRecord(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + checkRecord(tc.s) + } + } +} diff --git a/Algorithms/0552.student-attendance-record-ii/552.100.png b/Algorithms/0552.student-attendance-record-ii/552.100.png new file mode 100644 index 000000000..31f00d889 Binary files /dev/null and b/Algorithms/0552.student-attendance-record-ii/552.100.png differ diff --git a/Algorithms/0552.student-attendance-record-ii/README.md b/Algorithms/0552.student-attendance-record-ii/README.md new file mode 100755 index 000000000..c9de67be3 --- /dev/null +++ b/Algorithms/0552.student-attendance-record-ii/README.md @@ -0,0 +1,33 @@ +# [552. Student Attendance Record II](https://leetcode.com/problems/student-attendance-record-ii/) + +## 题目 + +Given a positive integer n, return the number of all possible attendance records with length n, which will be regarded as rewardable. The answer may be very large, return it after mod 109 + 7. + +A student attendance record is a string that only contains the following three characters: + +1. 'A' : Absent. +1. 'L' : Late. +1. 'P' : Present. + +A record is regarded as rewardable if it doesn't contain more than one 'A' (absent) or more than two continuous 'L' (late). + +Example 1: + +```text +Input: n = 2 +Output: 8 +Explanation: +There are 8 records with length 2 will be regarded as rewardable: +"PP" , "AP", "PA", "LP", "PL", "AL", "LA", "LL" +Only "AA" won't be regarded as rewardable owing to more than one absent times. +``` + +Note: +The value of n won't exceed 100,000. + +## 解题思路 + +见程序注释 + +![100](552.100.png) \ No newline at end of file diff --git a/Algorithms/0552.student-attendance-record-ii/student-attendance-record-ii.go b/Algorithms/0552.student-attendance-record-ii/student-attendance-record-ii.go new file mode 100755 index 000000000..3a5fc1db6 --- /dev/null +++ b/Algorithms/0552.student-attendance-record-ii/student-attendance-record-ii.go @@ -0,0 +1,56 @@ +package Problem0552 + +var m = 1000000007 + +func checkRecord(n int) int { + // 为了后面的迭代,先分类讨论一下 n + switch n { + case 0: + return 1 + case 1: + return 3 + case 2: // 后面初始化 A 的时候,会有 A[2] + return 8 + } + + // P[i] 表示,共有 i 个记录,且第 i 个记录为 P 的排列数 + P := make([]int, n) + P[0] = 1 + // L[i] 表示,共有 i 个记录,且第 i 个记录为 L 的排列数 + L := make([]int, n) + L[0], L[1] = 1, 3 + // A[i] 表示,共有 i 个记录,且第 i 个记录为 A 的排列数 + A := make([]int, n) + A[0], A[1], A[2] = 1, 2, 4 + // 由以上 P,L,A 的定义可知 + // 所求的答案 T[n-1] == P[n-1] + L[n-1] + A[n-1] + + for i := 1; i < n; i++ { + // 为了避免 P, L, A 中的数字累计过大 + // 对 i-1 上的数进行求余运算 + P[i-1] %= m + L[i-1] %= m + A[i-1] %= m + + // 当第 i 个为 'P' 时 + P[i] = P[i-1] + // i-1 可以为 P + L[i-1] + // i-1 可以为 L + A[i-1] // i-1 可以为 A + + if i > 1 { + // 当第 i 个为 'L' 时 + L[i] = P[i-1] + // i-1 可以为 P + P[i-2] + A[i-2] + // i-1 可以为 L,但是 i-2 必须为 P 或 A + A[i-1] // i-1 可以为 A + } + + if i > 2 { + // 关于下面的表达式,我没有想到数学上的合理解释 + // 具体来源请参考 + // https://discuss.leetcode.com/topic/86696/share-my-o-n-c-dp-solution-with-thinking-process-and-explanation/3 + A[i] = A[i-1] + A[i-2] + A[i-3] + } + } + + return (P[n-1] + L[n-1] + A[n-1]) % m +} diff --git a/Algorithms/0552.student-attendance-record-ii/student-attendance-record-ii_test.go b/Algorithms/0552.student-attendance-record-ii/student-attendance-record-ii_test.go new file mode 100755 index 000000000..46d33389e --- /dev/null +++ b/Algorithms/0552.student-attendance-record-ii/student-attendance-record-ii_test.go @@ -0,0 +1,56 @@ +package Problem0552 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + n int + ans int +}{ + + {0, 1}, + + {1, 3}, + + {3, 19}, + + {2, 8}, + + {4, 43}, + + {5, 94}, + + {10, 3536}, + + {100, 985598218}, + + {1000, 250434094}, + + {10000, 67802379}, + + {100000, 749184020}, + + // 可以有多个 testcase +} + +func Test_checkRecord(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, checkRecord(tc.n), "输入:%v", tc) + } +} + +func Benchmark_checkRecord(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + checkRecord(tc.n) + } + } +} diff --git a/Algorithms/0553.optimal-division/README.md b/Algorithms/0553.optimal-division/README.md new file mode 100755 index 000000000..52a216cda --- /dev/null +++ b/Algorithms/0553.optimal-division/README.md @@ -0,0 +1,33 @@ +# [553. Optimal Division](https://leetcode.com/problems/optimal-division/) + +## 题目 + +Given a list of positive integers, the adjacent integers will perform the float division. For example, [2,3,4] -> 2 / 3 / 4. + +However, you can add any number of parenthesis at any position to change the priority of operations. You should find out how to add parenthesis to get the maximum result, and return the corresponding expression in string format. Your expression should NOT contain redundant parenthesis. + +Example: + +```text +Input: [1000,100,10,2] +Output: "1000/(100/10/2)" +Explanation: +1000/(100/10/2) = 1000/((100/10)/2) = 200 +However, the bold parenthesis in "1000/((100/10)/2)" are redundant, since they don't influence the operation priority. So you should return "1000/(100/10/2)". + +Other cases: +1000/(100/10)/2 = 50 +1000/(100/(10/2)) = 50 +1000/100/10/2 = 0.5 +1000/100/(10/2) = 2 +``` + +Note: + +1. The length of the input array is [1, 10]. +1. Elements in the given array will be in range [2, 1000]. +1. There is only one optimal division for each test case. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0553.optimal-division/optimal-division.go b/Algorithms/0553.optimal-division/optimal-division.go new file mode 100755 index 000000000..e20c95eea --- /dev/null +++ b/Algorithms/0553.optimal-division/optimal-division.go @@ -0,0 +1,22 @@ +package Problem0553 + +import ( + "strconv" + "strings" +) + +func optimalDivision(nums []int) string { + strs := make([]string, len(nums)) + for i, n := range nums { + strs[i] = strconv.Itoa(n) + } + + switch len(strs) { + case 1: + return strs[0] + case 2: + return strings.Join(strs, "/") + default: + return strs[0] + "/(" + strings.Join(strs[1:], "/") + ")" + } +} diff --git a/Algorithms/0553.optimal-division/optimal-division_test.go b/Algorithms/0553.optimal-division/optimal-division_test.go new file mode 100755 index 000000000..4802834d8 --- /dev/null +++ b/Algorithms/0553.optimal-division/optimal-division_test.go @@ -0,0 +1,42 @@ +package Problem0553 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans string +}{ + + {[]int{1000, 100, 10, 2}, "1000/(100/10/2)"}, + + {[]int{2}, "2"}, + + {[]int{2, 1}, "2/1"}, + + {[]int{5, 2, 1}, "5/(2/1)"}, + + // 可以有多个 testcase +} + +func Test_optimalDivision(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, optimalDivision(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_optimalDivision(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + optimalDivision(tc.nums) + } + } +} diff --git a/Algorithms/0554.brick-wall/README.md b/Algorithms/0554.brick-wall/README.md new file mode 100755 index 000000000..000bd57f5 --- /dev/null +++ b/Algorithms/0554.brick-wall/README.md @@ -0,0 +1,35 @@ +# [554. Brick Wall](https://leetcode.com/problems/brick-wall/) + +## 题目 + +There is a brick wall in front of you. The wall is rectangular and has several rows of bricks. The bricks have the same height but different width. You want to draw a vertical line from the top to the bottom and cross the least bricks. + +The brick wall is represented by a list of rows. Each row is a list of integers representing the width of each brick in this row from left to right. + +If your line go through the edge of a brick, then the brick is not considered as crossed. You need to find out how to draw the line to cross the least bricks and return the number of crossed bricks. + +You cannot draw a line just along one of the two vertical edges of the wall, in which case the line will obviously cross no bricks. + +Example: + +```text +Input: +[[1,2,2,1], + [3,1,2], + [1,3,2], + [2,4], + [3,1,2], + [1,3,1,1]] +Output: 2 +``` + +Explanation: +![](https://leetcode.com/static/images/problemset/brick_wall.png) +Note: + +1. The width sum of bricks in different rows are the same and won't exceed INT_MAX. +1. The number of bricks in each row is in range [1,10,000]. The height of wall is in range [1,10,000]. Total number of bricks of the wall won't exceed 20,000. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0554.brick-wall/brick-wall.go b/Algorithms/0554.brick-wall/brick-wall.go new file mode 100755 index 000000000..1a9d8a873 --- /dev/null +++ b/Algorithms/0554.brick-wall/brick-wall.go @@ -0,0 +1,25 @@ +package Problem0554 + +func leastBricks(wall [][]int) int { + m := len(wall) + + // 统计坐标相同的 edge 出现的次数 + count := make(map[int]int, m) + + for i := 0; i < m; i++ { + sum := wall[i][0] + for j := 1; j < len(wall[i]); j++ { + count[sum]++ + sum += wall[i][j] + } + } + + max := 0 + for _, edges := range count { + if max < edges { + max = edges + } + } + + return m - max +} diff --git a/Algorithms/0554.brick-wall/brick-wall_test.go b/Algorithms/0554.brick-wall/brick-wall_test.go new file mode 100755 index 000000000..99e1399c4 --- /dev/null +++ b/Algorithms/0554.brick-wall/brick-wall_test.go @@ -0,0 +1,44 @@ +package Problem0554 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + wall [][]int + ans int +}{ + + { + [][]int{{1, 2, 2, 1}, + {3, 1, 2}, + {1, 3, 2}, + {2, 4}, + {3, 1, 2}, + {1, 3, 1, 1}}, + 2, + }, + + // 可以有多个 testcase +} + +func Test_leastBricks(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, leastBricks(tc.wall), "输入:%v", tc) + } +} + +func Benchmark_leastBricks(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + leastBricks(tc.wall) + } + } +} diff --git a/Algorithms/0556.next-greater-element-iii/README.md b/Algorithms/0556.next-greater-element-iii/README.md new file mode 100755 index 000000000..6ee58dba0 --- /dev/null +++ b/Algorithms/0556.next-greater-element-iii/README.md @@ -0,0 +1,23 @@ +# [556. Next Greater Element III](https://leetcode.com/problems/next-greater-element-iii/) + +## 题目 + +Given a positive 32-bit integer n, you need to find the smallest 32-bit integer which has exactly the same digits existing in the integer n and is greater in value than n. If no such positive 32-bit integer exists, you need to return -1. + +Example 1: + +```text +Input: 12 +Output: 21 +``` + +Example 2: + +```text +Input: 21 +Output: -1 +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0556.next-greater-element-iii/next-greater-element-iii.go b/Algorithms/0556.next-greater-element-iii/next-greater-element-iii.go new file mode 100755 index 000000000..f7d2440ca --- /dev/null +++ b/Algorithms/0556.next-greater-element-iii/next-greater-element-iii.go @@ -0,0 +1,90 @@ +package Problem0556 + +import "sort" + +func nextGreaterElement(n int) int { + nums := make([]int, 0, 10) + + lastTail := n % 10 + // 用于标记 n 已经为其能表现的最大值 + // 例如, n == 4321,就不可能变得更大了 + isMax := true + for n > 0 { + tail := n % 10 + if tail < lastTail { + // 较高位上存在较小的值 + // n 还可以变大 + isMax = false + } + lastTail = tail + nums = append(nums, tail) + n /= 10 + } + + // 由于 n 不可能再变大了,所以,提前结束 + if isMax { + return -1 + } + + // nums 中 digit 的存入顺序与实际顺序相反 + // 需要逆转一下 nums + reverse(nums) + + // 按照题意,交换 nums 中,两个数的位子 + beg := exchange(nums) + + // 重新排列 nums 尾部的数字,使得 nums 更小 + sort.Ints(nums[beg:]) + + res := combine(nums) + + if res > 1<<31-1 { + return -1 + } + return res +} + +func reverse(ss []int) { + i, j := 0, len(ss)-1 + for i < j { + ss[i], ss[j] = ss[j], ss[i] + i++ + j-- + } +} + +// 找到最大的 i 使得 +// s[j] 是 s[i+1:] 中大于 s[i] 的最小值 +// s[i], s[j] 互换后 +// 返回 i+1 +func exchange(a []int) int { + var i, j int + + for i = len(a) - 2; 0 <= i; i-- { + n := a[i] + min := 10 + index := i + for j = i + 1; j < len(a); j++ { + if n < a[j] && a[j] < min { + min = a[j] + index = j + } + } + + if i < index { + a[i], a[index] = a[index], a[i] + break + } + } + + return i + 1 +} + +// 把 a 整合成一个 int +func combine(a []int) int { + num := 0 + for i := range a { + num = num*10 + a[i] + } + return num +} diff --git a/Algorithms/0556.next-greater-element-iii/next-greater-element-iii_test.go b/Algorithms/0556.next-greater-element-iii/next-greater-element-iii_test.go new file mode 100755 index 000000000..d5b85c459 --- /dev/null +++ b/Algorithms/0556.next-greater-element-iii/next-greater-element-iii_test.go @@ -0,0 +1,64 @@ +package Problem0556 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + n int + ans int +}{ + + { + 12443322, + 13222344, + }, + + { + 2321, + 3122, + }, + + { + 2147483467, + 2147483476, + }, + + { + 2147483647, + -1, + }, + + { + 12, + 21, + }, + + { + 21, + -1, + }, + + // 可以有多个 testcase +} + +func Test_nextGreaterElement(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, nextGreaterElement(tc.n), "输入:%v", tc) + } +} + +func Benchmark_nextGreaterElement(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + nextGreaterElement(tc.n) + } + } +} diff --git a/Algorithms/0557.reverse-words-in-a-string-iii/README.md b/Algorithms/0557.reverse-words-in-a-string-iii/README.md new file mode 100755 index 000000000..78fb8bad4 --- /dev/null +++ b/Algorithms/0557.reverse-words-in-a-string-iii/README.md @@ -0,0 +1,19 @@ +# [557. Reverse Words in a String III](https://leetcode.com/problems/reverse-words-in-a-string-iii/) + +## 题目 + +Given a string, you need to reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order. + +Example 1: + +```text +Input: "Let's take LeetCode contest" +Output: "s'teL ekat edoCteeL tsetnoc" +``` + +Note: +In the string, each word is separated by single space and there will not be any extra space in the string. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0557.reverse-words-in-a-string-iii/reverse-words-in-a-string-iii.go b/Algorithms/0557.reverse-words-in-a-string-iii/reverse-words-in-a-string-iii.go new file mode 100755 index 000000000..8c29d96bc --- /dev/null +++ b/Algorithms/0557.reverse-words-in-a-string-iii/reverse-words-in-a-string-iii.go @@ -0,0 +1,24 @@ +package Problem0557 + +import ( + "strings" +) + +func reverseWords(s string) string { + ss := strings.Split(s, " ") + for i, s := range ss { + ss[i] = revers(s) + } + return strings.Join(ss, " ") +} + +func revers(s string) string { + bytes := []byte(s) + i, j := 0, len(bytes)-1 + for i < j { + bytes[i], bytes[j] = bytes[j], bytes[i] + i++ + j-- + } + return string(bytes) +} diff --git a/Algorithms/0557.reverse-words-in-a-string-iii/reverse-words-in-a-string-iii_test.go b/Algorithms/0557.reverse-words-in-a-string-iii/reverse-words-in-a-string-iii_test.go new file mode 100755 index 000000000..9d3f9bf3b --- /dev/null +++ b/Algorithms/0557.reverse-words-in-a-string-iii/reverse-words-in-a-string-iii_test.go @@ -0,0 +1,39 @@ +package Problem0557 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + ans string +}{ + + { + "Let's take LeetCode contest", + "s'teL ekat edoCteeL tsetnoc", + }, + + // 可以有多个 testcase +} + +func Test_reverseWords(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, reverseWords(tc.s), "输入:%v", tc) + } +} + +func Benchmark_reverseWords(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + reverseWords(tc.s) + } + } +} diff --git a/Algorithms/0563.binary-tree-tilt/README.md b/Algorithms/0563.binary-tree-tilt/README.md new file mode 100755 index 000000000..424cf7545 --- /dev/null +++ b/Algorithms/0563.binary-tree-tilt/README.md @@ -0,0 +1,33 @@ +# [563. Binary Tree Tilt](https://leetcode.com/problems/binary-tree-tilt/) + +## 题目 + +Given a binary tree, return the tilt of the whole tree. + +The tilt of a tree node is defined as the absolute difference between the sum of all left subtree node values and the sum of all right subtree node values. Null node has tilt 0. + +The tilt of the whole tree is defined as the sum of all nodes' tilt. + +Example: + +```text +Input: + 1 + / \ + 2 3 +Output: 1 +Explanation: +Tilt of node 2 : 0 +Tilt of node 3 : 0 +Tilt of node 1 : |2-3| = 1 +Tilt of binary tree : 0 + 0 + 1 = 1 +``` + +Note: + +1. The sum of node values in any subtree won't exceed the range of 32-bit integer. +1. All the tilt values won't exceed the range of 32-bit integer. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0563.binary-tree-tilt/binary-tree-tilt.go b/Algorithms/0563.binary-tree-tilt/binary-tree-tilt.go new file mode 100755 index 000000000..2a6e66299 --- /dev/null +++ b/Algorithms/0563.binary-tree-tilt/binary-tree-tilt.go @@ -0,0 +1,30 @@ +package Problem0563 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" +) + +type TreeNode = kit.TreeNode + +func findTilt(root *TreeNode) int { + var tilt int + helper(root, &tilt) + return tilt +} + +func helper(root *TreeNode, tilt *int) int { + if root == nil { + return 0 + } + + l := helper(root.Left, tilt) + r := helper(root.Right, tilt) + + if l > r { + *tilt += l - r + } else { + *tilt += r - l + } + + return l + r+root.Val +} diff --git a/Algorithms/0563.binary-tree-tilt/binary-tree-tilt_test.go b/Algorithms/0563.binary-tree-tilt/binary-tree-tilt_test.go new file mode 100755 index 000000000..c95ccc6b2 --- /dev/null +++ b/Algorithms/0563.binary-tree-tilt/binary-tree-tilt_test.go @@ -0,0 +1,50 @@ +package Problem0563 + +import ( + "fmt" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + pre, in []int + ans int +}{ + + { + []int{1, 2, 4, 3, 5}, + []int{4, 2, 1, 5, 3}, + 11, + }, + + { + []int{1, 2, 3}, + []int{2, 1, 3}, + 1, + }, + + // 可以有多个 testcase +} + +func Test_findTilt(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + root := kit.PreIn2Tree(tc.pre, tc.in) + ast.Equal(tc.ans, findTilt(root), "输入:%v", tc) + } +} + +func Benchmark_findTilt(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + root := kit.PreIn2Tree(tc.pre, tc.in) + findTilt(root) + } + } +} diff --git a/Algorithms/0564.find-the-closest-palindrome/README.md b/Algorithms/0564.find-the-closest-palindrome/README.md new file mode 100755 index 000000000..65dfc6b20 --- /dev/null +++ b/Algorithms/0564.find-the-closest-palindrome/README.md @@ -0,0 +1,23 @@ +# [564. Find the Closest Palindrome](https://leetcode.com/problems/find-the-closest-palindrome/) + +## 题目 + +Given an integer n, find the closest integer (not including itself), which is a palindrome. + +The 'closest' is defined as absolute difference minimized between two integers. + +Example 1: + +```text +Input: "123" +Output: "121" +``` + +Note: + +1. The input n is a positive integer represented by string, whose length will not exceed 18. +1. If there is a tie, return the smaller one as answer. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0564.find-the-closest-palindrome/find-the-closest-palindrome.go b/Algorithms/0564.find-the-closest-palindrome/find-the-closest-palindrome.go new file mode 100755 index 000000000..7a0617257 --- /dev/null +++ b/Algorithms/0564.find-the-closest-palindrome/find-the-closest-palindrome.go @@ -0,0 +1,81 @@ +package Problem0564 + +import ( + "strconv" +) + +func nearestPalindromic(n string) string { + size := len(n) + + // 收集所有可能的数 + candidates := getBitChangeCandidates(size) + candidates = append(candidates, getCanidates(n)...) + + num, _ := strconv.Atoi(n) + delta := func(x int) int { + if x > num { + return x - num + } + return num - x + } + + // 从中挑选符合题意的那一个 + res := 1<<63 - 1 + for _, cand := range candidates { + if cand == num { + continue + } + + if delta(cand) < delta(res) || + (delta(cand) == delta(res) && cand < res) { + res = cand + } + } + + return strconv.Itoa(res) +} + +func getCanidates(n string) []int { + size := len(n) + prefix := n[:(size+1)/2] + p, _ := strconv.Atoi(prefix) + + res := make([]int, 3) + ps := make([]int, 3) + res[0], ps[0] = p-1, p-1 + res[1], ps[1] = p, p + res[2], ps[2] = p+1, p+1 + + if size%2 == 1 { + for i := range ps { + ps[i] /= 10 + } + } + + for i := range res { + for ps[i] > 0 { + res[i] = res[i]*10 + ps[i]%10 + ps[i] /= 10 + } + } + + return res +} + +func getBitChangeCandidates(size int) []int { + base := 1 + for i := 1; i < size; i++ { + base *= 10 + } + + res := make([]int, 4) + res[0] = base - 1 + res[1] = base + 1 + + base *= 10 + + res[2] = base - 1 + res[3] = base + 1 + + return res +} diff --git a/Algorithms/0564.find-the-closest-palindrome/find-the-closest-palindrome_test.go b/Algorithms/0564.find-the-closest-palindrome/find-the-closest-palindrome_test.go new file mode 100755 index 000000000..564729ac8 --- /dev/null +++ b/Algorithms/0564.find-the-closest-palindrome/find-the-closest-palindrome_test.go @@ -0,0 +1,94 @@ +package Problem0564 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + n string + ans string +}{ + + { + "9", + "8", + }, + + { + "99999999999999999", + "100000000000000001", + }, + + { + "8888", + "8778", + }, + + { + "100000000000000001", + "99999999999999999", + }, + + { + "77777", + "77677", + }, + + { + "9999", + "10001", + }, + + { + "121", + "111", + }, + + { + "2", + "1", + }, + + { + "10", + "9", + }, + + { + "1", + "0", + }, + + { + "4321", + "4334", + }, + + { + "123", + "121", + }, + + // 可以有多个 testcase +} + +func Test_nearestPalindromic(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, nearestPalindromic(tc.n), "输入:%v", tc) + } +} + +func Benchmark_nearestPalindromic(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + nearestPalindromic(tc.n) + } + } +} diff --git a/Algorithms/0567.permutation-in-string/README.md b/Algorithms/0567.permutation-in-string/README.md new file mode 100755 index 000000000..76558cfbc --- /dev/null +++ b/Algorithms/0567.permutation-in-string/README.md @@ -0,0 +1,29 @@ +# [567. Permutation in String](https://leetcode.com/problems/permutation-in-string/) + +## 题目 + +Given two strings s1 and s2, write a function to return true if s2 contains the permutation of s1. In other words, one of the first string's permutations is the substring of the second string. + +Example 1: + +```text +Input:s1 = "ab" s2 = "eidbaooo" +Output:True +Explanation: s2 contains one permutation of s1 ("ba"). +``` + +Example 2: + +```text +Input:s1= "ab" s2 = "eidboaoo" +Output: False +``` + +Note: + +1. The input strings only contain lower case letters. +1. The length of both given strings is in range [1, 10,000]. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0567.permutation-in-string/permutation-in-string.go b/Algorithms/0567.permutation-in-string/permutation-in-string.go new file mode 100755 index 000000000..c0cca01ce --- /dev/null +++ b/Algorithms/0567.permutation-in-string/permutation-in-string.go @@ -0,0 +1,34 @@ +package Problem0567 + +func checkInclusion(s1 string, s2 string) bool { + n1 := len(s1) + n2 := len(s2) + if n1 > n2 { + return false + } + + h1 := 0 + h2 := 0 + for i := 0; i < n1; i++ { + c1 := s1[i] - 'a' + c2 := s2[i] - 'a' + h1 += 1 << c1 + h2 += 1 << c2 + } + + if h1 == h2 { + return true + } + + for i := n1; i < n2; i++ { + cb := s2[i-n1] - 'a' + ce := s2[i] - 'a' + // 利用 cb 和 ce 更新 h2 + h2 += (1 << ce) - (1 << cb) + if h1 == h2 { + return true + } + } + + return false +} diff --git a/Algorithms/0567.permutation-in-string/permutation-in-string_test.go b/Algorithms/0567.permutation-in-string/permutation-in-string_test.go new file mode 100755 index 000000000..06630129f --- /dev/null +++ b/Algorithms/0567.permutation-in-string/permutation-in-string_test.go @@ -0,0 +1,70 @@ +package Problem0567 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s1, s2 string + ans bool +}{ + + { + "xuumbjffxuzovdwrnolopeingppzgorotzdqfprokkmucxwsub", + "jpdojwinknmyeorfdhpsysyealozhgbapagzjsivbxmcyijlbdafupblrawguoazuzcqupobxayrkpqxawytdsdznljnxulaugewrbjmkslsrllixpkuvorhnnhkzikovsajrbhjdybocvjloqiikidsnwcubhliajwwqkpqaugidhfxqfxrkluvadcdmekdhckszpojvwpiquazmaecaxxwsnswzxbctqeqhjsrgnjsjmaqbexexuwgfglixsthifevokdgexxkdmzaxrcilmthzemuomexwzipzivdyxqnvgzpjavonrkobmgkormdmfiwwalgdzwlngkrjmdwkknajqatghoddybqfkorhpmrkfcfwsaproaenfedvfendprnlpmuqklsqrsjuejyxulfuhdsyolthhhfhmxorojnjsvqyworupkdzhyqkzikvhltfsrhrecmyyddtinphjsmmbdtrouyifvsvvlamwhkffrrywdiawpvxwcwfkcunbjaelbcmdwczikkfelahowtbwqbdcjggnmknfhjdtusfjotsbjgtlnuonlxjlcwyqiffktonvtrkcogosfbcvcosktnvbeitxuqpexxejnklndzbtzlzeebwufoiwqqcoemnshcpovntjgidophekyntcsrwzvovwmostqudxgeaowehcmqmdrllovmmbgqhaxrqluizhhhslystwkhckjtosnomfvyibkasycxnnmvkbwkbhzeayezughsmqovogrnihjgetsdvhymjmnijzwvpasurcaybmyzfbqepjsdqwmkmomzkociaqtnkwiguylhwxrfamyxjvfxwonwblidvcsenvwigjjqdsnnydlgdhlsdtonvuapzaozkdtyiartimmpwgotnwpiwimbdunqfickerusbvrqwazvnwgdczvnqtigjmkjgsridfulxjekazzqkdynyuutyoffhntfbcruhrmnhhjyyzfszbaqykgnroepiovqqlhdtkizvpivukdutitwzhapvcyfghqvtjyyrdbctvdccoxjtsovdosbyqaiffumnrfokrbgvedxbcytvbcaeoviutdmxwfhxgchnusazcztitxgyjrkjdmajbndlemsnpjwzgvpitrfrjoxivhisgkzncmkewphusvaycteennpltuevohegzvafwxuebmovgkpwlgyoutsbbgxoxdzyisersgaqcnnjnjtjwufqscjzccudbkdcnmorpmraqapvirijlpretmezlrbdvnfixvmalzmgrhwpkhisaztpsgvlooqxezzscjrtnmmctoyinjermwrrmjlfbizryripnarkvnabdizzereczdnbkojpfmxhlfvlztmzpskwttzyusxaudprxpbpihorlipzpdiucpvrqlscmoipvdzsrowjrwmxzomtcxxehrmcaxmtifcvftywjkzgdsohvomcthhylzpijujfyysbientozyirurugevubxpdpbihrudvgdmhwyxuhyorvufffqzifwzszmfswhkesywfyozffzarrklnxppymoaslqctlfbtrykccmgmhrdacuelfrbflsjxhdagaevscxerljtxnwodtfioyxjoaxyhzjmttvflfhqvvcbwvmnulcsubtwngjvomqkqrjtntkzuclolcjmiypjilgvezphjqrjetqnaccrjmxydmmkbmuyxwotfynptdotuaxpxzgjulwgwfbprzolxablskvidnmnzcofemsodetsiubqrvtbkshuokkuomjezwbmtcjvapnlsmutehyfxaqjqlibfzitcfhuivmmclulnrwyknbymyfcwbgyxtavcaebvfwlkikylkrpcfappcamnjenpggoxcrpxdbqjqzrdvnfzxuxuaixbpiqmitzhefcgyhzayemxgrtdoiryqguiexsrysetobkqnfphdechsgoqvmdhurzhvflsbxsdjemmvlzpthrjizfcayxemztvszhhpfvvjgoejrjnmyvxstpejfmiukuocmrgvinqifpdcqvwfddoiyopbzverxwcqdyoqzeqcjcwmojbhcnrksebanfpdhhpiaguxracnxzttbjgruczuhwwjbmznzgdijyemrwcawodqftjtlyozqwwchxtlvlnjqwklmbzirfhaquiltdijijeglroopaagmyrkhqbnkhbxvguodmmszfoomhfvwjsnrmmzjuyxhotehlezyyiptzububvazwzziskqagtpthflchvvanpugjpeoipecmvgkocylsqduwbreeifhjdomajmnbwrmxuhvvjnfblyvtveqalkqlbxkxvmxfefvijptnpvhmgmotrvsxmarhkspdlybniuoxycahgisvnrlrukendhsxvvcqzinnbkryzwbnktsgfwxjklrcgvtrzvkqfbhctljoijsvxbnwiunrasctvuetwvzdulmlnxeivsvujihlmjroxntmgkecjkimcsvfesfeursbuchaexgpyqakllumehlfdkuzbnulwfdacxjalozmrneqtjvdpgkcwnrkuhhqbnpedmysjqcrdqaawiwcucuzlbkwozlgrgcroyebklrwzkqicuqezkswayknmcytcsrtkxkfwxmimpolrqzjwfdzmlkpinifykobpvqlzqrcliorfqygytfgpdociwflhwpuuumrwnhrkpnteqacxejyulkccgxtnsfhuuahifvsshkwrkhptqvcmylyvvykwjhgknmsuolomginxdfwvqpfwlpwvommjjymsunxmbjxlcznmefzvuckeqfpighnxzxdpdlcifxbzldjctrswxmrxcjbbtivfnwqelhkmbunsroodysywhjsysajsrngtsvimguuwaicmuqzmafocvdzudgkmmvhydmafxqrrpkvvnnjyzohjwtjgqbrptggknxpuatfycatgimywhbafhjazjklgzxaiecmqbqgwgdepfspuxakrowawfolujdcyqsmakrkiqiduitooygdduztcquxqyraxhwjkvybbyiksqyqxqfmyzjyxxrxktmfklcjsjeijjflvtjayqlfuqtacxrfbrsdqtuwmflpdtxtjezsgeoeeyhcpncbknslbexvicfxslnqbelcfjonoakbitkizdlmusmydyajmiiouvqhhpmjspwoprvajocrloqydqbrgzxqafbfonuvecxjcrpoiorfqxofionzmomccxkhjqzkvpdevkwpsikonjxfthvtorexdyntvhttbtygzmtrrzprsgqnvbzhxuiruhugtaogfrjqdxnilxatjyltpbchjlkajaxefdjjwhqzjeejznbjkhdjqoltccfgosuuxodgyhvufwdrdxtpuvxlthxibekzkdoufkbstuxhwukrfaqsbratipaaxjawndpognykgltxofqbypomdpdsgncggpoddzbobloikifupdfgytydhxoxtcyerqpgezsddndikvcwufcefpdkdgvrlmvoiadawofsuyezliebpixyqboteavtvqeojxmemrdbptsxdckszxjgveaqngboxfdxqdgddczdzpyhlztthvbzgutaioqswwpzupddayzktwvqyvxcflmolxyewseqrrvpovpeftwgiywoyflwejpffxpubejlwmazjzfcldadgnkkjtmxktuzlocvqhjajqrfrfaloychnmokakwsfkrtacwjgsieptnujtgbbwzllvkpeuewegmkchhaaaptmbmoybtdotctkfyumafregkthibmufiudjrcohdhuhlpjeishhekicdfiiostjmofwhreoegrnbqgkhmiezgtasdaqdcixsrdfdsfcrgjaryeqtkussultserwmyealuvxckhcgojsxzsfxmrtcfhqpowalbbzvpcltiwdhexbvcjojdptxeplgestsnpmpibymzaolqaybmeezyagvvftcuqgqrpjauxjnmudeasbpeormqofrbmmgorysyztkbloyfjikxdrytsdfdrjagghbbjqkujemzvvtioluzitrmaxjphducstlearfirqknijfdurdztizvwoeqzamxkbbvmnbxomhsxfmwdhocdyabcygzojqebxferyieqfislcpwiaadbarnsgnuvhkaidexxcgxhmvsiwqhoxkjwvycbyaqiddlrgsvqvzkvqzeewbxnfqlhavmqyucnnlskzyhwlnpglakbstcsnmsipeekjbwvokjjasfcruinzkcmjtkuztnglqakavnjmvccjgquzfftcqzwnrvywoqxhzbkbjufjuyqqqtaoakzbykeraqalcqzuhjndgusnvdanqrwemqsmcwxelogrfxxsdyzlbfuvopxsyzuizshrtauculajiapoentvnkxpvyfxfecjolvlezsmfmibhptmgdkiucnsralqhtutgvnpzicjwcgrtcgyueuqsxnyspxmnzhupjwalphkutczrptfxsvgeikwqqhesezmkoliizhceciotrcrjhunyfnpeyrnmucyhkozbipsmuqfgujshzhzuxextaapmrbhvexaqyifwrodhftkwbpyndylvfukebddabmjperimjtzeeqwmjzjxjrqglwcsuxinztzxpzfdlirmyroecjkimmgnybedfhssjfzzdnqlzihfgobikowitiqdyzlhxbxifamfkeienxqvcmvhzixicqlylurlfnzbrfoztfjxswwlxkvrhueccohddaazuluirluhzliuqeqiajvmvtbpibfhiulyagqfowibqjkjewqminwsuupmxnijyrbiodfknndgpfiannwlkillxmirfqmmoktexmoqxqujogmxjmkenfphffmdfablsaqxufjwvmufogrzjarlopjhidbfbhoivkknzgqresjprfknjetohwtqurxyngxilywmbgpsctswswwkasyisochqeslbiunnbgxsgzwkopnhgdjyuherwtrkypbjrdesztgkxzueqrhhicwndmidmqahdwcycqpgtuildbowqhjaqnmblbnvvsxahycecvfnbvqzcjburykyjkgazgauobvieoerphnehdjxfianvcaasrctenrcwcgzcqbzufwsqllzbxnjzktgermrodlzuvkdblqcwbfjevjkygbgoalqyibexruhsxsowmchcogiffedbuddithpwocmovwbpvxzhwmyzpuwdhrorlqxxtqtwswmdcszbxwyirhpwjjulqoovmgqydxctjrnncsfevitouvdvsgdftpyjztxrxhuggdtyfandnuvufixthdxidrlzzkssngvrmtkwzifwjoqyawcohqxrucjixdcrhgybujxpbjfwxunbbotjlijfagrdsbeemkvgaebuagweegcgpoleicaakefhgvgjislsamatuqmmjisifffwmigqwxaywwmoyzarwtpiimekzofbycyoqznbnqwnncmzoiwpjgpymvynrgasxpekunmzksdrfxlyxewqmfoeufccrwevhhxxjqzkptkctaqerwotatqgkbnjqbpfyglucttnmxpxrrjhglbmzzjtyupaexfismwrvfgtunlriabhhyklpmevgmltnkdttjmemegytzzikcykidlasvugyzfaozknksednbsdcfnfwtozioavvipvsrkztslcxqgrccocxtwnxobbhidcublbnpwhohqjcxwfftmptlwtpjugbchgxahplumbjqjfvljhqzmbdsdeemxevugsthrveucyqxdktkdymznwdvkuoytvfrrfzrmlnedhckhngadcpugwzfupcudmukkpzrtdqvpcpzspuhdfoeojybisjmcjmcyhiiqjnfkcpepbflwfwmorpgwumlzynzpbbvvrgtxpsgzdelmlohavhyqhrfztmncnllnfdgdotoiojwtwilwwdszhcqbkdwtyrurxkzgcwrcvqlhynujihfdbwnnhkwdmfwciurvrqkmyghvhftbfhjogfrrslmuzussufwkkiewfevkvgalhyutnfxzgxbifjhbqolbsanvwkhyfxywfbvxvoiwcqhvdypwpgquutrugldizlvqaeeboriznjxovvmbwqyrxmxqilplplszubphmeszzrfjoliuskludoukazpiezpzucrsiiiichlxthowlcbmmfnyjyylgrcseraqtwodnxvugpysbosancqgzmxinonoeqmvyumsdwjncgztbepamqupqvxzudrniawehxilhybtdsupswxzjfhhchdeqoidvigjhkonfrdskxvoskgezzhhcpcfodahrlnkoldcdomllfcywrtqofedeychinhsvcssmgbadabdgyvmscucbckahgjawopdwlixbkmlxcpxtaqoempcldkefcerzeiowhgyhreveztowuigsgwcvdjahrfvrvvubliwretdwqslwgusqoqcczbzdalaocaarmtqhgjtzjjwnntuezwioelmwxnvnfeeggjljuybgshzeqsongxutyjovbklauknymkkkmnnwqxixaiwaxfbysglyvazrrcqcbgepgegwlmtycljiaqivlscezkquxkgzubqnbdsfxditryyagiihyoqdhtudnfmkwaohttygtwesumjjivazppjzkbdywdfudbjkubytrfasxkxqmdgnirqronvypulppeaqbjimtvffglxvihsvesvhbagtuikytbocsjnxfoxmtwpfwcdadliexyisjopbkqbjhlflqyxnjdkqndjpbdehwfsljapruwbslzchkyvsmcvocictzqxcktfmoathqnxmlqirfjezhqbboupnzlyqmiqiqkkbhwhpcyibipmizzxhlbjffxdzigymhjgyowmrjouvfjwgyzdovyslmfbplvjnqvfdbfeqvugoqdzvtggrpueutlljsfgudmgrzjqiaghatyzwjbkxxadrwjohhqmnwrswodapavdwyvwicbignxagbqodjeihgvwbdlexjcrltkidjdzjjteihgwedogtxafmajjgfgprbtbktqvirgxvvakqhbvgizxdgmabszclfbkrchaubgcobhpqrtfjbjzhpllxyvuqinnnkzdwqxzjjbniytymygnjzmklhpvazfqcdhafvoxlkxnvsmzfhjcqwdzqmlblhduduwbpbwonfmfwwbvhbgoyhwlmlxfnhlfpzwiybgeqghufeqilmdxzcdwrdwiculhnhzxybxvkwpjbwyprvtphhhqsnukanpnzoxtumxwlgostwbgqmtvdzsecquyrircmlckkzviczrvtkzyazlihddrlohyrovhprvcsmjrbxjaivvgolidxbyvxgkflallznsylhuzrkhrvfakpbhwhrgtwnlczewkyxhcturbfbfvlwvhaykumdftqbkmdxutbnphdsgplxxsdkcfouaprhecugnzdsjdyjkkuvtjtberlrwxhddmshcoyzlrgwugpnozubiglbcjwxjnvnmnbdtvlfbqqijwmdkrzslhsvnxnrsdbkbyxfkluvtofyesakxclxvodsuxwlyqkoyhynxfmpvmecqxxasvmsdrandljnyeepxaiwdvmmrzxstnzzfkxjsflkkrabqkicjutpyrbaewqzwfwdhzjqibmqhhzbnoaucsbpjtvvumkpaehnxxsjgkfpbfannzznhylowtsnilprqrbohrmcucboxzqwnbkbkgldydkqqqgjbtxavejjlxfqweybeaczszapiqiqoqwzhrvnjlmjmdmyyziqcusbpyxqwetclyrhfjrgzxbydajuqnbxhmjgenskqjikmgqlpbmsvuuxehfbydyqvgdfnkdqhlptgaollttiduybwqgaaatmcvdhagbusjrjigyhcphyhowixnezvioigsjdosikthzijrdvsfabprlcmjtjekculxcoyvypsozolqezlgunkhsftyjrffpfkuxbuoolragvarmtjozwqfiqdlaldxdauwzdrlhxlghtovdwesahmzklfoywukjufdiyiepnyjqzqbvomvefaahlnbgjhvumffksfvomrbnfstssvdgpubtmglxicclsijqumvibauoaxvgteljaajfcrqadkxbqrgbwaihxdsaisopmmwbzddapbczwnfnxspgtajjswcubnspwxglemattdgijkavsoanafyrkczcvmxzciuvtiwnraibtfrdqcntksioxjlzstxivizavgurmvwphdfxcvwqicctqicommgehtlunpbknkkklbzcjrxcxjchbszlqhtcdkzbdktkffbbwufcvscjsaraktaatyexzjxvxvoyyzivxpmwuxxkjdkrrmfegzkevmaeotwvpcrjtbfsblfdebacvomgtudrlcrjktvwdaerlafaqfcopbqxujngvxmjelcuesauyxuazrhiztlapgvsdenyqpafckjzohjjbdosjyvombptrppmanummqvahchtqkjdppwwskbygzaqpjlxkiposgfwltwlkvowynkcytprknckyppzvjjqaqibhakstpgkpbhviuqdrnsazdfptdmheqeusmkskdldaqnxthokukmhcpssjrtjnemyvlsaeryoeiclipnrjmbiyzpzfprjeyhphuqtdgqsgmicalezpyoakygeorrhzuyzhqqddhrygeybtoanobkvbfgpchrbtqbampimgefkyrkdfqgwyulvqbzljzbrisjugfjpruwilxneypgflzfldsbkpymcmxfpedmwogtxqrifposbwmohakknpkdbdycsgetahejtlqjaoumqyjbxywbmpbtcgquedhtfbbptomabbnahguvzsayqgvqxolvuflfjfhvmilqdzwqusvlcgemlaouwlgluuqtrqlhwooretsjjtnpnvrpnicakqcfuxotzmvqhsvoptvqiletevbhfbrolhijwidauovqlnqwmwvfoxljrbjtbwuazkhpnxntigrbdlhwbtwtzlnginyooppgpilsuzzjvfhanrggtxcjfxmvgbfsipktduomcoukthptkxahkkivmbnikapysfahapdembxvuakdniziuslabaotlifsolqboplhuasrlawpjsjaheapmubdtysalursciiukkgtrkzmqaltyksvdmomgydqqswpkqmewzzyxifqiivisommszulngjdsovkgsahicjhnlxqutcsyhfhxxyamenvwbruzzkywgmcmnqzvkindlsworliooqshsbxvoctrjionbzsihjhfitybhqyajludzdmitakuritzrgpdkvqptsmrqojcagmrhjppgsovqgrgjzdpzmjcrjbqprzbuufhwjlfgjwokimhvihgkgnkuajkpfsbiragdwbggbjesipyihpinhcrhpobdiaasfdivbsjpqeobgbzszqdkoixnhihncdutlggytzukcbtrdvxgbdllkswarjqehcdddgqdvwxgjtyymecyvqsutnpnwygxvlxxrpggidpmoygidulrdnixkuuiwmigcsntnlvomivajdmmopbyqljbmkqueawblhaicmshjhwnxieiftzjwwrwameuuzcoqiuibpcsaajzdciyxsqaeubgixinvwlecbkrctrwtoskgbdjbyjlgvmydlqrymdhyfdqawurvxprrnfnymfuvenrfdwpnxfqsbylqfokjnmpvnrtoqnhzpgzsebieouetuuruwenrjbuwondepkkuvxfzyswbnlykxglazitalhyhtksszzhglorprfobxkihnwxghhybaaspqmucv", + false, + }, + + { + "sitting", + "kitten", + false, + }, + + { + "kitten", + "sitting", + false, + }, + + { + "ab", + "ab", + true, + }, + + { + "ab", + "eidbaooo", + true, + }, + + { + "ab", + "eidboaoo", + false, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, checkInclusion(tc.s1, tc.s2), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + checkInclusion(tc.s1, tc.s2) + } + } +} diff --git a/Algorithms/0572.subtree-of-another-tree/README.md b/Algorithms/0572.subtree-of-another-tree/README.md new file mode 100755 index 000000000..26d0d5aa2 --- /dev/null +++ b/Algorithms/0572.subtree-of-another-tree/README.md @@ -0,0 +1,47 @@ +# [572. Subtree of Another Tree](https://leetcode.com/problems/subtree-of-another-tree/) + +## 题目 + +Given two non-empty binary trees s and t, check whether tree t has exactly the same structure and node values with a subtree of s. A subtree of s is a tree consists of a node in s and all of this node's descendants. The tree s could also be considered as a subtree of itself. + +Example 1: + +```text +Given tree s: + 3 + / \ + 4 5 + / \ + 1 2 + +Given tree t: + 4 + / \ + 1 2 + +Return true, because t has the same structure and node values with a subtree of s. +``` + +Example 2: + +```text +Given tree s: + 3 + / \ + 4 5 + / \ + 1 2 + / + 0 + +Given tree t: + 4 + / \ + 1 2 + +Return false. +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0572.subtree-of-another-tree/subtree-of-another-tree.go b/Algorithms/0572.subtree-of-another-tree/subtree-of-another-tree.go new file mode 100755 index 000000000..f66497eb4 --- /dev/null +++ b/Algorithms/0572.subtree-of-another-tree/subtree-of-another-tree.go @@ -0,0 +1,25 @@ +package Problem0572 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" +) + +type TreeNode = kit.TreeNode + +func isSubtree(s *TreeNode, t *TreeNode) bool { + if isSame(s, t) { return true } + + if s == nil {return false} + return isSubtree(s.Left, t) || isSubtree(s.Right, t) +} + +func isSame(s *TreeNode, t *TreeNode) bool { + if s == nil {return t == nil} + if t == nil {return false} + + if s.Val != t.Val { + return false + } + + return isSame(s.Left, t.Left) && isSame(s.Right, t.Right) +} diff --git a/Algorithms/0572.subtree-of-another-tree/subtree-of-another-tree_test.go b/Algorithms/0572.subtree-of-another-tree/subtree-of-another-tree_test.go new file mode 100755 index 000000000..1c7af8480 --- /dev/null +++ b/Algorithms/0572.subtree-of-another-tree/subtree-of-another-tree_test.go @@ -0,0 +1,73 @@ +package Problem0572 + +import ( + "fmt" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + spre, sin []int + tpre, tin []int + ans bool +}{ + + { + []int{1, 1}, + []int{1, 1}, + []int{1}, + []int{1}, + true, + }, + + { + []int{3, 4, 1, 2, 5}, + []int{1, 4, 2, 3, 5}, + []int{4, 1, 2}, + []int{1, 4, 2}, + true, + }, + + { + []int{3, 4, 1, 5, 2}, + []int{1, 4, 3, 2, 5}, + []int{3, 1, 2}, + []int{1, 3, 2}, + false, + }, + + { + []int{3, 4, 1, 2, 0, 5}, + []int{1, 4, 0, 2, 3, 5}, + []int{4, 1, 2}, + []int{1, 4, 2}, + false, + }, + + // 可以有多个 testcase +} + +func Test_isSubtree(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + s := kit.PreIn2Tree(tc.spre, tc.sin) + t := kit.PreIn2Tree(tc.tpre, tc.tin) + ast.Equal(tc.ans, isSubtree(s, t), "输入:%v", tc) + } +} + +func Benchmark_isSubtree(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + s := kit.PreIn2Tree(tc.spre, tc.sin) + t := kit.PreIn2Tree(tc.tpre, tc.tin) + isSubtree(s, t) + } + } +} diff --git a/Algorithms/0575.distribute-candies/README.md b/Algorithms/0575.distribute-candies/README.md new file mode 100755 index 000000000..e6cbde5eb --- /dev/null +++ b/Algorithms/0575.distribute-candies/README.md @@ -0,0 +1,34 @@ +# [575. Distribute Candies](https://leetcode.com/problems/distribute-candies/) + +## 题目 + +Given an integer array with even length, where different numbers in this array represent different kinds of candies. Each number means one candy of the corresponding kind. You need to distribute these candies equally in number to brother and sister. Return the maximum number of kinds of candies the sister could gain. + +Example 1: + +```text +Input: candies = [1,1,2,2,3,3] +Output: 3 +Explanation: +There are three different kinds of candies (1, 2 and 3), and two candies for each kind. +Optimal distribution: The sister has candies [1,2,3] and the brother has candies [1,2,3], too. +The sister has three different kinds of candies. +``` + +Example 2: + +```text +Input: candies = [1,1,2,3] +Output: 2 +Explanation: For example, the sister has candies [2,3] and the brother has candies [1,1]. +The sister has two different kinds of candies, the brother has only one kind of candies. +``` + +Note: + +1. The length of the given array is in range [2, 10,000], and will be even. +1. The number in given array is in range [-100,000, 100,000]. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0575.distribute-candies/distribute-candies.go b/Algorithms/0575.distribute-candies/distribute-candies.go new file mode 100755 index 000000000..841de2871 --- /dev/null +++ b/Algorithms/0575.distribute-candies/distribute-candies.go @@ -0,0 +1,19 @@ +package Problem0575 + +func distributeCandies(candies []int) int { + n := len(candies) + + r := make(map[int]bool, n) + for _, c := range candies { + r[c] = true + } + + return min(len(r), n/2) +} + +func min(a, b int) int { + if a < b { + return a + } + return b +} diff --git a/Algorithms/0575.distribute-candies/distribute-candies_test.go b/Algorithms/0575.distribute-candies/distribute-candies_test.go new file mode 100755 index 000000000..17fd278cc --- /dev/null +++ b/Algorithms/0575.distribute-candies/distribute-candies_test.go @@ -0,0 +1,49 @@ +package Problem0575 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + candies []int + ans int +}{ + + { + []int{1, 1, 1, 1, 1, 1}, + 1, + }, + + { + []int{1, 1, 2, 2, 3, 3}, + 3, + }, + + { + []int{1, 1, 2, 3}, + 2, + }, + + // 可以有多个 testcase +} + +func Test_distributeCandies(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, distributeCandies(tc.candies), "输入:%v", tc) + } +} + +func Benchmark_distributeCandies(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + distributeCandies(tc.candies) + } + } +} diff --git a/Algorithms/0576.out-of-boundary-paths/README.md b/Algorithms/0576.out-of-boundary-paths/README.md new file mode 100755 index 000000000..59b635fdc --- /dev/null +++ b/Algorithms/0576.out-of-boundary-paths/README.md @@ -0,0 +1,35 @@ +# [576. Out of Boundary Paths](https://leetcode.com/problems/out-of-boundary-paths/) + +## 题目 + +There is an m by n grid with a ball. Given the start coordinate (i,j) of the ball, you can move the ball to adjacent cell or cross the grid boundary in four directions (up, down, left, right). However, you can at most move N times. Find out the number of paths to move the ball out of grid boundary. The answer may be very large, return it after mod 109 + 7. + +Example 1: + +```text +Input:m = 2, n = 2, N = 2, i = 0, j = 0 +Output: 6 +``` + +Explanation: +![p1](https://leetcode.com/static/images/problemset/out_of_boundary_paths_1.png) + +Example 2: + +```text +Input:m = 1, n = 3, N = 3, i = 0, j = 1 +Output: 12 +``` + +Explanation: +![p2](https://leetcode.com/static/images/problemset/out_of_boundary_paths_2.png) + +Note: + +1. Once you move the ball out of boundary, you cannot move it back. +1. The length and height of the grid is in range [1,50]. +1. N is in range [0,50]. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0576.out-of-boundary-paths/out-of-boundary-paths.go b/Algorithms/0576.out-of-boundary-paths/out-of-boundary-paths.go new file mode 100755 index 000000000..fda614e61 --- /dev/null +++ b/Algorithms/0576.out-of-boundary-paths/out-of-boundary-paths.go @@ -0,0 +1,46 @@ +package Problem0576 + +const mod = 1e9 + 7 + +func findPaths(m, n, N, i, j int) int { + dp := [50][50]int{} + + for k := 0; k < N; k++ { + prior := make([]int, n) + for i := 0; i < m; i++ { + for j := 0; j < n; j++ { + paths := 0 + + if i == 0 { + paths++ + } else { + paths += prior[j] + } + + if j == 0 { + paths++ + } else { + paths += prior[j-1] + } + + if i == m-1 { + paths++ + } else { + paths += dp[i+1][j] + } + + if j == n-1 { + paths++ + } else { + paths += dp[i][j+1] + } + + paths %= mod + prior[j] = dp[i][j] + dp[i][j] = paths + } + } + } + + return dp[i][j] +} diff --git a/Algorithms/0576.out-of-boundary-paths/out-of-boundary-paths_test.go b/Algorithms/0576.out-of-boundary-paths/out-of-boundary-paths_test.go new file mode 100755 index 000000000..9e6175b6c --- /dev/null +++ b/Algorithms/0576.out-of-boundary-paths/out-of-boundary-paths_test.go @@ -0,0 +1,61 @@ +package Problem0576 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + m, n, N, i, j int + ans int +}{ + + { + 1, + 3, + 3, + 0, + 1, + 12, + }, + + { + 2, + 2, + 2, + 0, + 0, + 6, + }, + + { + 7, + 9, + 10, + 6, + 7, + 27982, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findPaths(tc.m, tc.n, tc.N, tc.i, tc.j), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findPaths(tc.m, tc.n, tc.N, tc.i, tc.j) + } + } +} diff --git a/Algorithms/0583.delete-operation-for-two-strings/README.md b/Algorithms/0583.delete-operation-for-two-strings/README.md new file mode 100755 index 000000000..e9c4f04fb --- /dev/null +++ b/Algorithms/0583.delete-operation-for-two-strings/README.md @@ -0,0 +1,22 @@ +# [583. Delete Operation for Two Strings](https://leetcode.com/problems/delete-operation-for-two-strings/) + +## 题目 + +Given two words word1 and word2, find the minimum number of steps required to make word1 and word2 the same, where in each step you can delete one character in either string. + +Example 1: + +```text +Input: "sea", "eat" +Output: 2 +Explanation: You need one step to make "sea" to "ea" and another step to make "eat" to "ea". +``` + +Note: + +1. The length of given words won't exceed 500. +1. Characters in given words can only be lower-case letters. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0583.delete-operation-for-two-strings/delete-operation-for-two-strings.go b/Algorithms/0583.delete-operation-for-two-strings/delete-operation-for-two-strings.go new file mode 100755 index 000000000..be027fe02 --- /dev/null +++ b/Algorithms/0583.delete-operation-for-two-strings/delete-operation-for-two-strings.go @@ -0,0 +1,29 @@ +package Problem0583 + +func minDistance(word1, word2 string) int { + n1, n2 := len(word1), len(word2) + + // dp[i][j] == k 表示 word1[:i] 和 word2[:j] 的最大公共子序列的长度为 k + dp := make([][]int, n1+1) + for i := range dp { + dp[i] = make([]int, n2+1) + } + + for i := 1; i <= n1; i++ { + for j := 1; j <= n2; j++ { + dp[i][j] = max(dp[i-1][j], dp[i][j-1]) + if word1[i-1] == word2[j-1] { + dp[i][j] = dp[i-1][j-1] + 1 + } + } + } + + return n1 + n2 - dp[n1][n2]*2 +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} diff --git a/Algorithms/0583.delete-operation-for-two-strings/delete-operation-for-two-strings_test.go b/Algorithms/0583.delete-operation-for-two-strings/delete-operation-for-two-strings_test.go new file mode 100755 index 000000000..ab0190750 --- /dev/null +++ b/Algorithms/0583.delete-operation-for-two-strings/delete-operation-for-two-strings_test.go @@ -0,0 +1,47 @@ +package Problem0583 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + word1 string + word2 string + ans int +}{ + + { + "bgswdnrsnzdrnmmyxpjmyqztaroernkakadxrzxhabbhlhexrdntmffrdhjjvqxhmfeowsi", + "tegwdexzxrdvnziycqhdyswocagkthihuggxnaxvalbhhokbbceqmosxdhtjkgghharqnyl", + 96, + }, + + { + "sea", + "eat", + 2, + }, + + // 可以有多个 testcase +} + +func Test_minDistance(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, minDistance(tc.word1, tc.word2), "输入:%v", tc) + } +} + +func Benchmark_minDistance(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + minDistance(tc.word1, tc.word2) + } + } +} diff --git a/Algorithms/0587.erect-the-fence/README.md b/Algorithms/0587.erect-the-fence/README.md new file mode 100755 index 000000000..1610ea865 --- /dev/null +++ b/Algorithms/0587.erect-the-fence/README.md @@ -0,0 +1,38 @@ +# [587. Erect the Fence](https://leetcode.com/problems/erect-the-fence/) + +## 题目 + +There are some trees, where each tree is represented by (x,y) coordinate in a two-dimensional garden. Your job is to fence the entire garden using the minimum length of rope as it is expensive. The garden is well fenced only if all the trees are enclosed. Your task is to help find the coordinates of trees which are exactly located on the fence perimeter. + +Example 1: + +```text +Input: [[1,1],[2,2],[2,0],[2,4],[3,3],[4,2]] +Output: [[1,1],[2,0],[4,2],[3,3],[2,4]] +Explanation: +``` + +![e1](https://leetcode.com/static/images/problemset/erect_the_fence_1.png) + +Example 2: + +```text +Input: [[1,2],[2,2],[4,2]] +Output: [[1,2],[2,2],[4,2]] +Explanation: +Even you only have trees in a line, you need to use rope to enclose them. +``` + +![e2](https://leetcode.com/static/images/problemset/erect_the_fence_2.png) + +Note: + +1. All trees should be enclosed together. You cannot cut the rope to enclose trees that will separate them in more than one group. +1. All input integers will range from 0 to 100. +1. The garden has at least one tree. +1. All coordinates are distinct. +1. Input points have NO order. No order required for output. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0587.erect-the-fence/erect-the-fence.go b/Algorithms/0587.erect-the-fence/erect-the-fence.go new file mode 100755 index 000000000..19ec59952 --- /dev/null +++ b/Algorithms/0587.erect-the-fence/erect-the-fence.go @@ -0,0 +1,77 @@ +package Problem0587 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" +) + +type Point = kit.Point + +func outerTrees(points []Point) []Point { + n := len(points) + if n < 4 { + return points + } + + // 选择最左边的点,作为起始点 + // 如果最左边的点,不止一个,选择其中最下面的那个 + first := 0 + for i := 1; i < n; i++ { + if points[i].X < points[first].X|| + (points[i].X == points[first].X && points[i].Y< points[first].Y) { + first = i + } + } + + res := append([]Point{}, points[first]) + + cur := first + for { + // 寻找以 cur 为圆心,顺时针方向角度最大的点 + next := (cur + 1) % n + for i := 0; i < n; i++ { + if i == cur { + continue + } + cross := crossProductLength(points[cur], points[next], points[i]) + if cross < 0 || + (cross == 0 && isFurther(points[cur], points[next], points[i])) { + next = i + } + } + + // 把与 cur→next 共线的点都放入 res + for i := 0; i < n; i++ { + if i == cur || i == first { + // 这是已经放入过的点 + continue + } + if crossProductLength(points[cur], points[next], points[i]) == 0 { + // next 也会被放入 + res = append(res, points[i]) + } + } + + cur = next + // cur == first 说明围栏已经封闭了 + if cur == first { + break + } + } + + return res +} + +// 返回 oa×ob 的长度 +// 当返回值 <0 时,说明以 o 点圆心,b 点在 a 点的顺时针方向 +// 当返回值 =0 时,说明以 o 点,b 点和 a 点在同一条直线长 +func crossProductLength(o, a, b Point) int { + return (a.X-o.X)*(b.Y-o.Y) - (a.Y-o.Y)*(b.X-o.X) +} + +func isFurther(o, a, b Point) bool { + return distance(o, a) < distance(o, b) +} + +func distance(a, b Point) int { + return (a.X-b.X)*(a.X-b.X) + (a.Y-b.Y)*(a.Y-b.Y) +} diff --git a/Algorithms/0587.erect-the-fence/erect-the-fence_test.go b/Algorithms/0587.erect-the-fence/erect-the-fence_test.go new file mode 100755 index 000000000..802da66e7 --- /dev/null +++ b/Algorithms/0587.erect-the-fence/erect-the-fence_test.go @@ -0,0 +1,2175 @@ +package Problem0587 + +import ( + "sort" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + points [][]int + ans [][]int +}{ + + { + [][]int{ + {0, 0}, + {0, 4}, + {0, 19}, + {0, 22}, + {0, 25}, + {0, 26}, + {0, 32}, + {0, 39}, + {0, 40}, + {0, 49}, + {0, 54}, + {0, 55}, + {0, 63}, + {0, 67}, + {0, 72}, + {0, 85}, + {0, 89}, + {0, 96}, + {0, 99}, + {1, 9}, + {1, 13}, + {1, 21}, + {1, 23}, + {1, 25}, + {1, 28}, + {1, 31}, + {1, 32}, + {1, 35}, + {1, 41}, + {1, 50}, + {1, 56}, + {1, 59}, + {1, 61}, + {1, 63}, + {1, 65}, + {1, 66}, + {1, 68}, + {1, 89}, + {1, 97}, + {2, 1}, + {2, 6}, + {2, 7}, + {2, 16}, + {2, 26}, + {2, 38}, + {2, 41}, + {2, 43}, + {2, 46}, + {2, 52}, + {2, 56}, + {2, 59}, + {2, 68}, + {2, 87}, + {2, 88}, + {2, 91}, + {2, 92}, + {2, 95}, + {2, 99}, + {3, 7}, + {3, 25}, + {3, 27}, + {3, 28}, + {3, 29}, + {3, 32}, + {3, 40}, + {3, 45}, + {3, 46}, + {3, 48}, + {3, 51}, + {3, 52}, + {3, 63}, + {3, 64}, + {3, 66}, + {3, 70}, + {3, 71}, + {3, 75}, + {3, 81}, + {3, 88}, + {3, 97}, + {4, 2}, + {4, 3}, + {4, 7}, + {4, 24}, + {4, 28}, + {4, 30}, + {4, 34}, + {4, 43}, + {4, 45}, + {4, 46}, + {4, 56}, + {4, 59}, + {4, 61}, + {4, 63}, + {4, 70}, + {4, 71}, + {4, 78}, + {4, 83}, + {4, 91}, + {4, 92}, + {4, 93}, + {4, 95}, + {4, 98}, + {5, 2}, + {5, 3}, + {5, 21}, + {5, 26}, + {5, 36}, + {5, 44}, + {5, 49}, + {5, 54}, + {5, 64}, + {5, 72}, + {5, 73}, + {5, 80}, + {5, 86}, + {5, 87}, + {5, 91}, + {5, 98}, + {6, 0}, + {6, 8}, + {6, 20}, + {6, 22}, + {6, 23}, + {6, 29}, + {6, 37}, + {6, 46}, + {6, 50}, + {6, 57}, + {6, 58}, + {6, 59}, + {6, 65}, + {6, 68}, + {6, 70}, + {6, 73}, + {6, 77}, + {6, 79}, + {6, 82}, + {6, 84}, + {6, 87}, + {6, 98}, + {7, 0}, + {7, 6}, + {7, 8}, + {7, 13}, + {7, 15}, + {7, 18}, + {7, 19}, + {7, 28}, + {7, 35}, + {7, 36}, + {7, 38}, + {7, 44}, + {7, 46}, + {7, 59}, + {7, 60}, + {7, 61}, + {7, 67}, + {7, 89}, + {7, 92}, + {7, 96}, + {7, 99}, + {8, 0}, + {8, 1}, + {8, 4}, + {8, 9}, + {8, 15}, + {8, 28}, + {8, 35}, + {8, 45}, + {8, 54}, + {8, 57}, + {8, 58}, + {8, 59}, + {8, 72}, + {8, 73}, + {8, 81}, + {8, 83}, + {8, 84}, + {8, 85}, + {8, 89}, + {8, 93}, + {8, 96}, + {9, 4}, + {9, 8}, + {9, 15}, + {9, 24}, + {9, 30}, + {9, 36}, + {9, 71}, + {9, 75}, + {9, 76}, + {9, 77}, + {9, 79}, + {9, 80}, + {9, 81}, + {9, 84}, + {9, 85}, + {9, 86}, + {9, 87}, + {9, 89}, + {9, 94}, + {10, 0}, + {10, 6}, + {10, 7}, + {10, 13}, + {10, 16}, + {10, 17}, + {10, 19}, + {10, 22}, + {10, 53}, + {10, 54}, + {10, 56}, + {10, 58}, + {10, 64}, + {10, 66}, + {10, 67}, + {10, 74}, + {10, 84}, + {10, 87}, + {10, 91}, + {10, 92}, + {11, 0}, + {11, 3}, + {11, 4}, + {11, 7}, + {11, 18}, + {11, 25}, + {11, 27}, + {11, 28}, + {11, 30}, + {11, 32}, + {11, 41}, + {11, 44}, + {11, 52}, + {11, 57}, + {11, 62}, + {11, 63}, + {11, 66}, + {11, 72}, + {11, 78}, + {11, 80}, + {11, 96}, + {12, 10}, + {12, 12}, + {12, 22}, + {12, 25}, + {12, 29}, + {12, 34}, + {12, 38}, + {12, 45}, + {12, 55}, + {12, 57}, + {12, 64}, + {12, 65}, + {12, 68}, + {12, 71}, + {12, 79}, + {12, 82}, + {12, 91}, + {12, 98}, + {13, 0}, + {13, 7}, + {13, 8}, + {13, 10}, + {13, 13}, + {13, 15}, + {13, 33}, + {13, 34}, + {13, 36}, + {13, 38}, + {13, 40}, + {13, 42}, + {13, 63}, + {13, 66}, + {13, 70}, + {13, 73}, + {13, 81}, + {13, 84}, + {13, 88}, + {14, 10}, + {14, 15}, + {14, 21}, + {14, 22}, + {14, 24}, + {14, 41}, + {14, 46}, + {14, 47}, + {14, 52}, + {14, 55}, + {14, 61}, + {14, 67}, + {14, 73}, + {14, 88}, + {14, 92}, + {14, 97}, + {15, 0}, + {15, 5}, + {15, 12}, + {15, 32}, + {15, 45}, + {15, 48}, + {15, 49}, + {15, 51}, + {15, 54}, + {15, 55}, + {15, 62}, + {15, 64}, + {15, 65}, + {15, 66}, + {15, 74}, + {15, 76}, + {15, 84}, + {15, 97}, + {16, 8}, + {16, 9}, + {16, 14}, + {16, 16}, + {16, 18}, + {16, 23}, + {16, 28}, + {16, 38}, + {16, 41}, + {16, 43}, + {16, 48}, + {16, 49}, + {16, 53}, + {16, 61}, + {16, 63}, + {16, 64}, + {16, 70}, + {16, 73}, + {16, 84}, + {16, 88}, + {16, 92}, + {16, 93}, + {16, 97}, + {17, 0}, + {17, 1}, + {17, 15}, + {17, 21}, + {17, 27}, + {17, 30}, + {17, 34}, + {17, 39}, + {17, 42}, + {17, 43}, + {17, 50}, + {17, 52}, + {17, 57}, + {17, 58}, + {17, 62}, + {17, 63}, + {17, 64}, + {17, 65}, + {17, 66}, + {17, 77}, + {17, 79}, + {17, 81}, + {17, 82}, + {17, 83}, + {17, 86}, + {17, 90}, + {17, 93}, + {17, 96}, + {17, 98}, + {18, 0}, + {18, 4}, + {18, 5}, + {18, 8}, + {18, 14}, + {18, 16}, + {18, 17}, + {18, 21}, + {18, 29}, + {18, 34}, + {18, 37}, + {18, 46}, + {18, 47}, + {18, 63}, + {18, 65}, + {18, 67}, + {18, 72}, + {18, 73}, + {18, 77}, + {18, 79}, + {18, 82}, + {18, 84}, + {18, 85}, + {18, 91}, + {18, 98}, + {19, 3}, + {19, 4}, + {19, 8}, + {19, 13}, + {19, 17}, + {19, 26}, + {19, 36}, + {19, 38}, + {19, 48}, + {19, 49}, + {19, 52}, + {19, 57}, + {19, 61}, + {19, 64}, + {19, 69}, + {19, 71}, + {19, 76}, + {19, 80}, + {19, 82}, + {19, 83}, + {19, 84}, + {19, 86}, + {19, 94}, + {20, 4}, + {20, 6}, + {20, 13}, + {20, 23}, + {20, 36}, + {20, 45}, + {20, 46}, + {20, 47}, + {20, 55}, + {20, 57}, + {20, 62}, + {20, 65}, + {20, 67}, + {20, 71}, + {20, 77}, + {20, 78}, + {20, 82}, + {20, 86}, + {20, 87}, + {20, 89}, + {20, 94}, + {20, 97}, + {21, 2}, + {21, 12}, + {21, 16}, + {21, 20}, + {21, 27}, + {21, 30}, + {21, 32}, + {21, 34}, + {21, 52}, + {21, 63}, + {21, 65}, + {21, 69}, + {21, 75}, + {21, 88}, + {21, 91}, + {21, 93}, + {21, 94}, + {21, 95}, + {22, 2}, + {22, 4}, + {22, 6}, + {22, 7}, + {22, 10}, + {22, 12}, + {22, 38}, + {22, 42}, + {22, 49}, + {22, 50}, + {22, 70}, + {22, 72}, + {22, 76}, + {22, 79}, + {22, 80}, + {22, 88}, + {22, 89}, + {22, 90}, + {23, 9}, + {23, 11}, + {23, 21}, + {23, 23}, + {23, 24}, + {23, 35}, + {23, 38}, + {23, 41}, + {23, 43}, + {23, 48}, + {23, 51}, + {23, 61}, + {23, 62}, + {23, 68}, + {23, 70}, + {23, 71}, + {23, 72}, + {23, 84}, + {23, 85}, + {23, 98}, + {23, 99}, + {24, 1}, + {24, 2}, + {24, 6}, + {24, 19}, + {24, 41}, + {24, 49}, + {24, 51}, + {24, 68}, + {24, 72}, + {24, 77}, + {24, 79}, + {24, 82}, + {24, 83}, + {24, 84}, + {24, 99}, + {25, 8}, + {25, 15}, + {25, 24}, + {25, 28}, + {25, 41}, + {25, 46}, + {25, 47}, + {25, 48}, + {25, 60}, + {25, 61}, + {25, 62}, + {25, 65}, + {25, 69}, + {25, 72}, + {25, 76}, + {25, 78}, + {25, 80}, + {25, 98}, + {26, 11}, + {26, 31}, + {26, 32}, + {26, 35}, + {26, 42}, + {26, 51}, + {26, 56}, + {26, 73}, + {26, 74}, + {26, 75}, + {26, 80}, + {26, 82}, + {26, 90}, + {26, 99}, + {27, 0}, + {27, 1}, + {27, 9}, + {27, 14}, + {27, 22}, + {27, 23}, + {27, 26}, + {27, 30}, + {27, 43}, + {27, 47}, + {27, 58}, + {27, 60}, + {27, 61}, + {27, 67}, + {27, 70}, + {27, 79}, + {27, 83}, + {27, 85}, + {27, 89}, + {27, 91}, + {27, 94}, + {28, 3}, + {28, 22}, + {28, 26}, + {28, 31}, + {28, 32}, + {28, 43}, + {28, 48}, + {28, 59}, + {28, 62}, + {28, 64}, + {28, 67}, + {28, 72}, + {28, 89}, + {28, 94}, + {28, 97}, + {29, 5}, + {29, 8}, + {29, 22}, + {29, 23}, + {29, 29}, + {29, 31}, + {29, 38}, + {29, 48}, + {29, 58}, + {29, 72}, + {29, 73}, + {29, 80}, + {29, 82}, + {29, 83}, + {29, 84}, + {29, 87}, + {29, 88}, + {29, 92}, + {29, 95}, + {30, 0}, + {30, 6}, + {30, 7}, + {30, 10}, + {30, 12}, + {30, 23}, + {30, 38}, + {30, 44}, + {30, 49}, + {30, 50}, + {30, 62}, + {30, 69}, + {30, 70}, + {30, 77}, + {30, 78}, + {30, 81}, + {30, 87}, + {30, 89}, + {30, 93}, + {30, 97}, + {31, 3}, + {31, 4}, + {31, 20}, + {31, 22}, + {31, 23}, + {31, 28}, + {31, 29}, + {31, 38}, + {31, 40}, + {31, 50}, + {31, 58}, + {31, 67}, + {31, 70}, + {31, 73}, + {31, 81}, + {31, 89}, + {31, 90}, + {32, 1}, + {32, 10}, + {32, 12}, + {32, 17}, + {32, 18}, + {32, 29}, + {32, 39}, + {32, 41}, + {32, 43}, + {32, 44}, + {32, 54}, + {32, 55}, + {32, 56}, + {32, 58}, + {32, 66}, + {32, 68}, + {32, 70}, + {32, 73}, + {32, 82}, + {32, 84}, + {32, 93}, + {32, 96}, + {32, 97}, + {33, 4}, + {33, 5}, + {33, 6}, + {33, 8}, + {33, 13}, + {33, 26}, + {33, 31}, + {33, 47}, + {33, 51}, + {33, 59}, + {33, 60}, + {33, 66}, + {33, 67}, + {33, 71}, + {33, 86}, + {33, 94}, + {33, 95}, + {33, 98}, + {34, 11}, + {34, 13}, + {34, 29}, + {34, 36}, + {34, 38}, + {34, 47}, + {34, 50}, + {34, 59}, + {34, 62}, + {34, 63}, + {34, 67}, + {34, 73}, + {34, 77}, + {34, 86}, + {34, 88}, + {34, 94}, + {34, 96}, + {34, 97}, + {34, 98}, + {35, 16}, + {35, 17}, + {35, 28}, + {35, 37}, + {35, 38}, + {35, 39}, + {35, 42}, + {35, 45}, + {35, 53}, + {35, 55}, + {35, 64}, + {35, 68}, + {35, 71}, + {36, 5}, + {36, 14}, + {36, 22}, + {36, 28}, + {36, 29}, + {36, 31}, + {36, 35}, + {36, 45}, + {36, 50}, + {36, 61}, + {36, 70}, + {36, 71}, + {36, 77}, + {36, 84}, + {36, 85}, + {36, 86}, + {36, 96}, + {36, 99}, + {37, 7}, + {37, 21}, + {37, 23}, + {37, 45}, + {37, 50}, + {37, 52}, + {37, 53}, + {37, 57}, + {37, 59}, + {37, 63}, + {37, 65}, + {37, 68}, + {37, 72}, + {37, 73}, + {37, 74}, + {37, 80}, + {37, 84}, + {37, 96}, + {37, 98}, + {38, 1}, + {38, 2}, + {38, 5}, + {38, 10}, + {38, 11}, + {38, 19}, + {38, 36}, + {38, 45}, + {38, 48}, + {38, 49}, + {38, 51}, + {38, 52}, + {38, 55}, + {38, 56}, + {38, 64}, + {38, 78}, + {38, 80}, + {38, 82}, + {38, 88}, + {38, 93}, + {38, 95}, + {38, 96}, + {39, 0}, + {39, 1}, + {39, 5}, + {39, 15}, + {39, 17}, + {39, 22}, + {39, 23}, + {39, 30}, + {39, 42}, + {39, 48}, + {39, 54}, + {39, 65}, + {39, 68}, + {39, 72}, + {39, 90}, + {39, 92}, + {39, 94}, + {39, 97}, + {40, 5}, + {40, 8}, + {40, 10}, + {40, 13}, + {40, 19}, + {40, 26}, + {40, 27}, + {40, 42}, + {40, 45}, + {40, 55}, + {40, 56}, + {40, 62}, + {40, 63}, + {40, 77}, + {40, 83}, + {40, 85}, + {40, 88}, + {40, 92}, + {40, 93}, + {41, 3}, + {41, 8}, + {41, 11}, + {41, 15}, + {41, 24}, + {41, 28}, + {41, 29}, + {41, 40}, + {41, 48}, + {41, 55}, + {41, 59}, + {41, 63}, + {41, 79}, + {41, 80}, + {41, 87}, + {41, 91}, + {41, 99}, + {42, 2}, + {42, 12}, + {42, 14}, + {42, 19}, + {42, 25}, + {42, 42}, + {42, 47}, + {42, 52}, + {42, 62}, + {42, 64}, + {42, 73}, + {42, 74}, + {42, 90}, + {42, 91}, + {42, 95}, + {42, 96}, + {42, 97}, + {43, 2}, + {43, 16}, + {43, 17}, + {43, 21}, + {43, 33}, + {43, 39}, + {43, 40}, + {43, 43}, + {43, 49}, + {43, 57}, + {43, 70}, + {43, 77}, + {43, 79}, + {43, 86}, + {43, 89}, + {43, 92}, + {43, 96}, + {44, 6}, + {44, 8}, + {44, 10}, + {44, 27}, + {44, 30}, + {44, 34}, + {44, 35}, + {44, 39}, + {44, 41}, + {44, 45}, + {44, 46}, + {44, 48}, + {44, 54}, + {44, 56}, + {44, 65}, + {44, 69}, + {44, 71}, + {44, 72}, + {44, 74}, + {44, 80}, + {44, 85}, + {44, 86}, + {45, 1}, + {45, 3}, + {45, 5}, + {45, 21}, + {45, 22}, + {45, 34}, + {45, 36}, + {45, 46}, + {45, 47}, + {45, 48}, + {45, 55}, + {45, 60}, + {45, 61}, + {45, 63}, + {45, 64}, + {45, 68}, + {45, 72}, + {45, 77}, + {45, 78}, + {45, 82}, + {45, 84}, + {45, 88}, + {45, 90}, + {45, 92}, + {45, 94}, + {46, 13}, + {46, 15}, + {46, 19}, + {46, 20}, + {46, 25}, + {46, 32}, + {46, 37}, + {46, 40}, + {46, 41}, + {46, 46}, + {46, 50}, + {46, 51}, + {46, 55}, + {46, 59}, + {46, 69}, + {46, 74}, + {46, 77}, + {46, 86}, + {46, 97}, + {46, 98}, + {47, 2}, + {47, 3}, + {47, 5}, + {47, 7}, + {47, 8}, + {47, 12}, + {47, 14}, + {47, 23}, + {47, 26}, + {47, 28}, + {47, 33}, + {47, 45}, + {47, 46}, + {47, 49}, + {47, 59}, + {47, 62}, + {47, 73}, + {47, 76}, + {47, 79}, + {47, 89}, + {47, 95}, + {47, 96}, + {47, 99}, + {48, 2}, + {48, 6}, + {48, 9}, + {48, 10}, + {48, 12}, + {48, 16}, + {48, 17}, + {48, 21}, + {48, 24}, + {48, 26}, + {48, 28}, + {48, 30}, + {48, 32}, + {48, 35}, + {48, 40}, + {48, 42}, + {48, 44}, + {48, 48}, + {48, 53}, + {48, 65}, + {48, 67}, + {48, 70}, + {48, 72}, + {48, 79}, + {48, 87}, + {48, 91}, + {48, 94}, + {48, 99}, + {49, 0}, + {49, 2}, + {49, 13}, + {49, 15}, + {49, 19}, + {49, 25}, + {49, 28}, + {49, 44}, + {49, 49}, + {49, 52}, + {49, 65}, + {49, 68}, + {49, 69}, + {50, 6}, + {50, 20}, + {50, 21}, + {50, 31}, + {50, 37}, + {50, 39}, + {50, 52}, + {50, 60}, + {50, 61}, + {50, 63}, + {50, 66}, + {50, 74}, + {50, 85}, + {50, 93}, + {50, 97}, + {50, 99}, + {51, 1}, + {51, 11}, + {51, 14}, + {51, 22}, + {51, 24}, + {51, 25}, + {51, 27}, + {51, 30}, + {51, 38}, + {51, 46}, + {51, 49}, + {51, 50}, + {51, 54}, + {51, 60}, + {51, 61}, + {51, 62}, + {51, 75}, + {51, 85}, + {51, 86}, + {51, 88}, + {51, 90}, + {51, 91}, + {51, 93}, + {51, 95}, + {51, 96}, + {51, 97}, + {52, 2}, + {52, 3}, + {52, 7}, + {52, 14}, + {52, 16}, + {52, 19}, + {52, 21}, + {52, 22}, + {52, 27}, + {52, 28}, + {52, 29}, + {52, 30}, + {52, 32}, + {52, 39}, + {52, 42}, + {52, 49}, + {52, 54}, + {52, 55}, + {52, 61}, + {52, 65}, + {52, 66}, + {52, 68}, + {52, 71}, + {52, 72}, + {52, 76}, + {52, 78}, + {52, 80}, + {52, 85}, + {52, 86}, + {52, 90}, + {52, 99}, + {53, 2}, + {53, 5}, + {53, 10}, + {53, 14}, + {53, 25}, + {53, 27}, + {53, 30}, + {53, 41}, + {53, 44}, + {53, 49}, + {53, 73}, + {53, 74}, + {53, 78}, + {53, 80}, + {53, 86}, + {53, 88}, + {53, 90}, + {53, 97}, + {54, 3}, + {54, 9}, + {54, 12}, + {54, 14}, + {54, 20}, + {54, 23}, + {54, 25}, + {54, 38}, + {54, 41}, + {54, 42}, + {54, 43}, + {54, 45}, + {54, 48}, + {54, 52}, + {54, 54}, + {54, 57}, + {54, 65}, + {54, 67}, + {54, 70}, + {54, 83}, + {54, 90}, + {54, 97}, + {54, 98}, + {55, 0}, + {55, 1}, + {55, 8}, + {55, 9}, + {55, 19}, + {55, 28}, + {55, 29}, + {55, 32}, + {55, 33}, + {55, 42}, + {55, 44}, + {55, 48}, + {55, 58}, + {55, 72}, + {55, 74}, + {55, 88}, + {55, 89}, + {55, 92}, + {55, 94}, + {55, 97}, + {56, 1}, + {56, 2}, + {56, 6}, + {56, 7}, + {56, 9}, + {56, 13}, + {56, 14}, + {56, 15}, + {56, 18}, + {56, 23}, + {56, 26}, + {56, 37}, + {56, 44}, + {56, 45}, + {56, 46}, + {56, 48}, + {56, 50}, + {56, 54}, + {56, 56}, + {56, 58}, + {56, 59}, + {56, 78}, + {56, 83}, + {56, 86}, + {56, 96}, + {57, 6}, + {57, 9}, + {57, 10}, + {57, 13}, + {57, 25}, + {57, 27}, + {57, 36}, + {57, 39}, + {57, 40}, + {57, 41}, + {57, 53}, + {57, 69}, + {57, 75}, + {57, 81}, + {57, 87}, + {57, 89}, + {57, 94}, + {57, 97}, + {57, 99}, + {58, 2}, + {58, 7}, + {58, 8}, + {58, 12}, + {58, 18}, + {58, 19}, + {58, 22}, + {58, 24}, + {58, 25}, + {58, 47}, + {58, 59}, + {58, 60}, + {58, 78}, + {58, 85}, + {58, 92}, + {58, 94}, + {59, 4}, + {59, 6}, + {59, 8}, + {59, 13}, + {59, 15}, + {59, 16}, + {59, 17}, + {59, 18}, + {59, 25}, + {59, 31}, + {59, 32}, + {59, 34}, + {59, 39}, + {59, 43}, + {59, 63}, + {59, 68}, + {59, 72}, + {59, 85}, + {59, 87}, + {59, 88}, + {59, 99}, + {60, 1}, + {60, 3}, + {60, 11}, + {60, 14}, + {60, 24}, + {60, 41}, + {60, 43}, + {60, 45}, + {60, 52}, + {60, 57}, + {60, 58}, + {60, 60}, + {60, 61}, + {60, 65}, + {60, 69}, + {60, 72}, + {60, 74}, + {60, 79}, + {60, 80}, + {60, 82}, + {60, 90}, + {60, 97}, + {60, 99}, + {61, 11}, + {61, 18}, + {61, 21}, + {61, 31}, + {61, 39}, + {61, 41}, + {61, 47}, + {61, 48}, + {61, 55}, + {61, 57}, + {61, 65}, + {61, 70}, + {61, 74}, + {61, 77}, + {61, 82}, + {61, 87}, + {61, 89}, + {61, 95}, + {61, 98}, + {62, 6}, + {62, 17}, + {62, 20}, + {62, 23}, + {62, 25}, + {62, 36}, + {62, 38}, + {62, 46}, + {62, 51}, + {62, 55}, + {62, 57}, + {62, 60}, + {62, 70}, + {62, 73}, + {62, 76}, + {62, 85}, + {62, 90}, + {62, 97}, + {63, 2}, + {63, 7}, + {63, 11}, + {63, 20}, + {63, 21}, + {63, 23}, + {63, 38}, + {63, 47}, + {63, 54}, + {63, 59}, + {63, 62}, + {63, 65}, + {63, 70}, + {63, 81}, + {63, 87}, + {63, 93}, + {64, 0}, + {64, 3}, + {64, 11}, + {64, 15}, + {64, 18}, + {64, 25}, + {64, 26}, + {64, 34}, + {64, 48}, + {64, 49}, + {64, 50}, + {64, 51}, + {64, 53}, + {64, 54}, + {64, 55}, + {64, 56}, + {64, 58}, + {64, 59}, + {64, 65}, + {64, 75}, + {64, 78}, + {64, 79}, + {64, 83}, + {64, 93}, + {65, 4}, + {65, 11}, + {65, 15}, + {65, 24}, + {65, 26}, + {65, 43}, + {65, 52}, + {65, 61}, + {65, 64}, + {65, 81}, + {65, 84}, + {65, 86}, + {65, 92}, + {66, 2}, + {66, 7}, + {66, 13}, + {66, 31}, + {66, 34}, + {66, 35}, + {66, 42}, + {66, 44}, + {66, 46}, + {66, 48}, + {66, 49}, + {66, 58}, + {66, 59}, + {66, 64}, + {66, 79}, + {66, 88}, + {66, 90}, + {66, 92}, + {66, 96}, + {66, 98}, + {66, 99}, + {67, 1}, + {67, 3}, + {67, 4}, + {67, 9}, + {67, 11}, + {67, 14}, + {67, 18}, + {67, 20}, + {67, 21}, + {67, 24}, + {67, 27}, + {67, 29}, + {67, 40}, + {67, 41}, + {67, 47}, + {67, 53}, + {67, 55}, + {67, 58}, + {67, 59}, + {67, 67}, + {67, 72}, + {67, 75}, + {67, 76}, + {67, 81}, + {67, 84}, + {67, 93}, + {67, 95}, + {67, 97}, + {67, 98}, + {68, 3}, + {68, 12}, + {68, 18}, + {68, 25}, + {68, 27}, + {68, 33}, + {68, 34}, + {68, 35}, + {68, 40}, + {68, 42}, + {68, 43}, + {68, 50}, + {68, 51}, + {68, 53}, + {68, 60}, + {68, 74}, + {68, 81}, + {68, 82}, + {68, 96}, + {68, 98}, + {69, 3}, + {69, 8}, + {69, 20}, + {69, 24}, + {69, 28}, + {69, 30}, + {69, 35}, + {69, 44}, + {69, 59}, + {69, 60}, + {69, 67}, + {69, 75}, + {69, 76}, + {69, 85}, + {69, 86}, + {69, 88}, + {69, 95}, + {70, 4}, + {70, 6}, + {70, 16}, + {70, 18}, + {70, 20}, + {70, 22}, + {70, 24}, + {70, 29}, + {70, 31}, + {70, 36}, + {70, 37}, + {70, 39}, + {70, 53}, + {70, 54}, + {70, 55}, + {70, 63}, + {70, 71}, + {70, 83}, + {70, 85}, + {70, 90}, + {70, 91}, + {70, 94}, + {70, 96}, + {71, 14}, + {71, 18}, + {71, 25}, + {71, 29}, + {71, 30}, + {71, 32}, + {71, 37}, + {71, 38}, + {71, 41}, + {71, 43}, + {71, 46}, + {71, 50}, + {71, 51}, + {71, 54}, + {71, 70}, + {71, 78}, + {71, 86}, + {71, 88}, + {71, 90}, + {71, 91}, + {71, 94}, + {72, 3}, + {72, 13}, + {72, 21}, + {72, 34}, + {72, 43}, + {72, 45}, + {72, 48}, + {72, 52}, + {72, 55}, + {72, 58}, + {72, 61}, + {72, 71}, + {72, 77}, + {72, 78}, + {72, 92}, + {72, 93}, + {72, 94}, + {72, 96}, + {73, 1}, + {73, 5}, + {73, 22}, + {73, 25}, + {73, 50}, + {73, 63}, + {73, 69}, + {73, 77}, + {73, 79}, + {73, 82}, + {73, 86}, + {73, 88}, + {73, 94}, + {74, 1}, + {74, 5}, + {74, 8}, + {74, 11}, + {74, 17}, + {74, 19}, + {74, 20}, + {74, 25}, + {74, 32}, + {74, 36}, + {74, 43}, + {74, 44}, + {74, 50}, + {74, 54}, + {74, 55}, + {74, 58}, + {74, 72}, + {74, 74}, + {74, 75}, + {74, 78}, + {74, 87}, + {74, 91}, + {74, 98}, + {74, 99}, + {75, 4}, + {75, 14}, + {75, 32}, + {75, 33}, + {75, 36}, + {75, 43}, + {75, 45}, + {75, 47}, + {75, 60}, + {75, 61}, + {75, 62}, + {75, 66}, + {75, 78}, + {75, 79}, + {75, 82}, + {75, 92}, + {75, 93}, + {75, 99}, + {76, 1}, + {76, 10}, + {76, 19}, + {76, 20}, + {76, 37}, + {76, 38}, + {76, 43}, + {76, 44}, + {76, 48}, + {76, 51}, + {76, 52}, + {76, 56}, + {76, 61}, + {76, 69}, + {76, 71}, + {76, 80}, + {76, 84}, + {76, 89}, + {76, 92}, + {76, 93}, + {76, 94}, + {76, 97}, + {77, 12}, + {77, 21}, + {77, 23}, + {77, 24}, + {77, 25}, + {77, 31}, + {77, 33}, + {77, 40}, + {77, 41}, + {77, 45}, + {77, 47}, + {77, 55}, + {77, 57}, + {77, 58}, + {77, 61}, + {77, 84}, + {77, 95}, + {78, 3}, + {78, 5}, + {78, 7}, + {78, 10}, + {78, 11}, + {78, 15}, + {78, 16}, + {78, 17}, + {78, 55}, + {78, 59}, + {78, 70}, + {78, 71}, + {78, 72}, + {78, 75}, + {78, 81}, + {78, 86}, + {78, 88}, + {78, 91}, + {78, 94}, + {78, 99}, + {79, 1}, + {79, 9}, + {79, 13}, + {79, 20}, + {79, 23}, + {79, 34}, + {79, 36}, + {79, 37}, + {79, 44}, + {79, 45}, + {79, 46}, + {79, 48}, + {79, 54}, + {79, 57}, + {79, 59}, + {79, 60}, + {79, 92}, + {79, 95}, + {79, 97}, + {79, 98}, + {80, 3}, + {80, 17}, + {80, 20}, + {80, 21}, + {80, 23}, + {80, 26}, + {80, 34}, + {80, 38}, + {80, 39}, + {80, 44}, + {80, 48}, + {80, 55}, + {80, 63}, + {80, 66}, + {80, 67}, + {80, 71}, + {80, 78}, + {80, 84}, + {80, 93}, + {81, 2}, + {81, 5}, + {81, 27}, + {81, 28}, + {81, 30}, + {81, 37}, + {81, 42}, + {81, 44}, + {81, 46}, + {81, 47}, + {81, 48}, + {81, 50}, + {81, 55}, + {81, 57}, + {81, 61}, + {81, 67}, + {81, 68}, + {81, 77}, + {81, 78}, + {81, 85}, + {81, 86}, + {81, 90}, + {81, 96}, + {81, 98}, + {82, 6}, + {82, 9}, + {82, 12}, + {82, 15}, + {82, 19}, + {82, 31}, + {82, 35}, + {82, 41}, + {82, 46}, + {82, 51}, + {82, 54}, + {82, 58}, + {82, 69}, + {82, 78}, + {82, 80}, + {82, 82}, + {82, 89}, + {82, 94}, + {82, 96}, + {82, 97}, + {83, 11}, + {83, 14}, + {83, 26}, + {83, 30}, + {83, 32}, + {83, 36}, + {83, 37}, + {83, 44}, + {83, 47}, + {83, 59}, + {83, 60}, + {83, 64}, + {83, 77}, + {83, 79}, + {83, 93}, + {84, 1}, + {84, 5}, + {84, 11}, + {84, 19}, + {84, 20}, + {84, 22}, + {84, 27}, + {84, 33}, + {84, 38}, + {84, 42}, + {84, 44}, + {84, 48}, + {84, 54}, + {84, 67}, + {84, 72}, + {84, 73}, + {84, 75}, + {84, 76}, + {84, 84}, + {84, 89}, + {84, 95}, + {84, 99}, + {85, 12}, + {85, 15}, + {85, 16}, + {85, 20}, + {85, 21}, + {85, 23}, + {85, 24}, + {85, 35}, + {85, 37}, + {85, 44}, + {85, 54}, + {85, 60}, + {85, 62}, + {85, 63}, + {85, 64}, + {85, 66}, + {85, 67}, + {85, 68}, + {85, 69}, + {85, 71}, + {85, 81}, + {85, 88}, + {86, 0}, + {86, 3}, + {86, 5}, + {86, 6}, + {86, 7}, + {86, 8}, + {86, 20}, + {86, 32}, + {86, 34}, + {86, 35}, + {86, 38}, + {86, 39}, + {86, 42}, + {86, 43}, + {86, 44}, + {86, 62}, + {86, 67}, + {86, 74}, + {86, 79}, + {86, 83}, + {86, 94}, + {86, 98}, + {87, 8}, + {87, 12}, + {87, 19}, + {87, 26}, + {87, 28}, + {87, 31}, + {87, 39}, + {87, 41}, + {87, 43}, + {87, 47}, + {87, 48}, + {87, 50}, + {87, 51}, + {87, 55}, + {87, 57}, + {87, 63}, + {87, 67}, + {87, 68}, + {87, 69}, + {87, 72}, + {87, 81}, + {87, 83}, + {87, 92}, + {88, 0}, + {88, 5}, + {88, 6}, + {88, 14}, + {88, 17}, + {88, 21}, + {88, 28}, + {88, 29}, + {88, 30}, + {88, 31}, + {88, 50}, + {88, 51}, + {88, 54}, + {88, 58}, + {88, 63}, + {88, 65}, + {88, 75}, + {88, 80}, + {88, 83}, + {88, 86}, + {88, 88}, + {88, 92}, + {88, 93}, + {89, 1}, + {89, 2}, + {89, 7}, + {89, 11}, + {89, 15}, + {89, 16}, + {89, 24}, + {89, 27}, + {89, 33}, + {89, 36}, + {89, 39}, + {89, 40}, + {89, 41}, + {89, 42}, + {89, 44}, + {89, 45}, + {89, 46}, + {89, 50}, + {89, 53}, + {89, 54}, + {89, 57}, + {89, 58}, + {89, 60}, + {89, 61}, + {89, 65}, + {89, 84}, + {89, 85}, + {89, 86}, + {89, 93}, + {89, 97}, + {89, 98}, + {90, 5}, + {90, 6}, + {90, 8}, + {90, 9}, + {90, 10}, + {90, 11}, + {90, 13}, + {90, 17}, + {90, 19}, + {90, 26}, + {90, 29}, + {90, 30}, + {90, 34}, + {90, 44}, + {90, 50}, + {90, 61}, + {90, 63}, + {90, 64}, + {90, 75}, + {90, 78}, + {90, 85}, + {90, 88}, + {90, 89}, + {90, 92}, + {90, 94}, + {90, 96}, + {90, 98}, + {91, 0}, + {91, 17}, + {91, 23}, + {91, 24}, + {91, 34}, + {91, 40}, + {91, 44}, + {91, 45}, + {91, 49}, + {91, 52}, + {91, 57}, + {91, 58}, + {91, 61}, + {91, 73}, + {91, 96}, + {92, 0}, + {92, 16}, + {92, 22}, + {92, 29}, + {92, 36}, + {92, 39}, + {92, 42}, + {92, 44}, + {92, 46}, + {92, 54}, + {92, 60}, + {92, 65}, + {92, 73}, + {92, 78}, + {92, 86}, + {92, 88}, + {92, 91}, + {92, 94}, + {93, 11}, + {93, 12}, + {93, 14}, + {93, 16}, + {93, 19}, + {93, 38}, + {93, 43}, + {93, 48}, + {93, 53}, + {93, 57}, + {93, 61}, + {93, 62}, + {93, 64}, + {93, 78}, + {93, 89}, + {94, 0}, + {94, 1}, + {94, 2}, + {94, 3}, + {94, 9}, + {94, 12}, + {94, 22}, + {94, 27}, + {94, 35}, + {94, 42}, + {94, 62}, + {94, 68}, + {94, 73}, + {94, 75}, + {94, 83}, + {94, 85}, + {94, 87}, + {94, 88}, + {94, 92}, + {94, 93}, + {94, 96}, + {95, 0}, + {95, 15}, + {95, 17}, + {95, 20}, + {95, 28}, + {95, 36}, + {95, 38}, + {95, 41}, + {95, 45}, + {95, 47}, + {95, 53}, + {95, 56}, + {95, 79}, + {95, 82}, + {95, 84}, + {95, 89}, + {95, 97}, + {96, 14}, + {96, 16}, + {96, 22}, + {96, 23}, + {96, 39}, + {96, 44}, + {96, 45}, + {96, 46}, + {96, 59}, + {96, 61}, + {96, 67}, + {96, 68}, + {96, 69}, + {96, 70}, + {96, 90}, + {96, 92}, + {96, 95}, + {96, 99}, + {97, 8}, + {97, 13}, + {97, 17}, + {97, 29}, + {97, 42}, + {97, 43}, + {97, 44}, + {97, 47}, + {97, 50}, + {97, 55}, + {97, 58}, + {97, 67}, + {97, 71}, + {97, 78}, + {97, 80}, + {97, 87}, + {97, 92}, + {97, 94}, + {97, 96}, + {98, 3}, + {98, 4}, + {98, 5}, + {98, 8}, + {98, 9}, + {98, 17}, + {98, 19}, + {98, 22}, + {98, 26}, + {98, 30}, + {98, 32}, + {98, 37}, + {98, 38}, + {98, 39}, + {98, 46}, + {98, 53}, + {98, 56}, + {98, 59}, + {98, 66}, + {98, 77}, + {98, 85}, + {98, 89}, + {98, 96}, + {98, 97}, + {99, 8}, + {99, 9}, + {99, 10}, + {99, 13}, + {99, 15}, + {99, 21}, + {99, 24}, + {99, 29}, + {99, 35}, + {99, 61}, + {99, 73}, + {99, 81}, + {99, 84}, + {99, 89}, + {99, 90}, + {99, 91}, + {99, 97}, + }, + [][]int{ + {0, 0}, + {6, 0}, + {7, 0}, + {8, 0}, + {10, 0}, + {11, 0}, + {13, 0}, + {15, 0}, + {17, 0}, + {18, 0}, + {27, 0}, + {30, 0}, + {39, 0}, + {49, 0}, + {55, 0}, + {64, 0}, + {86, 0}, + {88, 0}, + {91, 0}, + {92, 0}, + {94, 0}, + {95, 0}, + {98, 3}, + {99, 8}, + {99, 9}, + {99, 10}, + {99, 13}, + {99, 15}, + {99, 21}, + {99, 24}, + {99, 29}, + {99, 35}, + {99, 61}, + {99, 73}, + {99, 81}, + {99, 84}, + {99, 89}, + {99, 90}, + {99, 91}, + {99, 97}, + {96, 99}, + {84, 99}, + {78, 99}, + {75, 99}, + {74, 99}, + {66, 99}, + {60, 99}, + {59, 99}, + {57, 99}, + {52, 99}, + {50, 99}, + {48, 99}, + {47, 99}, + {41, 99}, + {36, 99}, + {26, 99}, + {24, 99}, + {23, 99}, + {7, 99}, + {2, 99}, + {0, 99}, + {0, 96}, + {0, 89}, + {0, 85}, + {0, 72}, + {0, 67}, + {0, 63}, + {0, 55}, + {0, 54}, + {0, 49}, + {0, 40}, + {0, 39}, + {0, 32}, + {0, 26}, + {0, 25}, + {0, 22}, + {0, 19}, + {0, 4}, + }, + }, + + { + [][]int{{0, 0}, {1, 0}, {1, 3}, {1, 8}, {1, 9}, {2, 0}, {2, 6}, {3, 0}, {3, 1}, {3, 4}, {3, 6}, {4, 2}, {4, 6}, {5, 7}, {5, 8}, {6, 2}, {6, 4}, {7, 7}, {7, 9}, {8, 0}, {8, 1}, {8, 3}, {8, 5}, {9, 6}}, + [][]int{{0, 0}, {1, 0}, {2, 0}, {3, 0}, {8, 0}, {9, 6}, {7, 9}, {1, 9}}, + }, + + { + [][]int{{0, 0}, {0, 1}, {0, 2}, {1, 2}, {2, 2}, {3, 2}, {3, 1}, {3, 0}, {2, 0}, {1, 0}, {1, 1}, {4, 3}}, + [][]int{{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 3}, {0, 2}, {0, 1}}, + }, + + { + [][]int{{0, 0}, {0, 100}, {100, 100}, {100, 0}, {50, 50}}, + [][]int{{0, 0}, {0, 100}, {100, 100}, {100, 0}}, + }, + + { + [][]int{{4, 2}, {2, 2}, {2, 0}, {2, 4}, {3, 3}, {1, 1}}, + [][]int{{2, 0}, {4, 2}, {3, 3}, {2, 4}, {1, 1}}, + }, + + { + [][]int{{1, 2}, {2, 2}, {4, 2}}, + [][]int{{1, 2}, {2, 2}, {4, 2}}, + }, + + { + [][]int{{2, 2}, {4, 2}, {1, 2}}, + [][]int{{1, 2}, {2, 2}, {4, 2}}, + }, + + // 可以有多个 testcase +} + +func Test_outerTrees(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + // fmt.Printf("~~%v~~\n", tc) + points := kit.Intss2Points(tc.points) + expected := kit.Points2Intss(outerTrees(points)) + sort.Sort(intss(expected)) + sort.Sort(intss(tc.ans)) + ast.Equal(tc.ans, expected) + } +} + +func Benchmark_outerTrees(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + points := kit.Intss2Points(tc.points) + outerTrees(points) + } + } +} + +// intss 实现了 sort.Interface 接口 +type intss [][]int + +func (iss intss) Len() int { return len(iss) } + +func (iss intss) Less(i, j int) bool { + if iss[i][0] == iss[j][0] { + return iss[i][1] < iss[j][1] + } + return iss[i][0] < iss[j][0] +} + +func (iss intss) Swap(i, j int) { iss[i], iss[j] = iss[j], iss[i] } diff --git a/Algorithms/0591.tag-validator/README.md b/Algorithms/0591.tag-validator/README.md new file mode 100755 index 000000000..a51b4d24f --- /dev/null +++ b/Algorithms/0591.tag-validator/README.md @@ -0,0 +1,70 @@ +# [591. Tag Validator](https://leetcode.com/problems/tag-validator/) + +## 题目 + +Given a string representing a code snippet, you need to implement a tag validator to parse the code and return whether it is valid. A code snippet is valid if all the following rules hold: + +1. The code must be wrapped in a valid closed tag. Otherwise, the code is invalid. +1. A closed tag (not necessarily valid) has exactly the following format : TAG_CONTENT. Among them, is the start tag, and is the end tag. The TAG_NAME in start and end tags should be the same. A closed tag is valid if and only if the TAG_NAME and TAG_CONTENT are valid. +1. A valid TAG_NAME only contain upper-case letters, and has length in range [1,9]. Otherwise, the TAG_NAME is invalid. +1. A valid TAG_CONTENT may contain other valid closed tags, cdata and any characters (see note1) EXCEPT unmatched <, unmatched start and end tag, and unmatched or closed tags with invalid TAG_NAME. Otherwise, the TAG_CONTENT is invalid. +1. A start tag is unmatched if no end tag exists with the same TAG_NAME, and vice versa. However, you also need to consider the issue of unbalanced when tags are nested. +1. A < is unmatched if you cannot find a subsequent >. And when you find a < or should be parsed as TAG_NAME (not necessarily valid). +1. The cdata has the following format : . The range of CDATA_CONTENT is defined as the characters between +1. CDATA_CONTENT may contain any characters. The function of cdata is to forbid the validator to parse CDATA_CONTENT, so even it has some characters that can be parsed as tag (no matter valid or invalid), you should treat it as regular characters. + +Valid Code Examples: + +```text +Input: "
This is the first line ]]>
" +Output: True +Explanation: +The code is wrapped in a closed tag :
and
. +The TAG_NAME is valid, the TAG_CONTENT consists of some characters and cdata. +Although CDATA_CONTENT has unmatched start tag with invalid TAG_NAME, it should be considered as plain text, not parsed as tag. +So TAG_CONTENT is valid, and then the code is valid. Thus return true. + +Input: "
>> ![cdata[]] ]>]]>]]>>]
" +Output: True +Explanation: +We first separate the code into : start_tag|tag_content|end_tag. +start_tag -> "
" +end_tag -> "
" +tag_content could also be separated into : text1|cdata|text2. +text1 -> ">> ![cdata[]] " +cdata -> "]>]]>", where the CDATA_CONTENT is "
]>" +text2 -> "]]>>]" + +The reason why start_tag is NOT "
>>" is because of the rule 6. +The reason why cdata is NOT "]>]]>]]>" is because of the rule 7. +``` + +Invalid Code Examples: + +```text +Input: " " +Output: False +Explanation: Unbalanced. If "" is closed, then "" must be unmatched, and vice versa. + +Input: "
div tag is not closed
" +Output: False + +Input: "
unmatched <
" +Output: False + +Input: "
closed tags with invalid tag name 123
" +Output: False + +Input: "
unmatched tags with invalid tag name and
" +Output: False + +Input: "
unmatched start tag and unmatched end tag
" +Output: False +``` + +Note: +For simplicity, you could assume the input code (including the any characters mentioned above) only contain letters, digits, '<','>','/','!','[',']' and ' '. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0591.tag-validator/tag-validator.go b/Algorithms/0591.tag-validator/tag-validator.go new file mode 100755 index 000000000..c2e6f1bd8 --- /dev/null +++ b/Algorithms/0591.tag-validator/tag-validator.go @@ -0,0 +1,70 @@ +package Problem0591 + +import ( + "strings" +) + +func isValid(code string) bool { + // isAvailbleTagName 返回 true, 当 code[i:j] 符合 TAG_NAME 的命名规范时 + isAvailbleTagName := func(i, j int) bool { + if i > j || // code[i:] 中没有 ">" + i == j || // TAG_NAME 为 "" + i+9 < j { // TAG_NAME 长度超过 9 + return false + } + for k := i; k < j; k++ { + if code[k] < 'A' || 'Z' < code[k] { + // TAG_NAME 中存在非大写字母 + return false + } + } + return true + } + + stack := make([]string, 0, 16) + for i := 0; i < len(code); { + // 所有的内容都应该在 tag 中 + // 所以,除非 i == 0 + // stack 中都应该至少有一个 TAG_NAME + if i > 0 && len(stack) == 0 { + return false + } + + switch { + case strings.HasPrefix(code[i:], "") + if i > j { + return false + } + i = j + 3 + case strings.HasPrefix(code[i:], "") + if !isAvailbleTagName(i, j) { + return false + } + tagName := code[i:j] + i = j + 1 + n := len(stack) + if n == 0 || stack[n-1] != tagName { + return false + } + stack = stack[:n-1] + case code[i] == '<': + i++ + j := i + strings.Index(code[i:], ">") + if !isAvailbleTagName(i, j) { + return false + } + tagName := code[i:j] + i = j + 1 + stack = append(stack, tagName) + default: + i++ + } + } + + // len(stack) != 0 说明, TAG 没有封闭 + return len(stack) == 0 +} diff --git a/Algorithms/0591.tag-validator/tag-validator_test.go b/Algorithms/0591.tag-validator/tag-validator_test.go new file mode 100755 index 000000000..3f445dc52 --- /dev/null +++ b/Algorithms/0591.tag-validator/tag-validator_test.go @@ -0,0 +1,84 @@ +package Problem0591 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + code string + ans bool +}{ + + { + "
This is the first line ]]>
", + true, + }, + + { + "
>> ![cdata[]] ]>]>]>>]
", + false, + }, + + { + "
>> ![cdata[]] ]>]]>]]>>]
", + true, + }, + + { + "BBB
", + false, + }, + + { + " ", + false, + }, + + { + "
div tag is not closed
", + false, + }, + + { + "
unmatched <
", + false, + }, + + { + "
closed tags with invalid tag name 123
", + false, + }, + + { + "
unmatched tags with invalid tag name and
", + false, + }, + + { + "
unmatched start tag and unmatched end tag
", + false, + }, + + // 可以有多个 testcase +} + +func Test_isValid(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, isValid(tc.code), "输入:%v", tc) + } +} + +func Benchmark_isValid(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + isValid(tc.code) + } + } +} diff --git a/Algorithms/0592.fraction-addition-and-subtraction/README.md b/Algorithms/0592.fraction-addition-and-subtraction/README.md new file mode 100755 index 000000000..af2e872f9 --- /dev/null +++ b/Algorithms/0592.fraction-addition-and-subtraction/README.md @@ -0,0 +1,45 @@ +# [592. Fraction Addition and Subtraction](https://leetcode.com/problems/fraction-addition-and-subtraction/) + +## 题目 + +Given a string representing an expression of fraction addition and subtraction, you need to return the calculation result in string format. The final result should be irreducible fraction. If your final result is an integer, say 2, you need to change it to the format of fraction that has denominator 1. So in this case, 2 should be converted to 2/1. + +Example 1: + +```text +Input:"-1/2+1/2" +Output: "0/1" +``` + +Example 2: + +```text +Input:"-1/2+1/2+1/3" +Output: "1/3" +``` + +Example 3: + +```text +Input:"1/3-1/2" +Output: "-1/6" +``` + +Example 4: + +```text +Input:"5/3+1/3" +Output: "2/1" +``` + +Note: + +1. The input string only contains '0' to '9', '/', '+' and '-'. So does the output. +1. Each fraction (input and output) has format ±numerator/denominator. If the first input fraction or the output is positive, then '+' will be omitted. +1. The input only contains valid irreducible fractions, where the numerator and denominator of each fraction will always be in the range [1,10]. If the denominator is 1, it means this fraction is actually an integer in a fraction format defined above. +1. The number of given fractions will be in the range [1,10]. +1. The numerator and denominator of the final result are guaranteed to be valid and in the range of 32-bit int. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0592.fraction-addition-and-subtraction/fraction-addition-and-subtraction.go b/Algorithms/0592.fraction-addition-and-subtraction/fraction-addition-and-subtraction.go new file mode 100755 index 000000000..f28a3f846 --- /dev/null +++ b/Algorithms/0592.fraction-addition-and-subtraction/fraction-addition-and-subtraction.go @@ -0,0 +1,75 @@ +package Problem0592 + +import ( + "strconv" + "strings" +) + +func fractionAddition(expression string) string { + expression = insertPlus(expression) + es := strings.Split(expression, "+") + res := getFrac(es[0]) + for i := 1; i < len(es); i++ { + res = add(res, getFrac(es[i])) + } + return res.String() +} + +// 在 s[1:] 中的每一个 '-' 前,插入一个 '+' +func insertPlus(s string) string { + bytes := []byte(s) + res := make([]byte, 1, len(bytes)*5/4) + res[0] = bytes[0] + for i := 1; i < len(bytes); i++ { + if bytes[i] == '-' { + res = append(res, '+') + } + res = append(res, bytes[i]) + } + return string(res) +} + +type fraction struct { + num, den int +} + +func add(a, b fraction) fraction { + num := a.num*b.den + b.num*a.den + den := a.den * b.den + d := gcd(abs(num), den) + return fraction{ + num: num / d, + den: den / d, + } +} + +func getFrac(s string) fraction { + ss := strings.Split(s, "/") + n, _ := strconv.Atoi(ss[0]) + d, _ := strconv.Atoi(ss[1]) + return fraction{ + num: n, + den: d, + } +} + +func (f fraction) String() string { + return strconv.Itoa(f.num) + "/" + strconv.Itoa(f.den) +} + +func gcd(a, b int) int { + if a < b { + a, b = b, a + } + if b == 0 { + return a + } + return gcd(b, a%b) +} + +func abs(a int) int { + if a < 0 { + return -a + } + return a +} diff --git a/Algorithms/0592.fraction-addition-and-subtraction/fraction-addition-and-subtraction_test.go b/Algorithms/0592.fraction-addition-and-subtraction/fraction-addition-and-subtraction_test.go new file mode 100755 index 000000000..cd329a0db --- /dev/null +++ b/Algorithms/0592.fraction-addition-and-subtraction/fraction-addition-and-subtraction_test.go @@ -0,0 +1,54 @@ +package Problem0592 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + expression string + ans string +}{ + + { + "-1/2+1/2", + "0/1", + }, + + { + "-1/2+1/2+1/3", + "1/3", + }, + + { + "1/3-1/2", + "-1/6", + }, + + { + "5/3+1/3", + "2/1", + }, + + // 可以有多个 testcase +} + +func Test_fractionAddition(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, fractionAddition(tc.expression), "输入:%v", tc) + } +} + +func Benchmark_fractionAddition(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + fractionAddition(tc.expression) + } + } +} diff --git a/Algorithms/0593.valid-square/README.md b/Algorithms/0593.valid-square/README.md new file mode 100755 index 000000000..dc3a081ca --- /dev/null +++ b/Algorithms/0593.valid-square/README.md @@ -0,0 +1,24 @@ +# [593. Valid Square](https://leetcode.com/problems/valid-square/) + +## 题目 + +Given the coordinates of four points in 2D space, return whether the four points could construct a square. + +The coordinate (x,y) of a point is represented by an integer array with two integers. + +Example: + +```text +Input: p1 = [0,0], p2 = [1,1], p3 = [1,0], p4 = [0,1] +Output: True +``` + +Note: + +1. All the input integers are in the range [-10000, 10000]. +1. A valid square has four equal sides with positive length and four equal angles (90-degree angles). +1. Input points have no order. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0593.valid-square/valid-square.go b/Algorithms/0593.valid-square/valid-square.go new file mode 100755 index 000000000..d0b542fe6 --- /dev/null +++ b/Algorithms/0593.valid-square/valid-square.go @@ -0,0 +1,67 @@ +package Problem0593 + +func validSquare(p1, p2, p3, p4 []int) bool { + vs := getVectors([][]int{p1, p2, p3, p4}) + for i := 0; i < 3; i++ { + for j := i + 1; j < 4; j++ { + if !isOK(vs[i], vs[j]) { + return false + } + } + } + return true +} + +// 获取以 ps 构成的四边形的中心为起点,到 ps 中各个点的向量 +func getVectors(ps [][]int) [][]int { + vs := make([][]int, 4) + c := getCenter(ps) + for i := range vs { + vs[i] = vector(ps[i], c) + } + return vs +} + +// NOTICE: 为了避免中心坐标出现小数,将四边形变成原来的 4 倍进行处理 +func getCenter(ps [][]int) []int { + x, y := 0, 0 + for i := 0; i < len(ps); i++ { + ps[i][0] *= 4 + ps[i][1] *= 4 + x += ps[i][0] + y += ps[i][1] + } + return []int{x / 4, y / 4} +} + +func vector(p, c []int) []int { + return []int{p[0] - c[0], p[1] - c[1]} +} + +func isOK(v1, v2 []int) bool { + if isZero(v1) || isZero(v2) { + return false + } + return isInverse(v1, v2) || + (isVertical(v1, v2) && isLengthEqual(v1, v2)) +} + +func isZero(v []int) bool { + return v[0] == 0 && v[1] == 0 +} + +func isInverse(v1, v2 []int) bool { + return v1[0]+v2[0] == 0 && v1[1]+v2[1] == 0 +} + +func isVertical(v1, v2 []int) bool { + return v1[0]*v2[0]+v1[1]*v2[1] == 0 +} + +func isLengthEqual(v1, v2 []int) bool { + return lenSquare(v1) == lenSquare(v2) +} + +func lenSquare(v []int) int { + return v[0]*v[0] + v[1]*v[1] +} diff --git a/Algorithms/0593.valid-square/valid-square_test.go b/Algorithms/0593.valid-square/valid-square_test.go new file mode 100755 index 000000000..4084e0be9 --- /dev/null +++ b/Algorithms/0593.valid-square/valid-square_test.go @@ -0,0 +1,74 @@ +package Problem0593 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + p1, p2, p3, p4 []int + ans bool +}{ + + { + []int{0, 0}, + []int{0, 0}, + []int{0, 0}, + []int{0, 1}, + false, + }, + + { + []int{0, 0}, + []int{0, 0}, + []int{0, 0}, + []int{0, 0}, + false, + }, + + { + []int{1, 3}, + []int{3, 7}, + []int{7, 4}, + []int{4, 0}, + false, + }, + + { + []int{0, 3}, + []int{3, 7}, + []int{7, 4}, + []int{4, 0}, + true, + }, + + { + []int{0, 0}, + []int{1, 1}, + []int{1, 0}, + []int{0, 1}, + true, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, validSquare(tc.p1, tc.p2, tc.p3, tc.p4), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + validSquare(tc.p1, tc.p2, tc.p3, tc.p4) + } + } +} diff --git a/Algorithms/0594.longest-harmonious-subsequence/README.md b/Algorithms/0594.longest-harmonious-subsequence/README.md new file mode 100755 index 000000000..23aab55d0 --- /dev/null +++ b/Algorithms/0594.longest-harmonious-subsequence/README.md @@ -0,0 +1,22 @@ +# [594. Longest Harmonious Subsequence](https://leetcode.com/problems/longest-harmonious-subsequence/) + +## 题目 + +We define a harmonious array is an array where the difference between its maximum value and its minimum value is exactly 1. + +Now, given an integer array, you need to find the length of its longest harmonious subsequence among all its possible [subsequences](https://en.wikipedia.org/wiki/Subsequence). + +Example 1: + +```text +Input: [1,3,2,2,5,2,3,7] +Output: 5 +Explanation: The longest harmonious subsequence is [3,2,2,2,3]. +``` + +Note: +The length of the input array will not exceed 20,000. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0594.longest-harmonious-subsequence/longest-harmonious-subsequence.go b/Algorithms/0594.longest-harmonious-subsequence/longest-harmonious-subsequence.go new file mode 100755 index 000000000..46262460c --- /dev/null +++ b/Algorithms/0594.longest-harmonious-subsequence/longest-harmonious-subsequence.go @@ -0,0 +1,21 @@ +package Problem0594 + +func findLHS(nums []int) int { + r := make(map[int]int, len(nums)) + for _, n := range nums { + r[n]++ + } + + max := 0 + for n, c1 := range r { + c2, ok := r[n+1] + if ok { + t := c1 + c2 + if max < t { + max = t + } + } + } + + return max +} diff --git a/Algorithms/0594.longest-harmonious-subsequence/longest-harmonious-subsequence_test.go b/Algorithms/0594.longest-harmonious-subsequence/longest-harmonious-subsequence_test.go new file mode 100755 index 000000000..2e913a5a1 --- /dev/null +++ b/Algorithms/0594.longest-harmonious-subsequence/longest-harmonious-subsequence_test.go @@ -0,0 +1,44 @@ +package Problem0594 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans int +}{ + + { + []int{1, 1, 1, 1}, + 0, + }, + + { + []int{1, 3, 2, 2, 5, 2, 3, 7}, + 5, + }, + + // 可以有多个 testcase +} + +func Test_findLHS(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findLHS(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_findLHS(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findLHS(tc.nums) + } + } +} diff --git a/Algorithms/0598.range-addition-ii/README.md b/Algorithms/0598.range-addition-ii/README.md new file mode 100755 index 000000000..bb6aedac2 --- /dev/null +++ b/Algorithms/0598.range-addition-ii/README.md @@ -0,0 +1,43 @@ +# [598. Range Addition II](https://leetcode.com/problems/range-addition-ii/) + +## 题目 + +Given an m * n matrix M initialized with all 0's and several update operations. +Operations are represented by a 2D array, and each operation is represented by an array with two positive integers a and b, which means M[i][j] should be added by one for all 0 <= i < a and 0 <= j < b. +You need to count and return the number of maximum integers in the matrix after performing all the operations. + +Example 1: + +```text +Input: +m = 3, n = 3 +operations = [[2,2],[3,3]] +Output: 4 +Explanation: +Initially, M = +[[0, 0, 0], + [0, 0, 0], + [0, 0, 0]] + +After performing [2,2], M = +[[1, 1, 0], + [1, 1, 0], + [0, 0, 0]] + +After performing [3,3], M = +[[2, 2, 1], + [2, 2, 1], + [1, 1, 1]] + +So the maximum integer in M is 2, and there are four of it in M. So return 4. +``` + +Note: + +1. The range of m and n is [1,40000]. +1. The range of a is [1,m], and the range of b is [1,n]. +1. The range of operations size won't exceed 10,000. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0598.range-addition-ii/range-addition-ii.go b/Algorithms/0598.range-addition-ii/range-addition-ii.go new file mode 100755 index 000000000..ee6641488 --- /dev/null +++ b/Algorithms/0598.range-addition-ii/range-addition-ii.go @@ -0,0 +1,16 @@ +package Problem0598 + +func maxCount(m int, n int, ops [][]int) int { + for _, o := range ops { + m = min(m, o[0]) + n = min(n, o[1]) + } + return m * n +} + +func min(a, b int) int { + if a < b { + return a + } + return b +} diff --git a/Algorithms/0598.range-addition-ii/range-addition-ii_test.go b/Algorithms/0598.range-addition-ii/range-addition-ii_test.go new file mode 100755 index 000000000..8954e8aa4 --- /dev/null +++ b/Algorithms/0598.range-addition-ii/range-addition-ii_test.go @@ -0,0 +1,43 @@ +package Problem0598 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + m int + n int + ops [][]int + ans int +}{ + + { + 3, + 3, + [][]int{{2, 2}, {3, 3}}, + 4, + }, + + // 可以有多个 testcase +} + +func Test_maxCount(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, maxCount(tc.m, tc.n, tc.ops), "输入:%v", tc) + } +} + +func Benchmark_maxCount(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + maxCount(tc.m, tc.n, tc.ops) + } + } +} diff --git a/Algorithms/0599.minimum-index-sum-of-two-lists/599.100.png b/Algorithms/0599.minimum-index-sum-of-two-lists/599.100.png new file mode 100644 index 000000000..29e7c551f Binary files /dev/null and b/Algorithms/0599.minimum-index-sum-of-two-lists/599.100.png differ diff --git a/Algorithms/0599.minimum-index-sum-of-two-lists/README.md b/Algorithms/0599.minimum-index-sum-of-two-lists/README.md new file mode 100755 index 000000000..07decf0c4 --- /dev/null +++ b/Algorithms/0599.minimum-index-sum-of-two-lists/README.md @@ -0,0 +1,40 @@ +# [599. Minimum Index Sum of Two Lists](https://leetcode.com/problems/minimum-index-sum-of-two-lists/) + +## 题目 + +Suppose Andy and Doris want to choose a restaurant for dinner, and they both have a list of favorite restaurants represented by strings. + +You need to help them find out their common interest with the least list index sum. If there is a choice tie between answers, output all of them with no order requirement. You could assume there always exists an answer. + +Example 1: + +```text +Input: +["Shogun", "Tapioca Express", "Burger King", "KFC"] +["Piatti", "The Grill at Torrey Pines", "Hungry Hunter Steakhouse", "Shogun"] +Output: ["Shogun"] +Explanation: The only restaurant they both like is "Shogun". +``` + +Example 2: + +```text +Input: +["Shogun", "Tapioca Express", "Burger King", "KFC"] +["KFC", "Shogun", "Burger King"] +Output: ["Shogun"] +Explanation: The restaurant they both like and have the least index sum is "Shogun" with index sum 1 (0+1). +``` + +Note: + +1. The length of both lists will be in the range of [1, 1000]. +1. The length of strings in both lists will be in the range of [1, 30]. +1. The index is starting from 0 to the list length minus 1. +1. No duplicates in both lists. + +## 解题思路 + +见程序注释 + +![](599.100.png) \ No newline at end of file diff --git a/Algorithms/0599.minimum-index-sum-of-two-lists/minimum-index-sum-of-two-lists.go b/Algorithms/0599.minimum-index-sum-of-two-lists/minimum-index-sum-of-two-lists.go new file mode 100755 index 000000000..d7d35d00f --- /dev/null +++ b/Algorithms/0599.minimum-index-sum-of-two-lists/minimum-index-sum-of-two-lists.go @@ -0,0 +1,28 @@ +package Problem0599 + +func findRestaurant(list1 []string, list2 []string) []string { + if len(list1) > len(list2) { + list1, list2 = list2, list1 + } + + m2 := make(map[string]int, len(list2)) + for i := range list2 { + m2[list2[i]] = i + } + + min := 2000 + res := make([]string, 0, 1000) + for i, r := range list1 { + if j, ok := m2[r]; ok { + if min == i+j { + res = append(res, r) + } + if min > i+j { + min = i + j + res = append(res[len(res):], r) + } + } + } + + return res +} diff --git a/Algorithms/0599.minimum-index-sum-of-two-lists/minimum-index-sum-of-two-lists_test.go b/Algorithms/0599.minimum-index-sum-of-two-lists/minimum-index-sum-of-two-lists_test.go new file mode 100755 index 000000000..ae279dac6 --- /dev/null +++ b/Algorithms/0599.minimum-index-sum-of-two-lists/minimum-index-sum-of-two-lists_test.go @@ -0,0 +1,51 @@ +package Problem0599 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + list1, list2, ans []string +}{ + + { + []string{"Shogun", "Tapioca Express", "Burger King", "KFC"}, + []string{"Piatti", "The Grill at Torrey Pines", "Hungry Hunter Steakhouse", "Shogun"}, + []string{"Shogun"}, + }, + + { + []string{"Shogun", "Tapioca Express", "Burger King", "KFC"}, + []string{"KFC", "Shogun", "Burger King"}, + []string{"Shogun"}, + }, + + { + []string{"Shogun", "Tapioca Express", "Burger King", "KFC"}, + []string{"KFC", "Burger King", "Tapioca Express", "Shogun"}, + []string{"Shogun", "Tapioca Express", "Burger King", "KFC"}, + }, + + // 可以有多个 testcase +} + +func Test_fcName(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findRestaurant(tc.list1, tc.list2), "输入:%v", tc) + } +} + +func Benchmark_fcName(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findRestaurant(tc.list1, tc.list2) + } + } +} diff --git a/Algorithms/0600.non-negative-integers-without-consecutive-ones/README.md b/Algorithms/0600.non-negative-integers-without-consecutive-ones/README.md new file mode 100755 index 000000000..896406b1b --- /dev/null +++ b/Algorithms/0600.non-negative-integers-without-consecutive-ones/README.md @@ -0,0 +1,28 @@ +# [600. Non-negative Integers without Consecutive Ones](https://leetcode.com/problems/non-negative-integers-without-consecutive-ones/) + +## 题目 + +Given a positive integer n, find the number of non-negative integers less than or equal to n, whose binary representations do NOT contain consecutive ones. + +Example 1: + +```text +Input: 5 +Output: 5 +Explanation: +Here are the non-negative integers <= 5 with their corresponding binary representations: +0 : 0 +1 : 1 +2 : 10 +3 : 11 +4 : 100 +5 : 101 +Among them, only integer 3 disobeys the rule (two consecutive ones) and the other 5 satisfy the rule. +``` + +Note: +1 <= n <= 109 + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0600.non-negative-integers-without-consecutive-ones/non-negative-integers-without-consecutive-ones.go b/Algorithms/0600.non-negative-integers-without-consecutive-ones/non-negative-integers-without-consecutive-ones.go new file mode 100755 index 000000000..723553ef2 --- /dev/null +++ b/Algorithms/0600.non-negative-integers-without-consecutive-ones/non-negative-integers-without-consecutive-ones.go @@ -0,0 +1,45 @@ +package Problem0600 + +func findIntegers(num int) int { + // binary 是 num 的二进制表示,逆序 + binary := make([]byte, 0, 32) + for num > 0 { + binary = append(binary, byte(num%2)+'0') + num /= 2 + } + + n := len(binary) + // a[i] == 长度为 i+1 且以 0 结尾的 binary 中不包含连续 1 的个数 + a := make([]int, n) + // b[i] == 长度为 i+1 且以 1 结尾的 binary 中不包含连续 1 的个数 + b := make([]int, n) + a[0] = 1 + b[0] = 1 + + for i := 1; i < n; i++ { + // 在 a[i-1] 中的 binary 右边加 0 + // 和 + // 在 b[i-1] 中的 binary 右边加 0 + // 可以得到 a[i] 中的 binary + a[i] = a[i-1] + b[i-1] + // 在 a[i-1] 中的 binary 右边加 1,可以得到 b[i] 中的 binary + // 在 b[i-1] 中的 binary 右边加 1 会得到连续的 1,违反了题意 + b[i] = a[i-1] + } + + res := a[n-1] + b[n-1] + // 此时的 res 可能包含了 >num 的那一部分数,需要减去相关部分 + for i := n - 2; i >= 0; i-- { + // 注意,此时的 binary 是逆序 + // 出现连续的 `1` 说明已经清理干净了 + if binary[i] == '1' && binary[i+1] == '1' { + break + } + // 当初多加了 b[i] + if binary[i] == '0' && binary[i+1] == '0' { + res -= b[i] + } + } + + return res +} diff --git a/Algorithms/0600.non-negative-integers-without-consecutive-ones/non-negative-integers-without-consecutive-ones_test.go b/Algorithms/0600.non-negative-integers-without-consecutive-ones/non-negative-integers-without-consecutive-ones_test.go new file mode 100755 index 000000000..e5975f002 --- /dev/null +++ b/Algorithms/0600.non-negative-integers-without-consecutive-ones/non-negative-integers-without-consecutive-ones_test.go @@ -0,0 +1,42 @@ +package Problem0600 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + num int + ans int +}{ + + {1000, 144}, + + {8, 6}, + + {5, 5}, + + {4, 4}, + + // 可以有多个 testcase +} + +func Test_findIntegers(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findIntegers(tc.num), "输入:%v", tc) + } +} + +func Benchmark_findIntegers(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findIntegers(tc.num) + } + } +} diff --git a/Algorithms/0606.construct-string-from-binary-tree/README.md b/Algorithms/0606.construct-string-from-binary-tree/README.md new file mode 100755 index 000000000..a0fe832ce --- /dev/null +++ b/Algorithms/0606.construct-string-from-binary-tree/README.md @@ -0,0 +1,42 @@ +# [606. Construct String from Binary Tree](https://leetcode.com/problems/construct-string-from-binary-tree/) + +## 题目 + +You need to construct a string consists of parenthesis and integers from a binary tree with the preorder traversing way. + +The null node needs to be represented by empty parenthesis pair "()". And you need to omit all the empty parenthesis pairs that don't affect the one-to-one mapping relationship between the string and the original binary tree. + +Example 1: + +```text +Input: Binary tree: [1,2,3,4] + 1 + / \ + 2 3 + / + 4 + +Output: "1(2(4))(3)" + +Explanation: Originallay it needs to be "1(2(4)())(3()())", but you need to omit all the unnecessary empty parenthesis pairs. +And it will be "1(2(4))(3)". +``` + +Example 2: + +```text +Input: Binary tree: [1,2,3,null,4] + 1 + / \ + 2 3 + \ + 4 + +Output: "1(2()(4))(3)" + +Explanation: Almost the same as the first example, except we can't omit the first parenthesis pair to break the one-to-one mapping relationship between the input and the output. +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0606.construct-string-from-binary-tree/construct-string-from-binary-tree.go b/Algorithms/0606.construct-string-from-binary-tree/construct-string-from-binary-tree.go new file mode 100755 index 000000000..779790068 --- /dev/null +++ b/Algorithms/0606.construct-string-from-binary-tree/construct-string-from-binary-tree.go @@ -0,0 +1,28 @@ +package Problem0606 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" + "strconv" +) + +type TreeNode = kit.TreeNode + +func tree2str(t *TreeNode) string { + if t == nil { + return "" + } + + res := strconv.Itoa(t.Val) + + if t.Left == nil && t.Right == nil { + return res + } + + res += "("+ tree2str(t.Left)+")" + + if t.Right != nil { + res += "("+ tree2str(t.Right)+")" + } + + return res +} diff --git a/Algorithms/0606.construct-string-from-binary-tree/construct-string-from-binary-tree_test.go b/Algorithms/0606.construct-string-from-binary-tree/construct-string-from-binary-tree_test.go new file mode 100755 index 000000000..1b0d0bbf4 --- /dev/null +++ b/Algorithms/0606.construct-string-from-binary-tree/construct-string-from-binary-tree_test.go @@ -0,0 +1,50 @@ +package Problem0606 + +import ( + "fmt" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + pre, in []int + ans string +}{ + + { + []int{1, 2, 4, 3}, + []int{4, 2, 1, 3}, + "1(2(4))(3)", + }, + + { + []int{1, 2, 4, 3}, + []int{2, 4, 1, 3}, + "1(2()(4))(3)", + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + root := kit.PreIn2Tree(tc.pre, tc.in) + ast.Equal(tc.ans, tree2str(root), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + root := kit.PreIn2Tree(tc.pre, tc.in) + tree2str(root) + } + } +} diff --git a/Algorithms/0609.find-duplicate-file-in-system/README.md b/Algorithms/0609.find-duplicate-file-in-system/README.md new file mode 100755 index 000000000..7b55de51f --- /dev/null +++ b/Algorithms/0609.find-duplicate-file-in-system/README.md @@ -0,0 +1,51 @@ +# [609. Find Duplicate File in System](https://leetcode.com/problems/find-duplicate-file-in-system/) + +## 题目 + +Given a list of directory info including directory path, and all the files with contents in this directory, you need to find out all the groups of duplicate files in the file system in terms of their paths. + +A group of duplicate files consists of at least two files that have exactly the same content. + +A single directory info string in the input list has the following format: + +`"root/d1/d2/.../dm f1.txt(f1_content) f2.txt(f2_content) ... fn.txt(fn_content)"` + +`It means there are n files (f1.txt, f2.txt ... fn.txt with content f1_content, f2_content ... fn_content, respectively) in directory root/d1/d2/.../dm. Note that n >= 1 and m >= 0. If m = 0, it means the directory is just the root directory.` + +The output is a list of group of duplicate file paths. For each group, it contains all the file paths of the files that have the same content. A file path is a string that has the following format: + +`"directory_path/file_name.txt"` + +Example 1: + +Input: + +```text +["root/a 1.txt(abcd) 2.txt(efgh)", "root/c 3.txt(abcd)", "root/c/d 4.txt(efgh)", "root 4.txt(efgh)"] +``` + +Output: + +```text +[["root/a/2.txt","root/c/d/4.txt","root/4.txt"],["root/a/1.txt","root/c/3.txt"]] +``` + +Note: + +1. No order is required for the final output. +1. You may assume the directory name, file name and file content only has letters and digits, and the length of file content is in the range of [1,50]. +1. The number of files given is in the range of [1,20000]. +1. You may assume no files or directories share the same name in the same directory. +1. You may assume each given directory info represents a unique directory. Directory path and file info are separated by a single blank space. + +Follow-up beyond contest: + +1. Imagine you are given a real file system, how will you search files? DFS or BFS? +1. If the file content is very large (GB level), how will you modify your solution? +1. If you can only read the file by 1kb each time, how will you modify your solution? +1. What is the time complexity of your modified solution? What is the most time-consuming part and memory consuming part of it? How to optimize? +1. How to make sure the duplicated files you find are not false positive? + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0609.find-duplicate-file-in-system/find-duplicate-file-in-system.go b/Algorithms/0609.find-duplicate-file-in-system/find-duplicate-file-in-system.go new file mode 100755 index 000000000..8c5aa684b --- /dev/null +++ b/Algorithms/0609.find-duplicate-file-in-system/find-duplicate-file-in-system.go @@ -0,0 +1,38 @@ +package Problem0609 + +import ( + "strings" +) + +func findDuplicate(path []string) [][]string { + // m 用于记录拥有相同文件内容的各个文件的个数 + m := make(map[string][]string, len(path)*2) + for i := 0; i < len(path); i++ { + analyze(path[i], m) + } + + res := make([][]string, 0, len(m)) + for _, files := range m { + if len(files) > 1 { + res = append(res, files) + } + } + + return res +} + +// 把 path 中的文件,按照文件内容,归类记录 +func analyze(path string, m map[string][]string) { + fs := strings.Split(path, " ") + p := fs[0] + for i := 1; i < len(fs); i++ { + f, c := fileAndContent(fs[i]) + m[c] = append(m[c], p+"/"+f) + } +} + +// 形为 filename(fileContent) 的 s 分解为 filename 和 fileContent 返回 +func fileAndContent(s string) (string, string) { + i := strings.IndexByte(s, '(') + return s[:i], s[i+1 : len(s)-1] +} diff --git a/Algorithms/0609.find-duplicate-file-in-system/find-duplicate-file-in-system_test.go b/Algorithms/0609.find-duplicate-file-in-system/find-duplicate-file-in-system_test.go new file mode 100755 index 000000000..aa70b8ba8 --- /dev/null +++ b/Algorithms/0609.find-duplicate-file-in-system/find-duplicate-file-in-system_test.go @@ -0,0 +1,55 @@ +package Problem0609 + +import ( + "fmt" + "sort" + "strings" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + path []string + ans [][]string +}{ + + { + []string{"root/a 1.txt(abcd) 2.txt(efgh)", "root/c 3.txt(abcd)", "root/c/d 4.txt(efgh)", "root 4.txt(efgh)"}, + [][]string{{"root/a/2.txt", "root/c/d/4.txt", "root/4.txt"}, {"root/a/1.txt", "root/c/3.txt"}}, + }, + + // 可以有多个 testcase +} + +func Test_fcName(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ans := findDuplicate(tc.path) + ast.Equal(normal(tc.ans), normal(ans), "输入:%v", tc) + } +} + +func normal(sss [][]string) string { + ss := make([]string, len(sss)) + + for i := 0; i < len(sss); i++ { + sort.Strings(sss[i]) + ss[i] = strings.Join(sss[i], "☆") + } + + sort.Strings(ss) + + return strings.Join(ss, "★★") +} + +func Benchmark_fcName(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findDuplicate(tc.path) + } + } +} diff --git a/Algorithms/0617.merge-two-binary-trees/README.md b/Algorithms/0617.merge-two-binary-trees/README.md new file mode 100755 index 000000000..e634c0c11 --- /dev/null +++ b/Algorithms/0617.merge-two-binary-trees/README.md @@ -0,0 +1,32 @@ +# [617. Merge Two Binary Trees](https://leetcode.com/problems/merge-two-binary-trees/) + +## 题目 + +Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are not. + +You need to merge them into a new binary tree. The merge rule is that if two nodes overlap, then sum node values up as the new value of the merged node. Otherwise, the NOT null node will be used as the node of new tree. + +Example 1: + +```text +Input: +Tree 1 Tree 2 + 1 2 + / \ / \ + 3 2 1 3 + / \ \ + 5 4 7 +Output: +Merged tree: + 3 + / \ + 4 5 + / \ \ + 5 4 7 +``` + +Note: The merging process must start from the root nodes of both trees. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0617.merge-two-binary-trees/merge-two-binary-trees.go b/Algorithms/0617.merge-two-binary-trees/merge-two-binary-trees.go new file mode 100755 index 000000000..b0110fb82 --- /dev/null +++ b/Algorithms/0617.merge-two-binary-trees/merge-two-binary-trees.go @@ -0,0 +1,28 @@ +package Problem0617 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" +) + +type TreeNode = kit.TreeNode + +func mergeTrees(t1 *TreeNode, t2 *TreeNode) *TreeNode { + if t1 == nil && t2 == nil { + return nil + } + + if t1 == nil { + return t2 + } + + if t2 == nil { + return t1 + } + + root := &TreeNode{Val: t1.Val + t2.Val} + + root.Left = mergeTrees(t1.Left, t2.Left) + root.Right = mergeTrees(t1.Right, t2.Right) + + return root +} diff --git a/Algorithms/0617.merge-two-binary-trees/merge-two-binary-trees_test.go b/Algorithms/0617.merge-two-binary-trees/merge-two-binary-trees_test.go new file mode 100755 index 000000000..7ed43d328 --- /dev/null +++ b/Algorithms/0617.merge-two-binary-trees/merge-two-binary-trees_test.go @@ -0,0 +1,50 @@ +package Problem0617 + +import ( + "fmt" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + pre1, in1 []int + pre2, in2 []int + ansPost []int +}{ + + { + []int{1, 3, 5, 2}, + []int{5, 3, 1, 2}, + []int{20, 10, 40, 30, 70}, + []int{10, 40, 20, 30, 70}, + []int{5, 40, 13, 70, 32, 21}, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + t1 := kit.PreIn2Tree(tc.pre1, tc.in1) + t2 := kit.PreIn2Tree(tc.pre2, tc.in2) + ansPost := kit.Tree2Postorder(mergeTrees(t1, t2)) + ast.Equal(tc.ansPost, ansPost, "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + t1 := kit.PreIn2Tree(tc.pre1, tc.in1) + t2 := kit.PreIn2Tree(tc.pre2, tc.in2) + mergeTrees(t1, t2) + } + } +} diff --git a/Algorithms/0623.add-one-row-to-tree/README.md b/Algorithms/0623.add-one-row-to-tree/README.md new file mode 100755 index 000000000..943350e52 --- /dev/null +++ b/Algorithms/0623.add-one-row-to-tree/README.md @@ -0,0 +1,66 @@ +# [623. Add One Row to Tree](https://leetcode.com/problems/add-one-row-to-tree/) + +## 题目 + +Given the root of a binary tree, then value v and depth d, you need to add a row of nodes with value v at the given depth d. The root node is at depth 1. + +The adding rule is: given a positive integer depth d, for each NOT null tree nodes N in depth d-1, create two tree nodes with value v as N's left subtree root and right subtree root. And N's original left subtree should be the left subtree of the new left subtree root, its original right subtree should be the right subtree of the new right subtree root. If depth d is 1 that means there is no depth d-1 at all, then create a tree node with value v as the new root of the whole original tree, and the original tree is the new root's left subtree. + +Example 1: + +```text +Input: +A binary tree as following: + 4 + / \ + 2 6 + / \ / + 3 1 5 + +v = 1 + +d = 2 + +Output: + 4 + / \ + 1 1 + / \ + 2 6 + / \ / + 3 1 5 +``` + +Example 2: + +```text +Input: +A binary tree as following: + 4 + / + 2 + / \ + 3 1 + +v = 1 + +d = 3 + +Output: + 4 + / + 2 + / \ + 1 1 + / \ +3 1 +``` + +Note: + +1. The given d is in range [1, maximum depth of the given tree + 1]. +1. The given binary tree has at least one tree node. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0623.add-one-row-to-tree/add-one-row-to-tree.go b/Algorithms/0623.add-one-row-to-tree/add-one-row-to-tree.go new file mode 100755 index 000000000..ac1a326f4 --- /dev/null +++ b/Algorithms/0623.add-one-row-to-tree/add-one-row-to-tree.go @@ -0,0 +1,29 @@ +package Problem0623 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" +) + +type TreeNode = kit.TreeNode + +func addOneRow(root *TreeNode, v int, d int) *TreeNode { + switch d { + case 1: + newRoot := &TreeNode{Val: v, Left: root} + return newRoot + case 2: + left := &TreeNode{Val: v, Left: root.Left} + right := &TreeNode{Val: v, Right: root.Right} + root.Left = left + root.Right = right + default: + if root.Left != nil { + root.Left = addOneRow(root.Left, v, d-1) + } + if root.Right != nil { + root.Right = addOneRow(root.Right, v, d-1) + } + } + + return root +} diff --git a/Algorithms/0623.add-one-row-to-tree/add-one-row-to-tree_test.go b/Algorithms/0623.add-one-row-to-tree/add-one-row-to-tree_test.go new file mode 100755 index 000000000..c85ae75a3 --- /dev/null +++ b/Algorithms/0623.add-one-row-to-tree/add-one-row-to-tree_test.go @@ -0,0 +1,71 @@ +package Problem0623 + +import ( + "fmt" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + pre, in []int + v, d int + ans []int +}{ + + { + []int{4, 2, 3, 1, 6, 5}, + []int{3, 2, 1, 4, 5, 6}, + 1, + 2, + []int{3, 1, 2, 1, 5, 6, 1, 4}, + }, + + { + []int{1, 2, 3}, + []int{2, 1, 3}, + 1, + 1, + []int{2, 3, 1, 1}, + }, + + { + []int{1, 2, 3, 4, 6}, + []int{1, 3, 2, 4, 6}, + 5, + 4, + []int{5, 5, 3, 5, 6, 5, 4, 2, 1}, + }, + + { + []int{4, 2, 3, 1}, + []int{3, 2, 1, 4}, + 1, + 3, + []int{3, 1, 1, 1, 2, 4}, + }, + + // 可以有多个 testcase +} + +func Test_fcName(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + root := kit.PreIn2Tree(tc.pre, tc.in) + ast.Equal(tc.ans, kit.Tree2Postorder(addOneRow(root, tc.v, tc.d)), "输入:%v", tc) + } +} + +func Benchmark_fcName(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + root := kit.PreIn2Tree(tc.pre, tc.in) + addOneRow(root, tc.v, tc.d) + } + } +} diff --git a/Algorithms/0629.k-inverse-pairs-array/README.md b/Algorithms/0629.k-inverse-pairs-array/README.md new file mode 100755 index 000000000..94aa84c10 --- /dev/null +++ b/Algorithms/0629.k-inverse-pairs-array/README.md @@ -0,0 +1,35 @@ +# [629. K Inverse Pairs Array](https://leetcode.com/problems/k-inverse-pairs-array/) + +## 题目 + +Given two integers n and k, find how many different arrays consist of numbers from 1 to n such that there are exactly k inverse pairs. + +We define an inverse pair as following: +For ith and jth element in the array, if i < j and a[i] > a[j] then it's an inverse pair; Otherwise, it's not. + +Since the answer may be very large, the answer should be modulo 109 + 7. + +Example 1: + +```text +Input: n = 3, k = 0 +Output: 1 +Explanation: +Only the array [1,2,3] which consists of numbers from 1 to 3 has exactly 0 inverse pair. +``` + +Example 2: + +```text +Input: n = 3, k = 1 +Output: 2 +Explanation: +The array [1,3,2] and [2,1,3] have exactly 1 inverse pair. +``` + +Note: +The integer n is in the range [1, 1000] and k is in the range [0, 1000]. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0629.k-inverse-pairs-array/k-inverse-pairs-array.go b/Algorithms/0629.k-inverse-pairs-array/k-inverse-pairs-array.go new file mode 100755 index 000000000..c202b967e --- /dev/null +++ b/Algorithms/0629.k-inverse-pairs-array/k-inverse-pairs-array.go @@ -0,0 +1,49 @@ +package Problem0629 + +const m = 1000000007 + +func kInversePairs(n int, k int) int { + // dp[n][k] 表示 1~n 可以表示的有 k 个逆序对的个数 + // 想要得到 dp[n][k],我们可以 + // 把 n 放在 dp[n-1][k] 的 n-1 位上 + // 把 n 放在 dp[n-1][k-1] 的 n-2 位上 + // 把 n 放在 dp[n-1][k-2] 的 n-3 位上 + // ..... + // 把 n 放在 dp[n-1][k-(n-1)] 的 0 位上 + // 可得 + // dp[n][k] = dp[n-1][k]+dp[n-1][k-1]+dp[n-1][k-2]+...+dp[n-1][k+1-n+1]+dp[n-1][k-n+1] + // 还可得 + // dp[n][k+1] = dp[n-1][k+1]+dp[n-1][k]+dp[n-1][k-1]+dp[n-1][k-2]+...+dp[n-1][k+1-n+1] + // 以上两式相减,可得 + // dp[n][k+1] = dp[n][k]+dp[n-1][k+1]-dp[n-1][k+1-n] + // 最终得到, + // dp[n][k] = dp[n][k-1]+dp[n-1][k]-dp[n-1][k-n] + dp := make([][]int, n+1) + for i := range dp { + dp[i] = make([]int, k+1) + dp[i][0] = 1 + } + + for i := 1; i <= n; i++ { + // 1~i 最多只有 i*(i-1)/2 个逆序对 + maxJ := min(k, i*(i-1)/2) + for j := 1; j <= maxJ; j++ { + dp[i][j] = (dp[i][j-1] + dp[i-1][j]) % m + if j >= i { + dp[i][j] -= dp[i-1][j-i] + if dp[i][j] < 0 { + dp[i][j] += m + } + } + } + } + + return dp[n][k] +} + +func min(a, b int) int { + if a < b { + return a + } + return b +} diff --git a/Algorithms/0629.k-inverse-pairs-array/k-inverse-pairs-array_test.go b/Algorithms/0629.k-inverse-pairs-array/k-inverse-pairs-array_test.go new file mode 100755 index 000000000..97df5df12 --- /dev/null +++ b/Algorithms/0629.k-inverse-pairs-array/k-inverse-pairs-array_test.go @@ -0,0 +1,65 @@ +package Problem0629 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + n int + k int + ans int +}{ + + { + 1000, + 500, + 955735232, + }, + + { + 10, + 3, + 155, + }, + + { + 4, + 2, + 5, + }, + + { + 3, + 0, + 1, + }, + + { + 3, + 1, + 2, + }, + + // 可以有多个 testcase +} + +func Test_kInversePairs(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, kInversePairs(tc.n, tc.k), "输入:%v", tc) + } +} + +func Benchmark_kInversePairs(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + kInversePairs(tc.n, tc.k) + } + } +} diff --git a/Algorithms/0630.course-schedule-iii/630.100.png b/Algorithms/0630.course-schedule-iii/630.100.png new file mode 100644 index 000000000..b96392f46 Binary files /dev/null and b/Algorithms/0630.course-schedule-iii/630.100.png differ diff --git a/Algorithms/0630.course-schedule-iii/README.md b/Algorithms/0630.course-schedule-iii/README.md new file mode 100755 index 000000000..462848c8d --- /dev/null +++ b/Algorithms/0630.course-schedule-iii/README.md @@ -0,0 +1,29 @@ +# [630. Course Schedule III](https://leetcode.com/problems/course-schedule-iii/) + +## 题目 + +There are n different online courses numbered from 1 to n. Each course has some duration(course length) t and closed on dth day. A course should be taken continuously for t days and must be finished before or on the dth day. You will start at the 1st day. + +Given n online courses represented by pairs (t,d), your task is to find the maximal number of courses that can be taken. + +Example: + +```text +Input: [[100, 200], [200, 1300], [1000, 1250], [2000, 3200]] +Output: 3 +Explanation: +There're totally 4 courses, but you can take 3 courses at most: +First, take the 1st course, it costs 100 days so you will finish it on the 100th day, and ready to take the next course on the 101st day. +Second, take the 3rd course, it costs 1000 days so you will finish it on the 1100th day, and ready to take the next course on the 1101st day. +Third, take the 2nd course, it costs 200 days so you will finish it on the 1300th day. +The 4th course cannot be taken now, since you will finish it on the 3300th day, which exceeds the closed date. +``` + +Note: + +1. The integer 1 <= d, t, n <= 10,000. +1. You can't take two courses simultaneously. + +## 解题思路 + +![100](630.100.png) \ No newline at end of file diff --git a/Algorithms/0630.course-schedule-iii/course-schedule-iii.go b/Algorithms/0630.course-schedule-iii/course-schedule-iii.go new file mode 100755 index 000000000..53c0bf6bf --- /dev/null +++ b/Algorithms/0630.course-schedule-iii/course-schedule-iii.go @@ -0,0 +1,82 @@ +package Problem0630 + +import ( + "container/heap" + "sort" +) + +func scheduleCourse(courses [][]int) int { + // taken 已经上过的课程的时长队列 + taken := new(maxPQ) + heap.Init(taken) + + // myCs 具体课程表 + myCs := cs(courses) + sort.Sort(myCs) + + // date 已经上过的课程的总时长 + var date int + // for 循环始终保持以下最优状态 + // 1. c[1] 日期前,尽可能多的课程 + // 2. 如果必须舍弃一部分课程的话。舍弃时长最长的课程,让 date 最小。只有这样的话,才能让后面的有机会上更多的课程。 + for _, c := range myCs { + heap.Push(taken, c[0]) + date += c[0] + for date > c[1] { + date -= heap.Pop(taken).(int) + } + } + + return taken.Len() +} + +// maxPQ 是最大值优先的队列 +type maxPQ []int + +func (q maxPQ) Len() int { + return len(q) +} + +func (q maxPQ) Less(i, j int) bool { + return q[i] > q[j] +} + +func (q maxPQ) Swap(i, j int) { + q[i], q[j] = q[j], q[i] +} + +func (q *maxPQ) Push(x interface{}) { + // Push 使用 *q,是因为 + // Push 增加了 q 的长度 + *q = append(*q, x.(int)) +} + +func (q *maxPQ) Pop() interface{} { + // Pop 使用 *q ,是因为 + // Pop 减短了 q 的长度 + res := (*q)[len(*q)-1] + *q = (*q)[:len(*q)-1] + return res +} + +// cs 是课程的描述课程的数据结构 +// cs[i][0]: 第 i 个课程的持续时间 +// cs[i][1]: 第 i 个课程的结束截止日期 +type cs [][]int + +func (c cs) Len() int { + return len(c) +} + +func (c cs) Less(i, j int) bool { + if c[i][1] == c[j][1] { + // 相同截止日期时,持续时间短的课程靠前 + return c[i][0] < c[j][0] + } + // 结束时间早的靠前 + return c[i][1] < c[j][1] +} + +func (c cs) Swap(i, j int) { + c[i], c[j] = c[j], c[i] +} diff --git a/Algorithms/0630.course-schedule-iii/course-schedule-iii_test.go b/Algorithms/0630.course-schedule-iii/course-schedule-iii_test.go new file mode 100755 index 000000000..76d4d0ac3 --- /dev/null +++ b/Algorithms/0630.course-schedule-iii/course-schedule-iii_test.go @@ -0,0 +1,44 @@ +package Problem0630 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + courses [][]int + ans int +}{ + + { + [][]int{[]int{5, 5}, []int{4, 6}, []int{2, 6}}, + 2, + }, + + { + [][]int{[]int{100, 200}, []int{200, 1300}, []int{1000, 1250}, []int{2000, 3200}}, + 3, + }, + + // 可以有多个 testcase +} + +func Test_scheduleCourse(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, scheduleCourse(tc.courses), "输入:%v", tc) + } +} + +func Benchmark_scheduleCourse(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + scheduleCourse(tc.courses) + } + } +} diff --git a/Algorithms/0632.smallest-range/README.md b/Algorithms/0632.smallest-range/README.md new file mode 100755 index 000000000..f94a93f27 --- /dev/null +++ b/Algorithms/0632.smallest-range/README.md @@ -0,0 +1,29 @@ +# [632. Smallest Range](https://leetcode.com/problems/smallest-range/) + +## 题目 + +You have k lists of sorted integers in ascending order. Find the smallest range that includes at least one number from each of the k lists. + +We define the range [a,b] is smaller than range [c,d] if b-a < d-c or a < c if b-a == d-c. + +Example 1: + +```text +Input:[[4,10,15,24,26], [0,9,12,20], [5,18,22,30]] +Output: [20,24] +Explanation: +List 1: [4, 10, 15, 24,26], 24 is in range [20,24]. +List 2: [0, 9, 12, 20], 20 is in range [20,24]. +List 3: [5, 18, 22, 30], 22 is in range [20,24]. +``` + +Note: + +1. The given list may contain duplicates, so ascending order means >= here. +1. 1 <= k <= 3500 +1. -105 <= value of elements <= 105. +1. For Java users, please note that the input type has been changed to `List>`. And after you reset the code template, you'll see this point. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0632.smallest-range/smallest-range.go b/Algorithms/0632.smallest-range/smallest-range.go new file mode 100755 index 000000000..f2e3b83ff --- /dev/null +++ b/Algorithms/0632.smallest-range/smallest-range.go @@ -0,0 +1,114 @@ +package Problem0632 + +import ( + "sort" +) + +func smallestRange(intss [][]int) []int { + // 把 intss 中的数字连同其队伍信息,整合成 num 结构体放入 ns + ns := makeNums(intss) + // 让 ns 根据其数值排列 + sort.Sort(ns) + + s := newStatus(ns, len(intss)) + s.check() + + return s.res +} + +type status struct { + res []int + ns nums + i, j int + minDiff int + absentTeamCount int + teamCount []int +} + +func newStatus(ns nums, teams int) *status { + return &status{ + res: make([]int, 2), + ns: ns, + i: 0, + j: -1, + minDiff: 1<<31 - 1, + absentTeamCount: teams, + teamCount: make([]int, teams), + } +} + +func (s *status) check() { + for s.j < len(s.ns) { + for s.j < len(s.ns) && !s.hasAllTeam() { + s.expend() + } + for s.hasAllTeam() { + s.updateRes() + s.shrink() + } + } +} + +func (s status) hasAllTeam() bool { + return s.absentTeamCount == 0 +} + +// 让 s.j++ 并修改相关的状态值 +func (s *status) expend() { + s.j++ + if s.j >= len(s.ns) { + return + } + if s.teamCount[s.ns[s.j].team] == 0 { + s.absentTeamCount-- + } + s.teamCount[s.ns[s.j].team]++ +} + +// 让 s.i-- 并修改相关的状态值 +func (s *status) shrink() { + if s.teamCount[s.ns[s.i].team] == 1 { + s.absentTeamCount++ + } + s.teamCount[s.ns[s.i].team]-- + s.i++ +} + +// 更新 s.res +func (s *status) updateRes() { + beg, end := s.ns[s.i].n, s.ns[s.j].n + diff := end - beg + if s.minDiff > diff { + s.res[0] = beg + s.res[1] = end + s.minDiff = diff + } +} + +func makeNums(intss [][]int) nums { + ns := make(nums, 0, len(intss)*3) + for i := range intss { + temp := make(nums, len(intss[i])) + for idx, n := range intss[i] { + temp[idx] = num{ + n: n, + team: i, + } + } + ns = append(ns, temp...) + } + return ns +} + +// nums 实现了 sort.Interface 接口 +type nums []num + +type num struct { + n, team int +} + +func (n nums) Len() int { return len(n) } + +func (n nums) Less(i, j int) bool { return n[i].n < n[j].n } + +func (n nums) Swap(i, j int) { n[i], n[j] = n[j], n[i] } diff --git a/Algorithms/0632.smallest-range/smallest-range_test.go b/Algorithms/0632.smallest-range/smallest-range_test.go new file mode 100755 index 000000000..a4de308d8 --- /dev/null +++ b/Algorithms/0632.smallest-range/smallest-range_test.go @@ -0,0 +1,44 @@ +package Problem0632 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums [][]int + ans []int +}{ + + { + [][]int{{4, 10, 15, 24, 26}, {0, 9, 12, 20}, {5, 18, 22, 30}}, + []int{20, 24}, + }, + + { + [][]int{{1, 2, 3}, {1, 2, 3}, {1, 2, 3}}, + []int{1, 1}, + }, + + // 可以有多个 testcase +} + +func Test_smallestRange(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, smallestRange(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_smallestRange(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + smallestRange(tc.nums) + } + } +} diff --git a/Algorithms/0633.sum-of-square-numbers/README.md b/Algorithms/0633.sum-of-square-numbers/README.md new file mode 100755 index 000000000..3582cef2c --- /dev/null +++ b/Algorithms/0633.sum-of-square-numbers/README.md @@ -0,0 +1,24 @@ +# [633. Sum of Square Numbers](https://leetcode.com/problems/sum-of-square-numbers/) + +## 题目 + +Given a non-negative integer c, your task is to decide whether there're two integers a and b such that a^2 + b^2 = c. + +Example 1: + +```text +Input: 5 +Output: True +Explanation: 1 * 1 + 2 * 2 = 5 +``` + +Example 2: + +```text +Input: 3 +Output: False +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0633.sum-of-square-numbers/sum-of-square-numbers.go b/Algorithms/0633.sum-of-square-numbers/sum-of-square-numbers.go new file mode 100755 index 000000000..81282ac19 --- /dev/null +++ b/Algorithms/0633.sum-of-square-numbers/sum-of-square-numbers.go @@ -0,0 +1,25 @@ +package Problem0633 + +import ( + "math" +) + +func judgeSquareSum(c int) bool { + a := intSqrt(c) + for a >= 0 { + if isSquare(c - a*a) { + return true + } + a-- + } + return false +} + +func intSqrt(c int) int { + return int(math.Sqrt(float64(c))) +} + +func isSquare(b2 int) bool { + b := intSqrt(b2) + return b*b == b2 +} diff --git a/Algorithms/0633.sum-of-square-numbers/sum-of-square-numbers_test.go b/Algorithms/0633.sum-of-square-numbers/sum-of-square-numbers_test.go new file mode 100755 index 000000000..79b1098f6 --- /dev/null +++ b/Algorithms/0633.sum-of-square-numbers/sum-of-square-numbers_test.go @@ -0,0 +1,49 @@ +package Problem0633 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + c int + ans bool +}{ + + { + 3, + false, + }, + + { + 0, + true, + }, + + { + 5, + true, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, judgeSquareSum(tc.c), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + judgeSquareSum(tc.c) + } + } +} diff --git a/Algorithms/0636.exclusive-time-of-functions/README.md b/Algorithms/0636.exclusive-time-of-functions/README.md new file mode 100755 index 000000000..8cbe1248b --- /dev/null +++ b/Algorithms/0636.exclusive-time-of-functions/README.md @@ -0,0 +1,41 @@ +# [636. Exclusive Time of Functions](https://leetcode.com/problems/exclusive-time-of-functions/) + +## 题目 + +Given the running logs of n functions that are executed in a nonpreemptive single threaded CPU, find the exclusive time of these functions. + +Each function has a unique id, start from 0 to n-1. A function may be called recursively or by another function. + +A log is a string has this format : `function_id:start_or_end:timestamp`. For example, "0:start:0" means function 0 starts from the very beginning of time 0. "0:end:0" means function 0 ends to the very end of time 0. + +Exclusive time of a function is defined as the time spent within this function, the time spent by calling other functions should not be considered as this function's exclusive time. You should return the exclusive time of each function sorted by their function id. + +Example 1: + +```text +Input: +n = 2 +logs = +["0:start:0", + "1:start:2", + "1:end:5", + "0:end:6"] +Output:[3, 4] +Explanation: +Function 0 starts at time 0, then it executes 2 units of time and reaches the end of time 1. +Now function 0 calls function 1, function 1 starts at time 2, executes 4 units of time and end at time 5. +Function 0 is running again at time 6, and also end at the time 6, thus executes 1 unit of time. +So function 0 totally execute 2 + 1 = 3 units of time, and function 1 totally execute 4 units of time. +``` + +Note: + +1. Input logs will be sorted by timestamp, NOT log id. +1. Your output should be sorted by function id, which means the 0th element of your output corresponds to the exclusive time of function 0. +1. Two functions won't start or end at the same time. +1. Functions could be called recursively, and will always end. +1. 1 <= n <= 100 + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0636.exclusive-time-of-functions/exclusive-time-of-functions.go b/Algorithms/0636.exclusive-time-of-functions/exclusive-time-of-functions.go new file mode 100755 index 000000000..7f5b9e7ea --- /dev/null +++ b/Algorithms/0636.exclusive-time-of-functions/exclusive-time-of-functions.go @@ -0,0 +1,52 @@ +package Problem0636 + +import ( + "strconv" + "strings" +) + +func exclusiveTime(n int, logs []string) []int { + size := len(logs) + + res := make([]int, n) + // stack 用于存放 start 的 function ID + stack := make([]int, 0, size) + // 注意,题目中 start:2 和 end:2 相隔了一秒 + // endPoint = 3 相当于题目中的 end:2 + endPoint := 0 + lastEndPoint := 0 + + for _, log := range logs { + fid, soe, ts := analyze(log) + + if soe == "start" { + // start:ts 相当于 endPoint = ts + endPoint = ts + if len(stack) > 0 { + // 遇到了新的 start + // 上一个 start 的 function 就需要即使统计运行时间 + res[stack[len(stack)-1]] += endPoint - lastEndPoint + } + stack = append(stack, fid) + lastEndPoint = endPoint + } else { + // end:ts 相当于 endPoint = ts + 1 + endPoint = ts + 1 + res[fid] += endPoint - lastEndPoint + stack = stack[:len(stack)-1] + lastEndPoint = endPoint + } + + } + + return res +} + +// 把 "function_id:start_or_end:timestamp" 解析后 +// 返回 function_id, start_or_end, timestamp +func analyze(log string) (int, string, int) { + ss := strings.Split(log, ":") + funcID, _ := strconv.Atoi(ss[0]) + timeStamp, _ := strconv.Atoi(ss[2]) + return funcID, ss[1], timeStamp +} diff --git a/Algorithms/0636.exclusive-time-of-functions/exclusive-time-of-functions_test.go b/Algorithms/0636.exclusive-time-of-functions/exclusive-time-of-functions_test.go new file mode 100755 index 000000000..cb9a2f7e7 --- /dev/null +++ b/Algorithms/0636.exclusive-time-of-functions/exclusive-time-of-functions_test.go @@ -0,0 +1,113 @@ +package Problem0636 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + n int + logs []string + ans []int +}{ + + { + 2, + []string{"0:start:0", "0:start:2", "0:end:5", "1:start:6", "1:end:6", "0:end:7"}, + []int{7, 1}, + }, + + { + 2, + []string{"0:start:0", "1:start:2", "1:end:5", "0:end:6"}, + []int{3, 4}, + }, + + { + 2, + []string{"0:start:0", "0:end:0", "1:start:1", "1:end:1"}, + []int{1, 1}, + }, + + { + 8, + []string{ + "0:start:0", + "1:start:5", + "2:start:6", + "3:start:9", + "4:start:11", + "5:start:12", + "6:start:14", + "7:start:15", + "1:start:24", + "1:end:29", + "7:end:34", + "6:end:37", + "5:end:39", + "4:end:40", + "3:end:45", + "0:start:49", + "0:end:54", + "5:start:55", + "5:end:59", + "4:start:63", + "4:end:66", + "2:start:69", + "2:end:70", + "2:start:74", + "6:start:78", + "0:start:79", + "0:end:80", + "6:end:85", + "1:start:89", + "1:end:93", + "2:end:96", + "2:end:100", + "1:end:102", + "2:start:105", + "2:end:109", + "0:end:114", + }, + []int{20, 14, 35, 7, 6, 9, 10, 14}, + }, + + { + 3, + []string{ + "0:start:0", + "1:start:2", + "1:end:5", + "0:end:6", + "2:start:8", + "2:start:10", + "2:start:12", + "2:end:14", + "2:end:16", + "2:end:18", + }, + []int{3, 4, 11}, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, exclusiveTime(tc.n, tc.logs), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + exclusiveTime(tc.n, tc.logs) + } + } +} diff --git a/Algorithms/0637.average-of-levels-in-binary-tree/README.md b/Algorithms/0637.average-of-levels-in-binary-tree/README.md new file mode 100755 index 000000000..4c0c340f7 --- /dev/null +++ b/Algorithms/0637.average-of-levels-in-binary-tree/README.md @@ -0,0 +1,27 @@ +# [637. Average of Levels in Binary Tree](https://leetcode.com/problems/average-of-levels-in-binary-tree/) + +## 题目 + +Given a non-empty binary tree, return the average value of the nodes on each level in the form of an array. + +Example 1: + +```text +Input: + 3 + / \ + 9 20 + / \ + 15 7 +Output: [3, 14.5, 11] +Explanation: +The average value of nodes on level 0 is 3, on level 1 is 14.5, and on level 2 is 11. Hence return [3, 14.5, 11]. +``` + +Note: + +1. The range of node's value is in the range of 32-bit signed integer. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0637.average-of-levels-in-binary-tree/average-of-levels-in-binary-tree.go b/Algorithms/0637.average-of-levels-in-binary-tree/average-of-levels-in-binary-tree.go new file mode 100755 index 000000000..e4d1d96b3 --- /dev/null +++ b/Algorithms/0637.average-of-levels-in-binary-tree/average-of-levels-in-binary-tree.go @@ -0,0 +1,34 @@ +package Problem0637 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" +) + +type TreeNode = kit.TreeNode + +func averageOfLevels(root *TreeNode) []float64 { + res := make([]float64, 0, 128) + + nodes := make([]*TreeNode, 1, 1024) + nodes[0] = root + + for len(nodes) > 0 { + n := len(nodes) + + sum := 0 + for i := 0; i < n; i++ { + sum += nodes[i].Val + if nodes[i].Left != nil { + nodes = append(nodes, nodes[i].Left) + } + if nodes[i].Right != nil { + nodes = append(nodes, nodes[i].Right) + } + } + + res = append(res,float64( sum)/float64(n)) + nodes = nodes[n:] + } + + return res +} diff --git a/Algorithms/0637.average-of-levels-in-binary-tree/average-of-levels-in-binary-tree_test.go b/Algorithms/0637.average-of-levels-in-binary-tree/average-of-levels-in-binary-tree_test.go new file mode 100755 index 000000000..1d3a11e6c --- /dev/null +++ b/Algorithms/0637.average-of-levels-in-binary-tree/average-of-levels-in-binary-tree_test.go @@ -0,0 +1,44 @@ +package Problem0637 + +import ( + "fmt" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + pre, in []int + ans []float64 +}{ + + { + []int{3, 9, 20, 15, 7}, + []int{9, 3, 15, 20, 7}, + []float64{3, 14.5, 11}, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + root := kit.PreIn2Tree(tc.pre, tc.in) + ast.Equal(tc.ans, averageOfLevels(root), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + root := kit.PreIn2Tree(tc.pre, tc.in) + averageOfLevels(root) + } + } +} diff --git a/Algorithms/0638.shopping-offers/README.md b/Algorithms/0638.shopping-offers/README.md new file mode 100755 index 000000000..ca27af341 --- /dev/null +++ b/Algorithms/0638.shopping-offers/README.md @@ -0,0 +1,47 @@ +# [638. Shopping Offers](https://leetcode.com/problems/shopping-offers/) + +## 题目 + +In LeetCode Store, there are some kinds of items to sell. Each item has a price. + +However, there are some special offers, and a special offer consists of one or more different kinds of items with a sale price. + +You are given the each item's price, a set of special offers, and the number we need to buy for each item. The job is to output the lowest price you have to pay for exactly certain items as given, where you could make optimal use of the special offers. + +Each special offer is represented in the form of an array, the last number represents the price you need to pay for this special offer, other numbers represents how many specific items you could get if you buy this offer. + +You could use any of special offers as many times as you want. + +Example 1: + +```text +Input: [2,5], [[3,0,5],[1,2,10]], [3,2] +Output: 14 +Explanation: +There are two kinds of items, A and B. Their prices are $2 and $5 respectively. +In special offer 1, you can pay $5 for 3A and 0B +In special offer 2, you can pay $10 for 1A and 2B. +You need to buy 3A and 2B, so you may pay $10 for 1A and 2B (special offer #2), and $4 for 2A. +``` + +Example 2: + +```text +Input: [2,3,4], [[1,1,0,4],[2,2,1,9]], [1,2,1] +Output: 11 +Explanation: +The price of A is $2, and $3 for B, $4 for C. +You may pay $4 for 1A and 1B, and $9 for 2A ,2B and 1C. +You need to buy 1A ,2B and 1C, so you may pay $4 for 1A and 1B (special offer #1), and $3 for 1B, $4 for 1C. +You cannot add more items, though only $9 for 2A ,2B and 1C. +``` + +Note: + +1. There are at most 6 kinds of items, 100 special offers. +1. For each item, you need to buy at most 6 of them. +1. You are not allowed to buy more items than you want, even if that would lower the overall price. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0638.shopping-offers/shopping-offers.go b/Algorithms/0638.shopping-offers/shopping-offers.go new file mode 100755 index 000000000..9ccf06f68 --- /dev/null +++ b/Algorithms/0638.shopping-offers/shopping-offers.go @@ -0,0 +1,65 @@ +package Problem0638 + +func shoppingOffers(price []int, specials [][]int, needs []int) int { + // 题目规定了 + // 最多买 6 种产品,每种产品最多买 6 个 + var dp [7][7][7][7][7][7]int + for len(needs) < 6 { + needs = append(needs, 0) + } + for len(price) < 6 { + price = append(price, 0) + } + + for i := 0; i <= needs[0]; i++ { + for j := 0; j <= needs[1]; j++ { + for k := 0; k <= needs[2]; k++ { + for l := 0; l <= needs[3]; l++ { + for m := 0; m <= needs[4]; m++ { + for n := 0; n <= needs[5]; n++ { + dp[i][j][k][l][m][n] = price[0]*i + price[1]*j + price[2]*k + price[3]*l + price[4]*m + price[5]*n + } + } + } + } + } + } + + for t := 0; t < len(specials); t++ { + p, s := extend(specials[t]) + + for i := s[0]; i <= needs[0]; i++ { + for j := s[1]; j <= needs[1]; j++ { + for k := s[2]; k <= needs[2]; k++ { + for l := s[3]; l <= needs[3]; l++ { + for m := s[4]; m <= needs[4]; m++ { + for n := s[5]; n <= needs[5]; n++ { + dp[i][j][k][l][m][n] = min(dp[i][j][k][l][m][n], dp[i-s[0]][j-s[1]][k-s[2]][l-s[3]][m-s[4]][n-s[5]]+p) + } + } + } + } + } + } + } + + return dp[needs[0]][needs[1]][needs[2]][needs[3]][needs[4]][needs[5]] +} + +// 获取 special 中的价格,并把 special 中的长度扩充为 6 +func extend(special []int) (int, []int) { + n := len(special) + prices := special[n-1] + special = special[:n-1] + for len(special) < 6 { + special = append(special, 0) + } + return prices, special +} + +func min(a, b int) int { + if a < b { + return a + } + return b +} diff --git a/Algorithms/0638.shopping-offers/shopping-offers_test.go b/Algorithms/0638.shopping-offers/shopping-offers_test.go new file mode 100755 index 000000000..1bb287b67 --- /dev/null +++ b/Algorithms/0638.shopping-offers/shopping-offers_test.go @@ -0,0 +1,57 @@ +package Problem0638 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + price []int + special [][]int + needs []int + ans int +}{ + + { + []int{2, 5}, + [][]int{{3, 0, 100}, {1, 2, 100}}, + []int{3, 2}, + 16, + }, + + { + []int{2, 5}, + [][]int{{3, 0, 5}, {1, 2, 10}}, + []int{3, 2}, + 14, + }, + + { + []int{2, 3, 4}, + [][]int{{1, 1, 0, 4}, {2, 2, 1, 9}}, + []int{1, 2, 1}, + 11, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, shoppingOffers(tc.price, tc.special, tc.needs), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + shoppingOffers(tc.price, tc.special, tc.needs) + } + } +} diff --git a/Algorithms/0640.solve-the-equation/README.md b/Algorithms/0640.solve-the-equation/README.md new file mode 100755 index 000000000..9df2b5dee --- /dev/null +++ b/Algorithms/0640.solve-the-equation/README.md @@ -0,0 +1,50 @@ +# [640. Solve the Equation](https://leetcode.com/problems/solve-the-equation/) + +## 题目 + +Solve a given equation and return the value of x in the form of string "x=#value". The equation contains only '+', '-' operation, the variable x and its coefficient. + +If there is no solution for the equation, return "No solution". + +If there are infinite solutions for the equation, return "Infinite solutions". + +If there is exactly one solution for the equation, we ensure that the value of x is an integer. + +Example 1: + +```text +Input: "x+5-3+x=6+x-2" +Output: "x=2" +``` + +Example 2: + +```text +Input: "x=x" +Output: "Infinite solutions" +``` + +Example 3: + +```text +Input: "2x=x" +Output: "x=0" +``` + +Example 4: + +```text +Input: "2x+3x-6x=x+2" +Output: "x=-1" +``` + +Example 5: + +```text +Input: "x=x+2" +Output: "No solution" +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0640.solve-the-equation/solve-the-equation.go b/Algorithms/0640.solve-the-equation/solve-the-equation.go new file mode 100755 index 000000000..6045b0b3f --- /dev/null +++ b/Algorithms/0640.solve-the-equation/solve-the-equation.go @@ -0,0 +1,51 @@ +package Problem0640 + +import ( + "strconv" + "strings" +) + +func solveEquation(equation string) string { + a, b := analyze(equation) + + if a == 0 { + if b == 0 { + return "Infinite solutions" + } + return "No solution" + } + + return "x=" + strconv.Itoa(b/a) +} + +// 把 equation 整理成 a*x=b +func analyze(equation string) (a, b int) { + es := strings.Split(equation, "=") + l, r := es[0], es[1] + // la*x+lb=ra*x+rb + la, lb := sideAnalyze(l) + ra, rb := sideAnalyze(r) + return la - ra, rb - lb +} + +// 把 a1*x+b1+a2*x+b2 整理成 a*x+b +func sideAnalyze(s string) (a, b int) { + s = s[:1] + strings.Replace(s[1:], "-", "+-", -1) + ss := strings.Split(s, "+") + for _, n := range ss { + if n[len(n)-1] == 'x' { + if n == "x" { + a++ + } else if n == "-x" { + a-- + } else { + t, _ := strconv.Atoi(n[:len(n)-1]) + a += t + } + } else { + t, _ := strconv.Atoi(n) + b += t + } + } + return +} diff --git a/Algorithms/0640.solve-the-equation/solve-the-equation_test.go b/Algorithms/0640.solve-the-equation/solve-the-equation_test.go new file mode 100755 index 000000000..12b576a9e --- /dev/null +++ b/Algorithms/0640.solve-the-equation/solve-the-equation_test.go @@ -0,0 +1,64 @@ +package Problem0640 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + equation string + ans string +}{ + + { + "-x=-1", + "x=1", + }, + + { + "x+5-3+x=6+x-2", + "x=2", + }, + + { + "x=x", + "Infinite solutions", + }, + + { + "2x=x", + "x=0", + }, + + { + "2x+3x-6x=x+2", + "x=-1", + }, + + { + "x=x+2", + "No solution", + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, solveEquation(tc.equation), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + solveEquation(tc.equation) + } + } +} diff --git a/Algorithms/0645.set-mismatch/README.md b/Algorithms/0645.set-mismatch/README.md new file mode 100755 index 000000000..a88b6ccb6 --- /dev/null +++ b/Algorithms/0645.set-mismatch/README.md @@ -0,0 +1,23 @@ +# [645. Set Mismatch](https://leetcode.com/problems/set-mismatch/) + +## 题目 + +The set S originally contains numbers from 1 to n. But unfortunately, due to the data error, one of the numbers in the set got duplicated to another number in the set, which results in repetition of one number and loss of another number. + +Given an array nums representing the data status of this set after the error. Your task is to firstly find the number occurs twice and then find the number that is missing. Return them in the form of an array. + +Example 1: + +```text +Input: nums = [1,2,2,4] +Output: [2,3] +``` + +Note: + +1. The given array size will in the range [2, 10000]. +1. The given array's numbers won't have any order. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0645.set-mismatch/set-mismatch.go b/Algorithms/0645.set-mismatch/set-mismatch.go new file mode 100755 index 000000000..62233a81e --- /dev/null +++ b/Algorithms/0645.set-mismatch/set-mismatch.go @@ -0,0 +1,39 @@ +package Problem0645 + +func findErrorNums(nums []int) []int { + // n == len(nums) + // 而 nums 的数字属于 [1,n],那么 + // 对于每一个 nums[abs(nums[i])-1] 中的数取反 + // 操作过程中, + // 取反前,nums[abs(nums[i])-1] 已经是负数的话,说明 abs(nums[i]) 是重复的数 + // 操作结束后, + // nums[i] > 0,说明 nums[i] 没有被取反过, i+1 是丢失的数 + dup := 0 + for i := 0; i < len(nums); i++ { + n := abs(nums[i]) + + if nums[n-1] < 0 { + dup = n + // NOTICE: nums[n-1]<0 的时候,不能再取反为正数了 + } else { + nums[n-1] = -nums[n-1] + } + } + + mis := 0 + for i, v := range nums { + if v > 0 { + mis = i + 1 + break + } + } + + return []int{dup, mis} +} + +func abs(a int) int { + if a > 0 { + return a + } + return -a +} diff --git a/Algorithms/0645.set-mismatch/set-mismatch_test.go b/Algorithms/0645.set-mismatch/set-mismatch_test.go new file mode 100755 index 000000000..28515424a --- /dev/null +++ b/Algorithms/0645.set-mismatch/set-mismatch_test.go @@ -0,0 +1,54 @@ +package Problem0645 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans []int +}{ + + { + []int{1, 1}, + []int{1, 2}, + }, + + { + []int{1, 3, 4, 5, 5, 6}, + []int{5, 2}, + }, + + { + []int{1, 1, 2, 3, 4, 6}, + []int{1, 5}, + }, + + { + []int{1, 2, 2, 4}, + []int{2, 3}, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findErrorNums(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findErrorNums(tc.nums) + } + } +} diff --git a/Algorithms/0646.maximum-length-of-pair-chain/README.md b/Algorithms/0646.maximum-length-of-pair-chain/README.md new file mode 100755 index 000000000..b61571888 --- /dev/null +++ b/Algorithms/0646.maximum-length-of-pair-chain/README.md @@ -0,0 +1,24 @@ +# [646. Maximum Length of Pair Chain](https://leetcode.com/problems/maximum-length-of-pair-chain/) + +## 题目 + +You are given n pairs of numbers. In every pair, the first number is always smaller than the second number. + +Now, we define a pair (c, d) can follow another pair (a, b) if and only if b < c. Chain of pairs can be formed in this fashion. + +Given a set of pairs, find the length longest chain which can be formed. You needn't use up all the given pairs. You can select pairs in any order. + +Example 1: + +```text +Input: [[1,2], [2,3], [3,4]] +Output: 2 +Explanation: The longest chain is [1,2] -> [3,4] +``` + +Note: +The number of given pairs will be in the range [1, 1000]. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0646.maximum-length-of-pair-chain/maximum-length-of-pair-chain.go b/Algorithms/0646.maximum-length-of-pair-chain/maximum-length-of-pair-chain.go new file mode 100755 index 000000000..5511e617d --- /dev/null +++ b/Algorithms/0646.maximum-length-of-pair-chain/maximum-length-of-pair-chain.go @@ -0,0 +1,26 @@ +package Problem0646 + +import ( + "sort" +) + +func findLongestChain(ps [][]int) int { + sort.Slice(ps, func(i, j int) bool { + if ps[i][1] == ps[j][1] { + return ps[i][0] > ps[j][0] + } + return ps[i][1] < ps[j][1] + }) + + res := 0 + b := -1 << 32 + for i := 0; i < len(ps); i++ { + c := ps[i][0] + if b < c { + res++ + b = ps[i][1] + } + } + + return res +} diff --git a/Algorithms/0646.maximum-length-of-pair-chain/maximum-length-of-pair-chain_test.go b/Algorithms/0646.maximum-length-of-pair-chain/maximum-length-of-pair-chain_test.go new file mode 100755 index 000000000..3eee914f0 --- /dev/null +++ b/Algorithms/0646.maximum-length-of-pair-chain/maximum-length-of-pair-chain_test.go @@ -0,0 +1,44 @@ +package Problem0646 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + pairs [][]int + ans int +}{ + + { + [][]int{{-10, -8}, {8, 9}, {-5, 0}, {6, 10}, {-6, -4}, {1, 7}, {9, 10}, {-4, 7}}, + 4, + }, + + { + [][]int{{1, 2}, {2, 3}, {3, 4}}, + 2, + }, + + // 可以有多个 testcase +} + +func Test_fcName(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findLongestChain(tc.pairs), "输入:%v", tc) + } +} + +func Benchmark_fcName(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findLongestChain(tc.pairs) + } + } +} diff --git a/Algorithms/0647.palindromic-substrings/README.md b/Algorithms/0647.palindromic-substrings/README.md new file mode 100755 index 000000000..d582e35c2 --- /dev/null +++ b/Algorithms/0647.palindromic-substrings/README.md @@ -0,0 +1,30 @@ +# [647. Palindromic Substrings](https://leetcode.com/problems/palindromic-substrings/) + +## 题目 + +Given a string, your task is to count how many palindromic substrings in this string. + +The substrings with different start indexes or end indexes are counted as different substrings even they consist of same characters. + +Example 1: + +```text +Input: "abc" +Output: 3 +Explanation: Three palindromic strings: "a", "b", "c". +``` + +Example 2: + +```text +Input: "aaa" +Output: 6 +Explanation: Six palindromic strings: "a", "a", "a", "aa", "aa", "aaa". +``` + +Note: +The input string length won't exceed 1000. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0647.palindromic-substrings/palindromic-substrings.go b/Algorithms/0647.palindromic-substrings/palindromic-substrings.go new file mode 100755 index 000000000..3a6cd3027 --- /dev/null +++ b/Algorithms/0647.palindromic-substrings/palindromic-substrings.go @@ -0,0 +1,24 @@ +package Problem0647 + +func countSubstrings(s string) int { + count := 0 + // 换一个思路 + for i := 0; i < len(s); i++ { + // 统计所有以 i 为中心的回文 + count += extendPalindrome(s, i, i) + // 统计所有以 i 和 i+1 为中心的回文 + count += extendPalindrome(s, i, i+1) + } + return count +} + +// 同时向两边扩张,直到遇到不是回文的情况 +func extendPalindrome(s string, left, right int) int { + res := 0 + for left >= 0 && right < len(s) && s[left] == s[right] { + res++ + left-- + right++ + } + return res +} diff --git a/Algorithms/0647.palindromic-substrings/palindromic-substrings_test.go b/Algorithms/0647.palindromic-substrings/palindromic-substrings_test.go new file mode 100755 index 000000000..ce9cbd18c --- /dev/null +++ b/Algorithms/0647.palindromic-substrings/palindromic-substrings_test.go @@ -0,0 +1,44 @@ +package Problem0647 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + ans int +}{ + + { + "abc", + 3, + }, + + { + "aaa", + 6, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, countSubstrings(tc.s), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + countSubstrings(tc.s) + } + } +} diff --git a/Algorithms/0648.replace-words/README.md b/Algorithms/0648.replace-words/README.md new file mode 100755 index 000000000..abcade042 --- /dev/null +++ b/Algorithms/0648.replace-words/README.md @@ -0,0 +1,29 @@ +# [648. Replace Words](https://leetcode.com/problems/replace-words/) + +## 题目 + +In English, we have a concept called root, which can be followed by some other words to form another longer word - let's call this word successor. For example, the root an, followed by other, which can form another word another. + +Now, given a dictionary consisting of many roots and a sentence. You need to replace all the successor in the sentence with the root forming it. If a successor has many roots can form it, replace it with the root with the shortest length. + +You need to output the sentence after the replacement. + +Example 1: + +```text +Input: dict = ["cat", "bat", "rat"] +sentence = "the cattle was rattled by the battery" +Output: "the cat was rat by the bat" +``` + +Note: + +- The input will only have lower-case letters. +- 1 <= dict words number <= 1000 +- 1 <= sentence words number <= 1000 +- 1 <= root length <= 100 +- 1 <= sentence words length <= 1000 + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0648.replace-words/replace-words.go b/Algorithms/0648.replace-words/replace-words.go new file mode 100755 index 000000000..fa1aa3dd0 --- /dev/null +++ b/Algorithms/0648.replace-words/replace-words.go @@ -0,0 +1,38 @@ +package Problem0648 + +import ( + "sort" + "strings" +) + +func replaceWords(dict []string, sentence string) string { + // hasRoot 收集了所有的 root + hasRoot := make(map[string]bool, len(dict)) + hasLen := make([]bool, 101) + for i := range dict { + hasRoot[dict[i]] = true + hasLen[len(dict[i])] = true + } + + // ls 收集了所有 root 的长度 + ls := make([]int, 0, 101) + for i, ok := range hasLen { + if ok { + ls = append(ls, i) + } + } + sort.Ints(ls) + + words := strings.Split(sentence, " ") + for i, w := range words { + for _, l := range ls { + // w 的前 l 个字符是字根就修改 w 并结束 for 循环 + if l < len(w) && hasRoot[w[:l]] { + words[i] = w[:l] + break + } + } + } + + return strings.Join(words, " ") +} diff --git a/Algorithms/0648.replace-words/replace-words_test.go b/Algorithms/0648.replace-words/replace-words_test.go new file mode 100755 index 000000000..706fc30ef --- /dev/null +++ b/Algorithms/0648.replace-words/replace-words_test.go @@ -0,0 +1,41 @@ +package Problem0648 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + dict []string + sentence string + ans string +}{ + + { + []string{"cat", "bat", "rat"}, + "the cattle was rattled by the battery", + "the cat was rat by the bat", + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, replaceWords(tc.dict, tc.sentence), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + replaceWords(tc.dict, tc.sentence) + } + } +} diff --git a/Algorithms/0649.dota2-senate/README.md b/Algorithms/0649.dota2-senate/README.md new file mode 100755 index 000000000..3c67a9457 --- /dev/null +++ b/Algorithms/0649.dota2-senate/README.md @@ -0,0 +1,46 @@ +# [649. Dota2 Senate](https://leetcode.com/problems/dota2-senate/) + +## 题目 + +In the world of Dota2, there are two parties: the Radiant and the Dire. + +The Dota2 senate consists of senators coming from two parties. Now the senate wants to make a decision about a change in the Dota2 game. The voting for this change is a round-based procedure. In each round, each senator can exercise one of the two rights: + +1. Ban one senator's right: A senator can make another senator lose all his rights in this and all the following rounds. +1. Announce the victory: If this senator found the senators who still have rights to vote are all from the same party, he can announce the victory and make the decision about the change in the game. + +Given a string representing each senator's party belonging. The character 'R' and 'D' represent the Radiant party and the Dire party respectively. Then if there are n senators, the size of the given string will be n. + +The round-based procedure starts from the first senator to the last senator in the given order. This procedure will last until the end of voting. All the senators who have lost their rights will be skipped during the procedure. + +Suppose every senator is smart enough and will play the best strategy for his own party, you need to predict which party will finally announce the victory and make the change in the Dota2 game. The output should be Radiant or Dire. + +Example 1: + +```text +Input: "RD" +Output: "Radiant" +Explanation: The first senator comes from Radiant and he can just ban the next senator's right in the round 1. +And the second senator can't exercise any rights any more since his right has been banned. +And in the round 2, the first senator can just announce the victory since he is the only guy in the senate who can vote. +``` + +Example 2: + +```text +Input: "RDD" +Output: "Dire" +Explanation: +The first senator comes from Radiant and he can just ban the next senator's right in the round 1. +And the second senator can't exercise any rights anymore since his right has been banned. +And the third senator comes from Dire and he can ban the first senator's right in the round 1. +And in the round 2, the third senator can just announce the victory since he is the only guy in the senate who can vote. +``` + +Note: + +1. The length of the given string will in the range [1, 10,000]. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0649.dota2-senate/dota2-senate.go b/Algorithms/0649.dota2-senate/dota2-senate.go new file mode 100755 index 000000000..ae531b63c --- /dev/null +++ b/Algorithms/0649.dota2-senate/dota2-senate.go @@ -0,0 +1,36 @@ +package Problem0649 + +func predictPartyVictory(senate string) string { + n := len(senate) + + // qr 和 qd 按顺序保存了 r 和 d 的议员的索引号 + qr := make([]int, 0, n) + qd := make([]int, 0, n) + for i, b := range senate { + if b == 'R' { + qr = append(qr, i) + } else { + qd = append(qd, i) + } + } + + // 对议员来说,最优策略就是,把下一个对方党派的议员 ban 掉 + for len(qr) > 0 && len(qd) > 0 { + ri := qr[0] + qr = qr[1:] + di := qd[0] + qd = qd[1:] + if ri < di { + // ri ban 掉了 di + // ri 的索引号 +n + qr = append(qr, ri+n) + } else { + qd = append(qd, di+n) + } + } + + if len(qr) > 0 { + return "Radiant" + } + return "Dire" +} diff --git a/Algorithms/0649.dota2-senate/dota2-senate_test.go b/Algorithms/0649.dota2-senate/dota2-senate_test.go new file mode 100755 index 000000000..3971fc17f --- /dev/null +++ b/Algorithms/0649.dota2-senate/dota2-senate_test.go @@ -0,0 +1,54 @@ +package Problem0649 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + senate string + ans string +}{ + + { + "RRDDD", + "Radiant", + }, + + { + "DDRRR", + "Dire", + }, + + { + "RD", + "Radiant", + }, + + { + "RDD", + "Dire", + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, predictPartyVictory(tc.senate), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + predictPartyVictory(tc.senate) + } + } +} diff --git a/Algorithms/0650.2-keys-keyboard/2-keys-keyboard.go b/Algorithms/0650.2-keys-keyboard/2-keys-keyboard.go new file mode 100755 index 000000000..70720edb3 --- /dev/null +++ b/Algorithms/0650.2-keys-keyboard/2-keys-keyboard.go @@ -0,0 +1,15 @@ +package Problem0650 + +func minSteps(n int) int { + if n == 1 { + return 0 + } + + for i := 2; i < n; i++ { + if n%i == 0 { + return i + minSteps(n/i) + } + } + + return n +} diff --git a/Algorithms/0650.2-keys-keyboard/2-keys-keyboard_test.go b/Algorithms/0650.2-keys-keyboard/2-keys-keyboard_test.go new file mode 100755 index 000000000..2d5a3c91c --- /dev/null +++ b/Algorithms/0650.2-keys-keyboard/2-keys-keyboard_test.go @@ -0,0 +1,49 @@ +package Problem0650 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + n int + ans int +}{ + + { + 100, + 14, + }, + + { + 1, + 0, + }, + + { + 3, + 3, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, minSteps(tc.n), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + minSteps(tc.n) + } + } +} diff --git a/Algorithms/0650.2-keys-keyboard/README.md b/Algorithms/0650.2-keys-keyboard/README.md new file mode 100755 index 000000000..b1790aaaf --- /dev/null +++ b/Algorithms/0650.2-keys-keyboard/README.md @@ -0,0 +1,31 @@ +# [650. 2 Keys Keyboard](https://leetcode.com/problems/2-keys-keyboard/) + +## 题目 + +Initially on a notepad only one character 'A' is present. You can perform two operations on this notepad for each step: + +Copy All: You can copy all the characters present on the notepad (partial copy is not allowed). + +Paste: You can paste the characters which are copied last time. + +Given a number n. You have to get exactly n 'A' on the notepad by performing the minimum number of steps permitted. Output the minimum number of steps to get n 'A'. + +Example 1: + +```text +Input: 3 +Output: 3 +Explanation: +Intitally, we have one character 'A'. +In step 1, we use Copy All operation. +In step 2, we use Paste operation to get 'AA'. +In step 3, we use Paste operation to get 'AAA'. +``` + +Note: +The n will be in the range [1, 1000]. + + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0652.find-duplicate-subtrees/README.md b/Algorithms/0652.find-duplicate-subtrees/README.md new file mode 100755 index 000000000..a1539e2b7 --- /dev/null +++ b/Algorithms/0652.find-duplicate-subtrees/README.md @@ -0,0 +1,30 @@ +# [652. Find Duplicate Subtrees](https://leetcode.com/problems/find-duplicate-subtrees/) + +## 题目 + +Given a binary tree, return all duplicate subtrees. For each kind of duplicate subtrees, you only need to return the root node of any one of them. + +Two trees are duplicate if they have the same structure with same node values. + +Example 1: + +```text + 1 + / \ + 2 3 + / / \ + 4 2 4 + / + 4 +The following are two duplicate subtrees: + 2 + / + 4 +and + 4 +Therefore, you need to return above trees' root in the form of a list. +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0652.find-duplicate-subtrees/find-duplicate-subtrees.go b/Algorithms/0652.find-duplicate-subtrees/find-duplicate-subtrees.go new file mode 100755 index 000000000..6678a6479 --- /dev/null +++ b/Algorithms/0652.find-duplicate-subtrees/find-duplicate-subtrees.go @@ -0,0 +1,35 @@ +package Problem0652 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" + "strconv" +) + +type TreeNode = kit.TreeNode + +func findDuplicateSubtrees(root *TreeNode) []*TreeNode { + count := make(map[string]int, 1024) + res := make([]*TreeNode, 0, 1024) + + helper(root, count, &res) + + return res +} + +func helper(root *TreeNode, count map[string]int, res *[]*TreeNode) string { + if root == nil { + return "*" + } + + l := helper(root.Left, count, res) + r := helper(root.Right, count, res) + + key := strconv.Itoa(root.Val) + l + r + + count[key]++ + if count[key] == 2 { + *res = append(*res, root) + } + + return key +} diff --git a/Algorithms/0652.find-duplicate-subtrees/find-duplicate-subtrees_test.go b/Algorithms/0652.find-duplicate-subtrees/find-duplicate-subtrees_test.go new file mode 100755 index 000000000..685cfb5c3 --- /dev/null +++ b/Algorithms/0652.find-duplicate-subtrees/find-duplicate-subtrees_test.go @@ -0,0 +1,75 @@ +package Problem0652 + +import ( + "fmt" + "sort" + "strconv" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + pre, in []int + ansPost [][]int +}{ + + { + []int{1, 2, 4, 3, 2, 4, 4}, + []int{4, 2, 1, 4, 2, 3, 4}, + [][]int{{4, 2}, {4}}, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + root := kit.PreIn2Tree(tc.pre, tc.in) + ans := findDuplicateSubtrees(root) + ansPost := convert(ans) + ast.Equal(normalize(tc.ansPost), normalize(ansPost)) + } +} + +func convert(roots []*TreeNode) [][]int { + res := make([][]int, len(roots)) + for i := range res { + res[i] = kit.Tree2Postorder(roots[i]) + } + return res +} + +func normalize(intss [][]int) string { + ss := make([]string, len(intss)) + for _, ints := range intss { + s := "" + for _, n := range ints { + s += strconv.Itoa(n) + } + ss = append(ss, s) + } + sort.Strings(ss) + + res := "" + for _, s := range ss { + res += s + "+" + } + + return res +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + root := kit.PreIn2Tree(tc.pre, tc.in) + findDuplicateSubtrees(root) + } + } +} diff --git a/Algorithms/0653.two-sum-iv-input-is-a-bst/README.md b/Algorithms/0653.two-sum-iv-input-is-a-bst/README.md new file mode 100755 index 000000000..3d62304d9 --- /dev/null +++ b/Algorithms/0653.two-sum-iv-input-is-a-bst/README.md @@ -0,0 +1,39 @@ +# [653. Two Sum IV - Input is a BST](https://leetcode.com/problems/two-sum-iv-input-is-a-bst/) + +## 题目 + +Given a Binary Search Tree and a target number, return true if there exist two elements in the BST such that their sum is equal to the given target. + +Example 1: + +```text +Input: + 5 + / \ + 3 6 + / \ \ +2 4 7 + +Target = 9 + +Output: True +``` + +Example 2: + +```text +Input: + 5 + / \ + 3 6 + / \ \ +2 4 7 + +Target = 28 + +Output: False +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0653.two-sum-iv-input-is-a-bst/two-sum-iv-input-is-a-bst.go b/Algorithms/0653.two-sum-iv-input-is-a-bst/two-sum-iv-input-is-a-bst.go new file mode 100755 index 000000000..ac8505476 --- /dev/null +++ b/Algorithms/0653.two-sum-iv-input-is-a-bst/two-sum-iv-input-is-a-bst.go @@ -0,0 +1,36 @@ +package Problem0653 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" +) + +type TreeNode = kit.TreeNode + +func findTarget(root *TreeNode, k int) bool { + return helper(root, root, k) +} + +func helper(root, searchRoot *TreeNode, k int) bool { + if root == nil { + return false + } + + return (root.Val*2 != k && findNode(searchRoot, k-root.Val)) || + helper(root.Left, searchRoot, k) || + helper(root.Right, searchRoot, k) +} + +func findNode(root *TreeNode, target int) bool { + if root == nil { + return false + } + + if root.Val == target { + return true + } + + if root.Val < target { + return findNode(root.Right, target) + } + return findNode(root.Left, target) +} diff --git a/Algorithms/0653.two-sum-iv-input-is-a-bst/two-sum-iv-input-is-a-bst_test.go b/Algorithms/0653.two-sum-iv-input-is-a-bst/two-sum-iv-input-is-a-bst_test.go new file mode 100755 index 000000000..3fbb83814 --- /dev/null +++ b/Algorithms/0653.two-sum-iv-input-is-a-bst/two-sum-iv-input-is-a-bst_test.go @@ -0,0 +1,67 @@ +package Problem0653 + +import ( + "fmt" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + pre, in []int + k int + ans bool +}{ + + { + []int{2, 1, 3}, + []int{1, 2, 3}, + 4, + true, + }, + + { + []int{1}, + []int{1}, + 2, + false, + }, + + { + []int{5, 3, 2, 4, 6, 7}, + []int{2, 3, 4, 5, 6, 7}, + 28, + false, + }, + + { + []int{5, 3, 2, 4, 6, 7}, + []int{2, 3, 4, 5, 6, 7}, + 9, + true, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + root := kit.PreIn2Tree(tc.pre, tc.in) + ast.Equal(tc.ans, findTarget(root, tc.k), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + root := kit.PreIn2Tree(tc.pre, tc.in) + findTarget(root, tc.k) + } + } +} diff --git a/Algorithms/0654.maximum-binary-tree/README.md b/Algorithms/0654.maximum-binary-tree/README.md new file mode 100755 index 000000000..950cdd2f6 --- /dev/null +++ b/Algorithms/0654.maximum-binary-tree/README.md @@ -0,0 +1,34 @@ +# [654. Maximum Binary Tree](https://leetcode.com/problems/maximum-binary-tree/) + +## 题目 + +Given an integer array with no duplicates. A maximum tree building on this array is defined as follow: + +1. The root is the maximum number in the array. +1. The left subtree is the maximum tree constructed from left part subarray divided by the maximum number. +1. The right subtree is the maximum tree constructed from right part subarray divided by the maximum number. + +Construct the maximum tree by the given array and output the root node of this tree. + +Example 1: + +```text +Input: [3,2,1,6,0,5] +Output: return the tree root node representing the following tree: + + 6 + / \ + 3 5 + \ / + 2 0 + \ + 1 +``` + +Note: + +1. The size of the given array will be in the range [1,1000]. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0654.maximum-binary-tree/maximum-binary-tree.go b/Algorithms/0654.maximum-binary-tree/maximum-binary-tree.go new file mode 100755 index 000000000..aa54aef72 --- /dev/null +++ b/Algorithms/0654.maximum-binary-tree/maximum-binary-tree.go @@ -0,0 +1,46 @@ +package Problem0654 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" +) + +type TreeNode = kit.TreeNode + +func constructMaximumBinaryTree(nums []int) *TreeNode { + // stack[i+1:] 中所有的节点都是 stack[i] 右边的节点 + // 即,stack 中的 Val 值应该始终是递减的 + // 在遍历 nums 后,stack[i].Right == stack[i+1] + stack := make([]*TreeNode, 1, len(nums)) + // 先放这个节点到 stack 可以简化后面的逻辑结构 + // nums 生成的 Tree 肯定是这个节点的右节点 + stack[0] = &TreeNode{Val: 1<<63 - 1} + + for _, n := range nums { + node := &TreeNode{Val: n} + + if stack[len(stack)-1].Val > n { + stack = append(stack, node) + continue + } + + for len(stack)-2 >= 0 && stack[len(stack)-2].Val < n { + // 此时可以确定,stack中,上一项是下一项的 Right 节点 + stack[len(stack)-2].Right = stack[len(stack)-1] + stack = stack[:len(stack)-1] + } + + // 此时,stack 中最后一项是 node 的 Left 节点 + node.Left = stack[len(stack)-1] + + // 把 node 放入 stack + stack[len(stack)-1] = node + + } + + // 连接父子关系 + for i := len(stack) - 1; 1 <= i; i-- { + stack[i-1].Right = stack[i] + } + + return stack[1] +} diff --git a/Algorithms/0654.maximum-binary-tree/maximum-binary-tree_test.go b/Algorithms/0654.maximum-binary-tree/maximum-binary-tree_test.go new file mode 100755 index 000000000..9a98bf365 --- /dev/null +++ b/Algorithms/0654.maximum-binary-tree/maximum-binary-tree_test.go @@ -0,0 +1,41 @@ +package Problem0654 + +import ( + "fmt" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + post []int +}{ + + { + []int{3, 2, 1, 6, 0, 5}, + []int{1, 2, 3, 0, 5, 6}, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.post, kit.Tree2Postorder(constructMaximumBinaryTree(tc.nums)), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + constructMaximumBinaryTree(tc.nums) + } + } +} diff --git a/Algorithms/0655.print-binary-tree/655.100.png b/Algorithms/0655.print-binary-tree/655.100.png new file mode 100644 index 000000000..f9c420cfc Binary files /dev/null and b/Algorithms/0655.print-binary-tree/655.100.png differ diff --git a/Algorithms/0655.print-binary-tree/README.md b/Algorithms/0655.print-binary-tree/README.md new file mode 100755 index 000000000..ea66f17c4 --- /dev/null +++ b/Algorithms/0655.print-binary-tree/README.md @@ -0,0 +1,65 @@ +# [655. Print Binary Tree](https://leetcode.com/problems/print-binary-tree/) + +## 题目 + +Print a binary tree in an m*n 2D string array following these rules: + +1. The row number m should be equal to the height of the given binary tree. +1. The column number n should always be an odd number. +1. The root node's value (in string format) should be put in the exactly middle of the first row it can be put. The column and the row where the root node belongs will separate the rest space into two parts (left-bottom part and right-bottom part). You should print the left subtree in the left-bottom part and print the right subtree in the right-bottom part. The left-bottom part and the right-bottom part should have the same size. Even if one subtree is none while the other is not, you don't need to print anything for the none subtree but still need to leave the space as large as that for the other subtree. However, if two subtrees are none, then you don't need to leave space for both of them. +1. Each unused space should contain an empty string "". +1. Print the subtrees following the same rules. + +Example 1: + +```text +Input: + 1 + / + 2 +Output: +[["", "1", ""], + ["2", "", ""]] +``` + +Example 2: + +```text +Input: + 1 + / \ + 2 3 + \ + 4 +Output: +[["", "", "", "1", "", "", ""], + ["", "2", "", "", "", "3", ""], + ["", "", "4", "", "", "", ""]] +``` + +Example 3: + +```text +Input: + 1 + / \ + 2 5 + / + 3 + / +4 +Output: + +[["", "", "", "", "", "", "", "1", "", "", "", "", "", "", ""] + ["", "", "", "2", "", "", "", "", "", "", "", "5", "", "", ""] + ["", "3", "", "", "", "", "", "", "", "", "", "", "", "", ""] + ["4", "", "", "", "", "", "", "", "", "", "", "", "", "", ""]] +``` + +Note: The height of binary tree is in the range of [1, 10]. + +## 解题思路 + +见程序注释 + +![100](655.100.png) \ No newline at end of file diff --git a/Algorithms/0655.print-binary-tree/print-binary-tree.go b/Algorithms/0655.print-binary-tree/print-binary-tree.go new file mode 100755 index 000000000..e05b76892 --- /dev/null +++ b/Algorithms/0655.print-binary-tree/print-binary-tree.go @@ -0,0 +1,77 @@ +package Problem0655 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" + "strconv" +) + +type TreeNode = kit.TreeNode + +func printTree(root *TreeNode) [][]string { + level := getLevel(root) + size := 1< 0 { + // 可以把 n 放入别的子序列末尾的时候,就放在末尾 + next[n]-- + next[n+1]++ + } else if count[n+1] > 0 && count[n+2] > 0 { + // 不能放在放在末尾的时候,就创建新的子序列 + count[n+1]-- + count[n+2]-- + next[n+3]++ + } else { + // 都不行的时候,就表示不可能满足题目要求,返回 false + return false + } + + } + + return true +} diff --git a/Algorithms/0659.split-array-into-consecutive-subsequences/split-array-into-consecutive-subsequences_test.go b/Algorithms/0659.split-array-into-consecutive-subsequences/split-array-into-consecutive-subsequences_test.go new file mode 100755 index 000000000..8b777d779 --- /dev/null +++ b/Algorithms/0659.split-array-into-consecutive-subsequences/split-array-into-consecutive-subsequences_test.go @@ -0,0 +1,54 @@ +package Problem0659 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans bool +}{ + + { + []int{1, 2, 3, 3, 4, 5}, + true, + }, + + { + []int{1, 2, 2, 3, 3, 3, 4, 4, 5}, + true, + }, + + { + []int{1, 2, 3, 3, 4, 4, 5, 5}, + true, + }, + + { + []int{1, 2, 3, 4, 4, 5}, + false, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, isPossible(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + isPossible(tc.nums) + } + } +} diff --git a/Algorithms/0662.maximum-width-of-binary-tree/README.md b/Algorithms/0662.maximum-width-of-binary-tree/README.md new file mode 100755 index 000000000..df9dd2ebe --- /dev/null +++ b/Algorithms/0662.maximum-width-of-binary-tree/README.md @@ -0,0 +1,74 @@ +# [662. Maximum Width of Binary Tree](https://leetcode.com/problems/maximum-width-of-binary-tree/) + +## 题目 + +Given a binary tree, write a function to get the maximum width of the given tree. The width of a tree is the maximum width among all levels. The binary tree has the same structure as a full binary tree, but some nodes are null. + +The width of one level is defined as the length between the end-nodes (the leftmost and right most non-null nodes in the level, where the null nodes between the end-nodes are also counted into the length calculation. + +Example 1: + +```text +Input: + + 1 + / \ + 3 2 + / \ \ + 5 3 9 + +Output: 4 +Explanation: The maximum width existing in the third level with the length 4 (5,3,null,9). +``` + +Example 2: + +```text +Input: + + 1 + / + 3 + / \ + 5 3 + +Output: 2 +Explanation: The maximum width existing in the third level with the length 2 (5,3). +``` + +Example 3: + +```text +Input: + + 1 + / \ + 3 2 + / + 5 + +Output: 2 +Explanation: The maximum width existing in the second level with the length 2 (3,2). +``` + +Example 4: + +```text +Input: + + 1 + / \ + 3 2 + / \ + 5 9 + / \ + 6 7 +Output: 8 +Explanation:The maximum width existing in the fourth level with the length 8 (6,null,null,null,null,null,null,7). +``` + +Note: Answer will in the range of 32-bit signed integer. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0662.maximum-width-of-binary-tree/maximum-width-of-binary-tree.go b/Algorithms/0662.maximum-width-of-binary-tree/maximum-width-of-binary-tree.go new file mode 100755 index 000000000..9ddb7ba6f --- /dev/null +++ b/Algorithms/0662.maximum-width-of-binary-tree/maximum-width-of-binary-tree.go @@ -0,0 +1,62 @@ +package Problem0662 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" +) + +type TreeNode = kit.TreeNode + +func widthOfBinaryTree(root *TreeNode) int { + if root == nil { + return 0 + } + + // locQueue[i] = j 表示 + // 当 树 是满的时候, + // nodeQueue[i] 节点在其所在层的索引号为 j + locQueue := make([]int, 1, 1024) + nodeQueue := make([]*TreeNode, 1, 1024) + locQueue[0] = 0 + nodeQueue[0] = root + + res := 0 + + // 使用 BFS 来遍历树 + for len(locQueue) > 0 { + res = max(res, getWidth(locQueue)) + + n := len(locQueue) + + fLocQueue := locQueue[:n] + fNodeQueue := nodeQueue[:n] + locQueue = locQueue[n:] + nodeQueue = nodeQueue[n:] + + for i := 0; i < n; i++ { + if fNodeQueue[i].Left != nil { + nodeQueue = append(nodeQueue, fNodeQueue[i].Left) + locQueue = append(locQueue, fLocQueue[i]*2) + } + if fNodeQueue[i].Right != nil { + nodeQueue = append(nodeQueue, fNodeQueue[i].Right) + locQueue = append(locQueue, fLocQueue[i]*2+1) + } + } + + } + + return res +} +// 本题也可以使用 DFS 来做 + +func getWidth(locQueue []int) int { + n := len(locQueue) + return locQueue[n-1] - locQueue[0] + 1 +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} diff --git a/Algorithms/0662.maximum-width-of-binary-tree/maximum-width-of-binary-tree_test.go b/Algorithms/0662.maximum-width-of-binary-tree/maximum-width-of-binary-tree_test.go new file mode 100755 index 000000000..7b4dd37a5 --- /dev/null +++ b/Algorithms/0662.maximum-width-of-binary-tree/maximum-width-of-binary-tree_test.go @@ -0,0 +1,68 @@ +package Problem0662 + +import ( + "fmt" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + pre, in []int + ans int +}{ + + { + []int{}, + []int{}, + 0, + }, + + { + []int{1, 3, 5, 4, 2, 9}, + []int{5, 3, 4, 1, 2, 9}, + 4, + }, + + { + []int{1, 3, 5, 4}, + []int{5, 3, 4, 1}, + 2, + }, + + { + []int{1, 3, 5, 2}, + []int{5, 3, 1, 2}, + 2, + }, + + { + []int{1, 3, 5, 6, 2, 9, 7}, + []int{6, 5, 3, 1, 2, 9, 7}, + 8, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + root := kit.PreIn2Tree(tc.pre, tc.in) + ast.Equal(tc.ans, widthOfBinaryTree(root), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + root := kit.PreIn2Tree(tc.pre, tc.in) + widthOfBinaryTree(root) + } + } +} diff --git a/Algorithms/0664.strange-printer/README.md b/Algorithms/0664.strange-printer/README.md new file mode 100755 index 000000000..6573d8730 --- /dev/null +++ b/Algorithms/0664.strange-printer/README.md @@ -0,0 +1,32 @@ +# [664. Strange Printer](https://leetcode.com/problems/strange-printer/) + +## 题目 + +There is a strange printer with the following two special requirements: + +1. The printer can only print a sequence of the same character each time. +1. At each turn, the printer can print new characters starting from and ending at any places, and will cover the original existing characters. + +Given a string consists of lower English letters only, your job is to count the minimum number of turns the printer needed in order to print it. + +Example 1: + +```text +Input: "aaabbb" +Output: 2 +Explanation: Print "aaa" first and then print "bbb". +``` + +Example 2: + +```text +Input: "aba" +Output: 2 +Explanation: Print "aaa" first and then print "b" from the second place of the string, which will cover the existing character 'a'. +``` + +Hint: Length of the given string will not exceed 100. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0664.strange-printer/strange-printer.go b/Algorithms/0664.strange-printer/strange-printer.go new file mode 100755 index 000000000..53895d190 --- /dev/null +++ b/Algorithms/0664.strange-printer/strange-printer.go @@ -0,0 +1,43 @@ +package Problem0664 + +func strangePrinter(s string) int { + n := len(s) + if n <= 1 { + return n + } + + // dp[i][j] 表示打印 s[i:j+1] 所需的最小次数 + dp := make([][]int, n) + for i := range dp { + dp[i] = make([]int, n) + dp[i][i] = 1 + } + + for Len := 2; Len <= n; Len++ { + for i := 0; i+Len-1 < n; i++ { + j := i + Len - 1 + // dp[i][j] 可以由 dp[i][j-1] 打印而来 + dp[i][j] = dp[i][j-1] + 1 + if s[j-1] == s[j] { + dp[i][j]-- + } + // + for k := i + 1; k <= j; k++ { + // 当 s[k-1] == s[j] 时,可以一次打印 s[k-1:j+1] 再修改 s[k:j] 上的内容 + // 这样也可以少打印一次 + if s[k-1] == s[j] { + dp[i][j] = min(dp[i][j], dp[i][k-1]+dp[k][j]-1) + } + } + } + } + + return dp[0][n-1] +} + +func min(a, b int) int { + if a < b { + return a + } + return b +} diff --git a/Algorithms/0664.strange-printer/strange-printer_test.go b/Algorithms/0664.strange-printer/strange-printer_test.go new file mode 100755 index 000000000..19c3b7604 --- /dev/null +++ b/Algorithms/0664.strange-printer/strange-printer_test.go @@ -0,0 +1,64 @@ +package Problem0664 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + ans int +}{ + + { + "ccdcadbddbaddcbccdcdabcbcddbccdcbad", + 17, + }, + + { + "tbgtgb", + 4, + }, + + { + "aaabbb", + 2, + }, + + { + "", + 0, + }, + + { + "abababa", + 4, + }, + + { + "aba", + 2, + }, + + // 可以有多个 testcase +} + +func Test_strangePrinter(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, strangePrinter(tc.s), "输入:%v", tc) + } +} + +func Benchmark_strangePrinter(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + strangePrinter(tc.s) + } + } +} diff --git a/Algorithms/0665.non-decreasing-array/README.md b/Algorithms/0665.non-decreasing-array/README.md new file mode 100755 index 000000000..94dd187c9 --- /dev/null +++ b/Algorithms/0665.non-decreasing-array/README.md @@ -0,0 +1,29 @@ +# [665. Non-decreasing Array](https://leetcode.com/problems/non-decreasing-array/) + +## 题目 + +Given an array with n integers, your task is to check if it could become non-decreasing by modifying at most 1 element. + +We define an array is non-decreasing if array[i] <= array[i + 1] holds for every i (1 <= i < n). + +Example 1: + +```text +Input: [4,2,3] +Output: True +Explanation: You could modify the first 4 to 1 to get a non-decreasing array. +``` + +Example 2: + +```text +Input: [4,2,1] +Output: False +Explanation: You can't get a non-decreasing array by modify at most one element. +``` + +Note: The n belongs to [1, 10,000]. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0665.non-decreasing-array/non-decreasing-array.go b/Algorithms/0665.non-decreasing-array/non-decreasing-array.go new file mode 100755 index 000000000..c92a4fb28 --- /dev/null +++ b/Algorithms/0665.non-decreasing-array/non-decreasing-array.go @@ -0,0 +1,28 @@ +package Problem0665 + +import ( + "sort" +) + +func checkPossibility(nums []int) bool { + for i := 1; i < len(nums); i++ { + if nums[i-1] > nums[i] { + pre := deepCopy(nums) + // 把 nums[i-1] 修改成 nums[i] + pre[i-1] = pre[i] + next := deepCopy(nums) + // 把 nums[i] 修改成 nums[i-1] + next[i] = next[i-1] + // 修改完成后,查看修改完成后,能否满足题意 + return sort.IsSorted(sort.IntSlice(pre)) || sort.IsSorted(sort.IntSlice(next)) + } + } + + return true +} + +func deepCopy(nums []int) []int { + res := make([]int, len(nums)) + copy(res, nums) + return res +} diff --git a/Algorithms/0665.non-decreasing-array/non-decreasing-array_test.go b/Algorithms/0665.non-decreasing-array/non-decreasing-array_test.go new file mode 100755 index 000000000..b078cda02 --- /dev/null +++ b/Algorithms/0665.non-decreasing-array/non-decreasing-array_test.go @@ -0,0 +1,59 @@ +package Problem0665 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans bool +}{ + + { + []int{2, 3, 3, 2, 4}, + true, + }, + + { + []int{3, 4, 2, 3}, + false, + }, + + { + []int{1, 2, 3}, + true, + }, + + { + []int{4, 2, 3}, + true, + }, + + { + []int{4, 2, 1}, + false, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, checkPossibility(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + checkPossibility(tc.nums) + } + } +} diff --git a/Algorithms/0668.kth-smallest-number-in-multiplication-table/README.md b/Algorithms/0668.kth-smallest-number-in-multiplication-table/README.md new file mode 100755 index 000000000..1f2c16daa --- /dev/null +++ b/Algorithms/0668.kth-smallest-number-in-multiplication-table/README.md @@ -0,0 +1,43 @@ +# [668. Kth Smallest Number in Multiplication Table](https://leetcode.com/problems/kth-smallest-number-in-multiplication-table/) + +## 题目 + +Nearly every one have used the Multiplication Table. But could you find out the k-th smallest number quickly from the multiplication table? + +Given the height m and the length n of a m * n Multiplication Table, and a positive integer k, you need to return the k-th smallest number in this table. + +Example 1: + +```text +Input: m = 3, n = 3, k = 5 +Output: +Explanation: +The Multiplication Table: +1 2 3 +2 4 6 +3 6 9 + +The 5-th smallest number is 3 (1, 2, 2, 3, 3). +``` + +Example 2: + +```text +Input: m = 2, n = 3, k = 6 +Output: +Explanation: +The Multiplication Table: +1 2 3 +2 4 6 + +The 6-th smallest number is 6 (1, 2, 2, 3, 4, 6). +``` + +Note: + +The m and n will be in the range [1, 30000]. +The k will be in the range [1, m * n] + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0668.kth-smallest-number-in-multiplication-table/kth-smallest-number-in-multiplication-table.go b/Algorithms/0668.kth-smallest-number-in-multiplication-table/kth-smallest-number-in-multiplication-table.go new file mode 100755 index 000000000..571b8c873 --- /dev/null +++ b/Algorithms/0668.kth-smallest-number-in-multiplication-table/kth-smallest-number-in-multiplication-table.go @@ -0,0 +1,42 @@ +package Problem0668 + +func findKthNumber(m int, n int, k int) int { + // 后面的 count 函数,m 较小比较有利 + if m > n { + m, n = n, m + } + + lo, hi := 1, m*n + for lo < hi { + mid := lo + (hi-lo)/2 + c := count(mid, m, n) + if c >= k { + // 说明 mid 大了 + // 需要降低 hi + hi = mid + } else { + // 与 hi 同理,提高 lo + // +1 是为了避免死循环 + lo = mid + 1 + } + } + + return hi +} + +// v >= a * b , 1<=a<=m, 1<=b<=n +// count 返回 a 和 b 的所有可能组合的个数 +func count(v, m, n int) int { + c := 0 + for i := 1; i <= m; i++ { + c += min(v/i, n) + } + return c +} + +func min(a, b int) int { + if a < b { + return a + } + return b +} diff --git a/Algorithms/0668.kth-smallest-number-in-multiplication-table/kth-smallest-number-in-multiplication-table_test.go b/Algorithms/0668.kth-smallest-number-in-multiplication-table/kth-smallest-number-in-multiplication-table_test.go new file mode 100755 index 000000000..fff297776 --- /dev/null +++ b/Algorithms/0668.kth-smallest-number-in-multiplication-table/kth-smallest-number-in-multiplication-table_test.go @@ -0,0 +1,99 @@ +package Problem0668 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + m int + n int + k int + ans int +}{ + + { + 11, + 13, + 57, + 24, + }, + + { + 30000, + 30000, + 900000000, + 900000000, + }, + + { + 30000, + 3, + 90000, + 90000, + }, + + { + 300, + 300, + 90000, + 90000, + }, + + { + 3000, + 3000, + 9000000, + 9000000, + }, + + { + 3, + 8, + 19, + 14, + }, + + { + 3, + 6, + 13, + 9, + }, + + { + 3, + 3, + 5, + 3, + }, + + { + 2, + 3, + 6, + 6, + }, + + // 可以有多个 testcase +} + +func Test_findKthNumber(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findKthNumber(tc.m, tc.n, tc.k), "输入:%v", tc) + } +} + +func Benchmark_findKthNumber(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findKthNumber(tc.m, tc.n, tc.k) + } + } +} diff --git a/Algorithms/0669.trim-a-binary-search-tree/README.md b/Algorithms/0669.trim-a-binary-search-tree/README.md new file mode 100755 index 000000000..766af44e4 --- /dev/null +++ b/Algorithms/0669.trim-a-binary-search-tree/README.md @@ -0,0 +1,49 @@ +# [669. Trim a Binary Search Tree](https://leetcode.com/problems/trim-a-binary-search-tree/) + +## 题目 + +Given a binary search tree and the lowest and highest boundaries as L and R, trim the tree so that all its elements lies in [L, R] (R >= L). You might need to change the root of the tree, so the result should return the new root of the trimmed binary search tree. + +Example 1: + +```text +Input: + 1 + / \ + 0 2 + + L = 1 + R = 2 + +Output: + 1 + \ + 2 +``` + +Example 2: + +```text +Input: + 3 + / \ + 0 4 + \ + 2 + / + 1 + + L = 1 + R = 3 + +Output: + 3 + / + 2 + / + 1 + ``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0669.trim-a-binary-search-tree/trim-a-binary-search-tree.go b/Algorithms/0669.trim-a-binary-search-tree/trim-a-binary-search-tree.go new file mode 100755 index 000000000..8b2b3866a --- /dev/null +++ b/Algorithms/0669.trim-a-binary-search-tree/trim-a-binary-search-tree.go @@ -0,0 +1,23 @@ +package Problem0669 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" +) +type TreeNode = kit.TreeNode +func trimBST(root *TreeNode, L int, R int) *TreeNode { + if root == nil { + return nil + } + + if root.Val < L { +return trimBST(root.Right, L, R) + } + + if R< root.Val { +return trimBST(root.Left, L, R) + } + + root.Left = trimBST(root.Left, L, R) + root.Right = trimBST(root.Right, L, R) + return root +} diff --git a/Algorithms/0669.trim-a-binary-search-tree/trim-a-binary-search-tree_test.go b/Algorithms/0669.trim-a-binary-search-tree/trim-a-binary-search-tree_test.go new file mode 100755 index 000000000..9854c3138 --- /dev/null +++ b/Algorithms/0669.trim-a-binary-search-tree/trim-a-binary-search-tree_test.go @@ -0,0 +1,56 @@ +package Problem0669 + +import ( + "fmt" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + pre, in []int + L, R int + ansPost []int +}{ + + { + []int{1, 0, 2}, + []int{0, 1, 2}, + 1, + 2, + []int{2, 1}, + }, + + { + []int{3, 0, 2, 1, 4}, + []int{0, 1, 2, 3, 4}, + 1, + 3, + []int{1, 2, 3}, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + root := kit.PreIn2Tree(tc.pre, tc.in) + ansPost := kit.Tree2Postorder(trimBST(root, tc.L, tc.R)) + ast.Equal(tc.ansPost, ansPost, "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + root := kit.PreIn2Tree(tc.pre, tc.in) + trimBST(root, tc.L, tc.R) + } + } +} diff --git a/Algorithms/0670.maximum-swap/README.md b/Algorithms/0670.maximum-swap/README.md new file mode 100755 index 000000000..1550b7752 --- /dev/null +++ b/Algorithms/0670.maximum-swap/README.md @@ -0,0 +1,29 @@ +# [670. Maximum Swap](https://leetcode.com/problems/maximum-swap/) + +## 题目 + +Given a non-negative integer, you could swap two digits at most once to get the maximum valued number. Return the maximum valued number you could get. + +Example 1: + +```text +Input: 2736 +Output: 7236 +Explanation: Swap the number 2 and the number 7. +``` + +Example 2: + +```text +Input: 9973 +Output: 9973 +Explanation: No swap. +``` + +Note: + +1. The given number is in the range [0, 10^8] + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0670.maximum-swap/maximum-swap.go b/Algorithms/0670.maximum-swap/maximum-swap.go new file mode 100755 index 000000000..eab946a9f --- /dev/null +++ b/Algorithms/0670.maximum-swap/maximum-swap.go @@ -0,0 +1,33 @@ +package Problem0670 + +import ( + "strconv" +) + +func maximumSwap(num int) int { + bs := []byte(strconv.Itoa(num)) + + // indexs 记录了每个数字最后出现的位置 + indexs := make(map[byte]int, len(bs)) + for i := range bs { + indexs[bs[i]] = i + } + + // 高位上的数字与低位上的更大的数字交换,才能使得 num 变大 + for i := 0; i < len(bs); i++ { + for bj := byte('9'); bs[i] < bj; bj-- { + j := indexs[bj] + if j > i { + bs[i], bs[j] = bs[j], bs[i] + return convert(bs) + } + } + } + + return convert(bs) +} + +func convert(bs []byte) int { + n, _ := strconv.Atoi(string(bs)) + return n +} diff --git a/Algorithms/0670.maximum-swap/maximum-swap_test.go b/Algorithms/0670.maximum-swap/maximum-swap_test.go new file mode 100755 index 000000000..7e0188558 --- /dev/null +++ b/Algorithms/0670.maximum-swap/maximum-swap_test.go @@ -0,0 +1,54 @@ +package Problem0670 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + num int + ans int +}{ + + { + 1234, + 4231, + }, + + { + 9973, + 9973, + }, + + { + 9919, + 9991, + }, + + { + 2736, + 7236, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, maximumSwap(tc.num), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + maximumSwap(tc.num) + } + } +} diff --git a/Algorithms/0671.second-minimum-node-in-a-binary-tree/README.md b/Algorithms/0671.second-minimum-node-in-a-binary-tree/README.md new file mode 100755 index 000000000..fceaf2776 --- /dev/null +++ b/Algorithms/0671.second-minimum-node-in-a-binary-tree/README.md @@ -0,0 +1,39 @@ +# [671. Second Minimum Node In a Binary Tree](https://leetcode.com/problems/second-minimum-node-in-a-binary-tree/) + +## 题目 + +Given a non-empty special binary tree consisting of nodes with the non-negative value, where each node in this tree has exactly two or zero sub-node. If the node has two sub-nodes, then this node's value is the smaller value among its two sub-nodes. + +Given such a binary tree, you need to output the second minimum value in the set made of all the nodes' value in the whole tree. + +If no such second minimum value exists, output -1 instead. + +Example 1: + +```text +Input: + 2 + / \ + 2 5 + / \ + 5 7 + +Output: 5 +Explanation: The smallest value is 2, the second smallest value is 5. +``` + +Example 2: + +```text +Input: + 2 + / \ + 2 2 + +Output: -1 +Explanation: The smallest value is 2, but there isn't any second smallest value. +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0671.second-minimum-node-in-a-binary-tree/second-minimum-node-in-a-binary-tree.go b/Algorithms/0671.second-minimum-node-in-a-binary-tree/second-minimum-node-in-a-binary-tree.go new file mode 100755 index 000000000..feaf002f7 --- /dev/null +++ b/Algorithms/0671.second-minimum-node-in-a-binary-tree/second-minimum-node-in-a-binary-tree.go @@ -0,0 +1,33 @@ +package Problem0671 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" +) + +type TreeNode = kit.TreeNode + +const intMax = 1<<63 - 1 + +func findSecondMinimumValue(root *TreeNode) int { + res := intMax + + helper(root, root.Val, &res) + + if res == intMax { + return -1 + } + return res +} + +func helper(root *TreeNode, lo int, hi *int) { + if root == nil { + return + } + + if lo < root.Val && root.Val < *hi { + *hi = root.Val + } + + helper(root.Left, lo, hi) + helper(root.Right, lo, hi) +} diff --git a/Algorithms/0671.second-minimum-node-in-a-binary-tree/second-minimum-node-in-a-binary-tree_test.go b/Algorithms/0671.second-minimum-node-in-a-binary-tree/second-minimum-node-in-a-binary-tree_test.go new file mode 100755 index 000000000..09eb2d8bc --- /dev/null +++ b/Algorithms/0671.second-minimum-node-in-a-binary-tree/second-minimum-node-in-a-binary-tree_test.go @@ -0,0 +1,50 @@ +package Problem0671 + +import ( + "fmt" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + in, post []int + ans int +}{ + + { + []int{2, 2, 2}, + []int{2, 2, 2}, + -1, + }, + + { + []int{4, 2, 5, 1, 6, 3, 7}, + []int{4, 5, 2, 6, 7, 3, 1}, + 2, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + root := kit.InPost2Tree(tc.in, tc.post) + ast.Equal(tc.ans, findSecondMinimumValue(root), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + root := kit.PreIn2Tree(tc.in, tc.post) + findSecondMinimumValue(root) + } + } +} diff --git a/Algorithms/0672.bulb-switcher-ii/README.md b/Algorithms/0672.bulb-switcher-ii/README.md new file mode 100755 index 000000000..3a422f1e1 --- /dev/null +++ b/Algorithms/0672.bulb-switcher-ii/README.md @@ -0,0 +1,42 @@ +# [672. Bulb Switcher II](https://leetcode.com/problems/bulb-switcher-ii/) + +## 题目 + +There is a room with n lights which are turned on initially and 4 buttons on the wall. After performing exactly m unknown operations towards buttons, you need to return how many different kinds of status of the n lights could be. + +Suppose n lights are labeled as number [1, 2, 3 ..., n], function of these 4 buttons are given below: + +1. Flip all the lights. +1. Flip lights with even numbers. +1. Flip lights with odd numbers. +1. Flip lights with (3k + 1) numbers, k = 0, 1, 2, ... + +Example 1: + +```text +Input: n = 1, m = 1. +Output: 2 +Explanation: Status can be: [on], [off] +``` + +Example 2: + +```text +Input: n = 2, m = 1. +Output: 3 +Explanation: Status can be: [on, off], [off, on], [off, off] +``` + +Example 3: + +```text +Input: n = 3, m = 1. +Output: 4 +Explanation: Status can be: [off, on, off], [on, off, on], [off, off, off], [off, on, on]. +``` + +Note: n and m both fit in range [0, 1000]. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0672.bulb-switcher-ii/bulb-switcher-ii.go b/Algorithms/0672.bulb-switcher-ii/bulb-switcher-ii.go new file mode 100755 index 000000000..8aa2ce0b6 --- /dev/null +++ b/Algorithms/0672.bulb-switcher-ii/bulb-switcher-ii.go @@ -0,0 +1,44 @@ +package Problem0672 + +func flipLights(n, m int) int { + if m == 0 { + return 1 + } + + switch n { + // 当只有一盏灯的时候 + // 如果只按 1 次: + // 按键1,3,4,会让灯熄灭 + // 按键2,会让灯保持点亮 + // 所以,一共是 2 种状态 + // 如果可以按超过 1 次,那么灯的状态,只会比按 1 次多, + // 但是,一盏灯最多只会有 2 种状态 + // 所以,n == 1, m>0 时,返回 2 + case 1: + return 2 + // 与 n == 1 的情况类似 + case 2: + if m == 1 { + return 3 + } + return 4 + // 当 n >= 3 时 + // 根据 4 个按钮控制灯泡的位置不同,可以发现 + // 所有 3*k+1 (k=0,1,2,...) 位置上的灯泡状态总是相同的 + // 3*k+2, 3*k+3 (k=0,1,2,...) 也是如此 + // 所以, + // 可以把所有的灯泡,每 3 个分成一组 + // n >=3 被简化成了 n == 3 + // + // 在纸上演算一下,可能出现的各种情况即可 + default: + switch m { + case 1: + return 4 + case 2: + return 7 + default: + return 8 + } + } +} diff --git a/Algorithms/0672.bulb-switcher-ii/bulb-switcher-ii_test.go b/Algorithms/0672.bulb-switcher-ii/bulb-switcher-ii_test.go new file mode 100755 index 000000000..a8c52694e --- /dev/null +++ b/Algorithms/0672.bulb-switcher-ii/bulb-switcher-ii_test.go @@ -0,0 +1,82 @@ +package Problem0672 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + n, m int + ans int +}{ + + { + 1, + 1, + 2, + }, + + { + 2, + 1, + 3, + }, + + { + 2, + 4, + 4, + }, + + { + 3, + 4, + 8, + }, + + { + 3, + 0, + 1, + }, + + { + 3, + 3, + 8, + }, + + { + 3, + 2, + 7, + }, + + { + 3, + 1, + 4, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, flipLights(tc.n, tc.m), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + flipLights(tc.n, tc.m) + } + } +} diff --git a/Algorithms/0673.number-of-longest-increasing-subsequence/README.md b/Algorithms/0673.number-of-longest-increasing-subsequence/README.md new file mode 100755 index 000000000..a106c2553 --- /dev/null +++ b/Algorithms/0673.number-of-longest-increasing-subsequence/README.md @@ -0,0 +1,27 @@ +# [673. Number of Longest Increasing Subsequence](https://leetcode.com/problems/number-of-longest-increasing-subsequence/) + +## 题目 + +Given an unsorted array of integers, find the number of longest increasing subsequence. + +Example 1: + +```text +Input: [1,3,5,4,7] +Output: 2 +Explanation: The two longest increasing subsequence are [1, 3, 4, 7] and [1, 3, 5, 7]. +``` + +Example 2: + +```text +Input: [2,2,2,2,2] +Output: 5 +Explanation: The length of longest continuous increasing subsequence is 1, and there are 5 subsequences' length is 1, so output 5. +``` + +Note: Length of the given array will be not exceed 2000 and the answer is guaranteed to be fit in 32-bit signed int. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0673.number-of-longest-increasing-subsequence/number-of-longest-increasing-subsequence.go b/Algorithms/0673.number-of-longest-increasing-subsequence/number-of-longest-increasing-subsequence.go new file mode 100755 index 000000000..e73b853b4 --- /dev/null +++ b/Algorithms/0673.number-of-longest-increasing-subsequence/number-of-longest-increasing-subsequence.go @@ -0,0 +1,39 @@ +package Problem0673 + +func findNumberOfLIS(a []int) int { + n := len(a) + res := 0 + maxLen := 0 + + // length[i] == m 表示,以 a[i] 结尾的最长子序列的长度为 m + length := make([]int, n) + // count[i] == n 表示,以 a[i] 结尾的最长子序列有 n 个 + count := make([]int, n) + + for j := 0; j < n; j++ { + length[j] = 1 + count[j] = 1 + for i := 0; i < j; i++ { + if a[i] < a[j] { + if length[j] == length[i]+1 { + // 出现相同的长度 + count[j] += count[i] + } else if length[j] < length[i]+1 { + // 出现了长度的子序列 + length[j] = length[i] + 1 + count[j] = count[i] + } + } + } + + // 对于每一个 j 都更新一次 res + if maxLen == length[j] { + res += count[j] + } else if maxLen < length[j] { + res = count[j] + maxLen = length[j] + } + } + + return res +} diff --git a/Algorithms/0673.number-of-longest-increasing-subsequence/number-of-longest-increasing-subsequence_test.go b/Algorithms/0673.number-of-longest-increasing-subsequence/number-of-longest-increasing-subsequence_test.go new file mode 100755 index 000000000..beef62f94 --- /dev/null +++ b/Algorithms/0673.number-of-longest-increasing-subsequence/number-of-longest-increasing-subsequence_test.go @@ -0,0 +1,59 @@ +package Problem0673 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans int +}{ + + { + []int{-51352, 15205, -65427, -83043, 76659, -8024, -85277, -44152, 36446, 93694, 50743, 12892, 27985, 32150, -63844, 55946, -4000, 14123, 63541, 74544, -42255, 97608, 76290, 27429, 44628, 15894, 87961, -18456, 7487, 96033, 56941, 10910, -1177, 8875, 30191, 82607, -43724, 38113, 94726, 29250, 74589, 77271, -19031, -89367, 59834, -92444, 18138, -10681, -48922, 49634, 36196, 55360, 35096, -65044, -36847, 69609, 96398, 63949, 51367, -4949, 69677, -55449, -81826, 59265, 19403, -85698, 76146, 19048, -50975, 88533, 89822, -93839, 29632, -52868, -35704, -13993, 97623, 47644, 76941, 41852, 12972, -738, -97741, -8150, 28516, 33046, 63634, 15042, 90687, -25488, 64622, -46530, -56385, 13007, 38522, 42333, -55614, 69245, -88282, 98610, -82087, -87454, 95891, -22632, 79349, 48546, -31268, -6520, 4055, 37809, 75194, -59844, 99284, -6329, 11295, 19556, -55531, 66976, 92077, 97764, 45497, -17626, 74660, -57832, 83829, 46739, 35576, 38315, 4126, 23089, 64671, 12780, -96665, -47985, 83770, 46694, 91307, 94410, 8820, -83994, -21045, 70822, 73097, -7177, 69717, 84186, -57132, -76130, 8738, 35818, -91206, -72574, 93176, -16995, -7734, 69773, 231, 47933, -2643, -34384, 80255, -76597, 24155, 41216, -44050, -82503, 24778, 21380, -56159, -54978, 22079, 1605, -28798, 85924, 45973, 52543, 45626, -85452, -32778, 75165, 42902, 22760, 17184, 96065, 88094, 81662, 20794, -13057, 33818, 62533, 9566, -52279, 20672, -43700, -67264, -59657, 23083, 64271, 7131, 30780, 66781, 40609, -18707, 20102, 77835, -40754, -24429, 85711, 59703, 91752, -76222, 55709, 19870, 96364, 67733, 24778, 1359, 14301, 14847, -55484, 89580, -79042, 460, -42022, 3700, 48167, -90309, 39300, -85033, -1761, 33443, -46567, 64901, -86117, -98418, 67997, -87866, -68567, -94327, 90278, 73166, 68448, 26448, 86239, 68834, 93342, -18409, 18979, 50063, 50526, 8531, -35692, 80641, 55008, -25146, 53, 44300, 73549, 72511}, + 6720, + }, + + { + []int{}, + 0, + }, + + { + []int{1, 3, 5, 4, 7}, + 2, + }, + + { + []int{1, 2, 4, 3, 5, 4, 7, 2}, + 3, + }, + + { + []int{2, 2, 2, 2, 2}, + 5, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findNumberOfLIS(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findNumberOfLIS(tc.nums) + } + } +} diff --git a/Algorithms/0674.longest-continuous-increasing-subsequence/README.md b/Algorithms/0674.longest-continuous-increasing-subsequence/README.md new file mode 100755 index 000000000..d099edbbe --- /dev/null +++ b/Algorithms/0674.longest-continuous-increasing-subsequence/README.md @@ -0,0 +1,28 @@ +# [674. Longest Continuous Increasing Subsequence](https://leetcode.com/problems/longest-continuous-increasing-subsequence/) + +## 题目 + +Given an unsorted array of integers, find the length of longest continuous increasing subsequence (subarray). + +Example 1: + +```text +Input: [1,3,5,4,7] +Output: 3 +Explanation: The longest continuous increasing subsequence is [1,3,5], its length is 3. +Even though [1,3,5,7] is also an increasing subsequence, it's not a continuous one where 5 and 7 are separated by 4. +``` + +Example 2: + +```text +Input: [2,2,2,2,2] +Output: 1 +Explanation: The longest continuous increasing subsequence is [2], its length is 1. +``` + +Note: Length of the array will not exceed 10,000. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0674.longest-continuous-increasing-subsequence/longest-continuous-increasing-subsequence.go b/Algorithms/0674.longest-continuous-increasing-subsequence/longest-continuous-increasing-subsequence.go new file mode 100755 index 000000000..82e0200fc --- /dev/null +++ b/Algorithms/0674.longest-continuous-increasing-subsequence/longest-continuous-increasing-subsequence.go @@ -0,0 +1,25 @@ +package Problem0674 + +func findLengthOfLCIS(a []int) int { + if len(a) == 0 { + return 0 + } + + res := 1 + + i, j := 0, 1 + for j < len(a) { + for j < len(a) && a[j-1] < a[j] { + j++ + } + + if res < j-i { + res = j - i + } + + i = j + j++ + } + + return res +} diff --git a/Algorithms/0674.longest-continuous-increasing-subsequence/longest-continuous-increasing-subsequence_test.go b/Algorithms/0674.longest-continuous-increasing-subsequence/longest-continuous-increasing-subsequence_test.go new file mode 100755 index 000000000..bae103365 --- /dev/null +++ b/Algorithms/0674.longest-continuous-increasing-subsequence/longest-continuous-increasing-subsequence_test.go @@ -0,0 +1,54 @@ +package Problem0674 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans int +}{ + + { + []int{1}, + 1, + }, + + { + []int{}, + 0, + }, + + { + []int{1, 3, 5, 4, 7}, + 3, + }, + + { + []int{2, 2, 2, 2, 2}, + 1, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findLengthOfLCIS(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findLengthOfLCIS(tc.nums) + } + } +} diff --git a/Algorithms/0675.cut-off-trees-for-golf-event/README.md b/Algorithms/0675.cut-off-trees-for-golf-event/README.md new file mode 100755 index 000000000..3835c5862 --- /dev/null +++ b/Algorithms/0675.cut-off-trees-for-golf-event/README.md @@ -0,0 +1,58 @@ +# [675. Cut Off Trees for Golf Event](https://leetcode.com/problems/cut-off-trees-for-golf-event/) + +## 题目 + +You are asked to cut off trees in a forest for a golf event. The forest is represented as a non-negative 2D map, in this map: + +1. 0 represents the obstacle can't be reached. +1. 1 represents the ground can be walked through. +1. The place with number bigger than 1 represents a tree can be walked through, and this positive number represents the tree's height. + +You are asked to cut off all the trees in this forest in the order of tree's height - always cut off the tree with lowest height first. And after cutting, the original place has the tree will become a grass (value 1). + +You will start from the point (0, 0) and you should output the minimum steps you need to walk to cut off all the trees. If you can't cut off all the trees, output -1 in that situation. + +You are guaranteed that no two trees have the same height and there is at least one tree needs to be cut off. + +Example 1: + +```text +Input: +[ + [1,2,3], + [0,0,4], + [7,6,5] +] +Output: 6 +``` + +Example 2: + +```text +Input: +[ + [1,2,3], + [0,0,0], + [7,6,5] +] +Output: -1 +``` + +Example 3: + +```text +Input: +[ + [2,3,4], + [0,0,5], + [8,7,6] +] +Output: 6 +Explanation: You started from the point (0,0) and you can cut off the tree in (0,0) directly without walking. +``` + +Hint: size of the given matrix will not exceed 50x50. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0675.cut-off-trees-for-golf-event/cut-off-trees-for-golf-event.go b/Algorithms/0675.cut-off-trees-for-golf-event/cut-off-trees-for-golf-event.go new file mode 100755 index 000000000..1f9c9ab09 --- /dev/null +++ b/Algorithms/0675.cut-off-trees-for-golf-event/cut-off-trees-for-golf-event.go @@ -0,0 +1,122 @@ +package Problem0675 + +import "container/heap" + +func cutOffTree(forest [][]int) int { + // 题目保证了 m,n >0 + m, n := len(forest), len(forest[0]) + + // 构建砍树的优先队列 + // 根据题意,先砍矮的树 + pq := make(PQ, 0, m*n) + for i := 0; i < m; i++ { + for j := 0; j < n; j++ { + if forest[i][j] > 1 { + pq = append(pq, &tree{ + height: forest[i][j], + point: point{x: i, y: j}, + }, + ) + } + } + } + heap.Init(&pq) + + res := 0 + beg := point{x: 0, y: 0} + for len(pq) > 0 { + next := heap.Pop(&pq).(*tree) + end := next.point + // 利用 bfs 搜索从 beg 到 end 的步长 + steps, isAccessible := bfs(forest, beg, end) + if !isAccessible { + // 无法从 beg 到 end,直接返回 -1 + return -1 + } + res += steps + beg = end + } + + return res +} + +var dx = []int{-1, 1, 0, 0} +var dy = []int{0, 0, -1, 1} + +// 在 forest 中, +// 如果可以从 beg 到 end 则返回 步数 和 true +// 如果无法到达,则返回 -1 和 false +func bfs(forest [][]int, beg, end point) (int, bool) { + m, n := len(forest), len(forest[0]) + isPassed := make([]bool, m*n) + + steps, cands := 0, 1 + ps := make([]point, 1, m*n) + ps[0] = beg + + for len(ps) > 0 { + if cands == 0 { + steps++ + cands = len(ps) + } + + tp := ps[0] + ps = ps[1:] + isPassed[tp.x*n+tp.y] = true + cands-- + + if tp == end { + return steps, true + } + + for i := 0; i < 4; i++ { + x := tp.x + dx[i] + y := tp.y + dy[i] + p := point{x: x, y: y} + if 0 <= x && x < m && + 0 <= y && y < n && + forest[x][y] > 0 && + !isPassed[x*n+y] { + ps = append(ps, p) + } + } + } + + return -1, false +} + +// tree 是 priorityQueue 中的元素 +type tree struct { + height int + point +} + +type point struct { + x, y int +} + +// PQ implements heap.Interface and holds entries. +type PQ []*tree + +func (pq PQ) Len() int { return len(pq) } + +func (pq PQ) Less(i, j int) bool { + return pq[i].height < pq[j].height +} + +func (pq PQ) Swap(i, j int) { + pq[i], pq[j] = pq[j], pq[i] +} + +// Push 往 pq 中放 tree +func (pq *PQ) Push(x interface{}) { + temp := x.(*tree) + *pq = append(*pq, temp) +} + +// Pop 从 pq 中取出最矮的 tree +func (pq *PQ) Pop() interface{} { + temp := (*pq)[len(*pq)-1] + *pq = (*pq)[0 : len(*pq)-1] + return temp +} diff --git a/Algorithms/0675.cut-off-trees-for-golf-event/cut-off-trees-for-golf-event_test.go b/Algorithms/0675.cut-off-trees-for-golf-event/cut-off-trees-for-golf-event_test.go new file mode 100755 index 000000000..ded99f607 --- /dev/null +++ b/Algorithms/0675.cut-off-trees-for-golf-event/cut-off-trees-for-golf-event_test.go @@ -0,0 +1,147 @@ +package Problem0675 + +import ( + "container/heap" + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + forest [][]int + ans int +}{ + + { + [][]int{ + {69438, 55243, 0, 43779, 5241, 93591, 73380}, + {847, 49990, 53242, 21837, 89404, 63929, 48214}, + {90332, 49751, 0, 3088, 16374, 70121, 25385}, + {14694, 4338, 87873, 86281, 5204, 84169, 5024}, + {31711, 47313, 1885, 28332, 11646, 42583, 31460}, + {59845, 94855, 29286, 53221, 9803, 41305, 60749}, + {95077, 50343, 27947, 92852, 0, 0, 19731}, + {86158, 63553, 56822, 90251, 0, 23826, 17478}, + {60387, 23279, 78048, 78835, 5310, 99720, 0}, + {74799, 48845, 60658, 29773, 96129, 90443, 14391}, + {65448, 63358, 78089, 93914, 7931, 68804, 72633}, + {93431, 90868, 55280, 30860, 59354, 62083, 47669}, + {81064, 93220, 22386, 22341, 95485, 20696, 13436}, + {50083, 0, 89399, 43882, 0, 13593, 27847}, + {0, 12256, 33652, 69301, 73395, 93440, 0}, + {42818, 87197, 81249, 33936, 7027, 5744, 64710}, + {35843, 0, 99746, 52442, 17494, 49407, 63016}, + {86042, 44524, 0, 0, 26787, 97651, 28572}, + {54183, 83466, 96754, 89861, 84143, 13413, 72921}, + {89405, 52305, 39907, 27366, 14603, 0, 14104}, + {70909, 61104, 70236, 30365, 0, 30944, 98378}, + {20124, 87188, 6515, 98319, 78146, 99325, 88919}, + {89669, 0, 64218, 85795, 2449, 48939, 12869}, + {93539, 28909, 90973, 77642, 0, 72170, 98359}, + {88628, 16422, 80512, 0, 38651, 50854, 55768}, + {13639, 2889, 74835, 80416, 26051, 78859, 25721}, + {90182, 23154, 16586, 0, 27459, 3272, 84893}, + {2480, 33654, 87321, 93272, 93079, 0, 38394}, + {34676, 72427, 95024, 12240, 72012, 0, 57763}, + {97957, 56, 83817, 45472, 0, 24087, 90245}, + {32056, 0, 92049, 21380, 4980, 38458, 3490}, + {21509, 76628, 0, 90430, 10113, 76264, 45840}, + {97192, 58807, 74165, 65921, 45726, 47265, 56084}, + {16276, 27751, 37985, 47944, 54895, 80706, 2372}, + {28438, 53073, 0, 67255, 38416, 63354, 69262}, + {23926, 75497, 91347, 58436, 73946, 39565, 10841}, + {34372, 69647, 44093, 62680, 32424, 69858, 68719}, + {24425, 4014, 94871, 1031, 99852, 88692, 31503}, + {24475, 12295, 33326, 37771, 37883, 74568, 25163}, + {0, 18411, 88185, 60924, 29028, 69789, 0}, + {34697, 75631, 7636, 16190, 60178, 39082, 7052}, + {24876, 9570, 53630, 98605, 22331, 79320, 88317}, + {27204, 89103, 15221, 91346, 35428, 94251, 62745}, + {26636, 28759, 12998, 58412, 38113, 14678, 0}, + {80871, 79706, 45325, 3861, 12504, 0, 4872}, + {79662, 15626, 995, 80546, 64775, 0, 68820}, + {25160, 82123, 81706, 21494, 92958, 33594, 5243}, + }, + 5637, + }, + + { + [][]int{{1, 2, 3}, {0, 0, 0}, {7, 6, 5}}, + -1, + }, + + { + [][]int{ + {1, 2, 3}, + {0, 0, 4}, + {7, 6, 5}, + }, + 6, + }, + + { + [][]int{{18, 17, 16, 15, 14, 13}, {7, 8, 9, 10, 11, 12}, {6, 5, 4, 3, 2, 1}}, + 22, + }, + + { + [][]int{{9, 8, 7}, {4, 5, 6}, {3, 2, 1}}, + 10, + }, + + { + [][]int{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}, + 12, + }, + + { + [][]int{{1, 2, 3}, {0, 1, 0}, {7, 1, 1}}, + 6, + }, + + { + [][]int{{1, 2, 3}, {0, 1, 0}, {7, 6, 5}}, + 8, + }, + + { + [][]int{{2, 3, 4}, {0, 0, 5}, {8, 7, 6}}, + 6, + }, + + // 可以有多个 testcase +} + +func Test_cutOffTree(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, cutOffTree(tc.forest), "输入:%v", tc) + } +} + +func Benchmark_cutOffTree(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + cutOffTree(tc.forest) + } + } +} + +// 为了 100% 覆盖率 +func Test_PQ_push(t *testing.T) { + ast := assert.New(t) + heights := []int{9, 8, 7, 4, 5, 6, 3, 2, 1} + pq := make(PQ, 0, 9) + for i := 0; i < len(heights); i++ { + heap.Push(&pq, &tree{height: heights[i]}) + } + + actual := heap.Pop(&pq).(*tree).height + expected := 1 + ast.Equal(expected, actual) + +} diff --git a/Algorithms/0676.implement-magic-dictionary/README.md b/Algorithms/0676.implement-magic-dictionary/README.md new file mode 100755 index 000000000..10db80ab5 --- /dev/null +++ b/Algorithms/0676.implement-magic-dictionary/README.md @@ -0,0 +1,29 @@ +# [676. Implement Magic Dictionary](https://leetcode.com/problems/implement-magic-dictionary/) + +## 题目 + +Implement a magic directory with buildDict, and search methods. + +For the method buildDict, you'll be given a list of non-repetitive words to build a dictionary. + +For the method search, you'll be given a word, and judge whether if you modify exactly one character into another character in this word, the modified word is in the dictionary you just built. + +Example 1: + +```text +Input: buildDict(["hello", "leetcode"]), Output: Null +Input: search("hello"), Output: False +Input: search("hhllo"), Output: True +Input: search("hell"), Output: False +Input: search("leetcoded"), Output: False +``` + +Note: + +1. You may assume that all the inputs are consist of lowercase letters a-z. +1. For contest purpose, the test data is rather small by now. You could think about highly efficient algorithm after the contest. +1. Please remember to RESET your class variables declared in class MagicDictionary, as static/class variables are persisted across multiple test cases. Please see here for more details. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0676.implement-magic-dictionary/implement-magic-dictionary.go b/Algorithms/0676.implement-magic-dictionary/implement-magic-dictionary.go new file mode 100755 index 000000000..d5d75e40f --- /dev/null +++ b/Algorithms/0676.implement-magic-dictionary/implement-magic-dictionary.go @@ -0,0 +1,45 @@ +package Problem0676 + +// MagicDictionary 是一个神奇的字典 +type MagicDictionary struct { + keys []string +} + +// Constructor 构建了神奇字典 +func Constructor() MagicDictionary { + return MagicDictionary{ + keys: make([]string, 0, 1024), + } +} + +// BuildDict 往字典里面添加内容 +func (md *MagicDictionary) BuildDict(dict []string) { + for _, w := range dict { + md.keys = append(md.keys, w) + } +} + +// Search returns if there is any word in the trie that equals to the given word after modifying exactly one character +func (md *MagicDictionary) Search(word string) bool { + n := len(word) + + for _, w := range md.keys { + if len(w) != n || w == word { + continue + } + if isChanges(w, word) { + return true + } + } + return false +} + +func isChanges(w, word string) bool { + n := len(w) + for i := range w { + if w[i] == word[i] { + n-- + } + } + return n == 1 +} diff --git a/Algorithms/0676.implement-magic-dictionary/implement-magic-dictionary_test.go b/Algorithms/0676.implement-magic-dictionary/implement-magic-dictionary_test.go new file mode 100755 index 000000000..cb4828d14 --- /dev/null +++ b/Algorithms/0676.implement-magic-dictionary/implement-magic-dictionary_test.go @@ -0,0 +1,35 @@ +package Problem0676 + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_MagicDictionary(t *testing.T) { + ast := assert.New(t) + + md := Constructor() + + dict := []string{"hello", "leetcode"} + md.BuildDict(dict) + + ast.False(md.Search("hello")) + + ast.True(md.Search("hhllo")) + + ast.False(md.Search("hell")) + + ast.False(md.Search("leetcoded")) +} + +func Test_MagicDictionary_2(t *testing.T) { + ast := assert.New(t) + + md := Constructor() + + dict := []string{"hello", "hallo", "leetcode"} + md.BuildDict(dict) + + ast.True(md.Search("hello"), "hello 可以从 hallo 变化过来") +} diff --git a/Algorithms/0677.map-sum-pairs/README.md b/Algorithms/0677.map-sum-pairs/README.md new file mode 100755 index 000000000..ac191b79c --- /dev/null +++ b/Algorithms/0677.map-sum-pairs/README.md @@ -0,0 +1,22 @@ +# [677. Map Sum Pairs](https://leetcode.com/problems/map-sum-pairs/) + +## 题目 + +Implement a MapSum class with insert, and sum methods. + +For the method insert, you'll be given a pair of (string, integer). The string represents the key and the integer represents the value. If the key already existed, then the original key-value pair will be overridden to the new one. + +For the method sum, you'll be given a string representing the prefix, and you need to return the sum of all the pairs' value whose key starts with the prefix. + +Example 1: + +```text +Input: insert("apple", 3), Output: Null +Input: sum("ap"), Output: 3 +Input: insert("app", 2), Output: Null +Input: sum("ap"), Output: 5 +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0677.map-sum-pairs/map-sum-pairs.go b/Algorithms/0677.map-sum-pairs/map-sum-pairs.go new file mode 100755 index 000000000..b063b261b --- /dev/null +++ b/Algorithms/0677.map-sum-pairs/map-sum-pairs.go @@ -0,0 +1,49 @@ +package Problem0677 + +import "strings" +import "sort" + +// MapSum 可以返回 map 中具有相同前缀的 value 之和 +type MapSum struct { + m map[string]int + keys []string +} + +// Constructor 构建了 MapSum +func Constructor() MapSum { + return MapSum{m: make(map[string]int, 128), + keys: make([]string, 0, 128)} +} + +// Insert 插入 (key, val) +func (ms *MapSum) Insert(key string, val int) { + ms.m[key] = val + + i := sort.SearchStrings(ms.keys, key) + // 遇到重复的 key ,不操作 + if i < len(ms.keys) && ms.keys[i] == key { + return + } + + ms.keys = append(ms.keys, "") + copy(ms.keys[i+1:], ms.keys[i:]) + ms.keys[i] = key +} + +// Sum 返回所有具有 prefix 的 key 的 val 之和 +func (ms *MapSum) Sum(prefix string) int { + res := 0 + i := sort.SearchStrings(ms.keys, prefix) + for i < len(ms.keys) && strings.HasPrefix(ms.keys[i], prefix) { + res += ms.m[ms.keys[i]] + i++ + } + return res +} + +/** + * Your MapSum object will be instantiated and called as such: + * obj := Constructor(); + * obj.Insert(key,val); + * param_2 := obj.Sum(prefix); + */ diff --git a/Algorithms/0677.map-sum-pairs/map-sum-pairs_test.go b/Algorithms/0677.map-sum-pairs/map-sum-pairs_test.go new file mode 100755 index 000000000..0ba12e762 --- /dev/null +++ b/Algorithms/0677.map-sum-pairs/map-sum-pairs_test.go @@ -0,0 +1,35 @@ +package Problem0677 + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_MapSum(t *testing.T) { + ast := assert.New(t) + + ms := Constructor() + + ms.Insert("apple", 3) + + ast.Equal(3, ms.Sum("ap")) + + ms.Insert("app", 2) + + ast.Equal(5, ms.Sum("ap")) +} + +func Test_MapSum_duplicateKey(t *testing.T) { + ast := assert.New(t) + + ms := Constructor() + + ms.Insert("apple", 3) + + ast.Equal(3, ms.Sum("ap")) + + ms.Insert("apple", 2) + + ast.Equal(2, ms.Sum("ap")) +} diff --git a/Algorithms/0678.valid-parenthesis-string/README.md b/Algorithms/0678.valid-parenthesis-string/README.md new file mode 100755 index 000000000..9f4f8c0c0 --- /dev/null +++ b/Algorithms/0678.valid-parenthesis-string/README.md @@ -0,0 +1,40 @@ +# [678. Valid Parenthesis String](https://leetcode.com/problems/valid-parenthesis-string/) + +## 题目 + +Given a string containing only three types of characters: '(', ')' and '*', write a function to check whether this string is valid. We define the validity of a string by these rules: + +1. Any left parenthesis '(' must have a corresponding right parenthesis ')'. +1. Any right parenthesis ')' must have a corresponding left parenthesis '('. +1. Left parenthesis '(' must go before the corresponding right parenthesis ')'. +1. '*' could be treated as a single right parenthesis ')' or a single left parenthesis '(' or an empty string. +1. An empty string is also valid. + +Example 1: + +```text +Input: "()" +Output: True +``` + +Example 2: + +```text +Input: "(*)" +Output: True +``` + +Example 3: + +```text +Input: "(*))" +Output: True +``` + +Note: + +1. The string size will be in the range [1, 100]. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0678.valid-parenthesis-string/valid-parenthesis-string.go b/Algorithms/0678.valid-parenthesis-string/valid-parenthesis-string.go new file mode 100755 index 000000000..94623624f --- /dev/null +++ b/Algorithms/0678.valid-parenthesis-string/valid-parenthesis-string.go @@ -0,0 +1,36 @@ +package Problem0678 + +func checkValidString(s string) bool { + l, r := 0, 0 + n := len(s) + for i := 0; i < n; i++ { + // 从左侧开始的扫描 + // 并认为所有的 '*' 是 '(' + if s[i] == ')' { + l-- + } else { + l++ + } + + // 从右侧开始的扫描 + // 并认为所有的 '*' 是 ')' + j := n - i - 1 + if s[j] == '(' { + r-- + } else { + r++ + } + + if l < 0 || r < 0 { + // l < 0 意味着 + // 就算所有的 '*' 变成的 '(' + // s[:i] 中也没有能与 s[i] == ')' 匹配的 '(' + // l < 0 意味着 + // 就算所有的 '*' 变成的 ')' + // s[j+1:] 中也没有能与 s[j] == '(' 匹配的 ')' + return false + } + } + + return true +} diff --git a/Algorithms/0678.valid-parenthesis-string/valid-parenthesis-string_test.go b/Algorithms/0678.valid-parenthesis-string/valid-parenthesis-string_test.go new file mode 100755 index 000000000..16267ab90 --- /dev/null +++ b/Algorithms/0678.valid-parenthesis-string/valid-parenthesis-string_test.go @@ -0,0 +1,59 @@ +package Problem0678 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + ans bool +}{ + + { + "(())((())()()(*)(*()(())())())()()((()())((()))(*", + false, + }, + + { + ")(", + false, + }, + + { + "()", + true, + }, + + { + "(*)", + true, + }, + + { + "(*))", + true, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, checkValidString(tc.s), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + checkValidString(tc.s) + } + } +} diff --git a/Algorithms/0679.24-game/24-game.go b/Algorithms/0679.24-game/24-game.go new file mode 100755 index 000000000..a4068e1d6 --- /dev/null +++ b/Algorithms/0679.24-game/24-game.go @@ -0,0 +1,20 @@ +package Problem0679 + +import ( + "sort" +) + +// 无法算出 24 的数字组合 +var bad = []int{1111, 1112, 1113, 1114, 1115, 1116, 1117, 1119, 1122, 1123, 1124, 1125, 1133, 1159, 1167, 1177, 1178, 1179, 1189, 1199, 1222, 1223, 1299, 1355, 1499, 1557, 1558, 1577, 1667, 1677, 1678, 1777, 1778, 1899, 1999, 2222, 2226, 2279, 2299, 2334, 2555, 2556, 2599, 2677, 2777, 2779, 2799, 2999, 3358, 3467, 3488, 3555, 3577, 4459, 4466, 4467, 4499, 4779, 4999, 5557, 5558, 5569, 5579, 5777, 5778, 5799, 5899, 5999, 6667, 6677, 6678, 6699, 6777, 6778, 6779, 6788, 6999, 7777, 7778, 7779, 7788, 7789, 7799, 7888, 7899, 7999, 8888, 8889, 8899, 8999, 9999} + +func judgePoint24(nums []int) bool { + sort.Ints(nums) + sum := 0 + for i := 0; i < 4; i++ { + sum = sum*10 + nums[i] + } + + i := sort.SearchInts(bad, sum) + + return bad[i] != sum +} diff --git a/Algorithms/0679.24-game/24-game_test.go b/Algorithms/0679.24-game/24-game_test.go new file mode 100755 index 000000000..c500c73fd --- /dev/null +++ b/Algorithms/0679.24-game/24-game_test.go @@ -0,0 +1,54 @@ +package Problem0679 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans bool +}{ + + { + []int{1, 2, 1, 2}, + false, + }, + + { + []int{4, 1, 8, 7}, + true, + }, + + { + []int{1, 5, 5, 5}, + true, + }, + + { + []int{3, 8, 8, 8}, + true, + }, + + // 可以有多个 testcase +} + +func Test_judgePoint24(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, judgePoint24(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_judgePoint24(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + judgePoint24(tc.nums) + } + } +} diff --git a/Algorithms/0679.24-game/README.md b/Algorithms/0679.24-game/README.md new file mode 100755 index 000000000..ae9e69f6e --- /dev/null +++ b/Algorithms/0679.24-game/README.md @@ -0,0 +1,30 @@ +# [679. 24 Game](https://leetcode.com/problems/24-game/) + +## 题目 + +You have 4 cards each containing a number from 1 to 9. You need to judge whether they could operated through *, /, +, -, (, ) to get the value of 24. + +Example 1: + +```text +Input: [4, 1, 8, 7] +Output: True +Explanation: (8-4) * (7-1) = 24 +``` + +Example 2: + +```text +Input: [1, 2, 1, 2] +Output: False +``` + +Note: + +1. The division operator / represents real division, not integer division. For example, 4 / (1 - 2/3) = 12. +1. Every operation done is between two numbers. In particular, we cannot use - as a unary operator. For example, with [1, 1, 1, 1] as input, the expression -1 - 1 - 1 - 1 is not allowed. +1. You cannot concatenate numbers together. For example, if the input is [1, 2, 1, 2], we cannot write this as 12 + 12. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0680.valid-palindrome-ii/README.md b/Algorithms/0680.valid-palindrome-ii/README.md new file mode 100755 index 000000000..a2a98409f --- /dev/null +++ b/Algorithms/0680.valid-palindrome-ii/README.md @@ -0,0 +1,28 @@ +# [680. Valid Palindrome II](https://leetcode.com/problems/valid-palindrome-ii/) + +## 题目 + +Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome. + +Example 1: + +```text +Input: "aba" +Output: True +``` + +Example 2: + +```text +Input: "abca" +Output: True +Explanation: You could delete the character 'c'. +``` + +Note: + +1. The string will only contain lowercase characters a-z. The maximum length of the string is 50000. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0680.valid-palindrome-ii/valid-palindrome-ii.go b/Algorithms/0680.valid-palindrome-ii/valid-palindrome-ii.go new file mode 100755 index 000000000..ea9491e80 --- /dev/null +++ b/Algorithms/0680.valid-palindrome-ii/valid-palindrome-ii.go @@ -0,0 +1,21 @@ +package Problem0680 + +func validPalindrome(s string) bool { + return helper([]byte(s), 0, len(s)-1, false) +} + +func helper(bs []byte, lo, hi int, hasDeleted bool) bool { + for lo < hi { + if bs[lo] != bs[hi] { + if hasDeleted { + return false + } + return helper(bs, lo+1, hi, true) || // 删除 s[lo] + helper(bs, lo, hi-1, true) // 删除 s[hi] + } + lo++ + hi-- + } + + return true +} diff --git a/Algorithms/0680.valid-palindrome-ii/valid-palindrome-ii_test.go b/Algorithms/0680.valid-palindrome-ii/valid-palindrome-ii_test.go new file mode 100755 index 000000000..085e55f9a --- /dev/null +++ b/Algorithms/0680.valid-palindrome-ii/valid-palindrome-ii_test.go @@ -0,0 +1,49 @@ +package Problem0680 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + ans bool +}{ + + { + "acaaba", + false, + }, + + { + "aba", + true, + }, + + { + "abca", + true, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, validPalindrome(tc.s), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + validPalindrome(tc.s) + } + } +} diff --git a/Algorithms/0682.baseball-game/README.md b/Algorithms/0682.baseball-game/README.md new file mode 100755 index 000000000..4bfcbabf4 --- /dev/null +++ b/Algorithms/0682.baseball-game/README.md @@ -0,0 +1,53 @@ +# [682. Baseball Game](https://leetcode.com/problems/baseball-game/) + +## 题目 + +You're now a baseball game point recorder. + +Given a list of strings, each string can be one of the 4 following types: + +1. Integer (one round's score): Directly represents the number of points you get in this round. +1. "+" (one round's score): Represents that the points you get in this round are the sum of the last two valid round's points. +1. "D" (one round's score): Represents that the points you get in this round are the doubled data of the last valid round's points. +1. "C" (an operation, which isn't a round's score): Represents the last valid round's points you get were invalid and should be removed. + +Each round's operation is permanent and could have an impact on the round before and the round after. + +You need to return the sum of the points you could get in all the rounds. + +Example 1: + +```text +Input: ["5","2","C","D","+"] +Output: 30 +Explanation: +Round 1: You could get 5 points. The sum is: 5. +Round 2: You could get 2 points. The sum is: 7. +Operation 1: The round 2's data was invalid. The sum is: 5. +Round 3: You could get 10 points (the round 2's data has been removed). The sum is: 15. +Round 4: You could get 5 + 10 = 15 points. The sum is: 30. +``` + +Example 2: + +```text +Input: ["5","-2","4","C","D","9","+","+"] +Output: 27 +Explanation: +Round 1: You could get 5 points. The sum is: 5. +Round 2: You could get -2 points. The sum is: 3. +Round 3: You could get 4 points. The sum is: 7. +Operation 1: The round 3's data is invalid. The sum is: 3. +Round 4: You could get -4 points (the round 3's data has been removed). The sum is: -1. +Round 5: You could get 9 points. The sum is: 8. +Round 6: You could get -4 + 9 = 5 points. The sum is 13. +Round 7: You could get 9 + 5 = 14 points. The sum is 27. + +Note: + +1. The size of the input list will be between 1 and 1000. +1. Every integer represented in the list will be between -30000 and 30000. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0682.baseball-game/baseball-game.go b/Algorithms/0682.baseball-game/baseball-game.go new file mode 100755 index 000000000..6e779889a --- /dev/null +++ b/Algorithms/0682.baseball-game/baseball-game.go @@ -0,0 +1,32 @@ +package Problem0682 + +import ( + "strconv" +) + +func calPoints(ops []string) int { + pointStack := make([]int, 0, len(ops)) + + for i := range ops { + switch ops[i] { + case "+": + r1 := pointStack[len(pointStack)-1] + r2 := pointStack[len(pointStack)-2] + pointStack = append(pointStack, r1+r2) + case "D": + r1 := pointStack[len(pointStack)-1] + pointStack = append(pointStack, 2*r1) + case "C": + pointStack = pointStack[:len(pointStack)-1] + default: + point, _ := strconv.Atoi(ops[i]) + pointStack = append(pointStack, point) + } + } + + res := 0 + for _, p := range pointStack { + res += p + } + return res +} diff --git a/Algorithms/0682.baseball-game/baseball-game_test.go b/Algorithms/0682.baseball-game/baseball-game_test.go new file mode 100755 index 000000000..b62ab64d5 --- /dev/null +++ b/Algorithms/0682.baseball-game/baseball-game_test.go @@ -0,0 +1,44 @@ +package Problem0682 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + ops []string + ans int +}{ + + { + []string{"5", "2", "C", "D", "+"}, + 30, + }, + + { + []string{"5", "-2", "4", "C", "D", "9", "+", "+"}, + 27, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, calPoints(tc.ops), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + calPoints(tc.ops) + } + } +} diff --git a/Algorithms/0684.redundant-connection/README.md b/Algorithms/0684.redundant-connection/README.md new file mode 100755 index 000000000..69bfd3ebf --- /dev/null +++ b/Algorithms/0684.redundant-connection/README.md @@ -0,0 +1,42 @@ +# [684. Redundant Connection](https://leetcode.com/problems/redundant-connection/) + +## 题目 + +In this problem, a tree is an undirected graph that is connected and has no cycles. + +The given input is a graph that started as a tree with N nodes (with distinct values 1, 2, ..., N), with one additional edge added. The added edge has two different vertices chosen from 1 to N, and was not an edge that already existed. + +The resulting graph is given as a 2D-array of edges. Each element of edges is a pair [u, v] with u < v, that represents an undirected edge connecting nodes u and v. + +Return an edge that can be removed so that the resulting graph is a tree of N nodes. If there are multiple answers, return the answer that occurs last in the given 2D-array. The answer edge [u, v] should be in the same format, with u < v. + +Example 1: + +```text +Input: [[1,2], [1,3], [2,3]] +Output: [2,3] +Explanation: The given undirected graph will be like this: + 1 + / \ +2 - 3 +``` + +Example 2: + +```text +Input: [[1,2], [2,3], [3,4], [1,4], [1,5]] +Output: [1,4] +Explanation: The given undirected graph will be like this: +5 - 1 - 2 + | | + 4 - 3 +``` + +Note: + +1. The size of the input 2D-array will be between 3 and 1000. +1. Every integer represented in the 2D-array will be between 1 and N, where N is the size of the input array. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0684.redundant-connection/redundant-connection.go b/Algorithms/0684.redundant-connection/redundant-connection.go new file mode 100755 index 000000000..e2a59d18c --- /dev/null +++ b/Algorithms/0684.redundant-connection/redundant-connection.go @@ -0,0 +1,30 @@ +package Problem0684 + +func findRedundantConnection(edges [][]int) []int { + n := len(edges) + parent := make([]int, n+1) + for i := 0; i < n; i++ { + parent[i] = i + } + + var i int + var e []int + for i, e = range edges { + f, t := e[0], e[1] + pf := find(parent, f) + pt := find(parent, t) + if pf == pt { + // 出现连通区域 + break + } + parent[pf] = pt + } + return edges[i] +} + +func find(parent []int, f int) int { + for f != parent[f] { + f = parent[f] + } + return f +} diff --git a/Algorithms/0684.redundant-connection/redundant-connection_test.go b/Algorithms/0684.redundant-connection/redundant-connection_test.go new file mode 100755 index 000000000..3bcf52e45 --- /dev/null +++ b/Algorithms/0684.redundant-connection/redundant-connection_test.go @@ -0,0 +1,69 @@ +package Problem0684 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + edges [][]int + ans []int +}{ + + { + [][]int{{9, 10}, {5, 8}, {2, 6}, {1, 5}, {3, 8}, {4, 9}, {8, 10}, {4, 10}, {6, 8}, {7, 9}}, + []int{4, 10}, + }, + + { + [][]int{{3, 7}, {1, 4}, {2, 8}, {1, 6}, {7, 9}, {6, 10}, {1, 7}, {2, 3}, {8, 9}, {5, 9}}, + []int{8, 9}, + }, + + { + [][]int{{1, 2}, {2, 3}, {2, 4}, {4, 5}, {1, 5}}, + []int{1, 5}, + }, + + { + [][]int{{1, 3}, {3, 4}, {1, 5}, {3, 5}, {2, 3}}, + []int{3, 5}, + }, + + { + [][]int{{1, 4}, {3, 4}, {1, 3}, {1, 2}, {4, 5}}, + []int{1, 3}, + }, + + { + [][]int{{1, 2}, {1, 3}, {2, 3}}, + []int{2, 3}, + }, + + { + [][]int{{1, 2}, {2, 3}, {3, 4}, {1, 4}, {1, 5}}, + []int{1, 4}, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findRedundantConnection(tc.edges), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findRedundantConnection(tc.edges) + } + } +} diff --git a/Algorithms/0685.redundant-connection-ii/README.md b/Algorithms/0685.redundant-connection-ii/README.md new file mode 100755 index 000000000..2dc09063c --- /dev/null +++ b/Algorithms/0685.redundant-connection-ii/README.md @@ -0,0 +1,44 @@ +# [685. Redundant Connection II](https://leetcode.com/problems/redundant-connection-ii/) + +## 题目 + +In this problem, a rooted tree is a directed graph such that, there is exactly one node (the root) for which all other nodes are descendants of this node, plus every node has exactly one parent, except for the root node which has no parents. + +The given input is a directed graph that started as a rooted tree with N nodes (with distinct values 1, 2, ..., N), with one additional directed edge added. The added edge has two different vertices chosen from 1 to N, and was not an edge that already existed. + +The resulting graph is given as a 2D-array of edges. Each element of edges is a pair [u, v] that represents a directed edge connecting nodes u and v, where u is a parent of child v. + +Return an edge that can be removed so that the resulting graph is a rooted tree of N nodes. If there are multiple answers, return the answer that occurs last in the given 2D-array. + +Example 1: + +```text +Input: [[1,2], [1,3], [2,3]] +Output: [2,3] +Explanation: The given directed graph will be like this: + 1 + / \ +v v +2-->3 +``` + +Example 2: + +```text +Input: [[1,2], [2,3], [3,4], [4,1], [1,5]] +Output: [4,1] +Explanation: The given directed graph will be like this: +5 <- 1 -> 2 + ^ | + | v + 4 <- 3 +``` + +Note: + +1. The size of the input 2D-array will be between 3 and 1000. +1. Every integer represented in the 2D-array will be between 1 and N, where N is the size of the input array. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0685.redundant-connection-ii/redundant-connection-ii.go b/Algorithms/0685.redundant-connection-ii/redundant-connection-ii.go new file mode 100755 index 000000000..56fbc69b0 --- /dev/null +++ b/Algorithms/0685.redundant-connection-ii/redundant-connection-ii.go @@ -0,0 +1,77 @@ +package Problem0685 + +// 本题存在 3 种情况需要处理 +// 1. 存在一个节点,有两个父节点,但没有环状结构 +// 2. 存在一个环状结构,且每个节点都只有一个父节点 +// 3. 存在一个环状结构,且环上有且仅有一个节点有两个父节点 + +func findRedundantDirectedConnection(edges [][]int) []int { + n := len(edges) + + parent := make([]int, n+1) + // first, last 用来保存指向同一个节点的两条 edge + var first, last []int + + for k := range edges { + p, c := edges[k][0], edges[k][1] + if parent[c] == 0 { + parent[c] = p + } else { + // c 是存在两个父节点的节点 + // 按照先后顺序保存这两个 edge 到 first 和 last + first = []int{parent[c], c} + last = edges[k] + // edges[k] = nil 的用意是 + // 在 edges 中删除 last 边,然后查找环状结构 + // 如果 依然 存在环状结构的话,说明 first 边在环状结构上,需要删除的是 first 边 + // 如果 不 存在环状结构的话,不管 last 原先在不在环状结构上,都需要删除 last ,因为题目要求删除 occurs last 的边 + edges[k] = nil + // 可以提前结束 for 循环了 + break + } + } + + // 以下是使用联通查找方法,查找环装结构 + root := parent + + for i := 0; i <= n; i++ { + root[i] = i + } + + rootOf := func(i int) int { + for i != root[i] { + i = root[i] + } + return i + } + + for _, edge := range edges { + if edge == nil { + continue + } + + p := edge[0] + c := edge[1] + r := rootOf(p) + + // r == c 说明,添加 edge 后,会形成一个封闭的环 + // edge 是让环封闭的边 + if r == c { + if first == nil { + // 不存在有两个父节点的节点 + // 返回让环封闭的 edge + return edge + } + // 第 3 种情况出现了,且 first 边在环状结构上 + return first + } + + // 按照 edge 出现的顺序,添加每个节点,目前的根节点 + root[c] = r + } + + // 程序运行到这里,说明 + // 不存在环状结构 + // 那就删除 last 吧 + return last +} diff --git a/Algorithms/0685.redundant-connection-ii/redundant-connection-ii_test.go b/Algorithms/0685.redundant-connection-ii/redundant-connection-ii_test.go new file mode 100755 index 000000000..df8a07853 --- /dev/null +++ b/Algorithms/0685.redundant-connection-ii/redundant-connection-ii_test.go @@ -0,0 +1,49 @@ +package Problem0685 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + edges [][]int + ans []int +}{ + + { + [][]int{{2, 1}, {3, 1}, {4, 2}, {1, 4}}, + []int{2, 1}, + }, + + { + [][]int{{1, 2}, {1, 3}, {2, 3}}, + []int{2, 3}, + }, + + { + [][]int{{1, 2}, {2, 3}, {3, 4}, {4, 1}, {1, 5}}, + []int{4, 1}, + }, + + // 可以有多个 testcase +} + +func Test_findRedundantDirectedConnection(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findRedundantDirectedConnection(tc.edges), "输入:%v", tc) + } +} + +func Benchmark_findRedundantDirectedConnection(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findRedundantDirectedConnection(tc.edges) + } + } +} diff --git a/Algorithms/0686.repeated-string-match/README.md b/Algorithms/0686.repeated-string-match/README.md new file mode 100755 index 000000000..19b198b6a --- /dev/null +++ b/Algorithms/0686.repeated-string-match/README.md @@ -0,0 +1,16 @@ +# [686. Repeated String Match](https://leetcode.com/problems/repeated-string-match/) + +## 题目 + +Given two strings A and B, find the minimum number of times A has to be repeated such that B is a substring of it. If no such solution, return -1. + +For example, with A = "abcd" and B = "cdabcdab". + +Return 3, because by repeating A three times (“abcdabcdabcd”), B is a substring of it; and B is not a substring of A repeated two times ("abcdabcd"). + +Note: +The length of A and B will be between 1 and 10000. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0686.repeated-string-match/repeated-string-match.go b/Algorithms/0686.repeated-string-match/repeated-string-match.go new file mode 100755 index 000000000..8b3966619 --- /dev/null +++ b/Algorithms/0686.repeated-string-match/repeated-string-match.go @@ -0,0 +1,22 @@ +package Problem0686 + +import "strings" + +func repeatedStringMatch(a string, b string) int { + times := max(len(b)/len(a), 1) + + if strings.Contains(strings.Repeat(a, times), b) { + return times + } + if strings.Contains(strings.Repeat(a, times+1), b) { + return times + 1 + } + return -1 +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} diff --git a/Algorithms/0686.repeated-string-match/repeated-string-match_test.go b/Algorithms/0686.repeated-string-match/repeated-string-match_test.go new file mode 100755 index 000000000..8451b8741 --- /dev/null +++ b/Algorithms/0686.repeated-string-match/repeated-string-match_test.go @@ -0,0 +1,100 @@ +package Problem0686 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + a, b string + ans int +}{ + + { + "ba", + "ab", + 2, + }, + + { + "abc", + "aabcbabcc", + -1, + }, + + { + "abcd", + "cdabdab", + -1, + }, + + { + "aa", + "b", + -1, + }, + + { + "aa", + "a", + 1, + }, + + { + "abcd", + "bcabcdbc", + -1, + }, + + { + "abcd", + "abcdb", + -1, + }, + + { + "abababaaba", + "aabaaba", + 2, + }, + + { + "abcd", + "cdabcdab", + 3, + }, + + { + "bb", + "bbbbbbb", + 4, + }, + + { + "a", + "aa", + 2, + }, + + // 可以有多个 testcase +} + +func Test_repeatedStringMatch(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, repeatedStringMatch(tc.a, tc.b), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + repeatedStringMatch(tc.a, tc.b) + } + } +} diff --git a/Algorithms/0687.longest-univalue-path/README.md b/Algorithms/0687.longest-univalue-path/README.md new file mode 100755 index 000000000..a314066e1 --- /dev/null +++ b/Algorithms/0687.longest-univalue-path/README.md @@ -0,0 +1,45 @@ +# [687. Longest Univalue Path](https://leetcode.com/problems/longest-univalue-path/) + +## 题目 + +Given a binary tree, find the length of the longest path where each node in the path has the same value. This path may or may not pass through the root. + +Note: The length of path between two nodes is represented by the number of edges between them. + +Example 1: + +```text +Input: + + 5 + / \ + 4 5 + / \ \ + 1 1 5 +Output: + +2 +``` + +Example 2: + +```text +Input: + + 1 + / \ + 4 5 + / \ \ + 4 4 5 +Output: + +2 +``` + +Note: The given binary tree has not more than 10000 nodes. The height of the tree is not more than 1000. + + + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0687.longest-univalue-path/longest-univalue-path.go b/Algorithms/0687.longest-univalue-path/longest-univalue-path.go new file mode 100755 index 000000000..23cb61df9 --- /dev/null +++ b/Algorithms/0687.longest-univalue-path/longest-univalue-path.go @@ -0,0 +1,49 @@ +package Problem0687 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" +) + +type TreeNode = kit.TreeNode + +func longestUnivaluePath(root *TreeNode) int { + maxLen := 0 + helper(root, &maxLen) + return maxLen +} + +// 返回从 root 出发拥有相同 Val 值的线路上的 edge 数量 +func helper(n *TreeNode, maxLen *int) int { + if n == nil { + return 0 + } + + l := helper(n.Left, maxLen) + r := helper(n.Right, maxLen) + res := 0 + + // 左侧单边的最长距离 + if n.Left != nil && n.Val == n.Left.Val { + *maxLen = max(*maxLen, l+1) + res = max(res, l+1) + } + // 右侧单边的最长距离 + if n.Right != nil && n.Val == n.Right.Val { + *maxLen = max(*maxLen, r+1) + res = max(res, r+1) + } + // 通过根节点的最长边 + if n.Left != nil && n.Val == n.Left.Val && + n.Right != nil && n.Val == n.Right.Val { + *maxLen = max(*maxLen, l+r+2) + } + + return res +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} diff --git a/Algorithms/0687.longest-univalue-path/longest-univalue-path_test.go b/Algorithms/0687.longest-univalue-path/longest-univalue-path_test.go new file mode 100755 index 000000000..a0b743bb8 --- /dev/null +++ b/Algorithms/0687.longest-univalue-path/longest-univalue-path_test.go @@ -0,0 +1,54 @@ +package Problem0687 + +import ( + "fmt" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + "github.com/stretchr/testify/assert" +) + +const null = -1 << 63 + +// tcs is testcase slice +var tcs = []struct { + ints []int + ans int +}{ + + { + []int{}, + 0, + }, + + { + []int{1, 4, 5, 4, 4, null, 5}, + 2, + }, + + { + []int{5, 4, 5, 1, 1, null, 5}, + 2, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + root := kit.Ints2TreeNode(tc.ints) + ast.Equal(tc.ans, longestUnivaluePath(root), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + root := kit.Ints2TreeNode(tc.ints) + longestUnivaluePath(root) + } + } +} diff --git a/Algorithms/0688.knight-probability-in-chessboard/README.md b/Algorithms/0688.knight-probability-in-chessboard/README.md new file mode 100755 index 000000000..4d92960e6 --- /dev/null +++ b/Algorithms/0688.knight-probability-in-chessboard/README.md @@ -0,0 +1,31 @@ +# [688. Knight Probability in Chessboard](https://leetcode.com/problems/knight-probability-in-chessboard/) + +## 题目 + +On an NxN chessboard, a knight starts at the r-th row and c-th column and attempts to make exactly K moves. The rows and columns are 0 indexed, so the top-left square is (0, 0), and the bottom-right square is (N-1, N-1). + +A chess knight has 8 possible moves it can make, as illustrated below. Each move is two squares in a cardinal direction, then one square in an orthogonal direction. + +![](https://leetcode.com/static/images/problemset/knight.png) + +Each time the knight is to move, it chooses one of eight possible moves uniformly at random (even if the piece would go off the chessboard) and moves there. + +The knight continues moving until it has made exactly K moves or has moved off the chessboard. Return the probability that the knight remains on the board after it has stopped moving. + +Example: + +```text +Input: 3, 2, 0, 0 +Output: 0.0625 +Explanation: There are two moves (to (1,2), (2,1)) that will keep the knight on the board. From each of those positions, there are also two moves that will keep the knight on the board. The total probability the knight stays on the board is 0.0625. +``` + +Note: + +1. N will be between 1 and 25. +1. K will be between 0 and 100. +1. The knight always initially starts on the board. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0688.knight-probability-in-chessboard/knight-probability-in-chessboard.go b/Algorithms/0688.knight-probability-in-chessboard/knight-probability-in-chessboard.go new file mode 100755 index 000000000..0abbc541f --- /dev/null +++ b/Algorithms/0688.knight-probability-in-chessboard/knight-probability-in-chessboard.go @@ -0,0 +1,48 @@ +package Problem0688 + +import ( + "math" +) + +var dx = []int{-2, -2, -1, 1, 2, 2, 1, -1} +var dy = []int{-1, 1, -2, -2, 1, -1, 2, 2} + +func knightProbability(N int, K int, r int, c int) float64 { + // 为了快速创建 pre 变量,使用数组,而不是切片 + // pre[i][j] = k 表示 + // 在某一步的时候,棋盘上的 (i,j) 位置,会有 k 个棋子落在此位置上 + pre := [25][25]float64{} + pre[r][c] = 1 + + for k := 0; k < K; k++ { + // 按照规则移动棋子后 + // next 记录了各个位置上可能落下的棋子数 + next := [25][25]float64{} + + for i := 0; i < N; i++ { + for j := 0; j < N; j++ { + if pre[i][j] == 0 { + continue + } + for m := 0; m < 8; m++ { + x := dx[m] + i + y := dy[m] + j + if 0 <= x && x < N && 0 <= y && y < N { + next[x][y] += pre[i][j] + } + } + } + } + + pre = next + } + + count := 0. + for i := 0; i < N; i++ { + for j := 0; j < N; j++ { + count += pre[i][j] + } + } + + return float64(count) / math.Pow(8., float64(K)) +} diff --git a/Algorithms/0688.knight-probability-in-chessboard/knight-probability-in-chessboard_test.go b/Algorithms/0688.knight-probability-in-chessboard/knight-probability-in-chessboard_test.go new file mode 100755 index 000000000..94cdc3d57 --- /dev/null +++ b/Algorithms/0688.knight-probability-in-chessboard/knight-probability-in-chessboard_test.go @@ -0,0 +1,49 @@ +package Problem0688 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + n, k, r, c int + ans float64 +}{ + + { + 8, 30, 6, 4, + 0.00019, + }, + + { + 3, 1, 1, 1, + 0.0, + }, + + { + 3, 2, 0, 0, + 0.0625, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.InDelta(tc.ans, knightProbability(tc.n, tc.k, tc.r, tc.c), 0.000001, "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + knightProbability(tc.n, tc.k, tc.r, tc.c) + } + } +} diff --git a/Algorithms/0689.maximum-sum-of-3-non-overlapping-subarrays/README.md b/Algorithms/0689.maximum-sum-of-3-non-overlapping-subarrays/README.md new file mode 100755 index 000000000..cbf4af933 --- /dev/null +++ b/Algorithms/0689.maximum-sum-of-3-non-overlapping-subarrays/README.md @@ -0,0 +1,28 @@ +# [689. Maximum Sum of 3 Non-Overlapping Subarrays](https://leetcode.com/problems/maximum-sum-of-3-non-overlapping-subarrays/) + +## 题目 + +In a given array nums of positive integers, find three non-overlapping subarrays with maximum sum. + +Each subarray will be of size k, and we want to maximize the sum of all 3*k entries. + +Return the result as a list of indices representing the starting position of each interval (0-indexed). If there are multiple answers, return the lexicographically smallest one. + +Example: + +```text +Input: [1,2,1,2,6,7,5,1], 2 +Output: [0, 3, 5] +Explanation: Subarrays [1, 2], [2, 6], [7, 5] correspond to the starting indices [0, 3, 5]. +We could have also taken [2, 1], but an answer of [1, 3, 5] would be lexicographically larger. +``` + +Note: + +1. nums.length will be between 1 and 20000. +1. nums[i] will be between 1 and 65535. +1. k will be between 1 and floor(nums.length / 3). + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0689.maximum-sum-of-3-non-overlapping-subarrays/maximum-sum-of-3-non-overlapping-subarrays.go b/Algorithms/0689.maximum-sum-of-3-non-overlapping-subarrays/maximum-sum-of-3-non-overlapping-subarrays.go new file mode 100755 index 000000000..8b1d1f098 --- /dev/null +++ b/Algorithms/0689.maximum-sum-of-3-non-overlapping-subarrays/maximum-sum-of-3-non-overlapping-subarrays.go @@ -0,0 +1,48 @@ +package Problem0689 + +func maxSumOfThreeSubarrays(nums []int, k int) []int { + n := len(nums) - k + 1 + + // sum[i] = sum(nums[i:i+k]) + sum := make([]int, n) + sumK := 0 + for i := 0; i < len(nums); i++ { + sumK += nums[i] + if i >= k { + sumK -= nums[i-k] + } + if i >= k-1 { + sum[i-k+1] = sumK + } + } + + // left[i] == j 表示,在 sum[:i+1] 中,最大值的索引号为 j + left := make([]int, n) + indexOfMax := 0 + for i := 0; i < n; i++ { + if sum[indexOfMax] < sum[i] { + indexOfMax = i + } + left[i] = indexOfMax + } + + indexOfMax = n - 1 + // right[i] == j 表示,在 sum[i:] 中,最大值的索引号为 j + right := make([]int, n) + for i := n - 1; i >= 0; i-- { + if sum[indexOfMax] < sum[i] { + indexOfMax = i + } + right[i] = indexOfMax + } + + a := []int{0, k, k + k} + for y := k ; y < n-k; y++ { + x, z := left[y-k], right[y+k] + if sum[a[0]]+sum[a[1]]+sum[a[2]] < sum[x]+sum[y]+sum[z] { + a[0], a[1], a[2] = x, y, z + } + } + + return a +} diff --git a/Algorithms/0689.maximum-sum-of-3-non-overlapping-subarrays/maximum-sum-of-3-non-overlapping-subarrays_test.go b/Algorithms/0689.maximum-sum-of-3-non-overlapping-subarrays/maximum-sum-of-3-non-overlapping-subarrays_test.go new file mode 100755 index 000000000..fe4547dc0 --- /dev/null +++ b/Algorithms/0689.maximum-sum-of-3-non-overlapping-subarrays/maximum-sum-of-3-non-overlapping-subarrays_test.go @@ -0,0 +1,47 @@ +package Problem0689 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + k int + ans []int +}{ + + { + []int{17, 7, 19, 11, 1, 19, 17, 6, 13, 18, 2, 7, 12, 16, 16, 18, 9, 3, 19, 5}, + 6, + []int{0, 6, 13}, + }, + + { + []int{1, 2, 1, 2, 6, 7, 5, 1}, + 2, + []int{0, 3, 5}, + }, + + // 可以有多个 testcase +} + +func Test_maxSumOfThreeSubarrays(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, maxSumOfThreeSubarrays(tc.nums, tc.k), "输入:%v", tc) + } +} + +func Benchmark_maxSumOfThreeSubarrays(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + maxSumOfThreeSubarrays(tc.nums, tc.k) + } + } +} diff --git a/Algorithms/0691.stickers-to-spell-word/README.md b/Algorithms/0691.stickers-to-spell-word/README.md new file mode 100755 index 000000000..2cfb60f1f --- /dev/null +++ b/Algorithms/0691.stickers-to-spell-word/README.md @@ -0,0 +1,45 @@ +# [691. Stickers to Spell Word](https://leetcode.com/problems/stickers-to-spell-word/) + +## 题目 + +We are given N different types of stickers. Each sticker has a lowercase English word on it. + +You would like to spell out the given target string by cutting individual letters from your collection of stickers and rearranging them. + +You can use each sticker more than once if you want, and you have infinite quantities of each sticker. + +What is the minimum number of stickers that you need to spell out the target? If the task is impossible, return -1. + +Example 1: + +```text +Input:["with", "example", "science"], "thehat" + +Output:3 + +Explanation:We can use 2 "with" stickers, and 1 "example" sticker. +After cutting and rearrange the letters of those stickers, we can form the target "thehat". +Also, this is the minimum number of stickers necessary to form the target string. +``` + +Example 2: + +```text +Input:["notice", "possible"], "basicbasic" + +Output:-1 + +Explanation:We can't form the target "basicbasic" from cutting letters from the given stickers. +``` + +Note: + +1. stickers has length in the range [1, 50]. +1. stickers consists of lowercase English words (without apostrophes). +1. target has length in the range [1, 15], and consists of lowercase English letters. +1. In all test cases, all words were chosen randomly from the 1000 most common US English words, and the target was chosen as a concatenation of two random words. +1. The time limit may be more challenging than usual. It is expected that a 50 sticker test case can be solved within 35ms on average. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0691.stickers-to-spell-word/stickers-to-spell-word.go b/Algorithms/0691.stickers-to-spell-word/stickers-to-spell-word.go new file mode 100755 index 000000000..371333e11 --- /dev/null +++ b/Algorithms/0691.stickers-to-spell-word/stickers-to-spell-word.go @@ -0,0 +1,78 @@ +package Problem0691 + +const intMax = 1<<63 - 1 + +func minStickers(stickers []string, target string) int { + size := len(stickers) + + // ss[i][j] == k 表示 stickers[i] 有 k 个字母('a'+j) + ss := make([][]int, size) + for i := range ss { + ss[i] = make([]int, 26) + for _, c := range stickers[i] { + ss[i][c-'a']++ + } + } + + // dp["abc"] == m 表示,最少需要 m 个 sticker,可以组成 "abc" + dp := make(map[string]int, size) + dp[""] = 0 + + helper(dp, ss, target) + + return dp[target] +} + +func helper(dp map[string]int, ss [][]int, target string) int { + // 如果曾经检查过 target ,直接返回答案 + if minimum, ok := dp[target]; ok { + return minimum + } + + // 获取 target 内各个字母的个数 + tar := make([]int, 26) + for _, c := range target { + tar[c-'a']++ + } + + res := intMax + + for _, s := range ss { + // 只有当 s 包含了 target 的首字母时 + // 才从 target 中减去 s + // 这样就确保了,每次递归时候,target 都在变小 + if s[target[0]-'a'] == 0 { + continue + } + + // t = target - s + t := make([]byte, 0, len(target)) + for i := 0; i < 26; i++ { + for j := tar[i] - s[i]; 0 < j; j-- { + t = append(t, byte('a'+i)) + } + } + + // 递归求解 t + temp := helper(dp, ss, string(t)) + if temp != -1 { + res = min(res, temp+1) + } + } + + // res 依然等于 intMax 说明无法组成 target + if res == intMax { + res = -1 + } + + dp[target] = res + + return res +} + +func min(a, b int) int { + if a < b { + return a + } + return b +} diff --git a/Algorithms/0691.stickers-to-spell-word/stickers-to-spell-word_test.go b/Algorithms/0691.stickers-to-spell-word/stickers-to-spell-word_test.go new file mode 100755 index 000000000..68c8bc902 --- /dev/null +++ b/Algorithms/0691.stickers-to-spell-word/stickers-to-spell-word_test.go @@ -0,0 +1,65 @@ +package Problem0691 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + stickers []string + target string + ans int +}{ + + { + []string{"thethat", "with", "example", "science"}, + "thehat", + 1, + }, + + { + []string{"t", "example", "science", "with"}, + "thehat", + 3, + }, + + { + []string{"example", "science", "with"}, + "thehat", + 3, + }, + + { + []string{"with", "example", "science"}, + "thehat", + 3, + }, + + { + []string{"notice", "possible"}, + "basicbasic", + -1, + }, + + // 可以有多个 testcase +} + +func Test_minStickers(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, minStickers(tc.stickers, tc.target), "输入:%v", tc) + } +} + +func Benchmark_minStickers(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + minStickers(tc.stickers, tc.target) + } + } +} diff --git a/Algorithms/0692.top-k-frequent-words/README.md b/Algorithms/0692.top-k-frequent-words/README.md new file mode 100755 index 000000000..d7289a731 --- /dev/null +++ b/Algorithms/0692.top-k-frequent-words/README.md @@ -0,0 +1,36 @@ +# [692. Top K Frequent Words](https://leetcode.com/problems/top-k-frequent-words/) + +## 题目 + +Given a non-empty list of words, return the k most frequent elements. + +Your answer should be sorted by frequency from highest to lowest. If two words have the same frequency, then the word with the lower alphabetical order comes first. + +Example 1: + +```text +Input: ["i", "love", "leetcode", "i", "love", "coding"], k = 2 +Output: ["i", "love"] +Explanation: "i" and "love" are the two most frequent words. Note that "i" comes before "love" due to a lower alphabetical order. +``` + +Example 2: + +```text +Input: ["the", "day", "is", "sunny", "the", "the", "the", "sunny", "is", "is"], k = 4 +Output: ["the", "is", "sunny", "day"] +Explanation: "the", "is", "sunny" and "day" are the four most frequent words, with the number of occurrence being 4, 3, 2 and 1 respectively. +``` + +Note: + +1. You may assume k is always valid, 1 ≤ k ≤ number of unique elements. +1. Input words contain only lowercase letters. + +Follow up: + +1. Try to solve it in O(n log k) time and O(n) extra space. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0692.top-k-frequent-words/top-k-frequent-words.go b/Algorithms/0692.top-k-frequent-words/top-k-frequent-words.go new file mode 100755 index 000000000..14dbaaa51 --- /dev/null +++ b/Algorithms/0692.top-k-frequent-words/top-k-frequent-words.go @@ -0,0 +1,49 @@ +package Problem0692 + +import "sort" + +func topKFrequent(words []string, k int) []string { + count := make(map[string]int, len(words)) + for _, w := range words { + count[w]++ + } + + fw := make(freWords, 0, len(count)) + for w, c := range count { + fw = append(fw, &entry{ + word: w, + frequence: c, + }) + } + + sort.Sort(fw) + + res := make([]string, k) + for i := 0; i < k; i++ { + res[i] = fw[i].word + } + + return res +} + +// entry 是 priorityQueue 中的元素 +type entry struct { + word string + frequence int +} + +// PQ implements heap.Interface and holds entries. +type freWords []*entry + +func (f freWords) Len() int { return len(f) } + +func (f freWords) Less(i, j int) bool { + if f[i].frequence == f[j].frequence { + return f[i].word < f[j].word + } + return f[i].frequence > f[j].frequence +} + +func (f freWords) Swap(i, j int) { + f[i], f[j] = f[j], f[i] +} diff --git a/Algorithms/0692.top-k-frequent-words/top-k-frequent-words_test.go b/Algorithms/0692.top-k-frequent-words/top-k-frequent-words_test.go new file mode 100755 index 000000000..262da2fcd --- /dev/null +++ b/Algorithms/0692.top-k-frequent-words/top-k-frequent-words_test.go @@ -0,0 +1,47 @@ +package Problem0692 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + words []string + k int + ans []string +}{ + + { + []string{"i", "love", "leetcode", "i", "love", "coding"}, + 2, + []string{"i", "love"}, + }, + + { + []string{"the", "day", "is", "sunny", "the", "the", "the", "sunny", "is", "is"}, + 4, + []string{"the", "is", "sunny", "day"}, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, topKFrequent(tc.words, tc.k), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + topKFrequent(tc.words, tc.k) + } + } +} diff --git a/Algorithms/0693.binary-number-with-alternating-bits/README.md b/Algorithms/0693.binary-number-with-alternating-bits/README.md new file mode 100755 index 000000000..fd63a25e4 --- /dev/null +++ b/Algorithms/0693.binary-number-with-alternating-bits/README.md @@ -0,0 +1,45 @@ +# [693. Binary Number with Alternating Bits](https://leetcode.com/problems/binary-number-with-alternating-bits/) + +## 题目 + +Given a positive integer, check whether it has alternating bits: namely, if two adjacent bits will always have different values. + +Example 1: + +```text +Input: 5 +Output: True +Explanation: +The binary representation of 5 is: 101 +``` + +Example 2: + +```text +Input: 7 +Output: False +Explanation: +The binary representation of 7 is: 111. +``` + +Example 3: + +```text +Input: 11 +Output: False +Explanation: +The binary representation of 11 is: 1011. +``` + +Example 4: + +```text +Input: 10 +Output: True +Explanation: +The binary representation of 10 is: 1010. +``` + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0693.binary-number-with-alternating-bits/binary-number-with-alternating-bits.go b/Algorithms/0693.binary-number-with-alternating-bits/binary-number-with-alternating-bits.go new file mode 100755 index 000000000..8ef896e97 --- /dev/null +++ b/Algorithms/0693.binary-number-with-alternating-bits/binary-number-with-alternating-bits.go @@ -0,0 +1,17 @@ +package Problem0693 + +func hasAlternatingBits(n int) bool { + std := n & 3 + if std != 1 && std != 2 { + return false + } + + for n > 0 { + if n&3 != std { + return false + } + n >>= 2 + } + + return true +} diff --git a/Algorithms/0693.binary-number-with-alternating-bits/binary-number-with-alternating-bits_test.go b/Algorithms/0693.binary-number-with-alternating-bits/binary-number-with-alternating-bits_test.go new file mode 100755 index 000000000..56de07a9a --- /dev/null +++ b/Algorithms/0693.binary-number-with-alternating-bits/binary-number-with-alternating-bits_test.go @@ -0,0 +1,64 @@ +package Problem0693 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + n int + ans bool +}{ + + { + 5, + true, + }, + + { + 3, + false, + }, + + { + 213, + false, + }, + + { + 7, + false, + }, + + { + 11, + false, + }, + + { + 10, + true, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, hasAlternatingBits(tc.n), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + hasAlternatingBits(tc.n) + } + } +} diff --git a/Algorithms/0695.max-area-of-island/README.md b/Algorithms/0695.max-area-of-island/README.md new file mode 100755 index 000000000..32317cceb --- /dev/null +++ b/Algorithms/0695.max-area-of-island/README.md @@ -0,0 +1,34 @@ +# [695. Max Area of Island](https://leetcode.com/problems/max-area-of-island/) + +## 题目 + +Given a non-empty 2D array grid of 0's and 1's, an island is a group of 1's (representing land) connected 4-directionally (horizontal or vertical.) You may assume all four edges of the grid are surrounded by water. + +Find the maximum area of an island in the given 2D array. (If there is no island, the maximum area is 0.) + +Example 1: + +```text +[[0,0,1,0,0,0,0,1,0,0,0,0,0], + [0,0,0,0,0,0,0,1,1,1,0,0,0], + [0,1,1,0,1,0,0,0,0,0,0,0,0], + [0,1,0,0,1,1,0,0,1,0,1,0,0], + [0,1,0,0,1,1,0,0,1,1,1,0,0], + [0,0,0,0,0,0,0,0,0,0,1,0,0], + [0,0,0,0,0,0,0,1,1,1,0,0,0], + [0,0,0,0,0,0,0,1,1,0,0,0,0]] +Given the above grid, return 6. Note the answer is not 11, because the island must be connected 4-directionally. +``` + +Example 2: + +```text +[[0,0,0,0,0,0,0,0]] +Given the above grid, return 0. +``` + +Note: The length of each dimension in the given grid does not exceed 50. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0695.max-area-of-island/max-area-of-island.go b/Algorithms/0695.max-area-of-island/max-area-of-island.go new file mode 100755 index 000000000..26965fb0f --- /dev/null +++ b/Algorithms/0695.max-area-of-island/max-area-of-island.go @@ -0,0 +1,46 @@ +package Problem0695 + +func maxAreaOfIsland(grid [][]int) int { + maxArea := 0 + for i := range grid { + for j := range grid[i] { + maxArea = max(maxArea, getArea(grid, i, j)) + } + } + return maxArea +} + +// 返回与 [i,j] 处联通的岛的面积 +func getArea(grid [][]int, i, j int) int { + if grid[i][j] == 0 { + return 0 + } + + grid[i][j] = 0 + area := 1 + + if i != 0 { + area += getArea(grid, i-1, j) + } + + if j != 0 { + area += getArea(grid, i, j-1) + } + + if i != len(grid)-1 { + area += getArea(grid, i+1, j) + } + + if j != len(grid[0])-1 { + area += getArea(grid, i, j+1) + } + + return area +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} diff --git a/Algorithms/0695.max-area-of-island/max-area-of-island_test.go b/Algorithms/0695.max-area-of-island/max-area-of-island_test.go new file mode 100755 index 000000000..f4736a7f6 --- /dev/null +++ b/Algorithms/0695.max-area-of-island/max-area-of-island_test.go @@ -0,0 +1,72 @@ +package Problem0695 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + grid [][]int + ans int +}{ + + { + [][]int{ + {1, 1, 0, 0, 0}, + {1, 1, 0, 0, 0}, + {0, 0, 0, 1, 1}, + {0, 0, 0, 1, 1}, + }, + 4, + }, + + { + [][]int{ + {1}, + }, + 1, + }, + + { + [][]int{ + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + }, + 0, + }, + + { + [][]int{ + {0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0}, + {0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0}, + {0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0}, + {0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0}, + }, + 6, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, maxAreaOfIsland(tc.grid), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + maxAreaOfIsland(tc.grid) + } + } +} diff --git a/Algorithms/0696.count-binary-substrings/README.md b/Algorithms/0696.count-binary-substrings/README.md new file mode 100755 index 000000000..4bd0c019a --- /dev/null +++ b/Algorithms/0696.count-binary-substrings/README.md @@ -0,0 +1,36 @@ +# [696. Count Binary Substrings](https://leetcode.com/problems/count-binary-substrings/) + +## 题目 + +Give a string s, count the number of non-empty (contiguous) substrings that have the same number of 0's and 1's, and all the 0's and all the 1's in these substrings are grouped consecutively. + +Substrings that occur multiple times are counted the number of times they occur. + +Example 1: + +```text +Input: "00110011" +Output: 6 +Explanation: There are 6 substrings that have equal number of consecutive 1's and 0's: "0011", "01", "1100", "10", "0011", and "01". + +Notice that some of these substrings repeat and are counted the number of times they occur. + +Also, "00110011" is not a valid substring because all the 0's (and 1's) are not grouped together. +``` + +Example 2: + +```text +Input: "10101" +Output: 4 +Explanation: There are 4 substrings: "10", "01", "10", "01" that have equal number of consecutive 1's and 0's. +``` + +Note: + +- s.length will be between 1 and 50,000. +- s will only consist of "0" or "1" characters. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0696.count-binary-substrings/count-binary-substrings.go b/Algorithms/0696.count-binary-substrings/count-binary-substrings.go new file mode 100755 index 000000000..8aa360720 --- /dev/null +++ b/Algorithms/0696.count-binary-substrings/count-binary-substrings.go @@ -0,0 +1,35 @@ +package Problem0696 + +func countBinarySubstrings(s string) int { + count, countZero, countOne := 0, 0, 0 + prev := rune(s[0]) + + for _, r := range s { + if prev == r { + if r == '0' { + countZero++ + } else { + countOne++ + } + } else { + // 较少的数字决定了符合题意的子字符串个数 + // 例如 "00011" 符合题意的子字符串为 "0011", "01",其中第一个 "0" 是无用的 + count += min(countZero, countOne) + if r == '0' { + countZero = 1 + } else { + countOne = 1 + } + } + prev = r + } + + return count + min(countZero, countOne) +} + +func min(a, b int) int { + if a < b { + return a + } + return b +} diff --git a/Algorithms/0696.count-binary-substrings/count-binary-substrings_test.go b/Algorithms/0696.count-binary-substrings/count-binary-substrings_test.go new file mode 100755 index 000000000..665cd19c6 --- /dev/null +++ b/Algorithms/0696.count-binary-substrings/count-binary-substrings_test.go @@ -0,0 +1,49 @@ +package Problem0696 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + ans int +}{ + + { + "00110011", + 6, + }, + + { + "00110", + 3, + }, + + { + "10101", + 4, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, countBinarySubstrings(tc.s), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + countBinarySubstrings(tc.s) + } + } +} diff --git a/Algorithms/0697.degree-of-an-array/README.md b/Algorithms/0697.degree-of-an-array/README.md new file mode 100755 index 000000000..3718294d8 --- /dev/null +++ b/Algorithms/0697.degree-of-an-array/README.md @@ -0,0 +1,35 @@ +# [697. Degree of an Array](https://leetcode.com/problems/degree-of-an-array/) + +## 题目 + +Given a non-empty array of non-negative integers nums, the degree of this array is defined as the maximum frequency of any one of its elements. + +Your task is to find the smallest possible length of a (contiguous) subarray of nums, that has the same degree as nums. + +Example 1: + +```text +Input: [1, 2, 2, 3, 1] +Output: 2 +Explanation: +The input array has a degree of 2 because both elements 1 and 2 appear twice. +Of the subarrays that have the same degree: +[1, 2, 2, 3, 1], [1, 2, 2, 3], [2, 2, 3, 1], [1, 2, 2], [2, 2, 3], [2, 2] +The shortest length is 2. So return 2. +``` + +Example 2: + +```text +Input: [1,2,2,3,1,4,2] +Output: 6 +``` + +Note: + +- nums.length will be between 1 and 50,000. +- nums[i] will be an integer between 0 and 49,999. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0697.degree-of-an-array/degree-of-an-array.go b/Algorithms/0697.degree-of-an-array/degree-of-an-array.go new file mode 100755 index 000000000..e11447cf0 --- /dev/null +++ b/Algorithms/0697.degree-of-an-array/degree-of-an-array.go @@ -0,0 +1,31 @@ +package Problem0697 + +func findShortestSubArray(nums []int) int { + size := len(nums) + if size < 2 { + return size + } + + first := make(map[int]int, size) + count := make(map[int]int, size) + maxCount := 1 + minLen := size + for i, n := range nums { + count[n]++ + if count[n] == 1 { + first[n] = i + } else { + l := i - first[n] + 1 + if maxCount < count[n] || + (maxCount == count[n] && minLen > l) { + maxCount = count[n] + minLen = l + } + } + } + + if len(count) == size { + return 1 + } + return minLen +} diff --git a/Algorithms/0697.degree-of-an-array/degree-of-an-array_test.go b/Algorithms/0697.degree-of-an-array/degree-of-an-array_test.go new file mode 100755 index 000000000..be4247a5e --- /dev/null +++ b/Algorithms/0697.degree-of-an-array/degree-of-an-array_test.go @@ -0,0 +1,54 @@ +package Problem0697 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans int +}{ + + { + []int{4}, + 1, + }, + + { + []int{1, 2, 3, 4}, + 1, + }, + + { + []int{1, 2, 2, 3, 1}, + 2, + }, + + { + []int{1, 2, 2, 3, 1, 4, 2}, + 6, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findShortestSubArray(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findShortestSubArray(tc.nums) + } + } +} diff --git a/Algorithms/0698.partition-to-k-equal-sum-subsets/README.md b/Algorithms/0698.partition-to-k-equal-sum-subsets/README.md new file mode 100755 index 000000000..a29a7f069 --- /dev/null +++ b/Algorithms/0698.partition-to-k-equal-sum-subsets/README.md @@ -0,0 +1,22 @@ +# [698. Partition to K Equal Sum Subsets](https://leetcode.com/problems/partition-to-k-equal-sum-subsets/) + +## 题目 + +Given an array of integers nums and a positive integer k, find whether it's possible to divide this array into k non-empty subsets whose sums are all equal. + +Example 1: + +```text +Input: nums = [4, 3, 2, 3, 5, 2, 1], k = 4 +Output: True +Explanation: It's possible to divide it into 4 subsets (5), (1, 4), (2,3), (2,3) with equal sums. +``` + +Note: + +1. 1 <= k <= len(nums) <= 16. +1. 0 < nums[i] < 10000. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0698.partition-to-k-equal-sum-subsets/partition-to-k-equal-sum-subsets.go b/Algorithms/0698.partition-to-k-equal-sum-subsets/partition-to-k-equal-sum-subsets.go new file mode 100755 index 000000000..0f513ad1e --- /dev/null +++ b/Algorithms/0698.partition-to-k-equal-sum-subsets/partition-to-k-equal-sum-subsets.go @@ -0,0 +1,57 @@ +package Problem0698 + +import ( + "sort" +) + +func canPartitionKSubsets(nums []int, k int) bool { + size := len(nums) + sum := 0 + max := nums[0] + for _, n := range nums { + sum += n + if max < n { + max = n + } + } + + if sum%k != 0 || sum/k < max { + // 提前结束 + return false + } + + // nums 降序排列可以加快 dfs 的速度 + sort.Sort(sort.Reverse(sort.IntSlice(nums))) + + // isUsed[i] == true 表示 nums[i] 已经被归类到某个小组,无法再使用了 + isUsed := make([]bool, size) + + return dfs(nums, isUsed, k, 0, 0, sum/k) +} + +func dfs(nums []int, isUsed []bool, k, start, sum, target int) bool { + if k == 1 { + // 已经找到了 k-1 组解 + // 剩下的自然就是第 k 组解 + return true + } + + if sum == target { + // 找到第 k 组的一种解 + // 开始搜索 k-1 组的解 + return dfs(nums, isUsed, k-1, 0, 0, target) + } + + for i := start; i < len(nums); i++ { + if !isUsed[i] && sum+nums[i] <= target { + isUsed[i] = true + // 试着 sum+nums[i] + if dfs(nums, isUsed, k, i+1, sum+nums[i], target) { + return true + } + isUsed[i] = false + } + } + + return false +} diff --git a/Algorithms/0698.partition-to-k-equal-sum-subsets/partition-to-k-equal-sum-subsets_test.go b/Algorithms/0698.partition-to-k-equal-sum-subsets/partition-to-k-equal-sum-subsets_test.go new file mode 100755 index 000000000..d8a0329ac --- /dev/null +++ b/Algorithms/0698.partition-to-k-equal-sum-subsets/partition-to-k-equal-sum-subsets_test.go @@ -0,0 +1,53 @@ +package Problem0698 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + k int + ans bool +}{ + + { + []int{5, 4, 4, 4, 3}, + 4, + false, + }, + + { + []int{4, 1, 1, 1}, + 4, + false, + }, + + { + []int{4, 3, 2, 3, 5, 2, 1}, + 4, + true, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, canPartitionKSubsets(tc.nums, tc.k), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + canPartitionKSubsets(tc.nums, tc.k) + } + } +} diff --git a/Algorithms/0699.falling-squares/README.md b/Algorithms/0699.falling-squares/README.md new file mode 100755 index 000000000..3d17cf037 --- /dev/null +++ b/Algorithms/0699.falling-squares/README.md @@ -0,0 +1,64 @@ +# [699. Falling Squares](https://leetcode.com/problems/falling-squares/) + +## 题目 + +On an infinite number line (x-axis), we drop given squares in the order they are given. +The i-th square dropped (positions[i] = (left, side_length)) is a square with the left-most point being positions[i][0] and sidelength positions[i][1]. +The square is dropped with the bottom edge parallel to the number line, and from a higher height than all currently landed squares. We wait for each square to stick before dropping the next. +The squares are infinitely sticky on their bottom edge, and will remain fixed to any positive length surface they touch (either the number line or another square). Squares dropped adjacent to each other will not stick together prematurely. + +Return a list ans of heights. Each height ans[i] represents the current highest height of any square we have dropped, after dropping squares represented by positions[0], positions[1], ..., positions[i]. + +Example 1: + +```text +Input: [[1, 2], [2, 3], [6, 1]] +Output: [2, 5, 5] +Explanation: + +After the first drop of positions[0] = [1, 2]: +_aa +_aa +------- +The maximum height of any square is 2. + +After the second drop of positions[1] = [2, 3]: +__aaa +__aaa +__aaa +_aa__ +_aa__ +-------------- +The maximum height of any square is 5. +The larger square stays on top of the smaller square despite where its center +of gravity is, because squares are infinitely sticky on their bottom edge. + +After the third drop of positions[1] = [6, 1]: +__aaa +__aaa +__aaa +_aa +_aa___a +-------------- +The maximum height of any square is still 5. + +Thus, we return an answer of [2, 5, 5]. +``` + +Example 2: + +```text +Input: [[100, 100], [200, 100]] +Output: [100, 100] +Explanation: Adjacent squares don't get stuck prematurely - only their bottom edge can stick to surfaces. +``` + +Note: + +- 1 <= positions.length <= 1000. +- 1 <= positions[i][0] <= 10^8. +- 1 <= positions[i][1] <= 10^6. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0699.falling-squares/falling-squares.go b/Algorithms/0699.falling-squares/falling-squares.go new file mode 100755 index 000000000..0cf673ddd --- /dev/null +++ b/Algorithms/0699.falling-squares/falling-squares.go @@ -0,0 +1,137 @@ +package Problem0699 + +import "container/heap" + +func fallingSquares(positions [][]int) []int { + res := make([]int, 0, len(positions)) + pq := make(PQ, 0, len(positions)) + + for i := 0; i < len(positions); i++ { + sp := &segment{ + left: positions[i][0], + right: positions[i][0] + positions[i][1], + height: positions[i][1], + } + + height := 0 + removes := make([]*segment, 0, len(pq)) + + // TODO: 添加一个 []*segment 变量,按宽度维护好 + // 避免,遍历 pq + // + // l, r := getLeft(ss, sp), getRight(ss, sp) + // for j := l; j <= r; j++ { + // } + + for j := 0; j < len(pq); j++ { + if pq[j].right <= sp.left || sp.right <= pq[j].left { + continue + } + + height = max(height, pq[j].height) + + if sp.left <= pq[j].left && pq[j].right <= sp.right { + removes = append(removes, pq[j]) + } + + if pq[j].left < sp.left && sp.right < pq[j].right { + heap.Push(&pq, &segment{ + left: sp.right, + right: pq[j].right, + height: pq[j].height, + }) + pq[j].right = sp.left + break + } + + if pq[j].left < sp.left && sp.left < pq[j].right && pq[j].right <= sp.right { + pq[j].right = sp.left + } + + if sp.left <= pq[j].left && pq[j].left < sp.right && sp.right < pq[j].right { + pq[j].left = sp.right + } + } + + for j := 0; j < len(removes); j++ { + heap.Remove(&pq, removes[j].index) + } + + sp.height += height + heap.Push(&pq, sp) + res = append(res, pq[0].height) + } + + return res +} + +// entry 是 priorityQueue 中的元素 +type segment struct { + left, right int + height int + // index 是 entry 在 heap 中的索引号 + index int +} + +// PQ implements heap.Interface and holds entries. +type PQ []*segment + +func (pq PQ) Len() int { return len(pq) } + +func (pq PQ) Less(i, j int) bool { + return pq[i].height > pq[j].height +} + +func (pq PQ) Swap(i, j int) { + pq[i], pq[j] = pq[j], pq[i] + pq[i].index = i + pq[j].index = j +} + +// Push 往 pq 中放 entry +func (pq *PQ) Push(x interface{}) { + temp := x.(*segment) + temp.index = len(*pq) + *pq = append(*pq, temp) +} + +// Pop 从 pq 中取出最优先的 entry +func (pq *PQ) Pop() interface{} { + temp := (*pq)[len(*pq)-1] + temp.index = -1 // for safety + *pq = (*pq)[0 : len(*pq)-1] + return temp +} + +// func getLeft(ss []*segment, s *segment) int { +// lo, hi := 0, len(ss)-1 +// for lo < hi { +// mid := lo + (hi-lo)/2 +// if ss[mid].right <= s.left { +// lo = mid + 1 +// } else { +// hi = mid - 1 +// } +// } +// return lo +// } + +// func getRight(ss []*segment, s *segment) int { +// lo, hi := 0, len(ss)-1 +// for lo < hi { +// mid := lo + (hi-lo)/2 +// if s.right <= ss[mid].left { +// hi = mid - 1 +// } else { +// lo = mid + 1 +// } +// } +// return hi +// } + +func max(a, b int) int { + if a > b { + return a + } + return b +} diff --git a/Algorithms/0699.falling-squares/falling-squares_test.go b/Algorithms/0699.falling-squares/falling-squares_test.go new file mode 100755 index 000000000..540038c2c --- /dev/null +++ b/Algorithms/0699.falling-squares/falling-squares_test.go @@ -0,0 +1,59 @@ +package Problem0699 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + positions [][]int + ans []int +}{ + + { + [][]int{{33, 34}, {47, 62}, {70, 16}, {90, 79}, {73, 86}, {55, 6}, {74, 2}, {40, 95}, {52, 16}, {50, 33}}, + []int{34, 96, 112, 175, 261, 261, 263, 358, 374, 407}, + }, + + { + [][]int{{1, 2}, {2, 3}, {6, 1}}, + []int{2, 5, 5}, + }, + + { + [][]int{{100, 100}, {200, 100}}, + []int{100, 100}, + }, + + { + [][]int{{1, 2}, {3, 3}, {2, 3}, {6, 1}}, + []int{2, 3, 6, 6}, + }, + + { + [][]int{{1, 2}, {4, 3}, {2, 4}, {6, 1}}, + []int{2, 3, 7, 7}, + }, + + // 可以有多个 testcase +} + +func Test_fallingSquares(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, fallingSquares(tc.positions), "输入:%v", tc) + } +} + +func Benchmark_fallingSquares(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + fallingSquares(tc.positions) + } + } +} diff --git a/Algorithms/0712.minimum-ascii-delete-sum-for-two-strings/README.md b/Algorithms/0712.minimum-ascii-delete-sum-for-two-strings/README.md new file mode 100755 index 000000000..e84a2d558 --- /dev/null +++ b/Algorithms/0712.minimum-ascii-delete-sum-for-two-strings/README.md @@ -0,0 +1,35 @@ +# [712. Minimum ASCII Delete Sum for Two Strings](https://leetcode.com/problems/minimum-ascii-delete-sum-for-two-strings/) + +## 题目 + +Given two strings s1, s2, find the lowest ASCII sum of deleted characters to make two strings equal. + +Example 1: + +```text +Input: s1 = "sea", s2 = "eat" +Output: 231 +Explanation: Deleting "s" from "sea" adds the ASCII value of "s" (115) to the sum. +Deleting "t" from "eat" adds 116 to the sum. +At the end, both strings are equal, and 115 + 116 = 231 is the minimum sum possible to achieve this. +``` + +Example 2: + +```text +Input: s1 = "delete", s2 = "leet" +Output: 403 +Explanation: Deleting "dee" from "delete" to turn the string into "let", +adds 100[d]+101[e]+101[e] to the sum. Deleting "e" from "leet" adds 101[e] to the sum. +At the end, both strings are equal to "let", and the answer is 100+101+101+101 = 403. +If instead we turned both strings into "lee" or "eet", we would get answers of 433 or 417, which are higher. +``` + +Note: + +1. 0 < s1.length, s2.length <= 1000. +1. All elements of each string will have an ASCII value in [97, 122]. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0712.minimum-ascii-delete-sum-for-two-strings/minimum-ascii-delete-sum-for-two-strings.go b/Algorithms/0712.minimum-ascii-delete-sum-for-two-strings/minimum-ascii-delete-sum-for-two-strings.go new file mode 100755 index 000000000..3d215e62d --- /dev/null +++ b/Algorithms/0712.minimum-ascii-delete-sum-for-two-strings/minimum-ascii-delete-sum-for-two-strings.go @@ -0,0 +1,38 @@ +package Problem0712 + +func minimumDeleteSum(s1, s2 string) int { + n1, n2 := len(s1), len(s2) + + // dp[i][j] == miniumDeleteSum(s1[i:], s2[j:]) + dp := make([][]int, n1+1) + for i := range dp { + dp[i] = make([]int, n2+1) + } + + for i := n1 - 1; 0 <= i; i-- { + dp[i][n2] = dp[i+1][n2] + int(s1[i]) + } + + for j := n2 - 1; 0 <= j; j-- { + dp[n1][j] = dp[n1][j+1] + int(s2[j]) + } + + for i := n1 - 1; 0 <= i; i-- { + for j := n2 - 1; 0 <= j; j-- { + if s1[i] == s2[j] { + dp[i][j] = dp[i+1][j+1] + } else { + dp[i][j] = min(dp[i+1][j]+int(s1[i]), dp[i][j+1]+int(s2[j])) + } + } + } + + return dp[0][0] +} + +func min(a, b int) int { + if a < b { + return a + } + return b +} diff --git a/Algorithms/0712.minimum-ascii-delete-sum-for-two-strings/minimum-ascii-delete-sum-for-two-strings_test.go b/Algorithms/0712.minimum-ascii-delete-sum-for-two-strings/minimum-ascii-delete-sum-for-two-strings_test.go new file mode 100755 index 000000000..93b1a5198 --- /dev/null +++ b/Algorithms/0712.minimum-ascii-delete-sum-for-two-strings/minimum-ascii-delete-sum-for-two-strings_test.go @@ -0,0 +1,46 @@ +package Problem0712 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s1, s2 string + ans int +}{ + + { + "delete", + "leet", + 403, + }, + + { + "sea", + "eat", + 231, + }, + + // 可以有多个 testcase +} + +func Test_minimumDeleteSum(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, minimumDeleteSum(tc.s1, tc.s2), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + minimumDeleteSum(tc.s1, tc.s2) + } + } +} diff --git a/Algorithms/0713.subarray-product-less-than-k/README.md b/Algorithms/0713.subarray-product-less-than-k/README.md new file mode 100755 index 000000000..e8c9d2f01 --- /dev/null +++ b/Algorithms/0713.subarray-product-less-than-k/README.md @@ -0,0 +1,26 @@ +# [713. Subarray Product Less Than K](https://leetcode.com/problems/subarray-product-less-than-k/) + +## 题目 + +Your are given an array of positive integers nums. + +Count and print the number of (contiguous) subarrays where the product of all the elements in the subarray is less than k. + +Example 1: + +```text +Input: nums = [10, 5, 2, 6], k = 100 +Output: 8 +Explanation: The 8 subarrays that have product less than 100 are: [10], [5], [2], [6], [10, 5], [5, 2], [2, 6], [5, 2, 6]. +Note that [10, 5, 2] is not included as the product of 100 is not strictly less than k. +``` + +Note: + +1. 0 < nums.length <= 50000. +1. 0 < nums[i] < 1000. +1. 0 <= k < 10^6. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0713.subarray-product-less-than-k/subarray-product-less-than-k.go b/Algorithms/0713.subarray-product-less-than-k/subarray-product-less-than-k.go new file mode 100755 index 000000000..1e1f47155 --- /dev/null +++ b/Algorithms/0713.subarray-product-less-than-k/subarray-product-less-than-k.go @@ -0,0 +1,29 @@ +package Problem0713 + +func numSubarrayProductLessThanK(a []int, k int) int { + res := 0 + + n := len(a) + p := 1 + + j := 0 + for i := 0; i < n; i++ { + for j < n && p*a[j] < k { + p *= a[j] + j++ + } + + if i == j { + // 此时 a[i] > k + // 需要跳过 a[i] + // 由于 p 没有乘以 a[i] + // 所以,p 也不需要除以 a[i] + j++ + } else { + res += j - i + p /= a[i] + } + } + + return res +} diff --git a/Algorithms/0713.subarray-product-less-than-k/subarray-product-less-than-k_test.go b/Algorithms/0713.subarray-product-less-than-k/subarray-product-less-than-k_test.go new file mode 100755 index 000000000..1cb4d7342 --- /dev/null +++ b/Algorithms/0713.subarray-product-less-than-k/subarray-product-less-than-k_test.go @@ -0,0 +1,53 @@ +package Problem0713 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + k int + ans int +}{ + + { + []int{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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1, 1, 1, 1}, + 5, + 367968907, + }, + + { + []int{1, 2, 3}, + 0, + 0, + }, + + { + []int{10, 5, 2, 6}, + 100, + 8, + }, + + // 可以有多个 testcase +} + +func Test_numSubarrayProductLessThanK(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, numSubarrayProductLessThanK(tc.nums, tc.k), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + numSubarrayProductLessThanK(tc.nums, tc.k) + } + } +} diff --git a/Algorithms/0714.best-time-to-buy-and-sell-stock-with-transaction-fee/README.md b/Algorithms/0714.best-time-to-buy-and-sell-stock-with-transaction-fee/README.md new file mode 100755 index 000000000..7cc090500 --- /dev/null +++ b/Algorithms/0714.best-time-to-buy-and-sell-stock-with-transaction-fee/README.md @@ -0,0 +1,32 @@ +# [714. Best Time to Buy and Sell Stock with Transaction Fee](https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-transaction-fee/) + +## 题目 + +Your are given an array of integers prices, for which the i-th element is the price of a given stock on day i; and a non-negative integer fee representing a transaction fee. + +You may complete as many transactions as you like, but you need to pay the transaction fee for each transaction. You may not buy more than 1 share of a stock at a time (ie. you must sell the stock share before you buy again.) + +Return the maximum profit you can make. + +Example 1: + +```text +Input: prices = [1, 3, 2, 8, 4, 9], fee = 2 +Output: 8 +Explanation: The maximum profit can be achieved by: +Buying at prices[0] = 1 +Selling at prices[3] = 8 +Buying at prices[4] = 4 +Selling at prices[5] = 9 +The total profit is ((8 - 1) - 2) + ((9 - 4) - 2) = 8. +``` + +Note: + +1. 0 < prices.length <= 50000. +1. 0 < prices[i] < 50000. +1. 0 <= fee < 50000. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0714.best-time-to-buy-and-sell-stock-with-transaction-fee/best-time-to-buy-and-sell-stock-with-transaction-fee.go b/Algorithms/0714.best-time-to-buy-and-sell-stock-with-transaction-fee/best-time-to-buy-and-sell-stock-with-transaction-fee.go new file mode 100755 index 000000000..d7811121b --- /dev/null +++ b/Algorithms/0714.best-time-to-buy-and-sell-stock-with-transaction-fee/best-time-to-buy-and-sell-stock-with-transaction-fee.go @@ -0,0 +1,21 @@ +package Problem0714 + +func maxProfit(prices []int, fee int) int { + empty := 0 + hold := -1 << 63 + + for _, p := range prices { + temp := empty + empty = max(empty, hold+p) + hold = max(hold, temp-p-fee) + } + + return empty +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} diff --git a/Algorithms/0714.best-time-to-buy-and-sell-stock-with-transaction-fee/best-time-to-buy-and-sell-stock-with-transaction-fee_test.go b/Algorithms/0714.best-time-to-buy-and-sell-stock-with-transaction-fee/best-time-to-buy-and-sell-stock-with-transaction-fee_test.go new file mode 100755 index 000000000..181d7f576 --- /dev/null +++ b/Algorithms/0714.best-time-to-buy-and-sell-stock-with-transaction-fee/best-time-to-buy-and-sell-stock-with-transaction-fee_test.go @@ -0,0 +1,47 @@ +package Problem0714 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + prices []int + fee int + ans int +}{ + + { + []int{1, 3, 7, 5, 10, 3}, + 3, + 6, + }, + + { + []int{1, 3, 2, 8, 4, 9}, + 2, + 8, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, maxProfit(tc.prices, tc.fee), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + maxProfit(tc.prices, tc.fee) + } + } +} diff --git a/Algorithms/0715.range-module/README.md b/Algorithms/0715.range-module/README.md new file mode 100755 index 000000000..4477efa90 --- /dev/null +++ b/Algorithms/0715.range-module/README.md @@ -0,0 +1,31 @@ +# [715. Range Module](https://leetcode.com/problems/range-module/) + +## 题目 + +A Range Module is a module that tracks ranges of numbers. Your task is to design and implement the following interfaces in an efficient manner. + +- addRange(int left, int right) Adds the half-open interval [left, right), tracking every real number in that interval. Adding an interval that partially overlaps with currently tracked numbers should add any numbers in the interval [left, right) that are not already tracked. +- queryRange(int left, int right) Returns true if and only if every real number in the interval [left, right) is currently being tracked. +- removeRange(int left, int right) Stops tracking every real number currently being tracked in the interval [left, right). + +Example 1: + +```text +addRange(10, 20): null +removeRange(14, 16): null +queryRange(10, 14): true (Every number in [10, 14) is being tracked) +queryRange(13, 15): false (Numbers like 14, 14.03, 14.17 in [13, 15) are not being tracked) +queryRange(16, 17): true (The number 16 in [16, 17) is still being tracked, despite the remove operation) +``` + +Note: + +1. A half open interval [left, right) denotes all real numbers left <= x < right. +1. 0 < left < right < 10^9 in all calls to addRange, queryRange, removeRange. +1. The total number of calls to addRange in a single test case is at most 1000. +1. The total number of calls to queryRange in a single test case is at most 5000. +1. The total number of calls to removeRange in a single test case is at most 1000. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0715.range-module/range-module.go b/Algorithms/0715.range-module/range-module.go new file mode 100755 index 000000000..5d81f89a0 --- /dev/null +++ b/Algorithms/0715.range-module/range-module.go @@ -0,0 +1,131 @@ +package Problem0715 + +import ( + "sort" +) + +// RangeModule 记录了跟踪的范围 +type RangeModule struct { + ranges []*interval +} + +// Constructor 返回新建的 RangeModule +func Constructor() RangeModule { + return RangeModule{ranges: make([]*interval, 0, 2048)} +} + +// AddRange 添加追踪的返回 +func (r *RangeModule) AddRange(left int, right int) { + it := &interval{left: left, right: right} + + n := len(r.ranges) + i := sort.Search(n, func(i int) bool { + return left <= r.ranges[i].right + }) + + var j int + for j = i; j < n && r.ranges[j].left <= right; j++ { + it.add(r.ranges[j]) + } + + if i == j { + r.ranges = append(r.ranges, nil) + } + + copy(r.ranges[i+1:], r.ranges[j:]) + r.ranges = r.ranges[:n-j+i+1] + r.ranges[i] = it +} + +// QueryRange 返回 true 如果 [left, right) 全部都在追踪范围内 +func (r *RangeModule) QueryRange(left int, right int) bool { + n := len(r.ranges) + i := sort.Search(n, func(i int) bool { + return right <= r.ranges[i].right + }) + return 0 <= i && i < n && r.ranges[i].isCover(left, right) +} + +// RemoveRange 从追踪范围中删除 [left,right) +func (r *RangeModule) RemoveRange(left int, right int) { + it := &interval{left: left, right: right} + + n := len(r.ranges) + if n == 0 { + return + } + + i := sort.Search(n, func(i int) bool { + return left < r.ranges[i].right + }) + + temp := make([]*interval, 0, 16) + var j int + for j = i; j < n && r.ranges[j].left < right; j++ { + ra, rb := minus(r.ranges[j], it) + if ra != nil { + temp = append(temp, ra) + } + if rb != nil { + temp = append(temp, rb) + } + } + + if i == j { + return + } + + r.ranges = append(r.ranges, nil) + copy(r.ranges[i+len(temp):], r.ranges[j:]) + r.ranges = r.ranges[:n-j+i+len(temp)] + + for k := 0; k < len(temp); k++ { + r.ranges[i+k] = temp[k] + } +} + +type interval struct { + left, right int +} + +func (it *interval) isCover(left, right int) bool { + return it.left <= left && right <= it.right +} + +func (it *interval) add(a *interval) { + if a.left < it.left { + it.left = a.left + } + + if it.right < a.right { + it.right = a.right + } +} + +// 返回 a-b +func minus(a, b *interval) (*interval, *interval) { + if b.left <= a.left && a.right <= b.right { + return nil, nil + } + + if b.left <= a.left && a.left < b.right && b.right < a.right { + return &interval{left: b.right, right: a.right}, nil + } + + if a.left < b.left && b.left < a.right && a.right < b.right { + return &interval{left: a.left, right: b.left}, nil + } + + // a.left < b.left && b.right < a.right + return &interval{left: a.left, right: b.left}, + &interval{left: b.right, right: a.right} + +} + +/** + * Your RangeModule object will be instantiated and called as such: + * obj := Constructor(); + * obj.AddRange(left,right); + * param_2 := obj.QueryRange(left,right); + * obj.RemoveRange(left,right); + */ diff --git a/Algorithms/0715.range-module/range-module_test.go b/Algorithms/0715.range-module/range-module_test.go new file mode 100755 index 000000000..67db5ff1e --- /dev/null +++ b/Algorithms/0715.range-module/range-module_test.go @@ -0,0 +1,111 @@ +package Problem0715 + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + rm := Constructor() + + rm.AddRange(10, 20) + + rm.RemoveRange(14, 16) + + ast.True(rm.QueryRange(10, 14)) + + ast.False(rm.QueryRange(13, 15)) + + ast.True(rm.QueryRange(16, 17)) +} + +func Test_RangeModule_AddRange(t *testing.T) { + ast := assert.New(t) + + rm := Constructor() + + ranges := [][]int{ + {10, 12}, + {14, 16}, + {18, 20}, + {12, 14}, + {16, 18}, + } + + for _, r := range ranges { + rm.AddRange(r[0], r[1]) + } + + ast.Equal(1, len(rm.ranges), "添加完 ranges 后,rm.ranges 的范围应该合并成一个") + ast.Equal(interval{left: 10, right: 20}, *rm.ranges[0], "添加完 ranges 后,rm.ranges 的范围应该合并成[10,20)") +} + +func Test_RangeModule_RemoveRange(t *testing.T) { + ast := assert.New(t) + + rm := Constructor() + + rm.RemoveRange(1, 2) + + ranges := [][]int{ + {10, 12}, + {14, 16}, + } + + for _, r := range ranges { + rm.AddRange(r[0], r[1]) + } + + rm.RemoveRange(12, 14) + + ast.Equal(2, len(rm.ranges), "添加完 ranges 后,rm.ranges 的范围应该合并成一个") + ast.Equal(interval{left: 10, right: 12}, *rm.ranges[0]) + ast.Equal(interval{left: 14, right: 16}, *rm.ranges[1]) +} + +func Test_minus(t *testing.T) { + ast := assert.New(t) + + var tcs = []struct { + a, b *interval + ansA, ansB *interval + }{ + + { + &interval{left: 10, right: 20}, + &interval{left: 5, right: 25}, + nil, + nil, + }, + + { + &interval{left: 10, right: 20}, + &interval{left: 5, right: 15}, + &interval{left: 15, right: 20}, + nil, + }, + + { + &interval{left: 10, right: 20}, + &interval{left: 15, right: 25}, + &interval{left: 10, right: 15}, + nil, + }, + + { + &interval{left: 10, right: 20}, + &interval{left: 14, right: 16}, + &interval{left: 10, right: 14}, + &interval{left: 16, right: 20}, + }, + } + + for _, tc := range tcs { + ra, rb := minus(tc.a, tc.b) + ast.Equal(tc.ansA, ra) + ast.Equal(tc.ansB, rb) + } +} diff --git a/Algorithms/0717.1-bit-and-2-bit-characters/1-bit-and-2-bit-characters.go b/Algorithms/0717.1-bit-and-2-bit-characters/1-bit-and-2-bit-characters.go new file mode 100755 index 000000000..e9d23f703 --- /dev/null +++ b/Algorithms/0717.1-bit-and-2-bit-characters/1-bit-and-2-bit-characters.go @@ -0,0 +1,15 @@ +package Problem0717 + +func isOneBitCharacter(bits []int) bool { + n := len(bits) + i := 0 + for i < n-1 { + if bits[i] == 1 { + // 遇见 1 说明遇见了 twoBits + i += 2 + } else { + i++ + } + } + return i == n-1 +} diff --git a/Algorithms/0717.1-bit-and-2-bit-characters/1-bit-and-2-bit-characters_test.go b/Algorithms/0717.1-bit-and-2-bit-characters/1-bit-and-2-bit-characters_test.go new file mode 100755 index 000000000..4cc5f379e --- /dev/null +++ b/Algorithms/0717.1-bit-and-2-bit-characters/1-bit-and-2-bit-characters_test.go @@ -0,0 +1,59 @@ +package Problem0717 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + bits []int + ans bool +}{ + + { + []int{1, 1, 0, 0, 0, 0}, + true, + }, + + { + []int{1, 1, 1, 1, 0}, + true, + }, + + { + []int{1, 0, 0}, + true, + }, + + { + []int{1, 1, 1, 0}, + false, + }, + + { + []int{1, 1, 0}, + true, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, isOneBitCharacter(tc.bits), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + isOneBitCharacter(tc.bits) + } + } +} diff --git a/Algorithms/0717.1-bit-and-2-bit-characters/README.md b/Algorithms/0717.1-bit-and-2-bit-characters/README.md new file mode 100755 index 000000000..4d5da7413 --- /dev/null +++ b/Algorithms/0717.1-bit-and-2-bit-characters/README.md @@ -0,0 +1,36 @@ +# [717. 1-bit and 2-bit Characters](https://leetcode.com/problems/1-bit-and-2-bit-characters/) + +## 题目 + +We have two special characters. The first character can be represented by one bit 0. The second character can be represented by two bits (10 or 11). + +Now given a string represented by several bits. Return whether the last character must be a one-bit character or not. The given string will always end with a zero. + +Example 1: + +```text +Input: +bits = [1, 0, 0] +Output: True +Explanation: +The only way to decode it is two-bit character and one-bit character. So the last character is one-bit character. +``` + +Example 2: + +```text +Input: +bits = [1, 1, 1, 0] +Output: False +Explanation: +The only way to decode it is two-bit character and two-bit character. So the last character is NOT one-bit character. +``` + +Note: + +1. 1 <= len(bits) <= 1000. +1. bits[i] is always 0 or 1. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0718.maximum-length-of-repeated-subarray/README.md b/Algorithms/0718.maximum-length-of-repeated-subarray/README.md new file mode 100755 index 000000000..3a8a0486e --- /dev/null +++ b/Algorithms/0718.maximum-length-of-repeated-subarray/README.md @@ -0,0 +1,25 @@ +# [718. Maximum Length of Repeated Subarray](https://leetcode.com/problems/maximum-length-of-repeated-subarray/) + +## 题目 + +Given two integer arrays A and B, return the maximum length of an subarray that appears in both arrays. + +Example 1: + +```text +Input: +A: [1,2,3,2,1] +B: [3,2,1,4,7] +Output: 3 +Explanation: +The repeated subarray with maximum length is [3, 2, 1]. +``` + +Note: + +1. 1 <= len(A), len(B) <= 1000 +1. 0 <= A[i], B[i] < 100 + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0718.maximum-length-of-repeated-subarray/maximum-length-of-repeated-subarray.go b/Algorithms/0718.maximum-length-of-repeated-subarray/maximum-length-of-repeated-subarray.go new file mode 100755 index 000000000..a11a73baa --- /dev/null +++ b/Algorithms/0718.maximum-length-of-repeated-subarray/maximum-length-of-repeated-subarray.go @@ -0,0 +1,31 @@ +package Problem0718 + +func findLength(a1, a2 []int) int { + n1, n2 := len(a1), len(a2) + + // dp[i][j] == k 表示 a1[i-k:i] == a2[j-k:j] , + // 但是 a1[i-k-1] != a2[j-k-1] + dp := make([][]int, n1+1) + for i := range dp { + dp[i] = make([]int, n2+1) + } + + res := 0 + for i := 1; i <= n1; i++ { + for j := 1; j <= n2; j++ { + if a1[i-1] == a2[j-1] { + dp[i][j] = dp[i-1][j-1] + 1 + res = max(res, dp[i][j]) + } + } + } + + return res +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} diff --git a/Algorithms/0718.maximum-length-of-repeated-subarray/maximum-length-of-repeated-subarray_test.go b/Algorithms/0718.maximum-length-of-repeated-subarray/maximum-length-of-repeated-subarray_test.go new file mode 100755 index 000000000..c651f4d53 --- /dev/null +++ b/Algorithms/0718.maximum-length-of-repeated-subarray/maximum-length-of-repeated-subarray_test.go @@ -0,0 +1,46 @@ +package Problem0718 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + a1, a2 []int + ans int +}{ + + { + []int{1, 2, 3, 2, 1}, + []int{3, 2, 4, 1, 7}, + 2, + }, + + { + []int{1, 2, 3, 2, 1}, + []int{3, 2, 1, 4, 7}, + 3, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, findLength(tc.a1, tc.a2), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + findLength(tc.a1, tc.a2) + } + } +} diff --git a/Algorithms/0719.find-k-th-smallest-pair-distance/README.md b/Algorithms/0719.find-k-th-smallest-pair-distance/README.md new file mode 100755 index 000000000..29c7311fa --- /dev/null +++ b/Algorithms/0719.find-k-th-smallest-pair-distance/README.md @@ -0,0 +1,30 @@ +# [719. Find K-th Smallest Pair Distance](https://leetcode.com/problems/find-k-th-smallest-pair-distance/) + +## 题目 + +Given an integer array, return the k-th smallest distance among all the pairs. The distance of a pair (A, B) is defined as the absolute difference between A and B. + +Example 1: + +```text +Input: +nums = [1,3,1] +k = 1 +Output: 0 +Explanation: +Here are all the pairs: +(1,3) -> 2 +(1,1) -> 0 +(3,1) -> 2 +Then the 1st smallest distance pair is (1,1), and its distance is 0. +``` + +Note: + +1. 2 <= len(nums) <= 10000. +1. 0 <= nums[i] < 1000000. +1. 1 <= k <= len(nums) * (len(nums) - 1) / 2. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0719.find-k-th-smallest-pair-distance/find-k-th-smallest-pair-distance.go b/Algorithms/0719.find-k-th-smallest-pair-distance/find-k-th-smallest-pair-distance.go new file mode 100755 index 000000000..275ca7732 --- /dev/null +++ b/Algorithms/0719.find-k-th-smallest-pair-distance/find-k-th-smallest-pair-distance.go @@ -0,0 +1,55 @@ +package Problem0719 + +import "sort" + +func smallestDistancePair(a []int, k int) int { + n := len(a) + sort.Ints(a) + + low := a[1] - a[0] + for i := 2; i < n; i++ { + low = min(low, a[i]-a[i-1]) + } + + high := a[n-1] - a[0] + // 由题意可知,res 必定存在于 [low, high] 之中 + // 又由 count(a, mid) 可以 a 中距离 <= mid 的个数 + // 故可以使用 二分查找法 + for low < high { + mid := low + (high-low)/2 + if count(a, mid) < k { + low = mid + 1 + } else { + high = mid + } + // NOTICE: + // count(a,mid) == k , 并不能立即返回 mid 作为答案 + // 例如 count([]int{1,1,4}, 2) == 1, + // 但是 smallestDistancePair([]int{1,1,4}, 1) == 0 + } + + return low +} + +// 统计 a 中距离 <= mid 的元素对的数量 +func count(a []int, mid int) int { + n := len(a) + res := 0 + i, j := 0, 1 + for j < n { + if a[j]-a[i] <= mid { + res += j - i + j++ + } else { + i++ + } + } + return res +} + +func min(a, b int) int { + if a < b { + return a + } + return b +} diff --git a/Algorithms/0719.find-k-th-smallest-pair-distance/find-k-th-smallest-pair-distance_test.go b/Algorithms/0719.find-k-th-smallest-pair-distance/find-k-th-smallest-pair-distance_test.go new file mode 100755 index 000000000..299dae728 --- /dev/null +++ b/Algorithms/0719.find-k-th-smallest-pair-distance/find-k-th-smallest-pair-distance_test.go @@ -0,0 +1,53 @@ +package Problem0719 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + k int + ans int +}{ + + { + []int{1, 2, 3, 4, 5, 6, 7, 8, 9}, + 36, + 8, + }, + + { + []int{1, 2, 3, 4, 5, 6, 7, 8, 9}, + 8, + 1, + }, + + { + []int{1, 3, 1}, + 1, + 0, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, smallestDistancePair(tc.nums, tc.k), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + smallestDistancePair(tc.nums, tc.k) + } + } +} diff --git a/Algorithms/0720.longest-word-in-dictionary/README.md b/Algorithms/0720.longest-word-in-dictionary/README.md new file mode 100755 index 000000000..031d5fdc6 --- /dev/null +++ b/Algorithms/0720.longest-word-in-dictionary/README.md @@ -0,0 +1,36 @@ +# [720. Longest Word in Dictionary](https://leetcode.com/problems/longest-word-in-dictionary/) + +## 题目 + +Given a list of strings words representing an English Dictionary, find the longest word in words that can be built one character at a time by other words in words. If there is more than one possible answer, return the longest word with the smallest lexicographical order. + +If there is no answer, return the empty string. +Example 1: + +```text +Input: +words = ["w","wo","wor","worl", "world"] +Output: "world" +Explanation: +The word "world" can be built one character at a time by "w", "wo", "wor", and "worl". +``` + +Example 2: + +```text +Input: +words = ["a", "banana", "app", "appl", "ap", "apply", "apple"] +Output: "apple" +Explanation: +Both "apply" and "apple" can be built from other words in the dictionary. However, "apple" is lexicographically smaller than "apply". +``` + +Note: + +- All the strings in the input will only contain lowercase letters. +- The length of words will be in the range [1, 1000]. +- The length of words[i] will be in the range [1, 30]. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0720.longest-word-in-dictionary/longest-word-in-dictionary.go b/Algorithms/0720.longest-word-in-dictionary/longest-word-in-dictionary.go new file mode 100755 index 000000000..4133d6b0c --- /dev/null +++ b/Algorithms/0720.longest-word-in-dictionary/longest-word-in-dictionary.go @@ -0,0 +1,24 @@ +package Problem0720 + +import "sort" + +func longestWord(words []string) string { + sort.Strings(words) + m := make(map[string]bool, len(words)) + + res := words[0] + + for _, w := range words { + n := len(w) + if n == 1 { + m[w] = true + } else if m[w[:n-1]] { + m[w] = true + if len(res) < len(w) { + res = w + } + } + } + + return res +} diff --git a/Algorithms/0720.longest-word-in-dictionary/longest-word-in-dictionary_test.go b/Algorithms/0720.longest-word-in-dictionary/longest-word-in-dictionary_test.go new file mode 100755 index 000000000..bd9c9ed45 --- /dev/null +++ b/Algorithms/0720.longest-word-in-dictionary/longest-word-in-dictionary_test.go @@ -0,0 +1,59 @@ +package Problem0720 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + words []string + ans string +}{ + + { + []string{"ts", "e", "x", "pbhj", "opto", "xhigy", "erikz", "pbh", "opt", "erikzb", "eri", "erik", "xlye", "xhig", "optoj", "optoje", "xly", "pb", "xhi", "x", "o"}, + "e", + }, + + { + []string{"rac", "rs", "ra", "on", "r", "otif", "o", "onpdu", "rsf", "rs", "ot", "oti", "racy", "onpd"}, + "otif", + }, + + { + []string{"yo", "ew", "fc", "zrc", "yodn", "fcm", "qm", "qmo", "fcmz", "z", "ewq", "yod", "ewqz", "y"}, + "yodn", + }, + + { + []string{"w", "wo", "wor", "worl", "world"}, + "world", + }, + + { + []string{"a", "banana", "app", "appl", "ap", "apply", "apple"}, + "apple", + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, longestWord(tc.words), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + longestWord(tc.words) + } + } +} diff --git a/Algorithms/0721.accounts-merge/README.md b/Algorithms/0721.accounts-merge/README.md new file mode 100755 index 000000000..58fb079e7 --- /dev/null +++ b/Algorithms/0721.accounts-merge/README.md @@ -0,0 +1,32 @@ +# [721. Accounts Merge](https://leetcode.com/problems/accounts-merge/) + +## 题目 + +Given a list `accounts`, each element `accounts[i]` is a list of strings, where the first element `accounts[i][0]` is a name, and the rest of the elements are emails representing emails of the account. + +Now, we would like to merge these accounts. Two accounts definitely belong to the same person if there is some email that is common to both accounts. Note that even if two accounts have the same name, they may belong to different people as people could have the same name. A person can have any number of accounts initially, but all of their accounts definitely have the same name. + +After merging the accounts, return the accounts in the following format: the first element of each account is the name, and the rest of the elements are emails in sorted order. The accounts themselves can be returned in any order. + +Example 1: + +```text +Input: +accounts = [["John", "johnsmith@mail.com", "john00@mail.com"], ["John", "johnnybravo@mail.com"], ["John", "johnsmith@mail.com", "john_newyork@mail.com"], ["Mary", "mary@mail.com"]] +Output: [["John", 'john00@mail.com', 'john_newyork@mail.com', 'johnsmith@mail.com'], ["John", "johnnybravo@mail.com"], ["Mary", "mary@mail.com"]] +Explanation: +The first and third John's are the same person as they have the common email "johnsmith@mail.com". +The second John and Mary are different people as none of their email addresses are used by other accounts. +We could return these lists in any order, for example the answer [['Mary', 'mary@mail.com'], ['John', 'johnnybravo@mail.com'], +['John', 'john00@mail.com', 'john_newyork@mail.com', 'johnsmith@mail.com']] would still be accepted. +``` + +Note: + +- The length of accounts will be in the range [1, 1000]. +- The length of accounts[i] will be in the range [1, 10]. +- The length of accounts[i][j] will be in the range [1, 30]. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0721.accounts-merge/accounts-merge.go b/Algorithms/0721.accounts-merge/accounts-merge.go new file mode 100755 index 000000000..30e733f67 --- /dev/null +++ b/Algorithms/0721.accounts-merge/accounts-merge.go @@ -0,0 +1,53 @@ +package Problem0721 + +import ( + "sort" +) + +func accountsMerge(acts [][]string) [][]string { + n := len(acts) + + owner := make(map[string]string, n) + parent := make(map[string]string, n*2) + + for _, a := range acts { + for i := 1; i < len(a); i++ { + parent[a[i]] = a[i] + owner[a[i]] = a[0] + } + } + + for _, a := range acts { + r := root(a[1], parent) + for i := 2; i < len(a); i++ { + p := root(a[i], parent) + parent[p] = r + } + } + + union := make(map[string][]string, n) + for email, p := range parent { + r := root(p, parent) + union[r] = append(union[r], email) + } + + res := make([][]string, 0, len(union)) + for p, emails := range union { + t := make([]string, len(emails)+1) + t[0] = owner[p] + if len(emails) > 1 { + sort.Strings(emails) + } + copy(t[1:], emails) + res = append(res, t) + } + + return res +} + +func root(e string, parent map[string]string) string { + if parent[e] == e { + return e + } + return root(parent[e], parent) +} diff --git a/Algorithms/0721.accounts-merge/accounts-merge_test.go b/Algorithms/0721.accounts-merge/accounts-merge_test.go new file mode 100755 index 000000000..a5331ce2e --- /dev/null +++ b/Algorithms/0721.accounts-merge/accounts-merge_test.go @@ -0,0 +1,90 @@ +package Problem0721 + +import ( + "fmt" + "sort" + "strings" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + accounts [][]string + ans [][]string +}{ + + { + [][]string{ + {"David", "David0@m.co", "David1@m.co"}, + {"David", "David3@m.co", "David4@m.co"}, + {"David", "David4@m.co", "David5@m.co"}, + {"David", "David2@m.co", "David3@m.co"}, + {"David", "David1@m.co", "David2@m.co"}, + }, + [][]string{ + {"David", "David0@m.co", "David1@m.co", "David2@m.co", "David3@m.co", "David4@m.co", "David5@m.co"}, + }, + }, + + { + [][]string{ + {"Ethan", "Ethan1@m.co", "Ethan2@m.co", "Ethan0@m.co"}, + {"David", "David1@m.co", "David2@m.co", "David0@m.co"}, + {"Lily", "Lily0@m.co", "Lily0@m.co", "Lily4@m.co"}, + {"Gabe", "Gabe1@m.co", "Gabe4@m.co", "Gabe0@m.co"}, + {"Ethan", "Ethan2@m.co", "Ethan1@m.co", "Ethan0@m.co"}, + }, + [][]string{ + {"Gabe", "Gabe0@m.co", "Gabe1@m.co", "Gabe4@m.co"}, + {"Ethan", "Ethan0@m.co", "Ethan1@m.co", "Ethan2@m.co"}, + {"David", "David0@m.co", "David1@m.co", "David2@m.co"}, + {"Lily", "Lily0@m.co", "Lily4@m.co"}, + }, + }, + + { + [][]string{ + {"John", "johnsmith@mail.com", "john00@mail.com"}, + {"John", "johnnybravo@mail.com"}, + {"John", "johnsmith@mail.com", "john_newyork@mail.com"}, + {"Mary", "mary@mail.com"}, + }, + [][]string{ + {"John", "john00@mail.com", "john_newyork@mail.com", "johnsmith@mail.com"}, + {"John", "johnnybravo@mail.com"}, + {"Mary", "mary@mail.com"}, + }, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(normal(tc.ans), normal(accountsMerge(tc.accounts)), "输入:%v", tc) + } +} +func normal(sss [][]string) string { + ss := make([]string, len(sss)) + + for i := 0; i < len(sss); i++ { + sort.Strings(sss[i]) + ss[i] = strings.Join(sss[i], "☆") + } + + sort.Strings(ss) + + return strings.Join(ss, "★★") +} +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + accountsMerge(tc.accounts) + } + } +} diff --git a/Algorithms/0722.remove-comments/README.md b/Algorithms/0722.remove-comments/README.md new file mode 100755 index 000000000..62af3f8ca --- /dev/null +++ b/Algorithms/0722.remove-comments/README.md @@ -0,0 +1,76 @@ +# [722. Remove Comments](https://leetcode.com/problems/remove-comments/) + +## 题目 + +Given a C++ program, remove comments from it. The program source is an array where source[i] is the i-th line of the source code. This represents the result of splitting the original source code string by the newline character \n. + +In C++, there are two types of comments, line comments, and block comments. + +The string `//` denotes a line comment, which represents that it and rest of the characters to the right of it in the same line should be ignored. + +The string `/*` denotes a block comment, which represents that all characters until the next (non-overlapping) occurrence of `*/` should be ignored. (Here, occurrences happen in reading order: line by line from left to right.) To be clear, the string `/*/` does not yet end the block comment, as the ending would be overlapping the beginning. + +The first effective comment takes precedence over others: if the string `//` occurs in a block comment, it is ignored. Similarly, if the string `/*` occurs in a line or block comment, it is also ignored. + +If a certain line of code is empty after removing comments, you must not output that line: each string in the answer list will be non-empty. + +There will be no control characters, single quote, or double quote characters. For example, source = "string s = "/* Not a comment. */";" will not be a test case. (Also, nothing else such as defines or macros will interfere with the comments.) + +It is guaranteed that every open block comment will eventually be closed, so /* outside of a line or block comment always starts a new comment. + +Finally, implicit newline characters can be deleted by block comments. Please see the examples below for details. + +After removing the comments from the source code, return the source code in the same format. + +Example 1: + +```text +Input: +source = ["/*Test program */", "int main()", "{ ", " // variable declaration ", "int a, b, c;", "/* This is a test", " multiline ", " comment for ", " testing */", "a = b + c;", "}"] + +The line by line code is visualized as below: +/*Test program */ +int main() +{ + // variable declaration +int a, b, c; +/* This is a test + multiline + comment for + testing */ +a = b + c; +} + +Output: ["int main()","{ "," ","int a, b, c;","a = b + c;","}"] + +The line by line code is visualized as below: +int main() +{ + +int a, b, c; +a = b + c; +} + +Explanation: +The string /* denotes a block comment, including line 1 and lines 6-9. The string // denotes line 4 as comments. +``` + +Example 2: + +```text +Input: +source = ["a/*comment", "line", "more_comment*/b"] +Output: ["ab"] +Explanation: The original source string is "a/*comment\nline\nmore_comment*/b", where we have bolded the newline characters. After deletion, the implicit newline characters are deleted, leaving the string "ab", which when delimited by newline characters becomes ["ab"]. +``` + +Note: + +- The length of source is in the range [1, 100]. +- The length of source[i] is in the range [0, 80]. +- Every open block comment is eventually closed. +- There are no single-quote, double-quote, or control characters in the source code. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0722.remove-comments/remove-comments.go b/Algorithms/0722.remove-comments/remove-comments.go new file mode 100755 index 000000000..b60cb217b --- /dev/null +++ b/Algorithms/0722.remove-comments/remove-comments.go @@ -0,0 +1,47 @@ +package Problem0722 + +import "strings" + +// TODO: 使用正则表达式替换,可以很简单地解决这个题目 + +func removeComments(source []string) []string { + // 末尾添加 "$$" 是为了当最后一行是 "// ..." 时,能找到终止符号 + s := strings.Join(source, "$$") + "$$" + s = helper(s) + source = split(s) + return source +} + +func helper(s string) string { + i := strings.Index(s, "/*") + j := strings.Index(s, "//") + + // "/*" 起作用了 + if 0 <= i && + (j == -1 || i < j) { + // i+2 是为了避免匹配到 "/*/" 中的 "*/" + k := i + 2 + strings.Index(s[i+2:], "*/") + return s[:i] + helper(s[k+2:]) // 删除了 s[i:k+2] + } + + // "//" 起作用了 + if 0 <= j && + (i == -1 || j < i) { + k := j + strings.Index(s[j:], "$$") + return s[:j] + helper(s[k:]) // 删除了 s[j:k] + } + + // 已经没有注释了 + return s +} + +func split(s string) []string { + ss := strings.Split(s, "$$") + res := make([]string, 0, len(ss)) + for _, s := range ss { + if s != "" { + res = append(res, s) + } + } + return res +} diff --git a/Algorithms/0722.remove-comments/remove-comments_test.go b/Algorithms/0722.remove-comments/remove-comments_test.go new file mode 100755 index 000000000..d8c7e5580 --- /dev/null +++ b/Algorithms/0722.remove-comments/remove-comments_test.go @@ -0,0 +1,139 @@ +package Problem0722 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + source []string + ans []string +}{ + + { + []string{ + "struct Node{", + " /*/ declare members;/**/", + " int size;", + " /**/int val;", + "};", + }, + []string{ + "struct Node{", + " ", + " int size;", + " int val;", + "};", + }, + }, + + { + []string{ + "a//*b//*c", + "blank", + "d//*e/*/f", + }, + []string{ + "a", + "blank", + "d", + }, + }, + + { + []string{ + "/*Test program */", + "int main()", + "{ ", + " // variable declaration ", + "int a, b, c;", + "/* This is a test", + " multiline ", + " comment for ", + " testing */", + "a = b + c;", + "}", + }, + []string{ + "int main()", + "{ ", + " ", + "int a, b, c;", + "a = b + c;", + "}", + }, + }, + + { + []string{ + "main() {", + " Node* p;", + " /* declare a Node", + " /*float f = 2.0", + " p->val = f;", + " /**/", + " p->val = 1;", + " //*/ cout << success;*/", + "}", + " ", + }, + []string{ + "main() {", + " Node* p;", + " ", + " p->val = 1;", + " ", + "}", + " ", + }, + }, + + { + []string{ + "void func(int k) {", + "// this function does nothing /*", + " k = k*2/4;", + " k = k/2;*/", + "}", + }, + []string{ + "void func(int k) {", + " k = k*2/4;", + " k = k/2;*/", + "}", + }, + }, + + { + []string{ + "a/*comment", + "line", + "more_comment*/b", + }, + []string{ + "ab", + }, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, removeComments(tc.source), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + removeComments(tc.source) + } + } +} diff --git a/Algorithms/0724.find-pivot-index/README.md b/Algorithms/0724.find-pivot-index/README.md new file mode 100755 index 000000000..803a0c47a --- /dev/null +++ b/Algorithms/0724.find-pivot-index/README.md @@ -0,0 +1,39 @@ +# [724. Find Pivot Index](https://leetcode.com/problems/find-pivot-index/) + +## 题目 + +Given an array of integers nums, write a method that returns the "pivot" index of this array. + +We define the pivot index as the index where the sum of the numbers to the left of the index is equal to the sum of the numbers to the right of the index. + +If no such index exists, we should return -1. If there are multiple pivot indexes, you should return the left-most pivot index. + +Example 1: + +```text +Input: +nums = [1, 7, 3, 6, 5, 6] +Output: 3 +Explanation: +The sum of the numbers to the left of index 3 (nums[3] = 6) is equal to the sum of numbers to the right of index 3. +Also, 3 is the first index where this occurs. +``` + +Example 2: + +```text +Input: +nums = [1, 2, 3] +Output: -1 +Explanation: +There is no index that satisfies the conditions in the problem statement. +``` + +Note: + +1. The length of nums will be in the range [0, 10000]. +1. Each element nums[i] will be an integer in the range [-1000, 1000]. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0724.find-pivot-index/find-pivot-index.go b/Algorithms/0724.find-pivot-index/find-pivot-index.go new file mode 100755 index 000000000..17527f56f --- /dev/null +++ b/Algorithms/0724.find-pivot-index/find-pivot-index.go @@ -0,0 +1,18 @@ +package Problem0724 + +func pivotIndex(nums []int) int { + sum := 0 + for i := range nums { + sum += nums[i] + } + + left := 0 + for i := range nums { + if left*2+nums[i] == sum { + return i + } + left += nums[i] + } + + return -1 +} diff --git a/Algorithms/0724.find-pivot-index/find-pivot-index_test.go b/Algorithms/0724.find-pivot-index/find-pivot-index_test.go new file mode 100755 index 000000000..ae38b27ca --- /dev/null +++ b/Algorithms/0724.find-pivot-index/find-pivot-index_test.go @@ -0,0 +1,44 @@ +package Problem0724 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans int +}{ + + { + []int{1, 7, 3, 6, 5, 6}, + 3, + }, + + { + []int{1, 2, 3}, + -1, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, pivotIndex(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + pivotIndex(tc.nums) + } + } +} diff --git a/Algorithms/0725.split-linked-list-in-parts/README.md b/Algorithms/0725.split-linked-list-in-parts/README.md new file mode 100755 index 000000000..c5d354c2b --- /dev/null +++ b/Algorithms/0725.split-linked-list-in-parts/README.md @@ -0,0 +1,46 @@ +# [725. Split Linked List in Parts](https://leetcode.com/problems/split-linked-list-in-parts/) + +## 题目 + +Given a (singly) linked list with head node root, write a function to split the linked list into k consecutive linked list "parts". + +The length of each part should be as equal as possible: no two parts should have a size differing by more than 1. This may lead to some parts being null. + +The parts should be in order of occurrence in the input list, and parts occurring earlier should always have a size greater than or equal parts occurring later. + +Return a List of ListNode's representing the linked list parts that are formed. + +Examples 1->2->3->4, k = 5 // 5 equal parts [ [1], [2], [3], [4], null ] + +Example 1: + +```text +Input: +root = [1, 2, 3], k = 5 +Output: [[1],[2],[3],[],[]] +Explanation: +The input and each element of the output are ListNodes, not arrays. +For example, the input root has root.val = 1, root.next.val = 2, \root.next.next.val = 3, and root.next.next.next = null. +The first element output[0] has output[0].val = 1, output[0].next = null. +The last element output[4] is null, but it's string representation as a ListNode is []. +``` + +Example 2: + +```text +Input: +root = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], k = 3 +Output: [[1, 2, 3, 4], [5, 6, 7], [8, 9, 10]] +Explanation: +The input has been split into consecutive parts with size difference at most 1, and earlier parts are a larger size than the later parts. +``` + +Note: + +- The length of root will be in the range [0, 1000]. +- Each value of a node in the input will be an integer in the range [0, 999]. +- k will be an integer in the range [1, 50]. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0725.split-linked-list-in-parts/split-linked-list-in-parts.go b/Algorithms/0725.split-linked-list-in-parts/split-linked-list-in-parts.go new file mode 100755 index 000000000..d7fe427b3 --- /dev/null +++ b/Algorithms/0725.split-linked-list-in-parts/split-linked-list-in-parts.go @@ -0,0 +1,53 @@ +package Problem0725 + +import ( + "github.com/aQuaYi/LeetCode-in-Go/kit" +) + +type ListNode = kit.ListNode + +func splitListToParts(root *ListNode, k int) []*ListNode { + size := length(root) + remainder := size % k + + res := make([]*ListNode, k) + + i := 0 + for { + res[i] = root + i++ + if i == k { + break + } + + leng := size / k + if remainder > 0 { + leng++ + remainder-- + } + + for leng > 1 && root != nil { + root = root.Next + leng-- + } + + if root == nil { + // 当 size < k 时,会出现这种情况 + break + } + + // 斩断链条 + root.Next, root = nil, root.Next + } + + return res +} + +func length(root *ListNode) int { + res := 0 + for root != nil { + res++ + root = root.Next + } + return res +} diff --git a/Algorithms/0725.split-linked-list-in-parts/split-linked-list-in-parts_test.go b/Algorithms/0725.split-linked-list-in-parts/split-linked-list-in-parts_test.go new file mode 100755 index 000000000..112c8601e --- /dev/null +++ b/Algorithms/0725.split-linked-list-in-parts/split-linked-list-in-parts_test.go @@ -0,0 +1,56 @@ +package Problem0725 + +import ( + "fmt" + "testing" + + "github.com/aQuaYi/LeetCode-in-Go/kit" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + ints []int + k int + ans [][]int +}{ + + { + []int{1, 2, 3}, + 5, + [][]int{{1}, {2}, {3}, {}, {}}, + }, + + { + []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, + 3, + [][]int{{1, 2, 3, 4}, {5, 6, 7}, {8, 9, 10}}, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + root := kit.Ints2List(tc.ints) + ansLN := splitListToParts(root, tc.k) + ans := make([][]int, len(tc.ans)) + for i := range ans { + ans[i] = kit.List2Ints(ansLN[i]) + } + ast.Equal(tc.ans, ans, "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + root := kit.Ints2List(tc.ints) + splitListToParts(root, tc.k) + } + } +} diff --git a/Algorithms/0726.number-of-atoms/README.md b/Algorithms/0726.number-of-atoms/README.md new file mode 100755 index 000000000..4b85e234c --- /dev/null +++ b/Algorithms/0726.number-of-atoms/README.md @@ -0,0 +1,55 @@ +# [726. Number of Atoms](https://leetcode.com/problems/number-of-atoms/) + +## 题目 + +Given a chemical formula (given as a string), return the count of each atom. + +An atomic element always starts with an uppercase character, then zero or more lowercase letters, representing the name. + +1 or more digits representing the count of that element may follow if the count is greater than 1. If the count is 1, no digits will follow. For example, H2O and H2O2 are possible, but H1O2 is impossible. + +Two formulas concatenated together produce another formula. For example, H2O2He3Mg4 is also a formula. + +A formula placed in parentheses, and a count (optionally added) is also a formula. For example, (H2O2) and (H2O2)3 are formulas. + +Given a formula, output the count of all elements as a string in the following form: the first name (in sorted order), followed by its count (if that count is more than 1), followed by the second name (in sorted order), followed by its count (if that count is more than 1), and so on. + +Example 1: + +```text +Input: +formula = "H2O" +Output: "H2O" +Explanation: +The count of elements are {'H': 2, 'O': 1}. +``` + +Example 2: + +```text +Input: +formula = "Mg(OH)2" +Output: "H2MgO2" +Explanation: +The count of elements are {'H': 2, 'Mg': 1, 'O': 2}. +``` + +Example 3: + +```text +Input: +formula = "K4(ON(SO3)2)2" +Output: "K4N2O14S4" +Explanation: +The count of elements are {'K': 4, 'N': 2, 'O': 14, 'S': 4}. +``` + +Note: + +1. All atom names consist of lowercase letters, except for the first character which is uppercase. +1. The length of formula will be in the range [1, 1000]. +1. formula will only consist of letters, digits, and round parentheses, and is a valid formula as defined in the problem. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0726.number-of-atoms/number-of-atoms.go b/Algorithms/0726.number-of-atoms/number-of-atoms.go new file mode 100755 index 000000000..9e62587f8 --- /dev/null +++ b/Algorithms/0726.number-of-atoms/number-of-atoms.go @@ -0,0 +1,110 @@ +package Problem0726 + +import ( + "sort" + "strconv" +) + +func countOfAtoms(formula string) string { + return parse(count(formula)) +} + +func count(formula string) map[string]int { + rec := make(map[string]int, len(formula)/2) + var update = func(newRec map[string]int, times int) { + for atom, c := range newRec { + rec[atom] += c * times + } + } + + atoms := "" + for len(formula) > 0 { + atoms, formula = cut(formula) + if atoms[0] == '(' { + newFormula, times := dealParenthese(atoms) + newRec := count(newFormula) + update(newRec, times) + } else { + atom, num := getAtomAndNum(atoms) + rec[atom] += num + } + } + + return rec +} + +func cut(formula string) (string, string) { + i := 1 + if formula[0] == '(' { + i = jump(formula) + } + for i < len(formula) && + !isUpper(formula[i]) && + formula[i] != '(' { + i++ + } + return formula[:i], formula[i:] +} + +func dealParenthese(s string) (string, int) { + num, i := getNum(s) + return s[1 : i-1], num +} + +func getAtomAndNum(s string) (string, int) { + num, i := getNum(s) + return s[:i], num +} + +// 对于 "Ab321" 返回, 321 和 '3' 的索引号 2 +func getNum(s string) (num, i int) { + i = len(s) + for 0 <= i-1 && isNum(s[i-1]) { + i-- + } + num = 1 + if i == len(s) { + return + } + num, _ = strconv.Atoi(s[i:]) + return +} + +func isNum(b byte) bool { + return '0' <= b && b <= '9' +} + +func isUpper(b byte) bool { + return 'A' <= b && b <= 'Z' +} + +// jump 跳过了圆括号部分 +func jump(s string) int { + p := 1 + i := 1 + for i < len(s) && p > 0 { + if s[i] == '(' { + p++ + } else if s[i] == ')' { + p-- + } + i++ + } + return i +} + +func parse(r map[string]int) string { + atoms := make([]string, 0, len(r)) + for a := range r { + atoms = append(atoms, a) + } + sort.Strings(atoms) + res := "" + for _, a := range atoms { + res += a + if r[a] > 1 { + res += strconv.Itoa(r[a]) + } + } + return res +} diff --git a/Algorithms/0726.number-of-atoms/number-of-atoms_test.go b/Algorithms/0726.number-of-atoms/number-of-atoms_test.go new file mode 100755 index 000000000..9fb2432c5 --- /dev/null +++ b/Algorithms/0726.number-of-atoms/number-of-atoms_test.go @@ -0,0 +1,54 @@ +package Problem0726 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + formula string + ans string +}{ + + { + "H2O", + "H2O", + }, + + { + "Mg(OH)2", + "H2MgO2", + }, + + { + "K4(ON(SO3)2)2K4(ON(SO3)2)2", + "K8N4O28S8", + }, + + { + "K4(ON(SO3)2)2", + "K4N2O14S4", + }, + + // 可以有多个 testcase +} + +func Test_countOfAtoms(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, countOfAtoms(tc.formula), "输入:%v", tc) + } +} + +func Benchmark_countOfAtoms(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + countOfAtoms(tc.formula) + } + } +} diff --git a/Algorithms/0728.self-dividing-numbers/README.md b/Algorithms/0728.self-dividing-numbers/README.md new file mode 100755 index 000000000..1dafd06e5 --- /dev/null +++ b/Algorithms/0728.self-dividing-numbers/README.md @@ -0,0 +1,27 @@ +# [728. Self Dividing Numbers](https://leetcode.com/problems/self-dividing-numbers/) + +## 题目 + +A self-dividing number is a number that is divisible by every digit it contains. + +For example, 128 is a self-dividing number because 128 % 1 == 0, 128 % 2 == 0, and 128 % 8 == 0. + +Also, a self-dividing number is not allowed to contain the digit zero. + +Given a lower and upper number bound, output a list of every possible self dividing number, including the bounds if possible. + +Example 1: + +```text +Input: +left = 1, right = 22 +Output: [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 15, 22] +``` + +Note: + +The boundaries of each input argument are 1 <= left <= right <= 10000. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0728.self-dividing-numbers/self-dividing-numbers.go b/Algorithms/0728.self-dividing-numbers/self-dividing-numbers.go new file mode 100755 index 000000000..be5f3d52e --- /dev/null +++ b/Algorithms/0728.self-dividing-numbers/self-dividing-numbers.go @@ -0,0 +1,23 @@ +package Problem0728 + +func selfDividingNumbers(left, right int) []int { + res := make([]int, 0, right-left+1) + for i := left; i <= right; i++ { + if isSelfDividing(i) { + res = append(res, i) + } + } + return res +} + +func isSelfDividing(n int) bool { + t := n + for t > 0 { + d := t % 10 + t /= 10 + if d == 0 || n%d != 0 { + return false + } + } + return true +} diff --git a/Algorithms/0728.self-dividing-numbers/self-dividing-numbers_test.go b/Algorithms/0728.self-dividing-numbers/self-dividing-numbers_test.go new file mode 100755 index 000000000..216746a68 --- /dev/null +++ b/Algorithms/0728.self-dividing-numbers/self-dividing-numbers_test.go @@ -0,0 +1,40 @@ +package Problem0728 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + left, right int + ans []int +}{ + + { + 1, + 22, + []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 15, 22}, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, selfDividingNumbers(tc.left, tc.right), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + selfDividingNumbers(tc.left, tc.right) + } + } +} diff --git a/Algorithms/0729.my-calendar-i/README.md b/Algorithms/0729.my-calendar-i/README.md new file mode 100755 index 000000000..c918774d8 --- /dev/null +++ b/Algorithms/0729.my-calendar-i/README.md @@ -0,0 +1,33 @@ +# [729. My Calendar I](https://leetcode.com/problems/my-calendar-i/) + +## 题目 + +Implement a MyCalendar class to store your events. A new event can be added if adding the event will not cause a double booking. + +Your class will have the method, book(int start, int end). Formally, this represents a booking on the half open interval [start, end), the range of real numbers x such that start <= x < end. + +A double booking happens when two events have some non-empty intersection (ie., there is some time that is common to both events.) + +For each call to the method MyCalendar.book, return true if the event can be added to the calendar successfully without causing a double booking. Otherwise, return false and do not add the event to the calendar. + +Your class will be called like this: MyCalendar cal = new MyCalendar(); MyCalendar.book(start, end) +Example 1: + +```text +MyCalendar(); +MyCalendar.book(10, 20); // returns true +MyCalendar.book(15, 25); // returns false +MyCalendar.book(20, 30); // returns true +Explanation: +The first event can be booked. The second can't because time 15 is already booked by another event. +The third event can be booked, as the first event takes every time less than 20, but not including 20. +``` + +Note: + +- The number of calls to MyCalendar.book per test case will be at most 1000. +- In calls to MyCalendar.book(start, end), start and end are integers in the range [0, 10^9]. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0729.my-calendar-i/my-calendar-i.go b/Algorithms/0729.my-calendar-i/my-calendar-i.go new file mode 100755 index 000000000..1f1ef2c57 --- /dev/null +++ b/Algorithms/0729.my-calendar-i/my-calendar-i.go @@ -0,0 +1,47 @@ +package Problem0729 + +// MyCalendar 是我的日历类 +type MyCalendar struct { + head *event +} +type event struct { + start, end int + next *event +} + +// Constructor 构建 MyCanlendar +func Constructor() MyCalendar { + var head *event + return MyCalendar{head: head} +} + +// Book 可以预约时间 +func (m *MyCalendar) Book(start int, end int) bool { + e := &event{start: start, end: end} + + if m.head == nil || // 还没有事件记录 + e.end <= m.head.start { // 新事件的截止事件,在所有事件开始之前 + e.next, m.head = m.head, e + return true + } + + t := &event{next: m.head} + // 跳过所有在 e 开始之前的事件 + for t.next != nil && t.next.end <= e.start { + t = t.next + } + + if t.next == nil || // e 开始事件在所有事件结束之后 + e.end <= t.next.start { // e 结束后,才开始下一个事件 + e.next, t.next = t.next, e + return true + } + + return false +} + +/** + * Your MyCalendar object will be instantiated and called as such: + * obj := Constructor(); + * param_1 := obj.Book(start,end); + */ diff --git a/Algorithms/0729.my-calendar-i/my-calendar-i_test.go b/Algorithms/0729.my-calendar-i/my-calendar-i_test.go new file mode 100755 index 000000000..97fbcc32e --- /dev/null +++ b/Algorithms/0729.my-calendar-i/my-calendar-i_test.go @@ -0,0 +1,19 @@ +package Problem0729 + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_MyCanlendar(t *testing.T) { + ast := assert.New(t) + + mc := Constructor() + + ast.True(mc.Book(10, 20)) + + ast.False(mc.Book(15, 25)) + + ast.True(mc.Book(20, 30)) +} diff --git a/Algorithms/0730.count-different-palindromic-subsequences/README.md b/Algorithms/0730.count-different-palindromic-subsequences/README.md new file mode 100755 index 000000000..9dd0a18b1 --- /dev/null +++ b/Algorithms/0730.count-different-palindromic-subsequences/README.md @@ -0,0 +1,41 @@ +# [730. Count Different Palindromic Subsequences](https://leetcode.com/problems/count-different-palindromic-subsequences/) + +## 题目 + +Given a string S, find the number of different non-empty palindromic subsequences in S, and return that number modulo 10^9 + 7. + +A subsequence of a string S is obtained by deleting 0 or more characters from S. + +A sequence is palindromic if it is equal to the sequence reversed. + +Two sequences `A_1`, `A_2`, ... and `B_1`, `B_2`, ... are different if there is some i for which `A_i` != `B_i`. + +Example 1: + +```text +Input: +S = 'bccb' +Output: 6 +Explanation: +The 6 different non-empty palindromic subsequences are 'b', 'c', 'bb', 'cc', 'bcb', 'bccb'. +Note that 'bcb' is counted only once, even though it occurs twice. +``` + +Example 2: + +```text +Input: +S = 'abcdabcdabcdabcdabcdabcdabcdabcddcbadcbadcbadcbadcbadcbadcbadcba' +Output: 104860361 +Explanation: +There are 3104860382 different non-empty palindromic subsequences, which is 104860361 modulo 10^9 + 7. +``` + +Note: + +- The length of S will be in the range [1, 1000]. +- Each character S[i] will be in the set {'a', 'b', 'c', 'd'}. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0730.count-different-palindromic-subsequences/count-different-palindromic-subsequences.go b/Algorithms/0730.count-different-palindromic-subsequences/count-different-palindromic-subsequences.go new file mode 100755 index 000000000..7a19bb3c6 --- /dev/null +++ b/Algorithms/0730.count-different-palindromic-subsequences/count-different-palindromic-subsequences.go @@ -0,0 +1,87 @@ +package Problem0730 + +const mod int = 1e9 + 7 + +// 题目中限定了,s 中只存在 a,b,c,d 这 4 个字母,在程序中,使用 0~3 替代他们 +func countPalindromicSubsequences(s string) int { + n := len(s) + + // dp[i][j] 表示 countPalindromicSubsquences(s[i:j+1]) + dp := make([][]int, n) + for i := 0; i < n; i++ { + dp[i] = make([]int, n) + dp[i][i] = 1 + } + + // before[i][0] == k 表示 + // 如果 0<=k<=i 的话, s[:i+1]中 s[k]=='a',且 s[k+1:i+1] 中没有 'a' + // 否则的话, s[:i+1] 中并没有 'a' + before := make([][]int, n) + // after[j][0] == k 表示 + // 如果 j<=k right { + return 0 + } + + // 已经计算过了,直接返回答案 + if dp[left][right] != 0 { + return dp[left][right] + } + + total := 0 + + for c := 0; c < 4; c++ { + i := after[left][c] + j := before[right][c] + if left <= i && j <= right { + if i < j { + // 此时 + // s[left:right+1] 中至少有 2 个 c + // 那么可以组成的回文格式为 + // c + // cc + // c*c,其中 * 代表 s[i+1:j] 中的不同回文数量 + // 所以,此时以 c 为两端的回文数量,等于 + // s[i+1:j] 中的回文数量 + 2 + // 即 + // helper(dp, before, after, i+1, j-1) + 2 + + total += helper(dp, before, after, i+1, j-1) + 2 + } else if i == j { + // i==j 说明此时只有一个单字符的回文 c + total++ + } + } + } + + total %= mod + dp[left][right] = total + + return total +} diff --git a/Algorithms/0730.count-different-palindromic-subsequences/count-different-palindromic-subsequences_test.go b/Algorithms/0730.count-different-palindromic-subsequences/count-different-palindromic-subsequences_test.go new file mode 100755 index 000000000..36b20ee16 --- /dev/null +++ b/Algorithms/0730.count-different-palindromic-subsequences/count-different-palindromic-subsequences_test.go @@ -0,0 +1,69 @@ +package Problem0730 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + s string + ans int +}{ + + { + "aacaca", + 11, + }, + + { + "aabacabaa", + 28, + }, + + { + "aabcdaa", + 13, + }, + + { + "abcda", + 8, + }, + + { + "bccb", + 6, + }, + + { + "abcdabcdabcdabcdabcdabcdabcdabcddcbadcbadcbadcbadcbadcbadcbadcba", + 104860361, + }, + + { + "bdddbcbaaacdcbacdbbcdcacdddacdbaddbabdbcbccdbdcadbbbbdabacdddcbacabcdcdaccdcbdaadbbbbdbddccacdadadbcbddbdccbcacbdcabdbdcccbdccbcdbadbcdbacadadaaadacdaadaabdbcccddcccdcadaccdaacbdddcbadadcadcbcbaaadcaabadbcadcdaaddacaddbadbbdbbcacaaacbbaadcaadbbaadbbbabbddcacaaabddbccbcacaadcbabcaaacdbdbcdabdbdddbcddaaabcadccbcdccdcdadbcddcdaacbaadbcbcdcbadbccbdbaabbabcadacbdcdbaadbcacdcbabcdaabdccadabccdccdcabbcabcbccdaaaddabbcdabcbdbddbbddaadbcbbddabccadccbcccdcdcbbbdaccdcbdccbdbbaacbabacdcabcdbcbadadadbcdaccaadcdcbbbcdcbcbcbaaaadcabacbdbdbcaddbadcaabdbacbaacbdcadcdbacbbbbabacdbcdaacdcbdadaaddbacccbccccaacabacddbbbbcbcbccbbccaddbaabcdbdbaaaccddacaaccdaccdcbcacbccbbabcbcadbcbdacdcbdacacadcdbbbbdcbddcddddaadbdacbcddbdacbadaacdabaddddaddbcbbbdaddcaaaabaacdbacaddcadbcaaabdbcdacaabcdcdcdddacdacbabdcaabdaaadddbcdbbdaacacacbabaadaaabcdbbabacddcdbaacaaadddddcabdabaababcbdcbadbddaccddcbabbdbcbaacdbbbdbdadddacdcddaacdbbadbacbcaccacbbbbdcadabadaccbcdcbcbbacacdaddabdddbdccbbccdaacbcbbabaddabcbbacccbbadbadbccccccc", + 115571776, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, countPalindromicSubsequences(tc.s), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + countPalindromicSubsequences(tc.s) + } + } +} diff --git a/Algorithms/0731.my-calendar-ii/README.md b/Algorithms/0731.my-calendar-ii/README.md new file mode 100755 index 000000000..49c03830d --- /dev/null +++ b/Algorithms/0731.my-calendar-ii/README.md @@ -0,0 +1,39 @@ +# [731. My Calendar II](https://leetcode.com/problems/my-calendar-ii/) + +## 题目 + +Implement a MyCalendarTwo class to store your events. A new event can be added if adding the event will not cause a triple booking. + +Your class will have one method, book(int start, int end). Formally, this represents a booking on the half open interval [start, end), the range of real numbers x such that start <= x < end. + +A triple booking happens when three events have some non-empty intersection (ie., there is some time that is common to all 3 events.) + +For each call to the method MyCalendar.book, return true if the event can be added to the calendar successfully without causing a triple booking. Otherwise, return false and do not add the event to the calendar. + +Your class will be called like this: MyCalendar cal = new MyCalendar(); MyCalendar.book(start, end) +Example 1: + +```text +MyCalendar(); +MyCalendar.book(10, 20); // returns true +MyCalendar.book(50, 60); // returns true +MyCalendar.book(10, 40); // returns true +MyCalendar.book(5, 15); // returns false +MyCalendar.book(5, 10); // returns true +MyCalendar.book(25, 55); // returns true +Explanation: +The first two events can be booked. The third event can be double booked. +The fourth event (5, 15) can't be booked, because it would result in a triple booking. +The fifth event (5, 10) can be booked, as it does not use time 10 which is already double booked. +The sixth event (25, 55) can be booked, as the time in [25, 40) will be double booked with the third event; +the time [40, 50) will be single booked, and the time [50, 55) will be double booked with the second event. +``` + +Note: + +- The number of calls to MyCalendar.book per test case will be at most 1000. +- In calls to MyCalendar.book(start, end), start and end are integers in the range [0, 10^9]. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0731.my-calendar-ii/my-calendar-ii.go b/Algorithms/0731.my-calendar-ii/my-calendar-ii.go new file mode 100755 index 000000000..6a9d24d12 --- /dev/null +++ b/Algorithms/0731.my-calendar-ii/my-calendar-ii.go @@ -0,0 +1,102 @@ +package Problem0731 + +import ( + "sort" +) + +// MyCalendarTwo 第二个日历类 +type MyCalendarTwo struct { + events [][]int +} + +// Constructor 返回 MyCalendarTwo +func Constructor() MyCalendarTwo { + return MyCalendarTwo{} +} + +// Book 可以预约事件,预约成功返回 true +func (m *MyCalendarTwo) Book(start, end int) bool { + e := []int{start, end, 1} + + n := len(m.events) + if n == 0 { + m.events = append(m.events, e) + return true + } + + i := sort.Search(n, func(i int) bool { + return e[0] < m.events[i][1] + }) + + j := sort.Search(n, func(j int) bool { + return e[1] <= m.events[j][0] + }) + + if i == j { + m.events = append(m.events, nil) + copy(m.events[i+1:], m.events[i:]) + m.events[i] = e + return true + } + + for k := i; k < j; k++ { + if m.events[k][2] == 2 { + return false + } + } + + segements := overlap(m.events[i:j], e) + temp := make([][]int, len(m.events)-j) + copy(temp, m.events[j:]) + m.events = m.events[:i] + m.events = append(m.events, segements...) + m.events = append(m.events, temp...) + + return true +} + +func overlap(events [][]int, e []int) [][]int { + res := make([][]int, 0, len(events)*2+1) + + for i := 0; i < len(events); i++ { + // 切除头部不重叠的部分 + // 运行完成后, + // e[0]==events[i][0] + if e[0] < events[i][0] { + e1 := []int{e[0], events[i][0], 1} + res = append(res, e1) + e[0] = events[i][0] + } else if events[i][0] < e[0] { + e1 := []int{events[i][0], e[0], 1} + res = append(res, e1) + events[i][0] = e[0] + } + // 计算其中重叠的部分 + if e[1] < events[i][1] { + e2 := []int{e[0], e[1], 2} + e1 := []int{e[1], events[i][1], 1} + res = append(res, e2, e1) + e = nil + } else if e[1] == events[i][1] { + e2 := []int{e[0], e[1], 2} + res = append(res, e2) + e = nil + } else { + e2 := []int{e[0], events[i][1], 2} + res = append(res, e2) + e[0] = events[i][1] + } + } + + if e != nil { + res = append(res, e) + } + + return res +} + +/** + * Your MyCalendarTwo object will be instantiated and called as such: + * obj := Constructor(); + * param_1 := obj.Book(start,end); + */ diff --git a/Algorithms/0731.my-calendar-ii/my-calendar-ii_test.go b/Algorithms/0731.my-calendar-ii/my-calendar-ii_test.go new file mode 100755 index 000000000..9ae22115b --- /dev/null +++ b/Algorithms/0731.my-calendar-ii/my-calendar-ii_test.go @@ -0,0 +1,84 @@ +package Problem0731 + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_MyCanlendar(t *testing.T) { + ast := assert.New(t) + + mc := Constructor() + + ast.True(mc.Book(10, 20)) + ast.True(mc.Book(50, 60)) + ast.True(mc.Book(10, 40)) + + ast.False(mc.Book(5, 15)) + + ast.True(mc.Book(5, 10)) + ast.True(mc.Book(25, 55)) +} + +func Test_MyCanlendar_2(t *testing.T) { + events := [][]int{ + {5, 12}, + {42, 50}, + {4, 9}, + {33, 41}, + {2, 7}, + {16, 25}, + {7, 16}, + {6, 11}, + {13, 18}, + {38, 43}, + {49, 50}, + {6, 15}, + {5, 13}, + {35, 42}, + {19, 24}, + {46, 50}, + {39, 44}, + {28, 36}, + {28, 37}, + {20, 29}, + {41, 49}, + {11, 19}, + {41, 46}, + {28, 37}, + {17, 23}, + {22, 31}, + {4, 10}, + {31, 40}, + {4, 12}, + {19, 26}, + } + ans := []bool{true, true, true, true, false, true, false, false, true, true, true, false, false, false, true, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false} + + ast := assert.New(t) + + mc := Constructor() + + for i, e := range events { + // fmt.Println(i, e) + ast.Equal(ans[i], mc.Book(e[0], e[1]), "输入是 %d, %v", i, e) + // fmt.Println(mc.events) + } +} +func Test_MyCanlendar_3(t *testing.T) { + events := [][]int{ + {22, 29}, {12, 17}, {20, 27}, {27, 36}, {24, 31}, {23, 28}, {47, 50}, {23, 30}, {24, 29}, {19, 25}, {19, 27}, {3, 9}, {34, 41}, {22, 27}, {3, 9}, {29, 38}, {34, 40}, {49, 50}, {42, 48}, {43, 50}, {39, 44}, {30, 38}, {42, 50}, {31, 39}, {9, 16}, {10, 18}, {31, 39}, {30, 39}, {48, 50}, {36, 42}, + } + ans := []bool{true, true, true, true, false, false, true, false, false, false, false, true, true, false, true, false, false, true, true, false, true, false, false, false, true, false, false, false, false, false} + + ast := assert.New(t) + + mc := Constructor() + + for i, e := range events { + // fmt.Println(i, e) + ast.Equal(ans[i], mc.Book(e[0], e[1]), "输入是 %d, %v", i, e) + // fmt.Println(mc.events) + } +} diff --git a/Algorithms/0732.my-calendar-iii/732.100.png b/Algorithms/0732.my-calendar-iii/732.100.png new file mode 100644 index 000000000..ffd9c66d6 Binary files /dev/null and b/Algorithms/0732.my-calendar-iii/732.100.png differ diff --git a/Algorithms/0732.my-calendar-iii/README.md b/Algorithms/0732.my-calendar-iii/README.md new file mode 100755 index 000000000..5a53d158f --- /dev/null +++ b/Algorithms/0732.my-calendar-iii/README.md @@ -0,0 +1,42 @@ +# [732. My Calendar III](https://leetcode.com/problems/my-calendar-iii/) + +## 题目 + +Implement a MyCalendarThree class to store your events. A new event can always be added. + +Your class will have one method, book(int start, int end). Formally, this represents a booking on the half open interval [start, end), the range of real numbers x such that start <= x < end. + +A K-booking happens when K events have some non-empty intersection (ie., there is some time that is common to all K events.) + +For each call to the method MyCalendar.book, return an integer K representing the largest integer such that there exists a K-booking in the calendar. + +Your class will be called like this: MyCalendarThree cal = new MyCalendarThree(); MyCalendarThree.book(start, end) + +Example 1: + +```text +MyCalendarThree(); +MyCalendarThree.book(10, 20); // returns 1 +MyCalendarThree.book(50, 60); // returns 1 +MyCalendarThree.book(10, 40); // returns 2 +MyCalendarThree.book(5, 15); // returns 3 +MyCalendarThree.book(5, 10); // returns 3 +MyCalendarThree.book(25, 55); // returns 3 +Explanation: +The first two events can be booked and are disjoint, so the maximum K-booking is a 1-booking. +The third event [10, 40) intersects the first event, and the maximum K-booking is a 2-booking. +The remaining events cause the maximum K-booking to be only a 3-booking. +Note that the last event locally causes a 2-booking, but the answer is still 3 because +eg. [10, 20), [10, 40), and [5, 15) are still triple booked. +``` + +Note: + +- The number of calls to MyCalendarThree.book per test case will be at most 400. +- In calls to MyCalendarThree.book(start, end), start and end are integers in the range [0, 10^9]. + +## 解题思路 + +见程序注释 + +![100](732.100.png) \ No newline at end of file diff --git a/Algorithms/0732.my-calendar-iii/my-calendar-iii.go b/Algorithms/0732.my-calendar-iii/my-calendar-iii.go new file mode 100755 index 000000000..325f25caf --- /dev/null +++ b/Algorithms/0732.my-calendar-iii/my-calendar-iii.go @@ -0,0 +1,111 @@ +package Problem0732 + +import "sort" + +// MyCalendarThree 第二个日历类 +type MyCalendarThree struct { + events [][]int + k int +} + +// Constructor 返回 MyCalendarTwo +func Constructor() MyCalendarThree { + return MyCalendarThree{} +} + +// Book 可以预约事件,预约成功返回 true +func (m *MyCalendarThree) Book(start, end int) int { + // e[2] 代表了此时间段的重合程度 + e := []int{start, end, 1} + + n := len(m.events) + if n == 0 { + m.events = append(m.events, e) + m.k = 1 + return m.k + } + + i := sort.Search(n, func(i int) bool { + return e[0] < m.events[i][1] + }) + j := sort.Search(n, func(j int) bool { + return e[1] <= m.events[j][0] + }) + + // m.events[i:j] 中的事件,都会与 e 有交集 + // 但如果 i==j 的话 + // 说明 e 应该插入到 m.events[i] 的位置 + if i == j { + m.events = append(m.events, nil) + copy(m.events[i+1:], m.events[i:]) + m.events[i] = e + return m.k + } + + // 更新 m.k + for k := i; k < j; k++ { + m.k = max(m.k, m.events[k][2]+1) + } + + segements := overlap(m.events[i:j], e) + temp := make([][]int, len(m.events)-j) + copy(temp, m.events[j:]) + m.events = m.events[:i] + m.events = append(m.events, segements...) + m.events = append(m.events, temp...) + + return m.k +} + +func overlap(events [][]int, e []int) [][]int { + res := make([][]int, 0, len(events)*2+1) + + for i := 0; i < len(events); i++ { + // 切除头部不重叠的部分 + // 运行完成后, + // e[0]==events[i][0] + if e[0] < events[i][0] { + e1 := []int{e[0], events[i][0], 1} + res = append(res, e1) + e[0] = events[i][0] + } else if events[i][0] < e[0] { + ei := []int{events[i][0], e[0], events[i][2]} + res = append(res, ei) + events[i][0] = e[0] + } + // 计算其中重叠的部分 + if e[1] < events[i][1] { + eo := []int{e[0], e[1], events[i][2] + 1} + ei := []int{e[1], events[i][1], events[i][2]} + res = append(res, eo, ei) + e = nil + } else if e[1] == events[i][1] { + eo := []int{e[0], e[1], events[i][2] + 1} + res = append(res, eo) + e = nil + } else { + eo := []int{e[0], events[i][1], events[i][2] + 1} + res = append(res, eo) + e[0] = events[i][1] + } + } + + if e != nil { + res = append(res, e) + } + + return res +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} + +/** + * Your MyCalendarTwo object will be instantiated and called as such: + * obj := Constructor(); + * param_1 := obj.Book(start,end); + */ diff --git a/Algorithms/0732.my-calendar-iii/my-calendar-iii_test.go b/Algorithms/0732.my-calendar-iii/my-calendar-iii_test.go new file mode 100755 index 000000000..a036f3e66 --- /dev/null +++ b/Algorithms/0732.my-calendar-iii/my-calendar-iii_test.go @@ -0,0 +1,29 @@ +package Problem0732 + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_MyCanlendar(t *testing.T) { + events := [][]int{ + {10, 20}, + {50, 60}, + {10, 40}, + {5, 15}, + {5, 10}, + {25, 55}, + } + ans := []int{1, 1, 2, 3, 3, 3} + + ast := assert.New(t) + + mc := Constructor() + + for i, e := range events { + // fmt.Println(i, e) + ast.Equal(ans[i], mc.Book(e[0], e[1]), "输入是 %d, %v", i, e) + // fmt.Println(mc.events) + } +} diff --git a/Algorithms/0733.flood-fill/README.md b/Algorithms/0733.flood-fill/README.md new file mode 100755 index 000000000..15a1ca71d --- /dev/null +++ b/Algorithms/0733.flood-fill/README.md @@ -0,0 +1,35 @@ +# [733. Flood Fill](https://leetcode.com/problems/flood-fill/) + +## 题目 + +An image is represented by a 2-D array of integers, each integer representing the pixel value of the image (from 0 to 65535). + +Given a coordinate (sr, sc) representing the starting pixel (row and column) of the flood fill, and a pixel value newColor, "flood fill" the image. + +To perform a "flood fill", consider the starting pixel, plus any pixels connected 4-directionally to the starting pixel of the same color as the starting pixel, plus any pixels connected 4-directionally to those pixels (also with the same color as the starting pixel), and so on. Replace the color of all of the aforementioned pixels with the newColor. + +At the end, return the modified image. + +Example 1: + +```text +Input: +image = [[1,1,1],[1,1,0],[1,0,1]] +sr = 1, sc = 1, newColor = 2 +Output: [[2,2,2],[2,2,0],[2,0,1]] +Explanation: +From the center of the image (with position (sr, sc) = (1, 1)), all pixels connected +by a path of the same color as the starting pixel are colored with the new color. +Note the bottom corner is not colored 2, because it is not 4-directionally connected +to the starting pixel. +``` + +Note: + +1. The length of image and image[0] will be in the range [1, 50]. +1. The given starting pixel will satisfy 0 <= sr < image.length and 0 <= sc < image[0].length. +1. The value of each color in image[i][j] and newColor will be an integer in [0, 65535]. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0733.flood-fill/flood-fill.go b/Algorithms/0733.flood-fill/flood-fill.go new file mode 100755 index 000000000..5492a3cbf --- /dev/null +++ b/Algorithms/0733.flood-fill/flood-fill.go @@ -0,0 +1,34 @@ +package Problem0733 + +var dx = []int{-1, 1, 0, 0} +var dy = []int{0, 0, -1, 1} + +func floodFill(image [][]int, sr, sc, newColor int) [][]int { + oldColor := image[sr][sc] + if oldColor == newColor { + return image + } + + m, n := len(image), len(image[0]) + + coordinates := make([][]int, 1, m*n) + coordinates[0] = []int{sr, sc} + + for len(coordinates) > 0 { + c := coordinates[0] + coordinates = coordinates[1:] + image[c[0]][c[1]] = newColor + + for i := 0; i < 4; i++ { + x := c[0] + dx[i] + y := c[1] + dy[i] + if 0 <= x && x < m && + 0 <= y && y < n && + image[x][y] == oldColor { + coordinates = append(coordinates, []int{x, y}) + } + } + } + + return image +} diff --git a/Algorithms/0733.flood-fill/flood-fill_test.go b/Algorithms/0733.flood-fill/flood-fill_test.go new file mode 100755 index 000000000..9e02115c0 --- /dev/null +++ b/Algorithms/0733.flood-fill/flood-fill_test.go @@ -0,0 +1,53 @@ +package Problem0733 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + image [][]int + sr int + sc int + newColor int + ans [][]int +}{ + + { + [][]int{{0, 0, 0}, {0, 1, 1}}, + 1, + 1, + 1, + [][]int{{0, 0, 0}, {0, 1, 1}}, + }, + + { + [][]int{{1, 1, 1}, {1, 1, 0}, {1, 0, 1}}, + 1, + 1, + 2, + [][]int{{2, 2, 2}, {2, 2, 0}, {2, 0, 1}}, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, floodFill(tc.image, tc.sr, tc.sc, tc.newColor), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + floodFill(tc.image, tc.sr, tc.sc, tc.newColor) + } + } +} diff --git a/Algorithms/0735.asteroid-collision/README.md b/Algorithms/0735.asteroid-collision/README.md new file mode 100755 index 000000000..d58f28a9d --- /dev/null +++ b/Algorithms/0735.asteroid-collision/README.md @@ -0,0 +1,59 @@ +# [735. Asteroid Collision](https://leetcode.com/problems/asteroid-collision/) + +## 题目 + +We are given an array asteroids of integers representing asteroids in a row. + +For each asteroid, the absolute value represents its size, and the sign represents its direction (positive meaning right, negative meaning left). Each asteroid moves at the same speed. + +Find out the state of the asteroids after all collisions. If two asteroids meet, the smaller one will explode. If both are the same size, both will explode. Two asteroids moving in the same direction will never meet. + +Example 1: + +```text +Input: +asteroids = [5, 10, -5] +Output: [5, 10] +Explanation: +The 10 and -5 collide resulting in 10. The 5 and 10 never collide. +``` + +Example 2: + +```text +Input: +asteroids = [8, -8] +Output: [] +Explanation: +The 8 and -8 collide exploding each other. +``` + +Example 3: + +```text +Input: +asteroids = [10, 2, -5] +Output: [10] +Explanation: +The 2 and -5 collide resulting in -5. The 10 and -5 collide resulting in 10. +``` + +Example 4: + +```text +Input: +asteroids = [-2, -1, 1, 2] +Output: [-2, -1, 1, 2] +Explanation: +The -2 and -1 are moving left, while the 1 and 2 are moving right. +Asteroids moving the same direction never meet, so no asteroids will meet each other. +``` + +Note: + +- The length of asteroids will be at most 10000. +- Each asteroid will be a non-zero integer in the range [-1000, 1000].. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0735.asteroid-collision/asteroid-collision.go b/Algorithms/0735.asteroid-collision/asteroid-collision.go new file mode 100755 index 000000000..74e6cc023 --- /dev/null +++ b/Algorithms/0735.asteroid-collision/asteroid-collision.go @@ -0,0 +1,31 @@ +package Problem0735 + +func asteroidCollision(asteroids []int) []int { + res := make([]int, 0, len(asteroids)) + stack := make([]int, 0, len(asteroids)) + + for _, a := range asteroids { + if a > 0 { + stack = append(stack, a) + continue + } + + for len(stack) > 0 && stack[len(stack)-1] <= -a { + last := stack[len(stack)-1] + stack = stack[:len(stack)-1] + if last == -a { + a = 0 + break + } + } + + if len(stack) == 0 && a != 0 { + res = append(res, a) + continue + } + } + + res = append(res, stack...) + + return res +} diff --git a/Algorithms/0735.asteroid-collision/asteroid-collision_test.go b/Algorithms/0735.asteroid-collision/asteroid-collision_test.go new file mode 100755 index 000000000..e39be6e7b --- /dev/null +++ b/Algorithms/0735.asteroid-collision/asteroid-collision_test.go @@ -0,0 +1,54 @@ +package Problem0735 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + asteroids []int + ans []int +}{ + + { + []int{5, 10, -5}, + []int{5, 10}, + }, + + { + []int{8, -8}, + []int{}, + }, + + { + []int{10, 2, -5}, + []int{10}, + }, + + { + []int{-2, -1, 1, 2}, + []int{-2, -1, 1, 2}, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, asteroidCollision(tc.asteroids), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + asteroidCollision(tc.asteroids) + } + } +} diff --git a/Algorithms/0736.parse-lisp-expression/README.md b/Algorithms/0736.parse-lisp-expression/README.md new file mode 100755 index 000000000..2ce4cd1e3 --- /dev/null +++ b/Algorithms/0736.parse-lisp-expression/README.md @@ -0,0 +1,62 @@ +# [736. Parse Lisp Expression](https://leetcode.com/problems/parse-lisp-expression/) + +## 题目 + +You are given a string expression representing a Lisp-like expression to return the integer value of. + +The syntax for these expressions is given as follows. + +- An expression is either an integer, a let-expression, an add-expression, a mult-expression, or an assigned variable. Expressions always evaluate to a single integer. +- (An integer could be positive or negative.) +- A let-expression takes the form (let v1 e1 v2 e2 ... vn en expr), where let is always the string "let", then there are 1 or more pairs of alternating variables and expressions, meaning that the first variable v1 is assigned the value of the expression e1, the second variable v2 is assigned the value of the expression e2, and so on sequentially; and then the value of this let-expression is the value of the expression expr. +- An add-expression takes the form (add e1 e2) where add is always the string "add", there are always two expressions e1, e2, and this expression evaluates to the addition of the evaluation of e1 and the evaluation of e2. +- A mult-expression takes the form (mult e1 e2) where mult is always the string "mult", there are always two expressions e1, e2, and this expression evaluates to the multiplication of the evaluation of e1 and the evaluation of e2. +- For the purposes of this question, we will use a smaller subset of variable names. A variable starts with a lowercase letter, then zero or more lowercase letters or digits. Additionally for your convenience, the names "add", "let", or "mult" are protected and will never be used as variable names. +- Finally, there is the concept of scope. When an expression of a variable name is evaluated, within the context of that evaluation, the innermost scope (in terms of parentheses) is checked first for the value of that variable, and then outer scopes are checked sequentially. It is guaranteed that every expression is legal. Please see the examples for more details on scope. + +Evaluation Examples: + +```text +Input: (add 1 2) +Output: 3 + +Input: (mult 3 (add 2 3)) +Output: 15 + +Input: (let x 2 (mult x 5)) +Output: 10 + +Input: (let x 2 (mult x (let x 3 y 4 (add x y)))) +Output: 14 +Explanation: In the expression (add x y), when checking for the value of the variable x, +we check from the innermost scope to the outermost in the context of the variable we are trying to evaluate. +Since x = 3 is found first, the value of x is 3. + +Input: (let x 3 x 2 x) +Output: 2 +Explanation: Assignment in let statements is processed sequentially. + +Input: (let x 1 y 2 x (add x y) (add x y)) +Output: 5 +Explanation: The first (add x y) evaluates as 3, and is assigned to x. +The second (add x y) evaluates as 3+2 = 5. + +Input: (let x 2 (add (let x 3 (let x 4 x)) x)) +Output: 6 +Explanation: Even though (let x 4 x) has a deeper scope, it is outside the context +of the final x in the add-expression. That final x will equal 2. + +Input: (let a1 3 b2 (add a1 1) b2) +Output 4 +Explanation: Variable names can contain digits after the first character. +``` + +Note: + +- The given string expression is well formatted: There are no leading or trailing spaces, there is only a single space separating different components of the string, and no space between adjacent parentheses. The expression is guaranteed to be legal and evaluate to an integer. +- The length of expression is at most 2000. (It is also non-empty, as that would not be a legal expression.) +- The answer and all intermediate calculations of that answer are guaranteed to fit in a 32-bit integer. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0736.parse-lisp-expression/parse-lisp-expression.go b/Algorithms/0736.parse-lisp-expression/parse-lisp-expression.go new file mode 100755 index 000000000..bdab6eb53 --- /dev/null +++ b/Algorithms/0736.parse-lisp-expression/parse-lisp-expression.go @@ -0,0 +1,110 @@ +package Problem0736 + +import "strconv" + +func evaluate(expression string) int { + return helper(expression, nil) +} + +func helper(exp string, s *scope) int { + if exp[0] != '(' { + num, err := strconv.Atoi(exp) + if err != nil { + return s.get(exp) + } + return num + } + + // 删除外层的 "()" + exp = exp[1 : len(exp)-1] + var keyWord string + keyWord, exp = split(exp) + switch keyWord { + case "add": + a, b := split(exp) + return helper(a, s) + helper(b, s) + case "mult": + a, b := split(exp) + return helper(a, s) * helper(b, s) + default: + // 遇到 let 就意味着要生成新的 scope 了 + s = newScope(s) + var key, val string + for { + key, exp = split(exp) + if exp == "" { + break + } + val, exp = split(exp) + s.add(key, helper(val, s)) + } + return helper(key, s) + } +} + +// split 把 exp 分割成 pre 和 post +// 其中 pre 是 exp 中的第一个独立的块,post 则是剩下的部分 +// 比如 +// exp = "add 1 2" +// 则 +// pre = "add" +// post = "1 2" +// 又比如 +// exp = "(add x1 (add x2 x3))" +// 则 +// pre = "(add x1 (add x2 x3))" +// post = "" +func split(exp string) (pre, post string) { + n := len(exp) + i := 0 + if exp[0] == '(' { + countLeft := 0 + for i < n { + if exp[i] == '(' { + countLeft++ + } else if exp[i] == ')' { + countLeft-- + } + if countLeft == 0 { + break + } + i++ + } + } else { + for i+1 < n { + if exp[i+1] == ' ' { + break + } + i++ + } + } + + pre = exp[:i+1] + if i+1 == n { + post = "" + } else { + post = exp[i+2:] + } + + return +} + +type scope struct { + parent *scope + m map[string]int +} + +func newScope(parent *scope) *scope { + return &scope{parent: parent, m: make(map[string]int, 8)} +} + +func (s *scope) get(key string) int { + if val, ok := s.m[key]; ok { + return val + } + return s.parent.get(key) +} + +func (s *scope) add(key string, val int) { + s.m[key] = val +} diff --git a/Algorithms/0736.parse-lisp-expression/parse-lisp-expression_test.go b/Algorithms/0736.parse-lisp-expression/parse-lisp-expression_test.go new file mode 100755 index 000000000..e4a80a61d --- /dev/null +++ b/Algorithms/0736.parse-lisp-expression/parse-lisp-expression_test.go @@ -0,0 +1,79 @@ +package Problem0736 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + expression string + ans int +}{ + + { + "(let x0 4 x1 -2 x2 3 x3 -5 x4 -3 x5 -1 x6 3 x7 -2 x8 4 x9 -5 (mult x2 (mult (let x0 -3 x4 -2 x8 4 (mult (let x0 -2 x6 4 (add x5 x2)) x3)) (mult (mult -7 (mult -9 (let x0 -2 x7 3 (add -10 x0)))) x6))))", + 68040, + }, + + { + "(mult 3 (add 2 3))", + 15, + }, + + { + "(add 1 2)", + 3, + }, + + { + "(let x 2 (mult x 5))", + 10, + }, + + { + "(let x 2 (mult x (let x 3 y 4 (add x y))))", + 14, + }, + + { + "(let x 3 x 2 x)", + 2, + }, + + { + "(let x 1 y 2 x (add x y) (add x y))", + 5, + }, + + { + "(let x 2 (add (let x 3 (let x 4 x)) x))", + 6, + }, + + { + "(let a1 3 b2 (add a1 1) b2)", + 4, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, evaluate(tc.expression), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + evaluate(tc.expression) + } + } +} diff --git a/Algorithms/0738.monotone-increasing-digits/README.md b/Algorithms/0738.monotone-increasing-digits/README.md new file mode 100755 index 000000000..4e3614fc8 --- /dev/null +++ b/Algorithms/0738.monotone-increasing-digits/README.md @@ -0,0 +1,34 @@ +# [738. Monotone Increasing Digits](https://leetcode.com/problems/monotone-increasing-digits/) + +## 题目 + +Given a non-negative integer N, find the largest number that is less than or equal to N with monotone increasing digits. + +(Recall that an integer has monotone increasing digits if and only if each pair of adjacent digits x and y satisfy x <= y.) + +Example 1: + +```text +Input: N = 10 +Output: 9 +``` + +Example 2: + +```text +Input: N = 1234 +Output: 1234 +``` + +Example 3: + +```text +Input: N = 332 +Output: 299 +``` + +Note: N is an integer in the range [0, 10^9]. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0738.monotone-increasing-digits/monotone-increasing-digits.go b/Algorithms/0738.monotone-increasing-digits/monotone-increasing-digits.go new file mode 100755 index 000000000..5fbecf5c4 --- /dev/null +++ b/Algorithms/0738.monotone-increasing-digits/monotone-increasing-digits.go @@ -0,0 +1,24 @@ +package Problem0738 + +import ( + "strconv" +) + +func monotoneIncreasingDigits(n int) int { + s := []byte(strconv.Itoa(n)) + for i := len(s) - 2; 0 <= i; i-- { + if s[i] <= s[i+1] { + continue + } + + // 当 s[i] > s[i+1] 时 + s[i]-- + // s[i+1:] 中的数字全部变成 9 + for j := i + 1; j < len(s); j++ { + s[j] = '9' + } + } + + res, _ := strconv.Atoi(string(s)) + return res +} diff --git a/Algorithms/0738.monotone-increasing-digits/monotone-increasing-digits_test.go b/Algorithms/0738.monotone-increasing-digits/monotone-increasing-digits_test.go new file mode 100755 index 000000000..529d7fc83 --- /dev/null +++ b/Algorithms/0738.monotone-increasing-digits/monotone-increasing-digits_test.go @@ -0,0 +1,42 @@ +package Problem0738 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + n int + ans int +}{ + + {10, 9}, + + {1234, 1234}, + + {332, 299}, + + {1332, 1299}, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, monotoneIncreasingDigits(tc.n), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + monotoneIncreasingDigits(tc.n) + } + } +} diff --git a/Algorithms/0739.daily-temperatures/README.md b/Algorithms/0739.daily-temperatures/README.md new file mode 100755 index 000000000..571b656b0 --- /dev/null +++ b/Algorithms/0739.daily-temperatures/README.md @@ -0,0 +1,13 @@ +# [739. Daily Temperatures](https://leetcode.com/problems/daily-temperatures/) + +## 题目 + +Given a list of daily temperatures, produce a list that, for each day in the input, tells you how many days you would have to wait until a warmer temperature. If there is no future day for which this is possible, put 0 instead. + +For example, given the list temperatures = [73, 74, 75, 71, 69, 72, 76, 73], your output should be [1, 1, 4, 2, 1, 1, 0, 0]. + +Note: The length of temperatures will be in the range [1, 30000]. Each temperature will be an integer in the range [30, 100]. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0739.daily-temperatures/daily-temperatures.go b/Algorithms/0739.daily-temperatures/daily-temperatures.go new file mode 100755 index 000000000..b43ed5342 --- /dev/null +++ b/Algorithms/0739.daily-temperatures/daily-temperatures.go @@ -0,0 +1,21 @@ +package Problem0739 + +func dailyTemperatures(temperatures []int) []int { + n := len(temperatures) + res := make([]int, n) + + stack := make([]int, n) + + top := -1 + for i := 0; i < n; i++ { + for top >= 0 && temperatures[stack[top]] < temperatures[i] { + res[stack[top]] = i - stack[top] + top-- + } + + top++ + stack[top] = i + } + + return res +} diff --git a/Algorithms/0739.daily-temperatures/daily-temperatures_test.go b/Algorithms/0739.daily-temperatures/daily-temperatures_test.go new file mode 100755 index 000000000..d49ddbaa3 --- /dev/null +++ b/Algorithms/0739.daily-temperatures/daily-temperatures_test.go @@ -0,0 +1,45 @@ +package Problem0739 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + temperatures []int + ans []int +}{ + + { + []int{73, 74, 75, 71, 69, 72, 76, 73}, + []int{1, 1, 4, 2, 1, 1, 0, 0}, + }, + + { + []int { 71,76,71,76,71,76,76,71,76,71,71,71,76,76,76,76,71,76,76,76,71,76,71,76,76,76,71,71,76,76,76,71,71,71,76,71,76,76,76,71,76,71,71,76,76,76,71,71,71,71,71,71,71,71,71,71,71,71,76,71,76,76,76,71,71,76,76,76,76,71,76,71,71,71,76,71,76,71,76,76,71,71,71,76,71,71,76,76,71,71,71,71,76,71,71,71,71,76,76,71,76,76,71,71,76,71,71,76,71,71,71,71,76,71,76,76,76,76,71,71,76,76,76,76,71,76,71,76,71,76,76,71,71,71,76,71,71,71,71,71,76,71,76,71,76,71,71,76,71,71,76,71,71,71,71,71,76,76,76,76,71,76,76,71,71,71,76,71,76,71,71,76,76,76,76,71,71,76,71,76,76,76,76,76,71,76,76,71,71,71,71,71,76,76,71,71,76,71,76,71,76,76,71,71,76,76,71,76,71,71,71,76,76,76,76,76,76,71,71,76,76,71,71,76,76,76,76,71,76,76,76,76,76,71,76,76,76,76,71,76,71,71,71,71,76,76,76,76,71,76,71,71,76,71,76,76,71,76,71,71,76,71,76,76,76,76,76,71,76,71,71,76,71,71,71,76,76,76,71,76,76,71,76,71,71,76,76,76,71,71,76,71,76,76,71,76,71,76,76,71,76,71,71,71,71,76,71,71,76,71,76,76,76,71,71,76,71,76,76,76,76,71,76,76,71,76,76,76,76,71,76,76,76,76,71,76,76,76,71,71,71,71,71,76,76,71,71,76,71,76,71,71,71,76,76,76,71,71,76,71,76,71,71,71,71,76,76,71,76,71,76,71,76,71,76,71,71,71,71,76,71,71,76,76,76,71,76,76,76,76,71,76,76,71,76,76,71,71,71,76,71,71,76,71,76,71,71,76,76,71,76,71,76,76,71,71,71,76,71,76,76,71,71,76,71,76,71,76,76,71,71,71,76,71,76,71,71,71,71,76,71,71,76,71,76,76,76,71,76,76,76,76,71,71,76,71,76,76,71,76,76,71,76,76,71,76,71,71,71,71,76,76,71,71,76,76,76,71,76,71,71,76,76,76,71,71,71,71,76,71,71,71,76,76,76,76,76,71,76,76,71,71,71,76,76,76,71,71,71,76,76,76,76,76,76,76,76,71,76,76,76,76,76,71,76,71,76,71,71,71,76,71,76,71,76,76,76,76,71,76,71,71,71,76,71,71,76,76,76,71,71,76,76,71,71,71,76,76,71,76,76,71,76,71,71,76,71,76,71,76,76,71,71,76,76,71,76,71,71,71,76,71,76,76,76,71,71,76,76,76,76,71,71,71,76,71,76,71,71,76,71,76,76,76,76,76,76,76,71,76,76,76,71,71,71,76,76,76,71,76,76,76,71,71,76,71,76,71,71,76,76,76,76,71,76,76,76,76,71,71,76,71,71,76,76,71,71,76,71,71,76,76,76,76,76,71,71,76,76,76,76,71,71,71,76,71,71,76,76,71,71,76,76,71,76,76,71,76,76,76,76,76,76,76,71,71,71,71,76,76,71,76,71,71,76,76,71,76,71,71,71,71,76,71,71,76,76,71,76,76,71,76,71,71,76,76,76,71,76,71,71,76,71,76,71,76,76,76,71,76,71,71,71,71,76,76,71,76,76,76,76,71,71,71,71,76,71,71,76,76,76,76,71,76,71,76,76,76,76,71,76,76,76,76,71,76,71,71,76,76,76,76,76,76,76,76,71,71,76,76,76,76,76,76,76,71,76,71,76,71,76,76,71,76,76,71,71,71,71,76,71,71,76,71,76,76,76,76,76,71,71,76,76,76,71,71,71,76,71,76,76,71,76,71,76,76,76,71,76,71,76,76,76,76,76,71,76,71,76,76,76,71,76,71,71,76,76,71,71,71,71,71,76,76,76,71,76,71,71,76,71,76,71,76,71,76,76,76,71,76,71,76,76,76,71,76,76,76,71,71,76,76,71,76,71,71,71,76,76,76,71,71,76,76,76,71,76,71,71,71,76,71,76,76,76,76,76,76,71,76,71,71,71,76,76,76,76,76,76,76,71,76,71,76,76,76,71,71,71,76,71,71,76,76,71,71,76,76,76,76,71,76,76,71,71,76,71,71,71,71,76,71,76,76,76,71,71,71,76,71,76,76,76,76,71,76,71,71,76,76,71,76,71,76,76,71,71,71,76,76,71,76,76,71,76,76,76,76,76,71,76,71,71,76,71,76,76,76,71,71,76,76,71,76,71,76,71,71,71,71,76,71,76,71,71,76,76,71,76,76,71,76,76,76,76,76,71,71,76,76,71,76,71,71,71,71,71,71,71,76,76,71,76,76,76,71,76,71,76,76,71,71,71,76,76,76,71,71,76,76,76,76,76,71,71,76,76,76,76,71,71,71,76,76,71,76,71,71,71,71,71,76,76,71,71,71,76,71,71,71,71,76,76,71,76,76,71,71,76,71,76,71,71,71,71,76,76,76,76,76,76,71,76,76,76,76,76,76,76,71,76,76,76,71,76,76,71,76,76,76,76,76,71,71,76,76,76,76,76,71,76,76,76,71,76,76,71,76,76,71,71,71,71,76,71,76,71,76,71,76,76,71,71,76,76,71,71,76,71,76,71,71,71,71,76,71,71,76,76,71,71,76,71,76,71,76,71,76,76,71,71,71,71,71,71,71,76,71,71,71,71,71,76,76,71,76,76,76,71,76,71,71,76,76,71,71,76,71,76,71,76,76,71,71,76,76,71,71,71,76,71,76,76,71,71,76,71,76,76,71,76,71,76,76,71,71,76,71,76,71,71,76,71,71,71,76,71,76,71,71,76,76,71,71,71,71,76,76,76,71,71,76,71,71,76,76,71,71,76,71,71,71,71,71,76,71,71,71,76,76,71,71,71,76,76,71,71,71,76,71,76,76,76,76,71,71,71,76,76,76,71,71,71,71,71,76,76,71,71,71,71,71,71,76,76,76,71,76,76,76,76,71,71,76,71,71,71,76,76,71,76,76,71,76,76,71,76,71,71,76,71,76,76,71,71,71,76,71,76,71,76,76,71,71,76,76,71,76,71,71,76,76,71,76,76,71,76,76,71,76,76,76,71,71,76,76,76,71,71,71,76,76,71,71,76,71,71,71,76,76,71,76,71,71,71,76,71,71,71,76,76,76,71,76,76,71,71,76,71,76,71,71,71,76,71,71,71,76,76,71,76,71,71,71,71,76,71,71,76,76,76,71,71,76,76,71,71,76,71,76,71,76,71,76,71,71,76,71,76,76,76,76,71,76,71,76,76,71,76,71,76,76,71,76,76,76,71,76,71,76,71,71,71,76,71,76,71,76,76,71,76,71,76,71,71,71,76,76,71,76,76,76,76,71,71,71,76,71,71,71,76,76,71,76,76,76,71,76,71,76,76,76,76,76,71,71,76,76,76,71,71,71,76,71,71,71,76,71,76,71,76,71,71,76,71,71,76,76,71,71,76,76,76,71,76,71,76,76,76,76,71,71,76,71,76,71,76,71,76,76,76,71,76,76,71,71,71,71,71,71,71,71,71,76,76,76,71,76,71,76,71,76,71,76,76,71,71,76,71,71,71,76,71,76,71,76,76,71,76,71,76,76,71,76,76,76,76,71,76,76,76,71,76,76,76,76,76,76,71,76,76,76,76,76,71,76,76,76,71,76,76,76,76,76,71,71,71,71,71,71,76,76,71,71,76,76,76,76,71,76,76,76,71,76,71,76,71,76,71,71,76,76,71,76,71,71,76,76,71,71,71,76,76,76,71,71,76,71,76,76,76,76,71,71,71,76,71,71,76,76,71,71,76,71,76,71,76,76,76,76,76,76,71,71,76,76,71,71,71,71,71,71,71,71,71,76,71,71,71,71,76,76,71,71,76,76,76,71,76,76,71,76,71,71,76,71,71,71,76,76,71,71,71,76,76,71,76,71,76,71,76,76,76,76,71,76,71,71,71,76,71,71,71,71,71,71,71,71,71,71,71,71,71,71,76,71,71,71,71,76,71,71,71,71,71,71,76,76,71,76,71,71,71,76,71,71,71,71,76,71,76,71,71,71,71,71,76,76,76,71,71,71,76,76,71,76,71,76,76,76,76,76,76,76,71,76,76,76,76,71,71,76,76,76,71,71,71,76,76,76,71,71,76,76,76,71,76,71,71,76,71,71,76,76,76,76,71,71,71,71,71,76,76,76,76,76,71,71,76,71,71,76,71,71,76,71,76,76,76,71,71,76,76,76,71,71,71,71,71,71,76,76,76,71,76,71,71,71,76,76,71,76,76,71,76,76,76,76,76,71,76,76,76,71,71,71,76,71,76,71,76,71,76,76,71,71,76,71,76,71,71,71,76,76,71,76,76,76,76,76,71,71,76,76,71,71,71,71,71,76,76,76,71,71,76,76,71,76,76,76,76,71,76,76,71,71,76,76,71,71,71,71,76,71,76,76,71,76,76,76,76,76,76,76,76,71,76,76,76,76,71,71,71,71,71,76,76,76,71,76,76,71,76,71,71,76,76,71,76,71,76,76,76,71,71,76,71,76,71,76,71,71,76,76,76,76,71,76,76,76,76,71,76,71,71,71,71,71,71,76,76,71,71,76,71,71,76,76,71,71,71,71,71,71,71,71,76,76,76,71,76,71,71,71,71,76,71,71,71,71,76,71,71,71,71,71,76,71,71,71,71,71,76,71,76,76,76,76,76,71,76,76,71,71,76,76,71,71,71,71,76,71,71,71,76,71,76,71,76,76,76,71,76,76,76,76,76,76,76,76,71,71,71,76,71,71,71,71,71,76,76,76,76,71,76,71,71,76,71,76,71,71,76,76,71,76,76,76,76,76,76,71,76,76,71,76,71,71,76,76,76,71,76,71,71,76,76,71,76,71,76,76,71,76,71,71,71,71,76,76,71,76,71,76,76,76,76,71,76,71,76,76,71,76,71,71,76,76,76,71,76,76,71,71,71,71,71,71,71,71,76,76,76,76,71,71,71,76,76,71,71,71,71,76,76,76,76,71,76,71,76,71,76,71,76,71,71,76,71,76,76,71,71,76,76,71,76,71,71,76,71,76,76,76,76,71,76,76,71,71,71,71,71,76,71,71,76,76,71,71,71,71,76,76,71,76,71,76,71,76,76,76,76,71,71,71,71,71,76,76,76,71,71,76,76,76,76,76,76,71,76,76,76,71,71,71,71,76,71,76,76,76,71,76,76,76,76,76,71,76,71,76,76,76,76,71,71,76,76,71,71,76,76,76,71,71,76,76,71,76,76,76,71,71,71,76,76,71,76,71,76,76,71,71,76,76,71,76,71,76,76,71,76,71,76,71,76,76,71,71,71,76,76,71,76,71,71,76,76,76,71,76,76,71,71,71,76,76,76,71,71,71,71,71,71,76,71,71,76,71,71,76,76,76,76,71,76,76,76,76,76,76,76,71,76,71,71,71,76,76,71,71,71,71,71,71,71,76,76,71,76,71,71,76,71,71,71,76,76,71,71,76,71,76,76,71,71,71,71,76,71,71,76,71,76,71,71,71,76,76,76,71,71,71,76,76,76,76,71,71,76,76,71,71,71,76,71,76,71,76,71,71,76,76,76,71,71,71,76,71,76,76,71,71,76,76,71,76,76,76,76,76,71,76,76,71,76,71,76,76,76,76,76,76,71,76,76,71,76,76,76,76,71,71,71,71,71,76,71,76,76,76,71,71,76,71,71,76,76,76,76,76,76,76,76,71,76,71,71,71,71,71,76,76,76,71,71,76,71,71,76,76,71,76,71,71,76,76,71,76,76,76,76,71,71,71,71,71,76,76,76,71,71,76,71,76,76,71,76,76,76,71,71,71,76,76,76,76,71,71,76,71,71,71,71,71,76,76,76,76,71,76,76,76,76,71,76,71,71,76,76,76,71,76,76,71,76,71,71,71,71,71,71,76,71,71,71,71,76,71,76,76,76,76,71,76,71,71,76,76,76,76,71,76,76,71,76,71,71,71,76,76,76,76,76,71,71,71,76,71,71,71,76,71,71,71,76,71,71,71,71,76,71,71,71,71,71,76,71,71,76,76,76,71,71,76,76,71,71,71,76,76,71,76,71,71,76,71,71,76,76,71,76,76,71,71,76,71,76,76,71,71,76,76,76,76,76,71,76,76,71,71,71,71,71,71,71,76,76,71,71,71,71,71,76,71,76,71,71,76,71,76,71,71,76,76,76,76,71,76,76,76,71,76,71,71,71,71,71,76,76,76,71,76,76,71,71,76,76,71,71,76,76,71,76,71,71,71,76,76,76,71,71,71,76,76,71,76,71,76,71,76,76,71,76,76,71,76,76,76,71,71,76,71,71,76,71,71,76,76,71,76,76,71,76,71,76,76,71,76,76,71,71,71,71,71,76,76,71,71,76,76,71,71,76,71,71,71,76,71,71,76,71,71,76,71,71,71,76,76,76,71,76,76,76,71,76,76,76,71,76,71,71,71,71,71,76,71,71,76,76,71,71,76,76,76,76,76,71,71,76,76,76,76,71,76,71,76,76,71,71,71,76,76,76,71,71,76,71,76,76,71,76,76,76,76,76,71,71,71,71,71,71,76,71,76,71,76,71,76,76,76,71,76,76,71,71,76,76,76,71,76,71,76,76,71,71,76,76,76,76,71,76,71,76,71,71,71,76,76,76,76,76,71,76,76,76,71,71,71,71,76,76,76,71,76,76,71,76,71,71,76,71,76,76,76,76,76,76,71,76,71,76,71,76,76,71,71,76,76,71,76,71,71,71,76,71,76,71,76,76,76,71,76,76,71,71,76,71,76,71,71,71,71,71,76,76,76,76,76,71,76,71,71,71,76,71,71,71,76,76,71,71,76,76,71,71,71,76,71,76,71,71,71,71,76,76,71,71,76,76,71,71,76,76,71,76,76,71,76,71,76,76,71,71,76,76,76,76,71,76,76,76,71,71,76,76,71,76,71,71,71,76,71,76,71,71,71,76,71,76,71,76,71,71,76,76,76,76,76,76,76,71,71,71,76,76,76,76,76,76,76,71,71,71,71,71,71,71,71,71,71,71,71,71,76,76,71,71,76,76,76,76,71,71,71,71,71,71,71,71,71,76,71,71,71,71,76,71,76,71,71,71,76,71,76,71,71,71,71,71,71,76,76,76,71,76,71,76,76,71,71,76,76,76,71,71,76,71,76,76,76,71,76,76,71,71,76,71,71,71,71,71,71,76,71,71,76,71,71,71,71,71,76,76,76,71,71,71,76,71,76,71,71,76,76,76,76,71,71,71,76,71,71,71,71,71,71,71,76,76,76,76,71,71,71,71,76,71,71,71,76,76,71,71,71,76,76,71,76,71,76,76,76,71,71,71,71,71,76,76,76,71,71,76,71,71,76,76,76,71,71,71,76,76,76,71,76,76,71,71,71,71,71,71,71,76,71,71,71,76,76,76,76,71,76,76,71,76,71,71,71,71,76,76,71,71,71,76,76,71,76,76,71,71,71,76,71,71,76,76,76,76,71,76,76,76,71,76,71,71,71,71,71,71,71,76,71,76,76,76,76,76,71,71,76,76,76,76,71,76,71,76,76,71,71,71,76,76,76,71,76,71,76,71,76,71,71,76,76,76,76,71,71,71,71,71,76,76,76,76,71,76,71,71,71,76,71,71,76,71,71,76,71,76,71,76,71,76,76,76,76,76,71,76,76,76,71,71,71,76,71,76,71,71,76,71,71,71,71,76,71,76,76,76,71,71,76,71,71,76,71,71,71,76,76,71,76,71,76,71,71,71,71,71,76,71,76,76,71,71,76,71,76,76,71,71,76,76,76,76,76,76,71,76,76,76,76,71,76,76,76,76,71,71,71,76,76,76,76,71,71,76,71,76,76,76,71,76,76,71,71,71,76,76,76,71,71,76,76,71,76,76,76,71,71,76,71,71,71,76,71,71,71,76,76,71,76,76,76,71,71,76,71,71,76,76,71,71,71,76,76,76,71,76,71,76,71,76,71,71,76,71,76,76,71,71,76,76,71,76,71,71,71,76,71,71,76,71,71,71,71,71,71,76,76,76,76,76,71,76,71,71,71,71,71,71,76,71,76,71,76,71,76,71,76,71,71,76,76,76,71,71,71,76,71,71,76,71,76,71,71,71,76,76,71,76,71,71,71,76,71,71,71,76,76,71,71,76,76,71,76,71,76,71,71,76,76,76,71,71,76,71,71,76,76,71,76,71,76,76,76,76,76,71,76,71,76,76,76,76,71,76,71,71,76,76,76,71,76,76,76,76,71,76,71,76,76,71,76,71,71,71,71,76,76,76,71,76,71,71,76,76,76,71,71,71,71,71,76,76,71,71,76,76,71,76,71,76,71,76,71,71,76,71,71,76,71,71,71,71,76,76,71,76,71,76,76,71,76,71,71,71,76,76,76,71,76,71,76,71,76,76,71,71,76,76,71,76,71,71,76,76,76,76,71,76,71,71,76,76,71,76,71,71,71,71,71,76,71,76,76,71,76,76,71,76,76,76,71,76,76,76,71,71,71,76,71,76,76,71,71,76,71,76,76,71,76,71,76,71,71,76,76,76,71,76,76,76,76,71,76,71,76,71,76,71,76,76,76,71,71,71,71,76,71,71,71,71,76,71,71,76,71,76,76,76,76,71,76,76,71,71,76,71,76,71,71,76,76,71,71,71,76,71,76,71,71,76,71,76,76,71,71,71,71,76,76,76,76,71,76,71,76,71,76,76,76,71,76,71,76,71,71,76,71,71,76,76,76,71,76,71,71,71,76,76,76,71,71,76,76,71,76,76,76,71,71,76,76,76,76,71,71,71,76,76,76,76,76,76,71,76,71,76,71,71,71,76,71,76,76,76,76,71,76,71,76,76,71,76,76,76,76,76,76,76,76,76,71,71,76,71,71,71,76,71,71,76,71,76,71,71,76,71,71,76,71,76,76,71,71,71,71,76,76,71,76,71,71,76,71,76,71,76,71,71,76,71,71,76,71,76,71,71,76,76,76,76,76,71,76,76,71,76,71,76,71,76,71,71,76,71,71,76,76,71,76,71,71,71,76,71,76,71,76,71,71,76,76,71,71,76,76,71,71,76,76,71,76,71,71,76,71,76,76,71,71,71,76,76,76,71,76,71,76,71,71,71,71,71,76,76,71,71,71,76,76,71,71,71,76,76,76,76,76,71,71,76,71,71,76,76,76,76,71,71,71,71,71,71,71,76,76,76,71,71,76,76,76,76,71,71,71,76,71,71,71,76,76,71,76,76,71,71,76,71,76,71,76,76,71,71,76,76,76,71,71,71,76,71,71,71,76,71,71,71,76,71,76,76,71,71,71,71,71,71,76,76,71,71,76,76,76,71,76,76,76,76,76,76,76,76,71,76,76,76,76,71,76,71,76,71,71,71,76,76,76,76,76,71,71,71,71,71,71,71,71,76,76,76,76,71,71,71,76,71,71,76,71,71,76,76,71,76,76,71,71,76,76,76,76,71,71,71,76,76,71,76,76,76,76,71,76,76,76,76,71,76,76,76,76,76,71,76,76,71,76,71,71,76,71,71,76,71,71,76,71,71,71,76,71,76,76,71,71,71,76,76,71,71,71,71,71,71,71,71,71,71,76,76,76,76,76,76,76,76,71,71,76,71,71,76,71,76,76,71,76,71,71,76,76,76,76,71,76,76,71,76,71,71,71,71,71,71,76,71,76,71,76,76,71,76,76,71,76,71,71,76,71,71,76,76,76,76,71,76,76,71,76,71,76,71,71,76,76,71,76,71,71,71,76,76,76,76,76,71,71,76,76,71,71,76,76,76,71,76,76,76,71,76,76,76,76,71,71,76,71,76,76,71,76,76,76,71,76,71,71,71,76,76,76,76,76,76,76,76,76,71,71,76,71,71,71,71,76,76,76,76,71,76,71,71,71,76,76,76,71,76,76,76,71,71,71,76,71,76,76,71,76,71,76,71,71,76,71,71,76,76,71,76,76,71,76,71,76,76,76,76,71,76,76,76,71,76,71,71,76,76,71,76,71,76,76,71,71,71,71,71,71,76,71,71,71,71,71,76,76,76,71,76,71,76,76,76,76,76,71,71,71,71,76,71,71,76,76,76,71,71,76,71,71,76,76,76,76,76,76,71,71,71,76,76,71,76,71,71,76,76,76,76,71,71,71,76,76,71,71,76,76,71,71,71,76,76,76,71,71,71,76,76,76,76,71,76,76,71,71,71,76,76,71,76,76,76,71,71,71,76,76,76,76,71,71,71,71,71,71,71,71,71,71,76,76,71,76,71,76,71,76,76,71,71,76,71,71,71,71,71,76,76,71,76,76,71,71,71,71,76,76,76,76,76,71,76,76,76,71,71,71,71,76,76,71,76,71,76,76,76,71,71,71,71,71,71,76,71,76,76,71,71,76,76,71,76,76,76,71,76,71,76,76,71,71,76,71,71,71,76,71,71,76,76,71,76,71,76,71,76,71,76,76,76,71,71,76,71,71,71,76,76,76,71,71,76,71,71,71,71,76,71,76,71,71,76,76,71,71,71,71,71,76,71,71,71,76,71,71,71,76,76,76,76,76,71,76,71,76,76,71,71,71,76,71,76,76,76,76,71,76,76,71,76,71,76,76,76,76,71,76,76,71,71,71,71,71,76,76,76,76,76,71,71,71,71,71,71,71,71,76,76,71,76,76,71,71,71,76,71,71,71,76,76,76,76,71,76,76,71,76,71,71,71,76,71,76,76,76,76,71,76,71,76,76,76,76,76,76,76,76,71,76,71,71,76,76,71,71,76,71,76,76,76,76,76,76,76,76,76,71,76,76,76,76,76,76,71,76,76,76,76,71,76,76,71,71,76,76,76,76,71,76,71,71,71,76,71,76,76,71,76,76,71,76,71,71,76,71,76,76,71,71,71,71,71,76,76,71,76,71,76,76,71,76,71,76,71,76,71,76,76,71,76,71,71,71,76,76,76,76,76,71,71,76,76,71,71,71,76,76,71,71,76,71,71,76,71,76,76,76,76,71,71,76,71,76,71,76,76,76,71,76,71,76,76,71,71,76,71,76,76,71,76,76,71,71,76,76,71,76,76,71,76,76,71,71,76,76,71,76,76,76,76,71,71,76,71,71,71,71,71,71,71,76,71,71,71,71,76,71,71,76,76,76,71,71,71,76,71,76,71,76,71,76,76,76,71,71,76,71,71,76,76,71,76,76,71,76,76,71,76,76,76,76,76,71,76,71,71,76,76,76,71,71,71,76,71,71,76,76,71,76,76,71,71,71,71,76,76,76,76,76,71,71,71,71,76,71,76,71,71,71,71,71,76,76,76,71,71,76,76,71,76,76,71,71,76,71,76,76,71,71,71,71,76,71,71,71,76,76,76,76,76,76,71,71,76,71,71,76,76,76,76,76,76,76,76,71,71,71,76,71,71,71,71,76,71,76,76,71,71,76,71,71,71,71,71,71,71,76,76,71,76,76,71,76,71,71,71,71,71,76,71,76,76,76,71,76,71,76,71,76,71,76,71,71,71,71,76,76,71,71,76,76,71,71,76,76,71,71,76,71,71,76,71,76,71,76,76,71,71,71,76,76,71,71,76,71,76,71,71,71,71,76,71,76,76,71,71,71,76,71,76,76,76,71,71,71,76,71,76,71,71,71,76,76,76,76,71,76,76,76,76,76,71,76,71,71,76,76,71,76,71,71,71,71,71,76,71,76,71,71,76,71,76,71,71,71,71,76,71,76,71,71,71,71,71,71,76,71,76,76,71,71,76,71,71,71,76,76,76,71,76,71,76,71,71,76,71,76,71,71,76,76,76,71,76,71,76,76,76,76,71,76,71,71,71,76,76,71,71,76,71,76,76,71,71,76,76,71,76,76,76,71,71,71,71,76,71,76,71,71,76,71,71,71,76,71,71,71,71,76,76,76,76,76,76,71,76,76,71,76,76,71,71,76,71,76,71,71,76,71,76,76,71,71,71,76,76,76,71,71,76,71,71,76,76,76,71,76,71,76,71,71,76,76,71,71,76,71,71,76,76,76,76,76,76,76,76,76,76,71,76,76,76,71,71,71,71,71,76,76,76,71,76,76,71,71,76,76,71,76,76,71,76,76,76,71,71,76,76,71,76,76,71,76,71,76,71,76,76,71,71,71,71,71,76,76,76,71,76,71,76,71,71,71,71,71,71,76,71,71,76,76,76,76,71,76,76,76,71,76,76,76,76,76,71,76,76,76,76,71,76,76,76,76,76,76,71,71,76,71,71,71,76,76,71,76,71,71,71,76,76,71,71,71,76,71,76,76,71,71,71,71,76,71,76,71,71,76,76,71,71,71,76,71,76,71,76,71,71,71,76,76,71,76,71,76,71,71,76,76,71,76,71,71,76,76,71,76,71,71,71,71,76,76,76,76,71,76,76,71,76,71,76,71,76,76,71,71,71,76,76,76,76,76,76,76,71,76,71,76,71,71,71,76,76,76,71,71,71,76,71,71,71,76,76,76,76,71,76,71,71,71,76,76,71,76,76,76,76,71,71,71,76,76,76,71,71,71,71,71,71,71,71,71,76,71,71,71,71,71,76,71,71,71,76,76,76,71,71,71,71,71,76,76,71,76,71,71,71,76,71,71,76,71,76,76,76,71,76,76,76,76,71,76,71,71,71,76,76,76,71,76,76,76,71,71,71,71,76,71,76,71,71,76,76,76,71,76,76,76,76,71,76,71,76,76,71,76,71,76,71,71,71,71,76,71,71,71,76,76,76,71,76,71,71,71,76,71,71,71,71,76,71,71,71,71,71,71,76,71,71,71,76,71,71,71,76,76,71,76,76,76,71,76,71,71,76,71,76,71,71,76,71,71,76,71,76,71,76,71,76,71,76,71,76,76,76,76,71,76,71,71,76,76,71,76,71,76,76,76,71,71,76,76,76,76,71,71,71,71,71,71,76,76,71,76,76,76,71,71,71,71,71,76,71,71,76,76,71,71,76,71,71,71,71,71,71,71,71,71,76,76,76,71,71,76,76,71,71,71,71,76,71,71,71,76,76,71,76,71,71,71,71,76,71,71,76,76,76,71,76,71,71,76,76,71,71,76,76,71,71,76,76,71,71,76,76,71,76,71,76,71,76,76,76,71,76,76,71,76,76,71,71,76,71,76,71,71,71,71,71,71,76,76,76,76,76,76,76,76,71,76,71,76,71,71,71,76,76,76,76,76,71,76,76,71,76,71,76,76,76,76,71,71,71,71,71,76,71,76,71,71,71,71,71,71,76,76,76,71,71,71,71,71,71,71,76,71,76,76,76,71,71,76,76,71,76,76,76,71,71,71,76,71,76,71,71,76,71,71,76,71,71,76,76,76,71,71,71,76,71,76,76,76,76,71,76,71,71,76,71,71,76,76,76,76,76,76,71,71,71,71,76,76,71,71,71,71,76,76,71,71,71,76,71,71,71,71,76,71,76,76,71,76,76,71,71,76,76,71,76,76,71,71,71,71,76,71,76,76,71,76,76,71,76,71,76,76,71,76,71,71,76,76,71,76,71,76,71,71,76,71,76,71,76,76,76,76,76,71,71,76,76,71,76,71,71,71,76,76,71,71,71,71,71,76,71,76,76,71,71,71,76,76,76,76,71,76,71,71,71,71,76,76,76,76,71,71,76,76,71,71,71,71,71,76,76,76,71,76,76,76,71,71,76,71,76,71,71,76,71,71,71,76,76,76,71,71,71,76,71,76,71,76,76,71,76,76,71,76,71,76,71,71,76,71,71,76,76,76,76,76,71,71,76,76,76,71,71,76,76,71,76,76,71,76,76,76,76,76,71,71,71,76,76,76,71,76,76,71,71,76,71,76,71,71,76,71,76,76,76,71,71,71,71,71,76,71,76,71,71,71,71,71,71,71,71,76,76,76,71,76,71,76,71,71,71,76,71,71,76,71,76,71,71,76,76,71,71,71,76,76,76,71,76,76,76,71,76,71,76,76,76,76,71,76,71,71,71,76,76,76,76,76,76,76,76,71,71,76,76,71,76,71,71,76,71,76,76,76,71,71,71,76,76,76,71,71,71,71,76,76,71,71,71,71,76,71,71,76,71,71,71,76,71,76,76,71,71,71,71,71,76,71,76,71,76,71,71,76,71,76,71,71,71,76,76,71,76,71,76,71,71,76,76,76,76,71,76,71,76,76,71,76,76,71,71,71,71,76,76,71,71,71,71,71,76,71,71,71,76,76,71,76,71,76,71,71,76,76,76,76,71,76,76,76,76,76,71,71,76,76,71,76,71,71,76,76,71,76,76,71,76,76,71,76,76,71,76,76,76,71,71,71,71,76,76,71,76,71,76,76,76,71,71,71,71,71,76,76,76,76,71,71,76,76,71,71,71,76,71,71,76,71,76,76,71,76,71,71,76,71,76,76,76,76,76,76,76,76,76,71,76,71,76,71,71,71,76,71,76,71,71,71,76,76,76,71,76,76,71,76,76,76,76,76,76,71,71,76,76,76,71,71,76,71,76,71,71,76,71,71,71,71,76,71,71,71,71,76,76,71,71,76,76,71,71,71,76,71,76,71,71,76,76,71,76,71,76,76,71,71,76,76,71,71,76,71,71,76,76,76,71,71,71,76,71,71,76,71,76,76,76,71,76,71,71,71,71,71,76,76,76,71,76,76,71,76,76,76,71,76,71,76,71,71,71,76,71,76,71,76,71,71,71,71,71,71,76,76,71,71,76,71,71,76,76,71,71,76,71,71,76,71,71,76,71,76,71,76,71,76,76,71,71,76,76,71,76,71,76,76,71,71,76,71,76,71,71,76,71,76,76,71,71,76,71,76,71,71,76,76,71,71,76,76,71,71,76,76,76,76,76,76,71,71,71,71,71,76,76,76,71,76,71,76,71,76,76,76,71,76,71,76,76,76,71,76,76,76,71,76,71,76,76,76,71,76,71,71,71,71,76,71,71,71,76,71,76,76,76,76,76,76,71,71,71,76,76,71,71,71,71,71,71,76,76,71,71,76,71,71,71,71,76,76,76,76,71,71,76,71,71,76,71,71,76,71,76,76,76,76,71,71,71,71,71,71,71,76,76,71,76,71,71,76,71,71,71,71,71,76,76,71,71,76,71,76,71,76,76,76,76,71,71,71,71,71,71,76,71,71,71,71,76,76,71,76,71,71,76,71,71,71,71,76,76,71,71,76,71,71,76,71,76,71,71,71,76,76,71,71,71,76,71,76,71,76,71,71,71,76,76,71,76,71,76,71,76,76,76,71,71,76,71,71,71,76,71,71,76,76,76,76,76,71,76,76,71,71,76,71,71,76,71,71,76,76,71,76,76,71,76,71,71,76,71,71,71,76,71,76,76,76,71,76,71,76,71,71,71,76,76,71,76,71,76,71,76,71,71,71,76,76,71,71,71,76,71,76,71,76,71,71,71,71,76,71,71,76,71,76,71,76,76,76,76,71,76,71,76,76,71,71,71,76,71,71,76,71,71,76,76,76,71,71,76,71,76,71,71,76,76,71,71,71,76,71,71,71,76,76,71,76,71,76,71,76,71,71,76,71,76,71,76,76,76,71,71,71,71,71,71,71,71,71,71,71,71,71,71,76,71,76,71,71,71,71,71,71,76,76,71,76,76,71,71,71,71,71,76,71,76,76,71,76,71,71,71,76,71,71,71,76,76,71,76,76,71,76,76,71,76,71,76,76,76,76,76,71,76,71,71,76,71,76,76,76,71,76,71,76,76,76,71,76,76,71,76,71,76,76,76,76,71,71,76,71,71,76,71,76,71,76,76,71,71,71,76,71,76,76,71,76,76,71,76,76,76,76,71,76,76,71,71,71,76,76,76,76,71,71,71,71,71,76,76,76,76,76,76,71,76,76,76,71,76,76,71,71,71,76,71,76,76,76,71,76,76,76,71,76,71,71,76,71,76,76,76,76,71,71,76,76,76,76,76,76,76,76,76,76,76,76,76,76,71,76,71,71,76,71,76,71,71,76,71,71,71,76,71,76,71,71,76,76,76,71,76,71,76,76,71,71,76,76,71,71,76,76,76,76,71,76,71,76,71,71,76,76,71,76,71,71,76,76,76,71,76,71,76,71,71,76,71,71,76,71,71,71,76,71,76,76,76,76,76,71,76,76,76,76,71,71,76,76,71,71,71,76,76,71,76,71,71,71,76,71,71,71,76,71,71,76,71,76,71,76,71,76,71,71,76,71,76,76,71,76,71,71,76,71,71,76,76,71,71,76,76,71,76,76,71,76,76,71,71,76,71,71,71,76,71,71,76,71,71,71,71,71,76,71,76,71,71,76,76,71,76,76,76,71,76,76,76,71,76,76,71,71,71,71,76,76,71,71,71,71,71,71,71,71,71,71,71,76,71,76,76,76,71,71,71,76,71,76,71,76,71,71,76,71,76,71,76,71,71,71,71,71,76,71,76,76,76,76,76,76,76,76,76,71,71,76,76,76,71,71,76,71,76,76,71,71,71,76,71,71,76,76,71,71,71,76,71,71,76,71,71,71,71,71,71,71,76,71,76,76,76,76,76,76,76,76,76,76,71,71,71,76,71,76,76,76,76,76,76,76,71,76,76,76,76,71,71,76,71,71,76,71,71,71,71,76,76,71,76,76,76,71,71,76,71,71,71,76,76,76,76,71,76,76,76,76,71,71,76,71,71,76,76,71,71,71,76,71,76,76,76,76,71,71,71,76,71,76,76,76,76,76,76,76,71,76,71,71,76,76,76,76,76,71,71,71,71,71,76,76,71,76,71,76,76,76,71,71,71,71,71,76,76,76,71,76,76,71,76,76,71,76,71,76,76,76,71,76,71,71,71,76,76,76,71,76,71,71,71,76,71,76,71,71,71,76,76,71,71,71,76,71,71,71,76,76,76,71,71,71,76,71,71,71,71,71,76,71,76,71,76,76,76,71,76,76,76,76,71,76,71,71,71,71,71,71,76,76,76,71,76,76,76,76,76,71,76,76,71,76,76,76,76,71,71,71,71,76,71,76,71,76,76,71,76,71,76,71,76,71,76,71,76,76,76,76,76,71,76,71,71,76,71,76,71,71,71,71,71,71,76,76,76,71,71,76,71,76,71,71,76,71,76,71,71,76,76,71,76,76,71,76,76,76,71,71,76,76,71,76,76,76,76,76,76,76,76,71,71,76,76,71,76,71,71,71,71,71,76,76,71,76,71,76,71,71,71,76,76,76,71,76,76,76,76,76,76,76,76,71,76,71,71,76,71,71,71,71,71,71,71,71,71,71,76,76,71,71,76,71,76,76,71,71,71,71,76,71,71,71,76,71,76,76,76,71,71,76,71,76,76,76,76,71,76,71,76,71,71,71,71,71,76,71,76,71,71,71,71,76,71,71,76,71,76,76,76,76,76,76,76,76,71,76,76,71,71,76,71,71,76,71,76,71,71,76,76,76,76,71,71,76,71,71,76,76,76,76,76,71,71,76,71,71,71,76,76,76,71,76,71,71,76,71,71,76,76,71,71,76,71,71,71,71,76,71,71,76,71,76,76,76,71,76,71,76,71,71,71,71,71,76,76,71,71,71,71,71,71,76,76,71,71,71,71,71,76,71,71,71,71,76,71,76,76,76,76,71,71,71,71,76,76,76,71,76,76,76,76,71,76,71,71,71,71,76,71,76,71,71,76,76,76,71,76,76,76,71,71,76,71,71,76,71,76,71,76,71,76,71,71,71,71,71,71,76,76,76,71,71,71,76,71,71,71,76,76,71,76,76,71,76,76,76,76,76,71,71,76,71,76,76,76,76,71,76,76,76,76,76,71,71,76,71,76,76,76,76,71,71,76,76,71,71,76,76,76,76,71,71,76,71,76,76,71,71,71,76,76,76,76,71,71,76,76,76,76,76,76,71,71,71,76,76,71,71,71,76,76,76,71,76,76,71,71,76,71,76,71,71,71,71,71,76,71,76,71,76,71,71,71,76,71,71,71,71,76,71,76,76,71,76,71,71,71,71,71,71,76,71,71,76,76,76,76,71,71,76,71,76,76,76,76,76,76,76,76,76,76,76,76,76,71,71,71,71,76,71,76,71,71,71,76,71,76,71,71,71,76,76,76,71,71,76,71,76,76,76,76,71,76,76,76,76,71,71,76,71,71,76,71,71,76,76,76,76,71,76,71,71,76,76,76,76,71,71,71,71,71,71,71,71,71,76,76,76,76,76,76,71,76,76,76,71,71,71,76,76,71,71,76,76,76,71,71,71,71,71,76,76,71,76,71,76,71,71,76,71,71,71,71,76,76,71,76,76,71,76,76,71,76,76,71,71,76,76,71,76,76,71,76,71,71,71,76,76,71,76,76,76,76,71,71,71,76,71,76,76,76,76,76,71,71,71,76,71,71,76,71,71,76,76,71,71,71,76,71,76,71,71,71,76,76,71,71,76,71,76,71,76,76,71,71,71,71,71,76,71,76,71,76,71,71,76,76,71,76,71,76,71,71,71,71,76,76,76,71,71,76,71,71,76,71,71,76,76,76,71,71,71,76,71,76,71,76,76,76,71,71,76,71,71,71,76,76,76,76,76,71,71,76,71,71,76,76,76,76,71,71,76,76,76,76,76,71,71,76,71,71,71,71,76,71,76,71,71,76,71,76,71,76,76,76,76,71,71,76,71,71,71,76,71,76,76,71,76,71,71,71,76,71,76,71,71,76,76,71,71,71,76,76,71,71,71,76,71,71,71,71,71,76,76,76,71,71,76,71,71,76,71,71,71,76,76,76,71,76,76,76,71,76,71,76,71,71,76,76,71,76,76,76,71,71,76,71,71,71,71,76,76,71,71,76,71,71,71,71,76,76,76,71,76,71,76,76,76,76,71,71,71,71,71,76,76,71,76,71,71,76,71,71,71,76,71,71,76,76,71,76,71,76,71,76,76,76,71,71,76,71,76,71,76,76,71,71,76,71,71,76,76,76,71,76,71,71,71,71,76,71,71,71,71,76,71,71,76,76,76,71,76,76,76,76,76,76,71,76,76,71,76,76,71,71,71,76,76,71,71,71,71,71,76,71,71,76,76,76,71,76,71,76,76,76,71,76,76,76,71,71,71,76,76,76,76,76,76,71,76,76,76,76,71,76,71,76,71,76,76,71,76,76,71,71,76,76,71,71,71,76,76,76,71,71,71,71,71,71,71,71,71,76,71,71,76,71,76,71,76,76,71,76,71,76,76,76,76,76,71,76,71,76,71,71,76,71,76,71,76,76,71,76,71,71,76,71,71,71,76,71,71,71,71,71,71,76,71,76,71,71,76,76,76,71,76,76,71,71,76,76,76,76,71,71,76,76,71,76,76,71,76,71,76,76,71,71,71,76,71,76,76,71,71,71,71,76,71,76,71,71,76,76,71,76,71,71,76,76,71,76,71,76,71,71,76,76,76,71,71,71,76,76,71,76,76,76,71,76,71,76,76,76,71,71,71,76,76,71,71,76,76,71,76,76,71,71,71,76,76,76,71,76,76,71,71,71,71,71,76,71,71,76,76,71,76,71,76,76,71,71,76,71,76,71,71,76,71,76,71,71,71,71,76,76,76,76,71,76,71,76,71,76,71,71,71,71,71,71,71,71,76,71,76,76,76,76,71,76,71,76,76,71,71,76,76,76,76,71,71,71,71,71,71,71,76,71,71,76,76,76,71,76,76,71,71,71,71,71,76,71,71,76,76,76,71,71,71,71,76,71,71,71,76,71,76,71,71,76,71,71,71,71,71,76,76,76,71,71,76,71,76,76,71,76,71,71,76,76,71,76,71,76,71,71,71,76,76,71,76,76,71,71,71,71,76,71,71,76,76,76,76,76,71,76,71,76,71,76,71,76,76,71,76,76,76,71,76,71,76,76,71,76,76,76,71,71,71,71,76,71,76,76,71,71,76,76,76,76,76,71,71,71,76,71,76,71,76,71,76,71,71,71,71,71,71,71,71,71,76,76,76,76,76,76,76,71,71,71,76,76,71,71,71,76,76,76,76,71,76,76,76,76,76,76,71,71,71,71,71,71,71,76,71,76,76,71,71,76,71,71,71,71,71,76,76,71,71,76,71,71,76,76,76,71,76,71,76,76,71,76,71,71,71,76,71,71,76,76,71,71,76,71,76,71,76,71,76,76,71,76,71,76,71,76,76,76,71,71,76,76,71,71,71,76,71,71,76,76,71,76,76,76,76,71,71,76,76,71,76,71,71,76,71,76,76,71,76,71,71,71,71,71,71,76,76,71,76,71,76,76,76,76,76,76,71,71,76,76,76,71,71,71,71,76,71,71,71,76,71,71,71,76,71,76,76,71,71,71,76,76,76,71,71,76,71,76,71,71,71,71,76,76,76,76,76,76,76,76,71,71,76,71,71,76,71,76,76,76,76,71,71,71,76,76,76,71,76,71,71,71,71,71,71,71,71,76,76,71,76,71,76,76,76,76,71,76,71,71,71,71,71,76,76,76,76,76,76,71,76,76,76,76,76,76,71,71,76,71,76,76,71,76,76,76,71,71,71,71,76,71,71,71,76,76,76,71,71,76,76,71,76,71,71,76,71,71,76,76,76,71,71,71,76,71,71,76,76,71,71,71,76,71,71,71,71,71,71,71,71,76,76,71,76,71,76,76,71,76,76,76,71,71,71,76,76,71,71,76,71,71,76,76,76,71,71,76,71,71,76,76,76,76,76,71,71,71,76,71,71,76,76,76,76,76,71,71,76,76,76,71,76,71,71,71,76,76,76,76,71,76,76,71,71,71,76,71,76,76,71,71,76,71,71,76,71,76,76,71,76,76,76,76,71,71,71,76,76,71,71,71,71,76,71,71,71,76,76,71,71,76,71,76,76,76,71,76,76,76,76,71,71,71,76,76,76,71,76,76,71,76,71,76,76,71,71,71,76,71,71,76,71,76,76,71,76,76,71,76,76,71,71,76,71,71,76,71,71,76,71,71,71,71,76,71,76,71,76,76,76,76,76,71,71,71,76,71,71,76,71,76,71,71,76,71,71,71,76,71,71,71,71,71,71,71,71,71,71,76,76,76,76,71,76,71,71,71,76,76,76,76,76,76,71,71,76,71,71,76,76,71,71,71,76,76,71,71,71,76,76,76,76,71,76,76,76,71,71,76,76,71,76,76,76,76,71,71,76,76,76,71,71,76,71,71,71,76,71,71,76,71,76,76,71,71,76,71,76,71,76,71,71,76,71,71,71,71,71,76,71,76,76,71,71,76,71,71,76,71,76,71,76,71,76,76,76,76,71,71,71,71,76,76,76,76,71,76,76,76,71,76,71,71,71,71,71,76,71,76,71,71,71,71,71,76,71,71,71,76,76,76,76,76,76,71,71,76,76,76,76,71,76,76,76,76,71,76,76,76,71,76,76,76,71,76,76,71,76,76,71,76,76,71,76,71,71,71,76,71,76,76,76,71,76,76,76,71,71,76,71,71,76,76,71,76,71,71,71,76,71,71,71,76,71,76,71,76,76,71,76,71,76,76,76,71,71,71,71,71,71,71,71,71,71,71,71,76,76,71,76,76,76,76,71,71,76,71,76,71,76,71,76,76,76,76,71,76,71,71,76,76,76,76,71,76,76,71,76,71,71,71,71,76,71,76,71,76,76,76,76,76,76,71,76,71,76,76,71,76,76,76,71,76,76,71,71,76,76,71,71,71,76,76,76,71,71,71,71,71,76,76,71,76,71,76,71,76,71,76,76,71,76,76,76,76,76,71,71,71,76,71,76,71,76,71,76,71,71,71,76,76,76,71,76,71,76,71,71,76,76,71,76,76,76,71,76,71,71,71,71,71,76,71,76,71,76,76,71,71,76,71,76,71,76,76,71,71,71,76,76,71,71,71,76,76,76,71,71,76,76,71,76,71,71,71,71,76,71,71,71,76,71,71,76,76,71,71,71,71,71,71,76,71,76,76,76,76,71,76,71,71,76,76,76,76,71,71,71,71,76,71,76,71,76,71,71,71,71,71,76,76,71,71,76,76,71,76,76,71,76,76,76,71,71,71,71,71,76,76,71,76,76,71,76,71,71,71,71,71,76,71,76,76,76,71,76,71,71,76,71,71,76,76,76,76,71,76,76,76,76,71,76,71,76,71,76,76,71,71,71,76,76,76,71,71,71,71,71,71,71,76,71,76,76,71,76,76,71,76,76,71,71,71,76,76,71,76,76,71,76,76,76,71,76,76,71,76,71,76,71,71,76,71,76,76,76,71,76,76,76,71,71,76,76,76,71,76,71,71,76,71,71,71,71,76,71,76,71,71,76,71,71,76,71,76,71,71,71,71,71,71,71,71,76,76,71,71,76,71,76,71,76,76,71,71,76,71,76,76,71,76,71,76,71,76,76,76,76,76,76,76,76,76,76,76,71,76,76,76,76,71,71,71,71,76,71,71,71,76,76,71,71,71,76,71,71,76,71,76,76,76,71,76,76,76,76,76,76,71,71,71,76,71,76,76,76,71,71,76,76,71,71,71,76,76,76,76,71,71,76,71,76,76,71,76,76,71,76,76,76,71,76,76,71,76,76,71,71,76,76,71,76,71,71,71,71,76,76,76,71,76,71,76,71,76,71,76,71,76,76,71,71,71,76,71,71,76,76,71,76,76,71,76,76,76,71,71,71,71,76,76,76,71,71,76,71,76,76,71,76,76,76,71,76,76,76,76,76,71,71,71,76,71,71,71,71,71,71,76,71,76,76,71,76,76,76,71,71,71,76,71,71,71,76,71,71,76,71,76,71,71,76,71,76,76,76,76,71,76,76,76,76,76,76,76,76,76,76,71,76,71,71,71,71,71,76,76,71,76,76,71,76,71,71,76,71,71,76,76,71,71,76,76,76,76,76,76,71,76,71,71,71,76,71,71,76,71,71,71,76,71,76,71,76,71,71,76,71,76,76,71,76,76,76,76,76,76,71,71,76,71,76,76,76,71,76,76,76,76,76,71,71,71,76,71,71,71,71,71,76,76,71,76,76,76,76,71,71,71,71,76,71,71,71,71,71,71,76,71,76,71,76,71,71,71,71,76,71,71,76,76,76,71,76,76,71,71,76,76,76,76,71,76,71,76,71,71,71,71,76,71,71,71,71,71,76,76,76,76,71,71,71,76,71,76,76,76,76,76,71,71,71,76,76,71,76,71,76,71,71,76,76,71,71,76,76,76,76,71,76,76,76,71,71,76,76,71,71,76,76,76,71,76,76,76,71,71,71,71,76,71,71,76,76,71,71,71,76,76,71,76,76,76,76,71,76,71,76,71,71,71,76,76,71,76,76,76,71,76,76,71,76,76,71,76,76,76,71,76,76,76,71,71,71,71,71,71,76,71,71,71,71,71,76,71,76,71,76,76,76,71,71,76,71,71,71,71,76,76,76,76,71,71,71,71,76,76,76,76,71,76,76,76,71,71,76,71,71,76,71,76,71,76,71,71,76,76,71,76,76,76,71,71,76,76,71,76,76,76,76,71,76,76,71,76,76,76,71,76,71,76,76,76,71,71,71,71,76,71,76,71,71,71,71,71,71,71,71,71,76,71,71,71,76,76,76,71,76,76,71,76,71,76,71,76,71,76,76,76,76,71,71,76,76,71,71,71,76,71,76,76,71,71,71,76,76,76,76,71,76,71,71,71,76,76,71,71,76,71,71,76,76,71,76,71,71,71,71,71,76,71,76,76,71,76,71,71,76,71,76,71,76,71,76,76,71,71,76,76,76,76,76,76,76,76,71,71,71,76,76,76,76,76,71,76,71,76,76,71,71,76,71,76,71,71,71,71,71,76,76,76,76,71,71,76,71,71,76,76,76,71,76,76,76,76,71,76,71,71,76,71,76,71,76,71,71,76,71,71,76,71,71,71,71,71,71,76,76,76,76,71,71,76,76,71,71,76,71,71,76,71,76,71,76,76,71,71,71,71,76,71,71,71,76,76,71,76,71,76,76,71,76,71,76,76,71,71,76,71,76,71,71,76,71,71,71,76,76,76,76,76,76,71,71,71,71,76,76,76,71,71,76,71,71,71,76,76,76,71,76,76,76,76,71,71,71,76,71,71,76,71,76,71,76,71,76,71,76,71,71,76,76,76,76,76,76,71,76,71,76,71,76,71,71,76,71,71,76,71,71,76,71,76,71,76,71,76,71,71,71,71,71,71,76,71,71,71,71,71,71,71,71,76,71,76,71,76,71,71,71,76,71,76,71,76,71,71,71,76,76,76,71,71,71,71,71,71,76,71,71,76,76,76,71,71,71,76,71,71,71,71,76,71,76,71,76,76,76,71,71,71,71,71,71,76,76,76,71,76,71,76,71,71,71,76,71,71,76,71,76,71,76,76,71,71,76,76,76,71,71,76,71,71,71,76,71,71,76,76,76,76,71,76,76,76,71,71,71,76,71,76,71,71,71,71,76,71,76,71,71,76,71,71,71,76,76,76,71,76,76,71,71,76,76,76,71,71,71,76,71,71,71,71,71,71,76,76,76,76,71,76,71,71,71,71,71,71,71,71,71,76,71,71,76,71,71,76,71,71,76,76,71,71,71,71,71,76,71,71,76,76,71,71,76,76,71,76,71,71,71,76,76,71,71,71,71,76,71,71,71,76,76,76,76,71,71,71,76,71,71,71,76,71,76,71,71,71,71,76,71,71,71,76,76,71,71,71,76,71,76,71,76,76,71,71,76,71,76,76,76,71,76,76,71,76,71,71,71,71,71,76,76,76,76,71,71,76,76,76,71,76,76,71,76,71,76,76,71,76,76,71,76,71,71,76,76,71,71,76,76,71,71,76,76,76,71,71,71,76,76,76,71,71,76,76,71,76,76,71,71,71,76,71,71,76,76,71,71,71,76,71,76,76,76,76,71,71,76,71,76,71,71,76,76,71,71,71,71,71,71,76,71,76,76,71,71,76,76,76,76,71,71,71,76,76,76,71,71,76,76,76,71,76,76,76,71,71,76,76,76,76,71,76,76,76,71,71,71,76,71,76,76,71,71,71,71,76,71,71,71,76,76,76,76,76,76,71,71,76,71,76,76,76,76,71,76,71,71,76,76,76,71,76,76,71,76,71,76,71,71,76,71,71,71,76,71,76,76,71,71,76,71,76,76,71,76,76,76,76,71,71,71,76,76,76,76,76,71,71,71,71,71,71,76,71,71,71,76,76,71,71,71,76,71,71,76,71,76,76,76,76,76,71,76,76,71,76,76,76,76,76,76,71,76,71,76,76,71,76,71,71,76,76,71,71,71,71,71,76,76,71,76,76,76,76,71,71,71,76,71,76,76,76,76,76,76,71,76,71,76,71,76,76,76,71,76,76,76,76,76,71,76,76,71,76,71,71,76,71,71,76,76,71,71,76,76,71,71,76,71,76,76,71,71,76,76,71,71,71,76,71,71,76,71,76,76,76,71,71,71,71,71,71,76,76,76,71,76,76,71,76,71,71,71,76,76,76,76,76,76,71,71,76,71,71,76,71,71,76,71,76,71,71,76,76,71,76,71,71,76,71,76,76,76,76,76,71,71,76,71,76,71,76,71,71,71,71,76,76,71,76,76,71,71,76,71,76,71,76,71,71,76,71,76,76,71,71,71,71,71,76,71,76,76,76,71,76,71,76,71,76,76,76,71,76,76,76,76,71,71,76,71,76,71,71,76,76,71,71,71,71,76,71,71,71,76,76,76,71,76,71,76,76,71,76,76,76,76,71,71,76,76,71,76,76,71,71,76,76,76,76,76,76,76,76,71,76,76,71,71,71,71,76,71,71,71,71,71,76,76,76,71,71,71,71,71,71,76,76,71,71,76,76,76,71,76,71,71,76,76,76,76,71,76,76,76,76,76,71,76,71,76,71,76,76,71,76,71,71,76,76,71,76,71,71,71,76,76,76,71,76,71,76,76,76,71,76,76,76,76,76,71,76,71,76,71,76,76,76,76,71,76,71,71,71,76,71,71,71,71,71,71,76,71,76,71,71,76,71,76,76,71,71,71,71,71,71,76,71,71,76,71,71,76,76,71,71,76,71,71,76,76,71,76,71,76,76,76,71,71,76,76,71,76,76,71,76,71,71,76,76,71,76,71,71,71,76,76,76,71,71,71,76,76,76,71,71,76,71,76,71,76,71,76,71,71,71,71,71,71,76,71,71,76,76,71,76,71,76,76,71,71,71,71,71,76,71,76,76,76,76,76,76,76,71,76,76,76,71,71,76,76,71,76,76,76,76,71,76,76,76,71,71,71,76,71,71,71,71,71,76,71,76,76,76,71,71,71,76,71,76,71,71,71,71,76,76,76,76,76,71,76,71,76,71,76,76,71,76,76,76,76,71,71,76,71,76,76,76,76,71,76,71,71,76,71,76,71,71,76,76,71,71,76,76,76,71,76,76,76,76,76,76,71,71,76,71,71,71,76,71,71,71,76,71,71,76,71,76,76,76,76,71,71,71,76,71,71,76,76,76,71,76,76,71,76,71,76,76,71,76,71,71,76,71,71,71,76,76,71,76,76,76,71,71,71,71,71,76,76,71,76,71,76,76,71,71,71,71,71,76,76,76,76,76,71,76,76,71,76,71,71,71,76,76,71,71,71,71,71,71,76,76,76,76,71,76,71,76,71,71,71,71,71,71,71,76,76,71,71,71,76,76,71,71,76,76,76,76,71,76,76,76,76,71,76,76,76,76,71,71,71,76,71,76,76,71,71,71,71,76,71,71,76,71,71,76,76,76,76,71,71,76,71,76,71,71,71,71,76,71,76,71,76,71,71,76,71,71,71,76,71,76,71,71,76,76,76,76,76,76,71,76,76,76,76,71,71,71,76,76,76,76,76,71,71,71,76,76,71,71,76,76,71,71,71,71,76,71,76,76,76,71,76,76,71,71,76,71,76,71,76,76,76,71,76,71,76,76,76,71,71,71,76,76,71,71,71,76,71,76,71,76,71,76,76,76,76,71,76,76,76,71,76,76,76,71,71,71,71,71,71,76,76,76,76,76,76,76,71,76,71,71,71,76,71,71,71,76,76,71,76,71,71,71,76,71,76,76,76,71,71,71,76,76,76,76,76,76,76,71,76,71,76,71,71,76,76,76,71,76,71,71,76,76,76,71,71,71,76,71,76,76,76,76,76,76,76,71,76,76,71,71,76,76,76,71,71,76,76,76,76,71,71,71,76,71,76,76,76,76,76,71,71,71,71,71,71,76,71,76,76,76,76,76,71,71,76,71,71,76,71,71,71,71,71,71,76,71,71,71,71,76,76,76,76,71,76,71,71,76,71,71,71,71,76,71,76,76,71,71,71,71,76,76,76,71,76,76,71,76,76,71,71,71,76,76,71,76,76,71,71,76,71,76,71,71,71,71,71,71,71,76,76,71,71,76,71,76,71,71,71,76,71,76,76,76,76,76,71,71,71,76,76,76,71,76,71,71,71,76,71,71,76,76,76,71,71,76,71,76,76,71,76,76,76,71,71,76,76,71,71,71,71,71,76,71,71,71,71,76,76,71,76,71,71,76,71,76,76,71,71,71,71,76,76,71,76,71,71,71,71,71,76,71,71,76,71,76,71,71,71,71,76,76,71,76,71,76,71,76,76,76,76,71,76,71,76,71,71,76,76,76,76,71,71,71,71,71,76,76,71,76,71,71,76,76,71,76,71,71,71,71,76,71,76,76,76,76,71,76,71,71,76,76,76,76,76,76,71,71,71,76,71,71,71,76,76,76,76,71,71,71,76,76,71,71,76,71,71,71,76,71,71,76,76,71,76,76,71,71,71,71,71,71,76,76,76,71,76,71,76,71,76,71,76,71,71,76,71,71,71,71,76,71,71,71,76,71,71,71,71,71,71,71,76,76,76,76,76,76,71,76,76,76,76,76,76,76,76,71,71,76,76,76,71,71,76,76,76,71,76,76,71,76,76,76,76,76,71,71,71,71,76,71,76,71,71,71,76,71,76,71,76,76,76,71,76,71,71,71,71,71,76,71,76,71,71,71,71,76,76,76,71,76,76,71,71,76,76,71,76,76,71,76,71,76,71,76,76,76,71,71,76,76,76,76,76,71,76,71,71,71,76,76,71,71,76,76,76,71,76,71,71,71,71,76,76,76,71,71,71,76,71,71,71,71,76,76,76,76,71,76,71,76,71,71,71,76,71,71,71,71,76,76,71,76,76,71,76,76,76,71,76,71,76,76,76,76,76,71,76,76,76,76,71,76,71,71,71,76,71,71,76,71,71,71,76,76,76,71,71,76,76,71,71,76,76,76,71,76,76,76,71,76,71,71,71,71,71,76,76,71,71,71,71,71,76,71,71,71,71,71,76,71,71,76,76,76,76,76,71,71,71,71,71,76,76,71,71,71,71,71,76,71,76,76,71,71,71,71,71,76,76,76,76,71,71,76,76,71,76,71,76,76,71,71,76,71,71,76,76,71,76,76,76,71,71,76,76,71,76,71,76,71,76,76,71,76,71,71,71,71,71,71,76,71,76,76,76,71,71,76,76,76,71,71,76,71,71,71,76,76,71,76,76,71,71,71,76,76,76,71,71,76,76,76,76,76,71,71,71,76,76,76,71,71,71,71,76,71,76,76,71,71,71,76,76,71,71,76,76,76,76,76,71,76,76,76,76,76,76,76,76,76,71,76,71,76,71,76,71,71,76,76,71,76,76,76,71,76,71,71,76,76,71,76,71,71,71,71,76,76,71,71,71,71,71,71,76,76,71,71,76,71,71,76,76,76,76,76,71,71,76,76,76,71,76,71,71,76,76,71,71,76,71,71,71,76,76,76,76,76,71,71,71,71,76,71,76,76,76,76,71,76,71,71,76,71,71,76,76,76,76,71,76,76,76,76,71,76,76,76,71,71,71,76,76,76,71,76,76,76,76,76,76,71,71,71,71,76,76,76,71,71,76,76,76,71,76,76,71,71,76,76,76,71,76,76,71,71,71,71,71,71,76,71,76,71,76,71,71,76,76,76,71,71,76,71,71,76,71,76,76,71,71,71,71,76,76,71,71,71,71,76,76,71,71,76,71,71,76,76,76,71,71,76,76,71,76,71,71,76,71,71,71,71,71,71,76,71,76,76,71,71,76,71,71,76,71,71,76,71,71,76,76,76,71,76,71,71,76,76,76,76,71,76,76,71,76,71,76,71,76,71,71,71,76,76,71,71,71,76,71,76,71,76,71,76,71,71,76,76,71,71,76,71,71,76,71,71,76,76,76,76,71,71,76,71,71,71,76,71,76,71,71,71,71,71,76,71,71,76,71,71,76,71,76,71,71,76,71,76,76,76,71,71,76,76,76,76,76,71,76,76,76,76,71,71,71,76,71,71,71,76,76,76,71,71,71,76,76,71,76,71,76,71,71,71,76,76,76,76,76,76,71,76,76,71,76,76,76,71,71,76,71,71,76,76,71,76,71,76,76,71,71,76,71,71,71,76,76,76,71,71,71,76,71,71,76,71,76,71,71,71,71,71,76,71,76,71,76,71,71,71,71,71,76,71,71,76,76,76,71,71,71,71,71,76,76,76,71,76,76,76,71,76,71,76,76,71,71,76,76,76,71,76,76,71,76,71,76,76,76,76,71,76,71,71,76,71,76,76,71,71,76,76,76,71,71,71,76,76,71,76,76,71,76,76,71,71,71,76,76,76,76,76,71,76,76,71,76,71,71,71,76,71,76,71,76,71,71,71,71,76,71,76,71,76,76,76,71,71,71,76,71,71,76,76,71,76,76,76,76,71,71,76,71,71,76,76,71,76,71,76,76,76,71,71,71,71,76,71,71,76,71,71,76,71,76,71,71,71,71,76,71,71,71,71,76,71,76,71,71,71,71,71,76,76,71,71,71,71,76,76,76,71,71,71,71,71,71,71,71,71,71,71,76,71,71,71,71,71,76,76,76,71,76,76,71,76,71,76,76,76,71,76,71,71,71,71,71,76,76,71,76,76,71,76,76,71,76,71,76,76,71,76,71,71,71,71,76,71,76,76,71,71,76,71,76,71,76,71,76,76,76,71,71,71,76,71,76,76,76,76,76,71,71,71,71,76,76,71,76,71,71,76,71,71,76,76,76,71,71,71,76,76,76,71,76,76,76,71,76,71,71,71,71,71,71,76,71,76,76,71,71,76,76,76,71,71,71,71,76,71,76,76,76,76,71,71,71,71,76,71,76,76,71,76,76,71,71,76,71,76,76,76,76,71,71,76,71,71,71,71,76,71,76,71,71,76,76,71,71,71,76,76,76,76,76,71,71,71,71,76,71,71,76,71,76,76,71,76,71,76,71,71,71,71,76,76,76,76,76,76,76,71,71,76,76,71,76,76,71,71,76,71,76,76,76,71,71,71,76,71,76,76,76,76,76,71,71,76,71,71,76,71,76,76,76,76,76,71,71,71,71,71,71,76,71,76,71,76,71,76,71,76,76,76,71,71,76,71,76,76,76,76,71,71,76,76,76,76,71,76,71,71,71,71,71,76,76,76,76,76,71,76,71,71,76,76,76,71,76,76,71,71,71,76,76,76,76,71,76,76,76,76,76,76,71,76,76,71,76,71,76,71,71,71,71,71,76,76,76,76,71,76,71,71,71,76,76,76,76,76,76,71,71,71,71,71,76,71,76,71,71,71,71,71,71,71,71,71,71,76,76,76,71,71,71,71,76,71,71,71,71,76,76,71,76,71,71,71,71,76,71,71,76,76,76,71,71,71,76,71,71,76,71,71,71,71,76,76,76,71,71,76,71,76,71,76,76,76,76,76,71,76,76,71,76,71,76,71,71,71,71,76,71,71,76,71,71,76,71,71,71,71,71,76,71,71,76,76,71,71,76,76,71,76,71,76,71,76,71,71,76,71,76,71,71,76,71,71,76,76,71,71,76,76,71,76,71,76,71,71,71,71,76,71,71,71,71,71,71,76,76,71,71,76,76,71,71,71,71,76,76,76,76,76,76,71,76,71,71,76,71,71,76,71,71,76,76,71,71,76,76,71,76,76,71,71,71,76,76,71,71,76,76,76,76,76,71,71,76,76,76,76,71,71,71,76,76,71,76,71,76,71,71,71,76,71,76,76,71,71,76,76,71,76,76,76,71,76,71,76,71,71,71,76,76,76,71,76,71,71,76,71,76,76,76,76,71,76,76,71,71,71,71,76,71,71,71,76,76,71,76,76,71,76,71,76,71,76,76,71,76,71,71,71,71,76,71,71,76,76,71,76,76,76,71,76,71,76,71,76,76,76,71,76,76,76,76,71,71,76,76,71,76,71,71,76,71,71,71,76,71,71,76,76,76,76,71,71,76,76,71,76,76,76,76,71,71,76,76,71,76,71,71,71,76,71,76,76,71,71,76,76,76,71,76,71,76,71,76,76,76,71,76,76,76,76,76,71,76,71,76,76,76,76,71,71,76,76,76,71,76,76,76,76,76,76,71,76,76,71,71,71,71,76,71,71,71,76,71,71,71,71,71,76,71,76,71,76,71,76,71,76,71,71,76,76,76,76,71,76,71,71,76,71,76,71,76,71,71,71,71,71,76,76,76,76,76,76,71,76,71,71,76,71,76,71,76,71,71,76,71,76,76,71,71,76,71,71,71,76,76,71,76,76,71,71,76,71,76,76,71,71,71,71,71,76,71,71,71,71,76,76,76,71,76,71,71,71,76,71,71,71,71,71,71,76,71,76,76,76,76,71,76,71,76,76,76,76,76,71,71,71,76,71,71,76,76,71,76,76,71,71,71,71,76,76,71,71,71,76,71,71,76,76,76,71,71,76,71,76,76,71,71,76,76,71,71,71,71,71,76,76,71,76,76,76,76,76,76,71,71,76,71,71,76,71,71,76,71,76,76,71,76,71,71,76,76,71,71,71,76,76,76,71,71,76,76,76,71,71,71,71,76,71,76,71,76,71,71,76,76,71,71,76,76,71,76,71,71,76,71,71,71,76,71,71,76,76,71,71,71,71,76,71,71,76,76,76,71,71,71,71,71,71,76,76,71,71,76,71,71,76,76,76,76,76,76,71,71,71,71,71,76,71,71,71,76,76,71,76,71,71,71,76,71,71,76,76,76,71,71,76,71,76,71,76,71,76,76,76,76,71,76,76,76,71,76,71,76,71,71,71,76,71,76,71,71,76,76,71,76,76,76,76,71,76,71,76,76,71,71,71,76,76,71,71,76,71,76,76,71,71,71,76,76,71,71,76,71,76,71,71,71,76,71,71,76,76,71,71,71,76,76,71,76,76,71,76,71,71,71,71,76,76,76,76,76,76,76,76,71,71,76,71,76,76,76,76,76,71,76,76,71,71,76,71,71,76,71,71,71,71,76,76,71,71,71,71,76,71,76,71,76,71,76,76,76,71,76,76,76,76,71,71,76,76,71,71,71,71,71,71,71,71,76,71,76,76,76,71,76,76,71,71,76,71,71,71,76,76,71,71,76,71,71,71,76,71,71,76,71,71,76,76,71,76,76,71,76,71,76,71,71,76,76,76,76,71,71,71,71,76,76,71,71,71,76,71,71,76,71,76,76,76,76,76,71,71,76,71,71,76,71,71,76,71,71,71,71,71,71,76,71,76,71,76,71,71,76,76,71,71,76,71,71,76,76,76,71,76,76,76,71,71,71,76,76,76,76,71,71,76,71,76,71,71,71,71,71,71,71,71,76,76,71,71,76,71,71,71,76,71,76,71,71,71,71,71,76,71,76,76,71,71,71,76,76,71,76,71,71,71,76,76,76,76,76,76,71,76,76,76,76,76,76,76,76,76,76,71,71,71,76,76,71,71,76,76,71,71,76,76,71,71,76,71,71,71,71,76,71,76,71,76,71,71,71,76,76,76,76,71,71,76,76,76,76,76,76,76,76,76,76,71,71,71,76,76,76,71,76,76,76,76,76,76,76,71,76,71,76,71,71,76,76,71,76,71,76,76,71,76,71,76,71,76,71,71,71,76,76,71,71,76,71,76,71,76,76,76,71,76,71,76,71,71,76,71,71,76,71,76,76,71,71,71,71,71,76,76,76,71,76,76,76,76,76,76,76,71,71,71,76,71,71,76,76,71,71,76,76,76,71,76,71,71,71,71,76,71,71,71,71,76,71,71,71,76,71,76,71,76,71,71,76,71,71,71,71,76,71,76,76,76,76,71,71,71,71,71,76,76,76,76,71,71,76,76,76,76,76,76,71,71,71,71,76,76,71,76,71,76,76,71,76,71,71,71,71,71,71,76,71,76,76,71,76,76,71,76,76,71,76,76,71,71,71,76,71,76,76,71,71,71,76,76,71,71,76,71,71,71,71,76,71,71,76,71,71,76,76,76,71,76,76,71,71,71,71,71,76,76,71,76,76,76,76,76,71,76,71,76,71,71,76,71,71,76,71,71,71,71,71,71,76,76,76,71,71,71,71,71,71,76,71,71,71,76,76,76,76,71,76,76,76,71,76,76,71,71,71,76,76,71,76,76,76,76,71,71,76,71,71,76,76,76,71,71,76,71,71,71,76,76,71,76,76,76,76,71,76,76,71,71,76,71,71,71,71,76,71,76,71,76,71,76,76,71,76,76,71,71,71,71,71,76,76,71,76,76,76,71,71,76,71,71,76,71,76,76,71,76,76,71,76,76,76,76,76,76,71,76,71,76,71,76,71,76,76,76,71,76,71,71,71,76,76,76,71,71,71,71,76,76,76,71,71,76,71,76,71,71,71,71,76,76,76,71,71,76,76,76,71,76,76,71,76,71,76,76,71,76,76,76,71,71,71,71,76,71,76,71,76,76,76,76,71,71,76,71,71,76,76,76,76,76,76,76,76,76,76,71,76,76,71,76,76,71,76,76,76,76,71,71,76,71,71,76,71,71,76,76,71,71,76,76,76,71,71,71,71,71,71,76,71,71,76,76,71,76,76,76,76,76,71,71,71,76,76,71,76,71,71,76,76,76,76,71,76,76,71,76,76,71,76,76,71,76,71,76,71,76,76,71,71,76,71,76,76,71,76,76,71,71,76,71,76,71,76,71,71,71,76,76,71,71,76,76,76,71,76,71,76,71,71,76,76,76,76,76,71,76,76,76,71,76,71,76,71,76,71,76,76,71,71,71,71,76,71,76,71,76,71,71,71,71,71,76,71,76,76,76,71,76,71,76,71,71,71,71,76,71,71,71,71,71,76,71,76,76,71,76,71,71,71,71,76,71,76,71,71,76,76,76,71,76,76,76,76,71,71,71,76,71,76,76,71,76,76,71,76,71,71,76,76,76,76,71,76,71,76,71,71,71,71,76,71,76,76,76,76,71,71,71,71,76,76,71,76,71,71,71,71,76,71,71,71,76,71,76,76,76,71,76,76,76,76,76,76,71,76,76,71,76,76,71,76,71,71,71,71,76,76,71,76,76,76,71,71,76,76,76,76,71,76,71,71,76,76,76,71,76,71,76,76,76,76,76,71,76,71,76,76,76,76,76,76,71,71,71,76,71,71,71,76,76,76,71,76,71,71,71,76,76,71,71,76,76,71,76,71,71,71,76,71,71,71,76,76,76,76,76,76,71,71,71,76,76,76,71,71,76,71,71,71,76,76,71,76,76,76,76,76,76,71,76,76,71,76,71,76,71,76,71,76,76,71,71,76,76,76,76,76,71,71,76,71,71,71,76,76,71,76,76,76,76,76,76,76,76,71,71,71,76,76,71,71,76,76,76,71,76,76,76,76,76,76,76,71,71,76,76,76,76,71,71,71,71,76,71,71,71,76,76,71,71,71,71,71,71,71,71,76,76,71,71,76,76,76,71,76,71,71,76,76,76,76,76,71,71,76,71,71,71,71,76,71,71,76,71,76,71,76,76,71,76,71,71,76,76,71,76,71,76,71,76,71,76,76,71,76,71,76,71,76,71,71,71,71,71,71,71,76,76,76,71,76,71,71,76,76,76,71,71,71,76,71,76,76,71,76,76,76,71,71,76,76,76,76,71,71,71,71,71,76,71,76,76,76,76,71,71,71,76,76,71,71,71,76,71,76,71,76,71,76,76,71,76,71,71,76,71,76,71,76,71,71,71,71,71,71,76,76,71,71,76,76,76,76,76,71,76,71,71,76,71,76,71,71,71,76,71,76,71,71,76,76,76,76,76,76,76,71,76,71,71,71,76,76,71,71,71,76,76,71,76,71,71,71,71,71,71,76,71,76,71,76,76,76,71,76,71,76,76,71,71,71,71,76,71,76,76,76,71,76,76,76,76,76,71,71,71,76,76,71,76,76,71,71,76,76,71,76,71,76,71,76,76,76,76,76,71,76,71,76,71,71,76,71,71,71,71,71,71,76,71,76,76,71,71,76,71,71,76,71,71,76,71,76,71,71,76,71,76,71,71,76,76,71,76,76,76,76,71,71,71,71,76,71,76,76,71,71,76,76,71,76,71,71,71,71,76,71,76,76,76,71,76,71,71,71,71,76,71,71,71,76,71,71,76,71,71,76,76,76,76,71,76,76,71,76,71,76,76,71,71,76,76,76,71,76,71,76,76,71,76,71,76,71,71,71,71,71,71,76,71,71,76,76,76,76,71,71,71,71,71,71,71,76,76,71,76,71,76,76,71,76,76,76,71,71,76,71,76,76,76,76,76,76,76,71,76,71,76,71,71,76,71,76,71,71,76,76,71,76,71,76,76,76,71,71,76,71,76,71,71,76,71,71,71,71,76,76,76,76,71,71,71,71,76,76,71,76,71,76,71,71,76,71,76,76,71,76,76,76,71,71,76,71,76,76,71,71,76,71,71,76,76,71,76,76,76,71,76,76,71,71,76,76,76,76,76,76,76,76,76,76,71,71,71,76,76,71,71,71,71,71,76,76,76,71,71,71,71,71,71,71,71,76,76,71,71,76,76,71,76,71,76,76,71,71,76,76,76,71,71,71,71,71,71,71,71,76,71,76,71,76,71,76,71,71,71,71,71,71,71,71,76,71,71,71,76,71,76,71,71,71,71,76,76,71,76,76,71,76,71,71,76,76,76,76,71,71,76,76,71,71,71,71,76,76,71,76,76,71,71,71,76,71,71,76,76,76,71,76,71,76,71,71,71,71,71,71,76,71,76,76,71,71,71,76,71,76,76,76,71,71,71,71,71,76,71,76,76,71,71,76,71,71,76,71,76,71,76,71,71,76,71,71,76,71,71,76,71,76,76,71,76,71,76,71,71,71,76,71,71,71,76,76,71,71,71,71,71,76,71,71,76,76,71,71,76,76,76,71,76,76,71,71,76,76,71,76,76,76,76,71,71,71,76,71,71,71,71,76,76,71,71,71,76,71,76,76,71,71,76,71,76,71,76,71,71,71,71,76,71,71,71,76,76,76,71,76,71,71,76,71,76,76,71,71,76,76,76,76,76,76,76,76,76,76,71,71,76,76,76,71,71,76,71,76,71,76,71,71,76,71,71,71,76,76,71,71,71,71,71,76,76,76,76,71,71,71,71,71,71,76,71,71,71,76,71,71,71,76,76,71,76,76,76,76,71,76,71,76,71,76,71,71,76,76,76,71,71,71,71,76,76,76,71,76,71,76,71,71,76,76,71,76,71,76,71,71,71,71,76,76,76,76,71,76,76,76,71,71,76,71,76,71,71,71,76,76,71,71,71,71,71,71,71,71,71,71,71,76,76,71,76,71,71,76,71,76,76,71,71,76,71,71,76,76,76,76,76,76,71,71,76,76,76,76,76,71,76,71,71,71,76,76,76,76,76,71,71,71,71,71,76,71,71,71,71,71,76,76,76,71,76,71,71,71,71,76,71,76,71,71,71,71,71,71,76,71,71,76,76,71,76,71,76,76,71,71,76,76,76,76,71,76,71,71,76,71,76,71,76,76,76,76,71,76,76,76,71,76,71,71,71,76,76,71,71,71,71,76,71,76,76,76,76,71,71,71,71,76,76,71,76,76,76,71,71,76,76,71,71,71,76,76,71,76,76,71,71,76,71,76,76,71,71,76,76,71,71,71,71,76,71,76,71,71,71,71,71,76,71,76,71,76,76,76,71,71,71,76,71,76,71,71,71,71,76,76,76,76,76,71,76,76,76,76,71,71,76,76,71,71,71,71,76,71,71,71,76,76,76,76,71,76,71,71,76,71,76,71,71,71,71,71,76,71,76,76,71,71,76,76,76,76,71,76,71,76,71,76,71,71,76,71,76,76,71,71,71,76,71,76,71,76,76,71,76,71,71,71,71,76,76,71,71,76,76,76,76,71,71,76,71,71,76,71,71,76,71,71,71,71,71,76,71,71,71,76,71,71,71,71,71,71,71,71,71,76,76,71,71,71,71,76,76,76,71,71,71,76,76,76,71,76,71,76,76,71,76,71,71,71,76,76,71,76,76,76,76,71,71,76,76,76,71,71,71,71,76,71,71,76,76,71,71,76,76,76,71,71,76,71,76,71,76,76,71,71,71,76,71,76,71,71,76,76,71,76,76,76,76,71,76,71,76,71,71,71,76,71,71,71,71,76,71,76,71,71,76,71,71,76,71,76,76,76,71,71,71,71,76,76,71,71,76,71,71,76,76,76,71,76,76,71,76,71,76,71,71,76,76,71,76,71,76,76,76,71,76,76,71,76,76,76,76,76,76,76,71,71,76,71,76,76,71,71,71,71,76,71,76,71,76,76,71,71,76,76,71,76,76,76,71,76,76,76,71,71,76,71,71,76,71,76,76,71,76,71,71,71,71,76,76,76,71,71,76,71,71,76,71,76,76,76,71,71,71,76,76,76,71,76,71,71,71,76,76,76,76,76,76,71,76,71,76,76,76,76,76,71,71,71,71,76,76,76,76,71,71,76,71,76,71,71,76,76,71,76,71,76,76,76,71,76,71,71,71,76,76,71,76,76,71,71,71,76,71,76,76,71,76,71,76,76,76,71,76,76,76,76,71,76,71,76,76,76,76,76,71,76,71,76,76,76,71,71,76,71,71,76,76,71,76,76,76,71,71,71,76,71,71,76,76,76,71,76,76,76,71,71,71,76,71,76,71,76,76,76,71,71,71,71,76,76,76,71,76,76,71,76,71,76,76,71,71,76,76,71,71,76,71,76,71,71,76,71,76,76,76,76,71,76,71,71,76,76,71,71,71,76,76,71,71,76,76,71,71,71,71,76,71,71,71,76,76,71,76,71,76,71,71,76,71,71,71,76,76,71,76,76,71,76,76,71,76,71,71,76,76,76,71,76,71,71,71,76,71,76,71,76,76,71,76,76,71,76,71,76,76,76,76,71,76,76,71,76,76,76,71,76,76,71,71,76,71,71,76,71,71,71,71,71,71,71,76,71,71,76,76,76,71,71,76,71,71,76,71,71,71,71,71,76,76,76,76,71,76,71,71,71,71,71,71,71,71,71,76,71,76,71,76,76,71,76,71,76,76,76,71,71,71,76,71,71,71,76,71,76,76,76,71,76,76,76,71,76,71,76,71,76,71,71,76,76,71,76,76,71,76,71,76,76,76,76,76,76,71,71,76,76,71,71,71,71,71,71,71,71,71,71,71,71,76,76,71,76,71,71,71,76,76,71,71,76,71,76,71,71,71,71,71,71,76,76,76,71,76,71,71,71,71,71,76,71,76,71,76,76,76,76,76,76,71,76,76,71,71,76,76,71,76,76,71,76,71,76,71,76,76,71,71,71,71,76,76,76,76,71,76,76,76,71,76,71,71,76,76,71,71,71,71,76,71,76,71,76,76,71,76,76,76,71,71,71,76,76,71,71,71,76,76,71,76,71,71,71,76,71,71,76,76,71,71,76,71,71,71,76,71,71,76,71,76,71,71,76,71,71,76,71,76,76,76,71,71,76,71,76,76,76,71,71,71,76,76,71,76,76,71,71,76,76,76,76,76,71,71,71,71,71,71,76,71,71,71,71,76,71,71,71,71,76,71,76,71,76,76,76,76,71,71,76,76,71,76,71,76,71,71,71,76,71,71,76,76,76,76,71,76,71,71,76,71,71,71,71,76,76,76,71,71,76,76,71,71,76,76,71,71,76,71,71,76,76,76,76,76,76,71,76,76,76,76,76,76,71,76,76,76,76,71,71,76,76,71,76,76,76,76,71,71,76,71,76,71,71,71,76,76,71,76,71,76,71,76,76,76,76,76,71,71,76,71,76,76,71,76,76,71,71,71,76,71,71,76,71,71,76,76,76,76,71,76,71,76,76,71,76,71,76,76,71,76,76,76,76,71,76,71,76,76,71,71,71,76,71,76,76,76,76,76,71,76,76,71,71,76,71,76,71,71,71,76,76,76,76,71,76,76,76,76,71,71,71,76,76,71,71,71,76,71,76,76,71,76,76,71,76,76,71,71,76,71,71,76,76,71,76,71,71,76,76,76,76,71,76,71,71,71,76,76,71,76,76,76,71,76,76,76,76,71,76,76,76,76,71,76,76,71,71,71,76,76,71,76,71,76,71,71,76,76,76,71,71,76,76,71,71,71,76,71,76,76,71,71,71,71,76,71,76,76,76,71,71,76,76,76,71,76,71,76,71,71,71,71,76,76,71,76,76,76,71,76,76,76,76,71,71,71,76,71,76,76,71,71,71,71,71,76,71,71,71,71,76,76,71,71,76,71,76,76,71,76,71,76,76,71,71,71,71,71,71,71,71,76,76,71,76,71,76,76,76,76,71,71,76,71,71,76,76,76,76,76,76,71,76,71,76,71,71,76,76,71,71,71,76,71,71,76,71,71,71,76,76,71,71,71,76,71,71,71,71,71,71,76,76,76,71,76,76,76,71,71,71,76,71,76,76,76,76,71,71,71,76,76,76,71,76,76,76,76,76,76,71,76,76,71,71,71,76,71,71,71,71,71,76,76,71,76,71,76,71,71,71,71,76,71,71,76,71,76,71,76,76,76,76,71,76,76,71,71,76,76,76,76,71,71,71,71,71,71,76,71,76,76,76,71,76,76,71,71,71,76,71,71,76,76,71,76,71,76,76,76,71,76,71,76,71,76,71,76,76,76,71,71,76,76,71,76,71,76,76,71,76,76,76,71,76,76,76,76,76,76,76,71,71,76,71,76,71,76,76,76,71,71,76,71,71,76,76,76,76,76,76,71,71,71,71,71,71,71,71,76,71,76,76,76,76,71,71,76,76,76,71,71,71,76,76,76,71,71,71,71,76,71,76,71,76,71,76,71,71,71,71,76,76,76,76,76,71,71,76,71,71,76,76,71,71,76,71,71,76,76,76,76,76,76,71,76,71,71,76,71,71,71,76,71,76,71,76,76,76,71,76,76,76,76,76,76,71,76,71,76,71,76,71,71,71,76,76,71,71,76,71,76,76,76,71,76,71,71,76,76,71,71,71,71,71,76,71,76,71,71,76,71,71,76,76,71,76,76,71,71,76,71,76,71,71,71,71,71,71,76,76,71,76,76,71,76,71,71,76,76,76,76,71,76,76,71,76,76,71,76,71,71,76,71,76,76,76,76,71,76,76,71,71,71,71,71,76,76,71,71,71,71,76,76,71,71,76,71,71,76,76,71,71,71,71,76,71,71,71,76,76,76,76,71,71,71,76,76,71,71,76,76,76,71,71,76,71,76,71,71,76,71,71,71,71,76,76,76,71,71,71,76,76,76,76,76,76,76,76,76,76,76,76,71,76,71,71,71,76,71,71,76,71,71,71,71,76,76,76,76,71,71,76,71,71,76,71,71,76,71,71,76,71,76,76,71,71,76,76,71,71,71,71,76,76,71,76,71,71,76,71,71,71,76,76,71,71,76,76,71,71,71,76,71,76,76,71,76,76,76,76,71,76,71,71,71,71,76,71,71,76,76,71,71,76,76,71,76,71,76,71,71,76,71,76,76,76,76,71,76,71,71,71,76,71,71,71,71,71,76,76,76,76,71,76,76,76,71,71,76,71,71,76,71,71,71,76,71,76,71,71,71,76,71,71,76,76,76,71,71,71,71,71,71,76,76,76,71,76,76,76,76,71,71,76,76,76,71,76,71,71,71,71,76,71,71,71,71,71,71,76,71,71,71,76,76,71,71,76,76,71,71,71,71,71,76,76,71,71,76,76,71,76,76,76,71,71,71,76,71,76,71,71,76,71,76,76,76,76,76,76,76,71,71,76,76,71,71,71,76,76,76,76,76,76,71,76,76,76,71,76,76,76,76,71,71,76,76,71,76,76,71,71,71,76,71,76,71,76,76,71,71,71,76,71,76,76,76,76,76,76,71,76,71,76,76,76,71,71,76,76,71,76,71,76,76,76,71,71,76,71,76,76,71,76,76,76,76,76,71,76,76,76,76,71,76,71,71,71,71,71,71,71,71,76,76,71,71,71,71,71,71,71,71,76,76,76,76,76,71,76,76,76,76,76,76,71,76,76,76,76,71,71,71,71,76,71,76,76,71,76,76,76,76,76,71,71,76,76,71,76,71,71,71,71,76,76,76,71,76,71,71,71,71,76,76,71,71,71,76,71,76,71,71,71,71,71,76,71,76,76,76,76,76,71,71,76,76,76,71,71,71,71,76,76,76,76,76,71,76,76,76,71,71,76,76,76,71,76,71,71,76,71,71,76,71,71,71,76,71,76,71,71,76,71,71,76,71,71,76,71,71,71,76,71,76,71,71,76,71,71,76,71,71,71,76,71,76,71,76,71,76,76,71,76,76,76,71,76,76,71,76,71,71,76,71,76,71,76,76,71,76,76,76,71,71,71,76,71,71,76,76,76,71,71,71,71,76,71,71,76,76,71,71,71,76,71,71,76,71,76,71,71,76,76,76,71,76,71,76,71,71,76,76,76,76,76,71,71,76,71,71,76,76,76,71,76,71,71,71,76,71,71,71,71,76,76,76,76,71,71,71,76,71,71,76,71,76,76,71,76,71,71,71,76,71,71,71,71,76,76,76,76,76,71,76,71,76,71,76,76,71,71,76,71,76,71,76,71,71,76,76,71,76,76,71,71,76,76,76,71,76,71,71,71,76,76,71,76,71,71,71,71,71,76,71,71,76,76,76,76,71,76,76,76,76,76,76,71,76,76,71,71,71,76,71,71,76,76,71,76,76,71,76,71,71,76,71,71,76,71,71,76,76,71,71,71,71,71,76,76,71,71,76,76,71,76,76,76,76,71,71,71,71,76,71,71,76,76,71,76,76,71,71,76,76,71,76,71,76,76,71,76,76,76,76,71,71,71,76,71,71,71,76,76,71,71,76,71,71,71,76,71,71,71,76,76,76,76,76,71,76,76,71,76,71,71,76,76,76,76,71,76,76,76,76,76,71,71,71,76,76,76,71,71,76,76,76,71,76,71,71,76,71,71,76,71,71,71,76,76,76,71,76,71,76,71,76,76,71,76,71,71,71,71,76,71,71,76,71,71,71,76,71,76,71,76,76,76,76,71,76,76,76,71,71,76,71,76,76,76,71,76,76,76,76,71,76,71,71,76,76,76,76,76,71,71,71,76,76,71,76,76,71,76,71,76,76,71,71,71,71,71,76,71,76,76,71,76,71,71,76,71,71,71,76,76,71,76,71,76,76,71,76,76,71,76,76,76,71,71,76,76,71,71,71,71,76,76,76,71,76,71,71,71,76,71,71,71,71,71,71,71,76,71,76,76,76,76,71,76,76,76,76,76,71,71,76,71,76,71,71,76,76,76,76,71,76,76,71,71,76,71,71,76,71,71,71,76,76,76,71,76,76,71,71,76,71,71,71,71,71,76,71,76,71,76,76,71,76,76,71,76,71,71,76,71,71,76,76,76,76,71,76,76,76,76,71,71,71,71,71,71,71,76,76,71,71,76,76,76,76,71,71,71,76,71,71,71,76,71,71,76,76,71,76,76,71,76,71,71,71,71,71,71,76,71,71,76,76,71,71,71,76,76,76,76,71,76,71,76,76,71,76,71,71,71,76,71,71,76,71,71,71,71,71,71,76,76,71,76,76,76,71,76,76,71,76,71,76,71,76,76,76,76,71,76,71,71,76,71,76,71,71,76,76,76,76,71,71,76,76,71,76,71,71,71,71,71,71,71,76,71,76,71,71,71,76,71,71,76,71,76,76,71,76,76,71,76,76,71,76,71,76,76,71,71,76,71,76,76,76,71,76,76,71,76,71,71,71,71,71,76,76,76,76,71,71,76,71,76,71,71,71,71,76,76,71,71,76,71,71,76,76,71,71,76,76,76,76,76,71,71,71,71,71,76,76,76,71,76,71,76,71,71,71,76,76,76,71,71,71,76,76,76,76,76,76,71,76,76,76,71,71,76,76,76,71,71,71,71,71,71,76,71,76,71,71,71,76,76,71,71,71,71,71,71,76,71,71,76,71,76,76,76,71,71,76,71,76,71,76,71,71,71,71,71,71,71,71,76,76,71,76,76,76,76,76,76,71,76,71,71,71,76,76,71,71,71,71,76,76,71,76,76,71,76,76,76,76,71,76,71,76,71,71,71,76,76,76,71,71,76,76,71,71,71,76,71,71,76,71,71,76,71,76,76,76,76,71,76,76,76,71,71,71,71,76,71,71,76,76,71,76,71,71,71,71,71,76,71,76,76,71,71,71,76,76,71,76,71,76,71,71,76,76,76,71,71,71,71,76,76,76,71,76,76,76,71,76,76,71,76,76,76,71,71,76,76,71,71,76,71,76,71,76,76,71,71,71,76,76,71,71,71,71,71,76,76,76,71,76,76,71,76,71,71,76,71,76,71,76,71,71,71,71,76,71,76,71,71,71,71,76,71,71,76,71,76,76,71,76,71,76,76,76,76,76,71,71,76,76,71,71,76,71,76,76,76,76,71,71,71,76,76,76,76,76,71,76,76,71,76,76,71,76,76,71,76,71,76,71,76,76,76,71,76,76,71,71,71,71,71,76,76,76,76,76,71,71,76,71,76,76,71,71,76,71,76,71,71,71,71,76,76,71,76,71,76,76,71,76,71,71,71,76,71,76,71,71,71,71,76,76,76,76,76,76,71,76,71,76,71,76,71,76,71,76,76,71,76,76,71,71,76,76,76,76,76,76,71,71,71,71,76,71,71,71,71,76,71,76,71,71,71,71,76,71,76,71,71,71,76,76,71,71,71,76,76,71,71,76,76,71,71,71,76,76,71,71,71,71,71,71,71,71,76,71,71,76,71,71,71,76,76,76,76,76,71,76,76,71,71,71,76,76,76,76,71,76,71,76,76,71,76,76,76,76,76,71,71,76,71,71,76,76,71,76,71,76,71,76,71,76,71,71,71,71,76,71,76,71,71,71,76,76,71,76,71,71,76,76,71,76,71,76,71,71,76,71,71,76,71,76,71,71,76,76,71,76,71,71,76,76,76,71,76,71,71,71,71,71,71,76,76,71,71,71,76,71,76,71,71,71,71,71,71,71,71,71,71,76,76,71,76,76,76,76,71,76,76,71,71,71,71,71,71,71,71,76,71,76,76,76,71,76,71,76,76,71,71,76,76,71,71,76,76,76,71,76,71,76,71,76,76,71,71,76,76,71,71,71,76,71,71,71,76,76,71,71,76,71,76,71,76,76,71,76,76,76,71,76,71,76,76,71,71,71,71,76,76,71,76,71,76,71,76,71,71,76,76,71,71,71,71,71,76,71,71,76,76,71,76,71,71,71,76,76,71,71,76,71,76,76,76,76,71,76,76,71,71,71,71,71,71,71,76,71,71,71,76,71,71,76,71,71,71,76,71,76,71,71,71,71,76,76,76,71,76,76,76,76,71,76,76,76,76,76,76,76,76,71,76,76,76,76,71,76,76,71,76,76,71,76,71,71,76,71,71,76,71,76,76,71,71,76,71,71,71,76,76,71,76,71,71,76,76,71,76,71,76,76,71,76,71,71,76,71,71,76,71,76,71,76,71,71,76,76,76,71,71,76,76,76,76,76,76,76,76,71,76,71,71,76,71,71,76,76,71,76,76,76,76,76,76,71,76,76,76,71,76,76,76,71,76,71,71,71,76,71,76,76,76,71,71,71,76,76,76,76,76,71,71,76,76,76,76,76,76,76,71,71,76,76,76,71,76,71,76,71,76,76,71,71,71,71,71,71,71,76,71,71,71,71,71,71,71,71,76,76,76,71,76,76,71,71,76,71,71,76,71,71,71,71,71,71,71,76,76,76,71,76,71,76,71,76,76,71,76,71,76,76,76,76,76,71,71,71,71,76,76,71,71,71,71,76,76,71,71,76,71,76,76,71,71,71,71,71,76,71,76,76,76,71,71,76,71,71,76,76,71,76,71,76,71,76,76,76,71,71,76,71,76,71,76,76,71,76,76,71,71,76,76,76,76,76,71,71,76,76,76,71,76,71,76,71,71,76,71,71,71,71,71,71,71,76,71,71,71,76,71,76,76,76,76,71,71,71,71,71,71,71,76,76,71,76,71,71,76,76,71,76,76,76,76,76,76,71,76,76,71,76,71,71,76,71,71,71,76,76,76,76,71,76,76,71,76,76,71,76,71,76,76,71,71,76,76,76,71,76,71,76,71,76,71,71,76,76,76,76,76,71,76,76,76,71,71,71,76,76,71,71,71,71,71,76,76,76,76,76,71,71,71,71,71,76,76,76,76,76,71,76,76,76,76,76,71,71,76,76,71,76,76,71,71,76,76,76,71,76,76,76,71,71,71,71,71,71,76,71,71,76,76,76,76,76,71,71,71,71,76,71,76,71,76,76,71,71,76,76,71,71,71,71,76,71,76,71,71,71,71,71,71,71,71,76,71,71,71,76,71,71,71,71,71,71,76,76,71,71,76,71,76,71,76,76,76,76,71,76,76,71,71,71,76,76,76,71,71,71,76,76,71,76,71,76,71,71,76,71,76,76,76,71,76,71,76,76,76,71,71,76,71,76,76,71,76,71,76,71,71,76,71,71,76,76,71,71,71,71,71,71,71,71,71,71,71,71,76,76,71,71,71,71,76,76,76,71,76,71,71,76,76,76,76,71,71,76,71,71,76,71,71,76,76,71,76,76,71,76,71,71,71,71,76,71,71,71,71,71,71,76,76,76,76,76,76,71,76,76,71,76,71,76,76,76,76,76,71,76,71,71,71,76,71,76,76,71,76,76,76,71,76,71,76,71,76,71,71,76,71,76,71,76,76,71,76,71,76,76,76,71,71,76,76,71,71,76,71,76,76,71,71,76,71,71,71,76,76,71,76,76,76,76,76,71,76,71,71,76,76,76,71,71,76,71,76,71,71,76,76,71,71,76,76,76,76,76,76,71,71,76,76,71,76,71,76,71,71,76,71,71,76,76,76,76,76,71,76,71,76,71,71,71,76,76,76,76,71,76,76,71,76,71,71,76,71,71,71,71,76,71,76,71,71,71,71,76,76,71,76,76,76,76,71,76,71,71,71,71,76,76,71,71,71,76,71,76,71,76,76,76,76,71,76,71,76,71,71,76,71,76,76,76,71,76,71,71,71,76,71,76,76,71,76,71,76,76,71,76,76,71,71,76,76,76,71,76,76,76,76,76,71,76,71,76,76,76,71,76,71,71,76,71,71,71,76,76,76,76,71,71,71,76,71,71,76,71,71,71,71,71,76,71,71,71,71,71,76,71,76,76,71,71,71,71,71,76,71,71,71,76,76,71,76,76,76,76,76,71,76,76,76,76,76,71,71,71,76,76,71,71,76,76,76,71,71,76,71,71,76,71,71,71,71,71,71,76,71,76,76,76,76,71,71,76,71,76,76,76,71,71,71,76,71,76,71,71,76,71,76,76,71,71,76,71,76,71,76,71,76,76,71,76,76,71,71,76,71,71,71,76,71,71,71,76,76,71,76,76,76,71,71,76,71,76,71,76,76,76,71,76,71,71,76,71,71,71,76,76,71,76,71,71,76,76,71,71,71,71,76,76,76,76,71,76,76,76,76,76,71,71,76,71,71,76,71,76,71,76,76,76,71,71,76,71,76,76,71,76,76,71,71,76,71,71,71,71,71,76,71,76,76,71,76,71,71,76,71,71,71,76,71,76,76,76,71,71,76,76,71,76,71,71,76,71,71,71,76,76,71,71,76,76,71,76,76,71,71,71,71,76,76,71,71,71,71,76,71,71,71,76,71,71,76,71,76,71,76,76,71,71,71,76,76,76,76,76,71,71,71,76,71,71,76,71,71,71,71,76,71,71,71,71,71,76,76,71,76,71,71,71,76,71,76,71,76,71,71,76,71,71,76,71,76,76,71,76,71,71,71,76,76,71,76,76,76,71,76,71,71,76,71,71,71,71,76,76,76,76,71,76,76,71,71,71,76,76,71,76,76,71,71,71,76,76,76,71,71,71,76,71,76,76,76,71,76,76,71,76,76,71,76,71,76,76,71,71,71,71,71,76,71,76,76,76,76,71,71,76,76,76,71,76,71,76,76,76,76,76,76,76,71,76,71,76,71,76,76,76,76,76,76,71,76,76,76,76,71,71,76,76,71,76,76,76,71,76,71,76,71,76,76,71,76,76,71,76,76,71,71,76,71,76,76,76,76,76,71,71,71,71,71,71,76,71,71,76,76,71,76,71,71,76,71,76,76,76,71,76,71,71,76,71,71,71,76,71,76,76,76,71,71,71,76,76,71,71,76,71,76,71,71,71,76,76,76,71,71,71,76,71,76,76,71,76,76,71,76,76,76,76,71,76,71,71,76,71,76,71,76,76,76,76,71,71,76,76,71,71,76,71,76,76,71,76,71,71,76,71,71,71,71,71,71,71,71,76,71,76,71,76,71,71,76,71,71,76,71,71,71,71,76,76,76,71,76,76,71,71,71,76,76,71,71,76,76,71,71,76,76,76,71,71,76,76,71,71,76,71,71,76,71,76,71,71,71,76,76,76,71,76,76,76,71,71,71,71,71,71,76,71,76,76,71,71,76,76,76,76,71,71,71,76,71,71,76,71,71,71,76,76,76,71,76,71,76,76,76,71,76,71,76,76,76,71,71,76,71,76,76,76,71,76,76,71,76,71,76,76,76,76,76,76,71,76,76,71,71,71,71,71,76,76,71,76,76,71,71,71,71,71,71,76,76,71,76,76,76,71,71,76,71,76,76,71,76,76,71,71,71,76,76,76,71,76,71,76,71,71,76,71,71,76,71,76,76,71,71,76,76,71,71,71,71,71,71,71,76,71,71,71,76,71,71,71,71,71,76,76,76,71,71,76,76,76,71,76,71,71,71,76,76,76,76,71,76,76,71,76,71,76,76,76,76,76,71,76,76,71,76,76,71,76,76,76,71,76,76,71,71,71,71,71,71,76,76,76,71,76,71,76,76,71,71,76,76,76,71,76,71,71,71,71,71,76,71,71,76,76,71,76,76,76,76,71,76,76,76,76,76,76,76,76,76,76,71,76,76,71,76,76,71,76,71,76,71,71,71,76,76,71,71,71,76,71,71,71,71,76,76,71,71,76,71,71,71,76,76,76,76,71,71,71,76,71,71,76,76,71,71,76,71,71,71,71,76,76,76,76,71,76,71,76,76,76,71,71,71,76,71,76,76,71,76,71,76,71,71,71,71,76,71,76,71,71,76,76,71,76,71,76,76,76,76,76,76,76,76,71,76,76,71,71,71,76,71,76,71,76,71,76,71,71,76,71,71,76,76,76,71,71,76,76,76,76,71,76,71,76,76,71,76,71,71,76,76,76,76,76,71,76,71,76,76,76,71,76,76,71,71,76,76,76,71,76,71,76,76,76,76,76,71,76,76,76,71,71,76,76,71,71,71,76,71,71,76,71,76,76,76,76,71,76,76,76,76,71,71,71,71,71,76,76,71,76,71,71,76,76,76,71,71,71,76,71,71,71,71,71,71,76,71,71,71,76,76,71,76,76,71,76,71,76,76,71,76,76,71,76,71,76,71,71,71,71,76,71,71,76,76,71,71,71,76,76,76,76,71,71,76,76,76,71,71,71,71,76,71,76,71,71,71,71,71,71,71,71,71,76,71,76,76,76,71,76,76,71,76,71,76,71,71,76,76,76,71,76,71,71,76,76,71,76,71,71,76,71,71,71,71,76,76,76,71,76,76,76,76,71,71,71,76,71,76,71,71,71,71,76,71,76,71,71,76,71,71,76,76,76,71,71,71,71,71,71,76,71,76,71,71,71,71,71,71,76,71,71,71,76,76,76,76,71,71,76,71,71,76,71,76,71,76,71,76,76,71,76,76,76,76,71,76,71,71,76,76,71,71,76,71,76,76,76,76,71,71,76,71,76,71,76,76,76,76,76,71,76,71,71,76,76,71,76,71,76,71,76,76,71,76,71,76,76,71,76,71,71,71,71,76,76,71,76,71,71,71,76,71,71,76,71,71,71,76,76,71,71,76,71,76,76,76,76,76,71,71,71,71,71,71,71,71,76,76,76,76,71,71,71,76,76,71,76,71,76,71,76,71,76,71,76,76,71,71,76,71,76,76,76,71,71,71,71,76,76,71,71,76,71,71,71,71,71,76,76,76,71,71,76,71,76,76,76,76,71,76,76,76,76,71,71,76,71,71,71,76,71,71,76,76,76,71,71,76,71,76,71,76,71,76,71,71,71,71,71,71,71,76,71,76,76,76,76,76,71,71,71,71,76,71,76,71,76,76,76,76,71,71,76,71,76,76,76,71,76,76,76,71,71,71,76,76,71,76,71,71,71,76,76,71,76,76,71,76,71,71,71,71,76,71,71,76,76,76,71,71,76,71,76,71,76,71,76,76,71,76,71,76,76,71,76,71,71,76,76,76,71,76,76,71,76,76,71,71,76,76,71,71,71,71,71,76,76,71,76,76,71,76,76,71,71,71,76,71,71,71,76,71,71,71,76,71,76,71,76,71,71,71,76,76,76,76,71,76,76,76,76,71,71,71,76,71,76,71,71,71,76,71,76,76,76,71,71,76,76,71,76,76,76,71,71,76,71,71,71,71,76,71,76,71,76,71,76,76,71,71,76,76,71,76,71,76,76,71,76,71,71,76,71,76,76,71,76,71,71,71,71,76,71,71,71,71,71,71,76,71,76,71,71,76,76,71,76,76,71,76,71,76,71,71,76,71,76,71,71,71,76,71,76,76,76,76,71,76,71,71,76,76,76,71,71,76,76,76,76,71,76,76,71,76,76,76,71,71,71,71,71,76,76,71,71,71,71,71,76,76,76,71,76,71,76,76,71,71,76,76,76,76,71,76,71,71,71,71,76,76,76,76,76,71,71,76,71,76,71,76,71,76,71,71,76,76,76,76,76,71,71,76,71,76,71,71,76,76,71,76,76,71,71,76,71,76,76,71,76,76,76,76,71,76,71,71,71,71,76,76,71,76,76,76,71,71,71,71,71,76,71,71,76,71,76,76,76,71,71,76,76,71,76,71,71,71,76,71,76,71,71,71,76,71,71,76,71,71,71,76,71,76,76,76,71,71,76,76,76,71,71,76,71,71,71,71,76,71,76,76,71,71,76,71,76,76,76,71,76,76,76,71,76,76,71,76,71,71,71,71,71,71,76,71,71,71,76,71,76,76,76,71,76,76,76,71,76,76,76,76,76,76,71,71,71,71,76,71,76,71,71,71,71,71,71,76,76,76,76,76,76,71,71,76,71,71,76,76,71,76,71,71,71,76,76,71,76,76,76,71,76,76,76,71,76,76,76,71,76,71,71,71,76,76,71,76,71,71,76,76,76,71,71,76,76,71,71,76,76,76,76,76,71,71,76,76,71,71,76,71,76,76,71,76,76,76,71,76,71,76,76,71,71,76,71,71,76,76,71,71,71,71,71,71,76,76,71,71,71,71,71,71,76,71,76,76,71,76,71,71,76,76,76,76,76,76,76,76,71,71,71,71,76,71,76,71,76,76,71,71,76,71,71,76,76,71,71,76,76,71,76,71,71,71,71,71,76,71,71,71,76,76,71,71,76,76,71,76,76,76,71,76,71,76,71,71,76,76,76,76,76,71,76,76,71,71,71,76,71,76,76,76,76,76,71,71,76,71,76,76,76,71,76,76,76,71,76,76,71,71,71,76,76,76,71,71,76,71,76,71,71,71,76,71,71,76,76,71,71,71,76,76,71,71,76,76,76,76,76,71,71,76,76,76,71,76,76,71,76,76,71,76,71,76,76,71,71,76,71,71,71,76,71,71,71,76,71,76,76,76,71,76,76,76,76,71,71,71,71,76,71,71,76,76,76,71,71,71,71,71,71,76,76,71,71,76,71,71,71,76,76,76,76,71,71,71,76,71,71,76,71,76,76,76,76,76,71,71,76,76,76,76,71,71,71,71,76,76,76,71,76,76,71,71,76,71,76,76,71,71,71,71,76,76,76,71,76,76,76,71,76,76,71,76,76,71,71,76,71,71,71,71,76,76,71,71,71,71,76,71,76,71,71,71,76,71,76,76,71,76,76,71,76,76,71,71,71,76,71,76,76,76,71,71,71,71,71,71,71,76,76,71,71,71,76,76,71,76,76,76,71,71,71,71,76,71,71,71,76,76,71,76,71,76,71,71,76,76,76,71,76,76,76,71,76,76,71,76,71,71,76,71,71,71,76,76,76,71,76,71,76,76,71,76,76,76,76,76,71,71,76,76,71,71,71,71,76,76,76,71,71,76,71,76,76,71,76,76,76,71,76,71,76,76,76,71,71,76,76,76,71,71,76,76,76,71,71,76,76,76,76,71,76,71,71,76,76,71,76,76,71,76,71,76,76,76,76,71,71,71,76,71,76,76,76,76,71,71,76,71,71,76,76,76,71,71,76,71,71,71,76,71,76,71,71,76,71,71,71,71,76,76,71,71,71,71,71,71,76,71,76,71,71,71,71,76,71,76,71,76,71,71,76,71,71,76,76,76,71,76,76,76,76,71,71,76,76,76,76,71,71,76,76,71,71,71,71,76,71,71,71,71,76,76,76,76,71,71,71,71,76,76,76,76,71,71,76,76,71,76,76,71,71,76,76,76,76,76,76,76,71,71,71,76,71,71,76,76,76,76,76,76,71,76,76,71,76,71,71,76,76,71,76,76,76,71,71,71,76,76,76,71,71,71,71,71,76,71,71,76,76,76,71,76,76,76,76,76,71,76,76,71,76,76,71,71,71,71,71,71,71,76,76,71,76,71,76,71,71,76,76,71,71,71,71,76,76,76,76,71,76,76,76,71,71,71,76,71,76,71,76,71,76,71,76,76,71,76,76,76,71,76,76,76,76,71,76,71,71,71,71,71,71,71,76,71,76,76,71,76,76,76,76,76,76,71,71,71,76,76,76,76,76,76,71,71,71,76,71,71,71,71,76,76,76,71,76,71,71,71,76,76,76,76,71,71,76,71,71,76,76,71,76,76,71,76,76,76,76,76,76,71,76,71,76,76,71,76,76,71,76,71,71,71,71,71,71,71,71,71,71,71,71,76,76,76,76,71,71,71,71,76,76,71,76,71,71,76,71,71,76,76,76,71,71,76,71,76,71,76,71,71,71,76,71,71,76,76,71,71,71,71,76,71,76,76,71,71,71,71,76,71,76,76,71,71,76,71,71,71,76,76,76,76,71,76,76,71,76,71,71,71,76,76,71,71,76,71,71,71,71,76,71,76,76,71,76,71,71,71,71,71,71,76,76,71,76,71,76,71,71,71,71,76,76,71,71,76,71,76,76,71,76,71,71,76,71,76,71,71,71,71,76,71,71,76,71,76,71,76,71,71,76,71,76,76,76,76,76,71,76,76,76,71,71,76,76,71,76,71,71,71,76,76,71,71,71,71,76,76,76,76,76,71,71,76,76,76,76,76,71,71,76,76,76,76,76,76,71,71,71,76,71,76,76,76,71,76,71,76,76,76,76,76,71,76,71,76,76,71,76,76,71,76,71,76,71,76,71,71,71,71,71,71,71,76,76,76,71,76,76,76,71,76,76,76,76,71,71,76,71,76,76,71,71,71,76,71,71,76,71,71,76,71,76,76,71,71,76,76,76,71,76,71,76,76,76,76,71,71,71,71,76,76,76,71,76,71,76,76,76,71,71,71,71,76,76,76,76,76,71,71,71,71,76,76,71,71,71,71,76,76,76,71,71,71,71,76,71,76,71,71,71,71,71,76,76,71,76,71,76,71,71,71,76,71,76,71,71,71,76,76,76,71,71,76,76,71,76,71,76,71,71,76,76,71,76,76,76,71,76,76,76,71,71,76,71,76,76,71,71,76,71,76,76,76,71,71,76,76,76,71,76,76,76,76,71,71,71,71,76,71,71,76,71,71,76,71,71,76,71,76,76,76,76,76,71,76,76,76,71,76,76,71,71,76,71,76,76,76,71,76,76,76,71,71,76,76,71,76,71,71,76,76,76,76,71,76,71,76,71,71,76,76,76,71,71,76,76,76,76,76,76,71,76,76,76,76,76,71,76,76,71,76,76,76,71,76,76,71,71,76,71,71,76,71,71,76,71,71,71,71,71,71,71,71,71,76,76,71,76,71,71,76,71,76,71,76,76,71,71,76,71,76,76,71,71,76,71,71,76,76,71,76,76,71,71,71,76,76,71,76,71,76,76,76,71,71,71,71,71,76,71,76,71,71,71,76,71,76,71,76,71,71,71,76,76,76,76,76,71,76,76,76,76,71,71,71,76,76,76,71,76,71,76,76,76,71,76,76,76,76,71,76,71,76,71,76,71,71,71,76,71,76,71,76,71,76,71,71,71,71,71,71,71,71,76,71,76,71,71,76,71,71,71,76,76,71,71,71,71,71,76,76,76,71,71,71,76,76,76,71,76,71,76,71,71,71,71,76,76,76,76,71,76,71,71,76,71,71,76,71,76,71,76,76,76,71,71,76,71,76,71,76,71,71,76,71,76,71,71,76,71,71,76,71,71,76,76,71,76,71,71,71,76,76,76,76,71,71,71,71,71,71,71,76,71,71,76,71,76,71,71,76,71,71,76,71,71,76,76,71,71,71,76,76,76,71,71,76,76,76,71,71,76,76,76,71,71,76,76,76,76,71,71,76,71,76,76,76,76,76,76,76,76,76,71,76,71,71,71,71,76,76,76,76,71,76,71,71,71,76,76,71,71,76,76,76,71,76,71,76,71,76,76,71,71,76,71,71,76,76,76,71,76,71,76,76,71,76,76,71,71,71,71,76,71,71,71,76,76,76,71,76,71,71,76,76,71,76,76,76,71,71,76,76,71,76,71,76,71,71,76,71,71,76,71,76,76,71,71,76,76,76,71,71,71,76,71,71,71,76,76,76,71,71,71,71,71,71,76,71,76,76,76,76,71,76,76,76,71,76,71,71,76,71,71,71,76,76,76,76,76,71,76,76,71,76,71,71,71,71,76,71,76,76,76,71,71,76,71,71,71,76,76,71,71,71,71,71,76,71,71,71,71,71,76,76,71,76,71,71,76,76,71,76,76,76,76,71,76,71,71,76,71,71,71,76,76,71,71,76,71,76,71,71,76,76,71,76,76,76,76,71,71,71,76,76,76,76,71,71,76,76,76,71,76,71,71,76,76,71,76,71,71,76,76,76,71,71,71,76,76,76,76,71,76,71,71,71,76,71,76,71,76,71,76,76,71,71,76,71,76,71,76,76,76,71,71,76,76,71,76,71,71,71,71,76,76,76,76,76,71,71,71,71,76,76,76,76,71,76,71,76,76,76,71,71,76,76,71,71,76,76,71,71,71,71,71,71,76,76,76,76,76,76,71,76,71,71,76,71,76,71,76,71,71,76,76,71,71,76,76,76,76,76,76,71,76,71,76,71,76,71,76,71,76,71,76,71,71,76,76,76,76,76,71,76,71,76,76,76,71,76,76,71,76,71,71,76,71,71,71,71,76,76,76,76,76,71,71,76,76,76,76,76,76,71,76,76,76,76,76,76,76,71,71,76,76,76,71,76,71,71,76,76,76,71,76,71,76,76,71,76,76,71,76,71,76,76,76,71,76,76,76,71,71,76,71,71,71,76,76,76,76,71,71,76,76,71,76,76,76,76,71,71,71,76,76,76,71,71,76,71,71,76,76,76,76,76,76,71,71,71,71,76,71,76,71,71,76,71,76,71,76,76,71,71,71,76,76,76,76,71,76,71,76,71,76,76,71,71,71,76,76,76,76,76,71,71,76,71,76,76,76,71,71,71,71,76,71,71,76,71,71,76,71,76,76,71,76,71,71,76,71,71,71,76,71,76,76,76,76,76,76,76,76,76,71,76,76,71,71,71,76,76,71,71,71,71,76,76,71,76,76,71,76,76,76,71,76,76,71,71,71,76,71,76,71,76,76,71,76,71,76,71,76,71,71,71,71,71,71,76,71,76,71,76,71,71,71,71,71,71,76,71,71,71,71,76,71,76,71,76,76,76,76,71,76,71,76,71,71,71,71,71,76,76,71,76,71,76,76,76,76,76,71,76,71,76,76,76,71,71,71,71,71,71,76,76,71,76,71,71,76,76,71,76,71,71,76,71,71,76,76,71,76,76,76,71,76,71,71,76,71,76,71,71,76,76,76,76,71,76,76,71,76,76,76,76,76,76,71,76,71,71,71,76,71,71,71,76,76,71,71,76,71,76,76,71,76,71,76,76,71,71,71,76,71,76,71,71,71,76,76,76,71,76,71,71,76,71,71,71,76,71,76,76,76,76,76,71,71,71,76,76,71,71,71,76,71,71,71,71,71,76,76,76,71,71,71,71,71,71,76,71,71,76,76,71,76,71,71,76,71,71,76,71,76,76,71,76,71,76,76,71,71,71,76,71,71,76,76,76,71,76,71,76,71,71,71,76,71,71,71,71,76,71,76,76,76,71,76,76,71,76,71,71,71,71,76,71,71,76,71,71,71,76,76,71,76,76,71,71,76,71,76,71,71,71,71,71,71,71,71,76,76,76,71,76,76,71,71,71,76,76,71,76,71,71,76,71,71,71,76,71,71,71,71,76,71,76,71,71,71,71,71,71,71,71,76,76,71,76,76,71,76,71,76,76,71,76,71,76,71,71,76,76,71,76,76,76,71,76,71,76,71,71,71,71,71,71,71,76,76,76,71,76,76,71,76,71,71,76,71,76,71,76,76,76,71,71,76,71,76,71,71,76,71,76,71,76,71,76,71,71,76,71,76,71,71,71,71,76,71,71,76,71,71,76,71,71,76,76,71,71,76,71,76,71,76,71,71,76,71,71,76,71,76,71,76,76,76,76,71,76,71,71,71,76,71,76,71,71,76,76,76,76,71,71,71,71,71,71,71,71,71,76,76,76,76,71,71,76,76,76,71,76,76,71,76,76,71,76,71,71,76,76,71,71,71,76,76,76,71,76,71,71,71,71,71,71,71,76,76,76,76,76,76,76,76,76,76,71,76,76,76,71,71,76,76,76,71,76,71,76,76,71,71,71,71,71,76,71,76,76,76,76,76,71,71,71,76,76,71,76,76,76,76,71,71,71,76,71,76,76,76,71,76,76,76,71,71,76,76,71,76,76,76,76,71,76,71,71,76,71,71,71,76,76,71,76,76,76,71,76,76,71,76,71,71,76,71,76,76,71,71,76,76,76,76,71,71,71,76,76,71,76,71,71,76,76,71,76,71,71,76,71,76,76,76,71,71,71,76,76,76,71,71,76,76,76,76,71,71,71,71,71,71,71,76,71,76,76,76,71,76,76,71,71,71,71,76,71,76,76,71,71,71,71,71,71,71,76,71,71,71,71,71,76,71,76,71,71,76,71,71,71,76,76,76,71,71,76,71,76,71,76,76,71,76,76,76,71,71,76,76,76,76,76,71,71,71,76,71,76,71,76,71,71,71,76,76,71,76,71,76,76,71,71,76,71,76,76,76,71,71,76,71,76,76,76,71,71,76,76,71,76,71,71,71,76,71,76,76,76,76,71,71,76,71,71,76,71,71,71,76,76,71,71,71,71,71,76,76,76,71,76,76,71,71,76,71,76,71,71,76,71,71,71,76,71,71,71,76,76,76,71,71,71,76,71,76,71,71,71,71,76,76,76,76,76,71,71,71,76,76,76,76,76,76,71,71,76,71,71,76,71,76,71,76,76,76,76,76,71,76,76,76,76,71,76,71,71,71,76,71,76,76,71,76,71,71,71,76,76,71,76,76,76,71,71,76,76,76,76,71,71,71,76,76,76,76,71,71,76,76,76,76,71,76,71,71,76,76,76,76,71,71,76,76,76,71,76,76,71,71,71,76,76,76,76,71,71,76,71,76,71,71,71,71,71,76,71,76,71,76,71,71,71,71,76,71,76,71,76,76,71,76,71,71,71,71,71,76,76,76,71,76,71,76,76,76,71,76,71,71,76,76,71,76,76,76,71,71,71,76,71,76,71,71,71,76,71,71,71,71,71,76,71,76,71,71,71,71,76,76,76,71,76,76,71,76,71,76,76,71,71,76,76,76,71,71,71,76,71,76,71,71,71,76,71,76,76,71,76,71,76,76,71,76,76,76,71,76,71,71,71,71,71,71,76,71,71,71,71,76,71,71,71,76,71,71,76,76,71,76,71,76,76,71,76,71,71,71,76,71,71,76,71,76,76,76,71,71,71,71,71,71,76,71,76,71,71,71,76,71,76,76,76,76,76,71,76,71,76,76,76,76,76,76,71,76,76,71,76,76,71,71,76,71,71,76,71,71,76,76,71,71,76,71,76,71,76,71,71,76,71,76,71,76,71,71,71,71,71,76,71,76,71,76,71,76,71,76,76,71,76,76,71,76,71,71,71,76,71,71,71,76,76,76,76,76,71,76,76,71,71,71,76,71,76,71,76,71,76,76,76,71,71,76,76,71,71,76,71,76,76,71,76,71,76,76,71,76,76,71,71,71,71,71,76,76,71,76,71,76,71,76,71,76,71,76,76,71,71,71,71,76,71,76,76,76,76,76,76,76,76,71,71,76,76,71,71,76,71,71,76,71,71,76,71,71,71,71,76,76,71,76,76,71,71,71,71,71,71,76,71,71,76,71,71,71,71,76,71,71,71,76,76,76,76,76,71,71,71,76,76,76,76,71,76,76,71,76,71,76,71,76,71,71,71,71,76,71,71,71,71,76,71,76,76,71,71,71,71,71,76,76,76,71,76,71,71,71,76,76,76,76,71,76,76,71,71,76,76,71,76,76,71,76,71,71,76,76,71,76,71,76,76,76,76,76,71,71,71,71,76,76,76,71,76,76,71,71,71,71,71,71,76,76,76,71,76,71,71,76,71,76,71,76,71,76,76,71,76,76,71,71,71,76,71,76,71,76,71,71,76,71,71,71,71,76,76,71,76,76,76,76,76,76,71,76,71,76,76,71,71,76,76,76,71,71,76,76,71,76,71,76,76,71,76,71,71,76,76,71,76,76,76,76,71,71,76,71,76,76,76,76,76,71,76,71,71,76,71,76,76,71,71,71,71,71,71,71,76,76,76,76,71,76,71,71,71,76,71,71,76,76,76,71,76,76,76,71,71,71,76,76,71,71,76,76,76,76,76,71,71,76,71,76,71,71,76,71,76,76,76,76,76,71,76,76,71,71,71,71,71,71,76,71,71,71,76,76,71,71,71,76,71,71,76,71,76,76,76,76,71,76,71,76,71,76,76,76,71,71,71,71,71,71,76,76,76,76,71,71,71,76,71,76,71,71,71,76,76,71,71,76,76,76,71,71,71,76,76,76,76,76,76,76,76,76,71,76,76,76,76,71,71,71,71,71,71,76,71,76,71,71,71,76,71,71,76,71,76,76,71,71,71,76,71,71,71,76,71,76,71,76,71,76,76,76,71,76,71,76,71,76,71,71,71,76,71,71,71,71,76,76,76,76,71,76,76,76,76,76,71,71,76,76,71,76,76,71,71,76,71,71,76,71,71,71,71,76,76,71,71,71,76,71,71,76,71,71,76,71,76,76,76,76,76,76,71,71,76,71,76,76,76,76,71,71,71,76,71,76,71,71,71,76,76,76,76,76,71,76,71,76,71,71,76,76,71,71,76,76,76,71,76,71,71,71,71,76,76,71,71,76,71,71,71,76,76,76,76,76,76,71,71,76,71,71,71,71,76,76,71,76,76,71,71,71,71,76,71,76,76,76,76,71,71,76,76,76,71,76,71,76,76,76,76,76,76,76,76,76,76,71,71,76,71,76,71,71,76,76,71,76,71,76,71,71,76,71,76,76,71,76,76,76,76,76,71,71,71,76,76,71,71,71,71,76,76,71,71,71,76,71,76,71,76,71,71,76,76,71,71,76,71,76,71,76,71,76,71,76,76,71,71,71,76,76,76,76,76,71,71,71,76,71,76,71,71,71,71,71,76,71,71,76,71,71,71,71,71,71,71,76,71,71,76,71,76,71,71,71,71,76,71,71,71,76,71,76,71,71,76,71,71,76,71,76,71,71,76,76,71,76,71,71,71,71,71,71,76,71,76,71,71,71,71,76,76,76,76,71,76,71,71,71,76,76,71,76,71,76,71,71,71,71,76,71,71,71,76,71,71,71,76,76,76,71,76,71,76,71,71,76,76,76,76,71,71,76,71,71,76,71,71,71,71,71,76,71,76,71,71,71,71,76,76,76,76,71,76,71,76,71,76,76,76,76,76,71,71,76,71,76,71,71,76,76,76,71,76,71,71,71,76,71,76,76,76,76,76,71,71,76,76,71,71,71,76,76,76,76,71,71,76,71,71,76,71,76,76,76,71,76,71,71,76,76,76,76,71,71,76,71,76,76,76,76,76,71,71,76,71,71,71,71,71,76,76,71,71,71,76,71,76,71,76,76,76,71,71,71,71,76,76,71,76,71,76,76,76,71,76,76,76,76,76,76,76,71,71,76,76,76,76,76,76,71,76,76,71,71,76,71,76,71,76,71,71,71,76,71,71,76,71,71,71,71,76,71,76,76,76,71,76,76,76,71,71,71,71,71,76,76,76,71,71,71,76,76,76,76,76,76,71,71,71,76,71,76,76,71,71,71,71,76,71,71,76,71,71,71,76,76,76,71,71,71,76,71,76,71,76,71,71,76,76,71,71,71,76,76,76,76,76,71,71,71,71,71,76,71,76,71,76,76,71,71,71,76,76,71,76,76,76,71,76,71,71,76,76,71,76,71,76,71,71,76,71,76,71,76,71,71,71,76,71,71,76,71,71,71,71,71,71,76,76,71,76,76,76,76,76,76,71,71,76,71,76,71,71,71,71,76,71,76,71,76,76,76,76,76,71,71,71,76,76,71,76,71,76,76,76,76,71,76,76,76,71,76,71,71,76,71,76,76,71,76,71,71,76,76,76,71,76,71,76,71,71,71,76,71,71,71,76,71,71,76,76,71,76,71,76,71,76,76,71,76,76,71,76,71,76,71,76,71,71,71,71,76,76,76,71,76,71,71,71,76,71,76,71,76,71,71,76,71,71,76,71,71,71,76,71,71,71,71,71,71,76,71,76,76,71,76,71,76,71,71,71,71,76,76,71,71,76,76,76,76,76,71,76,76,76,76,71,76,71,76,71,71,71,76,71,71,76,76,71,76,71,71,76,71,76,71,71,71,71,71,76,71,71,71,71,76,71,71,76,71,71,71,71,71,71,71,76,76,71,71,71,76,71,76,71,76,76,71,71,76,76,76,71,71,76,76,76,71,71,71,76,76,71,71,71,76,76,71,71,71,71,76,76,76,76,71,76,71,71,76,76,71,76,71,71,71,76,71,76,76,71,76,76,76,71,71,71,71,76,71,76,76,71,76,76,76,71,71,71,71,71,76,71,71,76,71,76,76,76,76,76,76,71,76,76,76,76,76,76,71,76,71,71,71,71,71,76,71,76,76,76,76,71,76,76,71,76,76,76,71,71,71,76,76,71,71,76,76,76,76,76,76,76,71,71,76,76,71,76,76,76,76,71,76,76,76,76,76,71,71,71,71,76,76,76,76,76,76,71,71,71,71,76,76,76,76,76,76,71,71,71,71,76,76,76,71,76,71,71,76,76,76,76,71,71,71,71,71,71,76,76,71,71,71,76,71,71,71,76,71,76,76,71,76,71,76,76,71,76,76,71,71,76,76,76,71,71,76,76,76,71,76,71,76,71,71,71,71,76,76,76,76,76,76,71,76,71,76,76,76,76,71,71,76,71,71,71,76,76,71,71,71,71,71,71,71,71,71,76,76,76,71,76,76,76,71,71,71,71,76,71,76,76,71,71,71,71,71,76,71,71,71,71,71,76,76,76,71,76,71,76,71,76,76,76,71,71,71,71,71,76,76,76,71,76,76,76,76,76,71,71,71,76,76,71,76,76,76,71,76,76,71,76,71,76,76,76,76,76,71,76,76,76,76,76,76,76,76,71,76,71,71,71,76,71,76,71,71,71,76,71,71,76,71,71,71,71,71,76,71,76,71,71,76,76,71,76,71,76,76,76,71,71,76,71,76,76,76,76,71,71,71,76,76,76,71,71,76,71,76,71,76,76,76,76,76,76,71,76,76,76,71,71,76,76,76,71,76,76,71,71,71,76,76,71,71,76,71,71,76,71,76,71,76,76,71,76,71,76,76,76,76,76,71,76,76,71,76,71,71,71,76,71,76,71,71,71,71,76,76,71,76,71,76,76,71,76,76,76,76,71,76,71,76,76,76,71,71,71,76,71,71,71,71,71,71,71,76,71,76,76,71,71,76,71,76,71,71,71,71,76,71,71,71,76,76,76,76,76,71,71,71,76,71,71,71,76,71,76,76,76,76,76,71,71,71,71,71,71,71,71,71,71,71,76,71,71,71,71,76,71,76,71,76,76,76,71,71,76,71,76,71,76,76,71,71,71,76,76,71,71,76,76,76,71,71,71,76,76,71,76,71,71,71,71,76,76,71,71,76,71,71,71,76,71,71,71,71,71,76,71,76,76,76,76,71,76,71,76,76,76,71,76,76,76,76,76,76,76,71,71,76,76,76,71,71,76,76,76,71,76,76,76,71,71,71,71,76,71,76,76,71,71,76,76,76,76,71,76,76,71,76,76,71,71,71,71,76,71,76,71,76,71,71,71,76,76,76,76,76,76,71,76,71,76,71,76,71,76,71,71,71,71,71,71,71,76,71,71,76,76,76,76,71,71,71,76,76,76,71,76,71,71,76,76,76,76,76,76,76,71,71,71,76,76,76,71,71,76,76,71,76,71,71,76,76,71,76,76,71,71,76,76,76,71,76,76,71,76,76,71,76,71,71,76,71,76,76,71,71,71,76,71,71,71,71,71,71,76,76,71,71,71,71,71,76,71,76,71,76,71,76,76,71,76,76,71,76,76,71,76,71,71,71,76,71,71,71,76,76,71,71,71,71,76,76,76,71,76,71,76,71,71,76,71,76,76,76,76,71,76,76,71,76,76,71,71,71,71,76,76,71,76,76,71,71,71,71,76,71,71,71,71,76,76,71,76,76,76,76,71,71,71,71,76,71,71,76,71,71,71,76,76,76,76,76,76,71,71,71,76,76,71,76,76,71,76,76,71,71,71,76,71,71,71,71,71,76,76,71,71,76,71,71,71,71,76,76,71,76,76,71,76,76,76,76,71,76,71,76,76,71,76,76,76,76,71,76,71,76,71,71,76,76,71,76,71,71,76,71,76,71,71,76,71,71,76,76,71,76,71,71,76,71,76,76,76,71,71,71,71,71,71,71,71,71,71,76,71,76,76,76,71,71,76,76,76,71,71,71,71,76,76,71,76,71,76,76,71,71,71,71,71,71,71,71,71,76,76,71,71,76,71,76,76,76,71,76,76,71,76,76,71,76,71,71,71,76,71,71,71,76,71,71,71,71,76,76,71,76,76,71,71,71,76,71,71,71,76,76,71,76,71,76,76,71,76,71,76,76,76,71,71,76,76,71,71,76,71,71,71,71,71,76,76,76,76,76,71,71,71,76,71,71,76,71,71,76,71,76,76,71,71,71,76,71,76,76,76,71,71,76,76,71,71,71,76,76,76,76,71,76,71,71,71,71,71,76,71,76,76,76,71,71,76,71,71,71,76,71,71,76,71,76,76,76,76,71,76,71,76,76,71,76,76,71,71,71,76,76,71,71,71,71,76,71,76,76,71,76,76,76,71,71,76,71,76,76,71,76,71,76,76,76,76,76,76,71,71,76,71,71,71,76,76,76,71,71,76,71,71,71,71,71,76,71,71,76,71,76,76,71,76,71,71,76,76,76,76,71,71,76,71,71,71,76,76,71,71,76,76,71,76,71,76,76,71,76,76,71,71,76,76,76,76,76,76,71,71,76,76,71,76,76,71,76,71,76,76,76,71,76,76,76,71,71,76,71,71,76,76,76,76,71,71,76,71,71,76,71,71,76,76,76,76,76,71,76,71,76,71,71,76,76,76,76,71,76,76,76,76,71,71,71,76,76,76,76,76,71,71,76,71,71,71,76,71,76,76,76,71,76,76,71,76,76,76,71,76,76,76,71,71,71,76,76,76,76,71,76,76,71,71,76,76,76,76,71,76,76,76,71,76,71,76,71,71,76,76,71,76,71,71,76,76,71,76,71,71,76,76,76,71,76,76,76,76,71,76,76,71,71,71,76,76,76,76,76,76,76,71,71,76,76,71,76,71,76,71,76,71,76,76,71,71,71,76,76,71,71,76,71,76,71,76,76,76,71,71,76,76,76,71,76,76,71,76,76,76,71,76,71,76,76,76,71,76,71,71,71,71,76,71,76,76,76,71,71,76,71,76,71,76,76,76,71,76,76,76,76,71,71,76,71,71,71,71,76,76,76,71,76,76,76,76,71,76,76,71,76,76,76,76,71,76,76,76,71,71,71,76,71,71,71,71,76,76,76,71,71,71,76,71,76,76,76,71,76,71,71,71,71,76,76,76,71,71,76,76,76,76,76,76,76,71,76,76,71,71,71,71,76,76,71,76,71,76,76,71,76,71,76,76,71,71,76,71,71,76,76,76,76,76,76,71,71,76,76,76,76,71,76,71,76,76,71,71,76,71,76,71,71,76,71,76,71,71,71,71,71,71,71,76,71,71,71,71,71,76,71,76,71,71,71,76,71,76,71,71,71,71,71,71,71,76,76,71,71,76,76,71,71,76,71,71,71,76,76,71,71,71,71,76,76,71,76,71,71,76,71,71,76,76,71,71,71,71,76,71,71,71,71,76,71,76,71,71,76,71,71,71,76,71,76,71,71,71,76,76,71,71,76,76,71,76,76,76,76,71,76,76,71,71,76,76,76,71,76,76,76,76,71,76,71,76,76,71,71,76,76,76,71,76,71,76,71,71,71,71,76,71,71,71,71,71,76,76,71,76,76,71,71,76,76,76,76,76,71,76,71,76,76,71,71,71,76,76,71,71,71,76,76,76,76,76,76,71,71,76,71,76,76,71,71,76,76,71,76,71,71,71,71,76,76,71,76,71,71,71,71,76,71,76,76,76,71,76,71,76,71,76,71,76,76,71,76,71,71,76,76,71,71,71,71,71,76,76,71,76,76,76,71,76,71,76,76,71,76,71,71,71,71,76,76,76,71,76,76,76,71,71,71,76,76,76,76,71,76,76,71,71,71,71,71,76,76,76,71,76,76,71,76,76,71,76,71,76,71,76,76,76,71,76,71,76,76,76,76,76,76,76,76,76,76,71,71,71,71,76,76,76,76,71,71,76,71,76,76,76,71,76,76,71,76,76,76,76,71,71,76,71,71,76,71,71,71,76,76,76,76,76,71,76,76,76,76,76,71,76,71,76,71,76,71,76,71,71,71,71,76,76,76,76,71,76,71,76,76,76,71,76,76,71,71,71,71,71,76,71,71,71,71,76,76,71,76,76,71,71,76,76,76,71,76,76,71,71,71,71,76,71,76,76,76,76,76,76,76,76,71,71,76,71,71,76,71,71,71,71,71,76,71,76,76,71,76,71,71,71,76,76,76,76,76,71,76,71,76,71,71,76,71,76,76,71,76,71,76,71,71,71,71,71,76,76,71,76,76,76,71,71,71,76,76,76,71,76,76,76,76,71,71,76,76,71,76,71,71,76,76,71,71,76,71,76,76,76,76,71,71,71,71,71,71,71,71,71,71,76,71,71,76,76,76,76,71,76,76,71,76,76,76,71,76,71,71,76,76,76,76,71,76,76,76,76,71,76,71,76,76,71,71,71,71,76,76,76,76,71,71,76,71,71,71,76,71,76,71,76,76,76,71,71,71,76,71,76,71,76,71,76,71,76,71,76,71,71,76,71,71,76,76,76,76,71,76,76,71,71,71,71,76,71,71,76,76,76,76,71,71,71,71,71,76,71,71,76,76,71,71,76,76,76,71,71,71,76,76,71,76,71,71,71,76,76,76,76,76,71,76,71,71,71,76,76,76,76,76,76,71,71,76,71,76,71,71,76,76,71,71,71,76,71,76,76,71,71,71,76,71,76,71,76,76,76,76,76,76,71,71,76,71,71,76,71,76,76,71,76,76,71,76,76,71,76,76,71,76,76,71,76,76,71,71,71,76,71,76,76,71,76,76,76,76,76,71,76,76,71,71,71,71,76,76,76,71,76,71,76,76,71,76,76,71,71,76,76,76,71,76,71,76,76,71,76,71,71,76,71,76,76,71,76,76,71,71,71,76,76,76,71,71,76,76,71,76,71,71,71,76,71,71,76,76,71,71,76,76,71,71,71,71,76,76,71,71,71,71,71,76,76,76,76,76,71,71,71,71,71,76,76,71,71,76,71,76,71,76,71,76,71,71,76,71,71,71,76,71,71,76,71,76,71,76,71,71,76,71,76,76,76,76,71,76,71,76,76,76,76,71,71,76,76,71,76,76,76,71,71,71,76,76,76,71,76,76,71,76,76,76,71,71,76,76,71,76,76,71,76,76,76,76,76,76,76,71,71,76,71,76,76,71,71,71,76,76,76,76,76,76,71,71,71,76,71,71,76,71,71,76,71,71,76,71,76,76,71,71,71,76,71,76,71,76,76,76,76,76,71,71,71,71,71,76,76,76,76,76,76,76,71,76,71,71,76,71,71,71,71,76,71,71,76,76,76,76,71,71,76,71,71,76,71,71,76,76,76,76,76,76,71,71,71,71,71,71,76,76,76,71,76,76,76,76,71,76,76,71,71,71,76,71,76,76,76,76,76,76,71,71,76,71,76,71,76,71,71,76,71,71,71,71,71,76,71,76,76,71,71,76,71,76,76,76,76,76,76,76,76,71,71,71,71,76,76,71,71,71,71,71,76,71,76,76,76,71,76,76,76,76,76,71,71,76,76,71,71,76,71,76,71,71,71,76,76,76,76,71,71,71,76,76,71,76,71,76,71,76,71,71,71,76,71,71,76,71,71,71,76,71,76,71,76,76,71,76,76,71,76,71,76,71,76,71,71,71,76,76,71,71,76,76,71,71,71,76,76,71,71,76,71,76,76,71,76,71,76,71,71,76,71,71,76,76,71,76,76,71,76,71,71,76,71,76,76,71,71,76,76,71,76,76,71,76,76,76,71,76,76,76,71,71,76,71,71,76,71,76,76,71,71,71,76,76,71,76,71,76,71,76,71,76,71,76,76,76,71,76,76,71,71,71,71,71,71,71,76,71,71,71,71,71,71,76,76,71,76,71,71,76,76,76,76,71,71,71,71,76,76,71,76,76,71,71,71,71,71,76,71,76,76,71,76,76,76,71,76,76,76,76,76,71,71,76,76,76,76,76,71,76,71,76,76,76,76,76,71,76,76,71,71,76,76,71,71,71,71,76,76,76,76,76,71,76,76,71,76,71,71,71,71,76,71,71,71,76,76,71,71,76,71,71,76,76,76,71,71,71,71,71,76,76,76,76,71,71,71,71,71,71,76,71,71,71,71,71,71,76,76,76,71,76,76,71,76,71,76,71,76,71,76,71,71,71,71,76,71,71,71,76,71,71,76,76,71,76,76,71,76,76,71,76,76,76,76,71,71,71,71,76,76,76,71,76,71,71,71,71,76,76,71,71,76,76,76,76,71,76,71,76,71,71,76,71,71,76,76,71,76,71,71,71,71,71,71,76,76,71,71,71,71,76,71,71,71,71,71,76,71,76,71,76,76,71,76,76,71,76,76,71,76,76,71,71,71,71,71,76,71,71,76,76,71,71,76,76,71,76,76,71,71,76,76,71,76,71,76,76,76,76,71,76,71,76,76,71,71,71,76,76,71,76,76,76,76,76,71,71,76,71,71,71,71,71,71,76,71,71,71,71,76,71,71,76,71,76,76,71,76,71,71,76,71,71,71,71,76,71,76,71,71,71,71,71,71,71,71,76,76,71,76,71,76,71,71,76,76,76,71,71,76,71,76,76,76,71,71,71,71,71,71,71,76,71,71,71,71,71,71,71,76,71,71,76,76,71,71,76,71,76,76,71,76,76,71,76,76,76,71,71,76,71,76,76,71,71,76,76,76,76,76,76,71,71,76,71,76,71,76,71,76,71,76,76,71,71,76,76,71,76,71,76,71,71,76,76,76,71,76,71,71,71,71,76,71,76,71,71,71,71,76,71,71,71,76,76,71,76,71,76,76,76,76,76,71,76,71,71,71,71,71,71,71,71,71,76,71,76,76,76,76,71,71,71,71,71,76,76,76,71,71,71,76,76,76,76,76,76,71,76,76,76,76,71,76,71,71,71,76,76,76,76,71,71,71,71,76,71,71,71,76,76,76,71,76,76,71,71,71,76,76,71,71,71,71,71,76,76,71,71,76,71,71,71,76,76,71,76,71,71,71,76,76,71,76,71,76,71,71 }, + []int{ 1,0,1,0,1,0,0,1,0,3,2,1,0,0,0,0,1,0,0,0,1,0,1,0,0,0,2,1,0,0,0,3,2,1,0,1,0,0,0,1,0,2,1,0,0,0,12,11,10,9,8,7,6,5,4,3,2,1,0,1,0,0,0,2,1,0,0,0,0,1,0,3,2,1,0,1,0,1,0,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2,1,0,1,0,8,7,6,5,4,3,2,1,0,0,1,0,1,0,2,1,0,0,0,2,1,0,1,0,0,0,7,6,5,4,3,2,1,0,7,6,5,4,3,2,1,0,2,1,0,0,2,1,0,1,0,0,1,0,0,1,0,0,0,2,1,0,1,0,0,2,1,0,0,0,0,0,0,2,1,0,1,0,1,0,1,0,1,0,0,2,1,0,0,1,0,1,0,2,1,0,0,0,1,0,4,3,2,1,0,1,0,4,3,2,1,0,3,2,1,0,0,1,0,1,0,0,0,0,0,1,0,9,8,7,6,5,4,3,2,1,0,1,0,0,0,0,5,4,3,2,1,0,0,0,3,2,1,0,0,0,0,0,0,1,0,0,0,0,1,0,3,2,1,0,0,0,0,4,3,2,1,0,3,2,1,0,0,0,1,0,0,3,2,1,0,0,5,4,3,2,1,0,0,2,1,0,3,2,1,0,0,1,0,3,2,1,0,0,1,0,1,0,0,0 }, + }, + + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, dailyTemperatures(tc.temperatures), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + dailyTemperatures(tc.temperatures) + } + } +} diff --git a/Algorithms/0740.delete-and-earn/README.md b/Algorithms/0740.delete-and-earn/README.md new file mode 100755 index 000000000..ab237341e --- /dev/null +++ b/Algorithms/0740.delete-and-earn/README.md @@ -0,0 +1,39 @@ +# [740. Delete and Earn](https://leetcode.com/problems/delete-and-earn/) + +## 题目 + +Given an array nums of integers, you can perform operations on the array. + +In each operation, you pick any nums[i] and delete it to earn nums[i] points. After, you must delete every element equal to nums[i] - 1 or nums[i] + 1. + +You start with 0 points. Return the maximum number of points you can earn by applying such operations. + +Example 1: + +```text +Input: nums = [3, 4, 2] +Output: 6 +Explanation: +Delete 4 to earn 4 points, consequently 3 is also deleted. +Then, delete 2 to earn 2 points. 6 total points are earned. +``` + +Example 2: + +```text +Input: nums = [2, 2, 3, 3, 3, 4] +Output: 9 +Explanation: +Delete 3 to earn 3 points, deleting both 2's and the 4. +Then, delete 3 again to earn 3 points, and 3 again to earn 3 points. +9 total points are earned. +``` + +Note: + +1. The length of nums is at most 20000. +1. Each element nums[i] is an integer in the range [1, 10000]. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0740.delete-and-earn/delete-and-earn.go b/Algorithms/0740.delete-and-earn/delete-and-earn.go new file mode 100755 index 000000000..1aad009cf --- /dev/null +++ b/Algorithms/0740.delete-and-earn/delete-and-earn.go @@ -0,0 +1,34 @@ +package Problem0740 + +func deleteAndEarn(nums []int) int { + if len(nums) == 0 { + return 0 + } + if len(nums) == 1 { + return nums[0] + } + + size := int(1e4 + 1) + // dp[n] 表示,删除 nums 中所有 <=n 的数后,能获取的最大分数 + dp := make([]int, size) + for _, n := range nums { + dp[n] += n + } + + for i := 2; i < size; i++ { + // 删除了 i-1,所以 i 是被消除掉的,不能累加 point + // ↓ + dp[i] = max(dp[i-1], dp[i]+dp[i-2]) + // ↑ + // i-1 是被消除掉的,所以,此时是 dp[i]+dp[i-2] + } + + return dp[size-1] +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} diff --git a/Algorithms/0740.delete-and-earn/delete-and-earn_test.go b/Algorithms/0740.delete-and-earn/delete-and-earn_test.go new file mode 100755 index 000000000..ccbe40db9 --- /dev/null +++ b/Algorithms/0740.delete-and-earn/delete-and-earn_test.go @@ -0,0 +1,59 @@ +package Problem0740 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans int +}{ + + { + []int{8, 3, 4, 7, 6, 6, 9, 2, 5, 8, 2, 4, 9, 5, 9, 1, 5, 7, 1, 4}, + 61, + }, + + { + []int{}, + 0, + }, + + { + []int{3}, + 3, + }, + + { + []int{3, 4, 2}, + 6, + }, + + { + []int{2, 2, 3, 3, 3, 4}, + 9, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, deleteAndEarn(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + deleteAndEarn(tc.nums) + } + } +} diff --git a/Algorithms/0741.cherry-pickup/README.md b/Algorithms/0741.cherry-pickup/README.md new file mode 100755 index 000000000..9016ef003 --- /dev/null +++ b/Algorithms/0741.cherry-pickup/README.md @@ -0,0 +1,41 @@ +# [741. Cherry Pickup](https://leetcode.com/problems/cherry-pickup/) + +## 题目 + +In a N x N grid representing a field of cherries, each cell is one of three possible integers. + +- 0 means the cell is empty, so you can pass through; +- 1 means the cell contains a cherry, that you can pick up and pass through; +- -1 means the cell contains a thorn that blocks your way. + +Your task is to collect maximum number of cherries possible by following the rules below: + +- Starting at the position (0, 0) and reaching (N-1, N-1) by moving right or down through valid path cells (cells with value 0 or 1); +- After reaching (N-1, N-1), returning to (0, 0) by moving left or up through valid path cells; +- When passing through a path cell containing a cherry, you pick it up and the cell becomes an empty cell (0); +- If there is no valid path between (0, 0) and (N-1, N-1), then no cherries can be collected. + +Example 1: + +```text +Input: grid = +[[0, 1, -1], + [1, 0, -1], + [1, 1, 1]] +Output: 5 +Explanation: +The player started at (0, 0) and went down, down, right right to reach (2, 2). +4 cherries were picked up during this single trip, and the matrix becomes [[0,1,-1],[0,0,-1],[0,0,0]]. +Then, the player went left, up, up, left to return home, picking up one more cherry. +The total number of cherries picked up is 5, and this is the maximum possible. +``` + +Note: + +- grid is an N by N 2D array, with 1 <= N <= 50. +- Each grid[i][j] is an integer in the set {-1, 0, 1}. +- It is guaranteed that grid[0][0] and grid[N-1][N-1] are not -1. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0741.cherry-pickup/cherry-pickup.go b/Algorithms/0741.cherry-pickup/cherry-pickup.go new file mode 100755 index 000000000..152ac9a7f --- /dev/null +++ b/Algorithms/0741.cherry-pickup/cherry-pickup.go @@ -0,0 +1,61 @@ +package Problem0741 + +// 本题等效于两个人同时从 (0,0) 出发到 (n-1,n-1) 的过程 +func cherryPickup(grid [][]int) int { + n := len(grid) + // dp[x1][x2] means two length p path , currently one arrived at […, x1] , the other is at […, x2], the max value we can get + dp := make([][]int, n) + for i := range dp { + dp[i] = make([]int, n) + for j := range dp[i] { + dp[i][j] = -1 + } + } + dp[0][0] = grid[0][0] + + pathLen := n + n - 1 + for pl := 2; pl <= pathLen; pl++ { + for x1 := n - 1; x1 >= 0; x1-- { + for x2 := x1; x2 >= 0; x2-- { + y1 := pl - 1 - x1 + y2 := pl - 1 - x2 + if y1 < 0 || y2 < 0 || y1 >= n || y2 >= n { + continue + } + if grid[y1][x1] < 0 || grid[y2][x2] < 0 { + dp[x1][x2] = -1 + continue + } + + best := -1 + delta := grid[y1][x1] + + if x1 != x2 { + delta += grid[y2][x2] + } + if x1 > 0 && x2 > 0 && dp[x1-1][x2-1] >= 0 { + best = max(best, dp[x1-1][x2-1]+delta) + } + if x1 > 0 && y2 > 0 && dp[x1-1][x2] >= 0 { + best = max(best, dp[x1-1][x2]+delta) + } + if y1 > 0 && x2 > 0 && dp[x1][x2-1] >= 0 { + best = max(best, dp[x1][x2-1]+delta) + } + if y1 > 0 && y2 > 0 && dp[x1][x2] >= 0 { + best = max(best, dp[x1][x2]+delta) + } + dp[x1][x2] = best + } + } + } + + return max(dp[n-1][n-1], 0) +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} diff --git a/Algorithms/0741.cherry-pickup/cherry-pickup_test.go b/Algorithms/0741.cherry-pickup/cherry-pickup_test.go new file mode 100755 index 000000000..04f671faf --- /dev/null +++ b/Algorithms/0741.cherry-pickup/cherry-pickup_test.go @@ -0,0 +1,52 @@ +package Problem0741 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + grid [][]int + ans int +}{ + + { + [][]int{ + {1, 1, -1}, + {1, -1, 1}, + {-1, 1, 1}, + }, + 0, + }, + + { + [][]int{ + {0, 1, -1}, + {1, 0, -1}, + {1, 1, 1}, + }, + 5, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, cherryPickup(tc.grid), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + cherryPickup(tc.grid) + } + } +} diff --git a/Algorithms/0744.network-delay-time/README.md b/Algorithms/0744.network-delay-time/README.md new file mode 100755 index 000000000..c84edd9b5 --- /dev/null +++ b/Algorithms/0744.network-delay-time/README.md @@ -0,0 +1,20 @@ +# [744. Network Delay Time](https://leetcode.com/problems/network-delay-time/) + +## 题目 + +There are N network nodes, labelled 1 to N. + +Given times, a list of travel times as directed edges times[i] = (u, v, w), where u is the source node, v is the target node, and w is the time it takes for a signal to travel from source to target. + +Now, we send a signal from a certain node K. How long will it take for all nodes to receive the signal? If it is impossible, return -1. + +Note: + +1. N will be in the range [1, 100]. +1. K will be in the range [1, N]. +1. The length of times will be in the range [1, 6000]. +1. All edges times[i] = (u, v, w) will have 1 <= u, v <= N and 1 <= w <= 100. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0744.network-delay-time/network-delay-time.go b/Algorithms/0744.network-delay-time/network-delay-time.go new file mode 100755 index 000000000..608131c52 --- /dev/null +++ b/Algorithms/0744.network-delay-time/network-delay-time.go @@ -0,0 +1,57 @@ +package Problem0744 + +func networkDelayTime(times [][]int, N int, K int) int { + maxInt := int(1e4) + + // minTime[i] == m 表示, i 节点接收到信号所需的最小时间为 m + minTime := make([]int, N+1) + for i := 1; i <= N; i++ { + minTime[i] = maxInt + } + // 信号从 K 节点出发,所以 minTime[K] = 0 + minTime[K] = 0 + + // cost[i][j] = m 表示,从 i 节点到 j 节点所需的时间 + cost := make([][]int, N+1) + for i := range cost { + cost[i] = make([]int, N+1) + for j := 0; j <= N; j++ { + cost[i][j] = maxInt + } + } + for _, t := range times { + cost[t[0]][t[1]] = t[2] + } + + queue := make([]int, 1, N+1) + queue[0] = K + for len(queue) > 0 { + u := queue[0] + queue = queue[1:] + + for v := 1; v <= N; v++ { + if minTime[v] > minTime[u]+cost[u][v] { + minTime[v] = minTime[u] + cost[u][v] + queue = append(queue, v) + } + } + } + + res := 0 + for i := 1; i <= N; i++ { + res = max(res, minTime[i]) + } + + if res == maxInt { + // 存在无法到达的节点 + return -1 + } + return res +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} diff --git a/Algorithms/0744.network-delay-time/network-delay-time_test.go b/Algorithms/0744.network-delay-time/network-delay-time_test.go new file mode 100755 index 000000000..55b1f8c78 --- /dev/null +++ b/Algorithms/0744.network-delay-time/network-delay-time_test.go @@ -0,0 +1,77 @@ +package Problem0744 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + times [][]int + N int + K int + ans int +}{ + + { + [][]int{ + {3, 5, 78}, + {2, 1, 1}, + {1, 3, 0}, + {4, 3, 59}, + {5, 3, 85}, + {5, 2, 22}, + {2, 4, 23}, + {1, 4, 43}, + {4, 5, 75}, + {5, 1, 15}, + {1, 5, 91}, + {4, 1, 16}, + {3, 2, 98}, + {3, 4, 22}, + {5, 4, 31}, + {1, 2, 0}, + {2, 5, 4}, + {4, 2, 51}, + {3, 1, 36}, + {2, 3, 59}}, + 5, + 5, + 31, + }, + + { + [][]int{{2, 1, 1}, {2, 3, 1}, {3, 4, 1}}, + 4, + 2, + 2, + }, + + { + [][]int{{2, 1, 1}, {2, 3, 1}}, + 4, + 2, + -1, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, networkDelayTime(tc.times, tc.N, tc.K), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + networkDelayTime(tc.times, tc.N, tc.K) + } + } +} diff --git a/Algorithms/0745.find-smallest-letter-greater-than-target/README.md b/Algorithms/0745.find-smallest-letter-greater-than-target/README.md new file mode 100755 index 000000000..806b34f0e --- /dev/null +++ b/Algorithms/0745.find-smallest-letter-greater-than-target/README.md @@ -0,0 +1,51 @@ +# [745. Find Smallest Letter Greater Than Target](https://leetcode.com/problems/find-smallest-letter-greater-than-target/) + +## 题目 + +Given a list of sorted characters letters containing only lowercase letters, and given a target letter target, find the smallest element in the list that is larger than the given target. + +Letters also wrap around. For example, if the target is target = 'z' and letters = ['a', 'b'], the answer is 'a'. + +Examples: + +```text +Input: +letters = ["c", "f", "j"] +target = "a" +Output: "c" + +Input: +letters = ["c", "f", "j"] +target = "c" +Output: "f" + +Input: +letters = ["c", "f", "j"] +target = "d" +Output: "f" + +Input: +letters = ["c", "f", "j"] +target = "g" +Output: "j" + +Input: +letters = ["c", "f", "j"] +target = "j" +Output: "c" + +Input: +letters = ["c", "f", "j"] +target = "k" +Output: "c" +``` + +Note: + +1. letters has a length in range [2, 10000]. +1. letters consists of lowercase letters, and contains at least 2 unique letters. +1. target is a lowercase letter. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0745.find-smallest-letter-greater-than-target/find-smallest-letter-greater-than-target.go b/Algorithms/0745.find-smallest-letter-greater-than-target/find-smallest-letter-greater-than-target.go new file mode 100755 index 000000000..4d1729094 --- /dev/null +++ b/Algorithms/0745.find-smallest-letter-greater-than-target/find-smallest-letter-greater-than-target.go @@ -0,0 +1,13 @@ +package Problem0745 + +import ( + "sort" +) + +func nextGreatestLetter(letters []byte, target byte) byte { + n := len(letters) + i := sort.Search(n, func(i int) bool { + return target < letters[i] + }) + return letters[i%n] +} diff --git a/Algorithms/0745.find-smallest-letter-greater-than-target/find-smallest-letter-greater-than-target_test.go b/Algorithms/0745.find-smallest-letter-greater-than-target/find-smallest-letter-greater-than-target_test.go new file mode 100755 index 000000000..9f27ee5ea --- /dev/null +++ b/Algorithms/0745.find-smallest-letter-greater-than-target/find-smallest-letter-greater-than-target_test.go @@ -0,0 +1,71 @@ +package Problem0745 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + letters []byte + target byte + ans byte +}{ + + { + []byte{'c', 'f', 'j'}, + 'a', + 'c', + }, + + { + []byte{'c', 'f', 'j'}, + 'c', + 'f', + }, + + { + []byte{'c', 'f', 'j'}, + 'd', + 'f', + }, + + { + []byte{'c', 'f', 'j'}, + 'g', + 'j', + }, + + { + []byte{'c', 'f', 'j'}, + 'j', + 'c', + }, + + { + []byte{'c', 'f', 'j'}, + 'k', + 'c', + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, nextGreatestLetter(tc.letters, tc.target), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + nextGreatestLetter(tc.letters, tc.target) + } + } +} diff --git a/Algorithms/0746.prefix-and-suffix-search/README.md b/Algorithms/0746.prefix-and-suffix-search/README.md new file mode 100755 index 000000000..9d167f9de --- /dev/null +++ b/Algorithms/0746.prefix-and-suffix-search/README.md @@ -0,0 +1,28 @@ +# [746. Prefix and Suffix Search](https://leetcode.com/problems/prefix-and-suffix-search/) + +## 题目 + +Given many words, words[i] has weight i. + +Design a class WordFilter that supports one function, WordFilter.f(String prefix, String suffix). It will return the word with given prefix and suffix with maximum weight. If no word exists, return -1. + +Examples: + +```text +Input: +WordFilter(["apple"]) +WordFilter.f("a", "e") // returns 0 +WordFilter.f("b", "") // returns -1 +``` + +Note: + +1. words has length in range [1, 15000]. +1. For each test case, up to words.length queries WordFilter.f may be made. +1. words[i] has length in range [1, 10]. +1. prefix, suffix have lengths in range [0, 10]. +1. words[i] and prefix, suffix queries consist of lowercase letters only. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0746.prefix-and-suffix-search/prefix-and-suffix-search.go b/Algorithms/0746.prefix-and-suffix-search/prefix-and-suffix-search.go new file mode 100755 index 000000000..2d64112f3 --- /dev/null +++ b/Algorithms/0746.prefix-and-suffix-search/prefix-and-suffix-search.go @@ -0,0 +1,35 @@ +package Problem0746 + +// WordFilter 是字符过滤器 +type WordFilter struct { + ords map[string]int +} + +// Constructor 返回 WordFilter +func Constructor(words []string) WordFilter { + o := make(map[string]int, len(words)*5) + for k := 0; k < len(words); k++ { + for i := 0; i <= 10 && i <= len(words[k]); i++ { + for j := len(words[k]); 0 <= j && len(words[k])-10 <= j; j-- { + pps := words[k][:i] + "#" + words[k][j:] + o[pps] = k + } + } + } + return WordFilter{ords: o} +} + +// F 用于查找同时拥有前缀和后缀的单词的索引号,同时存在多个符合条件的单词的话,返回其中的最大值 +func (w *WordFilter) F(prefix, suffix string) int { + pps := prefix + "#" + suffix + if index, ok := w.ords[pps]; ok { + return index + } + return -1 +} + +/** + * Your WordFilter object will be instantiated and called as such: + * obj := Constructor(words); + * param_1 := obj.F(prefix,suffix); + */ diff --git a/Algorithms/0746.prefix-and-suffix-search/prefix-and-suffix-search_test.go b/Algorithms/0746.prefix-and-suffix-search/prefix-and-suffix-search_test.go new file mode 100755 index 000000000..8ab60025e --- /dev/null +++ b/Algorithms/0746.prefix-and-suffix-search/prefix-and-suffix-search_test.go @@ -0,0 +1,37 @@ +package Problem0746 + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_wordFilter(t *testing.T) { + ast := assert.New(t) + + words := []string{"apple", "banana", "abbbe"} + w := Constructor(words) + + ast.Equal(0, w.F("ap", "e")) + + ast.Equal(1, w.F("ba", "")) + + ast.Equal(2, w.F("a", "e")) + + ast.Equal(2, w.F("", "")) +} +func Test_wordFilter_2(t *testing.T) { + ast := assert.New(t) + + words := []string{"pop"} + w := Constructor(words) + + pss := [][]string{ + {"", ""}, {"", "p"}, {"", "op"}, {"", "pop"}, {"p", ""}, {"p", "p"}, {"p", "op"}, {"p", "pop"}, {"po", ""}, {"po", "p"}, {"po", "op"}, {"po", "pop"}, {"pop", ""}, {"pop", "p"}, {"pop", "op"}, {"pop", "pop"}, {"", ""}, {"", "p"}, {"", "gp"}, {"", "pgp"}, {"p", ""}, {"p", "p"}, {"p", "gp"}, {"p", "pgp"}, {"pg", ""}, {"pg", "p"}, {"pg", "gp"}, {"pg", "pgp"}, {"pgp", ""}, {"pgp", "p"}, {"pgp", "gp"}, {"pgp", "pgp"}} + + ans := []int{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1} + + for i := 0; i < len(pss); i++ { + ast.Equal(ans[i], w.F(pss[i][0], pss[i][1]), "输入 %v, %d", pss[i], ans[i]) + } +} diff --git a/Algorithms/0747.min-cost-climbing-stairs/README.md b/Algorithms/0747.min-cost-climbing-stairs/README.md new file mode 100755 index 000000000..16552c54b --- /dev/null +++ b/Algorithms/0747.min-cost-climbing-stairs/README.md @@ -0,0 +1,32 @@ +# [747. Min Cost Climbing Stairs](https://leetcode.com/problems/min-cost-climbing-stairs/) + +## 题目 + +On a staircase, the i-th step has some non-negative cost cost[i] assigned (0 indexed). + +Once you pay the cost, you can either climb one or two steps. You need to find minimum cost to reach the top of the floor, and you can either start from the step with index 0, or the step with index 1. + +Example 1: + +```text +Input: cost = [10, 15, 20] +Output: 15 +Explanation: Cheapest is start on cost[1], pay that cost and go to the top. +``` + +Example 2: + +```text +Input: cost = [1, 100, 1, 1, 1, 100, 1, 1, 100, 1] +Output: 6 +Explanation: Cheapest is start on cost[0], and only step on 1s, skipping cost[3]. +``` + +Note: + +1. cost will have a length in the range [2, 1000]. +1. Every cost[i] will be an integer in the range [0, 999]. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0747.min-cost-climbing-stairs/min-cost-climbing-stairs.go b/Algorithms/0747.min-cost-climbing-stairs/min-cost-climbing-stairs.go new file mode 100755 index 000000000..587b54e63 --- /dev/null +++ b/Algorithms/0747.min-cost-climbing-stairs/min-cost-climbing-stairs.go @@ -0,0 +1,20 @@ +package Problem0747 + +func minCostClimbingStairs(cost []int) int { + n := len(cost) + // dp[i] 表示,爬到 i-th 台阶需要的花费 + dp := make([]int, n+1) + + for i := 2; i <= n; i++ { + dp[i] = min(dp[i-1]+cost[i-1], dp[i-2]+cost[i-2]) + } + + return dp[n] +} + +func min(a, b int) int { + if a < b { + return a + } + return b +} diff --git a/Algorithms/0747.min-cost-climbing-stairs/min-cost-climbing-stairs_test.go b/Algorithms/0747.min-cost-climbing-stairs/min-cost-climbing-stairs_test.go new file mode 100755 index 000000000..ed659be6e --- /dev/null +++ b/Algorithms/0747.min-cost-climbing-stairs/min-cost-climbing-stairs_test.go @@ -0,0 +1,44 @@ +package Problem0747 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + cost []int + ans int +}{ + + { + []int{10, 15, 20}, + 15, + }, + + { + []int{1, 100, 1, 1, 1, 100, 1, 1, 100, 1}, + 6, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, minCostClimbingStairs(tc.cost), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + minCostClimbingStairs(tc.cost) + } + } +} diff --git a/Algorithms/0748.largest-number-at-least-twice-of-others/README.md b/Algorithms/0748.largest-number-at-least-twice-of-others/README.md new file mode 100755 index 000000000..16d37781e --- /dev/null +++ b/Algorithms/0748.largest-number-at-least-twice-of-others/README.md @@ -0,0 +1,35 @@ +# [748. Largest Number At Least Twice of Others](https://leetcode.com/problems/largest-number-at-least-twice-of-others/) + +## 题目 + +In a given integer array nums, there is always exactly one largest element. + +Find whether the largest element in the array is at least twice as much as every other number in the array. + +If it is, return the index of the largest element, otherwise return -1. + +Example 1: + +```text +Input: nums = [3, 6, 1, 0] +Output: 1 +Explanation: 6 is the largest integer, and for every other number in the array x, +6 is more than twice as big as x. The index of value 6 is 1, so we return 1. +``` + +Example 2: + +```text +Input: nums = [1, 2, 3, 4] +Output: -1 +Explanation: 4 isn't at least as big as twice the value of 3, so we return -1. +``` + +Note: + +1. nums will have a length in the range [1, 50]. +1. Every nums[i] will be an integer in the range [0, 99]. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0748.largest-number-at-least-twice-of-others/largest-number-at-least-twice-of-others.go b/Algorithms/0748.largest-number-at-least-twice-of-others/largest-number-at-least-twice-of-others.go new file mode 100755 index 000000000..1c5fbfe3e --- /dev/null +++ b/Algorithms/0748.largest-number-at-least-twice-of-others/largest-number-at-least-twice-of-others.go @@ -0,0 +1,29 @@ +package Problem0748 + +func dominantIndex(a []int) int { + n := len(a) + if n == 1 { + return 0 + } + + // i1 是 a 中第 1 大的数的索引号 + // i2 是 a 中第 2 大的数的索引号 + i1, i2 := 0, 1 + if a[i1] < a[i2] { + i1, i2 = i2, i1 + } + + // 寻找真正的 i1 和 i2 + for i := 2; i < n; i++ { + if a[i1] < a[i] { + i2, i1 = i1, i + } else if a[i2] < a[i] { + i2 = i + } + } + + if a[i2] == 0 || a[i1]/a[i2] >= 2 { + return i1 + } + return -1 +} diff --git a/Algorithms/0748.largest-number-at-least-twice-of-others/largest-number-at-least-twice-of-others_test.go b/Algorithms/0748.largest-number-at-least-twice-of-others/largest-number-at-least-twice-of-others_test.go new file mode 100755 index 000000000..6da8c36ec --- /dev/null +++ b/Algorithms/0748.largest-number-at-least-twice-of-others/largest-number-at-least-twice-of-others_test.go @@ -0,0 +1,59 @@ +package Problem0748 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + nums []int + ans int +}{ + + { + []int{1}, + 0, + }, + + { + []int{0, 3, 1, 1}, + 1, + }, + + { + []int{0, 0, 0, 1}, + 3, + }, + + { + []int{3, 6, 1, 0}, + 1, + }, + + { + []int{1, 2, 3, 4}, + -1, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, dominantIndex(tc.nums), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + dominantIndex(tc.nums) + } + } +} diff --git a/Algorithms/0749.shortest-completing-word/README.md b/Algorithms/0749.shortest-completing-word/README.md new file mode 100755 index 000000000..7a35c6248 --- /dev/null +++ b/Algorithms/0749.shortest-completing-word/README.md @@ -0,0 +1,41 @@ +# [749. Shortest Completing Word](https://leetcode.com/problems/shortest-completing-word/) + +## 题目 + +Find the minimum length word from a given dictionary words, which has all the letters from the string licensePlate. Such a word is said to complete the given string licensePlate + +Here, for letters we ignore case. For example, "P" on the licensePlate still matches "p" on the word. + +It is guaranteed an answer exists. If there are multiple answers, return the one that occurs first in the array. + +The license plate might have the same letter occurring multiple times. For example, given a licensePlate of "PP", the word "pair" does not complete the licensePlate, but the word "supper" does. + +Example 1: + +```text +Input: licensePlate = "1s3 PSt", words = ["step", "steps", "stripe", "stepple"] +Output: "steps" +Explanation: The smallest length word that contains the letters "S", "P", "S", and "T". +Note that the answer is not "step", because the letter "s" must occur in the word twice. +Also note that we ignored case for the purposes of comparing whether a letter exists in the word. +``` + +Example 2: + +```text +Input: licensePlate = "1s3 456", words = ["looks", "pest", "stew", "show"] +Output: "pest" +Explanation: There are 3 smallest length words that contains the letters "s". +We return the one that occurred first. +``` + +Note: + +1. licensePlate will be a string with length in range [1, 7]. +1. licensePlate will contain digits, spaces, or letters (uppercase or lowercase). +1. words will have a length in the range [10, 1000]. +1. Every words[i] will consist of lowercase letters, and have length in range [1, 15]. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0749.shortest-completing-word/shortest-completing-word.go b/Algorithms/0749.shortest-completing-word/shortest-completing-word.go new file mode 100755 index 000000000..e817188b9 --- /dev/null +++ b/Algorithms/0749.shortest-completing-word/shortest-completing-word.go @@ -0,0 +1,46 @@ +package Problem0749 + +import ( + "strings" +) + +func shortestCompletingWord(licensePlate string, words []string) string { + keys := getKeys(licensePlate) + minLen := 1<<63 - 1 + res := "" + + for _, w := range words { + if len(w) >= minLen { + continue + } + + isCompleting := true + for k, c := range keys { + if strings.Count(w, k) < c { + isCompleting = false + break + } + } + + if isCompleting { + res = w + minLen = len(w) + } + } + + return res +} + +func getKeys(licensePlate string) map[string]int { + licensePlate = strings.ToLower(licensePlate) + bs := []byte(licensePlate) + + res := make(map[string]int, len(licensePlate)) + for _, b := range bs { + if 'a' <= b && b <= 'z' { + res[string(b)]++ + } + } + + return res +} diff --git a/Algorithms/0749.shortest-completing-word/shortest-completing-word_test.go b/Algorithms/0749.shortest-completing-word/shortest-completing-word_test.go new file mode 100755 index 000000000..f611a68a7 --- /dev/null +++ b/Algorithms/0749.shortest-completing-word/shortest-completing-word_test.go @@ -0,0 +1,47 @@ +package Problem0749 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + licensePlate string + words []string + ans string +}{ + + { + "1s3 PSt", + []string{"step", "steps", "stripe", "stepple"}, + "steps", + }, + + { + "1s3 456", + []string{"looks", "pest", "stew", "show"}, + "pest", + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, shortestCompletingWord(tc.licensePlate, tc.words), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + shortestCompletingWord(tc.licensePlate, tc.words) + } + } +} diff --git a/Algorithms/0750.contain-virus/README.md b/Algorithms/0750.contain-virus/README.md new file mode 100755 index 000000000..ffbed5ad9 --- /dev/null +++ b/Algorithms/0750.contain-virus/README.md @@ -0,0 +1,65 @@ +# [750. Contain Virus](https://leetcode.com/problems/contain-virus/) + +## 题目 + +A virus is spreading rapidly, and your task is to quarantine the infected area by installing walls. + +The world is modeled as a 2-D array of cells, where 0 represents uninfected cells, and 1 represents cells contaminated with the virus. A wall (and only one wall) can be installed between any two 4-directionally adjacent cells, on the shared boundary. + +Every night, the virus spreads to all neighboring cells in all four directions unless blocked by a wall. Resources are limited. Each day, you can install walls around only one region -- the affected area (continuous block of infected cells) that threatens the most uninfected cells the following night. There will never be a tie. + +Can you save the day? If so, what is the number of walls required? If not, and the world becomes fully infected, return the number of walls used. + +Example 1: + +```text +Input: grid = +[[0,1,0,0,0,0,0,1], + [0,1,0,0,0,0,0,1], + [0,0,0,0,0,0,0,1], + [0,0,0,0,0,0,0,0]] +Output: 10 +Explanation: +There are 2 contaminated regions. +On the first day, add 5 walls to quarantine the viral region on the left. The board after the virus spreads is: + +[[0,1,0,0,0,0,1,1], + [0,1,0,0,0,0,1,1], + [0,0,0,0,0,0,1,1], + [0,0,0,0,0,0,0,1]] + +On the second day, add 5 walls to quarantine the viral region on the right. The virus is fully contained. +``` + +Example 2: + +```text +Input: grid = +[[1,1,1], + [1,0,1], + [1,1,1]] +Output: 4 +Explanation: Even though there is only one cell saved, there are 4 walls built. +Notice that walls are only built on the shared boundary of two different cells. +``` + +Example 3: + +```text +Input: grid = +[[1,1,1,0,0,0,0,0,0], + [1,0,1,0,1,1,1,1,1], + [1,1,1,0,0,0,0,0,0]] +Output: 13 +Explanation: The region on the left only builds two new walls. +``` + +Note: + +1. The number of rows and columns of grid will each be in the range [1, 50]. +1. Each grid[i][j] will be either 0 or 1. +1. Throughout the described process, there is always a contiguous viral region that will infect strictly more uncontaminated squares in the next round. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0750.contain-virus/contain-virus.go b/Algorithms/0750.contain-virus/contain-virus.go new file mode 100755 index 000000000..d0ba06b11 --- /dev/null +++ b/Algorithms/0750.contain-virus/contain-virus.go @@ -0,0 +1,146 @@ +package Problem0750 + +// 贪心算法 +// 每次把会导致最多感染的区域围起来 + +var dx = []int{-1, 1, 0, 0} +var dy = []int{0, 0, -1, 1} + +func containVirus(grid [][]int) int { + m, n := len(grid), len(grid[0]) + + bfs := func(i, j, regionID int, isChecked []bool) { + queue := make([][2]int, 1, m*n) + queue[0] = [2]int{i, j} + isChecked[i*n+j] = true + + for len(queue) > 0 { + i, j = queue[0][0], queue[0][1] + queue = queue[1:] + grid[i][j] = regionID + + for k := 0; k < 4; k++ { + x := i + dx[k] + y := j + dy[k] + if 0 <= x && x < m && + 0 <= y && y < n && + !isChecked[x*n+y] && + grid[x][y] > 0 { + queue = append(queue, [2]int{x, y}) + isChecked[x*n+y] = true + } + } + } + } + + // 统计区域数量,并对其进行编号 + checkRegion := func() int { + regionID := 1 + isChecked := make([]bool, m*n) + for i := 0; i < m; i++ { + for j := 0; j < n; j++ { + if grid[i][j] > 0 && !isChecked[i*n+j] { + bfs(i, j, regionID, isChecked) + regionID++ + } + } + } + return regionID + } + + // 返回,如果不修墙的话,下次会导致最多感染的区域 ID + // 如果没有新感染的话,返回 -1 + maxRegion := func(size int) int { + // 统计各个区域会导致感染的最大数量 + // 统计的时候, + // 0 如果可以被同一个区域的多个细胞感染的话,只能算作这个区域的一次感染 + // 0 如果可以被多个区域感染的话,每个区域分别多一个 + count := make([]int, size) + for i := 0; i < m; i++ { + for j := 0; j < n; j++ { + if grid[i][j] == 0 { + isCounted := make(map[int]bool, 4) + for k := 0; k < 4; k++ { + x := i + dx[k] + y := j + dy[k] + if 0 <= x && x < m && + 0 <= y && y < n && + grid[x][y] > 0 && + !isCounted[grid[x][y]] { + count[grid[x][y]]++ + isCounted[grid[x][y]] = true + } + } + } + } + } + // 寻找会导致最多感染的区域 + max := 0 + id := -1 + for i := 1; i < size; i++ { + if max < count[i] { + max = count[i] + id = i + } + } + + return id + } + + // 给指定区域安装围墙 + // 同时把区域内的所有值,标记为 -1,就能不在统计此区域 + installWalls := func(regionID int) int { + res := 0 + for i := 0; i < m; i++ { + for j := 0; j < n; j++ { + if grid[i][j] == regionID { + grid[i][j] = -1 + for k := 0; k < 4; k++ { + x := i + dx[k] + y := j + dy[k] + if 0 <= x && x < m && + 0 <= y && y < n && + grid[x][y] == 0 { + res++ + } + } + } + } + } + return res + } + + // 夜间的病毒传播 + nightInfect := func() { + isNewInfected := make([]bool, m*n) + for i := 0; i < m; i++ { + for j := 0; j < n; j++ { + if grid[i][j] > 0 && !isNewInfected[i*n+j] { + for k := 0; k < 4; k++ { + x := i + dx[k] + y := j + dy[k] + if 0 <= x && x < m && + 0 <= y && y < n && + grid[x][y] == 0 { + grid[x][y] = 1 + isNewInfected[x*n+y] = true + } + } + } + } + } + } + + res := 0 + for { + size := checkRegion() + id := maxRegion(size) + if id == -1 { + break + } + res += installWalls(id) + nightInfect() + } + + return res +} diff --git a/Algorithms/0750.contain-virus/contain-virus_test.go b/Algorithms/0750.contain-virus/contain-virus_test.go new file mode 100755 index 000000000..475ae276e --- /dev/null +++ b/Algorithms/0750.contain-virus/contain-virus_test.go @@ -0,0 +1,75 @@ +package Problem0750 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + grid [][]int + ans int +}{ + + { + [][]int{ + {0, 1, 0, 1, 1, 1, 1, 1, 1, 0}, + {0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + {0, 0, 1, 1, 1, 0, 0, 0, 1, 0}, + {0, 0, 0, 1, 1, 0, 0, 1, 1, 0}, + {0, 1, 0, 0, 1, 0, 1, 1, 0, 1}, + {0, 0, 0, 1, 0, 1, 0, 1, 1, 1}, + {0, 1, 0, 0, 1, 0, 0, 1, 1, 0}, + {0, 1, 0, 1, 0, 0, 0, 1, 1, 0}, + {0, 1, 1, 0, 0, 1, 1, 0, 0, 1}, + {1, 0, 1, 1, 0, 1, 0, 1, 0, 1}, + }, + 38, + }, + + { + [][]int{ + {0, 1, 0, 0, 0, 0, 0, 1}, + {0, 1, 0, 0, 0, 0, 0, 1}, + {0, 0, 0, 0, 0, 0, 0, 1}, + {0, 0, 0, 0, 0, 0, 0, 0}}, + 10, + }, + + { + [][]int{ + {1, 1, 1}, + {1, 0, 1}, + {1, 1, 1}}, + 4, + }, + + { + [][]int{ + {1, 1, 1, 0, 0, 0, 0, 0, 0}, + {1, 0, 1, 0, 1, 1, 1, 1, 1}, + {1, 1, 1, 0, 0, 0, 0, 0, 0}}, + 13, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, containVirus(tc.grid), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + containVirus(tc.grid) + } + } +} diff --git a/Algorithms/0753.open-the-lock/README.md b/Algorithms/0753.open-the-lock/README.md new file mode 100755 index 000000000..d6f1ebd2f --- /dev/null +++ b/Algorithms/0753.open-the-lock/README.md @@ -0,0 +1,57 @@ +# [753. Open the Lock](https://leetcode.com/problems/open-the-lock/) + +## 题目 + +You have a lock in front of you with 4 circular wheels. Each wheel has 10 slots: '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'. The wheels can rotate freely and wrap around: for example we can turn '9' to be '0', or '0' to be '9'. Each move consists of turning one wheel one slot. + +The lock initially starts at '0000', a string representing the state of the 4 wheels. + +You are given a list of deadends dead ends, meaning if the lock displays any of these codes, the wheels of the lock will stop turning and you will be unable to open it. + +Given a target representing the value of the wheels that will unlock the lock, return the minimum total number of turns required to open the lock, or -1 if it is impossible. + +Example 1: + +```text +Input: deadends = ["0201","0101","0102","1212","2002"], target = "0202" +Output: 6 +Explanation: +A sequence of valid moves would be "0000" -> "1000" -> "1100" -> "1200" -> "1201" -> "1202" -> "0202". +Note that a sequence like "0000" -> "0001" -> "0002" -> "0102" -> "0202" would be invalid, +because the wheels of the lock become stuck after the display becomes the dead end "0102". +``` + +Example 2: + +```text +Input: deadends = ["8888"], target = "0009" +Output: 1 +Explanation: +We can turn the last wheel in reverse to move from "0000" -> "0009". +``` + +Example 3: + +```text +Input: deadends = ["8887","8889","8878","8898","8788","8988","7888","9888"], target = "8888" +Output: -1 +Explanation: +We can't reach the target without getting stuck. +``` + +Example 4: + +```text +Input: deadends = ["0000"], target = "8888" +Output: -1 +``` + +Note: + +1. The length of deadends will be in the range [1, 500]. +1. target will not be in the list deadends. +1. Every string in deadends and the string target will be a string of 4 digits from the 10,000 possibilities '0000' to '9999'. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0753.open-the-lock/open-the-lock.go b/Algorithms/0753.open-the-lock/open-the-lock.go new file mode 100755 index 000000000..24992254b --- /dev/null +++ b/Algorithms/0753.open-the-lock/open-the-lock.go @@ -0,0 +1,69 @@ +package Problem0753 + +func openLock(deadends []string, target string) int { + isDeadends := dealDeadends(deadends) + return bfs(convert(target), isDeadends) +} + +func bfs(target [4]int, isDeadends map[[4]int]bool) int { + queue := [][4]int{convert("0000")} + if isDeadends[queue[0]] { + return -1 + } + if target == queue[0] { + return 0 + } + isChecked := make(map[[4]int]bool, 1e4) + isChecked[queue[0]] = true + leng := 1 + count := 1 + + for len(queue) > 0 { + if count == 0 { + leng++ + count = len(queue) + } + + for i := 0; i < 4; i++ { + a := queue[0] + a[i] = (a[i] + 9) % 10 + if !isDeadends[a] && !isChecked[a] { + if a == target { + return leng + } + queue = append(queue, a) + isChecked[a] = true + } + b := queue[0] + b[i] = (b[i] + 1) % 10 + if !isDeadends[b] && !isChecked[b] { + if b == target { + return leng + } + queue = append(queue, b) + isChecked[b] = true + } + } + + queue = queue[1:] + count-- + } + + return -1 +} + +func dealDeadends(deadends []string) map[[4]int]bool { + res := make(map[[4]int]bool, len(deadends)) + for _, d := range deadends { + res[convert(d)] = true + } + return res +} + +func convert(s string) [4]int { + res := [4]int{} + for i := range res { + res[i] = int(s[i] - '0') + } + return res +} diff --git a/Algorithms/0753.open-the-lock/open-the-lock_test.go b/Algorithms/0753.open-the-lock/open-the-lock_test.go new file mode 100755 index 000000000..fec2a6040 --- /dev/null +++ b/Algorithms/0753.open-the-lock/open-the-lock_test.go @@ -0,0 +1,64 @@ +package Problem0753 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + deadends []string + target string + ans int +}{ + { + []string{"0201", "0101", "0102", "1212", "2002"}, + "0202", + 6, + }, + + { + []string{"8888"}, + "0000", + 0, + }, + + { + []string{"8888"}, + "0009", + 1, + }, + + { + []string{"8887", "8889", "8878", "8898", "8788", "8988", "7888", "9888"}, + "8888", + -1, + }, + + { + []string{"0000"}, + "8888", + -1, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, openLock(tc.deadends, tc.target), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + openLock(tc.deadends, tc.target) + } + } +} diff --git a/Algorithms/0754.cracking-the-safe/README.md b/Algorithms/0754.cracking-the-safe/README.md new file mode 100755 index 000000000..961acc985 --- /dev/null +++ b/Algorithms/0754.cracking-the-safe/README.md @@ -0,0 +1,37 @@ +# [754. Cracking the Safe](https://leetcode.com/problems/cracking-the-safe/) + +## 题目 + +There is a box protected by a password. The password is n digits, where each letter can be one of the first k digits 0, 1, ..., k-1. + +You can keep inputting the password, the password will automatically be matched against the last n digits entered. + +For example, assuming the password is "345", I can open it when I type "012345", but I enter a total of 6 digits. + +Please return any string of minimum length that is guaranteed to open the box after the entire string is inputted. + +Example 1: + +```text +Input: n = 1, k = 2 +Output: "01" +Note: "10" will be accepted too. +``` + +Example 2: + +```text +Input: n = 2, k = 2 +Output: "00110" +Note: "01100", "10011", "11001" will be accepted too. +``` + +Note: + +1. n will be in the range [1, 4]. +1. k will be in the range [1, 10]. +1. k^n will be at most 4096. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0754.cracking-the-safe/cracking-the-safe.go b/Algorithms/0754.cracking-the-safe/cracking-the-safe.go new file mode 100755 index 000000000..49bc07abc --- /dev/null +++ b/Algorithms/0754.cracking-the-safe/cracking-the-safe.go @@ -0,0 +1,51 @@ +package Problem0754 + +import ( + "math" + "strconv" + "strings" +) + +func crackSafe(n, k int) string { + keys := makeKeys(n-1, k) + r := make(map[string][]string, len(keys)) + for i := range keys { + r[keys[i]] = makeNums(k) + } + + res := strings.Repeat("0", n-1) + + count := int(math.Pow(float64(k), float64(n))) + + for k := 0; k < count; k++ { + key := res[len(res)-(n-1):] + next := r[key][0] + r[key] = r[key][1:] + res += next + } + + return res +} + +func makeKeys(keySize, k int) []string { + nums := makeNums(k) + res := []string{""} + for s := 0; s < keySize; s++ { + temp := make([]string, 0, len(res)*k) + for i := range res { + for j := range nums { + temp = append(temp, res[i]+nums[j]) + } + } + res = temp + } + return res +} + +func makeNums(k int) []string { + res := make([]string, k) + for i := range res { + res[i] = strconv.Itoa(k - i - 1) + } + return res +} diff --git a/Algorithms/0754.cracking-the-safe/cracking-the-safe_test.go b/Algorithms/0754.cracking-the-safe/cracking-the-safe_test.go new file mode 100755 index 000000000..f27d91da0 --- /dev/null +++ b/Algorithms/0754.cracking-the-safe/cracking-the-safe_test.go @@ -0,0 +1,52 @@ +package Problem0754 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + n, k int + ans string +}{ + + { + 1, + 2, + "10", + }, + + { + 2, + 2, + "01100", + }, + + { + 4, + 5, + "0004444344424441444044334432443144304423442244214420441344124411441044034402440144004343424341434043334332433143304323432243214320431343124311431043034302430143004242414240423342324231423042234222422142204213421242114210420342024201420041414041334132413141304123412241214120411341124111411041034102410141004040334032403140304023402240214020401340124011401040034002400140003333233313330332233213320331233113310330233013300323231323032223221322032123211321032023201320031313031223121312031123111311031023101310030302230213020301230113010300230013000222212220221122102201220021212021112110210121002020112010200120001111011001010000", + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, crackSafe(tc.n, tc.k), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + crackSafe(tc.n, tc.k) + } + } +} diff --git a/Algorithms/0755.reach-a-number/README.md b/Algorithms/0755.reach-a-number/README.md new file mode 100755 index 000000000..a995cb528 --- /dev/null +++ b/Algorithms/0755.reach-a-number/README.md @@ -0,0 +1,38 @@ +# [755. Reach a Number](https://leetcode.com/problems/reach-a-number/) + +## 题目 + +You are standing at position 0 on an infinite number line. There is a goal at position target. + +On each move, you can either go left or right. During the n-th move (starting from 1), you take n steps. + +Return the minimum number of steps required to reach the destination. + +Example 1: + +```text +Input: target = 3 +Output: 2 +Explanation: +On the first move we step from 0 to 1. +On the second step we step from 1 to 3. +``` + +Example 2: + +```text +Input: target = 2 +Output: 3 +Explanation: +On the first move we step from 0 to 1. +On the second move we step from 1 to -1. +On the third move we step from -1 to 2. +``` + +Note: + +- target will be a non-zero integer in the range [-10^9, 10^9]. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0755.reach-a-number/reach-a-number.go b/Algorithms/0755.reach-a-number/reach-a-number.go new file mode 100755 index 000000000..588deea96 --- /dev/null +++ b/Algorithms/0755.reach-a-number/reach-a-number.go @@ -0,0 +1,45 @@ +package Problem0755 + +import ( + "math" +) + +func reachNumber(target int) int { + if target < 0 { + target = -target + } + + n := int(math.Ceil((math.Sqrt(8*float64(target)+1) - 1) / 2)) + + sum := n * (n + 1) / 2 + + if sum == target { + return n + } + + x := sum - target + + // sum = 1 + 2 + 3 + 4 + 5 + ... + (n-1) + n + // 可知 x 0 { + V-- + if !isDroppedLeft(heights, K) && !isDroppedRight(heights, K) { + heights[K]++ + } + } + return heights +} + +// 当 water 可以放在 cent 的 left 边时,返回 true +// 否则,返回 false +func isDroppedLeft(heights []int, center int) bool { + index := center + i := center + for 0 <= i-1 && heights[i-1] <= heights[i] { + // 出现落差,说明 + // i-1 是一个可行的落脚点 + if heights[i-1] < heights[i] { + index = i - 1 + } + i-- + } + if index < center { + heights[index]++ + return true + } + return false +} + +// 当 water 可以放在 cent 的 right 边时,返回 true +// 否则,返回 false +func isDroppedRight(heights []int, center int) bool { + index := center + i := center + for i+1 < len(heights) && heights[i] >= heights[i+1] { + // 出现落差,说明 + // i+1 是一个可行的落脚点 + if heights[i] > heights[i+1] { + index = i + 1 + } + i++ + } + if center < index { + heights[index]++ + return true + } + return false +} diff --git a/Algorithms/0756.pour-water/pour-water_test.go b/Algorithms/0756.pour-water/pour-water_test.go new file mode 100755 index 000000000..0c9ac0ad6 --- /dev/null +++ b/Algorithms/0756.pour-water/pour-water_test.go @@ -0,0 +1,63 @@ +package Problem0756 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + heights []int + V, K int + ans []int +}{ + + { + []int{1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 3, 2, 1}, + 10, + 5, + []int{3, 3, 4, 4, 4, 4, 3, 3, 3, 4, 3, 2, 1}, + }, + + { + []int{2, 1, 1, 2, 1, 2, 2}, + 4, + 3, + []int{2, 2, 2, 3, 2, 2, 2}, + }, + + { + []int{1, 2, 3, 4}, + 2, + 2, + []int{2, 3, 3, 4}, + }, + + { + []int{3, 1, 3}, + 5, + 1, + []int{4, 4, 4}, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, pourWater(tc.heights, tc.V, tc.K), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + pourWater(tc.heights, tc.V, tc.K) + } + } +} diff --git a/Algorithms/0757.pyramid-transition-matrix/README.md b/Algorithms/0757.pyramid-transition-matrix/README.md new file mode 100755 index 000000000..416e097fe --- /dev/null +++ b/Algorithms/0757.pyramid-transition-matrix/README.md @@ -0,0 +1,47 @@ +# [757. Pyramid Transition Matrix](https://leetcode.com/problems/pyramid-transition-matrix/) + +## 题目 + +We are stacking blocks to form a pyramid. Each block has a color which is a one letter string, like `'Z'`. + +For every block of color `C` we place not in the bottom row, we are placing it on top of a left block of color `A` and right block of color `B`. We are allowed to place the block there only if `(A, B, C)` is an allowed triple. + +We start with a bottom row of bottom, represented as a single string. We also start with a list of allowed triples allowed. Each allowed triple is represented as a string of length 3. + +Return true if we can build the pyramid all the way to the top, otherwise false. + +Example 1: + +```text +Input: bottom = "XYZ", allowed = ["XYD", "YZE", "DEA", "FFF"] +Output: true +Explanation: +We can stack the pyramid like this: + A + / \ + D E + / \ / \ +X Y Z + +This works because ('X', 'Y', 'D'), ('Y', 'Z', 'E'), and ('D', 'E', 'A') are allowed triples. +``` + +Example 1: + +```text +Input: bottom = "XXYX", allowed = ["XXX", "XXY", "XYX", "XYY", "YXZ"] +Output: false +Explanation: +We can't stack the pyramid to the top. +Note that there could be allowed triples (A, B, C) and (A, B, D) with C != D. +``` + +Note: + +1. bottom will be a string with length in range [2, 8]. +1. allowed will have length in range [0, 200]. +1. Letters in all strings will be chosen from the set {'A', 'B', 'C', 'D', 'E', 'F', 'G'}. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0757.pyramid-transition-matrix/pyramid-transition-matrix.go b/Algorithms/0757.pyramid-transition-matrix/pyramid-transition-matrix.go new file mode 100755 index 000000000..7f30d4fad --- /dev/null +++ b/Algorithms/0757.pyramid-transition-matrix/pyramid-transition-matrix.go @@ -0,0 +1,39 @@ +package Problem0757 + +import ( + "strings" +) + +func pyramidTransition(bottom string, allowed []string) bool { + blocks := "#" + strings.Join(allowed, "#") + + var dfs func(string, int, int) bool + dfs = func(bottom string, curr, length int) bool { + if curr+2 > length { + bottom = bottom[length:] + length = len(bottom) + if length == 1 { + return true + } + return dfs(bottom, 0, length) + } + + b := "#" + bottom[curr:curr+2] + beg := 0 + for beg < len(blocks) { + index := strings.Index(blocks[beg:], b) + beg + if index < beg { + break + } + beg = index + 4 + color := blocks[index+3 : index+4] + if dfs(bottom+color, curr+1, length) { + return true + } + } + + return false + } + + return dfs(bottom, 0, len(bottom)) +} diff --git a/Algorithms/0757.pyramid-transition-matrix/pyramid-transition-matrix_test.go b/Algorithms/0757.pyramid-transition-matrix/pyramid-transition-matrix_test.go new file mode 100755 index 000000000..3a13afcab --- /dev/null +++ b/Algorithms/0757.pyramid-transition-matrix/pyramid-transition-matrix_test.go @@ -0,0 +1,53 @@ +package Problem0757 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + bottom string + allowed []string + ans bool +}{ + + { + "BCD", + []string{"ACC", "ACB", "ABD", "DAA", "BDC", "BDB", "DBC", "BBD", "BBC", "DBD", "BCC", "CDD", "ABA", "BAB", "DDC", "CCD", "DDA", "CCA", "DDD"}, + true, + }, + + { + "XYZ", + []string{"XYD", "YZE", "DEA", "FFF"}, + true, + }, + + { + "XXYX", + []string{"XXX", "XXY", "XYX", "XYY", "YXZ"}, + false, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, pyramidTransition(tc.bottom, tc.allowed), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + pyramidTransition(tc.bottom, tc.allowed) + } + } +} diff --git a/Algorithms/0759.set-intersection-size-at-least-two/README.md b/Algorithms/0759.set-intersection-size-at-least-two/README.md new file mode 100755 index 000000000..a9b867c94 --- /dev/null +++ b/Algorithms/0759.set-intersection-size-at-least-two/README.md @@ -0,0 +1,37 @@ +# [759. Set Intersection Size At Least Two](https://leetcode.com/problems/set-intersection-size-at-least-two/) + +## 题目 + +An integer interval [a, b] (for integers a < b) is a set of all consecutive integers from a to b, including a and b. + +Find the minimum size of a set S such that for every integer interval A in intervals, the intersection of S with A has size at least 2. + +Example 1: + +```text +Input: intervals = [[1, 3], [1, 4], [2, 5], [3, 5]] +Output: 3 +Explanation: +Consider the set S = {2, 3, 4}. For each interval, there are at least 2 elements from S in the interval. +Also, there isn't a smaller size set that fulfills the above condition. +Thus, we output the size of this set, which is 3. +``` + +Example 2: + +```text +Input: intervals = [[1, 2], [2, 3], [2, 4], [4, 5]] +Output: 5 +Explanation: +An example of a minimum sized set is {1, 2, 3, 4, 5}. +``` + +Note: + +1. intervals will have length in range [1, 3000]. +1. intervals[i] will have length 2, representing some integer interval. +1. intervals[i][j] will be an integer in [0, 10^8]. + +## 解题思路 + +见程序注释 diff --git a/Algorithms/0759.set-intersection-size-at-least-two/set-intersection-size-at-least-two.go b/Algorithms/0759.set-intersection-size-at-least-two/set-intersection-size-at-least-two.go new file mode 100755 index 000000000..d84b27ced --- /dev/null +++ b/Algorithms/0759.set-intersection-size-at-least-two/set-intersection-size-at-least-two.go @@ -0,0 +1,48 @@ +package Problem0759 + +import ( + "sort" +) + +func intersectionSizeTwo(intervals [][]int) int { + // 这样排序的意义是 + // 假设 intervals[i:j] 中的 b 都是一样的 + // [b-1,b] 和 intervals[i:j] 中的每一个也肯定都有两个公共元素 + sort.Slice(intervals, func(i, j int) bool { + if intervals[i][1] == intervals[j][1] { + return intervals[i][0] > intervals[j][0] + } + return intervals[i][1] < intervals[j][1] + }) + + res := 0 + // left 和 right 取过的值,就是 set 中的值 + left := intervals[0][1] - 1 + right := intervals[0][1] + res += 2 + + n := len(intervals) + + for i := 1; i < n; i++ { + a, b := intervals[i][0], intervals[i][1] + // 当 b == intervals[i-1][1] 什么都没有发生 + // 只有出现了新 b 时,才需要讨论 + // 根据排序规则 + // left < a 意味着出现了新 b + if left < a && a <= right { + res++ + // 原先的 left 没有包含在 intervals[i] 中 + // 新 left = right + left = right + // 新 right = intervals[i][1] + right = b + } else if right < a { + // left 和 right 都没有包含在 intervals[i] 中 + res += 2 + left = b - 1 + right = b + } + } + + return res +} diff --git a/Algorithms/0759.set-intersection-size-at-least-two/set-intersection-size-at-least-two_test.go b/Algorithms/0759.set-intersection-size-at-least-two/set-intersection-size-at-least-two_test.go new file mode 100755 index 000000000..3b7a81270 --- /dev/null +++ b/Algorithms/0759.set-intersection-size-at-least-two/set-intersection-size-at-least-two_test.go @@ -0,0 +1,79 @@ +package Problem0759 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + intervals [][]int + ans int +}{ + + { + [][]int{{1, 5}, {4, 5}, {5, 9}, {7, 9}, {9, 20}, {12, 20}, {15, 20}, {18, 20}}, + 6, + }, + + { + [][]int{{1, 5}, {4, 5}, {5, 9}, {7, 9}, {9, 10}}, + 5, + }, + + { + [][]int{{1, 3}, {4, 9}, {0, 10}, {6, 7}, {1, 2}, {0, 6}, {7, 9}, {0, 1}, {2, 5}, {6, 8}}, + 7, + }, + + { + [][]int{{4, 14}, {6, 17}, {7, 14}, {14, 21}, {4, 7}}, + 4, + }, + + { + [][]int{{2, 10}, {3, 7}, {3, 15}, {4, 11}, {6, 12}, {6, 16}, {7, 8}, {7, 11}, {7, 15}, {11, 12}}, + 5, + }, + + { + [][]int{{100, 101}, {1, 3}, {8, 9}}, + 6, + }, + + { + [][]int{{1, 3}, {8, 9}}, + 4, + }, + + { + [][]int{{1, 3}, {1, 4}, {2, 5}, {3, 5}}, + 3, + }, + + { + [][]int{{1, 2}, {2, 3}, {2, 4}, {4, 5}}, + 5, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, intersectionSizeTwo(tc.intervals), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + intersectionSizeTwo(tc.intervals) + } + } +} diff --git a/Algorithms/0762.find-anagram-mappings/README.md b/Algorithms/0762.find-anagram-mappings/README.md new file mode 100755 index 000000000..43adc6bbf --- /dev/null +++ b/Algorithms/0762.find-anagram-mappings/README.md @@ -0,0 +1,76 @@ +# [762. Find Anagram Mappings](https://leetcode.com/problems/find-anagram-mappings/) + +## 题目 + +Given two lists Aand B, and B is an anagram of A. B is an anagram of A means B is made by randomizing the order of the elements in A. + +We want to find an index mapping P, from A to B. A mapping P[i] = j means the ith element in A appears in B at index j. + +These lists A and B may contain duplicates. If there are multiple answers, output any of them. + +For example, given + +```text +A = [12, 28, 46, 32, 50] +B = [50, 12, 32, 46, 28] +``` + +We should return + +```text +[1, 4, 3, 2, 0] +``` + +as P[0] = 1 because the 0th element of A appears at B[1], and P[1] = 4 because the 1st element of A appears at B[4], and so on. +Note: + +1. A, B have equal lengths in range [1, 100]. +1. A[i], B[i] are integers in range [0, 10^5]. + +## 解题思路 + +见程序注释 + +我把问题想复杂了,以下是想复杂以后的解法。 + +```text +输入 +[47 34 51 47 47 34] +[47 51 34 34 47 47] +输出 +[0, 2, 1, 5, 4, 3] +``` + +复杂的地方在于,输出包含了 [0,len(A)) 之间的所有整数 + +```golang +func anagramMappings(A, B []int) []int { + n := len(A) + indexs := make(map[int]int, n) + values := make(map[int]int, n) + res := make([]int, n) + + for i := range res { + if A[i] == B[i] { + res[i] = i + continue + } + + if val, ok := values[A[i]]; ok { + res[i] = val + delete(values, A[i]) + } else { + indexs[A[i]] = i + } + + if idx, ok := indexs[B[i]]; ok { + res[idx] = i + delete(indexs, B[i]) + } else { + values[B[i]] = i + } + } + + return res +} +``` diff --git a/Algorithms/0762.find-anagram-mappings/find-anagram-mappings.go b/Algorithms/0762.find-anagram-mappings/find-anagram-mappings.go new file mode 100755 index 000000000..17978f9b9 --- /dev/null +++ b/Algorithms/0762.find-anagram-mappings/find-anagram-mappings.go @@ -0,0 +1,17 @@ +package Problem0762 + +func anagramMappings(A, B []int) []int { + n := len(A) + values := make(map[int]int, n) + res := make([]int, n) + + for i := range B { + values[B[i]] = i + } + + for i := range res { + res[i] = values[A[i]] + } + + return res +} diff --git a/Algorithms/0762.find-anagram-mappings/find-anagram-mappings_test.go b/Algorithms/0762.find-anagram-mappings/find-anagram-mappings_test.go new file mode 100755 index 000000000..fba0d1286 --- /dev/null +++ b/Algorithms/0762.find-anagram-mappings/find-anagram-mappings_test.go @@ -0,0 +1,52 @@ +package Problem0762 + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +// tcs is testcase slice +var tcs = []struct { + A, B []int + ans []int +}{ + + { + []int{47, 34, 51, 47, 47, 34}, + []int{47, 51, 34, 34, 47, 47}, + []int{5, 3, 1, 5, 5, 3}, + }, + + { + []int{12, 28, 46, 32, 50, 12}, + []int{50, 12, 32, 46, 28, 12}, + []int{5, 4, 3, 2, 0, 5}, + }, + + { + []int{12, 28, 46, 32, 50}, + []int{50, 12, 32, 46, 28}, + []int{1, 4, 3, 2, 0}, + }, + + // 可以有多个 testcase +} + +func Test_fn(t *testing.T) { + ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%v~~\n", tc) + ast.Equal(tc.ans, anagramMappings(tc.A, tc.B), "输入:%v", tc) + } +} + +func Benchmark_fn(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + anagramMappings(tc.A, tc.B) + } + } +} diff --git a/Makefile b/Makefile index b9ded5d2a..626fff1b0 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ run: - @./helper - git commit -am '更新README.md' + @./helper readme + git commit -am '更新 README.md' git push git checkout master git merge develop diff --git a/README.md b/README.md index 63e996923..c4d20cf40 100755 --- a/README.md +++ b/README.md @@ -1,205 +1,595 @@ -# [LeetCode](https://leetcode.com)习题的Golang解答 -[![LeetCode](https://img.shields.io/badge/LeetCode-aQuaYi-blue.svg)](https://leetcode.com/aQuaYi/) -[![LeetCode Ranking](https://img.shields.io/badge/Ranking-35576-blue.svg)](https://leetcode.com/aQuaYi/) -[![Build Status](https://www.travis-ci.org/aQuaYi/LeetCode-in-Golang.svg?branch=master)](https://www.travis-ci.org/aQuaYi/LeetCode-in-Golang) -[![codecov](https://codecov.io/gh/aQuaYi/LeetCode-in-Golang/branch/master/graph/badge.svg)](https://codecov.io/gh/aQuaYi/LeetCode-in-Golang) +# [LeetCode](https://leetcode.com) 的 Go 解答 +[![LeetCode 主页](https://img.shields.io/badge/LeetCode-aQuaYi-blue.svg)](https://leetcode.com/aQuaYi/) +[![LeetCode 排名](https://img.shields.io/badge/Ranking-1273-blue.svg)](https://leetcode.com/aQuaYi/) +[![LeetCode 答题进度](https://img.shields.io/badge/Progress-99%25-blue.svg)](https://leetcode.com/aQuaYi/) +[![codecov](https://codecov.io/gh/aQuaYi/LeetCode-in-Go/branch/master/graph/badge.svg)](https://codecov.io/gh/aQuaYi/LeetCode-in-Go) +[![Build Status](https://www.travis-ci.org/aQuaYi/LeetCode-in-Go.svg?branch=master)](https://www.travis-ci.org/aQuaYi/LeetCode-in-Go) +## 进度 -## 答题进度:34% -> 仅含免费题 +> 统计规则:1.免费题,2.算法题,3.能用 Go 解答 -|Category|Easy|Medium|Hard|Total| -|:--|:--:|:--:|:--:|:--:| -|**Algorithms**|53 / 145|84 / 250|32 / 93|169 / 488| -|**Draft**|0 / 1|0 / 3|0 / 0|0 / 4| -|**Total**|53 / 146|84 / 253|32 / 93|169 / 492| +| |Easy|Medium|Hard|Total| +|:---:|:---:|:---:|:---:|:---:| +|**Accepted**|156|260|109|525| +|**Total**|156|260|110|526| -## 参考解答 -|题号|题目|难度|总体通过率|收藏| -|:-:|:-|:-: | :-: | :-: | -|1|[Two Sum](./Algorithms/0001.two-sum)|☆|35%|| -|2|[Add Two Numbers](./Algorithms/0002.add-two-numbers)|☆ ☆|27%|| -|3|[Longest Substring Without Repeating Characters](./Algorithms/0003.longest-substring-without-repeating-characters)|☆ ☆|24%|| -|4|[Median of Two Sorted Arrays](./Algorithms/0004.median-of-two-sorted-arrays)|☆ ☆ ☆|21%|| -|5|[Longest Palindromic Substring](./Algorithms/0005.longest-palindromic-substring)|☆ ☆|25%|| -|6|[ZigZag Conversion](./Algorithms/0006.zigzag-conversion)|☆ ☆|26%|| -|7|[Reverse Integer](./Algorithms/0007.reverse-integer)|☆|24%|| -|8|[String to Integer (atoi)](./Algorithms/0008.string-to-integer-atoi)|☆ ☆|13%|| -|9|[Palindrome Number](./Algorithms/0009.palindrome-number)|☆|35%|| -|10|[Regular Expression Matching](./Algorithms/0010.regular-expression-matching)|☆ ☆ ☆|24%|❤| -|11|[Container With Most Water](./Algorithms/0011.container-with-most-water)|☆ ☆|36%|| -|12|[Integer to Roman](./Algorithms/0012.integer-to-roman)|☆ ☆|45%|| -|13|[Roman to Integer](./Algorithms/0013.roman-to-integer)|☆|46%|| -|14|[Longest Common Prefix](./Algorithms/0014.longest-common-prefix)|☆|31%|| -|15|[3Sum](./Algorithms/0015.3sum)|☆ ☆|21%|| -|16|[3Sum Closest](./Algorithms/0016.3sum-closest)|☆ ☆|31%|| -|17|[Letter Combinations of a Phone Number](./Algorithms/0017.letter-combinations-of-a-phone-number)|☆ ☆|34%|| -|18|[4Sum](./Algorithms/0018.4sum)|☆ ☆|26%|| -|19|[Remove Nth Node From End of List](./Algorithms/0019.remove-nth-node-from-end-of-list)|☆ ☆|33%|| -|20|[Valid Parentheses](./Algorithms/0020.valid-parentheses)|☆|33%|| -|21|[Merge Two Sorted Lists](./Algorithms/0021.merge-two-sorted-lists)|☆|39%|| -|22|[Generate Parentheses](./Algorithms/0022.generate-parentheses)|☆ ☆|45%|❤| -|23|[Merge k Sorted Lists](./Algorithms/0023.merge-k-sorted-lists)|☆ ☆ ☆|27%|| -|24|[Swap Nodes in Pairs](./Algorithms/0024.swap-nodes-in-pairs)|☆ ☆|38%|❤| -|25|[Reverse Nodes in k-Group](./Algorithms/0025.reverse-nodes-in-k-group)|☆ ☆ ☆|30%|❤| -|26|[Remove Duplicates from Sorted Array](./Algorithms/0026.remove-duplicates-from-sorted-array)|☆|35%|❤| -|27|[Remove Element](./Algorithms/0027.remove-element)|☆|39%|| -|28|[Implement strStr()](./Algorithms/0028.implement-strstr)|☆|28%|| -|29|[Divide Two Integers](./Algorithms/0029.divide-two-integers)|☆ ☆|15%|| -|30|[Substring with Concatenation of All Words](./Algorithms/0030.substring-with-concatenation-of-all-words)|☆ ☆ ☆|22%|❤| -|31|[Next Permutation](./Algorithms/0031.next-permutation)|☆ ☆|28%|❤| -|32|[Longest Valid Parentheses](./Algorithms/0032.longest-valid-parentheses)|☆ ☆ ☆|23%|| -|33|[Search in Rotated Sorted Array](./Algorithms/0033.search-in-rotated-sorted-array)|☆ ☆|32%|❤| -|34|[Search for a Range](./Algorithms/0034.search-for-a-range)|☆ ☆|31%|| -|35|[Search Insert Position](./Algorithms/0035.search-insert-position)|☆|39%|| -|36|[Valid Sudoku](./Algorithms/0036.valid-sudoku)|☆ ☆|35%|❤| -|37|[Sudoku Solver](./Algorithms/0037.sudoku-solver)|☆ ☆ ☆|30%|❤| -|38|[Count and Say](./Algorithms/0038.count-and-say)|☆|34%|| -|39|[Combination Sum](./Algorithms/0039.combination-sum)|☆ ☆|39%|| -|40|[Combination Sum II](./Algorithms/0040.combination-sum-ii)|☆ ☆|34%|| -|41|[First Missing Positive](./Algorithms/0041.first-missing-positive)|☆ ☆ ☆|25%|| -|42|[Trapping Rain Water](./Algorithms/0042.trapping-rain-water)|☆ ☆ ☆|36%|| -|43|[Multiply Strings](./Algorithms/0043.multiply-strings)|☆ ☆|27%|| -|44|[Wildcard Matching](./Algorithms/0044.wildcard-matching)|☆ ☆ ☆|20%|❤| -|45|[Jump Game II](./Algorithms/0045.jump-game-ii)|☆ ☆ ☆|26%|| -|46|[Permutations](./Algorithms/0046.permutations)|☆ ☆|44%|| -|47|[Permutations II](./Algorithms/0047.permutations-ii)|☆ ☆|33%|| -|48|[Rotate Image](./Algorithms/0048.rotate-image)|☆ ☆|38%|| -|49|[Group Anagrams](./Algorithms/0049.group-anagrams)|☆ ☆|35%|❤| -|50|[Pow(x, n)](./Algorithms/0050.powx-n)|☆ ☆|26%|| -|51|[N-Queens](./Algorithms/0051.n-queens)|☆ ☆ ☆|31%|| -|52|[N-Queens II](./Algorithms/0052.n-queens-ii)|☆ ☆ ☆|45%|| -|53|[Maximum Subarray](./Algorithms/0053.maximum-subarray)|☆|39%|❤| -|54|[Spiral Matrix](./Algorithms/0054.spiral-matrix)|☆ ☆|26%|❤| -|55|[Jump Game](./Algorithms/0055.jump-game)|☆ ☆|29%|| -|56|[Merge Intervals](./Algorithms/0056.merge-intervals)|☆ ☆|30%|❤| -|57|[Insert Interval](./Algorithms/0057.insert-interval)|☆ ☆ ☆|27%|| -|58|[Length of Last Word](./Algorithms/0058.length-of-last-word)|☆|31%|| -|59|[Spiral Matrix II](./Algorithms/0059.spiral-matrix-ii)|☆ ☆|39%|❤| -|60|[Permutation Sequence](./Algorithms/0060.permutation-sequence)|☆ ☆|28%|| -|61|[Rotate List](./Algorithms/0061.rotate-list)|☆ ☆|24%|❤| -|62|[Unique Paths](./Algorithms/0062.unique-paths)|☆ ☆|41%|❤| -|63|[Unique Paths II](./Algorithms/0063.unique-paths-ii)|☆ ☆|31%|| -|64|[Minimum Path Sum](./Algorithms/0064.minimum-path-sum)|☆ ☆|38%|| -|65|[Valid Number](./Algorithms/0065.valid-number)|☆ ☆ ☆|12%|| -|66|[Plus One](./Algorithms/0066.plus-one)|☆|38%|| -|67|[Add Binary](./Algorithms/0067.add-binary)|☆|32%|| -|68|[Text Justification](./Algorithms/0068.text-justification)|☆ ☆ ☆|19%|| -|69|[Sqrt(x)](./Algorithms/0069.sqrtx)|☆|27%|| -|70|[Climbing Stairs](./Algorithms/0070.climbing-stairs)|☆|40%|| -|71|[Simplify Path](./Algorithms/0071.simplify-path)|☆ ☆|25%|| -|72|[Edit Distance](./Algorithms/0072.edit-distance)|☆ ☆ ☆|31%|❤| -|73|[Set Matrix Zeroes](./Algorithms/0073.set-matrix-zeroes)|☆ ☆|35%|❤| -|74|[Search a 2D Matrix](./Algorithms/0074.search-a-2d-matrix)|☆ ☆|34%|| -|75|[Sort Colors](./Algorithms/0075.sort-colors)|☆ ☆|38%|❤| -|76|[Minimum Window Substring](./Algorithms/0076.minimum-window-substring)|☆ ☆ ☆|25%|❤| -|77|[Combinations](./Algorithms/0077.combinations)|☆ ☆|39%|| -|78|[Subsets](./Algorithms/0078.subsets)|☆ ☆|41%|❤| -|79|[Word Search](./Algorithms/0079.word-search)|☆ ☆|26%|| -|80|[Remove Duplicates from Sorted Array II](./Algorithms/0080.remove-duplicates-from-sorted-array-ii)|☆ ☆|36%|❤| -|81|[Search in Rotated Sorted Array II](./Algorithms/0081.search-in-rotated-sorted-array-ii)|☆ ☆|32%|| -|82|[Remove Duplicates from Sorted List II](./Algorithms/0082.remove-duplicates-from-sorted-list-ii)|☆ ☆|29%|❤| -|83|[Remove Duplicates from Sorted List](./Algorithms/0083.remove-duplicates-from-sorted-list)|☆|39%|| -|84|[Largest Rectangle in Histogram](./Algorithms/0084.largest-rectangle-in-histogram)|☆ ☆ ☆|26%|❤| -|85|[Maximal Rectangle](./Algorithms/0085.maximal-rectangle)|☆ ☆ ☆|28%|❤| -|86|[Partition List](./Algorithms/0086.partition-list)|☆ ☆|32%|| -|87|[Scramble String](./Algorithms/0087.scramble-string)|☆ ☆ ☆|29%|❤| -|88|[Merge Sorted Array](./Algorithms/0088.merge-sorted-array)|☆|32%|| -|89|[Gray Code](./Algorithms/0089.gray-code)|☆ ☆|41%|| -|90|[Subsets II](./Algorithms/0090.subsets-ii)|☆ ☆|36%|❤| -|91|[Decode Ways](./Algorithms/0091.decode-ways)|☆ ☆|19%|❤| -|92|[Reverse Linked List II](./Algorithms/0092.reverse-linked-list-ii)|☆ ☆|30%|| -|93|[Restore IP Addresses](./Algorithms/0093.restore-ip-addresses)|☆ ☆|27%|❤| -|94|[Binary Tree Inorder Traversal](./Algorithms/0094.binary-tree-inorder-traversal)|☆ ☆|46%|| -|95|[Unique Binary Search Trees II](./Algorithms/0095.unique-binary-search-trees-ii)|☆ ☆|31%|❤| -|96|[Unique Binary Search Trees](./Algorithms/0096.unique-binary-search-trees)|☆ ☆|41%|| -|97|[Interleaving String](./Algorithms/0097.interleaving-string)|☆ ☆ ☆|24%|❤| -|98|[Validate Binary Search Tree](./Algorithms/0098.validate-binary-search-tree)|☆ ☆|23%|❤| -|99|[Recover Binary Search Tree](./Algorithms/0099.recover-binary-search-tree)|☆ ☆ ☆|29%|❤| -|100|[Same Tree](./Algorithms/0100.same-tree)|☆|46%|| -|101|[Symmetric Tree](./Algorithms/0101.symmetric-tree)|☆|38%|❤| -|102|[Binary Tree Level Order Traversal](./Algorithms/0102.binary-tree-level-order-traversal)|☆ ☆|40%|| -|103|[Binary Tree Zigzag Level Order Traversal](./Algorithms/0103.binary-tree-zigzag-level-order-traversal)|☆ ☆|34%|| -|104|[Maximum Depth of Binary Tree](./Algorithms/0104.maximum-depth-of-binary-tree)|☆|52%|| -|105|[Construct Binary Tree from Preorder and Inorder Traversal](./Algorithms/0105.construct-binary-tree-from-preorder-and-inorder-traversal)|☆ ☆|32%|❤| -|106|[Construct Binary Tree from Inorder and Postorder Traversal](./Algorithms/0106.construct-binary-tree-from-inorder-and-postorder-traversal)|☆ ☆|32%|❤| -|107|[Binary Tree Level Order Traversal II](./Algorithms/0107.binary-tree-level-order-traversal-ii)|☆|40%|| -|108|[Convert Sorted Array to Binary Search Tree](./Algorithms/0108.convert-sorted-array-to-binary-search-tree)|☆|42%|| -|109|[Convert Sorted List to Binary Search Tree](./Algorithms/0109.convert-sorted-list-to-binary-search-tree)|☆ ☆|34%|| -|110|[Balanced Binary Tree](./Algorithms/0110.balanced-binary-tree)|☆|37%|| -|111|[Minimum Depth of Binary Tree](./Algorithms/0111.minimum-depth-of-binary-tree)|☆|33%|| -|112|[Path Sum](./Algorithms/0112.path-sum)|☆|34%|| -|113|[Path Sum II](./Algorithms/0113.path-sum-ii)|☆ ☆|33%|| -|114|[Flatten Binary Tree to Linked List](./Algorithms/0114.flatten-binary-tree-to-linked-list)|☆ ☆|35%|❤| -|115|[Distinct Subsequences](./Algorithms/0115.distinct-subsequences)|☆ ☆ ☆|31%|❤| -|118|[Pascal's Triangle](./Algorithms/0118.pascals-triangle)|☆|38%|| -|119|[Pascal's Triangle II](./Algorithms/0119.pascals-triangle-ii)|☆|37%|| -|120|[Triangle](./Algorithms/0120.triangle)|☆ ☆|33%|❤| -|121|[Best Time to Buy and Sell Stock](./Algorithms/0121.best-time-to-buy-and-sell-stock)|☆|41%|| -|122|[Best Time to Buy and Sell Stock II](./Algorithms/0122.best-time-to-buy-and-sell-stock-ii)|☆|47%|| -|123|[Best Time to Buy and Sell Stock III](./Algorithms/0123.best-time-to-buy-and-sell-stock-iii)|☆ ☆ ☆|29%|| -|124|[Binary Tree Maximum Path Sum](./Algorithms/0124.binary-tree-maximum-path-sum)|☆ ☆ ☆|26%|❤| -|125|[Valid Palindrome](./Algorithms/0125.valid-palindrome)|☆|26%|| -|126|[Word Ladder II](./Algorithms/0126.word-ladder-ii)|☆ ☆ ☆|14%|❤| -|127|[Word Ladder](./Algorithms/0127.word-ladder)|☆ ☆|19%|| -|152|[Maximum Product Subarray](./Algorithms/0152.maximum-product-subarray)|☆ ☆|25%|❤| -|153|[Find Minimum in Rotated Sorted Array](./Algorithms/0153.find-minimum-in-rotated-sorted-array)|☆ ☆|40%|| -|154|[Find Minimum in Rotated Sorted Array II](./Algorithms/0154.find-minimum-in-rotated-sorted-array-ii)|☆ ☆ ☆|37%|| -|162|[Find Peak Element](./Algorithms/0162.find-peak-element)|☆ ☆|37%|| -|167|[Two Sum II - Input array is sorted](./Algorithms/0167.two-sum-ii-input-array-is-sorted)|☆|47%|| -|169|[Majority Element](./Algorithms/0169.majority-element)|☆|46%|❤| -|188|[Best Time to Buy and Sell Stock IV](./Algorithms/0188.best-time-to-buy-and-sell-stock-iv)|☆ ☆ ☆|24%|❤| -|189|[Rotate Array](./Algorithms/0189.rotate-array)|☆|24%|| -|206|[Reverse Linked List](./Algorithms/0206.reverse-linked-list)|☆|45%|| -|209|[Minimum Size Subarray Sum](./Algorithms/0209.minimum-size-subarray-sum)|☆ ☆|30%|| -|216|[Combination Sum III](./Algorithms/0216.combination-sum-iii)|☆ ☆|45%|| -|217|[Contains Duplicate](./Algorithms/0217.contains-duplicate)|☆|45%|| -|219|[Contains Duplicate II](./Algorithms/0219.contains-duplicate-ii)|☆|32%|| -|228|[Summary Ranges](./Algorithms/0228.summary-ranges)|☆ ☆|30%|| -|229|[Majority Element II](./Algorithms/0229.majority-element-ii)|☆ ☆|28%|❤| -|238|[Product of Array Except Self](./Algorithms/0238.product-of-array-except-self)|☆ ☆|49%|| -|268|[Missing Number](./Algorithms/0268.missing-number)|☆|44%|| -|283|[Move Zeroes](./Algorithms/0283.move-zeroes)|☆|50%|| -|287|[Find the Duplicate Number](./Algorithms/0287.find-the-duplicate-number)|☆ ☆|43%|❤| -|289|[Game of Life](./Algorithms/0289.game-of-life)|☆ ☆|37%|❤| -|380|[Insert Delete GetRandom O(1)](./Algorithms/0380.insert-delete-getrandom-o1)|☆ ☆|39%|❤| -|381|[Insert Delete GetRandom O(1) - Duplicates allowed](./Algorithms/0381.insert-delete-getrandom-o1-duplicates-allowed)|☆ ☆ ☆|28%|❤| -|414|[Third Maximum Number](./Algorithms/0414.third-maximum-number)|☆|27%|| -|437|[Path Sum III](./Algorithms/0437.path-sum-iii)|☆|39%|❤| -|442|[Find All Duplicates in an Array](./Algorithms/0442.find-all-duplicates-in-an-array)|☆ ☆|55%|| -|448|[Find All Numbers Disappeared in an Array](./Algorithms/0448.find-all-numbers-disappeared-in-an-array)|☆|51%|| -|485|[Max Consecutive Ones](./Algorithms/0485.max-consecutive-ones)|☆|53%|| -|495|[Teemo Attacking](./Algorithms/0495.teemo-attacking)|☆ ☆|51%|| -|526|[Beautiful Arrangement](./Algorithms/0526.beautiful-arrangement)|☆ ☆|54%|❤| -|532|[K-diff Pairs in an Array](./Algorithms/0532.k-diff-pairs-in-an-array)|☆|28%|| -|560|[Subarray Sum Equals K](./Algorithms/0560.subarray-sum-equals-k)|☆ ☆|40%|❤| -|561|[Array Partition I](./Algorithms/0561.array-partition-i)|☆|67%|| -|565|[Array Nesting](./Algorithms/0565.array-nesting)|☆ ☆|49%|| -|566|[Reshape the Matrix](./Algorithms/0566.reshape-the-matrix)|☆|58%|| -|581|[Shortest Unsorted Continuous Subarray](./Algorithms/0581.shortest-unsorted-continuous-subarray)|☆|29%|❤| -|605|[Can Place Flowers](./Algorithms/0605.can-place-flowers)|☆|30%|❤| -|611|[Valid Triangle Number](./Algorithms/0611.valid-triangle-number)|☆ ☆|41%|❤| -|621|[Task Scheduler](./Algorithms/0621.task-scheduler)|☆ ☆|42%|❤| -|628|[Maximum Product of Three Numbers](./Algorithms/0628.maximum-product-of-three-numbers)|☆|45%|❤| -|639|[Decode Ways II](./Algorithms/0639.decode-ways-ii)|☆ ☆ ☆|23%|| -|643|[Maximum Average Subarray I](./Algorithms/0643.maximum-average-subarray-i)|☆|37%|| -|661|[Image Smoother](./Algorithms/0661.image-smoother)|☆|46%|| -|667|[Beautiful Arrangement II](./Algorithms/0667.beautiful-arrangement-ii)|☆ ☆|51%|| +## 题解 +|题号|题目|通过率|难度|收藏| +|:-:|:-|:-: | :-: | :-: | +|1|[Two Sum](./Algorithms/0001.two-sum)|36%|Easy| | +|2|[Add Two Numbers](./Algorithms/0002.add-two-numbers)|28%|Medium| | +|3|[Longest Substring Without Repeating Characters](./Algorithms/0003.longest-substring-without-repeating-characters)|24%|Medium| | +|4|[Median of Two Sorted Arrays](./Algorithms/0004.median-of-two-sorted-arrays)|22%|Hard| | +|5|[Longest Palindromic Substring](./Algorithms/0005.longest-palindromic-substring)|25%|Medium| | +|6|[ZigZag Conversion](./Algorithms/0006.zigzag-conversion)|27%|Medium| | +|7|[Reverse Integer](./Algorithms/0007.reverse-integer)|24%|Easy| | +|8|[String to Integer (atoi)](./Algorithms/0008.string-to-integer-atoi)|13%|Medium| | +|9|[Palindrome Number](./Algorithms/0009.palindrome-number)|35%|Easy| | +|10|[Regular Expression Matching](./Algorithms/0010.regular-expression-matching)|24%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|11|[Container With Most Water](./Algorithms/0011.container-with-most-water)|36%|Medium| | +|12|[Integer to Roman](./Algorithms/0012.integer-to-roman)|45%|Medium| | +|13|[Roman to Integer](./Algorithms/0013.roman-to-integer)|47%|Easy| | +|14|[Longest Common Prefix](./Algorithms/0014.longest-common-prefix)|31%|Easy| | +|15|[3Sum](./Algorithms/0015.3sum)|21%|Medium| | +|16|[3Sum Closest](./Algorithms/0016.3sum-closest)|31%|Medium| | +|17|[Letter Combinations of a Phone Number](./Algorithms/0017.letter-combinations-of-a-phone-number)|35%|Medium| | +|18|[4Sum](./Algorithms/0018.4sum)|27%|Medium| | +|19|[Remove Nth Node From End of List](./Algorithms/0019.remove-nth-node-from-end-of-list)|34%|Medium| | +|20|[Valid Parentheses](./Algorithms/0020.valid-parentheses)|33%|Easy| | +|21|[Merge Two Sorted Lists](./Algorithms/0021.merge-two-sorted-lists)|39%|Easy| | +|22|[Generate Parentheses](./Algorithms/0022.generate-parentheses)|46%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|23|[Merge k Sorted Lists](./Algorithms/0023.merge-k-sorted-lists)|27%|Hard| | +|24|[Swap Nodes in Pairs](./Algorithms/0024.swap-nodes-in-pairs)|38%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|25|[Reverse Nodes in k-Group](./Algorithms/0025.reverse-nodes-in-k-group)|31%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|26|[Remove Duplicates from Sorted Array](./Algorithms/0026.remove-duplicates-from-sorted-array)|35%|Easy|[❤](https://leetcode.com/list/oussv5j)| +|27|[Remove Element](./Algorithms/0027.remove-element)|40%|Easy| | +|28|[Implement strStr()](./Algorithms/0028.implement-strstr)|28%|Easy| | +|29|[Divide Two Integers](./Algorithms/0029.divide-two-integers)|15%|Medium| | +|30|[Substring with Concatenation of All Words](./Algorithms/0030.substring-with-concatenation-of-all-words)|22%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|31|[Next Permutation](./Algorithms/0031.next-permutation)|28%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|32|[Longest Valid Parentheses](./Algorithms/0032.longest-valid-parentheses)|23%|Hard| | +|33|[Search in Rotated Sorted Array](./Algorithms/0033.search-in-rotated-sorted-array)|32%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|34|[Search for a Range](./Algorithms/0034.search-for-a-range)|31%|Medium| | +|35|[Search Insert Position](./Algorithms/0035.search-insert-position)|39%|Easy| | +|36|[Valid Sudoku](./Algorithms/0036.valid-sudoku)|36%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|37|[Sudoku Solver](./Algorithms/0037.sudoku-solver)|31%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|38|[Count and Say](./Algorithms/0038.count-and-say)|36%|Easy| | +|39|[Combination Sum](./Algorithms/0039.combination-sum)|40%|Medium| | +|40|[Combination Sum II](./Algorithms/0040.combination-sum-ii)|35%|Medium| | +|41|[First Missing Positive](./Algorithms/0041.first-missing-positive)|25%|Hard| | +|42|[Trapping Rain Water](./Algorithms/0042.trapping-rain-water)|37%|Hard| | +|43|[Multiply Strings](./Algorithms/0043.multiply-strings)|27%|Medium| | +|44|[Wildcard Matching](./Algorithms/0044.wildcard-matching)|20%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|45|[Jump Game II](./Algorithms/0045.jump-game-ii)|26%|Hard| | +|46|[Permutations](./Algorithms/0046.permutations)|46%|Medium| | +|47|[Permutations II](./Algorithms/0047.permutations-ii)|34%|Medium| | +|48|[Rotate Image](./Algorithms/0048.rotate-image)|40%|Medium| | +|49|[Group Anagrams](./Algorithms/0049.group-anagrams)|37%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|50|[Pow(x, n)](./Algorithms/0050.powx-n)|26%|Medium| | +|51|[N-Queens](./Algorithms/0051.n-queens)|32%|Hard| | +|52|[N-Queens II](./Algorithms/0052.n-queens-ii)|46%|Hard| | +|53|[Maximum Subarray](./Algorithms/0053.maximum-subarray)|40%|Easy|[❤](https://leetcode.com/list/oussv5j)| +|54|[Spiral Matrix](./Algorithms/0054.spiral-matrix)|26%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|55|[Jump Game](./Algorithms/0055.jump-game)|29%|Medium| | +|56|[Merge Intervals](./Algorithms/0056.merge-intervals)|31%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|57|[Insert Interval](./Algorithms/0057.insert-interval)|28%|Hard| | +|58|[Length of Last Word](./Algorithms/0058.length-of-last-word)|32%|Easy| | +|59|[Spiral Matrix II](./Algorithms/0059.spiral-matrix-ii)|40%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|60|[Permutation Sequence](./Algorithms/0060.permutation-sequence)|29%|Medium| | +|61|[Rotate List](./Algorithms/0061.rotate-list)|24%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|62|[Unique Paths](./Algorithms/0062.unique-paths)|42%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|63|[Unique Paths II](./Algorithms/0063.unique-paths-ii)|32%|Medium| | +|64|[Minimum Path Sum](./Algorithms/0064.minimum-path-sum)|39%|Medium| | +|65|[Valid Number](./Algorithms/0065.valid-number)|12%|Hard| | +|66|[Plus One](./Algorithms/0066.plus-one)|39%|Easy| | +|67|[Add Binary](./Algorithms/0067.add-binary)|33%|Easy| | +|68|[Text Justification](./Algorithms/0068.text-justification)|19%|Hard| | +|69|[Sqrt(x)](./Algorithms/0069.sqrtx)|28%|Easy| | +|70|[Climbing Stairs](./Algorithms/0070.climbing-stairs)|40%|Easy| | +|71|[Simplify Path](./Algorithms/0071.simplify-path)|26%|Medium| | +|72|[Edit Distance](./Algorithms/0072.edit-distance)|32%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|73|[Set Matrix Zeroes](./Algorithms/0073.set-matrix-zeroes)|36%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|74|[Search a 2D Matrix](./Algorithms/0074.search-a-2d-matrix)|34%|Medium| | +|75|[Sort Colors](./Algorithms/0075.sort-colors)|38%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|76|[Minimum Window Substring](./Algorithms/0076.minimum-window-substring)|26%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|77|[Combinations](./Algorithms/0077.combinations)|40%|Medium| | +|78|[Subsets](./Algorithms/0078.subsets)|43%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|79|[Word Search](./Algorithms/0079.word-search)|27%|Medium| | +|80|[Remove Duplicates from Sorted Array II](./Algorithms/0080.remove-duplicates-from-sorted-array-ii)|36%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|81|[Search in Rotated Sorted Array II](./Algorithms/0081.search-in-rotated-sorted-array-ii)|32%|Medium| | +|82|[Remove Duplicates from Sorted List II](./Algorithms/0082.remove-duplicates-from-sorted-list-ii)|29%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|83|[Remove Duplicates from Sorted List](./Algorithms/0083.remove-duplicates-from-sorted-list)|40%|Easy| | +|84|[Largest Rectangle in Histogram](./Algorithms/0084.largest-rectangle-in-histogram)|27%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|85|[Maximal Rectangle](./Algorithms/0085.maximal-rectangle)|29%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|86|[Partition List](./Algorithms/0086.partition-list)|33%|Medium| | +|87|[Scramble String](./Algorithms/0087.scramble-string)|29%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|88|[Merge Sorted Array](./Algorithms/0088.merge-sorted-array)|32%|Easy| | +|89|[Gray Code](./Algorithms/0089.gray-code)|41%|Medium| | +|90|[Subsets II](./Algorithms/0090.subsets-ii)|37%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|91|[Decode Ways](./Algorithms/0091.decode-ways)|20%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|92|[Reverse Linked List II](./Algorithms/0092.reverse-linked-list-ii)|31%|Medium| | +|93|[Restore IP Addresses](./Algorithms/0093.restore-ip-addresses)|28%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|94|[Binary Tree Inorder Traversal](./Algorithms/0094.binary-tree-inorder-traversal)|48%|Medium| | +|95|[Unique Binary Search Trees II](./Algorithms/0095.unique-binary-search-trees-ii)|31%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|96|[Unique Binary Search Trees](./Algorithms/0096.unique-binary-search-trees)|41%|Medium| | +|97|[Interleaving String](./Algorithms/0097.interleaving-string)|25%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|98|[Validate Binary Search Tree](./Algorithms/0098.validate-binary-search-tree)|23%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|99|[Recover Binary Search Tree](./Algorithms/0099.recover-binary-search-tree)|30%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|100|[Same Tree](./Algorithms/0100.same-tree)|47%|Easy| | +|101|[Symmetric Tree](./Algorithms/0101.symmetric-tree)|39%|Easy|[❤](https://leetcode.com/list/oussv5j)| +|102|[Binary Tree Level Order Traversal](./Algorithms/0102.binary-tree-level-order-traversal)|41%|Medium| | +|103|[Binary Tree Zigzag Level Order Traversal](./Algorithms/0103.binary-tree-zigzag-level-order-traversal)|36%|Medium| | +|104|[Maximum Depth of Binary Tree](./Algorithms/0104.maximum-depth-of-binary-tree)|53%|Easy| | +|105|[Construct Binary Tree from Preorder and Inorder Traversal](./Algorithms/0105.construct-binary-tree-from-preorder-and-inorder-traversal)|33%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|106|[Construct Binary Tree from Inorder and Postorder Traversal](./Algorithms/0106.construct-binary-tree-from-inorder-and-postorder-traversal)|32%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|107|[Binary Tree Level Order Traversal II](./Algorithms/0107.binary-tree-level-order-traversal-ii)|41%|Easy| | +|108|[Convert Sorted Array to Binary Search Tree](./Algorithms/0108.convert-sorted-array-to-binary-search-tree)|43%|Easy| | +|109|[Convert Sorted List to Binary Search Tree](./Algorithms/0109.convert-sorted-list-to-binary-search-tree)|34%|Medium| | +|110|[Balanced Binary Tree](./Algorithms/0110.balanced-binary-tree)|38%|Easy| | +|111|[Minimum Depth of Binary Tree](./Algorithms/0111.minimum-depth-of-binary-tree)|33%|Easy| | +|112|[Path Sum](./Algorithms/0112.path-sum)|34%|Easy| | +|113|[Path Sum II](./Algorithms/0113.path-sum-ii)|34%|Medium| | +|114|[Flatten Binary Tree to Linked List](./Algorithms/0114.flatten-binary-tree-to-linked-list)|36%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|115|[Distinct Subsequences](./Algorithms/0115.distinct-subsequences)|32%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|118|[Pascal's Triangle](./Algorithms/0118.pascals-triangle)|39%|Easy| | +|119|[Pascal's Triangle II](./Algorithms/0119.pascals-triangle-ii)|37%|Easy| | +|120|[Triangle](./Algorithms/0120.triangle)|34%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|121|[Best Time to Buy and Sell Stock](./Algorithms/0121.best-time-to-buy-and-sell-stock)|42%|Easy| | +|122|[Best Time to Buy and Sell Stock II](./Algorithms/0122.best-time-to-buy-and-sell-stock-ii)|47%|Easy| | +|123|[Best Time to Buy and Sell Stock III](./Algorithms/0123.best-time-to-buy-and-sell-stock-iii)|30%|Hard| | +|124|[Binary Tree Maximum Path Sum](./Algorithms/0124.binary-tree-maximum-path-sum)|26%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|125|[Valid Palindrome](./Algorithms/0125.valid-palindrome)|26%|Easy| | +|126|[Word Ladder II](./Algorithms/0126.word-ladder-ii)|14%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|127|[Word Ladder](./Algorithms/0127.word-ladder)|19%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|128|[Longest Consecutive Sequence](./Algorithms/0128.longest-consecutive-sequence)|37%|Hard| | +|129|[Sum Root to Leaf Numbers](./Algorithms/0129.sum-root-to-leaf-numbers)|37%|Medium| | +|130|[Surrounded Regions](./Algorithms/0130.surrounded-regions)|19%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|131|[Palindrome Partitioning](./Algorithms/0131.palindrome-partitioning)|34%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|132|[Palindrome Partitioning II](./Algorithms/0132.palindrome-partitioning-ii)|24%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|134|[Gas Station](./Algorithms/0134.gas-station)|29%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|135|[Candy](./Algorithms/0135.candy)|25%|Hard| | +|136|[Single Number](./Algorithms/0136.single-number)|55%|Easy| | +|137|[Single Number II](./Algorithms/0137.single-number-ii)|42%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|139|[Word Break](./Algorithms/0139.word-break)|31%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|140|[Word Break II](./Algorithms/0140.word-break-ii)|24%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|143|[Reorder List](./Algorithms/0143.reorder-list)|26%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|144|[Binary Tree Preorder Traversal](./Algorithms/0144.binary-tree-preorder-traversal)|46%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|145|[Binary Tree Postorder Traversal](./Algorithms/0145.binary-tree-postorder-traversal)|41%|Hard| | +|146|[LRU Cache](./Algorithms/0146.lru-cache)|19%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|147|[Insertion Sort List](./Algorithms/0147.insertion-sort-list)|33%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|148|[Sort List](./Algorithms/0148.sort-list)|29%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|149|[Max Points on a Line](./Algorithms/0149.max-points-on-a-line)|15%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|150|[Evaluate Reverse Polish Notation](./Algorithms/0150.evaluate-reverse-polish-notation)|27%|Medium| | +|152|[Maximum Product Subarray](./Algorithms/0152.maximum-product-subarray)|26%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|153|[Find Minimum in Rotated Sorted Array](./Algorithms/0153.find-minimum-in-rotated-sorted-array)|40%|Medium| | +|154|[Find Minimum in Rotated Sorted Array II](./Algorithms/0154.find-minimum-in-rotated-sorted-array-ii)|37%|Hard| | +|155|[Min Stack](./Algorithms/0155.min-stack)|30%|Easy| | +|162|[Find Peak Element](./Algorithms/0162.find-peak-element)|38%|Medium| | +|164|[Maximum Gap](./Algorithms/0164.maximum-gap)|29%|Hard| | +|165|[Compare Version Numbers](./Algorithms/0165.compare-version-numbers)|20%|Medium| | +|166|[Fraction to Recurring Decimal](./Algorithms/0166.fraction-to-recurring-decimal)|17%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|167|[Two Sum II - Input array is sorted](./Algorithms/0167.two-sum-ii-input-array-is-sorted)|47%|Easy| | +|168|[Excel Sheet Column Title](./Algorithms/0168.excel-sheet-column-title)|26%|Easy|[❤](https://leetcode.com/list/oussv5j)| +|169|[Majority Element](./Algorithms/0169.majority-element)|47%|Easy|[❤](https://leetcode.com/list/oussv5j)| +|171|[Excel Sheet Column Number](./Algorithms/0171.excel-sheet-column-number)|48%|Easy| | +|172|[Factorial Trailing Zeroes](./Algorithms/0172.factorial-trailing-zeroes)|36%|Easy| | +|174|[Dungeon Game](./Algorithms/0174.dungeon-game)|23%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|179|[Largest Number](./Algorithms/0179.largest-number)|23%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|187|[Repeated DNA Sequences](./Algorithms/0187.repeated-dna-sequences)|32%|Medium| | +|188|[Best Time to Buy and Sell Stock IV](./Algorithms/0188.best-time-to-buy-and-sell-stock-iv)|24%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|189|[Rotate Array](./Algorithms/0189.rotate-array)|25%|Easy| | +|198|[House Robber](./Algorithms/0198.house-robber)|39%|Easy|[❤](https://leetcode.com/list/oussv5j)| +|199|[Binary Tree Right Side View](./Algorithms/0199.binary-tree-right-side-view)|41%|Medium| | +|200|[Number of Islands](./Algorithms/0200.number-of-islands)|35%|Medium| | +|201|[Bitwise AND of Numbers Range](./Algorithms/0201.bitwise-and-of-numbers-range)|34%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|202|[Happy Number](./Algorithms/0202.happy-number)|41%|Easy| | +|203|[Remove Linked List Elements](./Algorithms/0203.remove-linked-list-elements)|33%|Easy| | +|204|[Count Primes](./Algorithms/0204.count-primes)|26%|Easy|[❤](https://leetcode.com/list/oussv5j)| +|205|[Isomorphic Strings](./Algorithms/0205.isomorphic-strings)|34%|Easy|[❤](https://leetcode.com/list/oussv5j)| +|206|[Reverse Linked List](./Algorithms/0206.reverse-linked-list)|46%|Easy| | +|207|[Course Schedule](./Algorithms/0207.course-schedule)|33%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|208|[Implement Trie (Prefix Tree)](./Algorithms/0208.implement-trie-prefix-tree)|30%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|209|[Minimum Size Subarray Sum](./Algorithms/0209.minimum-size-subarray-sum)|31%|Medium| | +|210|[Course Schedule II](./Algorithms/0210.course-schedule-ii)|29%|Medium| | +|211|[Add and Search Word - Data structure design](./Algorithms/0211.add-and-search-word-data-structure-design)|24%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|212|[Word Search II](./Algorithms/0212.word-search-ii)|24%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|213|[House Robber II](./Algorithms/0213.house-robber-ii)|34%|Medium| | +|214|[Shortest Palindrome](./Algorithms/0214.shortest-palindrome)|24%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|215|[Kth Largest Element in an Array](./Algorithms/0215.kth-largest-element-in-an-array)|40%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|216|[Combination Sum III](./Algorithms/0216.combination-sum-iii)|46%|Medium| | +|217|[Contains Duplicate](./Algorithms/0217.contains-duplicate)|46%|Easy| | +|218|[The Skyline Problem](./Algorithms/0218.the-skyline-problem)|28%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|219|[Contains Duplicate II](./Algorithms/0219.contains-duplicate-ii)|32%|Easy| | +|220|[Contains Duplicate III](./Algorithms/0220.contains-duplicate-iii)|18%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|221|[Maximal Square](./Algorithms/0221.maximal-square)|29%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|223|[Rectangle Area](./Algorithms/0223.rectangle-area)|33%|Medium| | +|224|[Basic Calculator](./Algorithms/0224.basic-calculator)|28%|Hard| | +|225|[Implement Stack using Queues](./Algorithms/0225.implement-stack-using-queues)|33%|Easy| | +|226|[Invert Binary Tree](./Algorithms/0226.invert-binary-tree)|52%|Easy| | +|227|[Basic Calculator II](./Algorithms/0227.basic-calculator-ii)|29%|Medium| | +|228|[Summary Ranges](./Algorithms/0228.summary-ranges)|31%|Medium| | +|229|[Majority Element II](./Algorithms/0229.majority-element-ii)|28%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|230|[Kth Smallest Element in a BST](./Algorithms/0230.kth-smallest-element-in-a-bst)|44%|Medium| | +|231|[Power of Two](./Algorithms/0231.power-of-two)|40%|Easy| | +|232|[Implement Queue using Stacks](./Algorithms/0232.implement-queue-using-stacks)|37%|Easy| | +|233|[Number of Digit One](./Algorithms/0233.number-of-digit-one)|28%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|234|[Palindrome Linked List](./Algorithms/0234.palindrome-linked-list)|33%|Easy| | +|238|[Product of Array Except Self](./Algorithms/0238.product-of-array-except-self)|50%|Medium| | +|239|[Sliding Window Maximum](./Algorithms/0239.sliding-window-maximum)|33%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|240|[Search a 2D Matrix II](./Algorithms/0240.search-a-2d-matrix-ii)|38%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|241|[Different Ways to Add Parentheses](./Algorithms/0241.different-ways-to-add-parentheses)|45%|Medium| | +|242|[Valid Anagram](./Algorithms/0242.valid-anagram)|47%|Easy| | +|257|[Binary Tree Paths](./Algorithms/0257.binary-tree-paths)|40%|Easy| | +|258|[Add Digits](./Algorithms/0258.add-digits)|51%|Easy| | +|260|[Single Number III](./Algorithms/0260.single-number-iii)|52%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|263|[Ugly Number](./Algorithms/0263.ugly-number)|39%|Easy| | +|264|[Ugly Number II](./Algorithms/0264.ugly-number-ii)|33%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|268|[Missing Number](./Algorithms/0268.missing-number)|44%|Easy| | +|273|[Integer to English Words](./Algorithms/0273.integer-to-english-words)|22%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|274|[H-Index](./Algorithms/0274.h-index)|33%|Medium| | +|275|[H-Index II](./Algorithms/0275.h-index-ii)|34%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|279|[Perfect Squares](./Algorithms/0279.perfect-squares)|37%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|282|[Expression Add Operators](./Algorithms/0282.expression-add-operators)|30%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|283|[Move Zeroes](./Algorithms/0283.move-zeroes)|51%|Easy| | +|287|[Find the Duplicate Number](./Algorithms/0287.find-the-duplicate-number)|44%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|289|[Game of Life](./Algorithms/0289.game-of-life)|37%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|290|[Word Pattern](./Algorithms/0290.word-pattern)|33%|Easy| | +|292|[Nim Game](./Algorithms/0292.nim-game)|55%|Easy|[❤](https://leetcode.com/list/oussv5j)| +|295|[Find Median from Data Stream](./Algorithms/0295.find-median-from-data-stream)|28%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|299|[Bulls and Cows](./Algorithms/0299.bulls-and-cows)|35%|Medium| | +|300|[Longest Increasing Subsequence](./Algorithms/0300.longest-increasing-subsequence)|38%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|301|[Remove Invalid Parentheses](./Algorithms/0301.remove-invalid-parentheses)|35%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|303|[Range Sum Query - Immutable](./Algorithms/0303.range-sum-query-immutable)|31%|Easy| | +|304|[Range Sum Query 2D - Immutable](./Algorithms/0304.range-sum-query-2d-immutable)|26%|Medium| | +|306|[Additive Number](./Algorithms/0306.additive-number)|27%|Medium| | +|307|[Range Sum Query - Mutable](./Algorithms/0307.range-sum-query-mutable)|21%|Medium| | +|309|[Best Time to Buy and Sell Stock with Cooldown](./Algorithms/0309.best-time-to-buy-and-sell-stock-with-cooldown)|41%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|310|[Minimum Height Trees](./Algorithms/0310.minimum-height-trees)|28%|Medium| | +|312|[Burst Balloons](./Algorithms/0312.burst-balloons)|43%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|313|[Super Ugly Number](./Algorithms/0313.super-ugly-number)|38%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|315|[Count of Smaller Numbers After Self](./Algorithms/0315.count-of-smaller-numbers-after-self)|34%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|316|[Remove Duplicate Letters](./Algorithms/0316.remove-duplicate-letters)|30%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|318|[Maximum Product of Word Lengths](./Algorithms/0318.maximum-product-of-word-lengths)|45%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|319|[Bulb Switcher](./Algorithms/0319.bulb-switcher)|42%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|321|[Create Maximum Number](./Algorithms/0321.create-maximum-number)|24%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|322|[Coin Change](./Algorithms/0322.coin-change)|26%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|324|[Wiggle Sort II](./Algorithms/0324.wiggle-sort-ii)|26%|Medium| | +|326|[Power of Three](./Algorithms/0326.power-of-three)|40%|Easy|[❤](https://leetcode.com/list/oussv5j)| +|327|[Count of Range Sum](./Algorithms/0327.count-of-range-sum)|30%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|328|[Odd Even Linked List](./Algorithms/0328.odd-even-linked-list)|44%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|329|[Longest Increasing Path in a Matrix](./Algorithms/0329.longest-increasing-path-in-a-matrix)|37%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|330|[Patching Array](./Algorithms/0330.patching-array)|32%|Hard| | +|331|[Verify Preorder Serialization of a Binary Tree](./Algorithms/0331.verify-preorder-serialization-of-a-binary-tree)|36%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|332|[Reconstruct Itinerary](./Algorithms/0332.reconstruct-itinerary)|29%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|334|[Increasing Triplet Subsequence](./Algorithms/0334.increasing-triplet-subsequence)|40%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|335|[Self Crossing](./Algorithms/0335.self-crossing)|25%|Hard| | +|336|[Palindrome Pairs](./Algorithms/0336.palindrome-pairs)|26%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|337|[House Robber III](./Algorithms/0337.house-robber-iii)|44%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|338|[Counting Bits](./Algorithms/0338.counting-bits)|61%|Medium| | +|342|[Power of Four](./Algorithms/0342.power-of-four)|38%|Easy| | +|343|[Integer Break](./Algorithms/0343.integer-break)|46%|Medium| | +|344|[Reverse String](./Algorithms/0344.reverse-string)|59%|Easy| | +|345|[Reverse Vowels of a String](./Algorithms/0345.reverse-vowels-of-a-string)|38%|Easy| | +|347|[Top K Frequent Elements](./Algorithms/0347.top-k-frequent-elements)|49%|Medium| | +|349|[Intersection of Two Arrays](./Algorithms/0349.intersection-of-two-arrays)|47%|Easy| | +|350|[Intersection of Two Arrays II](./Algorithms/0350.intersection-of-two-arrays-ii)|44%|Easy|[❤](https://leetcode.com/list/oussv5j)| +|352|[Data Stream as Disjoint Intervals](./Algorithms/0352.data-stream-as-disjoint-intervals)|40%|Hard| | +|354|[Russian Doll Envelopes](./Algorithms/0354.russian-doll-envelopes)|32%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|355|[Design Twitter](./Algorithms/0355.design-twitter)|25%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|357|[Count Numbers with Unique Digits](./Algorithms/0357.count-numbers-with-unique-digits)|46%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|363|[Max Sum of Rectangle No Larger Than K](./Algorithms/0363.max-sum-of-rectangle-no-larger-than-k)|33%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|365|[Water and Jug Problem](./Algorithms/0365.water-and-jug-problem)|27%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|367|[Valid Perfect Square](./Algorithms/0367.valid-perfect-square)|38%|Easy| | +|368|[Largest Divisible Subset](./Algorithms/0368.largest-divisible-subset)|33%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|371|[Sum of Two Integers](./Algorithms/0371.sum-of-two-integers)|51%|Easy|[❤](https://leetcode.com/list/oussv5j)| +|372|[Super Pow](./Algorithms/0372.super-pow)|34%|Medium| | +|373|[Find K Pairs with Smallest Sums](./Algorithms/0373.find-k-pairs-with-smallest-sums)|31%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|375|[Guess Number Higher or Lower II](./Algorithms/0375.guess-number-higher-or-lower-ii)|36%|Medium| | +|376|[Wiggle Subsequence](./Algorithms/0376.wiggle-subsequence)|36%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|377|[Combination Sum IV](./Algorithms/0377.combination-sum-iv)|42%|Medium| | +|378|[Kth Smallest Element in a Sorted Matrix](./Algorithms/0378.kth-smallest-element-in-a-sorted-matrix)|45%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|380|[Insert Delete GetRandom O(1)](./Algorithms/0380.insert-delete-getrandom-o1)|39%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|381|[Insert Delete GetRandom O(1) - Duplicates allowed](./Algorithms/0381.insert-delete-getrandom-o1-duplicates-allowed)|29%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|382|[Linked List Random Node](./Algorithms/0382.linked-list-random-node)|47%|Medium| | +|383|[Ransom Note](./Algorithms/0383.ransom-note)|47%|Easy| | +|384|[Shuffle an Array](./Algorithms/0384.shuffle-an-array)|47%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|385|[Mini Parser](./Algorithms/0385.mini-parser)|30%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|387|[First Unique Character in a String](./Algorithms/0387.first-unique-character-in-a-string)|47%|Easy| | +|388|[Longest Absolute File Path](./Algorithms/0388.longest-absolute-file-path)|37%|Medium| | +|389|[Find the Difference](./Algorithms/0389.find-the-difference)|51%|Easy| | +|390|[Elimination Game](./Algorithms/0390.elimination-game)|42%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|391|[Perfect Rectangle](./Algorithms/0391.perfect-rectangle)|27%|Hard| | +|392|[Is Subsequence](./Algorithms/0392.is-subsequence)|44%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|393|[UTF-8 Validation](./Algorithms/0393.utf-8-validation)|34%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|394|[Decode String](./Algorithms/0394.decode-string)|41%|Medium| | +|395|[Longest Substring with At Least K Repeating Characters](./Algorithms/0395.longest-substring-with-at-least-k-repeating-characters)|35%|Medium| | +|396|[Rotate Function](./Algorithms/0396.rotate-function)|33%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|397|[Integer Replacement](./Algorithms/0397.integer-replacement)|30%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|398|[Random Pick Index](./Algorithms/0398.random-pick-index)|44%|Medium| | +|399|[Evaluate Division](./Algorithms/0399.evaluate-division)|41%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|400|[Nth Digit](./Algorithms/0400.nth-digit)|30%|Easy|[❤](https://leetcode.com/list/oussv5j)| +|401|[Binary Watch](./Algorithms/0401.binary-watch)|44%|Easy| | +|402|[Remove K Digits](./Algorithms/0402.remove-k-digits)|26%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|403|[Frog Jump](./Algorithms/0403.frog-jump)|32%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|404|[Sum of Left Leaves](./Algorithms/0404.sum-of-left-leaves)|47%|Easy| | +|405|[Convert a Number to Hexadecimal](./Algorithms/0405.convert-a-number-to-hexadecimal)|41%|Easy| | +|406|[Queue Reconstruction by Height](./Algorithms/0406.queue-reconstruction-by-height)|56%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|407|[Trapping Rain Water II](./Algorithms/0407.trapping-rain-water-ii)|37%|Hard| | +|409|[Longest Palindrome](./Algorithms/0409.longest-palindrome)|45%|Easy| | +|410|[Split Array Largest Sum](./Algorithms/0410.split-array-largest-sum)|39%|Hard| | +|412|[Fizz Buzz](./Algorithms/0412.fizz-buzz)|58%|Easy| | +|413|[Arithmetic Slices](./Algorithms/0413.arithmetic-slices)|54%|Medium| | +|414|[Third Maximum Number](./Algorithms/0414.third-maximum-number)|27%|Easy| | +|415|[Add Strings](./Algorithms/0415.add-strings)|41%|Easy| | +|416|[Partition Equal Subset Sum](./Algorithms/0416.partition-equal-subset-sum)|39%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|417|[Pacific Atlantic Water Flow](./Algorithms/0417.pacific-atlantic-water-flow)|34%|Medium| | +|419|[Battleships in a Board](./Algorithms/0419.battleships-in-a-board)|62%|Medium| | +|420|[Strong Password Checker](./Algorithms/0420.strong-password-checker)|20%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|421|[Maximum XOR of Two Numbers in an Array](./Algorithms/0421.maximum-xor-of-two-numbers-in-an-array)|47%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|423|[Reconstruct Original Digits from English](./Algorithms/0423.reconstruct-original-digits-from-english)|44%|Medium| | +|424|[Longest Repeating Character Replacement](./Algorithms/0424.longest-repeating-character-replacement)|42%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|432|[All O`one Data Structure](./Algorithms/0432.all-oone-data-structure)|28%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|434|[Number of Segments in a String](./Algorithms/0434.number-of-segments-in-a-string)|36%|Easy| | +|435|[Non-overlapping Intervals](./Algorithms/0435.non-overlapping-intervals)|41%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|436|[Find Right Interval](./Algorithms/0436.find-right-interval)|41%|Medium| | +|437|[Path Sum III](./Algorithms/0437.path-sum-iii)|40%|Easy|[❤](https://leetcode.com/list/oussv5j)| +|438|[Find All Anagrams in a String](./Algorithms/0438.find-all-anagrams-in-a-string)|33%|Easy| | +|440|[K-th Smallest in Lexicographical Order](./Algorithms/0440.k-th-smallest-in-lexicographical-order)|25%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|441|[Arranging Coins](./Algorithms/0441.arranging-coins)|36%|Easy| | +|442|[Find All Duplicates in an Array](./Algorithms/0442.find-all-duplicates-in-an-array)|56%|Medium| | +|443|[String Compression](./Algorithms/0443.string-compression)|37%|Easy|[❤](https://leetcode.com/list/oussv5j)| +|445|[Add Two Numbers II](./Algorithms/0445.add-two-numbers-ii)|46%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|446|[Arithmetic Slices II - Subsequence](./Algorithms/0446.arithmetic-slices-ii-subsequence)|27%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|447|[Number of Boomerangs](./Algorithms/0447.number-of-boomerangs)|46%|Easy| | +|448|[Find All Numbers Disappeared in an Array](./Algorithms/0448.find-all-numbers-disappeared-in-an-array)|51%|Easy| | +|450|[Delete Node in a BST](./Algorithms/0450.delete-node-in-a-bst)|37%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|451|[Sort Characters By Frequency](./Algorithms/0451.sort-characters-by-frequency)|51%|Medium| | +|452|[Minimum Number of Arrows to Burst Balloons](./Algorithms/0452.minimum-number-of-arrows-to-burst-balloons)|44%|Medium| | +|453|[Minimum Moves to Equal Array Elements](./Algorithms/0453.minimum-moves-to-equal-array-elements)|47%|Easy| | +|454|[4Sum II](./Algorithms/0454.4sum-ii)|47%|Medium| | +|455|[Assign Cookies](./Algorithms/0455.assign-cookies)|47%|Easy| | +|456|[132 Pattern](./Algorithms/0456.132-pattern)|28%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|459|[Repeated Substring Pattern](./Algorithms/0459.repeated-substring-pattern)|38%|Easy|[❤](https://leetcode.com/list/oussv5j)| +|460|[LFU Cache](./Algorithms/0460.lfu-cache)|24%|Hard| | +|461|[Hamming Distance](./Algorithms/0461.hamming-distance)|69%|Easy| | +|462|[Minimum Moves to Equal Array Elements II](./Algorithms/0462.minimum-moves-to-equal-array-elements-ii)|51%|Medium| | +|463|[Island Perimeter](./Algorithms/0463.island-perimeter)|57%|Easy| | +|464|[Can I Win](./Algorithms/0464.can-i-win)|25%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|466|[Count The Repetitions](./Algorithms/0466.count-the-repetitions)|27%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|467|[Unique Substrings in Wraparound String](./Algorithms/0467.unique-substrings-in-wraparound-string)|33%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|468|[Validate IP Address](./Algorithms/0468.validate-ip-address)|20%|Medium| | +|472|[Concatenated Words](./Algorithms/0472.concatenated-words)|30%|Hard| | +|473|[Matchsticks to Square](./Algorithms/0473.matchsticks-to-square)|35%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|474|[Ones and Zeroes](./Algorithms/0474.ones-and-zeroes)|39%|Medium| | +|475|[Heaters](./Algorithms/0475.heaters)|29%|Easy| | +|476|[Number Complement](./Algorithms/0476.number-complement)|60%|Easy| | +|477|[Total Hamming Distance](./Algorithms/0477.total-hamming-distance)|47%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|479|[Largest Palindrome Product](./Algorithms/0479.largest-palindrome-product)|24%|Easy| | +|480|[Sliding Window Median](./Algorithms/0480.sliding-window-median)|31%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|481|[Magical String](./Algorithms/0481.magical-string)|45%|Medium| | +|482|[License Key Formatting](./Algorithms/0482.license-key-formatting)|40%|Easy| | +|483|[Smallest Good Base](./Algorithms/0483.smallest-good-base)|33%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|485|[Max Consecutive Ones](./Algorithms/0485.max-consecutive-ones)|53%|Easy| | +|486|[Predict the Winner](./Algorithms/0486.predict-the-winner)|45%|Medium| | +|488|[Zuma Game](./Algorithms/0488.zuma-game)|37%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|491|[Increasing Subsequences](./Algorithms/0491.increasing-subsequences)|38%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|492|[Construct the Rectangle](./Algorithms/0492.construct-the-rectangle)|48%|Easy|[❤](https://leetcode.com/list/oussv5j)| +|493|[Reverse Pairs](./Algorithms/0493.reverse-pairs)|21%|Hard| | +|494|[Target Sum](./Algorithms/0494.target-sum)|43%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|495|[Teemo Attacking](./Algorithms/0495.teemo-attacking)|51%|Medium| | +|496|[Next Greater Element I](./Algorithms/0496.next-greater-element-i)|56%|Easy| | +|498|[Diagonal Traverse](./Algorithms/0498.diagonal-traverse)|46%|Medium| | +|500|[Keyboard Row](./Algorithms/0500.keyboard-row)|59%|Easy| | +|501|[Find Mode in Binary Search Tree](./Algorithms/0501.find-mode-in-binary-search-tree)|37%|Easy|[❤](https://leetcode.com/list/oussv5j)| +|502|[IPO](./Algorithms/0502.ipo)|36%|Hard| | +|503|[Next Greater Element II](./Algorithms/0503.next-greater-element-ii)|47%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|504|[Base 7](./Algorithms/0504.base-7)|44%|Easy| | +|506|[Relative Ranks](./Algorithms/0506.relative-ranks)|46%|Easy| | +|507|[Perfect Number](./Algorithms/0507.perfect-number)|33%|Easy| | +|508|[Most Frequent Subtree Sum](./Algorithms/0508.most-frequent-subtree-sum)|52%|Medium| | +|513|[Find Bottom Left Tree Value](./Algorithms/0513.find-bottom-left-tree-value)|56%|Medium| | +|514|[Freedom Trail](./Algorithms/0514.freedom-trail)|39%|Hard| | +|515|[Find Largest Value in Each Tree Row](./Algorithms/0515.find-largest-value-in-each-tree-row)|55%|Medium| | +|516|[Longest Palindromic Subsequence](./Algorithms/0516.longest-palindromic-subsequence)|42%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|517|[Super Washing Machines](./Algorithms/0517.super-washing-machines)|36%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|520|[Detect Capital](./Algorithms/0520.detect-capital)|52%|Easy| | +|521|[Longest Uncommon Subsequence I ](./Algorithms/0521.longest-uncommon-subsequence-i)|55%|Easy| | +|522|[Longest Uncommon Subsequence II](./Algorithms/0522.longest-uncommon-subsequence-ii)|31%|Medium| | +|523|[Continuous Subarray Sum](./Algorithms/0523.continuous-subarray-sum)|23%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|524|[Longest Word in Dictionary through Deleting](./Algorithms/0524.longest-word-in-dictionary-through-deleting)|43%|Medium| | +|525|[Contiguous Array](./Algorithms/0525.contiguous-array)|41%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|526|[Beautiful Arrangement](./Algorithms/0526.beautiful-arrangement)|53%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|529|[Minesweeper](./Algorithms/0529.minesweeper)|49%|Medium| | +|530|[Minimum Absolute Difference in BST](./Algorithms/0530.minimum-absolute-difference-in-bst)|47%|Easy|[❤](https://leetcode.com/list/oussv5j)| +|532|[K-diff Pairs in an Array](./Algorithms/0532.k-diff-pairs-in-an-array)|28%|Easy| | +|537|[Complex Number Multiplication](./Algorithms/0537.complex-number-multiplication)|63%|Medium| | +|538|[Convert BST to Greater Tree](./Algorithms/0538.convert-bst-to-greater-tree)|49%|Easy| | +|539|[Minimum Time Difference](./Algorithms/0539.minimum-time-difference)|46%|Medium| | +|540|[Single Element in a Sorted Array](./Algorithms/0540.single-element-in-a-sorted-array)|56%|Medium| | +|541|[Reverse String II](./Algorithms/0541.reverse-string-ii)|43%|Easy| | +|542|[01 Matrix](./Algorithms/0542.01-matrix)|32%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|543|[Diameter of Binary Tree](./Algorithms/0543.diameter-of-binary-tree)|45%|Easy| | +|546|[Remove Boxes](./Algorithms/0546.remove-boxes)|35%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|547|[Friend Circles](./Algorithms/0547.friend-circles)|49%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|551|[Student Attendance Record I](./Algorithms/0551.student-attendance-record-i)|44%|Easy| | +|552|[Student Attendance Record II](./Algorithms/0552.student-attendance-record-ii)|31%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|553|[Optimal Division](./Algorithms/0553.optimal-division)|55%|Medium| | +|554|[Brick Wall](./Algorithms/0554.brick-wall)|46%|Medium| | +|556|[Next Greater Element III](./Algorithms/0556.next-greater-element-iii)|29%|Medium| | +|557|[Reverse Words in a String III](./Algorithms/0557.reverse-words-in-a-string-iii)|59%|Easy| | +|560|[Subarray Sum Equals K](./Algorithms/0560.subarray-sum-equals-k)|40%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|561|[Array Partition I](./Algorithms/0561.array-partition-i)|66%|Easy| | +|563|[Binary Tree Tilt](./Algorithms/0563.binary-tree-tilt)|47%|Easy| | +|564|[Find the Closest Palindrome](./Algorithms/0564.find-the-closest-palindrome)|17%|Hard| | +|565|[Array Nesting](./Algorithms/0565.array-nesting)|49%|Medium| | +|566|[Reshape the Matrix](./Algorithms/0566.reshape-the-matrix)|58%|Easy| | +|567|[Permutation in String](./Algorithms/0567.permutation-in-string)|36%|Medium| | +|572|[Subtree of Another Tree](./Algorithms/0572.subtree-of-another-tree)|40%|Easy|[❤](https://leetcode.com/list/oussv5j)| +|575|[Distribute Candies](./Algorithms/0575.distribute-candies)|58%|Easy| | +|576|[Out of Boundary Paths](./Algorithms/0576.out-of-boundary-paths)|30%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|581|[Shortest Unsorted Continuous Subarray](./Algorithms/0581.shortest-unsorted-continuous-subarray)|29%|Easy|[❤](https://leetcode.com/list/oussv5j)| +|583|[Delete Operation for Two Strings](./Algorithms/0583.delete-operation-for-two-strings)|44%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|587|[Erect the Fence](./Algorithms/0587.erect-the-fence)|32%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|591|[Tag Validator](./Algorithms/0591.tag-validator)|30%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|592|[Fraction Addition and Subtraction](./Algorithms/0592.fraction-addition-and-subtraction)|45%|Medium| | +|593|[Valid Square](./Algorithms/0593.valid-square)|40%|Medium| | +|594|[Longest Harmonious Subsequence](./Algorithms/0594.longest-harmonious-subsequence)|41%|Easy| | +|598|[Range Addition II](./Algorithms/0598.range-addition-ii)|48%|Easy| | +|599|[Minimum Index Sum of Two Lists](./Algorithms/0599.minimum-index-sum-of-two-lists)|46%|Easy| | +|600|[Non-negative Integers without Consecutive Ones](./Algorithms/0600.non-negative-integers-without-consecutive-ones)|31%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|605|[Can Place Flowers](./Algorithms/0605.can-place-flowers)|30%|Easy|[❤](https://leetcode.com/list/oussv5j)| +|606|[Construct String from Binary Tree](./Algorithms/0606.construct-string-from-binary-tree)|49%|Easy| | +|609|[Find Duplicate File in System](./Algorithms/0609.find-duplicate-file-in-system)|52%|Medium| | +|611|[Valid Triangle Number](./Algorithms/0611.valid-triangle-number)|42%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|617|[Merge Two Binary Trees](./Algorithms/0617.merge-two-binary-trees)|67%|Easy| | +|621|[Task Scheduler](./Algorithms/0621.task-scheduler)|42%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|623|[Add One Row to Tree](./Algorithms/0623.add-one-row-to-tree)|46%|Medium| | +|628|[Maximum Product of Three Numbers](./Algorithms/0628.maximum-product-of-three-numbers)|45%|Easy|[❤](https://leetcode.com/list/oussv5j)| +|629|[K Inverse Pairs Array](./Algorithms/0629.k-inverse-pairs-array)|26%|Hard| | +|630|[Course Schedule III](./Algorithms/0630.course-schedule-iii)|28%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|632|[Smallest Range](./Algorithms/0632.smallest-range)|42%|Hard| | +|633|[Sum of Square Numbers](./Algorithms/0633.sum-of-square-numbers)|32%|Easy| | +|636|[Exclusive Time of Functions](./Algorithms/0636.exclusive-time-of-functions)|44%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|637|[Average of Levels in Binary Tree](./Algorithms/0637.average-of-levels-in-binary-tree)|55%|Easy| | +|638|[Shopping Offers](./Algorithms/0638.shopping-offers)|44%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|639|[Decode Ways II](./Algorithms/0639.decode-ways-ii)|24%|Hard| | +|640|[Solve the Equation](./Algorithms/0640.solve-the-equation)|38%|Medium| | +|643|[Maximum Average Subarray I](./Algorithms/0643.maximum-average-subarray-i)|37%|Easy| | +|645|[Set Mismatch](./Algorithms/0645.set-mismatch)|40%|Easy|[❤](https://leetcode.com/list/oussv5j)| +|646|[Maximum Length of Pair Chain](./Algorithms/0646.maximum-length-of-pair-chain)|47%|Medium| | +|647|[Palindromic Substrings](./Algorithms/0647.palindromic-substrings)|55%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|648|[Replace Words](./Algorithms/0648.replace-words)|47%|Medium| | +|649|[Dota2 Senate](./Algorithms/0649.dota2-senate)|36%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|650|[2 Keys Keyboard](./Algorithms/0650.2-keys-keyboard)|44%|Medium| | +|652|[Find Duplicate Subtrees](./Algorithms/0652.find-duplicate-subtrees)|37%|Medium| | +|653|[Two Sum IV - Input is a BST](./Algorithms/0653.two-sum-iv-input-is-a-bst)|50%|Easy| | +|654|[Maximum Binary Tree](./Algorithms/0654.maximum-binary-tree)|70%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|655|[Print Binary Tree](./Algorithms/0655.print-binary-tree)|49%|Medium| | +|657|[Judge Route Circle](./Algorithms/0657.judge-route-circle)|68%|Easy| | +|658|[Find K Closest Elements](./Algorithms/0658.find-k-closest-elements)|35%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|659|[Split Array into Consecutive Subsequences](./Algorithms/0659.split-array-into-consecutive-subsequences)|36%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|661|[Image Smoother](./Algorithms/0661.image-smoother)|45%|Easy| | +|662|[Maximum Width of Binary Tree](./Algorithms/0662.maximum-width-of-binary-tree)|38%|Medium| | +|664|[Strange Printer](./Algorithms/0664.strange-printer)|33%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|665|[Non-decreasing Array](./Algorithms/0665.non-decreasing-array)|20%|Easy| | +|667|[Beautiful Arrangement II](./Algorithms/0667.beautiful-arrangement-ii)|51%|Medium| | +|668|[Kth Smallest Number in Multiplication Table](./Algorithms/0668.kth-smallest-number-in-multiplication-table)|39%|Hard| | +|669|[Trim a Binary Search Tree](./Algorithms/0669.trim-a-binary-search-tree)|58%|Easy| | +|670|[Maximum Swap](./Algorithms/0670.maximum-swap)|38%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|671|[Second Minimum Node In a Binary Tree](./Algorithms/0671.second-minimum-node-in-a-binary-tree)|41%|Easy| | +|672|[Bulb Switcher II](./Algorithms/0672.bulb-switcher-ii)|48%|Medium| | +|673|[Number of Longest Increasing Subsequence](./Algorithms/0673.number-of-longest-increasing-subsequence)|31%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|674|[Longest Continuous Increasing Subsequence](./Algorithms/0674.longest-continuous-increasing-subsequence)|42%|Easy| | +|675|[Cut Off Trees for Golf Event](./Algorithms/0675.cut-off-trees-for-golf-event)|27%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|676|[Implement Magic Dictionary](./Algorithms/0676.implement-magic-dictionary)|49%|Medium| | +|677|[Map Sum Pairs](./Algorithms/0677.map-sum-pairs)|52%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|678|[Valid Parenthesis String](./Algorithms/0678.valid-parenthesis-string)|29%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|679|[24 Game](./Algorithms/0679.24-game)|38%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|680|[Valid Palindrome II](./Algorithms/0680.valid-palindrome-ii)|32%|Easy| | +|682|[Baseball Game](./Algorithms/0682.baseball-game)|58%|Easy| | +|684|[Redundant Connection](./Algorithms/0684.redundant-connection)|42%|Medium| | +|685|[Redundant Connection II](./Algorithms/0685.redundant-connection-ii)|28%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|686|[Repeated String Match](./Algorithms/0686.repeated-string-match)|34%|Easy|[❤](https://leetcode.com/list/oussv5j)| +|687|[Longest Univalue Path](./Algorithms/0687.longest-univalue-path)|33%|Easy| | +|688|[Knight Probability in Chessboard](./Algorithms/0688.knight-probability-in-chessboard)|39%|Medium| | +|689|[Maximum Sum of 3 Non-Overlapping Subarrays](./Algorithms/0689.maximum-sum-of-3-non-overlapping-subarrays)|41%|Hard| | +|691|[Stickers to Spell Word](./Algorithms/0691.stickers-to-spell-word)|34%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|692|[Top K Frequent Words](./Algorithms/0692.top-k-frequent-words)|41%|Medium| | +|693|[Binary Number with Alternating Bits](./Algorithms/0693.binary-number-with-alternating-bits)|55%|Easy| | +|695|[Max Area of Island](./Algorithms/0695.max-area-of-island)|52%|Easy|[❤](https://leetcode.com/list/oussv5j)| +|696|[Count Binary Substrings](./Algorithms/0696.count-binary-substrings)|51%|Easy| | +|697|[Degree of an Array](./Algorithms/0697.degree-of-an-array)|47%|Easy| | +|698|[Partition to K Equal Sum Subsets](./Algorithms/0698.partition-to-k-equal-sum-subsets)|37%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|699|[Falling Squares](./Algorithms/0699.falling-squares)|37%|Hard| | +|712|[Minimum ASCII Delete Sum for Two Strings](./Algorithms/0712.minimum-ascii-delete-sum-for-two-strings)|51%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|713|[Subarray Product Less Than K](./Algorithms/0713.subarray-product-less-than-k)|33%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|714|[Best Time to Buy and Sell Stock with Transaction Fee](./Algorithms/0714.best-time-to-buy-and-sell-stock-with-transaction-fee)|43%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|715|[Range Module](./Algorithms/0715.range-module)|31%|Hard| | +|717|[1-bit and 2-bit Characters](./Algorithms/0717.1-bit-and-2-bit-characters)|49%|Easy| | +|718|[Maximum Length of Repeated Subarray](./Algorithms/0718.maximum-length-of-repeated-subarray)|40%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|719|[Find K-th Smallest Pair Distance](./Algorithms/0719.find-k-th-smallest-pair-distance)|26%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|720|[Longest Word in Dictionary](./Algorithms/0720.longest-word-in-dictionary)|41%|Easy| | +|721|[Accounts Merge](./Algorithms/0721.accounts-merge)|31%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|722|[Remove Comments](./Algorithms/0722.remove-comments)|26%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|724|[Find Pivot Index](./Algorithms/0724.find-pivot-index)|40%|Easy| | +|725|[Split Linked List in Parts](./Algorithms/0725.split-linked-list-in-parts)|48%|Medium| | +|726|[Number of Atoms](./Algorithms/0726.number-of-atoms)|44%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|728|[Self Dividing Numbers](./Algorithms/0728.self-dividing-numbers)|67%|Easy| | +|729|[My Calendar I](./Algorithms/0729.my-calendar-i)|41%|Medium| | +|730|[Count Different Palindromic Subsequences](./Algorithms/0730.count-different-palindromic-subsequences)|34%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|731|[My Calendar II](./Algorithms/0731.my-calendar-ii)|36%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|732|[My Calendar III](./Algorithms/0732.my-calendar-iii)|54%|Hard| | +|733|[Flood Fill](./Algorithms/0733.flood-fill)|48%|Easy| | +|735|[Asteroid Collision](./Algorithms/0735.asteroid-collision)|37%|Medium| | +|736|[Parse Lisp Expression](./Algorithms/0736.parse-lisp-expression)|41%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|738|[Monotone Increasing Digits](./Algorithms/0738.monotone-increasing-digits)|41%|Medium| | +|739|[Daily Temperatures](./Algorithms/0739.daily-temperatures)|53%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|740|[Delete and Earn](./Algorithms/0740.delete-and-earn)|42%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|741|[Cherry Pickup](./Algorithms/0741.cherry-pickup)|22%|Hard| | +|744|[Network Delay Time](./Algorithms/0744.network-delay-time)|33%|Medium| | +|745|[Find Smallest Letter Greater Than Target](./Algorithms/0745.find-smallest-letter-greater-than-target)|47%|Easy| | +|746|[Prefix and Suffix Search](./Algorithms/0746.prefix-and-suffix-search)|23%|Hard| | +|747|[Min Cost Climbing Stairs](./Algorithms/0747.min-cost-climbing-stairs)|44%|Easy| | +|748|[Largest Number At Least Twice of Others](./Algorithms/0748.largest-number-at-least-twice-of-others)|45%|Easy| | +|749|[Shortest Completing Word](./Algorithms/0749.shortest-completing-word)|54%|Medium| | +|750|[Contain Virus](./Algorithms/0750.contain-virus)|39%|Hard| | +|753|[Open the Lock](./Algorithms/0753.open-the-lock)|37%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|754|[Cracking the Safe](./Algorithms/0754.cracking-the-safe)|39%|Hard|[❤](https://leetcode.com/list/oussv5j)| +|755|[Reach a Number](./Algorithms/0755.reach-a-number)|23%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|756|[Pour Water](./Algorithms/0756.pour-water)|33%|Medium| | +|757|[Pyramid Transition Matrix](./Algorithms/0757.pyramid-transition-matrix)|41%|Medium|[❤](https://leetcode.com/list/oussv5j)| +|759|[Set Intersection Size At Least Two](./Algorithms/0759.set-intersection-size-at-least-two)|33%|Hard| | +|761| * Employee Free Time|49%|Hard| | +|762|[Find Anagram Mappings](./Algorithms/0762.find-anagram-mappings)|81%|Easy| | +|763| * Special Binary String|32%|Hard| | - 以下题目,暂时不能使用 Golang 解答 -- [116. Populating Next Right Pointers in Each Node](https://leetcode.com/problems/populating-next-right-pointers-in-each-node/) -- [117. Populating Next Right Pointers in Each Node II](https://leetcode.com/problems/populating-next-right-pointers-in-each-node-ii/) +以下免费的算法题,暂时不能使用 Go 解答 +- [116.Populating Next Right Pointers in Each Node](https://leetcode.com/problems/populating-next-right-pointers-in-each-node/) +- [117.Populating Next Right Pointers in Each Node II](https://leetcode.com/problems/populating-next-right-pointers-in-each-node-ii/) +- [133.Clone Graph](https://leetcode.com/problems/clone-graph/) +- [138.Copy List with Random Pointer](https://leetcode.com/problems/copy-list-with-random-pointer/) +- [141.Linked List Cycle](https://leetcode.com/problems/linked-list-cycle/) +- [142.Linked List Cycle II](https://leetcode.com/problems/linked-list-cycle-ii/) +- [151.Reverse Words in a String](https://leetcode.com/problems/reverse-words-in-a-string/) +- [160.Intersection of Two Linked Lists](https://leetcode.com/problems/intersection-of-two-linked-lists/) +- [173.Binary Search Tree Iterator](https://leetcode.com/problems/binary-search-tree-iterator/) +- [190.Reverse Bits](https://leetcode.com/problems/reverse-bits/) +- [191.Number of 1 Bits](https://leetcode.com/problems/number-of-1-bits/) +- [222.Count Complete Tree Nodes](https://leetcode.com/problems/count-complete-tree-nodes/) +- [235.Lowest Common Ancestor of a Binary Search Tree](https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/) +- [236.Lowest Common Ancestor of a Binary Tree](https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/) +- [237.Delete Node in a Linked List](https://leetcode.com/problems/delete-node-in-a-linked-list/) +- [278.First Bad Version](https://leetcode.com/problems/first-bad-version/) +- [284.Peeking Iterator](https://leetcode.com/problems/peeking-iterator/) +- [297.Serialize and Deserialize Binary Tree](https://leetcode.com/problems/serialize-and-deserialize-binary-tree/) +- [341.Flatten Nested List Iterator](https://leetcode.com/problems/flatten-nested-list-iterator/) +- [374.Guess Number Higher or Lower](https://leetcode.com/problems/guess-number-higher-or-lower/) +- [386.Lexicographical Numbers](https://leetcode.com/problems/lexicographical-numbers/) +- [449.Serialize and Deserialize BST](https://leetcode.com/problems/serialize-and-deserialize-bst/) +- [535.Encode and Decode TinyURL](https://leetcode.com/problems/encode-and-decode-tinyurl/) +- [690.Employee Importance](https://leetcode.com/problems/employee-importance/) ## helper -[helper](./helper.v4)会帮助处理大部分琐碎的工作。 + +[helper](./helper.v5) 会处理大部分琐碎的工作。 ## notes -[notes](./notes)记录了我答题过程中,对知识点的总结。 + +[notes](./notes) 记录了我答题过程中,对知识点的总结。 ## kit -在[kit](./kit)中添加了LeetCode常用的数据结构和处理函数: -1. 为[*ListNode](./kit/ListNode.go)添加了与[]int相互转换的函数,方便添加单元测试。使用方式可以参考[21. Merge Two Sorted Lists](./Algorithms/0021.merge-two-sorted-lists/merge-two-sorted-lists_test.go) -1. 为[*TreeNode](./kit/TreeNode.go)添加了与[]int相互转换的函数,方便添加单元测试。 + +针对 LeetCode 中经常出现的以下数据结构,在 [kit](./kit) 中进行了定义,并添加了与 []int 相互转换的函数。利用 Go 1.9 新添加的 [type alias](https://github.com/golang/proposal/blob/master/design/18130-type-alias.md) 功能,易于添加单元测试。 + +- [Heap](./kit/Heap.go) +- [Interval](./kit/Interval.go) +- [ListNode](./kit/ListNode.go) +- [NestedInteger](./kit/NestedInteger.go) +- [PriorityQueue](./kit/PriorityQueue.go) +- [Queue](./kit/Queue.go) +- [Stack](./kit/Stack.go) +- [TreeNode](./kit/TreeNode.go) diff --git a/README_HEAD.md b/README_HEAD.md index 7bfeb3dc8..8fd086780 100644 --- a/README_HEAD.md +++ b/README_HEAD.md @@ -1,6 +1,7 @@ -# [LeetCode](https://leetcode.com)习题的Golang解答 -[![LeetCode](https://img.shields.io/badge/LeetCode-%s-blue.svg)](https://leetcode.com/%s/) -[![LeetCode Ranking](https://img.shields.io/badge/Ranking-%d-blue.svg)](https://leetcode.com/%s/) -[![Build Status](https://www.travis-ci.org/aQuaYi/LeetCode-in-Golang.svg?branch=master)](https://www.travis-ci.org/aQuaYi/LeetCode-in-Golang) -[![codecov](https://codecov.io/gh/aQuaYi/LeetCode-in-Golang/branch/master/graph/badge.svg)](https://codecov.io/gh/aQuaYi/LeetCode-in-Golang) +# [LeetCode](https://leetcode.com) 的 Go 解答 +[![LeetCode 主页](https://img.shields.io/badge/LeetCode-%s-blue.svg)](https://leetcode.com/%s/) +[![LeetCode 排名](https://img.shields.io/badge/Ranking-%d-blue.svg)](https://leetcode.com/%s/) +[![LeetCode 答题进度](https://img.shields.io/badge/Progress-%d%%25-blue.svg)](https://leetcode.com/%s/) +[![codecov](https://codecov.io/gh/aQuaYi/LeetCode-in-Go/branch/master/graph/badge.svg)](https://codecov.io/gh/aQuaYi/LeetCode-in-Go) +[![Build Status](https://www.travis-ci.org/aQuaYi/LeetCode-in-Go.svg?branch=master)](https://www.travis-ci.org/aQuaYi/LeetCode-in-Go) \ No newline at end of file diff --git a/README_TAIL.md b/README_TAIL.md index 8ed100814..70d0da0b8 100644 --- a/README_TAIL.md +++ b/README_TAIL.md @@ -1,15 +1,20 @@ - 以下题目,暂时不能使用 Golang 解答 -- [116. Populating Next Right Pointers in Each Node](https://leetcode.com/problems/populating-next-right-pointers-in-each-node/) -- [117. Populating Next Right Pointers in Each Node II](https://leetcode.com/problems/populating-next-right-pointers-in-each-node-ii/) +# helper - -## helper -[helper](./helper.v4)会帮助处理大部分琐碎的工作。 +[helper](./helper.v5) 会处理大部分琐碎的工作。 ## notes -[notes](./notes)记录了我答题过程中,对知识点的总结。 + +[notes](./notes) 记录了我答题过程中,对知识点的总结。 ## kit -在[kit](./kit)中添加了LeetCode常用的数据结构和处理函数: -1. 为[*ListNode](./kit/ListNode.go)添加了与[]int相互转换的函数,方便添加单元测试。使用方式可以参考[21. Merge Two Sorted Lists](./Algorithms/0021.merge-two-sorted-lists/merge-two-sorted-lists_test.go) -1. 为[*TreeNode](./kit/TreeNode.go)添加了与[]int相互转换的函数,方便添加单元测试。 \ No newline at end of file + +针对 LeetCode 中经常出现的以下数据结构,在 [kit](./kit) 中进行了定义,并添加了与 []int 相互转换的函数。利用 Go 1.9 新添加的 [type alias](https://github.com/golang/proposal/blob/master/design/18130-type-alias.md) 功能,易于添加单元测试。 + +- [Heap](./kit/Heap.go) +- [Interval](./kit/Interval.go) +- [ListNode](./kit/ListNode.go) +- [NestedInteger](./kit/NestedInteger.go) +- [PriorityQueue](./kit/PriorityQueue.go) +- [Queue](./kit/Queue.go) +- [Stack](./kit/Stack.go) +- [TreeNode](./kit/TreeNode.go) \ No newline at end of file diff --git a/helper.v4/README.md b/helper.v4/README.md deleted file mode 100644 index 5f4b7cc9e..000000000 --- a/helper.v4/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# helper - -## 功能 -1. 按照程序中设置的模板,生成习题解答文件夹,包括: - 1. README.md - 1. [题目].go - 1. [题目]_test.go -1. 统计已经解答题目,在`LeetCode-in-Golang/README.md`中生成 - 1. 标题下的LeetCode主页和LeetCode排名图标 - 1. 统计报表 - 1. 已完成题目的目录 - -## 使用方式 -1. 在命令行的本目录下,运行`make`,会自动生成程序。 -1. 在命令行的`LeetCode-in-Golang`目录下,运行`./helper`,会自动重新生成项目的`README.md` -1. 在命令行的`LeetCode-in-Golang`目录下,运行`./helper [题号]`,会自动生成相应的答题文件夹。 - -## 配置方法 -1. 在`.gitignore`中,添加一行`*.toml`。 -1. 在`LeetCode-in-Golang`目录下,添加文件`leetcode.toml`。 -1. 把以下内容中的`test`分别修改为你的leetcode用户名和密码后,复制到`leetcode.toml`中。 -```toml -Login="test" -Password="test" -``` diff --git a/helper.v4/leetcode.go b/helper.v4/leetcode.go deleted file mode 100644 index e871e909c..000000000 --- a/helper.v4/leetcode.go +++ /dev/null @@ -1,213 +0,0 @@ -package main - -import ( - "fmt" - "log" - "sort" - "strconv" - "strings" -) - -type leetcode struct { - Username string - Ranking int - - Categories categories - Problems problems -} - -func newLeetCode() *leetcode { - return &leetcode{ - Username: cfg.Login, - } -} - -func (l *leetcode) getRanking() { - temp := getRanking(l.Username) - - r, err := strconv.Atoi(temp) - if err != nil { - log.Fatalf("无法把 %s 转换成数字Ranking", temp) - } - - l.Ranking = r -} - -func (l *leetcode) totalCategory() { - t := category{ - Name: "Total", - } - - for _, c := range l.Categories { - t.Easy.Solved += c.Easy.Solved - t.Easy.Total += c.Easy.Total - t.Medium.Solved += c.Medium.Solved - t.Medium.Total += c.Medium.Total - t.Hard.Solved += c.Hard.Solved - t.Hard.Total += c.Hard.Total - t.Total.Solved += c.Total.Solved - t.Total.Total += c.Total.Total - } - - l.Categories = append(l.Categories, t) -} - -func (l *leetcode) update(d *data) { - l.check(d) - ps, e, m, h := countData(d) - l.Problems = append(l.Problems, ps...) - c := newCategory(d, e, m, h) - l.Categories = append(l.Categories, c) -} - -func (l *leetcode) check(d *data) { - if d.User != l.Username { - log.Fatalln("下载了非本人的数据。") - } - log.Printf("%s 通过检查", d.Name) -} - -func countData(d *data) (ps []problem, e, m, h int) { - for _, p := range d.Problems { - - if p.IsPaid { - continue - } - - temp := problem{ - ID: p.ID, - Dir: fmt.Sprintf("./%s/%04d.%s", d.Name, p.ID, p.TitleSlug), - Title: p.Title, - TitleSlug: p.TitleSlug, - PassRate: fmt.Sprintf("%d%%", p.ACs*100/p.Submitted), - Difficulty: p.Difficulty.Level, - IsAccepted: p.Status == "ac", - IsFavor: p.IsFavor, - IsNew: p.IsNew, - } - ps = append(ps, temp) - switch temp.Difficulty { - case 1: - e++ - case 2: - m++ - case 3: - h++ - default: - log.Fatalln("题目出现了第4种难度", p.ID, p.Title) - } - } - return -} - -type category struct { - Name string - Easy, Medium, Hard, Total count -} - -func (c category) String() string { - res := fmt.Sprintf("|**%s**|", strings.Title(c.Name)) - res += fmt.Sprintf("%d / %d|", c.Easy.Solved, c.Easy.Total) - res += fmt.Sprintf("%d / %d|", c.Medium.Solved, c.Medium.Total) - res += fmt.Sprintf("%d / %d|", c.Hard.Solved, c.Hard.Total) - res += fmt.Sprintf("%d / %d|", c.Total.Solved, c.Total.Total) - return res -} - -type categories []category - -func (cs categories) String() string { - res := fmt.Sprintln("|Category|Easy|Medium|Hard|Total|") - res += fmt.Sprintln("|:--|:--:|:--:|:--:|:--:|") - for _, c := range cs { - res += fmt.Sprintln(c) - } - - return res -} -func newCategory(d *data, e, m, h int) category { - c := category{ - Name: d.Name, - } - - c.Easy.Solved = d.ACEasy - c.Easy.Total = e - - c.Medium.Solved = d.ACMedium - c.Medium.Total = m - - c.Hard.Solved = d.ACHard - c.Hard.Total = h - - c.Total.Solved = d.ACEasy + d.ACMedium + d.ACHard - c.Total.Total = e + m + h - - return c -} - -type count struct { - Solved, Total int -} - -type problems []problem - -func (ps problems) Len() int { - return len(ps) -} - -func (ps problems) Less(i, j int) bool { - return ps[i].ID < ps[j].ID -} - -func (ps problems) Swap(i, j int) { - ps[i], ps[j] = ps[j], ps[i] -} - -func (ps problems) acceptedString() string { - sort.Sort(ps) - res := "|题号|题目|难度|总体通过率|收藏|\n" - res += "|:-:|:-|:-: | :-: | :-: |\n" - for _, p := range ps { - if p.IsAccepted { - res += fmt.Sprintln(p) - } - } - return res -} - -type problem struct { - ID int - Dir string - Title, TitleSlug string - PassRate string - Difficulty int - IsAccepted, IsFavor, IsNew bool -} - -func (p problem) link() string { - return fmt.Sprintf("https://leetcode.com/problems/%s/", p.TitleSlug) -} - -func (p problem) String() string { - res := fmt.Sprintf("|%d|", p.ID) - res += fmt.Sprintf(`[%s](%s)|`, p.Title, p.Dir) - res += fmt.Sprintf("%s|", degrees[p.Difficulty]) - res += fmt.Sprintf("%s|", p.PassRate) - f := "" - if p.IsFavor { - f = "❤" - } - res += fmt.Sprintf("%s|", f) - return res -} - -var degrees = map[int]string{ - 1: `☆`, - 2: `☆ ☆`, - 3: `☆ ☆ ☆`, -} - -func (p problem) page() string { - format := "https://leetcode.com/problems/%s" - return fmt.Sprintf(format, p.TitleSlug) -} diff --git a/helper.v4/main.go b/helper.v4/main.go deleted file mode 100644 index 4d0de2d7e..000000000 --- a/helper.v4/main.go +++ /dev/null @@ -1,76 +0,0 @@ -package main - -import ( - "fmt" - "log" - "os" - "strconv" - - "github.com/BurntSushi/toml" -) - -// 程序辅助设置 -const ( - VERSION = "4.1.0" - USAGE = `使用方法: - 1. 运行 helper 会重新生成项目的README.md。 - 2. 运行 helper 123 会生成第123题的答题文件夹。` -) - -var problemNum int -var cfg config -var cfgFile = "leetcode.toml" -var lcFile = "leetcode.json" - -func init() { - // 启动时,导入配置 - if _, err := toml.DecodeFile(cfgFile, &cfg); err != nil { - log.Fatalf(err.Error()) - } - log.Printf("Hi, %s. \n", cfg.Login) - -} - -func main() { - if len(os.Args) > 1 { - switch os.Args[1] { - case "-v", "-version": - fmt.Printf("helper version %s\n", VERSION) - return - case "-h", "-help": - fmt.Println(USAGE) - return - } - - var err error - if problemNum, err = strconv.Atoi(os.Args[1]); err != nil { - log.Fatalln(err) - } - } - - // 由于网络原因,有时候 signin 比较慢 - signin() - - if problemNum > 0 { - lc, err := readLeetCodeRecord() - if err != nil { - log.Fatalln("读取 LeetCode 记录失败: ", err) - } - makeProblemDir(lc.Problems, problemNum) - return - } - - categories := []string{ - "Algorithms", - // "database", - "Draft", - // "operating-system", - // "shell", - // "system-design", - } - - lc := update(categories) - - makeREADME(lc) - -} diff --git a/helper.v4/readme.go b/helper.v4/readme.go deleted file mode 100644 index ca044d46a..000000000 --- a/helper.v4/readme.go +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "fmt" - "io/ioutil" - "log" - "os" -) - -func makeREADME(lc *leetcode) { - file := "README.md" - os.Remove(file) - - template := `%s - -## 答题进度:%d%% -> 仅含免费题 - -%s -## 参考解答 -%s - -%s -` - headFormat := string(read("README_HEAD.md")) - head := fmt.Sprintf(headFormat, lc.Username, lc.Username, lc.Ranking, lc.Username) - - // 没有提供 Golang 解答方法的题目 - canNotSolve := 2 - acceptedPercent := lc.Categories[len(lc.Categories)-1].Total.Solved * 100 / (lc.Categories[len(lc.Categories)-1].Total.Total - canNotSolve) - - count := lc.Categories.String() - - accepted := lc.Problems.acceptedString() - - tail := read("README_TAIL.md") - content := fmt.Sprintf(template, head, acceptedPercent, count, accepted, tail) - - err := ioutil.WriteFile(file, []byte(content), 0755) - if err != nil { - log.Fatal(err) - } -} diff --git a/helper.v4/Makefile b/helper.v5/Makefile similarity index 60% rename from helper.v4/Makefile rename to helper.v5/Makefile index 67c3b113a..a10d3efbd 100644 --- a/helper.v4/Makefile +++ b/helper.v5/Makefile @@ -1,6 +1,6 @@ build: @go build - @mv helper.v4 ../helper + @mv helper.v5 ../helper test: @go build diff --git a/helper.v5/README.md b/helper.v5/README.md new file mode 100644 index 000000000..6f04d5b3b --- /dev/null +++ b/helper.v5/README.md @@ -0,0 +1,31 @@ +# helper + +## 功能 + +1. 按照程序中设置的模板,生成习题解答文件夹,包括: + 1. README.md + 1. [题目].go + 1. [题目]_test.go +1. 统计已经解答题目,在`LeetCode-in-Go/README.md`中自动生成 + 1. 答题进度,并生成图标 + 1. LeetCode 排名,并生成图标 + 1. 按难度分类的答题进度统计表 + 1. 已完成题目的目录 + 1. 无法使用 Go 解答的题目列表 +1. 检查题目是否能够用 Go 语言解答,不能解答题目的题号,会保存起来。 + +## 使用方式 + +1. 在命令行的本目录下,运行`make`,会自动生成程序。 +1. 在命令行的`LeetCode-in-Go`目录下,运行`./helper`,可以查看程序的帮助文件。 + +## 配置方法 + +1. 在`.gitignore`中,添加一行`*.toml`。 +1. 在`LeetCode-in-Go`目录下,添加文本文件`leetcode.toml`。 +1. 把以下内容中的`test`分别修改为你的 leetcode `用户名`和`密码`后,复制到`leetcode.toml`中。 + +```toml +Login="test" +Password="test" +``` diff --git a/helper.v5/check.go b/helper.v5/check.go new file mode 100644 index 000000000..1a0cf5b44 --- /dev/null +++ b/helper.v5/check.go @@ -0,0 +1,69 @@ +package main + +import ( + "log" + "sort" +) + +func checkAvailable() { + lc := newLeetCode() + + problems := lc.Problems + + list := make([]int, 0, len(problems)) + + for _, p := range problems { + if !p.IsAccepted && !isAvailable(p) { + list = append(list, p.ID) + } + } + + sort.Ints(list) + new := &unavailable{List: list} + + showUnavailableChange(new) + + new.save() +} + +func showUnavailableChange(new *unavailable) { + old := readUnavailable() + + size := max(new.List[len(new.List)-1], old.List[len(old.List)-1]) + + for i := 0; i <= size; i++ { + newHas := new.has(i) + oldHas := old.has(i) + + if newHas && !oldHas { + log.Printf("新发现:第 %d 题,无法使用 Go 解答", i) + } + + if !newHas && oldHas { + log.Printf("好消息:第 %d 题,可以使用 Go 解答了", i) + } + } +} + +func isAvailable(p problem) bool { + res := true + + // 若本题无法使用 Go 语言解答,getFunction 会 panic + // 此 defer 就是用于处理此种情况 + defer func() { + if err := recover(); err != nil { + res = false + } + }() + + getFunction(p.link()) + + return res +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} diff --git a/helper.v5/leetcode.go b/helper.v5/leetcode.go new file mode 100644 index 000000000..c280436de --- /dev/null +++ b/helper.v5/leetcode.go @@ -0,0 +1,293 @@ +package main + +import ( + "encoding/json" + "fmt" + "io/ioutil" + "log" + "sort" + + "github.com/aQuaYi/GoKit" +) + +type leetcode struct { + Username string + + Problems problems + Algorithms category + + Progress int + + Ranking int +} + +func newLeetCode() *leetcode { + lc := &leetcode{} + + lc.Username = cfg.Login + + lc.Problems, lc.Algorithms = newAlgorithms() + + lc.Progress = lc.Algorithms.Total.Solved * 100 / lc.Algorithms.Total.Total + + lc.Ranking = getRanking(lc.Username) + + return lc +} + +func newAlgorithms() (problems, category) { + d := getCategoryData("Algorithms") + check(d) + ps, e, m, h := countData(d) + c := newCategory(d, e, m, h) + return ps, c +} + +func check(d *data) { + if d.User != cfg.Login { + log.Fatalln("下载了非本人的数据。") + } + log.Printf("%s 通过检查", d.Name) +} + +func countData(d *data) (ps []problem, e, m, h int) { + // 获取不可用的题目题号清单 + u := readUnavailable() + + for _, p := range d.Problems { + // 删除掉付费题 + if p.IsPaid { + continue + } + + temp := problem{ + ID: p.ID, + Dir: fmt.Sprintf("./%s/%04d.%s", d.Name, p.ID, p.TitleSlug), + Title: p.Title, + TitleSlug: p.TitleSlug, + // p.Submitted + 1 是因为刚刚添加的新题的 submitted 为 0 + PassRate: fmt.Sprintf("%d%%", p.ACs*100/(p.Submitted+1)), + Difficulty: p.Difficulty.Level, + IsAccepted: p.Status == "ac", + IsFavor: p.IsFavor, + IsNew: p.IsNew, + IsAvailable: !u.has(p.ID), + } + + ps = append(ps, temp) + + // 只统计可用的题目 + if temp.IsAvailable { + switch temp.Difficulty { + case 1: + e++ + case 2: + m++ + case 3: + h++ + default: + log.Fatalln("题目出现了第4种难度", p.ID, p.Title) + } + } + } + return +} + +type category struct { + Name string + Easy, Medium, Hard, Total count +} + +func (c category) progressTable() string { + res := fmt.Sprintln("| |Easy|Medium|Hard|Total|") + res += fmt.Sprintln("|:---:|:---:|:---:|:---:|:---:|") + + res += fmt.Sprintf("|**Accepted**|%d|", c.Easy.Solved) + res += fmt.Sprintf("%d|", c.Medium.Solved) + res += fmt.Sprintf("%d|", c.Hard.Solved) + res += fmt.Sprintf("%d|\n", c.Total.Solved) + + res += fmt.Sprintf("|**Total**|%d|", c.Easy.Total) + res += fmt.Sprintf("%d|", c.Medium.Total) + res += fmt.Sprintf("%d|", c.Hard.Total) + res += fmt.Sprintf("%d|\n", c.Total.Total) + + return res +} + +func newCategory(d *data, e, m, h int) category { + c := category{} + + c.Easy.Solved = d.ACEasy + c.Easy.Total = e + + c.Medium.Solved = d.ACMedium + c.Medium.Total = m + + c.Hard.Solved = d.ACHard + c.Hard.Total = h + + c.Total.Solved = d.ACEasy + d.ACMedium + d.ACHard + c.Total.Total = e + m + h + + return c +} + +type count struct { + Solved, Total int +} + +type problems []problem + +func (ps problems) Len() int { + return len(ps) +} + +func (ps problems) Less(i, j int) bool { + return ps[i].ID < ps[j].ID +} + +func (ps problems) Swap(i, j int) { + ps[i], ps[j] = ps[j], ps[i] +} + +func (ps problems) accepted() problems { + res := make([]problem, 0, len(ps)) + for _, p := range ps { + if p.IsAccepted { + res = append(res, p) + } + } + return res +} + +func (ps problems) available() problems { + res := make([]problem, 0, len(ps)) + for _, p := range ps { + if p.IsAvailable { + res = append(res, p) + } + } + return res +} + +func (ps problems) unavailable() problems { + res := make([]problem, 0, len(ps)) + for _, p := range ps { + if !p.IsAvailable { + res = append(res, p) + } + } + return res +} + +func (ps problems) table() string { + sort.Sort(ps) + res := "|题号|题目|通过率|难度|收藏|\n" + res += "|:-:|:-|:-: | :-: | :-: |\n" + for _, p := range ps { + res += p.tableLine() + } + return res +} + +func (ps problems) list() string { + sort.Sort(ps) + res := "" + for _, p := range ps { + res += p.listLine() + } + return res +} + +type problem struct { + ID int + Dir string + Title, TitleSlug string + PassRate string + Difficulty int + IsAccepted, IsFavor, IsNew, IsAvailable bool +} + +func (p problem) link() string { + return fmt.Sprintf("https://leetcode.com/problems/%s/", p.TitleSlug) +} + +func (p problem) tableLine() string { + res := fmt.Sprintf("|%d|", p.ID) + if p.IsAccepted { + res += fmt.Sprintf(`[%s](%s)|`, p.Title, p.Dir) + } else { + res += fmt.Sprintf(` * %s|`, p.Title) + } + res += fmt.Sprintf("%s|", p.PassRate) + res += fmt.Sprintf("%s|", degrees[p.Difficulty]) + f := " " + if p.IsFavor { + f = "[❤](https://leetcode.com/list/oussv5j)" + } + res += fmt.Sprintf("%s|\n", f) + return res +} + +var degrees = map[int]string{ + 1: "Easy", + 2: "Medium", + 3: "Hard", +} + +func (p problem) listLine() string { + return fmt.Sprintf("- [%d.%s](%s)\n", p.ID, p.Title, p.link()) +} + +type unavailable struct { + List []int +} + +func readUnavailable() *unavailable { + if !GoKit.Exist(unavailableFile) { + log.Printf("%s 不存在,没有不能解答的题目", unavailableFile) + + // TODO: 清除 return 中 []int 的内容 + return &unavailable{[]int{116, 117, 133, 138, 141, 142, 151, 160, 173, 190, 191, 222}} + } + + raw := read(unavailableFile) + u := unavailable{} + if err := json.Unmarshal(raw, &u); err != nil { + log.Fatalf("获取 %s 失败:%s", unavailableFile, err) + } + + return &u +} + +func (u *unavailable) add(id int) { + if !u.has(id) { + u.List = append(u.List, id) + sort.Ints(u.List) + u.save() + } + log.Printf("第 %d 题,无法使用 Go 语言解答", id) +} + +func (u *unavailable) save() { + raw, err := json.Marshal(u) + if err != nil { + log.Fatal("无法把 unavailable 的数据转换成[]bytes: ", err) + } + + if err = ioutil.WriteFile(unavailableFile, raw, 0666); err != nil { + log.Fatal("无法把 Marshal 后的 unavailable 保存到文件: ", err) + } + + log.Println("最新的 unavailable 记录已经保存。") +} + +func (u *unavailable) has(id int) bool { + for _, num := range u.List { + if id == num { + return true + } + } + return false +} diff --git a/helper.v5/main.go b/helper.v5/main.go new file mode 100644 index 000000000..b157730cf --- /dev/null +++ b/helper.v5/main.go @@ -0,0 +1,65 @@ +package main + +import ( + "fmt" + "log" + "os" +) + +// 程序辅助设置 +const ( + VERSION = "5.7.2" + + configFile = "leetcode.toml" + leetCodeFile = "leetcode.json" + unavailableFile = "unavailable.json" + tasksFile = "tasks.txt" + + USAGE = `使用方法: + 1. helper readme : 重新生成项目的 README.md 文件 + 2. helper n : 生成第 n 题的答题文件夹 (暂时不可用) + 3. helper tasks : 为未完成的题目,生成任务清单 + 4. helper check : 检查出不能用 Go 解答的题目,并保存题号到 unavailable.json + 5. helper v : 查看 helper 的版本` +) + +// cfg 用于保存 LeetCode.com 的用户名和密码 +// 程序中会有多处地方需要核对 用户名 ,所以设置成全局变量 +var cfg config + +func main() { + if len(os.Args) == 1 { + fmt.Println(USAGE) + fmt.Printf("helper version %s\n", VERSION) + return + } + + if os.Args[1] == "v" || os.Args[1] == "version" { + fmt.Printf("helper version %s\n", VERSION) + return + } + + // 由于网络原因,有时候 signin 比较慢 + signin() + + switch os.Args[1] { + case "h", "help": + fmt.Println(USAGE) + case "check": + log.Println("~~ 开始检查剩余的题目 ~~") + checkAvailable() + log.Println("~~ 检查完成 ~~") + case "readme", "r": + log.Println("~~ 开始重制 README.md 文档 ~~") + rebuildReadme() + log.Println("~~ 重制 READ.md 完成 ~~") + case "tasks", "t": + log.Println("~~ 开始制作任务清单 ~~") + printTasks() + log.Println("~~ 制作任务清单完成 ~~") + default: + log.Println("~~ 开始生成答题文件夹 ~~") + buildProblemDir(os.Args[1]) + log.Println("~~ 已经生成答题文件夹 ~~") + } +} diff --git a/helper.v4/net.go b/helper.v5/net.go similarity index 80% rename from helper.v4/net.go rename to helper.v5/net.go index 0d83624ce..2ec0406b1 100644 --- a/helper.v4/net.go +++ b/helper.v5/net.go @@ -7,8 +7,10 @@ import ( "log" "net/http" "regexp" + "strconv" "strings" + "github.com/BurntSushi/toml" "github.com/mozillazg/request" ) @@ -21,10 +23,17 @@ var req *request.Request // 登录 leetcode func signin() { + // 先导入配置 + if _, err := toml.DecodeFile(configFile, &cfg); err != nil { + log.Fatalf(err.Error()) + } + log.Printf("Hi, %s. I'm %s\n", cfg.Login, VERSION) + log.Println("正在登录中...") - + // 对 req 赋值 req = request.NewRequest(new(http.Client)) + // 配置request req.Headers = map[string]string{ "Accept-Encoding": "", @@ -44,10 +53,11 @@ func signin() { if err = login(req); err != nil { log.Fatal(err) } + log.Println("成功登录") } -func getData(name string) *data { +func getCategoryData(name string) *data { URL := url(name) raw := getRaw(URL) @@ -65,11 +75,14 @@ func url(s string) string { return fmt.Sprintf(format, s) } -func getRanking(username string) string { +func getRanking(username string) int { URL := fmt.Sprintf("https://leetcode.com/%s/", username) data := getRaw(URL) str := string(data) + + // fmt.Println(str) + i := strings.Index(str, "ng-init") j := i + strings.Index(str[i:], "ng-cloak") str = str[i:j] @@ -78,16 +91,31 @@ func getRanking(username string) string { j = strings.Index(str, ")") str = str[i:j] + // fmt.Println("2\n", str) + strs := strings.Split(str, ",") - ans := strs[5] - i = strings.Index(ans, "'") - j = 2 + strings.Index(ans[2:], "'") + str = strs[6] - return ans[i+1 : j] + // fmt.Println("1\n", str) + + i = strings.Index(str, "'") + j = 2 + strings.Index(str[2:], "'") + + // fmt.Println("0\n", str) + + str = str[i+1 : j] + + r, err := strconv.Atoi(str) + if err != nil { + log.Fatalf("无法把 %s 转换成数字Ranking", str) + } + + return r } func getRaw(URL string) []byte { log.Printf("开始下载 %s 的数据", URL) + resp, err := req.Get(URL) if err != nil { log.Fatal("getRaw: Get Error: " + err.Error()) diff --git a/helper.v4/problem.go b/helper.v5/problem.go similarity index 54% rename from helper.v4/problem.go rename to helper.v5/problem.go index 756f085cf..ae4f8becc 100644 --- a/helper.v4/problem.go +++ b/helper.v5/problem.go @@ -5,14 +5,35 @@ import ( "io/ioutil" "log" "os" + "os/exec" + "strconv" "strings" "syscall" + "time" "github.com/aQuaYi/GoKit" "github.com/PuerkitoBio/goquery" ) +func buildProblemDir(s string) { + var err error + // 获取问题编号 + problemNum := 0 + if problemNum, err = strconv.Atoi(os.Args[1]); err != nil { + log.Fatalln("无法获取问题编号:", err) + } + + // 需要创建答题文件夹 + if problemNum > 0 { + lc, err := readLeetCodeRecord() + if err != nil { + log.Fatalln("读取 LeetCode 记录失败: ", err) + } + makeProblemDir(lc.Problems, problemNum) + } +} + func makeProblemDir(ps problems, problemNum int) { var pb problem var isFound bool @@ -20,6 +41,9 @@ func makeProblemDir(ps problems, problemNum int) { // 根据题号,获取题目信息 for _, p := range ps { if p.ID == problemNum { + if !p.IsAvailable { + log.Fatalln(`此题被标记为"不能使用 Go 语言解答"。请核查后,修改 unavailable.json 中的记录`) + } pb = p isFound = true break @@ -27,26 +51,23 @@ func makeProblemDir(ps problems, problemNum int) { } if !isFound { - log.Printf("没有发现 %d 题,存在以下可能:1.此题不存在;2.需要付费;3.不在已关注的种类中。", problemNum) + log.Printf("没有发现第 %d 题,存在以下可能:1.此题不存在;2.此题需要付费。", problemNum) return } + // 创建目录 build(pb) } func build(p problem) { - if p.IsAccepted && GoKit.Exist(p.Dir) { - log.Fatalf("第 %d 题已经accepted,请**删除**或**重命名** %s 文件夹后,再尝试。", p.ID, p.Dir) - } - - // 对于没有 accepted 的题目,直接删除重建 - if err := os.RemoveAll(p.Dir); err != nil { - log.Fatalln("无法删除目录", p.Dir) + if GoKit.Exist(p.Dir) { + log.Fatalf("第 %d 题的文件夹已经存在,请**移除** %s 文件夹后,再尝试。", p.ID, p.Dir) } mask := syscall.Umask(0) defer syscall.Umask(mask) + // 创建目录 err := os.Mkdir(p.Dir, 0755) if err != nil { log.Fatalf("无法创建目录,%s :%s", p.Dir, err) @@ -56,10 +77,55 @@ func build(p problem) { creatREADME(p) - fc, fcName, para, ans := getFunction(p.link()) + // // 若本题无法使用 Go 语言解答,getFunction 会 panic + // // 此 defer 就是用于处理此种情况 + // defer func() { + // if err := recover(); err != nil { + // log.Printf("获取第 %d 题的 getFunction() 出错:%s", p.ID, err) + // // 添加 p.ID 到 unavailableFile + // u := readUnavailable() + // u.add(p.ID) + // // 删除刚刚创建的目录 + // if err := os.RemoveAll(p.Dir); err != nil { + // log.Fatalln("无法删除目录", p.Dir) + // } + // } + // }() + // fc, fcName, para, ans := getFunction(p.link()) + + fcName := "fn" + para := "para int" + ans := "int" + + fc := fmt.Sprintf("func %s(%s) %s {\nres :=0 \n\nreturn res\n}", fcName, para, ans) + creatGo(p, fc) creatGoTest(p, fcName, para, ans) + // 利用 chrome 打开题目 submissions 页面 + go func() { + cmd := exec.Command("google-chrome", "https://leetcode.com/submissions/") + _, err := cmd.Output() + if err != nil { + panic(err.Error()) + } + }() + + log.Println("等待 10 秒,打开题目页面") + time.Sleep(10 * time.Second) + + // 利用 chrome 打开题目页面 + go func() { + cmd := exec.Command("google-chrome", p.link()) + _, err := cmd.Output() + if err != nil { + panic(err.Error()) + } + }() + + log.Println("正在打开题目页面") + time.Sleep(2 * time.Second) + log.Printf("%d.%s 的文件夹,创建完毕。\n", p.ID, p.Title) } @@ -67,6 +133,7 @@ func creatREADME(p problem) { fileFormat := `# [%d. %s](%s) ## 题目 + %s ## 解题思路 @@ -74,7 +141,8 @@ func creatREADME(p problem) { 见程序注释 ` - questionDescription := getQuestionDescription(p.link()) + // questionDescription := getQuestionDescription(p.link()) + questionDescription := "" content := fmt.Sprintf(fileFormat, p.ID, p.Title, p.link(), questionDescription) @@ -93,7 +161,10 @@ func getQuestionDescription(URL string) string { log.Fatal(err) } + fmt.Println(doc.Find("div.question-description")) + return strings.TrimSpace(doc.Find("div.question-description").Text()) + } func getFunction(URL string) (fc, fcName, para, ansType string) { @@ -127,7 +198,7 @@ func getFunction(URL string) (fc, fcName, para, ansType string) { para = strings.Replace(fc[i+1:j], ",", "\n", -1) ansType = fc[j+1 : k] - fc = fc[:k] + "{\n\n}" + fc = fc[:k] + "{\n\tres :=\n\n\treturn res\n}" return } @@ -147,42 +218,57 @@ func creatGo(p problem, function string) { } func creatGoTest(p problem, fcName, para, ansType string) { - fileFormat := `package %s + testCasesFormat := `var tcs = []struct { + %s + ans %s +}{ -import ( - "fmt" - "testing" - "github.com/stretchr/testify/assert" -) + + // 可以有多个 testcase +}` + + testCases := fmt.Sprintf(testCasesFormat, para, ansType) + testFuncFormat := ` func Test_%s(t *testing.T) { ast := assert.New(t) + + for _, tc := range tcs { + fmt.Printf("~~%s~~\n", tc) + ast.Equal(tc.ans, %s(%s), "输入:%s", tc) + } +}` + tcPara := getTcPara(para) + testFunc := fmt.Sprintf(testFuncFormat, fcName, `%v`, fcName, tcPara, `%v`) - // tcs is testcase slice - tcs := []struct { - %s - ans %s - }{ + benchFuncFormat := ` +func Benchmark_%s(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, tc := range tcs { + %s(%s) + } + } +}` + benchFunc := fmt.Sprintf(benchFuncFormat, fcName, fcName, tcPara) - { - - , - }, + fileFormat := `package %s - // 可以多个 testcase - } +import ( + "fmt" + "testing" - for _, tc := range tcs { - fmt.Printf("~~%s~~\n", tc) + "github.com/stretchr/testify/assert" +) - ast.Equal(tc.ans, %s(%s), "输入:%s", tc) - } -} +// tcs is testcase slice +%s +%s +%s ` - tcPara := getTcPara(para) - content := fmt.Sprintf(fileFormat, p.packageName(), p.packageName(), para, ansType, `%v`, fcName, tcPara, `%v`) + content := fmt.Sprintf(fileFormat, p.packageName(), testCases, testFunc, benchFunc) + filename := fmt.Sprintf("%s/%s_test.go", p.Dir, p.TitleSlug) err := ioutil.WriteFile(filename, []byte(content), 0755) diff --git a/helper.v5/readme.go b/helper.v5/readme.go new file mode 100644 index 000000000..033bfce95 --- /dev/null +++ b/helper.v5/readme.go @@ -0,0 +1,62 @@ +package main + +import ( + "fmt" + "io/ioutil" + "log" + "os" +) + +func rebuildReadme() { + lc := lastestLeetCode() + makeREADME(lc) +} + +func makeREADME(lc *leetcode) { + file := "README.md" + os.Remove(file) + + // 更新 README.md 的内容 + template := `%s + +## 进度 + +> 统计规则:1.免费题,2.算法题,3.能用 Go 解答 + +%s +## 题解 + +%s +以下免费的算法题,暂时不能使用 Go 解答 + +%s +#%s +` + + head := getHead(lc) + + progressTable := lc.Algorithms.progressTable() + + availableTable := lc.Problems.available().table() + + unavailList := lc.Problems.unavailable().list() + + tail := read("README_TAIL.md") + + content := fmt.Sprintf(template, head, progressTable, availableTable, unavailList, tail) + + // 保存 README.md 文件 + err := ioutil.WriteFile(file, []byte(content), 0755) + if err != nil { + log.Fatal(err) + } +} + +func getHead(lc *leetcode) string { + headFormat := string(read("README_HEAD.md")) + return fmt.Sprintf(headFormat, + lc.Username, lc.Username, + lc.Ranking, lc.Username, + lc.Progress, lc.Username, + ) +} diff --git a/helper.v5/tasks.go b/helper.v5/tasks.go new file mode 100644 index 000000000..3f948c7f3 --- /dev/null +++ b/helper.v5/tasks.go @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + "io/ioutil" + "log" +) + +func printTasks() { + lc := lastestLeetCode() + makeTasksFile(lc.Problems) +} + +func makeTasksFile(problems problems) { + content := "" + for _, p := range problems { + if !p.IsAccepted && p.IsAvailable { + content = fmt.Sprintf("%d - #%d分 - %s - %s \n", p.ID, p.Difficulty, p.PassRate, p.Title) + content + } + } + // 保存 taskFile 文件 + err := ioutil.WriteFile(tasksFile, []byte(content), 0755) + if err != nil { + log.Fatal(err) + } +} diff --git a/helper.v4/data.go b/helper.v5/update.go similarity index 72% rename from helper.v4/data.go rename to helper.v5/update.go index 3c32cc0c9..5605c4e12 100644 --- a/helper.v4/data.go +++ b/helper.v5/update.go @@ -6,57 +6,29 @@ import ( "fmt" "io/ioutil" "log" - "sort" + "os" "github.com/aQuaYi/GoKit" ) -func update(categories []string) *leetcode { - newLC := lastest(categories) - oldLC, err := readLeetCodeRecord() - if err != nil { - log.Println("LeetCode 记录读取失败,无法与新记录对比:", err) - } else { - diff(newLC, oldLC) - } +func lastestLeetCode() *leetcode { + newLC := newLeetCode() + + showChange(newLC) saveLC(newLC) return newLC } -func lastest(categories []string) *leetcode { - lc := newLeetCode() - for _, c := range categories { - d := getData(c) - lc.update(d) - } - - lc.totalCategory() - lc.getRanking() - - sort.Sort(lc.Problems) - - return lc -} - -func readLeetCodeRecord() (*leetcode, error) { - if !GoKit.Exist(lcFile) { - msg := fmt.Sprintf("%s 不存在", lcFile) - return nil, errors.New(msg) - } - - raw := read(lcFile) - lc := leetcode{} - if err := json.Unmarshal(raw, &lc); err != nil { - msg := fmt.Sprintf("获取 %s 失败:%s", lcFile, err) - return nil, errors.New(msg) +func showChange(new *leetcode) { + // 获取 oldLC + old, err := readLeetCodeRecord() + if err != nil { + log.Println("LeetCode 记录读取失败,无法与新记录对比:", err) + return } - return &lc, nil -} - -func diff(new, old *leetcode) { // 对比 ranking nr, or := new.Ranking, old.Ranking if nr > 0 && or > 0 { @@ -68,11 +40,10 @@ func diff(new, old *leetcode) { } else { log.Printf("当前排名 %d", nr) } + // 对比 已完成的问题 lenNew := len(new.Problems) lenOld := len(old.Problems) - // TODO: 处理数据错位问题 - // isOrderChanged := false isChanged := false i := 0 @@ -80,12 +51,12 @@ func diff(new, old *leetcode) { n, o := new.Problems[i], old.Problems[i] if n.ID != o.ID { - log.Println(n, o) - log.Fatalln("LeetCode 的 Problems 数据出现错位。") + os.Remove("leetcode.json") + log.Fatalln("LeetCode 的 Problems 数据出现错位。已经删除 leetcode.json。 请重试") } if n.IsAccepted == true && o.IsAccepted == false { - log.Printf("新完成 %d %s", n.ID, n.Title) + log.Printf("~新完成~ %d.%s", n.ID, n.Title) isChanged = true } @@ -97,17 +68,33 @@ func diff(new, old *leetcode) { } for i < lenNew { - log.Printf("出现新题: %d %s", new.Problems[i].ID, new.Problems[i].Title) + log.Printf("新题: %d.%s", new.Problems[i].ID, new.Problems[i].Title) i++ } } +func readLeetCodeRecord() (*leetcode, error) { + if !GoKit.Exist(leetCodeFile) { + msg := fmt.Sprintf("%s 不存在", leetCodeFile) + return nil, errors.New(msg) + } + + raw := read(leetCodeFile) + lc := leetcode{} + if err := json.Unmarshal(raw, &lc); err != nil { + msg := fmt.Sprintf("获取 %s 失败:%s", leetCodeFile, err) + return nil, errors.New(msg) + } + + return &lc, nil +} + func saveLC(lc *leetcode) { raw, err := json.Marshal(lc) if err != nil { log.Fatal("无法把Leetcode数据转换成[]bytes: ", err) } - if err = ioutil.WriteFile(lcFile, raw, 0666); err != nil { + if err = ioutil.WriteFile(leetCodeFile, raw, 0666); err != nil { log.Fatal("无法把Marshal后的lc保存到文件: ", err) } diff --git a/helper.v4/util.go b/helper.v5/util.go similarity index 78% rename from helper.v4/util.go rename to helper.v5/util.go index d748dc2ab..20e655eb9 100644 --- a/helper.v4/util.go +++ b/helper.v5/util.go @@ -5,6 +5,8 @@ import ( "os" ) +// read 负责读取文件 +// 这是一个通用的方法 func read(path string) []byte { file, err := os.Open(path) if err != nil { diff --git a/kit/Heap.go b/kit/Heap.go new file mode 100644 index 000000000..fa44e2183 --- /dev/null +++ b/kit/Heap.go @@ -0,0 +1,29 @@ +package kit + +// intHeap 实现了 heap 的接口 +type intHeap []int + +func (h intHeap) Len() int { + return len(h) +} + +func (h intHeap) Less(i, j int) bool { + return h[i] < h[j] +} + +func (h intHeap) Swap(i, j int) { + h[i], h[j] = h[j], h[i] +} +func (h *intHeap) Push(x interface{}) { + // Push 使用 *h,是因为 + // Push 增加了 h 的长度 + *h = append(*h, x.(int)) +} + +func (h *intHeap) Pop() interface{} { + // Pop 使用 *h ,是因为 + // Pop 减短了 h 的长度 + res := (*h)[len(*h)-1] + *h = (*h)[:len(*h)-1] + return res +} diff --git a/kit/Heap_test.go b/kit/Heap_test.go new file mode 100644 index 000000000..bf4f29c11 --- /dev/null +++ b/kit/Heap_test.go @@ -0,0 +1,30 @@ +package kit + +import ( + "container/heap" + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_intHeap(t *testing.T) { + ast := assert.New(t) + + ih := new(intHeap) + heap.Init(ih) + + heap.Push(ih, 1) + heap.Pop(ih) + + begin, end := 0, 10 + for i := begin; i < end; i++ { + heap.Push(ih, i) + ast.Equal(0, (*ih)[0], "插入 %d 后的最小值却是 %d,ih=%v", i, (*ih)[0], (*ih)) + } + + for i := begin; i < end; i++ { + fmt.Println(i, *ih) + ast.Equal(i, heap.Pop(ih), "Pop 后 ih=%v", (*ih)) + } +} diff --git a/kit/Interval.go b/kit/Interval.go new file mode 100644 index 000000000..30f2c9f74 --- /dev/null +++ b/kit/Interval.go @@ -0,0 +1,30 @@ +package kit + +// Interval 提供区间表示 +type Interval struct { + Start int + End int +} + +// Interval2Ints 把 Interval 转换成 整型切片 +func Interval2Ints(i Interval) []int { + return []int{i.Start, i.End} +} + +// IntervalSlice2Intss 把 []Interval 转换成 [][]int +func IntervalSlice2Intss(is []Interval) [][]int { + res := make([][]int, 0, len(is)) + for i := range is { + res = append(res, Interval2Ints(is[i])) + } + return res +} + +// Intss2IntervalSlice 把 [][]int 转换成 []Interval +func Intss2IntervalSlice(intss [][]int) []Interval { + res := make([]Interval, 0, len(intss)) + for _, ints := range intss { + res = append(res, Interval{Start: ints[0], End: ints[1]}) + } + return res +} diff --git a/kit/Interval_test.go b/kit/Interval_test.go new file mode 100644 index 000000000..87a562e6c --- /dev/null +++ b/kit/Interval_test.go @@ -0,0 +1,59 @@ +package kit + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_Interval2Ints(t *testing.T) { + ast := assert.New(t) + + actual := Interval2Ints(Interval{Start: 1, End: 2}) + expected := []int{1, 2} + ast.Equal(expected, actual) +} + +func Test_IntervalSlice2Intss(t *testing.T) { + ast := assert.New(t) + + actual := IntervalSlice2Intss( + []Interval{ + Interval{ + Start: 1, + End: 2, + }, + Interval{ + Start: 3, + End: 4, + }, + }, + ) + expected := [][]int{ + []int{1, 2}, + []int{3, 4}, + } + + ast.Equal(expected, actual) +} +func Test_Intss2IntervalSlice(t *testing.T) { + ast := assert.New(t) + + expected := []Interval{ + Interval{ + Start: 1, + End: 2, + }, + Interval{ + Start: 3, + End: 4, + }, + } + actual := Intss2IntervalSlice([][]int{ + []int{1, 2}, + []int{3, 4}, + }, + ) + + ast.Equal(expected, actual) +} diff --git a/kit/ListNode.go b/kit/ListNode.go index 6a3f092c4..8b778e066 100644 --- a/kit/ListNode.go +++ b/kit/ListNode.go @@ -11,8 +11,8 @@ type ListNode struct { Next *ListNode } -// List2Slice convert List to []int -func List2Slice(head *ListNode) []int { +// List2Ints convert List to []int +func List2Ints(head *ListNode) []int { // 链条深度限制,链条深度超出此限制,会 panic limit := 100 @@ -33,8 +33,8 @@ func List2Slice(head *ListNode) []int { return res } -// Slice2List convert []int to List -func Slice2List(nums []int) *ListNode { +// Ints2List convert []int to List +func Ints2List(nums []int) *ListNode { if len(nums) == 0 { return nil } diff --git a/kit/ListNode_test.go b/kit/ListNode_test.go index ba673abf4..ed2501edd 100644 --- a/kit/ListNode_test.go +++ b/kit/ListNode_test.go @@ -8,7 +8,7 @@ import ( func Test_l2s(t *testing.T) { ast := assert.New(t) - ast.Equal([]int{}, List2Slice(nil), "输入nil,没有返回[]int{}") + ast.Equal([]int{}, List2Ints(nil), "输入nil,没有返回[]int{}") one2three := &ListNode{ Val: 1, @@ -19,18 +19,18 @@ func Test_l2s(t *testing.T) { }, }, } - ast.Equal([]int{1, 2, 3}, List2Slice(one2three), "没有成功地转换成[]int") + ast.Equal([]int{1, 2, 3}, List2Ints(one2three), "没有成功地转换成[]int") limit := 100 - overLimitList := Slice2List(make([]int, limit+1)) - ast.Panics(func() { List2Slice(overLimitList) }, "转换深度超过 %d 限制的链条,没有 panic", limit) + overLimitList := Ints2List(make([]int, limit+1)) + ast.Panics(func() { List2Ints(overLimitList) }, "转换深度超过 %d 限制的链条,没有 panic", limit) } func Test_s2l(t *testing.T) { ast := assert.New(t) - ast.Nil(Slice2List([]int{}), "输入[]int{},没有返回nil") + ast.Nil(Ints2List([]int{}), "输入[]int{},没有返回nil") - ln := Slice2List([]int{1, 2, 3, 4, 5, 6, 7, 8, 9}) + ln := Ints2List([]int{1, 2, 3, 4, 5, 6, 7, 8, 9}) i := 1 for ln != nil { ast.Equal(i, ln.Val, "对应的值不对") diff --git a/kit/NestedInteger.go b/kit/NestedInteger.go new file mode 100644 index 000000000..7c5c657b1 --- /dev/null +++ b/kit/NestedInteger.go @@ -0,0 +1,37 @@ +package kit + +// NestedInteger is the interface that allows for creating nested lists. +// You should not implement it, or speculate about its implementation +type NestedInteger struct { + Num int + Ns []*NestedInteger +} + +// IsInteger Return true if this NestedInteger holds a single integer, rather than a nested list. +func (n NestedInteger) IsInteger() bool { + return n.Ns == nil +} + +// GetInteger Return the single integer that this NestedInteger holds, if it holds a single integer +// The result is undefined if this NestedInteger holds a nested list +// So before calling this method, you should have a check +func (n NestedInteger) GetInteger() int { + return n.Num +} + +// SetInteger Set this NestedInteger to hold a single integer. +func (n *NestedInteger) SetInteger(value int) { + n.Num = value +} + +// Add Set this NestedInteger to hold a nested list and adds a nested integer to it. +func (n *NestedInteger) Add(elem NestedInteger) { + n.Ns = append(n.Ns, &elem) +} + +// GetList Return the nested list that this NestedInteger holds, if it holds a nested list +// The list length is zero if this NestedInteger holds a single integer +// You can access NestedInteger's List element directly if you want to modify it +func (n NestedInteger) GetList() []*NestedInteger { + return n.Ns +} diff --git a/kit/NestedInterger_test.go b/kit/NestedInterger_test.go new file mode 100644 index 000000000..8ce2701ad --- /dev/null +++ b/kit/NestedInterger_test.go @@ -0,0 +1,30 @@ +package kit + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_NestedInteger(t *testing.T) { + ast := assert.New(t) + + n := NestedInteger{} + + ast.True(n.IsInteger()) + + n.SetInteger(1) + ast.Equal(1, n.GetInteger()) + + elem := NestedInteger{Num: 1} + + expected := NestedInteger{ + Num: 1, + Ns: []*NestedInteger{&elem}, + } + n.Add(elem) + + ast.Equal(expected, n) + + ast.Equal(expected.Ns, n.GetList()) +} diff --git a/kit/Point.go b/kit/Point.go new file mode 100644 index 000000000..2b0cfc810 --- /dev/null +++ b/kit/Point.go @@ -0,0 +1,27 @@ +package kit + +// Point 定义了一个二维坐标点 +type Point struct { + X, Y int +} + +// Intss2Points 把 [][]int 转换成 []Point +func Intss2Points(points [][]int) []Point { + res := make([]Point, len(points)) + for i, p := range points { + res[i] = Point{ + X: p[0], + Y: p[1], + } + } + return res +} + +// Points2Intss 把 []Point 转换成 [][]int +func Points2Intss(points []Point) [][]int { + res := make([][]int, len(points)) + for i, p := range points { + res[i] = []int{p.X, p.Y} + } + return res +} diff --git a/kit/Point_test.go b/kit/Point_test.go new file mode 100644 index 000000000..9a2ce89fc --- /dev/null +++ b/kit/Point_test.go @@ -0,0 +1,78 @@ +package kit + +import ( + "reflect" + "testing" +) + +func Test_Intss2Points(t *testing.T) { + type args struct { + points [][]int + } + tests := []struct { + name string + args args + want []Point + }{ + { + "测试 [][]int 转换成 []Point ", + args{ + [][]int{ + {1, 0}, + {2, 0}, + {3, 0}, + {4, 0}, + {5, 0}, + }, + }, + []Point{ + Point{X: 1, Y: 0}, + Point{X: 2, Y: 0}, + Point{X: 3, Y: 0}, + Point{X: 4, Y: 0}, + Point{X: 5, Y: 0}, + }, + }, + } + for _, tt := range tests { + if got := Intss2Points(tt.args.points); !reflect.DeepEqual(got, tt.want) { + t.Errorf("%q. intss2Points() = %v, want %v", tt.name, got, tt.want) + } + } +} + +func Test_Points2Intss(t *testing.T) { + type args struct { + points []Point + } + tests := []struct { + name string + args args + want [][]int + }{ + { + "测试 [][]int 转换成 []Point ", + args{ + []Point{ + Point{X: 1, Y: 0}, + Point{X: 2, Y: 0}, + Point{X: 3, Y: 0}, + Point{X: 4, Y: 0}, + Point{X: 5, Y: 0}, + }, + }, + [][]int{ + {1, 0}, + {2, 0}, + {3, 0}, + {4, 0}, + {5, 0}, + }, + }, + } + for _, tt := range tests { + if got := Points2Intss(tt.args.points); !reflect.DeepEqual(got, tt.want) { + t.Errorf("%q. Points2Intss() = %v, want %v", tt.name, got, tt.want) + } + } +} diff --git a/kit/PriorityQueue.go b/kit/PriorityQueue.go new file mode 100644 index 000000000..9177cf602 --- /dev/null +++ b/kit/PriorityQueue.go @@ -0,0 +1,54 @@ +package kit + +// This example demonstrates a priority queue built using the heap interface. + +import ( + "container/heap" +) + +// entry 是 priorityQueue 中的元素 +type entry struct { + key string + priority int + // index 是 entry 在 heap 中的索引号 + // entry 加入 Priority Queue 后, Priority 会变化时,很有用 + // 如果 entry.priority 一直不变的话,可以删除 index + index int +} + +// PQ implements heap.Interface and holds entries. +type PQ []*entry + +func (pq PQ) Len() int { return len(pq) } + +func (pq PQ) Less(i, j int) bool { + return pq[i].priority < pq[j].priority +} + +func (pq PQ) Swap(i, j int) { + pq[i], pq[j] = pq[j], pq[i] + pq[i].index = i + pq[j].index = j +} + +// Push 往 pq 中放 entry +func (pq *PQ) Push(x interface{}) { + temp := x.(*entry) + temp.index = len(*pq) + *pq = append(*pq, temp) +} + +// Pop 从 pq 中取出最优先的 entry +func (pq *PQ) Pop() interface{} { + temp := (*pq)[len(*pq)-1] + temp.index = -1 // for safety + *pq = (*pq)[0 : len(*pq)-1] + return temp +} + +// update modifies the priority and value of an entry in the queue. +func (pq *PQ) update(entry *entry, value string, priority int) { + entry.key = value + entry.priority = priority + heap.Fix(pq, entry.index) +} diff --git a/kit/PriorityQueue_test.go b/kit/PriorityQueue_test.go new file mode 100644 index 000000000..576a521f2 --- /dev/null +++ b/kit/PriorityQueue_test.go @@ -0,0 +1,53 @@ +package kit + +import ( + "container/heap" + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_priorityQueue(t *testing.T) { + ast := assert.New(t) + + // Some items and their priorities. + items := map[string]int{ + "banana": 2, "apple": 1, "pear": 3, + } + + // Create a priority queue, put the items in it, and + // establish the priority queue (heap) invariants. + pq := make(PQ, len(items)) + i := 0 + for value, priority := range items { + pq[i] = &entry{ + key: value, + priority: priority, + index: i, + } + i++ + } + heap.Init(&pq) + + // Insert a new item and then modify its priority. + it := &entry{ + key: "orange", + priority: 5, + } + heap.Push(&pq, it) + pq.update(it, it.key, 0) + + // Some items and their priorities. + expected := []string{ + "orange", + "apple", + "banana", + "pear", + } + + // Take the items out; they arrive in decreasing priority order. + for pq.Len() > 0 { + it := heap.Pop(&pq).(*entry) + ast.Equal(expected[it.priority], it.key) + } +} diff --git a/kit/Queue.go b/kit/Queue.go new file mode 100644 index 000000000..495d39661 --- /dev/null +++ b/kit/Queue.go @@ -0,0 +1,33 @@ +package kit + +// Queue 是用于存放 int 的队列 +type Queue struct { + nums []int +} + +// NewQueue 返回 *kit.Queue +func NewQueue() *Queue { + return &Queue{nums: []int{}} +} + +// Push 把 n 放入队列 +func (q *Queue) Push(n int) { + q.nums = append(q.nums, n) +} + +// Pop 从 q 中取出最先进入队列的值 +func (q *Queue) Pop() int { + res := q.nums[0] + q.nums = q.nums[1:] + return res +} + +// Len 返回 q 的长度 +func (q *Queue) Len() int { + return len(q.nums) +} + +// IsEmpty 反馈 q 是否为空 +func (q *Queue) IsEmpty() bool { + return q.Len() == 0 +} diff --git a/kit/Queue_test.go b/kit/Queue_test.go new file mode 100644 index 000000000..8fac7eb20 --- /dev/null +++ b/kit/Queue_test.go @@ -0,0 +1,27 @@ +package kit + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_Queue(t *testing.T) { + ast := assert.New(t) + + q := NewQueue() + ast.True(q.IsEmpty(), "检查新建的 q 是否为空") + + start, end := 0, 100 + + for i := start; i < end; i++ { + q.Push(i) + ast.Equal(i-start+1, q.Len(), "Push 后检查 q 的长度。") + } + + for i := start; i < end; i++ { + ast.Equal(i, q.Pop(), "从 q 中 pop 出数来。") + } + + ast.True(q.IsEmpty(), "检查 Pop 完毕后的 q 是否为空") +} diff --git a/kit/Stack.go b/kit/Stack.go new file mode 100644 index 000000000..39d150350 --- /dev/null +++ b/kit/Stack.go @@ -0,0 +1,33 @@ +package kit + +// Stack 是用于存放 int 的 栈 +type Stack struct { + nums []int +} + +// NewStack 返回 *kit.Stack +func NewStack() *Stack { + return &Stack{nums: []int{}} +} + +// Push 把 n 放入 栈 +func (s *Stack) Push(n int) { + s.nums = append(s.nums, n) +} + +// Pop 从 s 中取出最后放入 栈 的值 +func (s *Stack) Pop() int { + res := s.nums[len(s.nums)-1] + s.nums = s.nums[:len(s.nums)-1] + return res +} + +// Len 返回 s 的长度 +func (s *Stack) Len() int { + return len(s.nums) +} + +// IsEmpty 反馈 s 是否为空 +func (s *Stack) IsEmpty() bool { + return s.Len() == 0 +} diff --git a/kit/Stack_test.go b/kit/Stack_test.go new file mode 100644 index 000000000..e6ebdcc0d --- /dev/null +++ b/kit/Stack_test.go @@ -0,0 +1,27 @@ +package kit + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_Stack(t *testing.T) { + ast := assert.New(t) + + s := NewStack() + ast.True(s.IsEmpty(), "检查新建的 s 是否为空") + + start, end := 0, 100 + + for i := start; i < end; i++ { + s.Push(i) + ast.Equal(i-start+1, s.Len(), "Push 后检查 q 的长度。") + } + + for i := end - 1; i >= start; i-- { + ast.Equal(i, s.Pop(), "从 s 中 pop 出数来。") + } + + ast.True(s.IsEmpty(), "检查 Pop 完毕后的 s 是否为空") +} diff --git a/kit/TreeNode.go b/kit/TreeNode.go index a3c7f66c9..92d41ec52 100644 --- a/kit/TreeNode.go +++ b/kit/TreeNode.go @@ -11,6 +11,47 @@ type TreeNode struct { Right *TreeNode } +var null = -1 << 63 + +// Ints2TreeNode 利用 []int 生成 *TreeNode +func Ints2TreeNode(ints []int) *TreeNode { + n := len(ints) + if n == 0 { + return nil + } + + root := &TreeNode{ + Val: ints[0], + } + + queue := make([]*TreeNode, 1, n*2) + queue[0] = root + + i := 1 + for { + node := queue[0] + queue = queue[1:] + + if i < n && ints[i] != null { + node.Left = &TreeNode{Val: ints[i]} + queue = append(queue, node.Left) + } + i++ + + if i < n && ints[i] != null { + node.Right = &TreeNode{Val: ints[i]} + queue = append(queue, node.Right) + } + i++ + + if i >= n { + break + } + } + + return root +} + func indexOf(val int, nums []int) int { for i, v := range nums { if v == val { diff --git a/kit/TreeNode_test.go b/kit/TreeNode_test.go index bf61e5ca8..39476d22e 100644 --- a/kit/TreeNode_test.go +++ b/kit/TreeNode_test.go @@ -7,11 +7,29 @@ import ( ) var ( - preOrder = []int{1, 2, 4, 5, 3, 6, 7} - inOrder = []int{4, 2, 5, 1, 6, 3, 7} - postOrder = []int{4, 5, 2, 6, 7, 3, 1} + // 同一个 TreeNode 的不同表达方式 + // 1 + // / \ + // 2 3 + // / \ / \ + // 4 5 6 7 + LeetCodeOrder = []int{1, 2, 3, 4, 5, 6, 7} + preOrder = []int{1, 2, 4, 5, 3, 6, 7} + inOrder = []int{4, 2, 5, 1, 6, 3, 7} + postOrder = []int{4, 5, 2, 6, 7, 3, 1} ) +func Test_Ints2TreeNode(t *testing.T) { + ast := assert.New(t) + + expected := PreIn2Tree(preOrder, inOrder) + actual := Ints2TreeNode(LeetCodeOrder) + ast.Equal(expected, actual) + + actual = Ints2TreeNode([]int{}) + ast.Nil(actual) +} + func Test_preIn2Tree(t *testing.T) { ast := assert.New(t) diff --git a/leetcode.json b/leetcode.json index 06e2faa57..6e12a1a8a 100644 --- a/leetcode.json +++ b/leetcode.json @@ -1 +1 @@ -{"Username":"aQuaYi","Ranking":35576,"Categories":[{"Name":"Algorithms","Easy":{"Solved":53,"Total":145},"Medium":{"Solved":84,"Total":250},"Hard":{"Solved":32,"Total":93},"Total":{"Solved":169,"Total":488}},{"Name":"Draft","Easy":{"Solved":0,"Total":1},"Medium":{"Solved":0,"Total":3},"Hard":{"Solved":0,"Total":0},"Total":{"Solved":0,"Total":4}},{"Name":"Total","Easy":{"Solved":53,"Total":146},"Medium":{"Solved":84,"Total":253},"Hard":{"Solved":32,"Total":93},"Total":{"Solved":169,"Total":492}}],"Problems":[{"ID":1,"Dir":"./Algorithms/0001.two-sum","Title":"Two Sum","TitleSlug":"two-sum","PassRate":"35%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":2,"Dir":"./Algorithms/0002.add-two-numbers","Title":"Add Two Numbers","TitleSlug":"add-two-numbers","PassRate":"27%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":3,"Dir":"./Algorithms/0003.longest-substring-without-repeating-characters","Title":"Longest Substring Without Repeating Characters","TitleSlug":"longest-substring-without-repeating-characters","PassRate":"24%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":4,"Dir":"./Algorithms/0004.median-of-two-sorted-arrays","Title":"Median of Two Sorted Arrays","TitleSlug":"median-of-two-sorted-arrays","PassRate":"21%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":5,"Dir":"./Algorithms/0005.longest-palindromic-substring","Title":"Longest Palindromic Substring","TitleSlug":"longest-palindromic-substring","PassRate":"25%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":6,"Dir":"./Algorithms/0006.zigzag-conversion","Title":"ZigZag Conversion","TitleSlug":"zigzag-conversion","PassRate":"26%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":7,"Dir":"./Algorithms/0007.reverse-integer","Title":"Reverse Integer","TitleSlug":"reverse-integer","PassRate":"24%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":8,"Dir":"./Algorithms/0008.string-to-integer-atoi","Title":"String to Integer (atoi)","TitleSlug":"string-to-integer-atoi","PassRate":"13%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":9,"Dir":"./Algorithms/0009.palindrome-number","Title":"Palindrome Number","TitleSlug":"palindrome-number","PassRate":"35%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":10,"Dir":"./Algorithms/0010.regular-expression-matching","Title":"Regular Expression Matching","TitleSlug":"regular-expression-matching","PassRate":"24%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":11,"Dir":"./Algorithms/0011.container-with-most-water","Title":"Container With Most Water","TitleSlug":"container-with-most-water","PassRate":"36%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":12,"Dir":"./Algorithms/0012.integer-to-roman","Title":"Integer to Roman","TitleSlug":"integer-to-roman","PassRate":"45%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":13,"Dir":"./Algorithms/0013.roman-to-integer","Title":"Roman to Integer","TitleSlug":"roman-to-integer","PassRate":"46%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":14,"Dir":"./Algorithms/0014.longest-common-prefix","Title":"Longest Common Prefix","TitleSlug":"longest-common-prefix","PassRate":"31%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":15,"Dir":"./Algorithms/0015.3sum","Title":"3Sum","TitleSlug":"3sum","PassRate":"21%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":16,"Dir":"./Algorithms/0016.3sum-closest","Title":"3Sum Closest","TitleSlug":"3sum-closest","PassRate":"31%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":17,"Dir":"./Algorithms/0017.letter-combinations-of-a-phone-number","Title":"Letter Combinations of a Phone Number","TitleSlug":"letter-combinations-of-a-phone-number","PassRate":"34%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":18,"Dir":"./Algorithms/0018.4sum","Title":"4Sum","TitleSlug":"4sum","PassRate":"26%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":19,"Dir":"./Algorithms/0019.remove-nth-node-from-end-of-list","Title":"Remove Nth Node From End of List","TitleSlug":"remove-nth-node-from-end-of-list","PassRate":"33%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":20,"Dir":"./Algorithms/0020.valid-parentheses","Title":"Valid Parentheses","TitleSlug":"valid-parentheses","PassRate":"33%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":21,"Dir":"./Algorithms/0021.merge-two-sorted-lists","Title":"Merge Two Sorted Lists","TitleSlug":"merge-two-sorted-lists","PassRate":"39%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":22,"Dir":"./Algorithms/0022.generate-parentheses","Title":"Generate Parentheses","TitleSlug":"generate-parentheses","PassRate":"45%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":23,"Dir":"./Algorithms/0023.merge-k-sorted-lists","Title":"Merge k Sorted Lists","TitleSlug":"merge-k-sorted-lists","PassRate":"27%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":24,"Dir":"./Algorithms/0024.swap-nodes-in-pairs","Title":"Swap Nodes in Pairs","TitleSlug":"swap-nodes-in-pairs","PassRate":"38%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":25,"Dir":"./Algorithms/0025.reverse-nodes-in-k-group","Title":"Reverse Nodes in k-Group","TitleSlug":"reverse-nodes-in-k-group","PassRate":"30%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":26,"Dir":"./Algorithms/0026.remove-duplicates-from-sorted-array","Title":"Remove Duplicates from Sorted Array","TitleSlug":"remove-duplicates-from-sorted-array","PassRate":"35%","Difficulty":1,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":27,"Dir":"./Algorithms/0027.remove-element","Title":"Remove Element","TitleSlug":"remove-element","PassRate":"39%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":28,"Dir":"./Algorithms/0028.implement-strstr","Title":"Implement strStr()","TitleSlug":"implement-strstr","PassRate":"28%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":29,"Dir":"./Algorithms/0029.divide-two-integers","Title":"Divide Two Integers","TitleSlug":"divide-two-integers","PassRate":"15%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":30,"Dir":"./Algorithms/0030.substring-with-concatenation-of-all-words","Title":"Substring with Concatenation of All Words","TitleSlug":"substring-with-concatenation-of-all-words","PassRate":"22%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":31,"Dir":"./Algorithms/0031.next-permutation","Title":"Next Permutation","TitleSlug":"next-permutation","PassRate":"28%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":32,"Dir":"./Algorithms/0032.longest-valid-parentheses","Title":"Longest Valid Parentheses","TitleSlug":"longest-valid-parentheses","PassRate":"23%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":33,"Dir":"./Algorithms/0033.search-in-rotated-sorted-array","Title":"Search in Rotated Sorted Array","TitleSlug":"search-in-rotated-sorted-array","PassRate":"32%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":34,"Dir":"./Algorithms/0034.search-for-a-range","Title":"Search for a Range","TitleSlug":"search-for-a-range","PassRate":"31%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":35,"Dir":"./Algorithms/0035.search-insert-position","Title":"Search Insert Position","TitleSlug":"search-insert-position","PassRate":"39%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":36,"Dir":"./Algorithms/0036.valid-sudoku","Title":"Valid Sudoku","TitleSlug":"valid-sudoku","PassRate":"35%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":37,"Dir":"./Algorithms/0037.sudoku-solver","Title":"Sudoku Solver","TitleSlug":"sudoku-solver","PassRate":"30%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":38,"Dir":"./Algorithms/0038.count-and-say","Title":"Count and Say","TitleSlug":"count-and-say","PassRate":"34%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":39,"Dir":"./Algorithms/0039.combination-sum","Title":"Combination Sum","TitleSlug":"combination-sum","PassRate":"39%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":40,"Dir":"./Algorithms/0040.combination-sum-ii","Title":"Combination Sum II","TitleSlug":"combination-sum-ii","PassRate":"34%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":41,"Dir":"./Algorithms/0041.first-missing-positive","Title":"First Missing Positive","TitleSlug":"first-missing-positive","PassRate":"25%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":42,"Dir":"./Algorithms/0042.trapping-rain-water","Title":"Trapping Rain Water","TitleSlug":"trapping-rain-water","PassRate":"36%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":43,"Dir":"./Algorithms/0043.multiply-strings","Title":"Multiply Strings","TitleSlug":"multiply-strings","PassRate":"27%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":44,"Dir":"./Algorithms/0044.wildcard-matching","Title":"Wildcard Matching","TitleSlug":"wildcard-matching","PassRate":"20%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":45,"Dir":"./Algorithms/0045.jump-game-ii","Title":"Jump Game II","TitleSlug":"jump-game-ii","PassRate":"26%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":46,"Dir":"./Algorithms/0046.permutations","Title":"Permutations","TitleSlug":"permutations","PassRate":"44%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":47,"Dir":"./Algorithms/0047.permutations-ii","Title":"Permutations II","TitleSlug":"permutations-ii","PassRate":"33%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":48,"Dir":"./Algorithms/0048.rotate-image","Title":"Rotate Image","TitleSlug":"rotate-image","PassRate":"38%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":49,"Dir":"./Algorithms/0049.group-anagrams","Title":"Group Anagrams","TitleSlug":"group-anagrams","PassRate":"35%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":50,"Dir":"./Algorithms/0050.powx-n","Title":"Pow(x, n)","TitleSlug":"powx-n","PassRate":"26%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":51,"Dir":"./Algorithms/0051.n-queens","Title":"N-Queens","TitleSlug":"n-queens","PassRate":"31%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":52,"Dir":"./Algorithms/0052.n-queens-ii","Title":"N-Queens II","TitleSlug":"n-queens-ii","PassRate":"45%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":53,"Dir":"./Algorithms/0053.maximum-subarray","Title":"Maximum Subarray","TitleSlug":"maximum-subarray","PassRate":"39%","Difficulty":1,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":54,"Dir":"./Algorithms/0054.spiral-matrix","Title":"Spiral Matrix","TitleSlug":"spiral-matrix","PassRate":"26%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":55,"Dir":"./Algorithms/0055.jump-game","Title":"Jump Game","TitleSlug":"jump-game","PassRate":"29%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":56,"Dir":"./Algorithms/0056.merge-intervals","Title":"Merge Intervals","TitleSlug":"merge-intervals","PassRate":"30%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":57,"Dir":"./Algorithms/0057.insert-interval","Title":"Insert Interval","TitleSlug":"insert-interval","PassRate":"27%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":58,"Dir":"./Algorithms/0058.length-of-last-word","Title":"Length of Last Word","TitleSlug":"length-of-last-word","PassRate":"31%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":59,"Dir":"./Algorithms/0059.spiral-matrix-ii","Title":"Spiral Matrix II","TitleSlug":"spiral-matrix-ii","PassRate":"39%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":60,"Dir":"./Algorithms/0060.permutation-sequence","Title":"Permutation Sequence","TitleSlug":"permutation-sequence","PassRate":"28%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":61,"Dir":"./Algorithms/0061.rotate-list","Title":"Rotate List","TitleSlug":"rotate-list","PassRate":"24%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":62,"Dir":"./Algorithms/0062.unique-paths","Title":"Unique Paths","TitleSlug":"unique-paths","PassRate":"41%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":63,"Dir":"./Algorithms/0063.unique-paths-ii","Title":"Unique Paths II","TitleSlug":"unique-paths-ii","PassRate":"31%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":64,"Dir":"./Algorithms/0064.minimum-path-sum","Title":"Minimum Path Sum","TitleSlug":"minimum-path-sum","PassRate":"38%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":65,"Dir":"./Algorithms/0065.valid-number","Title":"Valid Number","TitleSlug":"valid-number","PassRate":"12%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":66,"Dir":"./Algorithms/0066.plus-one","Title":"Plus One","TitleSlug":"plus-one","PassRate":"38%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":67,"Dir":"./Algorithms/0067.add-binary","Title":"Add Binary","TitleSlug":"add-binary","PassRate":"32%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":68,"Dir":"./Algorithms/0068.text-justification","Title":"Text Justification","TitleSlug":"text-justification","PassRate":"19%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":69,"Dir":"./Algorithms/0069.sqrtx","Title":"Sqrt(x)","TitleSlug":"sqrtx","PassRate":"27%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":70,"Dir":"./Algorithms/0070.climbing-stairs","Title":"Climbing Stairs","TitleSlug":"climbing-stairs","PassRate":"40%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":71,"Dir":"./Algorithms/0071.simplify-path","Title":"Simplify Path","TitleSlug":"simplify-path","PassRate":"25%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":72,"Dir":"./Algorithms/0072.edit-distance","Title":"Edit Distance","TitleSlug":"edit-distance","PassRate":"31%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":73,"Dir":"./Algorithms/0073.set-matrix-zeroes","Title":"Set Matrix Zeroes","TitleSlug":"set-matrix-zeroes","PassRate":"35%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":74,"Dir":"./Algorithms/0074.search-a-2d-matrix","Title":"Search a 2D Matrix","TitleSlug":"search-a-2d-matrix","PassRate":"34%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":75,"Dir":"./Algorithms/0075.sort-colors","Title":"Sort Colors","TitleSlug":"sort-colors","PassRate":"38%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":76,"Dir":"./Algorithms/0076.minimum-window-substring","Title":"Minimum Window Substring","TitleSlug":"minimum-window-substring","PassRate":"25%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":77,"Dir":"./Algorithms/0077.combinations","Title":"Combinations","TitleSlug":"combinations","PassRate":"39%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":78,"Dir":"./Algorithms/0078.subsets","Title":"Subsets","TitleSlug":"subsets","PassRate":"41%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":79,"Dir":"./Algorithms/0079.word-search","Title":"Word Search","TitleSlug":"word-search","PassRate":"26%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":80,"Dir":"./Algorithms/0080.remove-duplicates-from-sorted-array-ii","Title":"Remove Duplicates from Sorted Array II","TitleSlug":"remove-duplicates-from-sorted-array-ii","PassRate":"36%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":81,"Dir":"./Algorithms/0081.search-in-rotated-sorted-array-ii","Title":"Search in Rotated Sorted Array II","TitleSlug":"search-in-rotated-sorted-array-ii","PassRate":"32%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":82,"Dir":"./Algorithms/0082.remove-duplicates-from-sorted-list-ii","Title":"Remove Duplicates from Sorted List II","TitleSlug":"remove-duplicates-from-sorted-list-ii","PassRate":"29%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":83,"Dir":"./Algorithms/0083.remove-duplicates-from-sorted-list","Title":"Remove Duplicates from Sorted List","TitleSlug":"remove-duplicates-from-sorted-list","PassRate":"39%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":84,"Dir":"./Algorithms/0084.largest-rectangle-in-histogram","Title":"Largest Rectangle in Histogram","TitleSlug":"largest-rectangle-in-histogram","PassRate":"26%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":85,"Dir":"./Algorithms/0085.maximal-rectangle","Title":"Maximal Rectangle","TitleSlug":"maximal-rectangle","PassRate":"28%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":86,"Dir":"./Algorithms/0086.partition-list","Title":"Partition List","TitleSlug":"partition-list","PassRate":"32%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":87,"Dir":"./Algorithms/0087.scramble-string","Title":"Scramble String","TitleSlug":"scramble-string","PassRate":"29%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":88,"Dir":"./Algorithms/0088.merge-sorted-array","Title":"Merge Sorted Array","TitleSlug":"merge-sorted-array","PassRate":"32%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":89,"Dir":"./Algorithms/0089.gray-code","Title":"Gray Code","TitleSlug":"gray-code","PassRate":"41%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":90,"Dir":"./Algorithms/0090.subsets-ii","Title":"Subsets II","TitleSlug":"subsets-ii","PassRate":"36%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":91,"Dir":"./Algorithms/0091.decode-ways","Title":"Decode Ways","TitleSlug":"decode-ways","PassRate":"19%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":92,"Dir":"./Algorithms/0092.reverse-linked-list-ii","Title":"Reverse Linked List II","TitleSlug":"reverse-linked-list-ii","PassRate":"30%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":93,"Dir":"./Algorithms/0093.restore-ip-addresses","Title":"Restore IP Addresses","TitleSlug":"restore-ip-addresses","PassRate":"27%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":94,"Dir":"./Algorithms/0094.binary-tree-inorder-traversal","Title":"Binary Tree Inorder Traversal","TitleSlug":"binary-tree-inorder-traversal","PassRate":"46%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":95,"Dir":"./Algorithms/0095.unique-binary-search-trees-ii","Title":"Unique Binary Search Trees II","TitleSlug":"unique-binary-search-trees-ii","PassRate":"31%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":96,"Dir":"./Algorithms/0096.unique-binary-search-trees","Title":"Unique Binary Search Trees","TitleSlug":"unique-binary-search-trees","PassRate":"41%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":97,"Dir":"./Algorithms/0097.interleaving-string","Title":"Interleaving String","TitleSlug":"interleaving-string","PassRate":"24%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":98,"Dir":"./Algorithms/0098.validate-binary-search-tree","Title":"Validate Binary Search Tree","TitleSlug":"validate-binary-search-tree","PassRate":"23%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":99,"Dir":"./Algorithms/0099.recover-binary-search-tree","Title":"Recover Binary Search Tree","TitleSlug":"recover-binary-search-tree","PassRate":"29%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":100,"Dir":"./Algorithms/0100.same-tree","Title":"Same Tree","TitleSlug":"same-tree","PassRate":"46%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":101,"Dir":"./Algorithms/0101.symmetric-tree","Title":"Symmetric Tree","TitleSlug":"symmetric-tree","PassRate":"38%","Difficulty":1,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":102,"Dir":"./Algorithms/0102.binary-tree-level-order-traversal","Title":"Binary Tree Level Order Traversal","TitleSlug":"binary-tree-level-order-traversal","PassRate":"40%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":103,"Dir":"./Algorithms/0103.binary-tree-zigzag-level-order-traversal","Title":"Binary Tree Zigzag Level Order Traversal","TitleSlug":"binary-tree-zigzag-level-order-traversal","PassRate":"34%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":104,"Dir":"./Algorithms/0104.maximum-depth-of-binary-tree","Title":"Maximum Depth of Binary Tree","TitleSlug":"maximum-depth-of-binary-tree","PassRate":"52%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":105,"Dir":"./Algorithms/0105.construct-binary-tree-from-preorder-and-inorder-traversal","Title":"Construct Binary Tree from Preorder and Inorder Traversal","TitleSlug":"construct-binary-tree-from-preorder-and-inorder-traversal","PassRate":"32%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":106,"Dir":"./Algorithms/0106.construct-binary-tree-from-inorder-and-postorder-traversal","Title":"Construct Binary Tree from Inorder and Postorder Traversal","TitleSlug":"construct-binary-tree-from-inorder-and-postorder-traversal","PassRate":"32%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":107,"Dir":"./Algorithms/0107.binary-tree-level-order-traversal-ii","Title":"Binary Tree Level Order Traversal II","TitleSlug":"binary-tree-level-order-traversal-ii","PassRate":"40%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":108,"Dir":"./Algorithms/0108.convert-sorted-array-to-binary-search-tree","Title":"Convert Sorted Array to Binary Search Tree","TitleSlug":"convert-sorted-array-to-binary-search-tree","PassRate":"42%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":109,"Dir":"./Algorithms/0109.convert-sorted-list-to-binary-search-tree","Title":"Convert Sorted List to Binary Search Tree","TitleSlug":"convert-sorted-list-to-binary-search-tree","PassRate":"34%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":110,"Dir":"./Algorithms/0110.balanced-binary-tree","Title":"Balanced Binary Tree","TitleSlug":"balanced-binary-tree","PassRate":"37%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":111,"Dir":"./Algorithms/0111.minimum-depth-of-binary-tree","Title":"Minimum Depth of Binary Tree","TitleSlug":"minimum-depth-of-binary-tree","PassRate":"33%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":112,"Dir":"./Algorithms/0112.path-sum","Title":"Path Sum","TitleSlug":"path-sum","PassRate":"34%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":113,"Dir":"./Algorithms/0113.path-sum-ii","Title":"Path Sum II","TitleSlug":"path-sum-ii","PassRate":"33%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":114,"Dir":"./Algorithms/0114.flatten-binary-tree-to-linked-list","Title":"Flatten Binary Tree to Linked List","TitleSlug":"flatten-binary-tree-to-linked-list","PassRate":"35%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":115,"Dir":"./Algorithms/0115.distinct-subsequences","Title":"Distinct Subsequences","TitleSlug":"distinct-subsequences","PassRate":"31%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":116,"Dir":"./Algorithms/0116.populating-next-right-pointers-in-each-node","Title":"Populating Next Right Pointers in Each Node","TitleSlug":"populating-next-right-pointers-in-each-node","PassRate":"36%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":117,"Dir":"./Algorithms/0117.populating-next-right-pointers-in-each-node-ii","Title":"Populating Next Right Pointers in Each Node II","TitleSlug":"populating-next-right-pointers-in-each-node-ii","PassRate":"33%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":118,"Dir":"./Algorithms/0118.pascals-triangle","Title":"Pascal's Triangle","TitleSlug":"pascals-triangle","PassRate":"38%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":119,"Dir":"./Algorithms/0119.pascals-triangle-ii","Title":"Pascal's Triangle II","TitleSlug":"pascals-triangle-ii","PassRate":"37%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":120,"Dir":"./Algorithms/0120.triangle","Title":"Triangle","TitleSlug":"triangle","PassRate":"33%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":121,"Dir":"./Algorithms/0121.best-time-to-buy-and-sell-stock","Title":"Best Time to Buy and Sell Stock","TitleSlug":"best-time-to-buy-and-sell-stock","PassRate":"41%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":122,"Dir":"./Algorithms/0122.best-time-to-buy-and-sell-stock-ii","Title":"Best Time to Buy and Sell Stock II","TitleSlug":"best-time-to-buy-and-sell-stock-ii","PassRate":"47%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":123,"Dir":"./Algorithms/0123.best-time-to-buy-and-sell-stock-iii","Title":"Best Time to Buy and Sell Stock III","TitleSlug":"best-time-to-buy-and-sell-stock-iii","PassRate":"29%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":124,"Dir":"./Algorithms/0124.binary-tree-maximum-path-sum","Title":"Binary Tree Maximum Path Sum","TitleSlug":"binary-tree-maximum-path-sum","PassRate":"26%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":125,"Dir":"./Algorithms/0125.valid-palindrome","Title":"Valid Palindrome","TitleSlug":"valid-palindrome","PassRate":"26%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":126,"Dir":"./Algorithms/0126.word-ladder-ii","Title":"Word Ladder II","TitleSlug":"word-ladder-ii","PassRate":"14%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":127,"Dir":"./Algorithms/0127.word-ladder","Title":"Word Ladder","TitleSlug":"word-ladder","PassRate":"19%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":128,"Dir":"./Algorithms/0128.longest-consecutive-sequence","Title":"Longest Consecutive Sequence","TitleSlug":"longest-consecutive-sequence","PassRate":"37%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":129,"Dir":"./Algorithms/0129.sum-root-to-leaf-numbers","Title":"Sum Root to Leaf Numbers","TitleSlug":"sum-root-to-leaf-numbers","PassRate":"36%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":130,"Dir":"./Algorithms/0130.surrounded-regions","Title":"Surrounded Regions","TitleSlug":"surrounded-regions","PassRate":"18%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":131,"Dir":"./Algorithms/0131.palindrome-partitioning","Title":"Palindrome Partitioning","TitleSlug":"palindrome-partitioning","PassRate":"33%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":132,"Dir":"./Algorithms/0132.palindrome-partitioning-ii","Title":"Palindrome Partitioning II","TitleSlug":"palindrome-partitioning-ii","PassRate":"24%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":133,"Dir":"./Algorithms/0133.clone-graph","Title":"Clone Graph","TitleSlug":"clone-graph","PassRate":"25%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":134,"Dir":"./Algorithms/0134.gas-station","Title":"Gas Station","TitleSlug":"gas-station","PassRate":"29%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":135,"Dir":"./Algorithms/0135.candy","Title":"Candy","TitleSlug":"candy","PassRate":"24%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":136,"Dir":"./Algorithms/0136.single-number","Title":"Single Number","TitleSlug":"single-number","PassRate":"54%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":137,"Dir":"./Algorithms/0137.single-number-ii","Title":"Single Number II","TitleSlug":"single-number-ii","PassRate":"41%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":138,"Dir":"./Algorithms/0138.copy-list-with-random-pointer","Title":"Copy List with Random Pointer","TitleSlug":"copy-list-with-random-pointer","PassRate":"26%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":139,"Dir":"./Algorithms/0139.word-break","Title":"Word Break","TitleSlug":"word-break","PassRate":"30%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":140,"Dir":"./Algorithms/0140.word-break-ii","Title":"Word Break II","TitleSlug":"word-break-ii","PassRate":"23%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":141,"Dir":"./Algorithms/0141.linked-list-cycle","Title":"Linked List Cycle","TitleSlug":"linked-list-cycle","PassRate":"35%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":142,"Dir":"./Algorithms/0142.linked-list-cycle-ii","Title":"Linked List Cycle II","TitleSlug":"linked-list-cycle-ii","PassRate":"30%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":143,"Dir":"./Algorithms/0143.reorder-list","Title":"Reorder List","TitleSlug":"reorder-list","PassRate":"25%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":144,"Dir":"./Algorithms/0144.binary-tree-preorder-traversal","Title":"Binary Tree Preorder Traversal","TitleSlug":"binary-tree-preorder-traversal","PassRate":"45%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":145,"Dir":"./Algorithms/0145.binary-tree-postorder-traversal","Title":"Binary Tree Postorder Traversal","TitleSlug":"binary-tree-postorder-traversal","PassRate":"40%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":146,"Dir":"./Algorithms/0146.lru-cache","Title":"LRU Cache","TitleSlug":"lru-cache","PassRate":"17%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":147,"Dir":"./Algorithms/0147.insertion-sort-list","Title":"Insertion Sort List","TitleSlug":"insertion-sort-list","PassRate":"33%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":148,"Dir":"./Algorithms/0148.sort-list","Title":"Sort List","TitleSlug":"sort-list","PassRate":"28%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":149,"Dir":"./Algorithms/0149.max-points-on-a-line","Title":"Max Points on a Line","TitleSlug":"max-points-on-a-line","PassRate":"15%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":150,"Dir":"./Algorithms/0150.evaluate-reverse-polish-notation","Title":"Evaluate Reverse Polish Notation","TitleSlug":"evaluate-reverse-polish-notation","PassRate":"27%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":151,"Dir":"./Algorithms/0151.reverse-words-in-a-string","Title":"Reverse Words in a String","TitleSlug":"reverse-words-in-a-string","PassRate":"15%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":152,"Dir":"./Algorithms/0152.maximum-product-subarray","Title":"Maximum Product Subarray","TitleSlug":"maximum-product-subarray","PassRate":"25%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":153,"Dir":"./Algorithms/0153.find-minimum-in-rotated-sorted-array","Title":"Find Minimum in Rotated Sorted Array","TitleSlug":"find-minimum-in-rotated-sorted-array","PassRate":"40%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":154,"Dir":"./Algorithms/0154.find-minimum-in-rotated-sorted-array-ii","Title":"Find Minimum in Rotated Sorted Array II","TitleSlug":"find-minimum-in-rotated-sorted-array-ii","PassRate":"37%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":155,"Dir":"./Algorithms/0155.min-stack","Title":"Min Stack","TitleSlug":"min-stack","PassRate":"28%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":160,"Dir":"./Algorithms/0160.intersection-of-two-linked-lists","Title":"Intersection of Two Linked Lists","TitleSlug":"intersection-of-two-linked-lists","PassRate":"30%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":162,"Dir":"./Algorithms/0162.find-peak-element","Title":"Find Peak Element","TitleSlug":"find-peak-element","PassRate":"37%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":164,"Dir":"./Algorithms/0164.maximum-gap","Title":"Maximum Gap","TitleSlug":"maximum-gap","PassRate":"29%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":165,"Dir":"./Algorithms/0165.compare-version-numbers","Title":"Compare Version Numbers","TitleSlug":"compare-version-numbers","PassRate":"20%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":166,"Dir":"./Algorithms/0166.fraction-to-recurring-decimal","Title":"Fraction to Recurring Decimal","TitleSlug":"fraction-to-recurring-decimal","PassRate":"17%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":167,"Dir":"./Algorithms/0167.two-sum-ii-input-array-is-sorted","Title":"Two Sum II - Input array is sorted","TitleSlug":"two-sum-ii-input-array-is-sorted","PassRate":"47%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":168,"Dir":"./Algorithms/0168.excel-sheet-column-title","Title":"Excel Sheet Column Title","TitleSlug":"excel-sheet-column-title","PassRate":"26%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":169,"Dir":"./Algorithms/0169.majority-element","Title":"Majority Element","TitleSlug":"majority-element","PassRate":"46%","Difficulty":1,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":171,"Dir":"./Algorithms/0171.excel-sheet-column-number","Title":"Excel Sheet Column Number","TitleSlug":"excel-sheet-column-number","PassRate":"47%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":172,"Dir":"./Algorithms/0172.factorial-trailing-zeroes","Title":"Factorial Trailing Zeroes","TitleSlug":"factorial-trailing-zeroes","PassRate":"36%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":173,"Dir":"./Algorithms/0173.binary-search-tree-iterator","Title":"Binary Search Tree Iterator","TitleSlug":"binary-search-tree-iterator","PassRate":"41%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":174,"Dir":"./Algorithms/0174.dungeon-game","Title":"Dungeon Game","TitleSlug":"dungeon-game","PassRate":"23%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":179,"Dir":"./Algorithms/0179.largest-number","Title":"Largest Number","TitleSlug":"largest-number","PassRate":"22%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":187,"Dir":"./Algorithms/0187.repeated-dna-sequences","Title":"Repeated DNA Sequences","TitleSlug":"repeated-dna-sequences","PassRate":"31%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":188,"Dir":"./Algorithms/0188.best-time-to-buy-and-sell-stock-iv","Title":"Best Time to Buy and Sell Stock IV","TitleSlug":"best-time-to-buy-and-sell-stock-iv","PassRate":"24%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":189,"Dir":"./Algorithms/0189.rotate-array","Title":"Rotate Array","TitleSlug":"rotate-array","PassRate":"24%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":190,"Dir":"./Algorithms/0190.reverse-bits","Title":"Reverse Bits","TitleSlug":"reverse-bits","PassRate":"29%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":191,"Dir":"./Algorithms/0191.number-of-1-bits","Title":"Number of 1 Bits","TitleSlug":"number-of-1-bits","PassRate":"39%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":198,"Dir":"./Algorithms/0198.house-robber","Title":"House Robber","TitleSlug":"house-robber","PassRate":"39%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":199,"Dir":"./Algorithms/0199.binary-tree-right-side-view","Title":"Binary Tree Right Side View","TitleSlug":"binary-tree-right-side-view","PassRate":"41%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":200,"Dir":"./Algorithms/0200.number-of-islands","Title":"Number of Islands","TitleSlug":"number-of-islands","PassRate":"34%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":201,"Dir":"./Algorithms/0201.bitwise-and-of-numbers-range","Title":"Bitwise AND of Numbers Range","TitleSlug":"bitwise-and-of-numbers-range","PassRate":"34%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":202,"Dir":"./Algorithms/0202.happy-number","Title":"Happy Number","TitleSlug":"happy-number","PassRate":"40%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":203,"Dir":"./Algorithms/0203.remove-linked-list-elements","Title":"Remove Linked List Elements","TitleSlug":"remove-linked-list-elements","PassRate":"32%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":204,"Dir":"./Algorithms/0204.count-primes","Title":"Count Primes","TitleSlug":"count-primes","PassRate":"26%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":205,"Dir":"./Algorithms/0205.isomorphic-strings","Title":"Isomorphic Strings","TitleSlug":"isomorphic-strings","PassRate":"33%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":206,"Dir":"./Algorithms/0206.reverse-linked-list","Title":"Reverse Linked List","TitleSlug":"reverse-linked-list","PassRate":"45%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":207,"Dir":"./Algorithms/0207.course-schedule","Title":"Course Schedule","TitleSlug":"course-schedule","PassRate":"32%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":208,"Dir":"./Algorithms/0208.implement-trie-prefix-tree","Title":"Implement Trie (Prefix Tree)","TitleSlug":"implement-trie-prefix-tree","PassRate":"28%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":209,"Dir":"./Algorithms/0209.minimum-size-subarray-sum","Title":"Minimum Size Subarray Sum","TitleSlug":"minimum-size-subarray-sum","PassRate":"30%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":210,"Dir":"./Algorithms/0210.course-schedule-ii","Title":"Course Schedule II","TitleSlug":"course-schedule-ii","PassRate":"28%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":211,"Dir":"./Algorithms/0211.add-and-search-word-data-structure-design","Title":"Add and Search Word - Data structure design","TitleSlug":"add-and-search-word-data-structure-design","PassRate":"23%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":212,"Dir":"./Algorithms/0212.word-search-ii","Title":"Word Search II","TitleSlug":"word-search-ii","PassRate":"23%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":213,"Dir":"./Algorithms/0213.house-robber-ii","Title":"House Robber II","TitleSlug":"house-robber-ii","PassRate":"34%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":214,"Dir":"./Algorithms/0214.shortest-palindrome","Title":"Shortest Palindrome","TitleSlug":"shortest-palindrome","PassRate":"24%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":215,"Dir":"./Algorithms/0215.kth-largest-element-in-an-array","Title":"Kth Largest Element in an Array","TitleSlug":"kth-largest-element-in-an-array","PassRate":"39%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":216,"Dir":"./Algorithms/0216.combination-sum-iii","Title":"Combination Sum III","TitleSlug":"combination-sum-iii","PassRate":"45%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":217,"Dir":"./Algorithms/0217.contains-duplicate","Title":"Contains Duplicate","TitleSlug":"contains-duplicate","PassRate":"45%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":218,"Dir":"./Algorithms/0218.the-skyline-problem","Title":"The Skyline Problem","TitleSlug":"the-skyline-problem","PassRate":"27%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":219,"Dir":"./Algorithms/0219.contains-duplicate-ii","Title":"Contains Duplicate II","TitleSlug":"contains-duplicate-ii","PassRate":"32%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":220,"Dir":"./Algorithms/0220.contains-duplicate-iii","Title":"Contains Duplicate III","TitleSlug":"contains-duplicate-iii","PassRate":"19%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":221,"Dir":"./Algorithms/0221.maximal-square","Title":"Maximal Square","TitleSlug":"maximal-square","PassRate":"29%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":222,"Dir":"./Algorithms/0222.count-complete-tree-nodes","Title":"Count Complete Tree Nodes","TitleSlug":"count-complete-tree-nodes","PassRate":"27%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":223,"Dir":"./Algorithms/0223.rectangle-area","Title":"Rectangle Area","TitleSlug":"rectangle-area","PassRate":"33%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":224,"Dir":"./Algorithms/0224.basic-calculator","Title":"Basic Calculator","TitleSlug":"basic-calculator","PassRate":"27%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":225,"Dir":"./Algorithms/0225.implement-stack-using-queues","Title":"Implement Stack using Queues","TitleSlug":"implement-stack-using-queues","PassRate":"33%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":226,"Dir":"./Algorithms/0226.invert-binary-tree","Title":"Invert Binary Tree","TitleSlug":"invert-binary-tree","PassRate":"52%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":227,"Dir":"./Algorithms/0227.basic-calculator-ii","Title":"Basic Calculator II","TitleSlug":"basic-calculator-ii","PassRate":"29%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":228,"Dir":"./Algorithms/0228.summary-ranges","Title":"Summary Ranges","TitleSlug":"summary-ranges","PassRate":"30%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":229,"Dir":"./Algorithms/0229.majority-element-ii","Title":"Majority Element II","TitleSlug":"majority-element-ii","PassRate":"28%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":230,"Dir":"./Algorithms/0230.kth-smallest-element-in-a-bst","Title":"Kth Smallest Element in a BST","TitleSlug":"kth-smallest-element-in-a-bst","PassRate":"43%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":231,"Dir":"./Algorithms/0231.power-of-two","Title":"Power of Two","TitleSlug":"power-of-two","PassRate":"40%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":232,"Dir":"./Algorithms/0232.implement-queue-using-stacks","Title":"Implement Queue using Stacks","TitleSlug":"implement-queue-using-stacks","PassRate":"36%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":233,"Dir":"./Algorithms/0233.number-of-digit-one","Title":"Number of Digit One","TitleSlug":"number-of-digit-one","PassRate":"28%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":234,"Dir":"./Algorithms/0234.palindrome-linked-list","Title":"Palindrome Linked List","TitleSlug":"palindrome-linked-list","PassRate":"32%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":235,"Dir":"./Algorithms/0235.lowest-common-ancestor-of-a-binary-search-tree","Title":"Lowest Common Ancestor of a Binary Search Tree","TitleSlug":"lowest-common-ancestor-of-a-binary-search-tree","PassRate":"39%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":236,"Dir":"./Algorithms/0236.lowest-common-ancestor-of-a-binary-tree","Title":"Lowest Common Ancestor of a Binary Tree","TitleSlug":"lowest-common-ancestor-of-a-binary-tree","PassRate":"29%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":237,"Dir":"./Algorithms/0237.delete-node-in-a-linked-list","Title":"Delete Node in a Linked List","TitleSlug":"delete-node-in-a-linked-list","PassRate":"46%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":238,"Dir":"./Algorithms/0238.product-of-array-except-self","Title":"Product of Array Except Self","TitleSlug":"product-of-array-except-self","PassRate":"49%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":239,"Dir":"./Algorithms/0239.sliding-window-maximum","Title":"Sliding Window Maximum","TitleSlug":"sliding-window-maximum","PassRate":"33%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":240,"Dir":"./Algorithms/0240.search-a-2d-matrix-ii","Title":"Search a 2D Matrix II","TitleSlug":"search-a-2d-matrix-ii","PassRate":"38%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":241,"Dir":"./Algorithms/0241.different-ways-to-add-parentheses","Title":"Different Ways to Add Parentheses","TitleSlug":"different-ways-to-add-parentheses","PassRate":"44%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":242,"Dir":"./Algorithms/0242.valid-anagram","Title":"Valid Anagram","TitleSlug":"valid-anagram","PassRate":"46%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":257,"Dir":"./Algorithms/0257.binary-tree-paths","Title":"Binary Tree Paths","TitleSlug":"binary-tree-paths","PassRate":"38%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":258,"Dir":"./Algorithms/0258.add-digits","Title":"Add Digits","TitleSlug":"add-digits","PassRate":"51%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":260,"Dir":"./Algorithms/0260.single-number-iii","Title":"Single Number III","TitleSlug":"single-number-iii","PassRate":"51%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":263,"Dir":"./Algorithms/0263.ugly-number","Title":"Ugly Number","TitleSlug":"ugly-number","PassRate":"39%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":264,"Dir":"./Algorithms/0264.ugly-number-ii","Title":"Ugly Number II","TitleSlug":"ugly-number-ii","PassRate":"32%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":268,"Dir":"./Algorithms/0268.missing-number","Title":"Missing Number","TitleSlug":"missing-number","PassRate":"44%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":273,"Dir":"./Algorithms/0273.integer-to-english-words","Title":"Integer to English Words","TitleSlug":"integer-to-english-words","PassRate":"22%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":274,"Dir":"./Algorithms/0274.h-index","Title":"H-Index","TitleSlug":"h-index","PassRate":"33%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":275,"Dir":"./Algorithms/0275.h-index-ii","Title":"H-Index II","TitleSlug":"h-index-ii","PassRate":"34%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":278,"Dir":"./Algorithms/0278.first-bad-version","Title":"First Bad Version","TitleSlug":"first-bad-version","PassRate":"25%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":279,"Dir":"./Algorithms/0279.perfect-squares","Title":"Perfect Squares","TitleSlug":"perfect-squares","PassRate":"37%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":282,"Dir":"./Algorithms/0282.expression-add-operators","Title":"Expression Add Operators","TitleSlug":"expression-add-operators","PassRate":"29%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":283,"Dir":"./Algorithms/0283.move-zeroes","Title":"Move Zeroes","TitleSlug":"move-zeroes","PassRate":"50%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":284,"Dir":"./Algorithms/0284.peeking-iterator","Title":"Peeking Iterator","TitleSlug":"peeking-iterator","PassRate":"35%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":287,"Dir":"./Algorithms/0287.find-the-duplicate-number","Title":"Find the Duplicate Number","TitleSlug":"find-the-duplicate-number","PassRate":"43%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":289,"Dir":"./Algorithms/0289.game-of-life","Title":"Game of Life","TitleSlug":"game-of-life","PassRate":"37%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":290,"Dir":"./Algorithms/0290.word-pattern","Title":"Word Pattern","TitleSlug":"word-pattern","PassRate":"33%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":292,"Dir":"./Algorithms/0292.nim-game","Title":"Nim Game","TitleSlug":"nim-game","PassRate":"55%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":295,"Dir":"./Algorithms/0295.find-median-from-data-stream","Title":"Find Median from Data Stream","TitleSlug":"find-median-from-data-stream","PassRate":"26%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":297,"Dir":"./Algorithms/0297.serialize-and-deserialize-binary-tree","Title":"Serialize and Deserialize Binary Tree","TitleSlug":"serialize-and-deserialize-binary-tree","PassRate":"33%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":299,"Dir":"./Algorithms/0299.bulls-and-cows","Title":"Bulls and Cows","TitleSlug":"bulls-and-cows","PassRate":"34%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":300,"Dir":"./Algorithms/0300.longest-increasing-subsequence","Title":"Longest Increasing Subsequence","TitleSlug":"longest-increasing-subsequence","PassRate":"38%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":301,"Dir":"./Algorithms/0301.remove-invalid-parentheses","Title":"Remove Invalid Parentheses","TitleSlug":"remove-invalid-parentheses","PassRate":"35%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":303,"Dir":"./Algorithms/0303.range-sum-query-immutable","Title":"Range Sum Query - Immutable","TitleSlug":"range-sum-query-immutable","PassRate":"29%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":304,"Dir":"./Algorithms/0304.range-sum-query-2d-immutable","Title":"Range Sum Query 2D - Immutable","TitleSlug":"range-sum-query-2d-immutable","PassRate":"25%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":306,"Dir":"./Algorithms/0306.additive-number","Title":"Additive Number","TitleSlug":"additive-number","PassRate":"27%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":307,"Dir":"./Algorithms/0307.range-sum-query-mutable","Title":"Range Sum Query - Mutable","TitleSlug":"range-sum-query-mutable","PassRate":"20%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":309,"Dir":"./Algorithms/0309.best-time-to-buy-and-sell-stock-with-cooldown","Title":"Best Time to Buy and Sell Stock with Cooldown","TitleSlug":"best-time-to-buy-and-sell-stock-with-cooldown","PassRate":"40%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":310,"Dir":"./Algorithms/0310.minimum-height-trees","Title":"Minimum Height Trees","TitleSlug":"minimum-height-trees","PassRate":"28%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":312,"Dir":"./Algorithms/0312.burst-balloons","Title":"Burst Balloons","TitleSlug":"burst-balloons","PassRate":"42%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":313,"Dir":"./Algorithms/0313.super-ugly-number","Title":"Super Ugly Number","TitleSlug":"super-ugly-number","PassRate":"37%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":315,"Dir":"./Algorithms/0315.count-of-smaller-numbers-after-self","Title":"Count of Smaller Numbers After Self","TitleSlug":"count-of-smaller-numbers-after-self","PassRate":"34%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":316,"Dir":"./Algorithms/0316.remove-duplicate-letters","Title":"Remove Duplicate Letters","TitleSlug":"remove-duplicate-letters","PassRate":"29%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":318,"Dir":"./Algorithms/0318.maximum-product-of-word-lengths","Title":"Maximum Product of Word Lengths","TitleSlug":"maximum-product-of-word-lengths","PassRate":"44%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":319,"Dir":"./Algorithms/0319.bulb-switcher","Title":"Bulb Switcher","TitleSlug":"bulb-switcher","PassRate":"42%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":321,"Dir":"./Algorithms/0321.create-maximum-number","Title":"Create Maximum Number","TitleSlug":"create-maximum-number","PassRate":"24%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":322,"Dir":"./Algorithms/0322.coin-change","Title":"Coin Change","TitleSlug":"coin-change","PassRate":"26%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":324,"Dir":"./Algorithms/0324.wiggle-sort-ii","Title":"Wiggle Sort II","TitleSlug":"wiggle-sort-ii","PassRate":"26%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":326,"Dir":"./Algorithms/0326.power-of-three","Title":"Power of Three","TitleSlug":"power-of-three","PassRate":"40%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":327,"Dir":"./Algorithms/0327.count-of-range-sum","Title":"Count of Range Sum","TitleSlug":"count-of-range-sum","PassRate":"29%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":328,"Dir":"./Algorithms/0328.odd-even-linked-list","Title":"Odd Even Linked List","TitleSlug":"odd-even-linked-list","PassRate":"43%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":329,"Dir":"./Algorithms/0329.longest-increasing-path-in-a-matrix","Title":"Longest Increasing Path in a Matrix","TitleSlug":"longest-increasing-path-in-a-matrix","PassRate":"36%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":330,"Dir":"./Algorithms/0330.patching-array","Title":"Patching Array","TitleSlug":"patching-array","PassRate":"32%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":331,"Dir":"./Algorithms/0331.verify-preorder-serialization-of-a-binary-tree","Title":"Verify Preorder Serialization of a Binary Tree","TitleSlug":"verify-preorder-serialization-of-a-binary-tree","PassRate":"36%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":332,"Dir":"./Algorithms/0332.reconstruct-itinerary","Title":"Reconstruct Itinerary","TitleSlug":"reconstruct-itinerary","PassRate":"29%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":334,"Dir":"./Algorithms/0334.increasing-triplet-subsequence","Title":"Increasing Triplet Subsequence","TitleSlug":"increasing-triplet-subsequence","PassRate":"39%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":335,"Dir":"./Algorithms/0335.self-crossing","Title":"Self Crossing","TitleSlug":"self-crossing","PassRate":"25%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":336,"Dir":"./Algorithms/0336.palindrome-pairs","Title":"Palindrome Pairs","TitleSlug":"palindrome-pairs","PassRate":"26%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":337,"Dir":"./Algorithms/0337.house-robber-iii","Title":"House Robber III","TitleSlug":"house-robber-iii","PassRate":"43%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":338,"Dir":"./Algorithms/0338.counting-bits","Title":"Counting Bits","TitleSlug":"counting-bits","PassRate":"61%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":341,"Dir":"./Algorithms/0341.flatten-nested-list-iterator","Title":"Flatten Nested List Iterator","TitleSlug":"flatten-nested-list-iterator","PassRate":"41%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":342,"Dir":"./Algorithms/0342.power-of-four","Title":"Power of Four","TitleSlug":"power-of-four","PassRate":"38%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":343,"Dir":"./Algorithms/0343.integer-break","Title":"Integer Break","TitleSlug":"integer-break","PassRate":"46%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":344,"Dir":"./Algorithms/0344.reverse-string","Title":"Reverse String","TitleSlug":"reverse-string","PassRate":"59%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":345,"Dir":"./Algorithms/0345.reverse-vowels-of-a-string","Title":"Reverse Vowels of a String","TitleSlug":"reverse-vowels-of-a-string","PassRate":"38%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":347,"Dir":"./Algorithms/0347.top-k-frequent-elements","Title":"Top K Frequent Elements","TitleSlug":"top-k-frequent-elements","PassRate":"48%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":349,"Dir":"./Algorithms/0349.intersection-of-two-arrays","Title":"Intersection of Two Arrays","TitleSlug":"intersection-of-two-arrays","PassRate":"47%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":350,"Dir":"./Algorithms/0350.intersection-of-two-arrays-ii","Title":"Intersection of Two Arrays II","TitleSlug":"intersection-of-two-arrays-ii","PassRate":"44%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":352,"Dir":"./Algorithms/0352.data-stream-as-disjoint-intervals","Title":"Data Stream as Disjoint Intervals","TitleSlug":"data-stream-as-disjoint-intervals","PassRate":"40%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":354,"Dir":"./Algorithms/0354.russian-doll-envelopes","Title":"Russian Doll Envelopes","TitleSlug":"russian-doll-envelopes","PassRate":"32%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":355,"Dir":"./Algorithms/0355.design-twitter","Title":"Design Twitter","TitleSlug":"design-twitter","PassRate":"25%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":357,"Dir":"./Algorithms/0357.count-numbers-with-unique-digits","Title":"Count Numbers with Unique Digits","TitleSlug":"count-numbers-with-unique-digits","PassRate":"46%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":363,"Dir":"./Algorithms/0363.max-sum-of-rectangle-no-larger-than-k","Title":"Max Sum of Rectangle No Larger Than K","TitleSlug":"max-sum-of-rectangle-no-larger-than-k","PassRate":"33%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":365,"Dir":"./Algorithms/0365.water-and-jug-problem","Title":"Water and Jug Problem","TitleSlug":"water-and-jug-problem","PassRate":"27%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":367,"Dir":"./Algorithms/0367.valid-perfect-square","Title":"Valid Perfect Square","TitleSlug":"valid-perfect-square","PassRate":"38%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":368,"Dir":"./Algorithms/0368.largest-divisible-subset","Title":"Largest Divisible Subset","TitleSlug":"largest-divisible-subset","PassRate":"33%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":371,"Dir":"./Algorithms/0371.sum-of-two-integers","Title":"Sum of Two Integers","TitleSlug":"sum-of-two-integers","PassRate":"51%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":372,"Dir":"./Algorithms/0372.super-pow","Title":"Super Pow","TitleSlug":"super-pow","PassRate":"34%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":373,"Dir":"./Algorithms/0373.find-k-pairs-with-smallest-sums","Title":"Find K Pairs with Smallest Sums","TitleSlug":"find-k-pairs-with-smallest-sums","PassRate":"30%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":374,"Dir":"./Algorithms/0374.guess-number-higher-or-lower","Title":"Guess Number Higher or Lower","TitleSlug":"guess-number-higher-or-lower","PassRate":"35%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":375,"Dir":"./Algorithms/0375.guess-number-higher-or-lower-ii","Title":"Guess Number Higher or Lower II","TitleSlug":"guess-number-higher-or-lower-ii","PassRate":"35%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":376,"Dir":"./Algorithms/0376.wiggle-subsequence","Title":"Wiggle Subsequence","TitleSlug":"wiggle-subsequence","PassRate":"35%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":377,"Dir":"./Algorithms/0377.combination-sum-iv","Title":"Combination Sum IV","TitleSlug":"combination-sum-iv","PassRate":"42%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":378,"Dir":"./Algorithms/0378.kth-smallest-element-in-a-sorted-matrix","Title":"Kth Smallest Element in a Sorted Matrix","TitleSlug":"kth-smallest-element-in-a-sorted-matrix","PassRate":"44%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":380,"Dir":"./Algorithms/0380.insert-delete-getrandom-o1","Title":"Insert Delete GetRandom O(1)","TitleSlug":"insert-delete-getrandom-o1","PassRate":"39%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":381,"Dir":"./Algorithms/0381.insert-delete-getrandom-o1-duplicates-allowed","Title":"Insert Delete GetRandom O(1) - Duplicates allowed","TitleSlug":"insert-delete-getrandom-o1-duplicates-allowed","PassRate":"28%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":382,"Dir":"./Algorithms/0382.linked-list-random-node","Title":"Linked List Random Node","TitleSlug":"linked-list-random-node","PassRate":"46%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":383,"Dir":"./Algorithms/0383.ransom-note","Title":"Ransom Note","TitleSlug":"ransom-note","PassRate":"47%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":384,"Dir":"./Algorithms/0384.shuffle-an-array","Title":"Shuffle an Array","TitleSlug":"shuffle-an-array","PassRate":"46%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":385,"Dir":"./Algorithms/0385.mini-parser","Title":"Mini Parser","TitleSlug":"mini-parser","PassRate":"30%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":386,"Dir":"./Algorithms/0386.lexicographical-numbers","Title":"Lexicographical Numbers","TitleSlug":"lexicographical-numbers","PassRate":"41%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":387,"Dir":"./Algorithms/0387.first-unique-character-in-a-string","Title":"First Unique Character in a String","TitleSlug":"first-unique-character-in-a-string","PassRate":"46%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":388,"Dir":"./Algorithms/0388.longest-absolute-file-path","Title":"Longest Absolute File Path","TitleSlug":"longest-absolute-file-path","PassRate":"36%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":389,"Dir":"./Algorithms/0389.find-the-difference","Title":"Find the Difference","TitleSlug":"find-the-difference","PassRate":"50%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":390,"Dir":"./Algorithms/0390.elimination-game","Title":"Elimination Game","TitleSlug":"elimination-game","PassRate":"41%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":391,"Dir":"./Algorithms/0391.perfect-rectangle","Title":"Perfect Rectangle","TitleSlug":"perfect-rectangle","PassRate":"26%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":392,"Dir":"./Algorithms/0392.is-subsequence","Title":"Is Subsequence","TitleSlug":"is-subsequence","PassRate":"44%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":393,"Dir":"./Algorithms/0393.utf-8-validation","Title":"UTF-8 Validation","TitleSlug":"utf-8-validation","PassRate":"34%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":394,"Dir":"./Algorithms/0394.decode-string","Title":"Decode String","TitleSlug":"decode-string","PassRate":"41%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":395,"Dir":"./Algorithms/0395.longest-substring-with-at-least-k-repeating-characters","Title":"Longest Substring with At Least K Repeating Characters","TitleSlug":"longest-substring-with-at-least-k-repeating-characters","PassRate":"35%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":396,"Dir":"./Algorithms/0396.rotate-function","Title":"Rotate Function","TitleSlug":"rotate-function","PassRate":"32%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":397,"Dir":"./Algorithms/0397.integer-replacement","Title":"Integer Replacement","TitleSlug":"integer-replacement","PassRate":"30%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":398,"Dir":"./Algorithms/0398.random-pick-index","Title":"Random Pick Index","TitleSlug":"random-pick-index","PassRate":"43%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":399,"Dir":"./Algorithms/0399.evaluate-division","Title":"Evaluate Division","TitleSlug":"evaluate-division","PassRate":"40%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":400,"Dir":"./Algorithms/0400.nth-digit","Title":"Nth Digit","TitleSlug":"nth-digit","PassRate":"30%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":401,"Dir":"./Algorithms/0401.binary-watch","Title":"Binary Watch","TitleSlug":"binary-watch","PassRate":"44%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":402,"Dir":"./Algorithms/0402.remove-k-digits","Title":"Remove K Digits","TitleSlug":"remove-k-digits","PassRate":"26%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":403,"Dir":"./Algorithms/0403.frog-jump","Title":"Frog Jump","TitleSlug":"frog-jump","PassRate":"32%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":404,"Dir":"./Algorithms/0404.sum-of-left-leaves","Title":"Sum of Left Leaves","TitleSlug":"sum-of-left-leaves","PassRate":"46%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":405,"Dir":"./Algorithms/0405.convert-a-number-to-hexadecimal","Title":"Convert a Number to Hexadecimal","TitleSlug":"convert-a-number-to-hexadecimal","PassRate":"41%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":406,"Dir":"./Algorithms/0406.queue-reconstruction-by-height","Title":"Queue Reconstruction by Height","TitleSlug":"queue-reconstruction-by-height","PassRate":"55%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":407,"Dir":"./Algorithms/0407.trapping-rain-water-ii","Title":"Trapping Rain Water II","TitleSlug":"trapping-rain-water-ii","PassRate":"37%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":409,"Dir":"./Algorithms/0409.longest-palindrome","Title":"Longest Palindrome","TitleSlug":"longest-palindrome","PassRate":"45%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":410,"Dir":"./Algorithms/0410.split-array-largest-sum","Title":"Split Array Largest Sum","TitleSlug":"split-array-largest-sum","PassRate":"37%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":412,"Dir":"./Algorithms/0412.fizz-buzz","Title":"Fizz Buzz","TitleSlug":"fizz-buzz","PassRate":"58%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":413,"Dir":"./Algorithms/0413.arithmetic-slices","Title":"Arithmetic Slices","TitleSlug":"arithmetic-slices","PassRate":"54%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":414,"Dir":"./Algorithms/0414.third-maximum-number","Title":"Third Maximum Number","TitleSlug":"third-maximum-number","PassRate":"27%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":415,"Dir":"./Algorithms/0415.add-strings","Title":"Add Strings","TitleSlug":"add-strings","PassRate":"41%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":416,"Dir":"./Algorithms/0416.partition-equal-subset-sum","Title":"Partition Equal Subset Sum","TitleSlug":"partition-equal-subset-sum","PassRate":"39%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":417,"Dir":"./Algorithms/0417.pacific-atlantic-water-flow","Title":"Pacific Atlantic Water Flow","TitleSlug":"pacific-atlantic-water-flow","PassRate":"33%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":419,"Dir":"./Algorithms/0419.battleships-in-a-board","Title":"Battleships in a Board","TitleSlug":"battleships-in-a-board","PassRate":"61%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":420,"Dir":"./Algorithms/0420.strong-password-checker","Title":"Strong Password Checker","TitleSlug":"strong-password-checker","PassRate":"20%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":421,"Dir":"./Algorithms/0421.maximum-xor-of-two-numbers-in-an-array","Title":"Maximum XOR of Two Numbers in an Array","TitleSlug":"maximum-xor-of-two-numbers-in-an-array","PassRate":"46%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":423,"Dir":"./Algorithms/0423.reconstruct-original-digits-from-english","Title":"Reconstruct Original Digits from English","TitleSlug":"reconstruct-original-digits-from-english","PassRate":"44%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":424,"Dir":"./Algorithms/0424.longest-repeating-character-replacement","Title":"Longest Repeating Character Replacement","TitleSlug":"longest-repeating-character-replacement","PassRate":"42%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":432,"Dir":"./Algorithms/0432.all-oone-data-structure","Title":"All O`one Data Structure","TitleSlug":"all-oone-data-structure","PassRate":"28%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":433,"Dir":"./Draft/0433.minimum-genetic-mutation","Title":"Minimum Genetic Mutation","TitleSlug":"minimum-genetic-mutation","PassRate":"32%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":434,"Dir":"./Algorithms/0434.number-of-segments-in-a-string","Title":"Number of Segments in a String","TitleSlug":"number-of-segments-in-a-string","PassRate":"36%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":435,"Dir":"./Algorithms/0435.non-overlapping-intervals","Title":"Non-overlapping Intervals","TitleSlug":"non-overlapping-intervals","PassRate":"41%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":436,"Dir":"./Algorithms/0436.find-right-interval","Title":"Find Right Interval","TitleSlug":"find-right-interval","PassRate":"41%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":437,"Dir":"./Algorithms/0437.path-sum-iii","Title":"Path Sum III","TitleSlug":"path-sum-iii","PassRate":"39%","Difficulty":1,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":438,"Dir":"./Algorithms/0438.find-all-anagrams-in-a-string","Title":"Find All Anagrams in a String","TitleSlug":"find-all-anagrams-in-a-string","PassRate":"33%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":440,"Dir":"./Algorithms/0440.k-th-smallest-in-lexicographical-order","Title":"K-th Smallest in Lexicographical Order","TitleSlug":"k-th-smallest-in-lexicographical-order","PassRate":"24%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":441,"Dir":"./Algorithms/0441.arranging-coins","Title":"Arranging Coins","TitleSlug":"arranging-coins","PassRate":"36%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":442,"Dir":"./Algorithms/0442.find-all-duplicates-in-an-array","Title":"Find All Duplicates in an Array","TitleSlug":"find-all-duplicates-in-an-array","PassRate":"55%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":445,"Dir":"./Algorithms/0445.add-two-numbers-ii","Title":"Add Two Numbers II","TitleSlug":"add-two-numbers-ii","PassRate":"45%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":446,"Dir":"./Algorithms/0446.arithmetic-slices-ii-subsequence","Title":"Arithmetic Slices II - Subsequence","TitleSlug":"arithmetic-slices-ii-subsequence","PassRate":"26%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":447,"Dir":"./Algorithms/0447.number-of-boomerangs","Title":"Number of Boomerangs","TitleSlug":"number-of-boomerangs","PassRate":"45%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":448,"Dir":"./Algorithms/0448.find-all-numbers-disappeared-in-an-array","Title":"Find All Numbers Disappeared in an Array","TitleSlug":"find-all-numbers-disappeared-in-an-array","PassRate":"51%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":449,"Dir":"./Algorithms/0449.serialize-and-deserialize-bst","Title":"Serialize and Deserialize BST","TitleSlug":"serialize-and-deserialize-bst","PassRate":"42%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":450,"Dir":"./Algorithms/0450.delete-node-in-a-bst","Title":"Delete Node in a BST","TitleSlug":"delete-node-in-a-bst","PassRate":"36%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":451,"Dir":"./Algorithms/0451.sort-characters-by-frequency","Title":"Sort Characters By Frequency","TitleSlug":"sort-characters-by-frequency","PassRate":"50%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":452,"Dir":"./Algorithms/0452.minimum-number-of-arrows-to-burst-balloons","Title":"Minimum Number of Arrows to Burst Balloons","TitleSlug":"minimum-number-of-arrows-to-burst-balloons","PassRate":"44%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":453,"Dir":"./Algorithms/0453.minimum-moves-to-equal-array-elements","Title":"Minimum Moves to Equal Array Elements","TitleSlug":"minimum-moves-to-equal-array-elements","PassRate":"47%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":454,"Dir":"./Algorithms/0454.4sum-ii","Title":"4Sum II","TitleSlug":"4sum-ii","PassRate":"46%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":455,"Dir":"./Algorithms/0455.assign-cookies","Title":"Assign Cookies","TitleSlug":"assign-cookies","PassRate":"47%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":456,"Dir":"./Algorithms/0456.132-pattern","Title":"132 Pattern","TitleSlug":"132-pattern","PassRate":"28%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":457,"Dir":"./Draft/0457.circular-array-loop","Title":"Circular Array Loop","TitleSlug":"circular-array-loop","PassRate":"20%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":458,"Dir":"./Draft/0458.poor-pigs","Title":"Poor Pigs","TitleSlug":"poor-pigs","PassRate":"39%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":459,"Dir":"./Algorithms/0459.repeated-substring-pattern","Title":"Repeated Substring Pattern","TitleSlug":"repeated-substring-pattern","PassRate":"37%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":460,"Dir":"./Algorithms/0460.lfu-cache","Title":"LFU Cache","TitleSlug":"lfu-cache","PassRate":"23%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":461,"Dir":"./Algorithms/0461.hamming-distance","Title":"Hamming Distance","TitleSlug":"hamming-distance","PassRate":"70%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":462,"Dir":"./Algorithms/0462.minimum-moves-to-equal-array-elements-ii","Title":"Minimum Moves to Equal Array Elements II","TitleSlug":"minimum-moves-to-equal-array-elements-ii","PassRate":"51%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":463,"Dir":"./Algorithms/0463.island-perimeter","Title":"Island Perimeter","TitleSlug":"island-perimeter","PassRate":"57%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":464,"Dir":"./Algorithms/0464.can-i-win","Title":"Can I Win","TitleSlug":"can-i-win","PassRate":"24%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":466,"Dir":"./Algorithms/0466.count-the-repetitions","Title":"Count The Repetitions","TitleSlug":"count-the-repetitions","PassRate":"28%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":467,"Dir":"./Algorithms/0467.unique-substrings-in-wraparound-string","Title":"Unique Substrings in Wraparound String","TitleSlug":"unique-substrings-in-wraparound-string","PassRate":"32%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":468,"Dir":"./Algorithms/0468.validate-ip-address","Title":"Validate IP Address","TitleSlug":"validate-ip-address","PassRate":"20%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":472,"Dir":"./Algorithms/0472.concatenated-words","Title":"Concatenated Words","TitleSlug":"concatenated-words","PassRate":"30%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":473,"Dir":"./Algorithms/0473.matchsticks-to-square","Title":"Matchsticks to Square","TitleSlug":"matchsticks-to-square","PassRate":"35%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":474,"Dir":"./Algorithms/0474.ones-and-zeroes","Title":"Ones and Zeroes","TitleSlug":"ones-and-zeroes","PassRate":"38%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":475,"Dir":"./Algorithms/0475.heaters","Title":"Heaters","TitleSlug":"heaters","PassRate":"29%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":476,"Dir":"./Algorithms/0476.number-complement","Title":"Number Complement","TitleSlug":"number-complement","PassRate":"60%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":477,"Dir":"./Algorithms/0477.total-hamming-distance","Title":"Total Hamming Distance","TitleSlug":"total-hamming-distance","PassRate":"47%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":479,"Dir":"./Algorithms/0479.largest-palindrome-product","Title":"Largest Palindrome Product","TitleSlug":"largest-palindrome-product","PassRate":"23%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":480,"Dir":"./Algorithms/0480.sliding-window-median","Title":"Sliding Window Median","TitleSlug":"sliding-window-median","PassRate":"31%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":481,"Dir":"./Algorithms/0481.magical-string","Title":"Magical String","TitleSlug":"magical-string","PassRate":"45%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":482,"Dir":"./Algorithms/0482.license-key-formatting","Title":"License Key Formatting","TitleSlug":"license-key-formatting","PassRate":"41%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":483,"Dir":"./Algorithms/0483.smallest-good-base","Title":"Smallest Good Base","TitleSlug":"smallest-good-base","PassRate":"33%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":485,"Dir":"./Algorithms/0485.max-consecutive-ones","Title":"Max Consecutive Ones","TitleSlug":"max-consecutive-ones","PassRate":"53%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":486,"Dir":"./Algorithms/0486.predict-the-winner","Title":"Predict the Winner","TitleSlug":"predict-the-winner","PassRate":"44%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":488,"Dir":"./Algorithms/0488.zuma-game","Title":"Zuma Game","TitleSlug":"zuma-game","PassRate":"37%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":491,"Dir":"./Algorithms/0491.increasing-subsequences","Title":"Increasing Subsequences","TitleSlug":"increasing-subsequences","PassRate":"39%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":492,"Dir":"./Algorithms/0492.construct-the-rectangle","Title":"Construct the Rectangle","TitleSlug":"construct-the-rectangle","PassRate":"48%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":493,"Dir":"./Algorithms/0493.reverse-pairs","Title":"Reverse Pairs","TitleSlug":"reverse-pairs","PassRate":"20%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":494,"Dir":"./Algorithms/0494.target-sum","Title":"Target Sum","TitleSlug":"target-sum","PassRate":"43%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":495,"Dir":"./Algorithms/0495.teemo-attacking","Title":"Teemo Attacking","TitleSlug":"teemo-attacking","PassRate":"51%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":496,"Dir":"./Algorithms/0496.next-greater-element-i","Title":"Next Greater Element I","TitleSlug":"next-greater-element-i","PassRate":"56%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":498,"Dir":"./Algorithms/0498.diagonal-traverse","Title":"Diagonal Traverse","TitleSlug":"diagonal-traverse","PassRate":"45%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":500,"Dir":"./Algorithms/0500.keyboard-row","Title":"Keyboard Row","TitleSlug":"keyboard-row","PassRate":"59%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":501,"Dir":"./Algorithms/0501.find-mode-in-binary-search-tree","Title":"Find Mode in Binary Search Tree","TitleSlug":"find-mode-in-binary-search-tree","PassRate":"37%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":502,"Dir":"./Algorithms/0502.ipo","Title":"IPO","TitleSlug":"ipo","PassRate":"36%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":503,"Dir":"./Algorithms/0503.next-greater-element-ii","Title":"Next Greater Element II","TitleSlug":"next-greater-element-ii","PassRate":"46%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":504,"Dir":"./Algorithms/0504.base-7","Title":"Base 7","TitleSlug":"base-7","PassRate":"44%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":506,"Dir":"./Algorithms/0506.relative-ranks","Title":"Relative Ranks","TitleSlug":"relative-ranks","PassRate":"46%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":507,"Dir":"./Algorithms/0507.perfect-number","Title":"Perfect Number","TitleSlug":"perfect-number","PassRate":"33%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":508,"Dir":"./Algorithms/0508.most-frequent-subtree-sum","Title":"Most Frequent Subtree Sum","TitleSlug":"most-frequent-subtree-sum","PassRate":"52%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":513,"Dir":"./Algorithms/0513.find-bottom-left-tree-value","Title":"Find Bottom Left Tree Value","TitleSlug":"find-bottom-left-tree-value","PassRate":"55%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":514,"Dir":"./Algorithms/0514.freedom-trail","Title":"Freedom Trail","TitleSlug":"freedom-trail","PassRate":"39%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":515,"Dir":"./Algorithms/0515.find-largest-value-in-each-tree-row","Title":"Find Largest Value in Each Tree Row","TitleSlug":"find-largest-value-in-each-tree-row","PassRate":"54%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":516,"Dir":"./Algorithms/0516.longest-palindromic-subsequence","Title":"Longest Palindromic Subsequence","TitleSlug":"longest-palindromic-subsequence","PassRate":"42%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":517,"Dir":"./Algorithms/0517.super-washing-machines","Title":"Super Washing Machines","TitleSlug":"super-washing-machines","PassRate":"36%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":518,"Dir":"./Draft/0518.coin-change-2","Title":"Coin Change 2","TitleSlug":"coin-change-2","PassRate":"32%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":520,"Dir":"./Algorithms/0520.detect-capital","Title":"Detect Capital","TitleSlug":"detect-capital","PassRate":"51%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":521,"Dir":"./Algorithms/0521.longest-uncommon-subsequence-i","Title":"Longest Uncommon Subsequence I ","TitleSlug":"longest-uncommon-subsequence-i","PassRate":"55%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":522,"Dir":"./Algorithms/0522.longest-uncommon-subsequence-ii","Title":"Longest Uncommon Subsequence II","TitleSlug":"longest-uncommon-subsequence-ii","PassRate":"31%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":523,"Dir":"./Algorithms/0523.continuous-subarray-sum","Title":"Continuous Subarray Sum","TitleSlug":"continuous-subarray-sum","PassRate":"22%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":524,"Dir":"./Algorithms/0524.longest-word-in-dictionary-through-deleting","Title":"Longest Word in Dictionary through Deleting","TitleSlug":"longest-word-in-dictionary-through-deleting","PassRate":"42%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":525,"Dir":"./Algorithms/0525.contiguous-array","Title":"Contiguous Array","TitleSlug":"contiguous-array","PassRate":"39%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":526,"Dir":"./Algorithms/0526.beautiful-arrangement","Title":"Beautiful Arrangement","TitleSlug":"beautiful-arrangement","PassRate":"54%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":529,"Dir":"./Algorithms/0529.minesweeper","Title":"Minesweeper","TitleSlug":"minesweeper","PassRate":"49%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":530,"Dir":"./Algorithms/0530.minimum-absolute-difference-in-bst","Title":"Minimum Absolute Difference in BST","TitleSlug":"minimum-absolute-difference-in-bst","PassRate":"47%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":532,"Dir":"./Algorithms/0532.k-diff-pairs-in-an-array","Title":"K-diff Pairs in an Array","TitleSlug":"k-diff-pairs-in-an-array","PassRate":"28%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":535,"Dir":"./Algorithms/0535.encode-and-decode-tinyurl","Title":"Encode and Decode TinyURL","TitleSlug":"encode-and-decode-tinyurl","PassRate":"74%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":537,"Dir":"./Algorithms/0537.complex-number-multiplication","Title":"Complex Number Multiplication","TitleSlug":"complex-number-multiplication","PassRate":"63%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":538,"Dir":"./Algorithms/0538.convert-bst-to-greater-tree","Title":"Convert BST to Greater Tree","TitleSlug":"convert-bst-to-greater-tree","PassRate":"49%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":539,"Dir":"./Algorithms/0539.minimum-time-difference","Title":"Minimum Time Difference","TitleSlug":"minimum-time-difference","PassRate":"45%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":540,"Dir":"./Algorithms/0540.single-element-in-a-sorted-array","Title":"Single Element in a Sorted Array","TitleSlug":"single-element-in-a-sorted-array","PassRate":"55%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":541,"Dir":"./Algorithms/0541.reverse-string-ii","Title":"Reverse String II","TitleSlug":"reverse-string-ii","PassRate":"43%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":542,"Dir":"./Algorithms/0542.01-matrix","Title":"01 Matrix","TitleSlug":"01-matrix","PassRate":"33%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":543,"Dir":"./Algorithms/0543.diameter-of-binary-tree","Title":"Diameter of Binary Tree","TitleSlug":"diameter-of-binary-tree","PassRate":"43%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":546,"Dir":"./Algorithms/0546.remove-boxes","Title":"Remove Boxes","TitleSlug":"remove-boxes","PassRate":"33%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":547,"Dir":"./Algorithms/0547.friend-circles","Title":"Friend Circles","TitleSlug":"friend-circles","PassRate":"49%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":551,"Dir":"./Algorithms/0551.student-attendance-record-i","Title":"Student Attendance Record I","TitleSlug":"student-attendance-record-i","PassRate":"43%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":552,"Dir":"./Algorithms/0552.student-attendance-record-ii","Title":"Student Attendance Record II","TitleSlug":"student-attendance-record-ii","PassRate":"31%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":553,"Dir":"./Algorithms/0553.optimal-division","Title":"Optimal Division","TitleSlug":"optimal-division","PassRate":"55%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":554,"Dir":"./Algorithms/0554.brick-wall","Title":"Brick Wall","TitleSlug":"brick-wall","PassRate":"45%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":556,"Dir":"./Algorithms/0556.next-greater-element-iii","Title":"Next Greater Element III","TitleSlug":"next-greater-element-iii","PassRate":"28%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":557,"Dir":"./Algorithms/0557.reverse-words-in-a-string-iii","Title":"Reverse Words in a String III","TitleSlug":"reverse-words-in-a-string-iii","PassRate":"59%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":560,"Dir":"./Algorithms/0560.subarray-sum-equals-k","Title":"Subarray Sum Equals K","TitleSlug":"subarray-sum-equals-k","PassRate":"40%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":561,"Dir":"./Algorithms/0561.array-partition-i","Title":"Array Partition I","TitleSlug":"array-partition-i","PassRate":"67%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":563,"Dir":"./Algorithms/0563.binary-tree-tilt","Title":"Binary Tree Tilt","TitleSlug":"binary-tree-tilt","PassRate":"46%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":564,"Dir":"./Algorithms/0564.find-the-closest-palindrome","Title":"Find the Closest Palindrome","TitleSlug":"find-the-closest-palindrome","PassRate":"17%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":565,"Dir":"./Algorithms/0565.array-nesting","Title":"Array Nesting","TitleSlug":"array-nesting","PassRate":"49%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":566,"Dir":"./Algorithms/0566.reshape-the-matrix","Title":"Reshape the Matrix","TitleSlug":"reshape-the-matrix","PassRate":"58%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":567,"Dir":"./Algorithms/0567.permutation-in-string","Title":"Permutation in String","TitleSlug":"permutation-in-string","PassRate":"36%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":572,"Dir":"./Algorithms/0572.subtree-of-another-tree","Title":"Subtree of Another Tree","TitleSlug":"subtree-of-another-tree","PassRate":"40%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":575,"Dir":"./Algorithms/0575.distribute-candies","Title":"Distribute Candies","TitleSlug":"distribute-candies","PassRate":"59%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":576,"Dir":"./Algorithms/0576.out-of-boundary-paths","Title":"Out of Boundary Paths","TitleSlug":"out-of-boundary-paths","PassRate":"31%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":581,"Dir":"./Algorithms/0581.shortest-unsorted-continuous-subarray","Title":"Shortest Unsorted Continuous Subarray","TitleSlug":"shortest-unsorted-continuous-subarray","PassRate":"29%","Difficulty":1,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":583,"Dir":"./Algorithms/0583.delete-operation-for-two-strings","Title":"Delete Operation for Two Strings","TitleSlug":"delete-operation-for-two-strings","PassRate":"44%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":587,"Dir":"./Algorithms/0587.erect-the-fence","Title":"Erect the Fence","TitleSlug":"erect-the-fence","PassRate":"32%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":591,"Dir":"./Algorithms/0591.tag-validator","Title":"Tag Validator","TitleSlug":"tag-validator","PassRate":"28%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":592,"Dir":"./Algorithms/0592.fraction-addition-and-subtraction","Title":"Fraction Addition and Subtraction","TitleSlug":"fraction-addition-and-subtraction","PassRate":"46%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":593,"Dir":"./Algorithms/0593.valid-square","Title":"Valid Square","TitleSlug":"valid-square","PassRate":"39%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":594,"Dir":"./Algorithms/0594.longest-harmonious-subsequence","Title":"Longest Harmonious Subsequence","TitleSlug":"longest-harmonious-subsequence","PassRate":"40%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":598,"Dir":"./Algorithms/0598.range-addition-ii","Title":"Range Addition II","TitleSlug":"range-addition-ii","PassRate":"48%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":599,"Dir":"./Algorithms/0599.minimum-index-sum-of-two-lists","Title":"Minimum Index Sum of Two Lists","TitleSlug":"minimum-index-sum-of-two-lists","PassRate":"46%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":600,"Dir":"./Algorithms/0600.non-negative-integers-without-consecutive-ones","Title":"Non-negative Integers without Consecutive Ones","TitleSlug":"non-negative-integers-without-consecutive-ones","PassRate":"29%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":605,"Dir":"./Algorithms/0605.can-place-flowers","Title":"Can Place Flowers","TitleSlug":"can-place-flowers","PassRate":"30%","Difficulty":1,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":606,"Dir":"./Algorithms/0606.construct-string-from-binary-tree","Title":"Construct String from Binary Tree","TitleSlug":"construct-string-from-binary-tree","PassRate":"49%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":609,"Dir":"./Algorithms/0609.find-duplicate-file-in-system","Title":"Find Duplicate File in System","TitleSlug":"find-duplicate-file-in-system","PassRate":"52%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":611,"Dir":"./Algorithms/0611.valid-triangle-number","Title":"Valid Triangle Number","TitleSlug":"valid-triangle-number","PassRate":"41%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":617,"Dir":"./Algorithms/0617.merge-two-binary-trees","Title":"Merge Two Binary Trees","TitleSlug":"merge-two-binary-trees","PassRate":"68%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":621,"Dir":"./Algorithms/0621.task-scheduler","Title":"Task Scheduler","TitleSlug":"task-scheduler","PassRate":"42%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":623,"Dir":"./Algorithms/0623.add-one-row-to-tree","Title":"Add One Row to Tree","TitleSlug":"add-one-row-to-tree","PassRate":"46%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":628,"Dir":"./Algorithms/0628.maximum-product-of-three-numbers","Title":"Maximum Product of Three Numbers","TitleSlug":"maximum-product-of-three-numbers","PassRate":"45%","Difficulty":1,"IsAccepted":true,"IsFavor":true,"IsNew":false},{"ID":629,"Dir":"./Algorithms/0629.k-inverse-pairs-array","Title":"K Inverse Pairs Array","TitleSlug":"k-inverse-pairs-array","PassRate":"25%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":630,"Dir":"./Algorithms/0630.course-schedule-iii","Title":"Course Schedule III","TitleSlug":"course-schedule-iii","PassRate":"26%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":632,"Dir":"./Algorithms/0632.smallest-range","Title":"Smallest Range","TitleSlug":"smallest-range","PassRate":"42%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":633,"Dir":"./Algorithms/0633.sum-of-square-numbers","Title":"Sum of Square Numbers","TitleSlug":"sum-of-square-numbers","PassRate":"31%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":636,"Dir":"./Algorithms/0636.exclusive-time-of-functions","Title":"Exclusive Time of Functions","TitleSlug":"exclusive-time-of-functions","PassRate":"41%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":637,"Dir":"./Algorithms/0637.average-of-levels-in-binary-tree","Title":"Average of Levels in Binary Tree","TitleSlug":"average-of-levels-in-binary-tree","PassRate":"56%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":638,"Dir":"./Algorithms/0638.shopping-offers","Title":"Shopping Offers","TitleSlug":"shopping-offers","PassRate":"42%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":639,"Dir":"./Algorithms/0639.decode-ways-ii","Title":"Decode Ways II","TitleSlug":"decode-ways-ii","PassRate":"23%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":640,"Dir":"./Algorithms/0640.solve-the-equation","Title":"Solve the Equation","TitleSlug":"solve-the-equation","PassRate":"38%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":643,"Dir":"./Algorithms/0643.maximum-average-subarray-i","Title":"Maximum Average Subarray I","TitleSlug":"maximum-average-subarray-i","PassRate":"37%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":645,"Dir":"./Algorithms/0645.set-mismatch","Title":"Set Mismatch","TitleSlug":"set-mismatch","PassRate":"40%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":646,"Dir":"./Algorithms/0646.maximum-length-of-pair-chain","Title":"Maximum Length of Pair Chain","TitleSlug":"maximum-length-of-pair-chain","PassRate":"47%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":647,"Dir":"./Algorithms/0647.palindromic-substrings","Title":"Palindromic Substrings","TitleSlug":"palindromic-substrings","PassRate":"55%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":648,"Dir":"./Algorithms/0648.replace-words","Title":"Replace Words","TitleSlug":"replace-words","PassRate":"47%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":649,"Dir":"./Algorithms/0649.dota2-senate","Title":"Dota2 Senate","TitleSlug":"dota2-senate","PassRate":"35%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":650,"Dir":"./Algorithms/0650.2-keys-keyboard","Title":"2 Keys Keyboard","TitleSlug":"2-keys-keyboard","PassRate":"43%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":652,"Dir":"./Algorithms/0652.find-duplicate-subtrees","Title":"Find Duplicate Subtrees","TitleSlug":"find-duplicate-subtrees","PassRate":"33%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":653,"Dir":"./Algorithms/0653.two-sum-iv-input-is-a-bst","Title":"Two Sum IV - Input is a BST","TitleSlug":"two-sum-iv-input-is-a-bst","PassRate":"50%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":654,"Dir":"./Algorithms/0654.maximum-binary-tree","Title":"Maximum Binary Tree","TitleSlug":"maximum-binary-tree","PassRate":"70%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":655,"Dir":"./Algorithms/0655.print-binary-tree","Title":"Print Binary Tree","TitleSlug":"print-binary-tree","PassRate":"50%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":657,"Dir":"./Algorithms/0657.judge-route-circle","Title":"Judge Route Circle","TitleSlug":"judge-route-circle","PassRate":"69%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":658,"Dir":"./Algorithms/0658.find-k-closest-elements","Title":"Find K Closest Elements","TitleSlug":"find-k-closest-elements","PassRate":"36%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":659,"Dir":"./Algorithms/0659.split-array-into-consecutive-subsequences","Title":"Split Array into Consecutive Subsequences","TitleSlug":"split-array-into-consecutive-subsequences","PassRate":"34%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":661,"Dir":"./Algorithms/0661.image-smoother","Title":"Image Smoother","TitleSlug":"image-smoother","PassRate":"46%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":662,"Dir":"./Algorithms/0662.maximum-width-of-binary-tree","Title":"Maximum Width of Binary Tree","TitleSlug":"maximum-width-of-binary-tree","PassRate":"36%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":664,"Dir":"./Algorithms/0664.strange-printer","Title":"Strange Printer","TitleSlug":"strange-printer","PassRate":"30%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":665,"Dir":"./Algorithms/0665.non-decreasing-array","Title":"Non-decreasing Array","TitleSlug":"non-decreasing-array","PassRate":"21%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":667,"Dir":"./Algorithms/0667.beautiful-arrangement-ii","Title":"Beautiful Arrangement II","TitleSlug":"beautiful-arrangement-ii","PassRate":"51%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false},{"ID":668,"Dir":"./Algorithms/0668.kth-smallest-number-in-multiplication-table","Title":"Kth Smallest Number in Multiplication Table","TitleSlug":"kth-smallest-number-in-multiplication-table","PassRate":"36%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":669,"Dir":"./Algorithms/0669.trim-a-binary-search-tree","Title":"Trim a Binary Search Tree","TitleSlug":"trim-a-binary-search-tree","PassRate":"59%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":670,"Dir":"./Algorithms/0670.maximum-swap","Title":"Maximum Swap","TitleSlug":"maximum-swap","PassRate":"37%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":671,"Dir":"./Algorithms/0671.second-minimum-node-in-a-binary-tree","Title":"Second Minimum Node In a Binary Tree","TitleSlug":"second-minimum-node-in-a-binary-tree","PassRate":"42%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":672,"Dir":"./Algorithms/0672.bulb-switcher-ii","Title":"Bulb Switcher II","TitleSlug":"bulb-switcher-ii","PassRate":"45%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false},{"ID":673,"Dir":"./Algorithms/0673.number-of-longest-increasing-subsequence","Title":"Number of Longest Increasing Subsequence","TitleSlug":"number-of-longest-increasing-subsequence","PassRate":"30%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":true},{"ID":674,"Dir":"./Algorithms/0674.longest-continuous-increasing-subsequence","Title":"Longest Continuous Increasing Subsequence","TitleSlug":"longest-continuous-increasing-subsequence","PassRate":"44%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":true},{"ID":675,"Dir":"./Algorithms/0675.cut-off-trees-for-golf-event","Title":"Cut Off Trees for Golf Event","TitleSlug":"cut-off-trees-for-golf-event","PassRate":"26%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":true},{"ID":676,"Dir":"./Algorithms/0676.implement-magic-dictionary","Title":"Implement Magic Dictionary","TitleSlug":"implement-magic-dictionary","PassRate":"51%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":true}]} \ No newline at end of file +{"Username":"aQuaYi","Problems":[{"ID":763,"Dir":"./Algorithms/0763.special-binary-string","Title":"Special Binary String","TitleSlug":"special-binary-string","PassRate":"32%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":true,"IsAvailable":true},{"ID":762,"Dir":"./Algorithms/0762.find-anagram-mappings","Title":"Find Anagram Mappings","TitleSlug":"find-anagram-mappings","PassRate":"81%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":true,"IsAvailable":true},{"ID":761,"Dir":"./Algorithms/0761.employee-free-time","Title":"Employee Free Time","TitleSlug":"employee-free-time","PassRate":"49%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":true,"IsAvailable":true},{"ID":759,"Dir":"./Algorithms/0759.set-intersection-size-at-least-two","Title":"Set Intersection Size At Least Two","TitleSlug":"set-intersection-size-at-least-two","PassRate":"33%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":757,"Dir":"./Algorithms/0757.pyramid-transition-matrix","Title":"Pyramid Transition Matrix","TitleSlug":"pyramid-transition-matrix","PassRate":"41%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":756,"Dir":"./Algorithms/0756.pour-water","Title":"Pour Water","TitleSlug":"pour-water","PassRate":"33%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":755,"Dir":"./Algorithms/0755.reach-a-number","Title":"Reach a Number","TitleSlug":"reach-a-number","PassRate":"23%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":754,"Dir":"./Algorithms/0754.cracking-the-safe","Title":"Cracking the Safe","TitleSlug":"cracking-the-safe","PassRate":"39%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":753,"Dir":"./Algorithms/0753.open-the-lock","Title":"Open the Lock","TitleSlug":"open-the-lock","PassRate":"37%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":750,"Dir":"./Algorithms/0750.contain-virus","Title":"Contain Virus","TitleSlug":"contain-virus","PassRate":"39%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":749,"Dir":"./Algorithms/0749.shortest-completing-word","Title":"Shortest Completing Word","TitleSlug":"shortest-completing-word","PassRate":"54%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":748,"Dir":"./Algorithms/0748.largest-number-at-least-twice-of-others","Title":"Largest Number At Least Twice of Others","TitleSlug":"largest-number-at-least-twice-of-others","PassRate":"45%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":747,"Dir":"./Algorithms/0747.min-cost-climbing-stairs","Title":"Min Cost Climbing Stairs","TitleSlug":"min-cost-climbing-stairs","PassRate":"44%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":746,"Dir":"./Algorithms/0746.prefix-and-suffix-search","Title":"Prefix and Suffix Search","TitleSlug":"prefix-and-suffix-search","PassRate":"23%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":745,"Dir":"./Algorithms/0745.find-smallest-letter-greater-than-target","Title":"Find Smallest Letter Greater Than Target","TitleSlug":"find-smallest-letter-greater-than-target","PassRate":"47%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":744,"Dir":"./Algorithms/0744.network-delay-time","Title":"Network Delay Time","TitleSlug":"network-delay-time","PassRate":"33%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":741,"Dir":"./Algorithms/0741.cherry-pickup","Title":"Cherry Pickup","TitleSlug":"cherry-pickup","PassRate":"22%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":740,"Dir":"./Algorithms/0740.delete-and-earn","Title":"Delete and Earn","TitleSlug":"delete-and-earn","PassRate":"42%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":739,"Dir":"./Algorithms/0739.daily-temperatures","Title":"Daily Temperatures","TitleSlug":"daily-temperatures","PassRate":"53%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":738,"Dir":"./Algorithms/0738.monotone-increasing-digits","Title":"Monotone Increasing Digits","TitleSlug":"monotone-increasing-digits","PassRate":"41%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":736,"Dir":"./Algorithms/0736.parse-lisp-expression","Title":"Parse Lisp Expression","TitleSlug":"parse-lisp-expression","PassRate":"41%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":735,"Dir":"./Algorithms/0735.asteroid-collision","Title":"Asteroid Collision","TitleSlug":"asteroid-collision","PassRate":"37%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":733,"Dir":"./Algorithms/0733.flood-fill","Title":"Flood Fill","TitleSlug":"flood-fill","PassRate":"48%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":732,"Dir":"./Algorithms/0732.my-calendar-iii","Title":"My Calendar III","TitleSlug":"my-calendar-iii","PassRate":"54%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":731,"Dir":"./Algorithms/0731.my-calendar-ii","Title":"My Calendar II","TitleSlug":"my-calendar-ii","PassRate":"36%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":730,"Dir":"./Algorithms/0730.count-different-palindromic-subsequences","Title":"Count Different Palindromic Subsequences","TitleSlug":"count-different-palindromic-subsequences","PassRate":"34%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":729,"Dir":"./Algorithms/0729.my-calendar-i","Title":"My Calendar I","TitleSlug":"my-calendar-i","PassRate":"41%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":728,"Dir":"./Algorithms/0728.self-dividing-numbers","Title":"Self Dividing Numbers","TitleSlug":"self-dividing-numbers","PassRate":"67%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":726,"Dir":"./Algorithms/0726.number-of-atoms","Title":"Number of Atoms","TitleSlug":"number-of-atoms","PassRate":"44%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":725,"Dir":"./Algorithms/0725.split-linked-list-in-parts","Title":"Split Linked List in Parts","TitleSlug":"split-linked-list-in-parts","PassRate":"48%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":724,"Dir":"./Algorithms/0724.find-pivot-index","Title":"Find Pivot Index","TitleSlug":"find-pivot-index","PassRate":"40%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":722,"Dir":"./Algorithms/0722.remove-comments","Title":"Remove Comments","TitleSlug":"remove-comments","PassRate":"26%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":721,"Dir":"./Algorithms/0721.accounts-merge","Title":"Accounts Merge","TitleSlug":"accounts-merge","PassRate":"31%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":720,"Dir":"./Algorithms/0720.longest-word-in-dictionary","Title":"Longest Word in Dictionary","TitleSlug":"longest-word-in-dictionary","PassRate":"41%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":719,"Dir":"./Algorithms/0719.find-k-th-smallest-pair-distance","Title":"Find K-th Smallest Pair Distance","TitleSlug":"find-k-th-smallest-pair-distance","PassRate":"26%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":718,"Dir":"./Algorithms/0718.maximum-length-of-repeated-subarray","Title":"Maximum Length of Repeated Subarray","TitleSlug":"maximum-length-of-repeated-subarray","PassRate":"40%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":717,"Dir":"./Algorithms/0717.1-bit-and-2-bit-characters","Title":"1-bit and 2-bit Characters","TitleSlug":"1-bit-and-2-bit-characters","PassRate":"49%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":715,"Dir":"./Algorithms/0715.range-module","Title":"Range Module","TitleSlug":"range-module","PassRate":"31%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":714,"Dir":"./Algorithms/0714.best-time-to-buy-and-sell-stock-with-transaction-fee","Title":"Best Time to Buy and Sell Stock with Transaction Fee","TitleSlug":"best-time-to-buy-and-sell-stock-with-transaction-fee","PassRate":"43%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":713,"Dir":"./Algorithms/0713.subarray-product-less-than-k","Title":"Subarray Product Less Than K","TitleSlug":"subarray-product-less-than-k","PassRate":"33%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":712,"Dir":"./Algorithms/0712.minimum-ascii-delete-sum-for-two-strings","Title":"Minimum ASCII Delete Sum for Two Strings","TitleSlug":"minimum-ascii-delete-sum-for-two-strings","PassRate":"51%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":699,"Dir":"./Algorithms/0699.falling-squares","Title":"Falling Squares","TitleSlug":"falling-squares","PassRate":"37%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":698,"Dir":"./Algorithms/0698.partition-to-k-equal-sum-subsets","Title":"Partition to K Equal Sum Subsets","TitleSlug":"partition-to-k-equal-sum-subsets","PassRate":"37%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":697,"Dir":"./Algorithms/0697.degree-of-an-array","Title":"Degree of an Array","TitleSlug":"degree-of-an-array","PassRate":"47%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":696,"Dir":"./Algorithms/0696.count-binary-substrings","Title":"Count Binary Substrings","TitleSlug":"count-binary-substrings","PassRate":"51%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":695,"Dir":"./Algorithms/0695.max-area-of-island","Title":"Max Area of Island","TitleSlug":"max-area-of-island","PassRate":"52%","Difficulty":1,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":693,"Dir":"./Algorithms/0693.binary-number-with-alternating-bits","Title":"Binary Number with Alternating Bits","TitleSlug":"binary-number-with-alternating-bits","PassRate":"55%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":692,"Dir":"./Algorithms/0692.top-k-frequent-words","Title":"Top K Frequent Words","TitleSlug":"top-k-frequent-words","PassRate":"41%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":691,"Dir":"./Algorithms/0691.stickers-to-spell-word","Title":"Stickers to Spell Word","TitleSlug":"stickers-to-spell-word","PassRate":"34%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":690,"Dir":"./Algorithms/0690.employee-importance","Title":"Employee Importance","TitleSlug":"employee-importance","PassRate":"52%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false,"IsAvailable":false},{"ID":689,"Dir":"./Algorithms/0689.maximum-sum-of-3-non-overlapping-subarrays","Title":"Maximum Sum of 3 Non-Overlapping Subarrays","TitleSlug":"maximum-sum-of-3-non-overlapping-subarrays","PassRate":"41%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":688,"Dir":"./Algorithms/0688.knight-probability-in-chessboard","Title":"Knight Probability in Chessboard","TitleSlug":"knight-probability-in-chessboard","PassRate":"39%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":687,"Dir":"./Algorithms/0687.longest-univalue-path","Title":"Longest Univalue Path","TitleSlug":"longest-univalue-path","PassRate":"33%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":686,"Dir":"./Algorithms/0686.repeated-string-match","Title":"Repeated String Match","TitleSlug":"repeated-string-match","PassRate":"34%","Difficulty":1,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":685,"Dir":"./Algorithms/0685.redundant-connection-ii","Title":"Redundant Connection II","TitleSlug":"redundant-connection-ii","PassRate":"28%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":684,"Dir":"./Algorithms/0684.redundant-connection","Title":"Redundant Connection","TitleSlug":"redundant-connection","PassRate":"42%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":682,"Dir":"./Algorithms/0682.baseball-game","Title":"Baseball Game","TitleSlug":"baseball-game","PassRate":"58%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":680,"Dir":"./Algorithms/0680.valid-palindrome-ii","Title":"Valid Palindrome II","TitleSlug":"valid-palindrome-ii","PassRate":"32%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":679,"Dir":"./Algorithms/0679.24-game","Title":"24 Game","TitleSlug":"24-game","PassRate":"38%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":678,"Dir":"./Algorithms/0678.valid-parenthesis-string","Title":"Valid Parenthesis String","TitleSlug":"valid-parenthesis-string","PassRate":"29%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":677,"Dir":"./Algorithms/0677.map-sum-pairs","Title":"Map Sum Pairs","TitleSlug":"map-sum-pairs","PassRate":"52%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":676,"Dir":"./Algorithms/0676.implement-magic-dictionary","Title":"Implement Magic Dictionary","TitleSlug":"implement-magic-dictionary","PassRate":"49%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":675,"Dir":"./Algorithms/0675.cut-off-trees-for-golf-event","Title":"Cut Off Trees for Golf Event","TitleSlug":"cut-off-trees-for-golf-event","PassRate":"27%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":674,"Dir":"./Algorithms/0674.longest-continuous-increasing-subsequence","Title":"Longest Continuous Increasing Subsequence","TitleSlug":"longest-continuous-increasing-subsequence","PassRate":"42%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":673,"Dir":"./Algorithms/0673.number-of-longest-increasing-subsequence","Title":"Number of Longest Increasing Subsequence","TitleSlug":"number-of-longest-increasing-subsequence","PassRate":"31%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":672,"Dir":"./Algorithms/0672.bulb-switcher-ii","Title":"Bulb Switcher II","TitleSlug":"bulb-switcher-ii","PassRate":"48%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":671,"Dir":"./Algorithms/0671.second-minimum-node-in-a-binary-tree","Title":"Second Minimum Node In a Binary Tree","TitleSlug":"second-minimum-node-in-a-binary-tree","PassRate":"41%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":670,"Dir":"./Algorithms/0670.maximum-swap","Title":"Maximum Swap","TitleSlug":"maximum-swap","PassRate":"38%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":669,"Dir":"./Algorithms/0669.trim-a-binary-search-tree","Title":"Trim a Binary Search Tree","TitleSlug":"trim-a-binary-search-tree","PassRate":"58%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":668,"Dir":"./Algorithms/0668.kth-smallest-number-in-multiplication-table","Title":"Kth Smallest Number in Multiplication Table","TitleSlug":"kth-smallest-number-in-multiplication-table","PassRate":"39%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":667,"Dir":"./Algorithms/0667.beautiful-arrangement-ii","Title":"Beautiful Arrangement II","TitleSlug":"beautiful-arrangement-ii","PassRate":"51%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":665,"Dir":"./Algorithms/0665.non-decreasing-array","Title":"Non-decreasing Array","TitleSlug":"non-decreasing-array","PassRate":"20%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":664,"Dir":"./Algorithms/0664.strange-printer","Title":"Strange Printer","TitleSlug":"strange-printer","PassRate":"33%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":662,"Dir":"./Algorithms/0662.maximum-width-of-binary-tree","Title":"Maximum Width of Binary Tree","TitleSlug":"maximum-width-of-binary-tree","PassRate":"38%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":661,"Dir":"./Algorithms/0661.image-smoother","Title":"Image Smoother","TitleSlug":"image-smoother","PassRate":"45%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":659,"Dir":"./Algorithms/0659.split-array-into-consecutive-subsequences","Title":"Split Array into Consecutive Subsequences","TitleSlug":"split-array-into-consecutive-subsequences","PassRate":"36%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":658,"Dir":"./Algorithms/0658.find-k-closest-elements","Title":"Find K Closest Elements","TitleSlug":"find-k-closest-elements","PassRate":"35%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":657,"Dir":"./Algorithms/0657.judge-route-circle","Title":"Judge Route Circle","TitleSlug":"judge-route-circle","PassRate":"68%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":655,"Dir":"./Algorithms/0655.print-binary-tree","Title":"Print Binary Tree","TitleSlug":"print-binary-tree","PassRate":"49%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":654,"Dir":"./Algorithms/0654.maximum-binary-tree","Title":"Maximum Binary Tree","TitleSlug":"maximum-binary-tree","PassRate":"70%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":653,"Dir":"./Algorithms/0653.two-sum-iv-input-is-a-bst","Title":"Two Sum IV - Input is a BST","TitleSlug":"two-sum-iv-input-is-a-bst","PassRate":"50%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":652,"Dir":"./Algorithms/0652.find-duplicate-subtrees","Title":"Find Duplicate Subtrees","TitleSlug":"find-duplicate-subtrees","PassRate":"37%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":650,"Dir":"./Algorithms/0650.2-keys-keyboard","Title":"2 Keys Keyboard","TitleSlug":"2-keys-keyboard","PassRate":"44%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":649,"Dir":"./Algorithms/0649.dota2-senate","Title":"Dota2 Senate","TitleSlug":"dota2-senate","PassRate":"36%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":648,"Dir":"./Algorithms/0648.replace-words","Title":"Replace Words","TitleSlug":"replace-words","PassRate":"47%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":647,"Dir":"./Algorithms/0647.palindromic-substrings","Title":"Palindromic Substrings","TitleSlug":"palindromic-substrings","PassRate":"55%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":646,"Dir":"./Algorithms/0646.maximum-length-of-pair-chain","Title":"Maximum Length of Pair Chain","TitleSlug":"maximum-length-of-pair-chain","PassRate":"47%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":645,"Dir":"./Algorithms/0645.set-mismatch","Title":"Set Mismatch","TitleSlug":"set-mismatch","PassRate":"40%","Difficulty":1,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":643,"Dir":"./Algorithms/0643.maximum-average-subarray-i","Title":"Maximum Average Subarray I","TitleSlug":"maximum-average-subarray-i","PassRate":"37%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":640,"Dir":"./Algorithms/0640.solve-the-equation","Title":"Solve the Equation","TitleSlug":"solve-the-equation","PassRate":"38%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":639,"Dir":"./Algorithms/0639.decode-ways-ii","Title":"Decode Ways II","TitleSlug":"decode-ways-ii","PassRate":"24%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":638,"Dir":"./Algorithms/0638.shopping-offers","Title":"Shopping Offers","TitleSlug":"shopping-offers","PassRate":"44%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":637,"Dir":"./Algorithms/0637.average-of-levels-in-binary-tree","Title":"Average of Levels in Binary Tree","TitleSlug":"average-of-levels-in-binary-tree","PassRate":"55%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":636,"Dir":"./Algorithms/0636.exclusive-time-of-functions","Title":"Exclusive Time of Functions","TitleSlug":"exclusive-time-of-functions","PassRate":"44%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":633,"Dir":"./Algorithms/0633.sum-of-square-numbers","Title":"Sum of Square Numbers","TitleSlug":"sum-of-square-numbers","PassRate":"32%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":632,"Dir":"./Algorithms/0632.smallest-range","Title":"Smallest Range","TitleSlug":"smallest-range","PassRate":"42%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":630,"Dir":"./Algorithms/0630.course-schedule-iii","Title":"Course Schedule III","TitleSlug":"course-schedule-iii","PassRate":"28%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":629,"Dir":"./Algorithms/0629.k-inverse-pairs-array","Title":"K Inverse Pairs Array","TitleSlug":"k-inverse-pairs-array","PassRate":"26%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":628,"Dir":"./Algorithms/0628.maximum-product-of-three-numbers","Title":"Maximum Product of Three Numbers","TitleSlug":"maximum-product-of-three-numbers","PassRate":"45%","Difficulty":1,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":623,"Dir":"./Algorithms/0623.add-one-row-to-tree","Title":"Add One Row to Tree","TitleSlug":"add-one-row-to-tree","PassRate":"46%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":621,"Dir":"./Algorithms/0621.task-scheduler","Title":"Task Scheduler","TitleSlug":"task-scheduler","PassRate":"42%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":617,"Dir":"./Algorithms/0617.merge-two-binary-trees","Title":"Merge Two Binary Trees","TitleSlug":"merge-two-binary-trees","PassRate":"67%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":611,"Dir":"./Algorithms/0611.valid-triangle-number","Title":"Valid Triangle Number","TitleSlug":"valid-triangle-number","PassRate":"42%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":609,"Dir":"./Algorithms/0609.find-duplicate-file-in-system","Title":"Find Duplicate File in System","TitleSlug":"find-duplicate-file-in-system","PassRate":"52%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":606,"Dir":"./Algorithms/0606.construct-string-from-binary-tree","Title":"Construct String from Binary Tree","TitleSlug":"construct-string-from-binary-tree","PassRate":"49%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":605,"Dir":"./Algorithms/0605.can-place-flowers","Title":"Can Place Flowers","TitleSlug":"can-place-flowers","PassRate":"30%","Difficulty":1,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":600,"Dir":"./Algorithms/0600.non-negative-integers-without-consecutive-ones","Title":"Non-negative Integers without Consecutive Ones","TitleSlug":"non-negative-integers-without-consecutive-ones","PassRate":"31%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":599,"Dir":"./Algorithms/0599.minimum-index-sum-of-two-lists","Title":"Minimum Index Sum of Two Lists","TitleSlug":"minimum-index-sum-of-two-lists","PassRate":"46%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":598,"Dir":"./Algorithms/0598.range-addition-ii","Title":"Range Addition II","TitleSlug":"range-addition-ii","PassRate":"48%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":594,"Dir":"./Algorithms/0594.longest-harmonious-subsequence","Title":"Longest Harmonious Subsequence","TitleSlug":"longest-harmonious-subsequence","PassRate":"41%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":593,"Dir":"./Algorithms/0593.valid-square","Title":"Valid Square","TitleSlug":"valid-square","PassRate":"40%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":592,"Dir":"./Algorithms/0592.fraction-addition-and-subtraction","Title":"Fraction Addition and Subtraction","TitleSlug":"fraction-addition-and-subtraction","PassRate":"45%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":591,"Dir":"./Algorithms/0591.tag-validator","Title":"Tag Validator","TitleSlug":"tag-validator","PassRate":"30%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":587,"Dir":"./Algorithms/0587.erect-the-fence","Title":"Erect the Fence","TitleSlug":"erect-the-fence","PassRate":"32%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":583,"Dir":"./Algorithms/0583.delete-operation-for-two-strings","Title":"Delete Operation for Two Strings","TitleSlug":"delete-operation-for-two-strings","PassRate":"44%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":581,"Dir":"./Algorithms/0581.shortest-unsorted-continuous-subarray","Title":"Shortest Unsorted Continuous Subarray","TitleSlug":"shortest-unsorted-continuous-subarray","PassRate":"29%","Difficulty":1,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":576,"Dir":"./Algorithms/0576.out-of-boundary-paths","Title":"Out of Boundary Paths","TitleSlug":"out-of-boundary-paths","PassRate":"30%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":575,"Dir":"./Algorithms/0575.distribute-candies","Title":"Distribute Candies","TitleSlug":"distribute-candies","PassRate":"58%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":572,"Dir":"./Algorithms/0572.subtree-of-another-tree","Title":"Subtree of Another Tree","TitleSlug":"subtree-of-another-tree","PassRate":"40%","Difficulty":1,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":567,"Dir":"./Algorithms/0567.permutation-in-string","Title":"Permutation in String","TitleSlug":"permutation-in-string","PassRate":"36%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":566,"Dir":"./Algorithms/0566.reshape-the-matrix","Title":"Reshape the Matrix","TitleSlug":"reshape-the-matrix","PassRate":"58%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":565,"Dir":"./Algorithms/0565.array-nesting","Title":"Array Nesting","TitleSlug":"array-nesting","PassRate":"49%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":564,"Dir":"./Algorithms/0564.find-the-closest-palindrome","Title":"Find the Closest Palindrome","TitleSlug":"find-the-closest-palindrome","PassRate":"17%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":563,"Dir":"./Algorithms/0563.binary-tree-tilt","Title":"Binary Tree Tilt","TitleSlug":"binary-tree-tilt","PassRate":"47%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":561,"Dir":"./Algorithms/0561.array-partition-i","Title":"Array Partition I","TitleSlug":"array-partition-i","PassRate":"66%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":560,"Dir":"./Algorithms/0560.subarray-sum-equals-k","Title":"Subarray Sum Equals K","TitleSlug":"subarray-sum-equals-k","PassRate":"40%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":557,"Dir":"./Algorithms/0557.reverse-words-in-a-string-iii","Title":"Reverse Words in a String III","TitleSlug":"reverse-words-in-a-string-iii","PassRate":"59%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":556,"Dir":"./Algorithms/0556.next-greater-element-iii","Title":"Next Greater Element III","TitleSlug":"next-greater-element-iii","PassRate":"29%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":554,"Dir":"./Algorithms/0554.brick-wall","Title":"Brick Wall","TitleSlug":"brick-wall","PassRate":"46%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":553,"Dir":"./Algorithms/0553.optimal-division","Title":"Optimal Division","TitleSlug":"optimal-division","PassRate":"55%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":552,"Dir":"./Algorithms/0552.student-attendance-record-ii","Title":"Student Attendance Record II","TitleSlug":"student-attendance-record-ii","PassRate":"31%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":551,"Dir":"./Algorithms/0551.student-attendance-record-i","Title":"Student Attendance Record I","TitleSlug":"student-attendance-record-i","PassRate":"44%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":547,"Dir":"./Algorithms/0547.friend-circles","Title":"Friend Circles","TitleSlug":"friend-circles","PassRate":"49%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":546,"Dir":"./Algorithms/0546.remove-boxes","Title":"Remove Boxes","TitleSlug":"remove-boxes","PassRate":"35%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":543,"Dir":"./Algorithms/0543.diameter-of-binary-tree","Title":"Diameter of Binary Tree","TitleSlug":"diameter-of-binary-tree","PassRate":"45%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":542,"Dir":"./Algorithms/0542.01-matrix","Title":"01 Matrix","TitleSlug":"01-matrix","PassRate":"32%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":541,"Dir":"./Algorithms/0541.reverse-string-ii","Title":"Reverse String II","TitleSlug":"reverse-string-ii","PassRate":"43%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":540,"Dir":"./Algorithms/0540.single-element-in-a-sorted-array","Title":"Single Element in a Sorted Array","TitleSlug":"single-element-in-a-sorted-array","PassRate":"56%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":539,"Dir":"./Algorithms/0539.minimum-time-difference","Title":"Minimum Time Difference","TitleSlug":"minimum-time-difference","PassRate":"46%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":538,"Dir":"./Algorithms/0538.convert-bst-to-greater-tree","Title":"Convert BST to Greater Tree","TitleSlug":"convert-bst-to-greater-tree","PassRate":"49%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":537,"Dir":"./Algorithms/0537.complex-number-multiplication","Title":"Complex Number Multiplication","TitleSlug":"complex-number-multiplication","PassRate":"63%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":535,"Dir":"./Algorithms/0535.encode-and-decode-tinyurl","Title":"Encode and Decode TinyURL","TitleSlug":"encode-and-decode-tinyurl","PassRate":"73%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false,"IsAvailable":false},{"ID":532,"Dir":"./Algorithms/0532.k-diff-pairs-in-an-array","Title":"K-diff Pairs in an Array","TitleSlug":"k-diff-pairs-in-an-array","PassRate":"28%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":530,"Dir":"./Algorithms/0530.minimum-absolute-difference-in-bst","Title":"Minimum Absolute Difference in BST","TitleSlug":"minimum-absolute-difference-in-bst","PassRate":"47%","Difficulty":1,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":529,"Dir":"./Algorithms/0529.minesweeper","Title":"Minesweeper","TitleSlug":"minesweeper","PassRate":"49%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":526,"Dir":"./Algorithms/0526.beautiful-arrangement","Title":"Beautiful Arrangement","TitleSlug":"beautiful-arrangement","PassRate":"53%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":525,"Dir":"./Algorithms/0525.contiguous-array","Title":"Contiguous Array","TitleSlug":"contiguous-array","PassRate":"41%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":524,"Dir":"./Algorithms/0524.longest-word-in-dictionary-through-deleting","Title":"Longest Word in Dictionary through Deleting","TitleSlug":"longest-word-in-dictionary-through-deleting","PassRate":"43%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":523,"Dir":"./Algorithms/0523.continuous-subarray-sum","Title":"Continuous Subarray Sum","TitleSlug":"continuous-subarray-sum","PassRate":"23%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":522,"Dir":"./Algorithms/0522.longest-uncommon-subsequence-ii","Title":"Longest Uncommon Subsequence II","TitleSlug":"longest-uncommon-subsequence-ii","PassRate":"31%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":521,"Dir":"./Algorithms/0521.longest-uncommon-subsequence-i","Title":"Longest Uncommon Subsequence I ","TitleSlug":"longest-uncommon-subsequence-i","PassRate":"55%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":520,"Dir":"./Algorithms/0520.detect-capital","Title":"Detect Capital","TitleSlug":"detect-capital","PassRate":"52%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":517,"Dir":"./Algorithms/0517.super-washing-machines","Title":"Super Washing Machines","TitleSlug":"super-washing-machines","PassRate":"36%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":516,"Dir":"./Algorithms/0516.longest-palindromic-subsequence","Title":"Longest Palindromic Subsequence","TitleSlug":"longest-palindromic-subsequence","PassRate":"42%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":515,"Dir":"./Algorithms/0515.find-largest-value-in-each-tree-row","Title":"Find Largest Value in Each Tree Row","TitleSlug":"find-largest-value-in-each-tree-row","PassRate":"55%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":514,"Dir":"./Algorithms/0514.freedom-trail","Title":"Freedom Trail","TitleSlug":"freedom-trail","PassRate":"39%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":513,"Dir":"./Algorithms/0513.find-bottom-left-tree-value","Title":"Find Bottom Left Tree Value","TitleSlug":"find-bottom-left-tree-value","PassRate":"56%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":508,"Dir":"./Algorithms/0508.most-frequent-subtree-sum","Title":"Most Frequent Subtree Sum","TitleSlug":"most-frequent-subtree-sum","PassRate":"52%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":507,"Dir":"./Algorithms/0507.perfect-number","Title":"Perfect Number","TitleSlug":"perfect-number","PassRate":"33%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":506,"Dir":"./Algorithms/0506.relative-ranks","Title":"Relative Ranks","TitleSlug":"relative-ranks","PassRate":"46%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":504,"Dir":"./Algorithms/0504.base-7","Title":"Base 7","TitleSlug":"base-7","PassRate":"44%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":503,"Dir":"./Algorithms/0503.next-greater-element-ii","Title":"Next Greater Element II","TitleSlug":"next-greater-element-ii","PassRate":"47%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":502,"Dir":"./Algorithms/0502.ipo","Title":"IPO","TitleSlug":"ipo","PassRate":"36%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":501,"Dir":"./Algorithms/0501.find-mode-in-binary-search-tree","Title":"Find Mode in Binary Search Tree","TitleSlug":"find-mode-in-binary-search-tree","PassRate":"37%","Difficulty":1,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":500,"Dir":"./Algorithms/0500.keyboard-row","Title":"Keyboard Row","TitleSlug":"keyboard-row","PassRate":"59%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":498,"Dir":"./Algorithms/0498.diagonal-traverse","Title":"Diagonal Traverse","TitleSlug":"diagonal-traverse","PassRate":"46%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":496,"Dir":"./Algorithms/0496.next-greater-element-i","Title":"Next Greater Element I","TitleSlug":"next-greater-element-i","PassRate":"56%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":495,"Dir":"./Algorithms/0495.teemo-attacking","Title":"Teemo Attacking","TitleSlug":"teemo-attacking","PassRate":"51%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":494,"Dir":"./Algorithms/0494.target-sum","Title":"Target Sum","TitleSlug":"target-sum","PassRate":"43%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":493,"Dir":"./Algorithms/0493.reverse-pairs","Title":"Reverse Pairs","TitleSlug":"reverse-pairs","PassRate":"21%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":492,"Dir":"./Algorithms/0492.construct-the-rectangle","Title":"Construct the Rectangle","TitleSlug":"construct-the-rectangle","PassRate":"48%","Difficulty":1,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":491,"Dir":"./Algorithms/0491.increasing-subsequences","Title":"Increasing Subsequences","TitleSlug":"increasing-subsequences","PassRate":"38%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":488,"Dir":"./Algorithms/0488.zuma-game","Title":"Zuma Game","TitleSlug":"zuma-game","PassRate":"37%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":486,"Dir":"./Algorithms/0486.predict-the-winner","Title":"Predict the Winner","TitleSlug":"predict-the-winner","PassRate":"45%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":485,"Dir":"./Algorithms/0485.max-consecutive-ones","Title":"Max Consecutive Ones","TitleSlug":"max-consecutive-ones","PassRate":"53%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":483,"Dir":"./Algorithms/0483.smallest-good-base","Title":"Smallest Good Base","TitleSlug":"smallest-good-base","PassRate":"33%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":482,"Dir":"./Algorithms/0482.license-key-formatting","Title":"License Key Formatting","TitleSlug":"license-key-formatting","PassRate":"40%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":481,"Dir":"./Algorithms/0481.magical-string","Title":"Magical String","TitleSlug":"magical-string","PassRate":"45%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":480,"Dir":"./Algorithms/0480.sliding-window-median","Title":"Sliding Window Median","TitleSlug":"sliding-window-median","PassRate":"31%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":479,"Dir":"./Algorithms/0479.largest-palindrome-product","Title":"Largest Palindrome Product","TitleSlug":"largest-palindrome-product","PassRate":"24%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":477,"Dir":"./Algorithms/0477.total-hamming-distance","Title":"Total Hamming Distance","TitleSlug":"total-hamming-distance","PassRate":"47%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":476,"Dir":"./Algorithms/0476.number-complement","Title":"Number Complement","TitleSlug":"number-complement","PassRate":"60%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":475,"Dir":"./Algorithms/0475.heaters","Title":"Heaters","TitleSlug":"heaters","PassRate":"29%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":474,"Dir":"./Algorithms/0474.ones-and-zeroes","Title":"Ones and Zeroes","TitleSlug":"ones-and-zeroes","PassRate":"39%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":473,"Dir":"./Algorithms/0473.matchsticks-to-square","Title":"Matchsticks to Square","TitleSlug":"matchsticks-to-square","PassRate":"35%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":472,"Dir":"./Algorithms/0472.concatenated-words","Title":"Concatenated Words","TitleSlug":"concatenated-words","PassRate":"30%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":468,"Dir":"./Algorithms/0468.validate-ip-address","Title":"Validate IP Address","TitleSlug":"validate-ip-address","PassRate":"20%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":467,"Dir":"./Algorithms/0467.unique-substrings-in-wraparound-string","Title":"Unique Substrings in Wraparound String","TitleSlug":"unique-substrings-in-wraparound-string","PassRate":"33%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":466,"Dir":"./Algorithms/0466.count-the-repetitions","Title":"Count The Repetitions","TitleSlug":"count-the-repetitions","PassRate":"27%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":464,"Dir":"./Algorithms/0464.can-i-win","Title":"Can I Win","TitleSlug":"can-i-win","PassRate":"25%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":463,"Dir":"./Algorithms/0463.island-perimeter","Title":"Island Perimeter","TitleSlug":"island-perimeter","PassRate":"57%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":462,"Dir":"./Algorithms/0462.minimum-moves-to-equal-array-elements-ii","Title":"Minimum Moves to Equal Array Elements II","TitleSlug":"minimum-moves-to-equal-array-elements-ii","PassRate":"51%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":461,"Dir":"./Algorithms/0461.hamming-distance","Title":"Hamming Distance","TitleSlug":"hamming-distance","PassRate":"69%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":460,"Dir":"./Algorithms/0460.lfu-cache","Title":"LFU Cache","TitleSlug":"lfu-cache","PassRate":"24%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":459,"Dir":"./Algorithms/0459.repeated-substring-pattern","Title":"Repeated Substring Pattern","TitleSlug":"repeated-substring-pattern","PassRate":"38%","Difficulty":1,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":456,"Dir":"./Algorithms/0456.132-pattern","Title":"132 Pattern","TitleSlug":"132-pattern","PassRate":"28%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":455,"Dir":"./Algorithms/0455.assign-cookies","Title":"Assign Cookies","TitleSlug":"assign-cookies","PassRate":"47%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":454,"Dir":"./Algorithms/0454.4sum-ii","Title":"4Sum II","TitleSlug":"4sum-ii","PassRate":"47%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":453,"Dir":"./Algorithms/0453.minimum-moves-to-equal-array-elements","Title":"Minimum Moves to Equal Array Elements","TitleSlug":"minimum-moves-to-equal-array-elements","PassRate":"47%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":452,"Dir":"./Algorithms/0452.minimum-number-of-arrows-to-burst-balloons","Title":"Minimum Number of Arrows to Burst Balloons","TitleSlug":"minimum-number-of-arrows-to-burst-balloons","PassRate":"44%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":451,"Dir":"./Algorithms/0451.sort-characters-by-frequency","Title":"Sort Characters By Frequency","TitleSlug":"sort-characters-by-frequency","PassRate":"51%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":450,"Dir":"./Algorithms/0450.delete-node-in-a-bst","Title":"Delete Node in a BST","TitleSlug":"delete-node-in-a-bst","PassRate":"37%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":449,"Dir":"./Algorithms/0449.serialize-and-deserialize-bst","Title":"Serialize and Deserialize BST","TitleSlug":"serialize-and-deserialize-bst","PassRate":"42%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false,"IsAvailable":false},{"ID":448,"Dir":"./Algorithms/0448.find-all-numbers-disappeared-in-an-array","Title":"Find All Numbers Disappeared in an Array","TitleSlug":"find-all-numbers-disappeared-in-an-array","PassRate":"51%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":447,"Dir":"./Algorithms/0447.number-of-boomerangs","Title":"Number of Boomerangs","TitleSlug":"number-of-boomerangs","PassRate":"46%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":446,"Dir":"./Algorithms/0446.arithmetic-slices-ii-subsequence","Title":"Arithmetic Slices II - Subsequence","TitleSlug":"arithmetic-slices-ii-subsequence","PassRate":"27%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":445,"Dir":"./Algorithms/0445.add-two-numbers-ii","Title":"Add Two Numbers II","TitleSlug":"add-two-numbers-ii","PassRate":"46%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":443,"Dir":"./Algorithms/0443.string-compression","Title":"String Compression","TitleSlug":"string-compression","PassRate":"37%","Difficulty":1,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":442,"Dir":"./Algorithms/0442.find-all-duplicates-in-an-array","Title":"Find All Duplicates in an Array","TitleSlug":"find-all-duplicates-in-an-array","PassRate":"56%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":441,"Dir":"./Algorithms/0441.arranging-coins","Title":"Arranging Coins","TitleSlug":"arranging-coins","PassRate":"36%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":440,"Dir":"./Algorithms/0440.k-th-smallest-in-lexicographical-order","Title":"K-th Smallest in Lexicographical Order","TitleSlug":"k-th-smallest-in-lexicographical-order","PassRate":"25%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":438,"Dir":"./Algorithms/0438.find-all-anagrams-in-a-string","Title":"Find All Anagrams in a String","TitleSlug":"find-all-anagrams-in-a-string","PassRate":"33%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":437,"Dir":"./Algorithms/0437.path-sum-iii","Title":"Path Sum III","TitleSlug":"path-sum-iii","PassRate":"40%","Difficulty":1,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":436,"Dir":"./Algorithms/0436.find-right-interval","Title":"Find Right Interval","TitleSlug":"find-right-interval","PassRate":"41%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":435,"Dir":"./Algorithms/0435.non-overlapping-intervals","Title":"Non-overlapping Intervals","TitleSlug":"non-overlapping-intervals","PassRate":"41%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":434,"Dir":"./Algorithms/0434.number-of-segments-in-a-string","Title":"Number of Segments in a String","TitleSlug":"number-of-segments-in-a-string","PassRate":"36%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":432,"Dir":"./Algorithms/0432.all-oone-data-structure","Title":"All O`one Data Structure","TitleSlug":"all-oone-data-structure","PassRate":"28%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":424,"Dir":"./Algorithms/0424.longest-repeating-character-replacement","Title":"Longest Repeating Character Replacement","TitleSlug":"longest-repeating-character-replacement","PassRate":"42%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":423,"Dir":"./Algorithms/0423.reconstruct-original-digits-from-english","Title":"Reconstruct Original Digits from English","TitleSlug":"reconstruct-original-digits-from-english","PassRate":"44%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":421,"Dir":"./Algorithms/0421.maximum-xor-of-two-numbers-in-an-array","Title":"Maximum XOR of Two Numbers in an Array","TitleSlug":"maximum-xor-of-two-numbers-in-an-array","PassRate":"47%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":420,"Dir":"./Algorithms/0420.strong-password-checker","Title":"Strong Password Checker","TitleSlug":"strong-password-checker","PassRate":"20%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":419,"Dir":"./Algorithms/0419.battleships-in-a-board","Title":"Battleships in a Board","TitleSlug":"battleships-in-a-board","PassRate":"62%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":417,"Dir":"./Algorithms/0417.pacific-atlantic-water-flow","Title":"Pacific Atlantic Water Flow","TitleSlug":"pacific-atlantic-water-flow","PassRate":"34%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":416,"Dir":"./Algorithms/0416.partition-equal-subset-sum","Title":"Partition Equal Subset Sum","TitleSlug":"partition-equal-subset-sum","PassRate":"39%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":415,"Dir":"./Algorithms/0415.add-strings","Title":"Add Strings","TitleSlug":"add-strings","PassRate":"41%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":414,"Dir":"./Algorithms/0414.third-maximum-number","Title":"Third Maximum Number","TitleSlug":"third-maximum-number","PassRate":"27%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":413,"Dir":"./Algorithms/0413.arithmetic-slices","Title":"Arithmetic Slices","TitleSlug":"arithmetic-slices","PassRate":"54%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":412,"Dir":"./Algorithms/0412.fizz-buzz","Title":"Fizz Buzz","TitleSlug":"fizz-buzz","PassRate":"58%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":410,"Dir":"./Algorithms/0410.split-array-largest-sum","Title":"Split Array Largest Sum","TitleSlug":"split-array-largest-sum","PassRate":"39%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":409,"Dir":"./Algorithms/0409.longest-palindrome","Title":"Longest Palindrome","TitleSlug":"longest-palindrome","PassRate":"45%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":407,"Dir":"./Algorithms/0407.trapping-rain-water-ii","Title":"Trapping Rain Water II","TitleSlug":"trapping-rain-water-ii","PassRate":"37%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":406,"Dir":"./Algorithms/0406.queue-reconstruction-by-height","Title":"Queue Reconstruction by Height","TitleSlug":"queue-reconstruction-by-height","PassRate":"56%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":405,"Dir":"./Algorithms/0405.convert-a-number-to-hexadecimal","Title":"Convert a Number to Hexadecimal","TitleSlug":"convert-a-number-to-hexadecimal","PassRate":"41%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":404,"Dir":"./Algorithms/0404.sum-of-left-leaves","Title":"Sum of Left Leaves","TitleSlug":"sum-of-left-leaves","PassRate":"47%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":403,"Dir":"./Algorithms/0403.frog-jump","Title":"Frog Jump","TitleSlug":"frog-jump","PassRate":"32%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":402,"Dir":"./Algorithms/0402.remove-k-digits","Title":"Remove K Digits","TitleSlug":"remove-k-digits","PassRate":"26%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":401,"Dir":"./Algorithms/0401.binary-watch","Title":"Binary Watch","TitleSlug":"binary-watch","PassRate":"44%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":400,"Dir":"./Algorithms/0400.nth-digit","Title":"Nth Digit","TitleSlug":"nth-digit","PassRate":"30%","Difficulty":1,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":399,"Dir":"./Algorithms/0399.evaluate-division","Title":"Evaluate Division","TitleSlug":"evaluate-division","PassRate":"41%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":398,"Dir":"./Algorithms/0398.random-pick-index","Title":"Random Pick Index","TitleSlug":"random-pick-index","PassRate":"44%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":397,"Dir":"./Algorithms/0397.integer-replacement","Title":"Integer Replacement","TitleSlug":"integer-replacement","PassRate":"30%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":396,"Dir":"./Algorithms/0396.rotate-function","Title":"Rotate Function","TitleSlug":"rotate-function","PassRate":"33%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":395,"Dir":"./Algorithms/0395.longest-substring-with-at-least-k-repeating-characters","Title":"Longest Substring with At Least K Repeating Characters","TitleSlug":"longest-substring-with-at-least-k-repeating-characters","PassRate":"35%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":394,"Dir":"./Algorithms/0394.decode-string","Title":"Decode String","TitleSlug":"decode-string","PassRate":"41%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":393,"Dir":"./Algorithms/0393.utf-8-validation","Title":"UTF-8 Validation","TitleSlug":"utf-8-validation","PassRate":"34%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":392,"Dir":"./Algorithms/0392.is-subsequence","Title":"Is Subsequence","TitleSlug":"is-subsequence","PassRate":"44%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":391,"Dir":"./Algorithms/0391.perfect-rectangle","Title":"Perfect Rectangle","TitleSlug":"perfect-rectangle","PassRate":"27%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":390,"Dir":"./Algorithms/0390.elimination-game","Title":"Elimination Game","TitleSlug":"elimination-game","PassRate":"42%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":389,"Dir":"./Algorithms/0389.find-the-difference","Title":"Find the Difference","TitleSlug":"find-the-difference","PassRate":"51%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":388,"Dir":"./Algorithms/0388.longest-absolute-file-path","Title":"Longest Absolute File Path","TitleSlug":"longest-absolute-file-path","PassRate":"37%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":387,"Dir":"./Algorithms/0387.first-unique-character-in-a-string","Title":"First Unique Character in a String","TitleSlug":"first-unique-character-in-a-string","PassRate":"47%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":386,"Dir":"./Algorithms/0386.lexicographical-numbers","Title":"Lexicographical Numbers","TitleSlug":"lexicographical-numbers","PassRate":"42%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false,"IsAvailable":false},{"ID":385,"Dir":"./Algorithms/0385.mini-parser","Title":"Mini Parser","TitleSlug":"mini-parser","PassRate":"30%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":384,"Dir":"./Algorithms/0384.shuffle-an-array","Title":"Shuffle an Array","TitleSlug":"shuffle-an-array","PassRate":"47%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":383,"Dir":"./Algorithms/0383.ransom-note","Title":"Ransom Note","TitleSlug":"ransom-note","PassRate":"47%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":382,"Dir":"./Algorithms/0382.linked-list-random-node","Title":"Linked List Random Node","TitleSlug":"linked-list-random-node","PassRate":"47%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":381,"Dir":"./Algorithms/0381.insert-delete-getrandom-o1-duplicates-allowed","Title":"Insert Delete GetRandom O(1) - Duplicates allowed","TitleSlug":"insert-delete-getrandom-o1-duplicates-allowed","PassRate":"29%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":380,"Dir":"./Algorithms/0380.insert-delete-getrandom-o1","Title":"Insert Delete GetRandom O(1)","TitleSlug":"insert-delete-getrandom-o1","PassRate":"39%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":378,"Dir":"./Algorithms/0378.kth-smallest-element-in-a-sorted-matrix","Title":"Kth Smallest Element in a Sorted Matrix","TitleSlug":"kth-smallest-element-in-a-sorted-matrix","PassRate":"45%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":377,"Dir":"./Algorithms/0377.combination-sum-iv","Title":"Combination Sum IV","TitleSlug":"combination-sum-iv","PassRate":"42%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":376,"Dir":"./Algorithms/0376.wiggle-subsequence","Title":"Wiggle Subsequence","TitleSlug":"wiggle-subsequence","PassRate":"36%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":375,"Dir":"./Algorithms/0375.guess-number-higher-or-lower-ii","Title":"Guess Number Higher or Lower II","TitleSlug":"guess-number-higher-or-lower-ii","PassRate":"36%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":374,"Dir":"./Algorithms/0374.guess-number-higher-or-lower","Title":"Guess Number Higher or Lower","TitleSlug":"guess-number-higher-or-lower","PassRate":"36%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false,"IsAvailable":false},{"ID":373,"Dir":"./Algorithms/0373.find-k-pairs-with-smallest-sums","Title":"Find K Pairs with Smallest Sums","TitleSlug":"find-k-pairs-with-smallest-sums","PassRate":"31%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":372,"Dir":"./Algorithms/0372.super-pow","Title":"Super Pow","TitleSlug":"super-pow","PassRate":"34%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":371,"Dir":"./Algorithms/0371.sum-of-two-integers","Title":"Sum of Two Integers","TitleSlug":"sum-of-two-integers","PassRate":"51%","Difficulty":1,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":368,"Dir":"./Algorithms/0368.largest-divisible-subset","Title":"Largest Divisible Subset","TitleSlug":"largest-divisible-subset","PassRate":"33%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":367,"Dir":"./Algorithms/0367.valid-perfect-square","Title":"Valid Perfect Square","TitleSlug":"valid-perfect-square","PassRate":"38%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":365,"Dir":"./Algorithms/0365.water-and-jug-problem","Title":"Water and Jug Problem","TitleSlug":"water-and-jug-problem","PassRate":"27%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":363,"Dir":"./Algorithms/0363.max-sum-of-rectangle-no-larger-than-k","Title":"Max Sum of Rectangle No Larger Than K","TitleSlug":"max-sum-of-rectangle-no-larger-than-k","PassRate":"33%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":357,"Dir":"./Algorithms/0357.count-numbers-with-unique-digits","Title":"Count Numbers with Unique Digits","TitleSlug":"count-numbers-with-unique-digits","PassRate":"46%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":355,"Dir":"./Algorithms/0355.design-twitter","Title":"Design Twitter","TitleSlug":"design-twitter","PassRate":"25%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":354,"Dir":"./Algorithms/0354.russian-doll-envelopes","Title":"Russian Doll Envelopes","TitleSlug":"russian-doll-envelopes","PassRate":"32%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":352,"Dir":"./Algorithms/0352.data-stream-as-disjoint-intervals","Title":"Data Stream as Disjoint Intervals","TitleSlug":"data-stream-as-disjoint-intervals","PassRate":"40%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":350,"Dir":"./Algorithms/0350.intersection-of-two-arrays-ii","Title":"Intersection of Two Arrays II","TitleSlug":"intersection-of-two-arrays-ii","PassRate":"44%","Difficulty":1,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":349,"Dir":"./Algorithms/0349.intersection-of-two-arrays","Title":"Intersection of Two Arrays","TitleSlug":"intersection-of-two-arrays","PassRate":"47%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":347,"Dir":"./Algorithms/0347.top-k-frequent-elements","Title":"Top K Frequent Elements","TitleSlug":"top-k-frequent-elements","PassRate":"49%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":345,"Dir":"./Algorithms/0345.reverse-vowels-of-a-string","Title":"Reverse Vowels of a String","TitleSlug":"reverse-vowels-of-a-string","PassRate":"38%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":344,"Dir":"./Algorithms/0344.reverse-string","Title":"Reverse String","TitleSlug":"reverse-string","PassRate":"59%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":343,"Dir":"./Algorithms/0343.integer-break","Title":"Integer Break","TitleSlug":"integer-break","PassRate":"46%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":342,"Dir":"./Algorithms/0342.power-of-four","Title":"Power of Four","TitleSlug":"power-of-four","PassRate":"38%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":341,"Dir":"./Algorithms/0341.flatten-nested-list-iterator","Title":"Flatten Nested List Iterator","TitleSlug":"flatten-nested-list-iterator","PassRate":"42%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false,"IsAvailable":false},{"ID":338,"Dir":"./Algorithms/0338.counting-bits","Title":"Counting Bits","TitleSlug":"counting-bits","PassRate":"61%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":337,"Dir":"./Algorithms/0337.house-robber-iii","Title":"House Robber III","TitleSlug":"house-robber-iii","PassRate":"44%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":336,"Dir":"./Algorithms/0336.palindrome-pairs","Title":"Palindrome Pairs","TitleSlug":"palindrome-pairs","PassRate":"26%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":335,"Dir":"./Algorithms/0335.self-crossing","Title":"Self Crossing","TitleSlug":"self-crossing","PassRate":"25%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":334,"Dir":"./Algorithms/0334.increasing-triplet-subsequence","Title":"Increasing Triplet Subsequence","TitleSlug":"increasing-triplet-subsequence","PassRate":"40%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":332,"Dir":"./Algorithms/0332.reconstruct-itinerary","Title":"Reconstruct Itinerary","TitleSlug":"reconstruct-itinerary","PassRate":"29%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":331,"Dir":"./Algorithms/0331.verify-preorder-serialization-of-a-binary-tree","Title":"Verify Preorder Serialization of a Binary Tree","TitleSlug":"verify-preorder-serialization-of-a-binary-tree","PassRate":"36%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":330,"Dir":"./Algorithms/0330.patching-array","Title":"Patching Array","TitleSlug":"patching-array","PassRate":"32%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":329,"Dir":"./Algorithms/0329.longest-increasing-path-in-a-matrix","Title":"Longest Increasing Path in a Matrix","TitleSlug":"longest-increasing-path-in-a-matrix","PassRate":"37%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":328,"Dir":"./Algorithms/0328.odd-even-linked-list","Title":"Odd Even Linked List","TitleSlug":"odd-even-linked-list","PassRate":"44%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":327,"Dir":"./Algorithms/0327.count-of-range-sum","Title":"Count of Range Sum","TitleSlug":"count-of-range-sum","PassRate":"30%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":326,"Dir":"./Algorithms/0326.power-of-three","Title":"Power of Three","TitleSlug":"power-of-three","PassRate":"40%","Difficulty":1,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":324,"Dir":"./Algorithms/0324.wiggle-sort-ii","Title":"Wiggle Sort II","TitleSlug":"wiggle-sort-ii","PassRate":"26%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":322,"Dir":"./Algorithms/0322.coin-change","Title":"Coin Change","TitleSlug":"coin-change","PassRate":"26%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":321,"Dir":"./Algorithms/0321.create-maximum-number","Title":"Create Maximum Number","TitleSlug":"create-maximum-number","PassRate":"24%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":319,"Dir":"./Algorithms/0319.bulb-switcher","Title":"Bulb Switcher","TitleSlug":"bulb-switcher","PassRate":"42%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":318,"Dir":"./Algorithms/0318.maximum-product-of-word-lengths","Title":"Maximum Product of Word Lengths","TitleSlug":"maximum-product-of-word-lengths","PassRate":"45%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":316,"Dir":"./Algorithms/0316.remove-duplicate-letters","Title":"Remove Duplicate Letters","TitleSlug":"remove-duplicate-letters","PassRate":"30%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":315,"Dir":"./Algorithms/0315.count-of-smaller-numbers-after-self","Title":"Count of Smaller Numbers After Self","TitleSlug":"count-of-smaller-numbers-after-self","PassRate":"34%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":313,"Dir":"./Algorithms/0313.super-ugly-number","Title":"Super Ugly Number","TitleSlug":"super-ugly-number","PassRate":"38%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":312,"Dir":"./Algorithms/0312.burst-balloons","Title":"Burst Balloons","TitleSlug":"burst-balloons","PassRate":"43%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":310,"Dir":"./Algorithms/0310.minimum-height-trees","Title":"Minimum Height Trees","TitleSlug":"minimum-height-trees","PassRate":"28%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":309,"Dir":"./Algorithms/0309.best-time-to-buy-and-sell-stock-with-cooldown","Title":"Best Time to Buy and Sell Stock with Cooldown","TitleSlug":"best-time-to-buy-and-sell-stock-with-cooldown","PassRate":"41%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":307,"Dir":"./Algorithms/0307.range-sum-query-mutable","Title":"Range Sum Query - Mutable","TitleSlug":"range-sum-query-mutable","PassRate":"21%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":306,"Dir":"./Algorithms/0306.additive-number","Title":"Additive Number","TitleSlug":"additive-number","PassRate":"27%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":304,"Dir":"./Algorithms/0304.range-sum-query-2d-immutable","Title":"Range Sum Query 2D - Immutable","TitleSlug":"range-sum-query-2d-immutable","PassRate":"26%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":303,"Dir":"./Algorithms/0303.range-sum-query-immutable","Title":"Range Sum Query - Immutable","TitleSlug":"range-sum-query-immutable","PassRate":"31%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":301,"Dir":"./Algorithms/0301.remove-invalid-parentheses","Title":"Remove Invalid Parentheses","TitleSlug":"remove-invalid-parentheses","PassRate":"35%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":300,"Dir":"./Algorithms/0300.longest-increasing-subsequence","Title":"Longest Increasing Subsequence","TitleSlug":"longest-increasing-subsequence","PassRate":"38%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":299,"Dir":"./Algorithms/0299.bulls-and-cows","Title":"Bulls and Cows","TitleSlug":"bulls-and-cows","PassRate":"35%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":297,"Dir":"./Algorithms/0297.serialize-and-deserialize-binary-tree","Title":"Serialize and Deserialize Binary Tree","TitleSlug":"serialize-and-deserialize-binary-tree","PassRate":"34%","Difficulty":3,"IsAccepted":false,"IsFavor":false,"IsNew":false,"IsAvailable":false},{"ID":295,"Dir":"./Algorithms/0295.find-median-from-data-stream","Title":"Find Median from Data Stream","TitleSlug":"find-median-from-data-stream","PassRate":"28%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":292,"Dir":"./Algorithms/0292.nim-game","Title":"Nim Game","TitleSlug":"nim-game","PassRate":"55%","Difficulty":1,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":290,"Dir":"./Algorithms/0290.word-pattern","Title":"Word Pattern","TitleSlug":"word-pattern","PassRate":"33%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":289,"Dir":"./Algorithms/0289.game-of-life","Title":"Game of Life","TitleSlug":"game-of-life","PassRate":"37%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":287,"Dir":"./Algorithms/0287.find-the-duplicate-number","Title":"Find the Duplicate Number","TitleSlug":"find-the-duplicate-number","PassRate":"44%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":284,"Dir":"./Algorithms/0284.peeking-iterator","Title":"Peeking Iterator","TitleSlug":"peeking-iterator","PassRate":"35%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false,"IsAvailable":false},{"ID":283,"Dir":"./Algorithms/0283.move-zeroes","Title":"Move Zeroes","TitleSlug":"move-zeroes","PassRate":"51%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":282,"Dir":"./Algorithms/0282.expression-add-operators","Title":"Expression Add Operators","TitleSlug":"expression-add-operators","PassRate":"30%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":279,"Dir":"./Algorithms/0279.perfect-squares","Title":"Perfect Squares","TitleSlug":"perfect-squares","PassRate":"37%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":278,"Dir":"./Algorithms/0278.first-bad-version","Title":"First Bad Version","TitleSlug":"first-bad-version","PassRate":"25%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false,"IsAvailable":false},{"ID":275,"Dir":"./Algorithms/0275.h-index-ii","Title":"H-Index II","TitleSlug":"h-index-ii","PassRate":"34%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":274,"Dir":"./Algorithms/0274.h-index","Title":"H-Index","TitleSlug":"h-index","PassRate":"33%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":273,"Dir":"./Algorithms/0273.integer-to-english-words","Title":"Integer to English Words","TitleSlug":"integer-to-english-words","PassRate":"22%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":268,"Dir":"./Algorithms/0268.missing-number","Title":"Missing Number","TitleSlug":"missing-number","PassRate":"44%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":264,"Dir":"./Algorithms/0264.ugly-number-ii","Title":"Ugly Number II","TitleSlug":"ugly-number-ii","PassRate":"33%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":263,"Dir":"./Algorithms/0263.ugly-number","Title":"Ugly Number","TitleSlug":"ugly-number","PassRate":"39%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":260,"Dir":"./Algorithms/0260.single-number-iii","Title":"Single Number III","TitleSlug":"single-number-iii","PassRate":"52%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":258,"Dir":"./Algorithms/0258.add-digits","Title":"Add Digits","TitleSlug":"add-digits","PassRate":"51%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":257,"Dir":"./Algorithms/0257.binary-tree-paths","Title":"Binary Tree Paths","TitleSlug":"binary-tree-paths","PassRate":"40%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":242,"Dir":"./Algorithms/0242.valid-anagram","Title":"Valid Anagram","TitleSlug":"valid-anagram","PassRate":"47%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":241,"Dir":"./Algorithms/0241.different-ways-to-add-parentheses","Title":"Different Ways to Add Parentheses","TitleSlug":"different-ways-to-add-parentheses","PassRate":"45%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":240,"Dir":"./Algorithms/0240.search-a-2d-matrix-ii","Title":"Search a 2D Matrix II","TitleSlug":"search-a-2d-matrix-ii","PassRate":"38%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":239,"Dir":"./Algorithms/0239.sliding-window-maximum","Title":"Sliding Window Maximum","TitleSlug":"sliding-window-maximum","PassRate":"33%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":238,"Dir":"./Algorithms/0238.product-of-array-except-self","Title":"Product of Array Except Self","TitleSlug":"product-of-array-except-self","PassRate":"50%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":237,"Dir":"./Algorithms/0237.delete-node-in-a-linked-list","Title":"Delete Node in a Linked List","TitleSlug":"delete-node-in-a-linked-list","PassRate":"47%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false,"IsAvailable":false},{"ID":236,"Dir":"./Algorithms/0236.lowest-common-ancestor-of-a-binary-tree","Title":"Lowest Common Ancestor of a Binary Tree","TitleSlug":"lowest-common-ancestor-of-a-binary-tree","PassRate":"29%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false,"IsAvailable":false},{"ID":235,"Dir":"./Algorithms/0235.lowest-common-ancestor-of-a-binary-search-tree","Title":"Lowest Common Ancestor of a Binary Search Tree","TitleSlug":"lowest-common-ancestor-of-a-binary-search-tree","PassRate":"39%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false,"IsAvailable":false},{"ID":234,"Dir":"./Algorithms/0234.palindrome-linked-list","Title":"Palindrome Linked List","TitleSlug":"palindrome-linked-list","PassRate":"33%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":233,"Dir":"./Algorithms/0233.number-of-digit-one","Title":"Number of Digit One","TitleSlug":"number-of-digit-one","PassRate":"28%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":232,"Dir":"./Algorithms/0232.implement-queue-using-stacks","Title":"Implement Queue using Stacks","TitleSlug":"implement-queue-using-stacks","PassRate":"37%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":231,"Dir":"./Algorithms/0231.power-of-two","Title":"Power of Two","TitleSlug":"power-of-two","PassRate":"40%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":230,"Dir":"./Algorithms/0230.kth-smallest-element-in-a-bst","Title":"Kth Smallest Element in a BST","TitleSlug":"kth-smallest-element-in-a-bst","PassRate":"44%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":229,"Dir":"./Algorithms/0229.majority-element-ii","Title":"Majority Element II","TitleSlug":"majority-element-ii","PassRate":"28%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":228,"Dir":"./Algorithms/0228.summary-ranges","Title":"Summary Ranges","TitleSlug":"summary-ranges","PassRate":"31%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":227,"Dir":"./Algorithms/0227.basic-calculator-ii","Title":"Basic Calculator II","TitleSlug":"basic-calculator-ii","PassRate":"29%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":226,"Dir":"./Algorithms/0226.invert-binary-tree","Title":"Invert Binary Tree","TitleSlug":"invert-binary-tree","PassRate":"52%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":225,"Dir":"./Algorithms/0225.implement-stack-using-queues","Title":"Implement Stack using Queues","TitleSlug":"implement-stack-using-queues","PassRate":"33%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":224,"Dir":"./Algorithms/0224.basic-calculator","Title":"Basic Calculator","TitleSlug":"basic-calculator","PassRate":"28%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":223,"Dir":"./Algorithms/0223.rectangle-area","Title":"Rectangle Area","TitleSlug":"rectangle-area","PassRate":"33%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":222,"Dir":"./Algorithms/0222.count-complete-tree-nodes","Title":"Count Complete Tree Nodes","TitleSlug":"count-complete-tree-nodes","PassRate":"27%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false,"IsAvailable":false},{"ID":221,"Dir":"./Algorithms/0221.maximal-square","Title":"Maximal Square","TitleSlug":"maximal-square","PassRate":"29%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":220,"Dir":"./Algorithms/0220.contains-duplicate-iii","Title":"Contains Duplicate III","TitleSlug":"contains-duplicate-iii","PassRate":"18%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":219,"Dir":"./Algorithms/0219.contains-duplicate-ii","Title":"Contains Duplicate II","TitleSlug":"contains-duplicate-ii","PassRate":"32%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":218,"Dir":"./Algorithms/0218.the-skyline-problem","Title":"The Skyline Problem","TitleSlug":"the-skyline-problem","PassRate":"28%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":217,"Dir":"./Algorithms/0217.contains-duplicate","Title":"Contains Duplicate","TitleSlug":"contains-duplicate","PassRate":"46%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":216,"Dir":"./Algorithms/0216.combination-sum-iii","Title":"Combination Sum III","TitleSlug":"combination-sum-iii","PassRate":"46%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":215,"Dir":"./Algorithms/0215.kth-largest-element-in-an-array","Title":"Kth Largest Element in an Array","TitleSlug":"kth-largest-element-in-an-array","PassRate":"40%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":214,"Dir":"./Algorithms/0214.shortest-palindrome","Title":"Shortest Palindrome","TitleSlug":"shortest-palindrome","PassRate":"24%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":213,"Dir":"./Algorithms/0213.house-robber-ii","Title":"House Robber II","TitleSlug":"house-robber-ii","PassRate":"34%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":212,"Dir":"./Algorithms/0212.word-search-ii","Title":"Word Search II","TitleSlug":"word-search-ii","PassRate":"24%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":211,"Dir":"./Algorithms/0211.add-and-search-word-data-structure-design","Title":"Add and Search Word - Data structure design","TitleSlug":"add-and-search-word-data-structure-design","PassRate":"24%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":210,"Dir":"./Algorithms/0210.course-schedule-ii","Title":"Course Schedule II","TitleSlug":"course-schedule-ii","PassRate":"29%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":209,"Dir":"./Algorithms/0209.minimum-size-subarray-sum","Title":"Minimum Size Subarray Sum","TitleSlug":"minimum-size-subarray-sum","PassRate":"31%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":208,"Dir":"./Algorithms/0208.implement-trie-prefix-tree","Title":"Implement Trie (Prefix Tree)","TitleSlug":"implement-trie-prefix-tree","PassRate":"30%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":207,"Dir":"./Algorithms/0207.course-schedule","Title":"Course Schedule","TitleSlug":"course-schedule","PassRate":"33%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":206,"Dir":"./Algorithms/0206.reverse-linked-list","Title":"Reverse Linked List","TitleSlug":"reverse-linked-list","PassRate":"46%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":205,"Dir":"./Algorithms/0205.isomorphic-strings","Title":"Isomorphic Strings","TitleSlug":"isomorphic-strings","PassRate":"34%","Difficulty":1,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":204,"Dir":"./Algorithms/0204.count-primes","Title":"Count Primes","TitleSlug":"count-primes","PassRate":"26%","Difficulty":1,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":203,"Dir":"./Algorithms/0203.remove-linked-list-elements","Title":"Remove Linked List Elements","TitleSlug":"remove-linked-list-elements","PassRate":"33%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":202,"Dir":"./Algorithms/0202.happy-number","Title":"Happy Number","TitleSlug":"happy-number","PassRate":"41%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":201,"Dir":"./Algorithms/0201.bitwise-and-of-numbers-range","Title":"Bitwise AND of Numbers Range","TitleSlug":"bitwise-and-of-numbers-range","PassRate":"34%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":200,"Dir":"./Algorithms/0200.number-of-islands","Title":"Number of Islands","TitleSlug":"number-of-islands","PassRate":"35%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":199,"Dir":"./Algorithms/0199.binary-tree-right-side-view","Title":"Binary Tree Right Side View","TitleSlug":"binary-tree-right-side-view","PassRate":"41%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":198,"Dir":"./Algorithms/0198.house-robber","Title":"House Robber","TitleSlug":"house-robber","PassRate":"39%","Difficulty":1,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":191,"Dir":"./Algorithms/0191.number-of-1-bits","Title":"Number of 1 Bits","TitleSlug":"number-of-1-bits","PassRate":"40%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false,"IsAvailable":false},{"ID":190,"Dir":"./Algorithms/0190.reverse-bits","Title":"Reverse Bits","TitleSlug":"reverse-bits","PassRate":"29%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false,"IsAvailable":false},{"ID":189,"Dir":"./Algorithms/0189.rotate-array","Title":"Rotate Array","TitleSlug":"rotate-array","PassRate":"25%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":188,"Dir":"./Algorithms/0188.best-time-to-buy-and-sell-stock-iv","Title":"Best Time to Buy and Sell Stock IV","TitleSlug":"best-time-to-buy-and-sell-stock-iv","PassRate":"24%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":187,"Dir":"./Algorithms/0187.repeated-dna-sequences","Title":"Repeated DNA Sequences","TitleSlug":"repeated-dna-sequences","PassRate":"32%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":179,"Dir":"./Algorithms/0179.largest-number","Title":"Largest Number","TitleSlug":"largest-number","PassRate":"23%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":174,"Dir":"./Algorithms/0174.dungeon-game","Title":"Dungeon Game","TitleSlug":"dungeon-game","PassRate":"23%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":173,"Dir":"./Algorithms/0173.binary-search-tree-iterator","Title":"Binary Search Tree Iterator","TitleSlug":"binary-search-tree-iterator","PassRate":"42%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false,"IsAvailable":false},{"ID":172,"Dir":"./Algorithms/0172.factorial-trailing-zeroes","Title":"Factorial Trailing Zeroes","TitleSlug":"factorial-trailing-zeroes","PassRate":"36%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":171,"Dir":"./Algorithms/0171.excel-sheet-column-number","Title":"Excel Sheet Column Number","TitleSlug":"excel-sheet-column-number","PassRate":"48%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":169,"Dir":"./Algorithms/0169.majority-element","Title":"Majority Element","TitleSlug":"majority-element","PassRate":"47%","Difficulty":1,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":168,"Dir":"./Algorithms/0168.excel-sheet-column-title","Title":"Excel Sheet Column Title","TitleSlug":"excel-sheet-column-title","PassRate":"26%","Difficulty":1,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":167,"Dir":"./Algorithms/0167.two-sum-ii-input-array-is-sorted","Title":"Two Sum II - Input array is sorted","TitleSlug":"two-sum-ii-input-array-is-sorted","PassRate":"47%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":166,"Dir":"./Algorithms/0166.fraction-to-recurring-decimal","Title":"Fraction to Recurring Decimal","TitleSlug":"fraction-to-recurring-decimal","PassRate":"17%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":165,"Dir":"./Algorithms/0165.compare-version-numbers","Title":"Compare Version Numbers","TitleSlug":"compare-version-numbers","PassRate":"20%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":164,"Dir":"./Algorithms/0164.maximum-gap","Title":"Maximum Gap","TitleSlug":"maximum-gap","PassRate":"29%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":162,"Dir":"./Algorithms/0162.find-peak-element","Title":"Find Peak Element","TitleSlug":"find-peak-element","PassRate":"38%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":160,"Dir":"./Algorithms/0160.intersection-of-two-linked-lists","Title":"Intersection of Two Linked Lists","TitleSlug":"intersection-of-two-linked-lists","PassRate":"30%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false,"IsAvailable":false},{"ID":155,"Dir":"./Algorithms/0155.min-stack","Title":"Min Stack","TitleSlug":"min-stack","PassRate":"30%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":154,"Dir":"./Algorithms/0154.find-minimum-in-rotated-sorted-array-ii","Title":"Find Minimum in Rotated Sorted Array II","TitleSlug":"find-minimum-in-rotated-sorted-array-ii","PassRate":"37%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":153,"Dir":"./Algorithms/0153.find-minimum-in-rotated-sorted-array","Title":"Find Minimum in Rotated Sorted Array","TitleSlug":"find-minimum-in-rotated-sorted-array","PassRate":"40%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":152,"Dir":"./Algorithms/0152.maximum-product-subarray","Title":"Maximum Product Subarray","TitleSlug":"maximum-product-subarray","PassRate":"26%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":151,"Dir":"./Algorithms/0151.reverse-words-in-a-string","Title":"Reverse Words in a String","TitleSlug":"reverse-words-in-a-string","PassRate":"15%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false,"IsAvailable":false},{"ID":150,"Dir":"./Algorithms/0150.evaluate-reverse-polish-notation","Title":"Evaluate Reverse Polish Notation","TitleSlug":"evaluate-reverse-polish-notation","PassRate":"27%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":149,"Dir":"./Algorithms/0149.max-points-on-a-line","Title":"Max Points on a Line","TitleSlug":"max-points-on-a-line","PassRate":"15%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":148,"Dir":"./Algorithms/0148.sort-list","Title":"Sort List","TitleSlug":"sort-list","PassRate":"29%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":147,"Dir":"./Algorithms/0147.insertion-sort-list","Title":"Insertion Sort List","TitleSlug":"insertion-sort-list","PassRate":"33%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":146,"Dir":"./Algorithms/0146.lru-cache","Title":"LRU Cache","TitleSlug":"lru-cache","PassRate":"19%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":145,"Dir":"./Algorithms/0145.binary-tree-postorder-traversal","Title":"Binary Tree Postorder Traversal","TitleSlug":"binary-tree-postorder-traversal","PassRate":"41%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":144,"Dir":"./Algorithms/0144.binary-tree-preorder-traversal","Title":"Binary Tree Preorder Traversal","TitleSlug":"binary-tree-preorder-traversal","PassRate":"46%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":143,"Dir":"./Algorithms/0143.reorder-list","Title":"Reorder List","TitleSlug":"reorder-list","PassRate":"26%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":142,"Dir":"./Algorithms/0142.linked-list-cycle-ii","Title":"Linked List Cycle II","TitleSlug":"linked-list-cycle-ii","PassRate":"30%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false,"IsAvailable":false},{"ID":141,"Dir":"./Algorithms/0141.linked-list-cycle","Title":"Linked List Cycle","TitleSlug":"linked-list-cycle","PassRate":"35%","Difficulty":1,"IsAccepted":false,"IsFavor":false,"IsNew":false,"IsAvailable":false},{"ID":140,"Dir":"./Algorithms/0140.word-break-ii","Title":"Word Break II","TitleSlug":"word-break-ii","PassRate":"24%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":139,"Dir":"./Algorithms/0139.word-break","Title":"Word Break","TitleSlug":"word-break","PassRate":"31%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":138,"Dir":"./Algorithms/0138.copy-list-with-random-pointer","Title":"Copy List with Random Pointer","TitleSlug":"copy-list-with-random-pointer","PassRate":"25%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false,"IsAvailable":false},{"ID":137,"Dir":"./Algorithms/0137.single-number-ii","Title":"Single Number II","TitleSlug":"single-number-ii","PassRate":"42%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":136,"Dir":"./Algorithms/0136.single-number","Title":"Single Number","TitleSlug":"single-number","PassRate":"55%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":135,"Dir":"./Algorithms/0135.candy","Title":"Candy","TitleSlug":"candy","PassRate":"25%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":134,"Dir":"./Algorithms/0134.gas-station","Title":"Gas Station","TitleSlug":"gas-station","PassRate":"29%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":133,"Dir":"./Algorithms/0133.clone-graph","Title":"Clone Graph","TitleSlug":"clone-graph","PassRate":"25%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false,"IsAvailable":false},{"ID":132,"Dir":"./Algorithms/0132.palindrome-partitioning-ii","Title":"Palindrome Partitioning II","TitleSlug":"palindrome-partitioning-ii","PassRate":"24%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":131,"Dir":"./Algorithms/0131.palindrome-partitioning","Title":"Palindrome Partitioning","TitleSlug":"palindrome-partitioning","PassRate":"34%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":130,"Dir":"./Algorithms/0130.surrounded-regions","Title":"Surrounded Regions","TitleSlug":"surrounded-regions","PassRate":"19%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":129,"Dir":"./Algorithms/0129.sum-root-to-leaf-numbers","Title":"Sum Root to Leaf Numbers","TitleSlug":"sum-root-to-leaf-numbers","PassRate":"37%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":128,"Dir":"./Algorithms/0128.longest-consecutive-sequence","Title":"Longest Consecutive Sequence","TitleSlug":"longest-consecutive-sequence","PassRate":"37%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":127,"Dir":"./Algorithms/0127.word-ladder","Title":"Word Ladder","TitleSlug":"word-ladder","PassRate":"19%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":126,"Dir":"./Algorithms/0126.word-ladder-ii","Title":"Word Ladder II","TitleSlug":"word-ladder-ii","PassRate":"14%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":125,"Dir":"./Algorithms/0125.valid-palindrome","Title":"Valid Palindrome","TitleSlug":"valid-palindrome","PassRate":"26%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":124,"Dir":"./Algorithms/0124.binary-tree-maximum-path-sum","Title":"Binary Tree Maximum Path Sum","TitleSlug":"binary-tree-maximum-path-sum","PassRate":"26%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":123,"Dir":"./Algorithms/0123.best-time-to-buy-and-sell-stock-iii","Title":"Best Time to Buy and Sell Stock III","TitleSlug":"best-time-to-buy-and-sell-stock-iii","PassRate":"30%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":122,"Dir":"./Algorithms/0122.best-time-to-buy-and-sell-stock-ii","Title":"Best Time to Buy and Sell Stock II","TitleSlug":"best-time-to-buy-and-sell-stock-ii","PassRate":"47%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":121,"Dir":"./Algorithms/0121.best-time-to-buy-and-sell-stock","Title":"Best Time to Buy and Sell Stock","TitleSlug":"best-time-to-buy-and-sell-stock","PassRate":"42%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":120,"Dir":"./Algorithms/0120.triangle","Title":"Triangle","TitleSlug":"triangle","PassRate":"34%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":119,"Dir":"./Algorithms/0119.pascals-triangle-ii","Title":"Pascal's Triangle II","TitleSlug":"pascals-triangle-ii","PassRate":"37%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":118,"Dir":"./Algorithms/0118.pascals-triangle","Title":"Pascal's Triangle","TitleSlug":"pascals-triangle","PassRate":"39%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":117,"Dir":"./Algorithms/0117.populating-next-right-pointers-in-each-node-ii","Title":"Populating Next Right Pointers in Each Node II","TitleSlug":"populating-next-right-pointers-in-each-node-ii","PassRate":"33%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false,"IsAvailable":false},{"ID":116,"Dir":"./Algorithms/0116.populating-next-right-pointers-in-each-node","Title":"Populating Next Right Pointers in Each Node","TitleSlug":"populating-next-right-pointers-in-each-node","PassRate":"36%","Difficulty":2,"IsAccepted":false,"IsFavor":false,"IsNew":false,"IsAvailable":false},{"ID":115,"Dir":"./Algorithms/0115.distinct-subsequences","Title":"Distinct Subsequences","TitleSlug":"distinct-subsequences","PassRate":"32%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":114,"Dir":"./Algorithms/0114.flatten-binary-tree-to-linked-list","Title":"Flatten Binary Tree to Linked List","TitleSlug":"flatten-binary-tree-to-linked-list","PassRate":"36%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":113,"Dir":"./Algorithms/0113.path-sum-ii","Title":"Path Sum II","TitleSlug":"path-sum-ii","PassRate":"34%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":112,"Dir":"./Algorithms/0112.path-sum","Title":"Path Sum","TitleSlug":"path-sum","PassRate":"34%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":111,"Dir":"./Algorithms/0111.minimum-depth-of-binary-tree","Title":"Minimum Depth of Binary Tree","TitleSlug":"minimum-depth-of-binary-tree","PassRate":"33%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":110,"Dir":"./Algorithms/0110.balanced-binary-tree","Title":"Balanced Binary Tree","TitleSlug":"balanced-binary-tree","PassRate":"38%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":109,"Dir":"./Algorithms/0109.convert-sorted-list-to-binary-search-tree","Title":"Convert Sorted List to Binary Search Tree","TitleSlug":"convert-sorted-list-to-binary-search-tree","PassRate":"34%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":108,"Dir":"./Algorithms/0108.convert-sorted-array-to-binary-search-tree","Title":"Convert Sorted Array to Binary Search Tree","TitleSlug":"convert-sorted-array-to-binary-search-tree","PassRate":"43%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":107,"Dir":"./Algorithms/0107.binary-tree-level-order-traversal-ii","Title":"Binary Tree Level Order Traversal II","TitleSlug":"binary-tree-level-order-traversal-ii","PassRate":"41%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":106,"Dir":"./Algorithms/0106.construct-binary-tree-from-inorder-and-postorder-traversal","Title":"Construct Binary Tree from Inorder and Postorder Traversal","TitleSlug":"construct-binary-tree-from-inorder-and-postorder-traversal","PassRate":"32%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":105,"Dir":"./Algorithms/0105.construct-binary-tree-from-preorder-and-inorder-traversal","Title":"Construct Binary Tree from Preorder and Inorder Traversal","TitleSlug":"construct-binary-tree-from-preorder-and-inorder-traversal","PassRate":"33%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":104,"Dir":"./Algorithms/0104.maximum-depth-of-binary-tree","Title":"Maximum Depth of Binary Tree","TitleSlug":"maximum-depth-of-binary-tree","PassRate":"53%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":103,"Dir":"./Algorithms/0103.binary-tree-zigzag-level-order-traversal","Title":"Binary Tree Zigzag Level Order Traversal","TitleSlug":"binary-tree-zigzag-level-order-traversal","PassRate":"36%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":102,"Dir":"./Algorithms/0102.binary-tree-level-order-traversal","Title":"Binary Tree Level Order Traversal","TitleSlug":"binary-tree-level-order-traversal","PassRate":"41%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":101,"Dir":"./Algorithms/0101.symmetric-tree","Title":"Symmetric Tree","TitleSlug":"symmetric-tree","PassRate":"39%","Difficulty":1,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":100,"Dir":"./Algorithms/0100.same-tree","Title":"Same Tree","TitleSlug":"same-tree","PassRate":"47%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":99,"Dir":"./Algorithms/0099.recover-binary-search-tree","Title":"Recover Binary Search Tree","TitleSlug":"recover-binary-search-tree","PassRate":"30%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":98,"Dir":"./Algorithms/0098.validate-binary-search-tree","Title":"Validate Binary Search Tree","TitleSlug":"validate-binary-search-tree","PassRate":"23%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":97,"Dir":"./Algorithms/0097.interleaving-string","Title":"Interleaving String","TitleSlug":"interleaving-string","PassRate":"25%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":96,"Dir":"./Algorithms/0096.unique-binary-search-trees","Title":"Unique Binary Search Trees","TitleSlug":"unique-binary-search-trees","PassRate":"41%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":95,"Dir":"./Algorithms/0095.unique-binary-search-trees-ii","Title":"Unique Binary Search Trees II","TitleSlug":"unique-binary-search-trees-ii","PassRate":"31%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":94,"Dir":"./Algorithms/0094.binary-tree-inorder-traversal","Title":"Binary Tree Inorder Traversal","TitleSlug":"binary-tree-inorder-traversal","PassRate":"48%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":93,"Dir":"./Algorithms/0093.restore-ip-addresses","Title":"Restore IP Addresses","TitleSlug":"restore-ip-addresses","PassRate":"28%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":92,"Dir":"./Algorithms/0092.reverse-linked-list-ii","Title":"Reverse Linked List II","TitleSlug":"reverse-linked-list-ii","PassRate":"31%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":91,"Dir":"./Algorithms/0091.decode-ways","Title":"Decode Ways","TitleSlug":"decode-ways","PassRate":"20%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":90,"Dir":"./Algorithms/0090.subsets-ii","Title":"Subsets II","TitleSlug":"subsets-ii","PassRate":"37%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":89,"Dir":"./Algorithms/0089.gray-code","Title":"Gray Code","TitleSlug":"gray-code","PassRate":"41%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":88,"Dir":"./Algorithms/0088.merge-sorted-array","Title":"Merge Sorted Array","TitleSlug":"merge-sorted-array","PassRate":"32%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":87,"Dir":"./Algorithms/0087.scramble-string","Title":"Scramble String","TitleSlug":"scramble-string","PassRate":"29%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":86,"Dir":"./Algorithms/0086.partition-list","Title":"Partition List","TitleSlug":"partition-list","PassRate":"33%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":85,"Dir":"./Algorithms/0085.maximal-rectangle","Title":"Maximal Rectangle","TitleSlug":"maximal-rectangle","PassRate":"29%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":84,"Dir":"./Algorithms/0084.largest-rectangle-in-histogram","Title":"Largest Rectangle in Histogram","TitleSlug":"largest-rectangle-in-histogram","PassRate":"27%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":83,"Dir":"./Algorithms/0083.remove-duplicates-from-sorted-list","Title":"Remove Duplicates from Sorted List","TitleSlug":"remove-duplicates-from-sorted-list","PassRate":"40%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":82,"Dir":"./Algorithms/0082.remove-duplicates-from-sorted-list-ii","Title":"Remove Duplicates from Sorted List II","TitleSlug":"remove-duplicates-from-sorted-list-ii","PassRate":"29%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":81,"Dir":"./Algorithms/0081.search-in-rotated-sorted-array-ii","Title":"Search in Rotated Sorted Array II","TitleSlug":"search-in-rotated-sorted-array-ii","PassRate":"32%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":80,"Dir":"./Algorithms/0080.remove-duplicates-from-sorted-array-ii","Title":"Remove Duplicates from Sorted Array II","TitleSlug":"remove-duplicates-from-sorted-array-ii","PassRate":"36%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":79,"Dir":"./Algorithms/0079.word-search","Title":"Word Search","TitleSlug":"word-search","PassRate":"27%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":78,"Dir":"./Algorithms/0078.subsets","Title":"Subsets","TitleSlug":"subsets","PassRate":"43%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":77,"Dir":"./Algorithms/0077.combinations","Title":"Combinations","TitleSlug":"combinations","PassRate":"40%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":76,"Dir":"./Algorithms/0076.minimum-window-substring","Title":"Minimum Window Substring","TitleSlug":"minimum-window-substring","PassRate":"26%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":75,"Dir":"./Algorithms/0075.sort-colors","Title":"Sort Colors","TitleSlug":"sort-colors","PassRate":"38%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":74,"Dir":"./Algorithms/0074.search-a-2d-matrix","Title":"Search a 2D Matrix","TitleSlug":"search-a-2d-matrix","PassRate":"34%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":73,"Dir":"./Algorithms/0073.set-matrix-zeroes","Title":"Set Matrix Zeroes","TitleSlug":"set-matrix-zeroes","PassRate":"36%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":72,"Dir":"./Algorithms/0072.edit-distance","Title":"Edit Distance","TitleSlug":"edit-distance","PassRate":"32%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":71,"Dir":"./Algorithms/0071.simplify-path","Title":"Simplify Path","TitleSlug":"simplify-path","PassRate":"26%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":70,"Dir":"./Algorithms/0070.climbing-stairs","Title":"Climbing Stairs","TitleSlug":"climbing-stairs","PassRate":"40%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":69,"Dir":"./Algorithms/0069.sqrtx","Title":"Sqrt(x)","TitleSlug":"sqrtx","PassRate":"28%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":68,"Dir":"./Algorithms/0068.text-justification","Title":"Text Justification","TitleSlug":"text-justification","PassRate":"19%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":67,"Dir":"./Algorithms/0067.add-binary","Title":"Add Binary","TitleSlug":"add-binary","PassRate":"33%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":66,"Dir":"./Algorithms/0066.plus-one","Title":"Plus One","TitleSlug":"plus-one","PassRate":"39%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":65,"Dir":"./Algorithms/0065.valid-number","Title":"Valid Number","TitleSlug":"valid-number","PassRate":"12%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":64,"Dir":"./Algorithms/0064.minimum-path-sum","Title":"Minimum Path Sum","TitleSlug":"minimum-path-sum","PassRate":"39%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":63,"Dir":"./Algorithms/0063.unique-paths-ii","Title":"Unique Paths II","TitleSlug":"unique-paths-ii","PassRate":"32%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":62,"Dir":"./Algorithms/0062.unique-paths","Title":"Unique Paths","TitleSlug":"unique-paths","PassRate":"42%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":61,"Dir":"./Algorithms/0061.rotate-list","Title":"Rotate List","TitleSlug":"rotate-list","PassRate":"24%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":60,"Dir":"./Algorithms/0060.permutation-sequence","Title":"Permutation Sequence","TitleSlug":"permutation-sequence","PassRate":"29%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":59,"Dir":"./Algorithms/0059.spiral-matrix-ii","Title":"Spiral Matrix II","TitleSlug":"spiral-matrix-ii","PassRate":"40%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":58,"Dir":"./Algorithms/0058.length-of-last-word","Title":"Length of Last Word","TitleSlug":"length-of-last-word","PassRate":"32%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":57,"Dir":"./Algorithms/0057.insert-interval","Title":"Insert Interval","TitleSlug":"insert-interval","PassRate":"28%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":56,"Dir":"./Algorithms/0056.merge-intervals","Title":"Merge Intervals","TitleSlug":"merge-intervals","PassRate":"31%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":55,"Dir":"./Algorithms/0055.jump-game","Title":"Jump Game","TitleSlug":"jump-game","PassRate":"29%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":54,"Dir":"./Algorithms/0054.spiral-matrix","Title":"Spiral Matrix","TitleSlug":"spiral-matrix","PassRate":"26%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":53,"Dir":"./Algorithms/0053.maximum-subarray","Title":"Maximum Subarray","TitleSlug":"maximum-subarray","PassRate":"40%","Difficulty":1,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":52,"Dir":"./Algorithms/0052.n-queens-ii","Title":"N-Queens II","TitleSlug":"n-queens-ii","PassRate":"46%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":51,"Dir":"./Algorithms/0051.n-queens","Title":"N-Queens","TitleSlug":"n-queens","PassRate":"32%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":50,"Dir":"./Algorithms/0050.powx-n","Title":"Pow(x, n)","TitleSlug":"powx-n","PassRate":"26%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":49,"Dir":"./Algorithms/0049.group-anagrams","Title":"Group Anagrams","TitleSlug":"group-anagrams","PassRate":"37%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":48,"Dir":"./Algorithms/0048.rotate-image","Title":"Rotate Image","TitleSlug":"rotate-image","PassRate":"40%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":47,"Dir":"./Algorithms/0047.permutations-ii","Title":"Permutations II","TitleSlug":"permutations-ii","PassRate":"34%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":46,"Dir":"./Algorithms/0046.permutations","Title":"Permutations","TitleSlug":"permutations","PassRate":"46%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":45,"Dir":"./Algorithms/0045.jump-game-ii","Title":"Jump Game II","TitleSlug":"jump-game-ii","PassRate":"26%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":44,"Dir":"./Algorithms/0044.wildcard-matching","Title":"Wildcard Matching","TitleSlug":"wildcard-matching","PassRate":"20%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":43,"Dir":"./Algorithms/0043.multiply-strings","Title":"Multiply Strings","TitleSlug":"multiply-strings","PassRate":"27%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":42,"Dir":"./Algorithms/0042.trapping-rain-water","Title":"Trapping Rain Water","TitleSlug":"trapping-rain-water","PassRate":"37%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":41,"Dir":"./Algorithms/0041.first-missing-positive","Title":"First Missing Positive","TitleSlug":"first-missing-positive","PassRate":"25%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":40,"Dir":"./Algorithms/0040.combination-sum-ii","Title":"Combination Sum II","TitleSlug":"combination-sum-ii","PassRate":"35%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":39,"Dir":"./Algorithms/0039.combination-sum","Title":"Combination Sum","TitleSlug":"combination-sum","PassRate":"40%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":38,"Dir":"./Algorithms/0038.count-and-say","Title":"Count and Say","TitleSlug":"count-and-say","PassRate":"36%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":37,"Dir":"./Algorithms/0037.sudoku-solver","Title":"Sudoku Solver","TitleSlug":"sudoku-solver","PassRate":"31%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":36,"Dir":"./Algorithms/0036.valid-sudoku","Title":"Valid Sudoku","TitleSlug":"valid-sudoku","PassRate":"36%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":35,"Dir":"./Algorithms/0035.search-insert-position","Title":"Search Insert Position","TitleSlug":"search-insert-position","PassRate":"39%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":34,"Dir":"./Algorithms/0034.search-for-a-range","Title":"Search for a Range","TitleSlug":"search-for-a-range","PassRate":"31%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":33,"Dir":"./Algorithms/0033.search-in-rotated-sorted-array","Title":"Search in Rotated Sorted Array","TitleSlug":"search-in-rotated-sorted-array","PassRate":"32%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":32,"Dir":"./Algorithms/0032.longest-valid-parentheses","Title":"Longest Valid Parentheses","TitleSlug":"longest-valid-parentheses","PassRate":"23%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":31,"Dir":"./Algorithms/0031.next-permutation","Title":"Next Permutation","TitleSlug":"next-permutation","PassRate":"28%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":30,"Dir":"./Algorithms/0030.substring-with-concatenation-of-all-words","Title":"Substring with Concatenation of All Words","TitleSlug":"substring-with-concatenation-of-all-words","PassRate":"22%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":29,"Dir":"./Algorithms/0029.divide-two-integers","Title":"Divide Two Integers","TitleSlug":"divide-two-integers","PassRate":"15%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":28,"Dir":"./Algorithms/0028.implement-strstr","Title":"Implement strStr()","TitleSlug":"implement-strstr","PassRate":"28%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":27,"Dir":"./Algorithms/0027.remove-element","Title":"Remove Element","TitleSlug":"remove-element","PassRate":"40%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":26,"Dir":"./Algorithms/0026.remove-duplicates-from-sorted-array","Title":"Remove Duplicates from Sorted Array","TitleSlug":"remove-duplicates-from-sorted-array","PassRate":"35%","Difficulty":1,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":25,"Dir":"./Algorithms/0025.reverse-nodes-in-k-group","Title":"Reverse Nodes in k-Group","TitleSlug":"reverse-nodes-in-k-group","PassRate":"31%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":24,"Dir":"./Algorithms/0024.swap-nodes-in-pairs","Title":"Swap Nodes in Pairs","TitleSlug":"swap-nodes-in-pairs","PassRate":"38%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":23,"Dir":"./Algorithms/0023.merge-k-sorted-lists","Title":"Merge k Sorted Lists","TitleSlug":"merge-k-sorted-lists","PassRate":"27%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":22,"Dir":"./Algorithms/0022.generate-parentheses","Title":"Generate Parentheses","TitleSlug":"generate-parentheses","PassRate":"46%","Difficulty":2,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":21,"Dir":"./Algorithms/0021.merge-two-sorted-lists","Title":"Merge Two Sorted Lists","TitleSlug":"merge-two-sorted-lists","PassRate":"39%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":20,"Dir":"./Algorithms/0020.valid-parentheses","Title":"Valid Parentheses","TitleSlug":"valid-parentheses","PassRate":"33%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":19,"Dir":"./Algorithms/0019.remove-nth-node-from-end-of-list","Title":"Remove Nth Node From End of List","TitleSlug":"remove-nth-node-from-end-of-list","PassRate":"34%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":18,"Dir":"./Algorithms/0018.4sum","Title":"4Sum","TitleSlug":"4sum","PassRate":"27%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":17,"Dir":"./Algorithms/0017.letter-combinations-of-a-phone-number","Title":"Letter Combinations of a Phone Number","TitleSlug":"letter-combinations-of-a-phone-number","PassRate":"35%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":16,"Dir":"./Algorithms/0016.3sum-closest","Title":"3Sum Closest","TitleSlug":"3sum-closest","PassRate":"31%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":15,"Dir":"./Algorithms/0015.3sum","Title":"3Sum","TitleSlug":"3sum","PassRate":"21%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":14,"Dir":"./Algorithms/0014.longest-common-prefix","Title":"Longest Common Prefix","TitleSlug":"longest-common-prefix","PassRate":"31%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":13,"Dir":"./Algorithms/0013.roman-to-integer","Title":"Roman to Integer","TitleSlug":"roman-to-integer","PassRate":"47%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":12,"Dir":"./Algorithms/0012.integer-to-roman","Title":"Integer to Roman","TitleSlug":"integer-to-roman","PassRate":"45%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":11,"Dir":"./Algorithms/0011.container-with-most-water","Title":"Container With Most Water","TitleSlug":"container-with-most-water","PassRate":"36%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":10,"Dir":"./Algorithms/0010.regular-expression-matching","Title":"Regular Expression Matching","TitleSlug":"regular-expression-matching","PassRate":"24%","Difficulty":3,"IsAccepted":true,"IsFavor":true,"IsNew":false,"IsAvailable":true},{"ID":9,"Dir":"./Algorithms/0009.palindrome-number","Title":"Palindrome Number","TitleSlug":"palindrome-number","PassRate":"35%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":8,"Dir":"./Algorithms/0008.string-to-integer-atoi","Title":"String to Integer (atoi)","TitleSlug":"string-to-integer-atoi","PassRate":"13%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":7,"Dir":"./Algorithms/0007.reverse-integer","Title":"Reverse Integer","TitleSlug":"reverse-integer","PassRate":"24%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":6,"Dir":"./Algorithms/0006.zigzag-conversion","Title":"ZigZag Conversion","TitleSlug":"zigzag-conversion","PassRate":"27%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":5,"Dir":"./Algorithms/0005.longest-palindromic-substring","Title":"Longest Palindromic Substring","TitleSlug":"longest-palindromic-substring","PassRate":"25%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":4,"Dir":"./Algorithms/0004.median-of-two-sorted-arrays","Title":"Median of Two Sorted Arrays","TitleSlug":"median-of-two-sorted-arrays","PassRate":"22%","Difficulty":3,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":3,"Dir":"./Algorithms/0003.longest-substring-without-repeating-characters","Title":"Longest Substring Without Repeating Characters","TitleSlug":"longest-substring-without-repeating-characters","PassRate":"24%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":2,"Dir":"./Algorithms/0002.add-two-numbers","Title":"Add Two Numbers","TitleSlug":"add-two-numbers","PassRate":"28%","Difficulty":2,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true},{"ID":1,"Dir":"./Algorithms/0001.two-sum","Title":"Two Sum","TitleSlug":"two-sum","PassRate":"36%","Difficulty":1,"IsAccepted":true,"IsFavor":false,"IsNew":false,"IsAvailable":true}],"Algorithms":{"Name":"","Easy":{"Solved":156,"Total":156},"Medium":{"Solved":260,"Total":260},"Hard":{"Solved":109,"Total":110},"Total":{"Solved":525,"Total":526}},"Progress":99,"Ranking":1273} \ No newline at end of file diff --git a/unavailable.json b/unavailable.json new file mode 100644 index 000000000..c8f3c4f4b --- /dev/null +++ b/unavailable.json @@ -0,0 +1 @@ +{"List":[116,117,133,138,141,142,151,160,173,190,191,222,235,236,237,278,284,297,341,374,386,449,535,690]} \ No newline at end of file