結果
| 問題 | 
                            No.345 最小チワワ問題
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2020-04-27 04:34:51 | 
| 言語 | D  (dmd 2.109.1)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 597 bytes | 
| コンパイル時間 | 9,460 ms | 
| コンパイル使用メモリ | 311,612 KB | 
| 実行使用メモリ | 6,948 KB | 
| 最終ジャッジ日時 | 2024-06-22 06:49:48 | 
| 合計ジャッジ時間 | 8,414 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 WA * 2 | 
| other | AC * 8 WA * 21 | 
ソースコード
import std.stdio, std.array, std.conv, std.string, std.algorithm, std.math, std.regex;
void main(){
    string s;
    s = readln().chomp();
    int cwln = -1;
    foreach(elm; matchAll(s, regex("c[^cw]*?w[^cw]*?w"))){
        if(cwln < to!(int)(elm.hit.length))cwln=to!(int)(elm.hit.length);
        elm.writeln();
    }
    cwln.writeln();
}
// 読み込み用
T readOne(T=size_t)(){
    return readln().chomp().split[0].to!T();
}
T[] readLine(T=size_t)(string op=" "){
	T[] ol;
	foreach(string elm; readln().chomp().split(op)){
		ol ~= elm.to!T();
	}
	return ol;
}