結果
問題 | No.110 しましまピラミッド |
ユーザー |
![]() |
提出日時 | 2014-12-24 00:00:54 |
言語 | Ruby (3.4.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 339 bytes |
コンパイル時間 | 140 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 12,416 KB |
最終ジャッジ日時 | 2024-06-12 04:33:30 |
合計ジャッジ時間 | 3,473 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 WA * 1 |
other | AC * 14 WA * 12 |
コンパイルメッセージ
Syntax OK
ソースコード
gets.to_iw_list = gets.to_s.split(" ").map(&:to_i).uniq.map{|n| ["W", n] }gets.to_ib_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 = 1result_list.each_cons(2){|n1, n2| count += 1 if !n1[0].eql? n2[0]} if result_list.length != 1p count