結果
問題 | No.154 市バス |
ユーザー | fine |
提出日時 | 2016-01-15 01:47:41 |
言語 | Ruby (3.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 447 bytes |
コンパイル時間 | 138 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 15,232 KB |
最終ジャッジ日時 | 2024-04-21 09:07:05 |
合計ジャッジ時間 | 5,987 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 593 ms
15,104 KB |
testcase_01 | AC | 599 ms
15,232 KB |
testcase_02 | AC | 595 ms
14,976 KB |
testcase_03 | WA | - |
testcase_04 | AC | 579 ms
15,232 KB |
testcase_05 | AC | 83 ms
12,288 KB |
testcase_06 | AC | 84 ms
12,032 KB |
testcase_07 | AC | 1,305 ms
14,720 KB |
testcase_08 | AC | 84 ms
12,160 KB |
コンパイルメッセージ
Syntax OK
ソースコード
gets.to_i.times{ s = gets.chomp s.reverse =~ /R(.*?)G/ if s[-1] != 'R' || $1.to_s.include?('W') puts "impossible" else loop{ s.gsub!(/WG(.*?)R/){$1} if $&.nil? break end } if s.include?('R') puts "impossible" else puts "possible" end end }