結果
問題 |
No.203 ゴールデン・ウィーク(1)
|
ユーザー |
|
提出日時 | 2017-03-07 18:48:31 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 807 bytes |
コンパイル時間 | 700 ms |
コンパイル使用メモリ | 111,796 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-12 07:13:24 |
合計ジャッジ時間 | 1,685 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 |
ソースコード
import std.stdio, std.string, std.conv, std.array, std.algorithm; import std.uni, std.range, std.math, std.container, std.datetime; import core.bitop, std.typetuple, std.typecons; immutable long MOD = 1_000_000_007; alias tie = TypeTuple; void main(){ auto w1 = readln.chomp; auto w2 = readln.chomp; auto week = w1 ~ w2; int ans, tmp; foreach(c ; week){ if(c == 'o'){ tmp += 1; } else { ans = max(ans, tmp); tmp = 0; } } ans = max(ans, tmp); writeln(ans); } void readVars(T...)(auto ref T args){ auto line = readln.split; foreach(ref arg ; args){ arg = line.front.to!(typeof(arg)); line.popFront; } if(!line.empty){ throw new Exception("args num < input num"); } }