結果
問題 | No.154 市バス |
ユーザー | nakamura sosuke |
提出日時 | 2019-07-19 16:17:38 |
言語 | Ruby (3.3.0) |
結果 |
MLE
|
実行時間 | - |
コード長 | 592 bytes |
コンパイル時間 | 514 ms |
コンパイル使用メモリ | 11,200 KB |
実行使用メモリ | 84,312 KB |
最終ジャッジ日時 | 2023-08-26 21:18:23 |
合計ジャッジ時間 | 7,349 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | MLE | - |
testcase_01 | -- | - |
testcase_02 | -- | - |
testcase_03 | -- | - |
testcase_04 | -- | - |
testcase_05 | -- | - |
testcase_06 | -- | - |
testcase_07 | -- | - |
testcase_08 | -- | - |
コンパイルメッセージ
Syntax OK
ソースコード
# W->G->R T = gets.to_i S = T.times.map{ gets.rstrip.chars } S.each do | s | # if s.count('G') != s.count('R') || s.count('G') > s.count('W') puts 'impossible' next end # to_skip = false que = [] s.each do | c | case c when 'W' # nop when 'G' if que.count('W') <= que.count('G') puts 'impossible' to_skip = true break end when 'R' if que.count('G') <= que.count('R') puts 'impossible' to_skip = true break end end que << c end puts 'possible' unless to_skip end