This commit is contained in:
Ilya Grigorev
2024-11-09 22:00:19 +03:00
parent ff40263bbe
commit 06638c782e
2 changed files with 0 additions and 24 deletions
-5
View File
@@ -90,7 +90,6 @@ def Vogel(
S[x] -= selected_value
D[y] = 0
remaining_cols[y] = 0
print(x, y)
x_0[x][y] = selected_value
if maxD in ColD:
y = np.argmax(ColD, axis=0)
@@ -246,7 +245,6 @@ def TEST_CASE_1():
D = np.array([
30, 20, 70, 30, 60
], dtype=np.int64)
print_problem_statement(S, C, D)
NWExpected = np.array([
[30, 20, 0, 0, 0],
@@ -281,7 +279,6 @@ def TEST_CASE_2():
S = np.array([20, 30, 25], dtype=np.int64)
D = np.array([10, 25, 40], dtype=np.int64)
print_problem_statement(S, C, D)
NWExpected = np.array([
[10, 10, 0],
@@ -319,7 +316,6 @@ def TEST_CASE_3():
D = np.array([
120, 50, 190, 110
], dtype=np.int64)
print_problem_statement(S, C, D)
NWExpected = np.array([
[120, 40, 0, 0],
@@ -350,4 +346,3 @@ if __name__ == "__main__":
print("----------------------RESULTS----------------------")
print(f"Total number of tests: {len(tests)}")
print(f"Total number of passed tests: {tests_passed}")
-19
View File
@@ -1,19 +0,0 @@
from main import Vogel, M
import numpy as np
C = np.array([
[16, 16, 13, 22, 17],
[14, 14, 13, 19, 15],
[19, 19, 20, 23, M],
[M, 0, M, 0, 0]
], dtype=np.int64)
S = np.array([
50, 60, 50, 50
], dtype=np.int64)
D = np.array([
30, 20, 70, 30, 60
], dtype=np.int64)
print(Vogel(S, C, D).solution)