結果
| 問題 |
No.345 最小チワワ問題
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-03-11 05:15:31 |
| 言語 | Perl (5.40.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 311 bytes |
| コンパイル時間 | 282 ms |
| コンパイル使用メモリ | 7,808 KB |
| 実行使用メモリ | 7,936 KB |
| 最終ジャッジ日時 | 2024-09-25 00:00:42 |
| 合計ジャッジ時間 | 2,055 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 WA * 7 |
コンパイルメッセージ
Main.pl syntax OK
ソースコード
use strict;
use warnings;
use utf8;
use Encode qw/encode decode decode_utf8 encode_utf8 from_to/;
my $instr = decode('utf8', <STDIN>);
my $len = -1;
my $min = 100;
while($instr =~ /([c][^c]*?[w][^w]*?[w])(.*)/ ) {
my $d_len = length("$1");
$len = $d_len if( $d_len < $min );
$instr = "$2";
}
print $len;