結果
| 問題 | No.341 沈黙の期間 |
| コンテスト | |
| ユーザー |
h_noson
|
| 提出日時 | 2016-02-13 22:54:58 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 419 bytes |
| 記録 | |
| コンパイル時間 | 314 ms |
| コンパイル使用メモリ | 71,792 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-04-10 12:16:13 |
| 合計ジャッジ時間 | 1,137 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 |
ソースコード
#include <iostream>
#include <string>
using namespace std;
int main(){
string dots = "…";
string str;
cin >> str;
int cnt = 0;
int mx = 0;
while (!str.empty()) {
if (!str.compare(0,3,dots))
cnt++;
else {
mx = max(cnt,mx);
cnt = 0;
}
str.replace(0,3,"");
}
cnt = max(cnt,mx);
cout << cnt << endl;
return 0;
}
h_noson