結果
問題 | No.204 ゴールデン・ウィーク(2) |
ユーザー | ciel |
提出日時 | 2015-05-08 22:34:18 |
言語 | Ruby (3.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 327 bytes |
コンパイル時間 | 186 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-10-13 11:30:03 |
合計ジャッジ時間 | 5,897 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 90 ms
12,032 KB |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | AC | 94 ms
12,288 KB |
testcase_05 | AC | 88 ms
12,288 KB |
testcase_06 | AC | 91 ms
12,160 KB |
testcase_07 | AC | 90 ms
12,032 KB |
testcase_08 | AC | 90 ms
12,032 KB |
testcase_09 | AC | 90 ms
12,160 KB |
testcase_10 | AC | 88 ms
12,032 KB |
testcase_11 | AC | 89 ms
12,032 KB |
testcase_12 | WA | - |
testcase_13 | AC | 90 ms
12,160 KB |
testcase_14 | AC | 88 ms
12,288 KB |
testcase_15 | WA | - |
testcase_16 | AC | 89 ms
12,032 KB |
testcase_17 | AC | 89 ms
12,032 KB |
testcase_18 | AC | 90 ms
12,032 KB |
testcase_19 | AC | 89 ms
12,288 KB |
testcase_20 | AC | 90 ms
12,160 KB |
testcase_21 | AC | 90 ms
12,032 KB |
testcase_22 | AC | 89 ms
12,032 KB |
testcase_23 | AC | 90 ms
12,032 KB |
testcase_24 | AC | 90 ms
12,032 KB |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | WA | - |
testcase_28 | WA | - |
testcase_29 | WA | - |
testcase_30 | WA | - |
testcase_31 | AC | 88 ms
12,032 KB |
testcase_32 | WA | - |
testcase_33 | WA | - |
testcase_34 | AC | 89 ms
12,160 KB |
testcase_35 | AC | 89 ms
12,032 KB |
testcase_36 | AC | 93 ms
12,032 KB |
testcase_37 | WA | - |
testcase_38 | WA | - |
testcase_39 | AC | 91 ms
12,288 KB |
testcase_40 | WA | - |
testcase_41 | WA | - |
testcase_42 | WA | - |
testcase_43 | WA | - |
testcase_44 | AC | 90 ms
12,288 KB |
testcase_45 | AC | 88 ms
12,032 KB |
testcase_46 | WA | - |
testcase_47 | AC | 88 ms
12,160 KB |
testcase_48 | AC | 90 ms
12,032 KB |
コンパイルメッセージ
Main.rb:9: warning: `:' after local variable or literal is interpreted as binary operator Main.rb:9: warning: even though it seems like symbol literal Main.rb:9: warning: `:' after local variable or literal is interpreted as binary operator Main.rb:9: warning: even though it seems like symbol literal Main.rb:11: warning: `:' after local variable or literal is interpreted as binary operator Main.rb:11: warning: even though it seems like symbol literal Main.rb:11: warning: `:' after local variable or literal is interpreted as binary operator Main.rb:11: warning: even though it seems like symbol literal Syntax OK
ソースコード
#!/usr/bin/ruby n=gets.to_i a=$<.map(&:strip).join.chars.chunk{|e|e}.to_a r=0 a.size.times{|i| if a[i][0]=='o' r=[r,a[i][1].size].max elsif a[i][1].size<n r=[r,(i==0 ? 0 :a[i-1][1].size)+n,(i==a.size-1 ? 0 :a[i+1][1].size)+n].max else r=[r,(i==0 ? 0 :a[i-1][1].size)+(i==a.size-1 ? 0 :a[i+1][1].size)+n].max end } p r