結果

問題 No.3291 K-step Navigation
ユーザー kidodesu
提出日時 2025-10-03 22:15:34
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 242 bytes
コンパイル時間 306 ms
コンパイル使用メモリ 82,232 KB
実行使用メモリ 73,024 KB
最終ジャッジ日時 2025-10-03 22:15:39
合計ジャッジ時間 4,339 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 41 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

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:
    print("No")
else:
    print("Yes")
0