結果
問題 |
No.341 沈黙の期間
|
ユーザー |
|
提出日時 | 2019-03-08 20:20:11 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 325 bytes |
コンパイル時間 | 854 ms |
コンパイル使用メモリ | 66,556 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-23 15:06:23 |
合計ジャッジ時間 | 1,297 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
ソースコード
#include <algorithm> #include <iostream> #include <string> using namespace std; int main() { string S; cin >> S; int sum = 0, ans = 0; for (int i = 0; i < S.size(); i += 3) { if (S.substr(i, 3) == "…") ++sum; else { ans = max(sum, ans); sum = 0; } } ans = max(sum, ans); cout << ans; }