結果
| 問題 |
No.345 最小チワワ問題
|
| コンテスト | |
| ユーザー |
teio
|
| 提出日時 | 2020-07-25 08:20:16 |
| 言語 | Perl (5.40.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 208 bytes |
| コンパイル時間 | 52 ms |
| コンパイル使用メモリ | 6,944 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-26 20:30:06 |
| 合計ジャッジ時間 | 1,081 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 WA * 4 |
コンパイルメッセージ
Main.pl syntax OK
ソースコード
# use strict;
# use warnings;
chomp(my $S = <>);
my @r;
while ($S =~ /c[^c]*?w[^w]*?w/g) {
push(@r, length(substr($S, $-[0], $+[0] - $-[0])));
}
print(scalar(@r) ? (sort({$a <=> $b} @r))[0] : -1, "\n");
teio