結果

問題 No.583 鉄道同好会
ユーザー fiordfiord
提出日時 2017-10-27 23:26:48
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 201 bytes
コンパイル時間 388 ms
コンパイル使用メモリ 7,680 KB
実行使用メモリ 12,544 KB
最終ジャッジ日時 2024-05-01 17:45:39
合計ジャッジ時間 3,071 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
12,288 KB
testcase_01 AC 84 ms
12,160 KB
testcase_02 AC 76 ms
12,160 KB
testcase_03 AC 74 ms
12,160 KB
testcase_04 WA -
testcase_05 AC 77 ms
12,160 KB
testcase_06 AC 80 ms
12,288 KB
testcase_07 AC 82 ms
12,288 KB
testcase_08 AC 82 ms
12,288 KB
testcase_09 AC 75 ms
12,160 KB
testcase_10 AC 78 ms
12,160 KB
testcase_11 AC 117 ms
12,544 KB
testcase_12 AC 140 ms
12,416 KB
testcase_13 AC 137 ms
12,288 KB
testcase_14 AC 131 ms
12,288 KB
testcase_15 AC 147 ms
12,288 KB
testcase_16 AC 214 ms
12,288 KB
testcase_17 AC 240 ms
12,416 KB
testcase_18 AC 239 ms
12,416 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n,m=gets.split(" ").map(&:to_i)
cnt=Array.new(n,0)
m.times{
    a,b=gets.split(" ").map(&:to_i)
    cnt[a]^=1
    cnt[b]^=1
}

if [0,2].include?(cnt.count(1)) then
    puts "YES"
else
    puts "NO"
end
0