示例#1
0
 def test_case_2(self):
     self.assertEqual(waterArea([0, 0, 0, 0, 0]), 0)
示例#2
0
 def test_case_11(self):
     self.assertEqual(
         waterArea([0, 100, 0, 0, 10, 1, 1, 10, 1, 0, 1, 1, 0, 0]), 39)
示例#3
0
 def test_case_1(self):
     self.assertEqual(waterArea([]), 0)
示例#4
0
 def test_case_10(self):
     self.assertEqual(
         waterArea([0, 100, 0, 0, 10, 1, 1, 10, 1, 0, 1, 1, 0, 100]), 1075)
示例#5
0
 def test_case_9(self):
     self.assertEqual(
         waterArea([0, 8, 0, 0, 10, 0, 0, 10, 0, 0, 1, 1, 0, 3]), 49)
示例#6
0
 def test_case_7(self):
     self.assertEqual(waterArea([0, 1, 0, 1, 0, 2, 0, 3]), 4)
示例#7
0
 def test_case_6(self):
     self.assertEqual(waterArea([0, 1, 0, 1, 0]), 1)
示例#8
0
 def test_case_5(self):
     self.assertEqual(waterArea([0, 1, 2, 1, 1]), 0)