結果

問題 No.1805 Approaching Many Typhoon
ユーザー 👑 KazunKazun
提出日時 2022-01-12 21:58:32
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 461 bytes
コンパイル時間 214 ms
コンパイル使用メモリ 82,388 KB
実行使用メモリ 70,700 KB
最終ジャッジ日時 2024-04-27 12:58:30
合計ジャッジ時間 2,775 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
54,096 KB
testcase_01 AC 39 ms
53,660 KB
testcase_02 AC 39 ms
54,352 KB
testcase_03 AC 39 ms
54,348 KB
testcase_04 WA -
testcase_05 AC 40 ms
53,996 KB
testcase_06 AC 40 ms
55,416 KB
testcase_07 WA -
testcase_08 AC 40 ms
53,560 KB
testcase_09 AC 41 ms
53,312 KB
testcase_10 AC 39 ms
54,020 KB
testcase_11 AC 40 ms
54,784 KB
testcase_12 AC 41 ms
54,456 KB
testcase_13 WA -
testcase_14 AC 40 ms
54,392 KB
testcase_15 AC 41 ms
53,636 KB
testcase_16 AC 39 ms
54,100 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 42 ms
54,628 KB
testcase_20 AC 40 ms
53,520 KB
testcase_21 AC 38 ms
54,476 KB
testcase_22 AC 38 ms
54,644 KB
testcase_23 AC 39 ms
53,996 KB
testcase_24 AC 39 ms
54,340 KB
testcase_25 AC 39 ms
54,060 KB
testcase_26 AC 39 ms
54,708 KB
testcase_27 AC 38 ms
53,852 KB
testcase_28 AC 62 ms
69,900 KB
testcase_29 AC 63 ms
70,140 KB
testcase_30 AC 62 ms
70,700 KB
testcase_31 AC 62 ms
69,840 KB
testcase_32 AC 41 ms
55,264 KB
testcase_33 AC 41 ms
55,296 KB
testcase_34 AC 43 ms
56,156 KB
testcase_35 AC 46 ms
57,360 KB
testcase_36 AC 54 ms
63,324 KB
testcase_37 AC 40 ms
54,992 KB
testcase_38 AC 40 ms
54,060 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import deque

N,M=map(int,input().split())
S,G=map(int,input().split())

E=[[] for _ in range(N+1)]
for _ in range(M):
    F,T=map(int,input().split())
    E[F].append(T)

U=int(input())
I=list(map(int,input().split()))

P=[0]*(N+1)
for i in I:
    P[i]=1

Q=deque([S])
X=[0]*(N+1); X[S]=1

while Q:
    u=Q.popleft()
    for v in E[u]:
        if P[v]==0 and X[v]==0:
            X[v]=1
            Q.append(v)

print("Yes" if X[T] else "No")
0