cf/mirror

Bash and a Tough Math Puzzle

CF
914D1900· candidate master2.5s256 MB⌨ stdin/stdout

Examples

Sample 1of 2
Input
3
2 6 3
4
1 1 2 2
1 1 3 3
2 1 9
1 1 3 2
Output
YES
YES
NO
Sample 2of 2
Input
5
1 2 3 4 5
6
1 1 4 2
2 3 6
1 1 4 2
1 1 5 2
2 5 10
1 1 5 2
Output
NO
YES
NO
YES
914D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)