結果

問題 No.583 鉄道同好会
ユーザー letrangerjpletrangerjp
提出日時 2017-10-27 23:38:37
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 120 bytes
コンパイル時間 79 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 25,600 KB
最終ジャッジ日時 2024-05-01 17:56:20
合計ジャッジ時間 2,810 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
12,288 KB
testcase_01 AC 75 ms
12,288 KB
testcase_02 AC 77 ms
12,288 KB
testcase_03 AC 77 ms
12,288 KB
testcase_04 WA -
testcase_05 AC 74 ms
12,160 KB
testcase_06 AC 83 ms
12,288 KB
testcase_07 AC 77 ms
12,160 KB
testcase_08 AC 76 ms
12,160 KB
testcase_09 AC 77 ms
12,160 KB
testcase_10 AC 75 ms
12,160 KB
testcase_11 AC 106 ms
16,000 KB
testcase_12 AC 116 ms
17,024 KB
testcase_13 AC 115 ms
16,768 KB
testcase_14 AC 115 ms
17,024 KB
testcase_15 AC 131 ms
18,176 KB
testcase_16 AC 164 ms
25,344 KB
testcase_17 AC 179 ms
25,600 KB
testcase_18 AC 181 ms
25,600 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N, M = gets.split.map &:to_i
h = Hash.new 0
gets(p).split.each{|s|
  h[s.to_i] ^= 1
}
puts h.values.sum > 2 ? :NO : :YES
0