Ejemplo n.º 1
0
 def test_q_marcus(self):
     k = 4
     n = 6
     your_idx = 1
     your_poly = [2, 12, 20, 18]
     received_points = [44, 23, 34, 41, 42]
     received_master_points = [(3, 2930), (5, 11816), (6, 19751)]
     self.assertEqual(
         41,
         main.run_instance(k, n, your_idx, your_poly, received_points,
                           received_master_points))
Ejemplo n.º 2
0
 def test_testQ1(self):
     k = 4
     n = 6
     your_idx = 1
     your_poly = [20, 20, 11, 6]
     received_points = [63, 49, 49, 54, 43]
     received_master_points = [(3, 2199), (4, 4389), (6, 12585)]
     self.assertEqual(
         93,
         main.run_instance(k, n, your_idx, your_poly, received_points,
                           received_master_points))
Ejemplo n.º 3
0
 def test_testQ3(self):
     k = 3
     n = 6
     your_idx = 1
     your_poly = [9, 19, 5]
     received_points = [37, 18, 40, 44, 28]
     received_master_points = [(4, 1385), (5, 2028)]
     self.assertEqual(
         53,
         main.run_instance(k, n, your_idx, your_poly, received_points,
                           received_master_points))
Ejemplo n.º 4
0
 def test_testQ2(self):
     k = 5
     n = 6
     your_idx = 1
     your_poly = [20, 18, 13, 19, 15]
     received_points = [34, 48, 45, 39, 24]
     received_master_points = [(2, 1908), (3, 7677), (5, 50751),
                               (6, 101700)]
     self.assertEqual(
         36,
         main.run_instance(k, n, your_idx, your_poly, received_points,
                           received_master_points))
Ejemplo n.º 5
0
 def test_instr(self):
     k = 5
     n = 8
     your_idx = 1
     your_poly = [13, 8, 11, 1, 5]
     received_points = [75, 75, 54, 52, 77, 54, 43]
     received_master_points = [(2, 2782), (4, 30822), (5, 70960),
                               (7, 256422)]
     self.assertEqual(
         110,
         main.run_instance(k, n, your_idx, your_poly, received_points,
                           received_master_points))
Ejemplo n.º 6
0
 def test_instr_case(self):
     #note n = 1643107 so 1643107 -> 1643104 means -3!
     self.assertEqual(1643102, main.run_instance(1117, 1471, 652534095028, 'test_live_quiz_marcus_votes'))
Ejemplo n.º 7
0
 def test_instr_case(self):
     #note n = 1643107 so 1643107 -> 1643104 means -3!
     self.assertEqual(32, main.run_instance(5, 7, 867, 'test_instr_votes'))
Ejemplo n.º 8
0
 def test_testquiz_case(self):
     #note n = 1643107 so 1643107 -> 1643104 means -3!
     self.assertEqual(1643104, main.run_instance(1117, 1471, 652534095028, 'test_quiz_votes'))
Ejemplo n.º 9
0
 def test_testquiz(self):
     self.assertEqual('0bfb4e0982b75971f83321ec5b2119e068daef53',
                      main.run_instance('0123456789abcdef'))
Ejemplo n.º 10
0
 def test_instructions(self):
     self.assertEqual('0b29099972244f2569bb5f6f4e34760cc7bf4645',
                      main.run_instance('1337'))
Ejemplo n.º 11
0
 def test_livequiz(self):
     self.assertEqual(
         '8a7742ba75228d2729c1b3908199b36189316e8e',
         main.run_instance('9ef25a019a549b8413392a05a401c4a1d8d00f00'))