cf/mirror

Easy Demon Problem

CF
2044F1900· candidate master4s256 MB⌨ stdin/stdout

Examples

Sample 1of 2
Input
3 3 6
-2 3 -3
-2 2 -1
-1
1
-2
2
-3
3
Output
NO
YES
NO
NO
YES
NO
Sample 2of 2
Input
5 5 6
1 -2 3 0 0
0 -2 5 0 -3
4
-3
5
2
-1
2
Output
YES
YES
YES
YES
NO
YES
2044F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)