結果

問題 No.1805 Approaching Many Typhoon
ユーザー irumo8202irumo8202
提出日時 2022-01-27 11:13:17
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 562 bytes
コンパイル時間 264 ms
コンパイル使用メモリ 87,104 KB
実行使用メモリ 77,028 KB
最終ジャッジ日時 2023-08-26 05:24:28
合計ジャッジ時間 5,510 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 64 ms
71,280 KB
testcase_01 AC 65 ms
71,464 KB
testcase_02 AC 66 ms
71,496 KB
testcase_03 AC 64 ms
71,244 KB
testcase_04 WA -
testcase_05 AC 63 ms
71,328 KB
testcase_06 AC 63 ms
71,276 KB
testcase_07 AC 68 ms
71,096 KB
testcase_08 AC 64 ms
71,108 KB
testcase_09 WA -
testcase_10 AC 64 ms
71,480 KB
testcase_11 AC 64 ms
71,252 KB
testcase_12 WA -
testcase_13 AC 65 ms
71,260 KB
testcase_14 AC 66 ms
71,208 KB
testcase_15 WA -
testcase_16 AC 65 ms
71,372 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 69 ms
71,500 KB
testcase_21 AC 67 ms
71,192 KB
testcase_22 AC 68 ms
71,108 KB
testcase_23 AC 66 ms
71,496 KB
testcase_24 AC 64 ms
71,096 KB
testcase_25 AC 65 ms
71,252 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 89 ms
76,644 KB
testcase_29 AC 90 ms
77,028 KB
testcase_30 AC 88 ms
76,752 KB
testcase_31 AC 91 ms
76,720 KB
testcase_32 AC 66 ms
71,212 KB
testcase_33 AC 65 ms
71,488 KB
testcase_34 AC 71 ms
71,556 KB
testcase_35 AC 73 ms
71,236 KB
testcase_36 AC 78 ms
75,900 KB
testcase_37 AC 66 ms
71,524 KB
testcase_38 AC 64 ms
71,556 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, input().split())
S, G = map(lambda x: int(x) - 1, input().split())

graph = [[] for _ in range(N)]

for _ in range(M):
    f, t = map(lambda x: int(x) - 1, input().split())
    graph[f].append(t)

input()
dont_use = set(map(lambda x: int(x) - 1, input().split()))

que = [S]
visited = [False] * N
visited[S] = True
while que:
    v = que.pop()
    for nx in graph[v]:
        if visited[nx]:
            continue
        if nx in dont_use:
            continue
        visited[nx] = True
        que.append(nx)
print("YNeos"[1 ^ visited[G] :: 2])
0