結果

問題 No.204 ゴールデン・ウィーク(2)
ユーザー cielciel
提出日時 2015-05-08 22:34:18
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 327 bytes
コンパイル時間 117 ms
コンパイル使用メモリ 7,296 KB
実行使用メモリ 12,288 KB
最終ジャッジ日時 2024-04-21 12:56:59
合計ジャッジ時間 6,316 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 98 ms
12,160 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 96 ms
12,160 KB
testcase_05 AC 95 ms
12,032 KB
testcase_06 AC 97 ms
12,160 KB
testcase_07 AC 95 ms
12,032 KB
testcase_08 AC 95 ms
12,288 KB
testcase_09 AC 96 ms
12,288 KB
testcase_10 AC 96 ms
12,288 KB
testcase_11 AC 92 ms
12,288 KB
testcase_12 WA -
testcase_13 AC 94 ms
12,288 KB
testcase_14 AC 93 ms
12,032 KB
testcase_15 WA -
testcase_16 AC 92 ms
12,288 KB
testcase_17 AC 92 ms
12,160 KB
testcase_18 AC 94 ms
12,160 KB
testcase_19 AC 94 ms
12,160 KB
testcase_20 AC 96 ms
12,160 KB
testcase_21 AC 95 ms
12,288 KB
testcase_22 AC 93 ms
12,160 KB
testcase_23 AC 94 ms
12,160 KB
testcase_24 AC 94 ms
12,160 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 96 ms
12,288 KB
testcase_32 WA -
testcase_33 WA -
testcase_34 AC 95 ms
12,288 KB
testcase_35 AC 95 ms
12,288 KB
testcase_36 AC 94 ms
12,288 KB
testcase_37 WA -
testcase_38 WA -
testcase_39 AC 94 ms
12,160 KB
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
testcase_44 AC 97 ms
12,032 KB
testcase_45 AC 96 ms
12,160 KB
testcase_46 WA -
testcase_47 AC 97 ms
12,160 KB
testcase_48 AC 96 ms
12,288 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

ソースコード

diff #

#!/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
0