結果

問題 No.1610 She Loves Me, She Loves Me Not, ...
ユーザー tassei903tassei903
提出日時 2021-07-21 22:29:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 117 ms / 2,000 ms
コード長 757 bytes
コンパイル時間 946 ms
コンパイル使用メモリ 86,880 KB
実行使用メモリ 77,964 KB
最終ジャッジ日時 2023-09-24 18:39:08
合計ジャッジ時間 4,633 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,096 KB
testcase_01 AC 70 ms
75,552 KB
testcase_02 AC 69 ms
71,160 KB
testcase_03 AC 69 ms
71,072 KB
testcase_04 AC 74 ms
71,136 KB
testcase_05 AC 117 ms
77,964 KB
testcase_06 AC 100 ms
77,920 KB
testcase_07 AC 98 ms
77,764 KB
testcase_08 AC 98 ms
77,760 KB
testcase_09 AC 102 ms
77,880 KB
testcase_10 AC 101 ms
77,724 KB
testcase_11 AC 103 ms
77,828 KB
testcase_12 AC 98 ms
77,788 KB
testcase_13 AC 100 ms
77,840 KB
testcase_14 AC 75 ms
71,156 KB
testcase_15 AC 73 ms
71,328 KB
testcase_16 AC 74 ms
71,412 KB
testcase_17 AC 75 ms
71,324 KB
testcase_18 AC 74 ms
71,324 KB
testcase_19 AC 72 ms
71,396 KB
testcase_20 AC 70 ms
71,084 KB
testcase_21 AC 74 ms
70,936 KB
testcase_22 AC 73 ms
71,088 KB
testcase_23 AC 69 ms
71,072 KB
testcase_24 AC 71 ms
71,188 KB
testcase_25 AC 70 ms
71,176 KB
testcase_26 AC 69 ms
71,180 KB
testcase_27 AC 71 ms
71,288 KB
testcase_28 AC 68 ms
71,080 KB
testcase_29 AC 70 ms
71,376 KB
testcase_30 AC 70 ms
71,080 KB
testcase_31 AC 69 ms
71,100 KB
testcase_32 AC 67 ms
71,216 KB
testcase_33 AC 67 ms
71,428 KB
testcase_34 AC 68 ms
71,076 KB
testcase_35 AC 68 ms
71,352 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda :sys.stdin.readline()[:-1]
ni = lambda :int(input())
na = lambda :list(map(int,input().split()))
sys.setrecursionlimit(10**7)
yes = lambda :print("yes");Yes = lambda :print("Yes")
no = lambda :print("no");No = lambda :print("No")
#######################################################################

n,m = na()
g = [[]for i in range(n)]
ins = [0]*n
for i in range(m):
    a,b = na()
    a-=1;b-=1
    ins[a]+=1
    ins[b]+=1
    g[a].append(b)
    g[b].append(a)
q = []
for i in range(n):
    if ins[i]==1:
        q.append(i)

ans = 0

while q:
    e = q.pop()
    if ins[e]==0:
        continue
    ans += 1
    for i in g[e]:
        ins[i]-=1
        if ins[i]==1:
            q.append(i)
if ans%2:
    Yes()
else:
    No()
0