結果

問題 No.110 しましまピラミッド
ユーザー syokeininsyokeinin
提出日時 2014-12-24 00:00:54
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 339 bytes
コンパイル時間 62 ms
コンパイル使用メモリ 11,376 KB
実行使用メモリ 15,356 KB
最終ジャッジ日時 2023-09-02 22:21:22
合計ジャッジ時間 4,614 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
14,968 KB
testcase_01 WA -
testcase_02 AC 79 ms
14,984 KB
testcase_03 WA -
testcase_04 AC 80 ms
15,144 KB
testcase_05 AC 84 ms
15,088 KB
testcase_06 AC 84 ms
14,972 KB
testcase_07 AC 83 ms
15,152 KB
testcase_08 AC 84 ms
14,976 KB
testcase_09 AC 82 ms
15,052 KB
testcase_10 AC 82 ms
15,152 KB
testcase_11 WA -
testcase_12 AC 84 ms
15,032 KB
testcase_13 AC 83 ms
15,144 KB
testcase_14 WA -
testcase_15 AC 80 ms
15,144 KB
testcase_16 AC 78 ms
15,180 KB
testcase_17 WA -
testcase_18 AC 78 ms
15,160 KB
testcase_19 WA -
testcase_20 AC 79 ms
14,976 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 83 ms
15,220 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 79 ms
15,084 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

gets.to_i
w_list = gets.to_s.split(" ").map(&:to_i).uniq.map{|n| ["W", n] }
gets.to_i
b_list = gets.to_s.split(" ").map(&:to_i).uniq.map{|n| ["B", n] }
result_list = (w_list + b_list).sort{|a, b| b[1] <=> a[1]}.uniq{|n| n[1]}
count = 1
result_list.each_cons(2){|n1, n2| count += 1 if !n1[0].eql? n2[0]} if result_list.length != 1 
p count
0