We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
对函数
graph max_degree(int n, int k, _Weight weightL = 0, _Weight weightR = 0)
设定度为k时,实际树的度为k+1;基于此函数的
graph binary_tree(int n, _Weight weightL = 0, _Weight weightR = 0)
同样会出现可能生成四叉树的问题,如下为函数原型:
graph binary_tree(int n, _Weight weightL = 0, _Weight weightR = 0) { return max_degree(n, 3, weightL, weightR); }
测试用代码:
gen_data(1, 7, [&](int i, int j){ testcase_writer io("data/", i, j); graph t = binary_tree(10); graph g=max_degree(10, 2); std::string unweighted_t_str = t.to_string<unweighted_output>(); std::string unweighted_g_str = g.to_string<unweighted_output>(); io.input_writeln(5); io.input_writeln(unweighted_t_str); io.input_writeln(unweighted_g_str); } );
The text was updated successfully, but these errors were encountered:
你说得对,我这个度数计算的是儿子的数量……不过这个好像无关紧要吧,等到我有空时候fix一下
Sorry, something went wrong.
No branches or pull requests
对函数
graph max_degree(int n, int k, _Weight weightL = 0, _Weight weightR = 0)
设定度为k时,实际树的度为k+1;基于此函数的
graph binary_tree(int n, _Weight weightL = 0, _Weight weightR = 0)
同样会出现可能生成四叉树的问题,如下为函数原型:
graph binary_tree(int n, _Weight weightL = 0, _Weight weightR = 0) { return max_degree(n, 3, weightL, weightR); }
测试用代码:
The text was updated successfully, but these errors were encountered: