結果
| 問題 |
No.3291 K-step Navigation
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-09-13 20:58:39 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 379 bytes |
| コンパイル時間 | 236 ms |
| コンパイル使用メモリ | 12,160 KB |
| 実行使用メモリ | 10,496 KB |
| 最終ジャッジ日時 | 2025-09-13 20:58:43 |
| 合計ジャッジ時間 | 3,806 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 42 WA * 8 |
ソースコード
import sys
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 7)
n, m, k, s, t = map(int, readline().split())
deg = [0] * (n + 1)
for _ in range(m):
u, v = map(int, readline().split())
if (u, v) == (s, t) or (u, v) == (t, s):
continue
deg[u] += 1
deg[v] += 1
if k % 2 == 0 and deg[s] == deg[t] == 0:
print('No')
else:
print('Yes')