Skip to content

道路整備 (Road Development)

Unrated
日本語

Language

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

Statement

道路整備 (Road Development):公式日本語問題文 1ページ

道路整備 (Road Development):公式日本語問題文 2ページ

道路整備 (Road Development):公式日本語問題文 3ページ

道路整備 (Road Development):公式日本語問題文 4ページ

道路整備 (Road Development):公式日本語問題文 5ページ

Examples

Sample input 1
3 7
1 1 2
2 2 1
2 2 3
1 2 1
2 1 2
1 2 3
2 1 3
Sample output 1
1
-1
0
1
Sample input 2
6 8
1 1 3
1 6 1
1 2 5
2 3 6
1 3 6
1 4 1
2 4 3
2 2 5
Sample output 2
2
1
1
Sample input 3
7 11
1 5 1
1 6 2
1 1 3
1 3 5
1 5 7
1 4 5
1 4 1
2 1 3
2 3 7
2 4 3
2 5 6
Sample output 3
0
1
0
-1

Notes

Tags

No tags yet

Source