結果

問題 No.22 括弧の対応
ユーザー letrangerjpletrangerjp
提出日時 2017-06-03 11:48:37
言語 Ruby
(3.3.0)
結果
RE  
実行時間 -
コード長 128 bytes
コンパイル時間 59 ms
コンパイル使用メモリ 11,920 KB
実行使用メモリ 16,640 KB
最終ジャッジ日時 2023-10-22 02:52:24
合計ジャッジ時間 3,398 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 AC 86 ms
16,112 KB
testcase_02 AC 88 ms
16,116 KB
testcase_03 AC 95 ms
16,372 KB
testcase_04 AC 89 ms
16,112 KB
testcase_05 AC 87 ms
16,112 KB
testcase_06 AC 95 ms
16,372 KB
testcase_07 WA -
testcase_08 AC 86 ms
16,112 KB
testcase_09 WA -
testcase_10 AC 86 ms
16,112 KB
testcase_11 AC 87 ms
16,112 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 94 ms
16,148 KB
testcase_16 AC 98 ms
16,372 KB
testcase_17 AC 86 ms
16,112 KB
testcase_18 AC 86 ms
16,112 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

_,a,b=`dd`.split
f=->x,y{b[/.{#{N}}(?<p>#{x}\g<p>*#{y})/].size}
p b[N=a.to_i-1]<?)?f['\(','\)']:(b.reverse!;b.size-f['\)','\('])
0