結果
| 問題 | No.341 沈黙の期間 |
| コンテスト | |
| ユーザー |
kunio_Yb
|
| 提出日時 | 2016-02-13 23:10:21 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 344 bytes |
| 記録 | |
| コンパイル時間 | 1,303 ms |
| コンパイル使用メモリ | 159,864 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-22 06:18:18 |
| 合計ジャッジ時間 | 1,806 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
char buf[999];
cin.getline(buf,999);
string ln{buf}, p3{"…"};
int n=0;
auto unit=p3.size();
for(auto pos=ln.find(p3);ln.size()>pos; pos=ln.find(p3,pos)){
int m;
for(m=0;equal(p3.begin(),p3.end(),ln.begin()+pos);++m)
pos+=unit;
if(m>n)n=m;
}
cout<<n;
}
kunio_Yb