結果

問題 No.342 一番ワロタww
ユーザー LayCurse
提出日時 2016-02-12 23:14:53
言語 PHP
(843.2)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 584 bytes
コンパイル時間 5,272 ms
コンパイル使用メモリ 30,984 KB
実行使用メモリ 38,836 KB
最終ジャッジ日時 2024-10-15 13:13:10
合計ジャッジ時間 17,681 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample -- * 3
other TLE * 1 -- * 13
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php

mb_language("japanese");
mb_internal_encoding("UTF-8");

$str = file_get_contents("php://stdin");
$doit = "";
$w = "w";

while(mb_substr($str,0,1)===$w){
  $str = mb_substr($str,1);
  continue;
}

for(;;){
  $chk = mb_strpos($str, $doit.$w);
  if($chk===false) break;
  $doit .= $w;
}

for(;mb_strlen($str);){
  if(mb_substr($str,0,1)===$w){
    $str = mb_substr($str,1);
    continue;
  }
  $pos1 = mb_strpos($str, $w);
  $pos2 = mb_strpos($str, $doit);
  if($pos2===false) break;
  if($pos1===$pos2) echo mb_substr($str,0,$pos1)."\n";
  $str = mb_substr($str,$pos1);
}

?>
0