Skip to content

Commit 918aaef

Browse files
committed
mincostflow static_assert
1 parent 6285053 commit 918aaef

File tree

3 files changed

+3
-29
lines changed

3 files changed

+3
-29
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
utilities/bigint.hpp
3838
convex_hull_trick/li_chao_tree.hpp
3939
convex_hull_trick/test/li_chao_tree.test.cpp
40-
lemon*
4140

4241
ClipBoardHistoryConfig.txt
4342
SnippetConfig.json

LICENSE

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -19,29 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
SOFTWARE.
22-
23-
The scripts for continuous interation (CI) were abstracted from kmyk's online-judge-tools,
24-
which is subject to the same license.
25-
Here is the oriinal copyright notice for online-judge-tools.
26-
27-
The MIT License (MIT)
28-
29-
Copyright (c) 2017-2018 Kimiyuki Onaka.
30-
31-
Permission is hereby granted, free of charge, to any person obtaining a copy
32-
of this software and associated documentation files (the "Software"), to deal
33-
in the Software without restriction, including without limitation the rights
34-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
35-
copies of the Software, and to permit persons to whom the Software is
36-
furnished to do so, subject to the following conditions:
37-
38-
The above copyright notice and this permission notice shall be included in
39-
all copies or substantial portions of the Software.
40-
41-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
42-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
43-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
44-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
45-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
46-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
47-
THE SOFTWARE.

combinatorial_opt/mincostflow.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77

88
// CUT begin
99
// MinCostFlow based on AtCoder Library, no namespace, no private variables, compatible with C++11
10-
// Reference: <https://atcoder.github.io/ac-library/production/document_ja/mincostflow.html>
1110
// **NO NEGATIVE COST EDGES**
11+
// Reference: https://atcoder.github.io/ac-library/production/document_ja/mincostflow.html
12+
// Remark: You can use [radix heap](https://github.com/iwiwi/radix-heap) for Dijkstra acceleration
1213
template <class Cap, class Cost> struct mcf_graph {
1314
mcf_graph() {}
14-
mcf_graph(int n) : _n(n), g(n) {}
15+
mcf_graph(int n) : _n(n), g(n) { static_assert(std::numeric_limits<Cap>::max() > 0); }
1516

1617
int add_edge(int from, int to, Cap cap, Cost cost) {
1718
assert(0 <= from && from < _n);

0 commit comments

Comments
 (0)