結果
| 問題 | No.3291 K-step Navigation |
| コンテスト | |
| ユーザー |
ゼット
|
| 提出日時 | 2025-10-03 22:47:22 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 281 bytes |
| 記録 | |
| コンパイル時間 | 232 ms |
| コンパイル使用メモリ | 96,236 KB |
| 実行使用メモリ | 95,232 KB |
| 最終ジャッジ日時 | 2026-07-15 10:16:34 |
| 合計ジャッジ時間 | 10,001 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 2 |
| other | WA * 19 RE * 32 |
ソースコード
N,M,K,X,Y=map(int,input().split())
G=[[] for i in range(N)]
for i in range(M):
a,b=map(int,input().split())
G[a-1].append(b-1)
G[b-1].append(a)
if len(G[X-1])+len(G[Y-1])>0:
p=[1]
print(p[1])
print('Yes')
else:
if K%2==0:
print('Yes')
else:
print('No')
ゼット