結果
| 問題 | No.3291 K-step Navigation |
| コンテスト | |
| ユーザー |
kidodesu
|
| 提出日時 | 2025-10-03 22:17:18 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 255 bytes |
| 記録 | |
| コンパイル時間 | 231 ms |
| コンパイル使用メモリ | 95,600 KB |
| 実行使用メモリ | 95,104 KB |
| 最終ジャッジ日時 | 2026-07-15 09:51:21 |
| 合計ジャッジ時間 | 7,831 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 27 WA * 9 RE * 15 |
ソースコード
n, m, k, s, t = map(int, input().split())
V = [0] * n
for _ in range(m):
u, v = [int(x)-1 for x in input().split()]
V[u] += 1
V[v] += 1
if k % 2:
print("Yes")
elif V[s-1] == V[t-1] == 0:
assert 0
print("No")
else:
print("Yes")
kidodesu