結果
問題 | No.2564 衝突予測 |
ユーザー | chaemon |
提出日時 | 2023-12-02 15:48:08 |
言語 | Nim (2.0.2) |
結果 |
AC
|
実行時間 | 274 ms / 2,000 ms |
コード長 | 16,184 bytes |
コンパイル時間 | 4,359 ms |
コンパイル使用メモリ | 94,336 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-26 19:19:08 |
合計ジャッジ時間 | 7,942 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
5,248 KB |
testcase_01 | AC | 2 ms
5,376 KB |
testcase_02 | AC | 1 ms
5,376 KB |
testcase_03 | AC | 271 ms
5,376 KB |
testcase_04 | AC | 268 ms
5,376 KB |
testcase_05 | AC | 266 ms
5,376 KB |
testcase_06 | AC | 274 ms
5,376 KB |
testcase_07 | AC | 267 ms
5,376 KB |
testcase_08 | AC | 266 ms
5,376 KB |
testcase_09 | AC | 273 ms
5,376 KB |
testcase_10 | AC | 273 ms
5,376 KB |
testcase_11 | AC | 265 ms
5,376 KB |
ソースコード
import macros macro Please(x): untyped = nnkStmtList.newTree() Please use Nim-ACL Please use Nim-ACL Please use Nim-ACL static: when not defined SecondCompile: # md5sum: fc048d3bcc2d718febcd9f8cb55d7647 atcoder.tar.xz template getFileName():string = instantiationInfo().filename let fn = getFileName() block: let (output, ex) = gorgeEx("if [ -e ./atcoder ]; then exit 1; else exit 0; fi") # doAssert ex == 0, "atcoder directory already exisits" discard staticExec("echo \"/Td6WFoAAATm1rRGAgAhARwAAAAQz1jM4O//J3ddADCdCIqmAHyeLmzPetXzWpgQcDgKgJF+nO8CaeoEXtWXgE/z38JpPrJsPBw6VchIG9fzduLW3mn+BZliV/GongthYmdLof/KwiHxaRJ6rxlYYpErhspEprzR3xpKZOtCF2AinHgFt/N6eiSh8qmoTQSGqwZzeagI28M/6hVhMCV6Vg2svTcqm8k7WYLbrm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I6IgL/nyU9FolVVezzSQXjKNZgqrMxjV8z4hX3QY41tWoThJoi/qsaEpG3b6T/5nwumKotu6ArZA5XsKlQzcbepM0ysl93cy1iiJ07zLtUjFu2xnUGn46D2oCH6YyZgMUCCQjLIXqyX4IkEjoNof+FVlwzBz6qRtyT0PsDlGL/OuTrDIRWfaez251cUhZqqlv3eGgUS+UPHqIH3PMXdXnyxFTgFJDBWuN3UOnBY+2CMRVbTArzJf6YAsP/mY5DzpNv9aSp+UY0NgINlQs6HPTNJWMN1I6TejvoOBxkQJm0lDFCm9bmeXZuzeXd6GbyKhKu3HeWsRsWQAAAAgKRBrxK9pegABk0+A4AMA8EqS7bHEZ/sCAAAAAARZWg==\" | base64 -d > atcoder.tar.xz && tar -Jxvf atcoder.tar.xz") let (output, ex) = gorgeEx("nim cpp -d:release -d:SecondCompile -d:danger --path:./ --opt:speed --multimethods:on --warning[SmallLshouldNotBeUsed]:off --checks:off -o:a.out " & fn) discard staticExec("rm -rf ./atcoder");doAssert ex == 0, output;quit(0) when defined SecondCompile: const DO_CHECK = false;const DEBUG = false else: const DO_CHECK = true;const DEBUG = true const USE_DEFAULT_TABLE = true DO_TEST = false # see https://github.com/zer0-star/Nim-ACL/tree/master/src/atcoder/extra/header/chaemon_header.nim include atcoder/extra/header/chaemon_header proc solve() = let T = nextInt() proc solve1() = var x1, y1 = nextInt() d1 = nextString()[0] x2, y2 = nextInt() d2 = nextString()[0] tx, ty: int proc swap_all() = swap x1, x2 swap y1, y2 swap d1, d2 # x1, x2の位置が同じになる # RとUだけにする if d1 in ['L', 'R'] and d2 in ['L', 'R']: if y1 != y2 or d1 == d2: echo "No";return else: # d1 == 'R', d2 == 'L'にする if d1 == 'L': swap_all() doAssert d1 == 'R' and d2 == 'L' if x1 < x2: echo "Yes";return else: echo "No";return if d1 in ['U', 'D'] and d2 in ['U', 'D']: if x1 != x2 or d1 == d2: echo "No";return else: # d1 == 'U', d2 == 'D'にする if d1 == 'D': swap_all() doAssert d1 == 'U' and d2 == 'D' if y1 < y2: echo "Yes";return else: echo "No";return if d1 in ['U', 'D']: swap_all() doAssert d1 in ['L', 'R'] and d2 in ['U', 'D'] if d1 == 'L': x1 *= -1;x2 *= -1 d1 = 'R' if d2 == 'D': y1 *= -1;y2 *= -1 d2 = 'U' doAssert d1 == 'R' and d2 == 'U' # (x1, y1): R # (x2, y2): U # (x2, y1)で会えるか? if x1 > x2 or y2 > y1: echo "No";return elif x2 - x1 != y1 - y2: echo "No";return else: echo "Yes";return for _ in T: solve1() discard solve()