Skip to content

復興事業 (Reconstruction Project)

Unrated
日本語

Language

Contribute a translation
Time limit
5000 ms
Memory limit
1024 MB
Submissions
0
Correct
0
Solved by
0
AC rate
—

Statement

復興事業 (Reconstruction Project):公式日本語問題文 1ページ

復興事業 (Reconstruction Project):公式日本語問題文 2ページ

復興事業 (Reconstruction Project):公式日本語問題文 3ページ

復興事業 (Reconstruction Project):公式日本語問題文 4ページ

復興事業 (Reconstruction Project):公式日本語問題文 5ページ

Examples

Sample input 1
5 10
1 2 8
1 3 13
1 4 5
1 5 11
1 5 3
2 3 7
2 4 15
3 4 6
3 5 6
4 5 2
6
3
6
8
10
13
17
Sample output 1
8
2
5
10
9
21
Sample input 2
3 4
1 2 1
1 2 4
2 3 2
2 3 4
4
1
2
3
4
Sample output 2
1
1
2
0
Sample input 3
10 20
6 7 914727791
1 8 771674531
3 5 632918108
5 9 329296846
1 7 237501112
4 9 303328173
2 6 216298255
2 10 504024991
3 8 158236886
1 10 10176179
8 9 918271145
3 6 217165898
3 6 624543444
4 9 70147274
8 9 976983490
6 9 210108505
2 9 972711062
1 10 564567289
3 7 411395464
4 7 952470985
10
115721165
198969744
356664401
429802521
513343279
610443927
741016686
786597783
898772266
903568946
Sample output 3
1121073688
761832468
1026806785
1316097872
1321500065
1445238392
1637513141
1621778548
1733953031
1738749711

Notes

Tags

No tags yet

Source