Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: 禁止重边和自环时程序卡死 #95

Open
WillHouMoe opened this issue Jul 28, 2022 · 0 comments
Open

Bug: 禁止重边和自环时程序卡死 #95

WillHouMoe opened this issue Jul 28, 2022 · 0 comments

Comments

@WillHouMoe
Copy link

当我想造一个简单无向图时,程序会先生成几组数据,然后停住,不知道是什么原因。

报错:
image

生成文件:
image
image

代码:

from cyaron import *

_n = ati([0, 10, 50, 100, 500, 1E3])
_m = ati([0, 30, 500, 1E3, 1E4, 1E6])
_times = ati([0, 5, 5, 5, 10, 10])
_cnt = 1

for i in range(1, 6):
    n = _n[i]
    m = _m[i]
    for j in range(1, _times[i] + 1):
        test_data = IO(file_prefix="short", data_id=_cnt)
        _cnt += 1
        in_n = randint(1, n)
        in_m = randint(1, m)
        s = randint(1, in_n)
        t = randint(1, in_n)
        test_data.input_writeln(in_n, in_m)
        graph = Graph.graph(in_n, in_m, weight_limit=(1, 10000000), self_loop=False, repeated_edges=False)
        test_data.input_writeln(graph)
        test_data.input_writeln(s, t)
        test_data.output_gen("E:\\***\\std.exe")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant