cf/mirror

Robot Queries

CF
1902D1900· candidate master2s256 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
8 3
RDLLUURU
-1 2 1 7
0 0 3 4
0 1 7 8
Output
YES
YES
NO
Sample 2of 3
Input
4 2
RLDU
0 0 2 2
-1 -1 2 3
Output
YES
NO
Sample 3of 3
Input
10 6
DLUDLRULLD
-1 0 1 10
-1 -2 2 5
-4 -2 6 10
-1 0 3 9
0 1 4 7
-3 -1 5 8
Output
YES
YES
YES
NO
YES
YES
1902D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)