D - Poor Sense of Direction

2 secs 1024 MB
loop0919's icon loop0919

2-testcase20.txt


入力

出力