結果

問題 No.154 市バス
ユーザー simansiman
提出日時 2015-11-06 15:10:21
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 177 bytes
コンパイル時間 368 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 23,552 KB
最終ジャッジ日時 2024-04-21 08:56:47
合計ジャッジ時間 6,817 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 -- -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

gets
$<.map{|s|
W=R=G=0;
s.chop.reverse.chars{|c|
c==?W&&W+=1
c==?R&&R+=1
c==?G&&G+=1
(R<G||G<1&&G<W||R<1&&R<W)&&break
G<W&&W=G
}
puts (R>0&&R==G&&G<=W)?:possible:'impossible'
}
0