結果

問題 No.1610 She Loves Me, She Loves Me Not, ...
ユーザー titiatitia
提出日時 2021-07-21 21:31:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 124 ms / 2,000 ms
コード長 477 bytes
コンパイル時間 263 ms
コンパイル使用メモリ 87,060 KB
実行使用メモリ 78,184 KB
最終ジャッジ日時 2023-09-24 15:28:23
合計ジャッジ時間 4,891 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,324 KB
testcase_01 AC 79 ms
75,608 KB
testcase_02 AC 73 ms
71,068 KB
testcase_03 AC 74 ms
71,368 KB
testcase_04 AC 76 ms
71,200 KB
testcase_05 AC 124 ms
77,844 KB
testcase_06 AC 117 ms
78,064 KB
testcase_07 AC 117 ms
78,148 KB
testcase_08 AC 118 ms
78,028 KB
testcase_09 AC 117 ms
78,184 KB
testcase_10 AC 116 ms
77,888 KB
testcase_11 AC 116 ms
77,840 KB
testcase_12 AC 115 ms
77,692 KB
testcase_13 AC 117 ms
78,036 KB
testcase_14 AC 80 ms
71,268 KB
testcase_15 AC 81 ms
71,044 KB
testcase_16 AC 82 ms
71,364 KB
testcase_17 AC 81 ms
71,264 KB
testcase_18 AC 80 ms
71,100 KB
testcase_19 AC 79 ms
71,456 KB
testcase_20 AC 80 ms
71,308 KB
testcase_21 AC 81 ms
71,412 KB
testcase_22 AC 80 ms
71,348 KB
testcase_23 AC 74 ms
71,264 KB
testcase_24 AC 75 ms
71,312 KB
testcase_25 AC 75 ms
71,204 KB
testcase_26 AC 75 ms
71,288 KB
testcase_27 AC 74 ms
71,336 KB
testcase_28 AC 76 ms
71,408 KB
testcase_29 AC 75 ms
71,192 KB
testcase_30 AC 75 ms
71,388 KB
testcase_31 AC 75 ms
71,268 KB
testcase_32 AC 75 ms
71,392 KB
testcase_33 AC 76 ms
71,340 KB
testcase_34 AC 75 ms
71,376 KB
testcase_35 AC 75 ms
71,496 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

DEG=[0]*N
E=[[] for i in range(N)]

for i in range(M):
    a,b=map(int,input().split())
    a-=1
    b-=1
    E[a].append(b)
    E[b].append(a)
    DEG[a]+=1
    DEG[b]+=1

ANS=0

while True:
    flag=0
    for i in range(N):
        if DEG[i]==1:
            flag=1
            ANS+=1
            DEG[i]-=1
            for to in E[i]:
                DEG[to]-=1

    if flag==0:
        break

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