結果

問題 No.345 最小チワワ問題
ユーザー teioteio
提出日時 2020-07-25 08:15:15
言語 Perl
(5.38.2)
結果
WA  
実行時間 -
コード長 202 bytes
コンパイル時間 273 ms
コンパイル使用メモリ 5,216 KB
実行使用メモリ 4,760 KB
最終ジャッジ日時 2023-09-09 03:12:55
合計ジャッジ時間 1,993 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,536 KB
testcase_01 AC 2 ms
4,596 KB
testcase_02 AC 2 ms
4,712 KB
testcase_03 AC 3 ms
4,760 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 2 ms
4,556 KB
testcase_08 AC 2 ms
4,688 KB
testcase_09 AC 2 ms
4,616 KB
testcase_10 AC 3 ms
4,556 KB
testcase_11 AC 2 ms
4,540 KB
testcase_12 AC 2 ms
4,596 KB
testcase_13 AC 3 ms
4,644 KB
testcase_14 WA -
testcase_15 AC 3 ms
4,616 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 3 ms
4,692 KB
testcase_20 AC 2 ms
4,480 KB
testcase_21 AC 2 ms
4,544 KB
testcase_22 AC 2 ms
4,708 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 3 ms
4,640 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 2 ms
4,576 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

# use strict;
# use warnings;

chomp(my $S = <>);
my @r;
while ($S =~ /c.*?w.*?w/g) {
    push(@r, length(substr($S, $-[0], $+[0] - $-[0])));
}
print(scalar(@r) ? (sort({$a <=> $b} @r))[0] : -1, "\n");
0