diff --git "a/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/exercise.md" "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/exercise.md" new file mode 100644 index 0000000000000000000000000000000000000000..818a9a3773bdec221a7a24ba4ded821e61b15967 --- /dev/null +++ "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/exercise.md" @@ -0,0 +1,15 @@ +# 蓄水池截面积 + +工匠用高度不同但宽度一致的隔板修建蓄水池,将隔板按顺序码好后,再将其前面和后面封闭,求蓄水池的截面积 + +## 输入描述 +输入一个元素不为负的数组,表示每个石块的排列顺序和高度,当数组元素为0表示该块板的地方空着不放隔板 + +## 输出描述 +输出截面积 + +## 输入样例 +[2,1,0,3] + +## 输出样例 +3 \ No newline at end of file diff --git "a/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/1.in" "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/1.in" new file mode 100644 index 0000000000000000000000000000000000000000..4ed213a738860f3d76deaec5cda2e852bf6ff9c3 --- /dev/null +++ "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/1.in" @@ -0,0 +1 @@ +[1,0,1] \ No newline at end of file diff --git "a/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/1.output" "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/1.output" new file mode 100644 index 0000000000000000000000000000000000000000..56a6051ca2b02b04ef92d5150c9ef600403cb1de --- /dev/null +++ "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/1.output" @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git "a/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/10.in" "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/10.in" new file mode 100644 index 0000000000000000000000000000000000000000..0a81a6ea3b6ca4ecd5372574f9a444e5d22b18a1 --- /dev/null +++ "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/10.in" @@ -0,0 +1 @@ +[13,2,3,11,4,5,6,9,0,1,3,7] \ No newline at end of file diff --git "a/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/10.output" "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/10.output" new file mode 100644 index 0000000000000000000000000000000000000000..abc4eff6ac83026669840d289fce80cc9a42baaa --- /dev/null +++ "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/10.output" @@ -0,0 +1 @@ +46 \ No newline at end of file diff --git "a/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/2.in" "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/2.in" new file mode 100644 index 0000000000000000000000000000000000000000..46facd936012e3701553597b58b347a3eb2f5c05 --- /dev/null +++ "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/2.in" @@ -0,0 +1 @@ +[1,0,0,1] \ No newline at end of file diff --git "a/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/2.output" "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/2.output" new file mode 100644 index 0000000000000000000000000000000000000000..d8263ee9860594d2806b0dfd1bfd17528b0ba2a4 --- /dev/null +++ "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/2.output" @@ -0,0 +1 @@ +2 \ No newline at end of file diff --git "a/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/3.in" "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/3.in" new file mode 100644 index 0000000000000000000000000000000000000000..cf4a199fb261e7c1d0e9e5ab393b27d5fb5e3729 --- /dev/null +++ "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/3.in" @@ -0,0 +1 @@ +[2,0,0,1] \ No newline at end of file diff --git "a/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/3.output" "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/3.output" new file mode 100644 index 0000000000000000000000000000000000000000..d8263ee9860594d2806b0dfd1bfd17528b0ba2a4 --- /dev/null +++ "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/3.output" @@ -0,0 +1 @@ +2 \ No newline at end of file diff --git "a/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/4.in" "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/4.in" new file mode 100644 index 0000000000000000000000000000000000000000..a7574e23163faee74eec0abc1ae1dd6367ba9281 --- /dev/null +++ "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/4.in" @@ -0,0 +1 @@ +[5,1,0,3,1,2] \ No newline at end of file diff --git "a/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/4.output" "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/4.output" new file mode 100644 index 0000000000000000000000000000000000000000..62f9457511f879886bb7728c986fe10b0ece6bcb --- /dev/null +++ "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/4.output" @@ -0,0 +1 @@ +6 \ No newline at end of file diff --git "a/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/5.in" "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/5.in" new file mode 100644 index 0000000000000000000000000000000000000000..6e7ea636eec7d2e5cf84e0f64c0a7b877bf7a60a --- /dev/null +++ "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/5.in" @@ -0,0 +1 @@ +[0] \ No newline at end of file diff --git "a/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/5.output" "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/5.output" new file mode 100644 index 0000000000000000000000000000000000000000..c227083464fb9af8955c90d2924774ee50abb547 --- /dev/null +++ "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/5.output" @@ -0,0 +1 @@ +0 \ No newline at end of file diff --git "a/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/6.in" "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/6.in" new file mode 100644 index 0000000000000000000000000000000000000000..f2eda8711479690f1f064e9b0eb3a5130ee5cbb1 --- /dev/null +++ "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/6.in" @@ -0,0 +1 @@ +[1,3,5,7,10] \ No newline at end of file diff --git "a/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/6.output" "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/6.output" new file mode 100644 index 0000000000000000000000000000000000000000..c227083464fb9af8955c90d2924774ee50abb547 --- /dev/null +++ "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/6.output" @@ -0,0 +1 @@ +0 \ No newline at end of file diff --git "a/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/7.in" "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/7.in" new file mode 100644 index 0000000000000000000000000000000000000000..2cd1d89b84372f84b752e2308b176dd80dd0b911 --- /dev/null +++ "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/7.in" @@ -0,0 +1 @@ +[6,5,4,3,2,1] \ No newline at end of file diff --git "a/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/7.output" "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/7.output" new file mode 100644 index 0000000000000000000000000000000000000000..c227083464fb9af8955c90d2924774ee50abb547 --- /dev/null +++ "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/7.output" @@ -0,0 +1 @@ +0 \ No newline at end of file diff --git "a/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/8.in" "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/8.in" new file mode 100644 index 0000000000000000000000000000000000000000..816378b34e12a9695b4c9e78c0ad42afd7cb809f --- /dev/null +++ "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/8.in" @@ -0,0 +1 @@ +[4,0,1,5] \ No newline at end of file diff --git "a/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/8.output" "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/8.output" new file mode 100644 index 0000000000000000000000000000000000000000..c7930257dfef505fd996e1d6f22f2f35149990d0 --- /dev/null +++ "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/8.output" @@ -0,0 +1 @@ +7 \ No newline at end of file diff --git "a/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/9.in" "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/9.in" new file mode 100644 index 0000000000000000000000000000000000000000..3aed854c4ee91ccbf995a2fdb6c8a512875f342e --- /dev/null +++ "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/9.in" @@ -0,0 +1 @@ +[5,0,1,9,7,3,4,2,3] \ No newline at end of file diff --git "a/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/9.output" "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/9.output" new file mode 100644 index 0000000000000000000000000000000000000000..9d607966b721abde8931ddd052181fae905db503 --- /dev/null +++ "b/exercises/tangzw/\344\270\255\347\255\211/\350\223\204\346\260\264\346\261\240\346\210\252\351\235\242\347\247\257/test_cases/9.output" @@ -0,0 +1 @@ +11 \ No newline at end of file diff --git "a/exercises/tangzw/\345\233\260\351\232\276/.gitkeep" "b/exercises/tangzw/\345\233\260\351\232\276/.gitkeep" new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ "b/exercises/tangzw/\345\233\260\351\232\276/.gitkeep" @@ -0,0 +1 @@ + diff --git "a/exercises/tangzw/\347\256\200\345\215\225/.gitkeep" "b/exercises/tangzw/\347\256\200\345\215\225/.gitkeep" new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391