結果

問題 No.583 鉄道同好会
ユーザー 0w10w1
提出日時 2017-11-01 23:12:37
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 215 bytes
コンパイル時間 222 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 24,704 KB
最終ジャッジ日時 2024-05-02 04:19:02
合計ジャッジ時間 9,394 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 93 ms
12,288 KB
testcase_01 AC 92 ms
12,160 KB
testcase_02 AC 93 ms
12,032 KB
testcase_03 AC 91 ms
12,160 KB
testcase_04 WA -
testcase_05 AC 91 ms
12,032 KB
testcase_06 AC 90 ms
12,288 KB
testcase_07 AC 93 ms
12,160 KB
testcase_08 AC 92 ms
12,160 KB
testcase_09 AC 91 ms
12,032 KB
testcase_10 AC 94 ms
12,032 KB
testcase_11 AC 400 ms
16,128 KB
testcase_12 AC 558 ms
16,640 KB
testcase_13 AC 530 ms
16,640 KB
testcase_14 AC 534 ms
16,512 KB
testcase_15 AC 674 ms
18,432 KB
testcase_16 AC 1,247 ms
24,576 KB
testcase_17 AC 1,560 ms
24,704 KB
testcase_18 AC 1,537 ms
24,704 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N, M = gets.split.map &:to_i
S = $<.map { |s| eval "[%d, %d].sort" % s.split }
deg = [0] * N
S.each { |t| deg[t[0]] += 1; deg[t[1]] += 1 }
odd = (0...N).select { |i| deg[i] % 2 == 1 }
puts odd.size > 2 ? :NO : :YES
0