結果

問題 No.1610 She Loves Me, She Loves Me Not, ...
ユーザー 👑 SPD_9X2SPD_9X2
提出日時 2021-07-21 21:26:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 121 ms / 2,000 ms
コード長 659 bytes
コンパイル時間 321 ms
コンパイル使用メモリ 86,972 KB
実行使用メモリ 78,088 KB
最終ジャッジ日時 2023-09-24 15:13:30
合計ジャッジ時間 5,249 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 90 ms
71,568 KB
testcase_01 AC 94 ms
76,724 KB
testcase_02 AC 89 ms
71,536 KB
testcase_03 AC 92 ms
71,600 KB
testcase_04 AC 93 ms
71,556 KB
testcase_05 AC 121 ms
77,704 KB
testcase_06 AC 116 ms
78,088 KB
testcase_07 AC 120 ms
77,984 KB
testcase_08 AC 117 ms
77,996 KB
testcase_09 AC 114 ms
77,696 KB
testcase_10 AC 117 ms
77,976 KB
testcase_11 AC 118 ms
78,000 KB
testcase_12 AC 117 ms
77,924 KB
testcase_13 AC 115 ms
78,072 KB
testcase_14 AC 91 ms
71,296 KB
testcase_15 AC 91 ms
71,468 KB
testcase_16 AC 91 ms
71,744 KB
testcase_17 AC 90 ms
71,444 KB
testcase_18 AC 91 ms
71,540 KB
testcase_19 AC 94 ms
71,488 KB
testcase_20 AC 93 ms
71,724 KB
testcase_21 AC 94 ms
71,576 KB
testcase_22 AC 94 ms
71,740 KB
testcase_23 AC 91 ms
71,612 KB
testcase_24 AC 89 ms
71,664 KB
testcase_25 AC 89 ms
71,592 KB
testcase_26 AC 90 ms
71,604 KB
testcase_27 AC 92 ms
71,600 KB
testcase_28 AC 90 ms
71,464 KB
testcase_29 AC 91 ms
71,236 KB
testcase_30 AC 92 ms
71,572 KB
testcase_31 AC 91 ms
71,604 KB
testcase_32 AC 91 ms
71,536 KB
testcase_33 AC 89 ms
71,560 KB
testcase_34 AC 92 ms
71,560 KB
testcase_35 AC 92 ms
71,412 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

"""

"""

from sys import stdin
import sys
from collections import deque

N,M = map(int,stdin.readline().split())

lis = [ [] for i in range(N) ]
en = [0] * N

for i in range(M):

    A,B = map(int,stdin.readline().split())
    A -= 1
    B -= 1

    lis[A].append(B)
    lis[B].append(A)

    en[A] += 1
    en[B] += 1

q = deque()

for i in range(N):
    if en[i] == 1:
        q.append(i)

dnum = 0
while q:

    v = q.popleft()
    if en[v] == 1:
        dnum += 1
        en[v] = 0

    for nex in lis[v]:

        en[nex] -= 1

        if en[nex] == 1:
            q.append(nex)

#print (en)

if dnum % 2 == 1:
    print ("Yes")
else:
    print ("No")
0