cf/mirror

Kirei and the Linear Function

CF
1729F1900· candidate master3s256 MB⌨ stdin/stdout

Examples

Sample 1of 1
Input
5
1003004
4 1
1 2 1
179572007
4 2
2 7 3
2 7 4
111
2 1
2 2 6
0000
1 2
1 4 0
1 4 1
484
1 5
2 2 0
2 3 7
1 2 5
3 3 8
2 2 6
Output
2 4
1 5
1 2
-1 -1
1 2
-1 -1
1 3
1 3
-1 -1
-1 -1
-1 -1
1729F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)