コード例 #1
0
ファイル: tests.py プロジェクト: limkeunhak/algorithm-study
 def test_prob1_case_4(self):
     result = prob1.solution(1, 1, 1, [[1, 1, 1]])
     self.assertEqual(result, 0)
コード例 #2
0
ファイル: tests.py プロジェクト: limkeunhak/algorithm-study
 def test_prob1_case_2(self):
     result = prob1.solution('xbwwb')
     self.assertEqual(result, 'xwbbw')
コード例 #3
0
ファイル: tests.py プロジェクト: limkeunhak/algorithm-study
 def test_prob1_case_3(self):
     result = prob1.solution(2, 2, 2, [[2, 1, 1], [1, 1, 2]])
     self.assertEqual(result, 1)
コード例 #4
0
ファイル: tests.py プロジェクト: limkeunhak/algorithm-study
 def test_prob1_case_1(self):
     result = prob1.solution('aaaa')
     self.assertEqual(result, 2)
コード例 #5
0
ファイル: tests.py プロジェクト: limkeunhak/algorithm-study
 def test_prob1_case_3(self):
     result = prob1.solution(6, 10, [(0, 1), (0, 2), (1, 2), (1, 3), (1, 4),
                                     (2, 3), (2, 4), (3, 4), (3, 5),
                                     (4, 5)])
     self.assertEqual(result, 4)
コード例 #6
0
ファイル: tests.py プロジェクト: limkeunhak/algorithm-study
 def test_prob1_case_2(self):
     result = prob1.solution(4, 4, 0, [])
     self.assertEqual(result, 16)
コード例 #7
0
ファイル: tests.py プロジェクト: limkeunhak/algorithm-study
 def test_prob1_case_4(self):
     result = prob1.solution('baaabbabbb')
     self.assertEqual(result, 7)
コード例 #8
0
 def test_prob1_case_6(self):
     result = prob1.solution('*?', 'tessdd')
     self.assertEqual(result, True)
コード例 #9
0
ファイル: tests.py プロジェクト: limkeunhak/algorithm-study
 def test_prob1_case_3(self):
     result = prob1.solution(3)
     self.assertEqual(result, 3)
コード例 #10
0
 def test_prob1_case_4(self):
     result = prob1.solution('t*t', 'tess')
     self.assertEqual(result, False)
コード例 #11
0
 def test_prob1_case_5(self):
     result = prob1.solution('t*t', 'tessdddt')
     self.assertEqual(result, True)
コード例 #12
0
 def test_prob1_case_2(self):
     result = prob1.solution('t??t', 'test')
     self.assertEqual(result, True)
コード例 #13
0
 def test_prob1_case_1(self):
     result = prob1.solution('sch?ol', 'school')
     self.assertEqual(result, True)
コード例 #14
0
ファイル: tests.py プロジェクト: limkeunhak/algorithm-study
 def test_prob1_case_1(self):
     result = prob1.solution(10)
     self.assertEqual(result, [6, 4])
コード例 #15
0
ファイル: tests.py プロジェクト: limkeunhak/algorithm-study
 def test_prob1_case_5(self):
     result = prob1.solution(5, 3, 1, [[5, 1, 3]])
     self.assertEqual(result, 12)
コード例 #16
0
ファイル: tests.py プロジェクト: limkeunhak/algorithm-study
 def test_prob1_case_4(self):
     result = prob1.solution(4)
     self.assertEqual(result, 5)
コード例 #17
0
ファイル: tests.py プロジェクト: limkeunhak/algorithm-study
 def test_prob1_case_1(self):
     result = prob1.solution(4, 4, 3, [[2, 2, 3], [3, 1, 4], [4, 4, 4]])
     self.assertEqual(result, 9)
コード例 #18
0
ファイル: tests.py プロジェクト: limkeunhak/algorithm-study
 def test_prob1_case_5(self):
     result = prob1.solution(5)
     self.assertEqual(result, 8)
コード例 #19
0
ファイル: tests.py プロジェクト: limkeunhak/algorithm-study
 def test_prob1_case_3(self):
     result = prob1.solution('aaabbb')
     self.assertEqual(result, 4)
コード例 #20
0
ファイル: tests.py プロジェクト: limkeunhak/algorithm-study
 def test_prob1_case_6(self):
     result = prob1.solution(6)
     self.assertEqual(result, 13)
コード例 #21
0
ファイル: tests.py プロジェクト: limkeunhak/algorithm-study
 def test_prob1_case_5(self):
     result = prob1.solution('babba')
     self.assertEqual(result, 5)
コード例 #22
0
ファイル: tests.py プロジェクト: limkeunhak/algorithm-study
 def test_prob1_case_7(self):
     result = prob1.solution(7)
     self.assertEqual(result, 21)
コード例 #23
0
ファイル: tests.py プロジェクト: limkeunhak/algorithm-study
 def test_prob1_case_2(self):
     result = prob1.solution(4, 6, [(0, 1), (1, 2), (2, 3), (3, 0), (0, 2),
                                    (1, 3)])
     self.assertEqual(result, 3)
コード例 #24
0
ファイル: tests.py プロジェクト: limkeunhak/algorithm-study
 def test_prob1_case_2(self):
     result = prob1.solution(2)
     self.assertEqual(result, 2)
コード例 #25
0
ファイル: tests.py プロジェクト: limkeunhak/algorithm-study
 def test_prob1_case_4(self):
     result = prob1.solution(4, 1, [(0, 1)])
     self.assertEqual(result, 0)
コード例 #26
0
ファイル: tests.py プロジェクト: limkeunhak/algorithm-study
 def test_prob1_case_4(self):
     result = prob1.solution('xxwwwbxwxwbbbwwxxxwwbbbwwwwbb')
     self.assertEqual(result, 'xxwbxwwxbbwwbwbxwbwwxwwwxbbwb')