結果
| 問題 |
No.341 沈黙の期間
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-11-13 10:30:46 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 355 bytes |
| コンパイル時間 | 1,331 ms |
| コンパイル使用メモリ | 160,532 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-25 00:23:29 |
| 合計ジャッジ時間 | 1,999 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | AC * 2 WA * 9 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(void) {
string s;
cin >> s;
int ans = 0, sz = s.size(), l = 0, r = 0;
while (l < sz) {
while (l < sz && s.substr(l, 2) != "…") l += 2, r += 2;
while (r < sz && s.substr(r, 2) == "…") r += 2;
ans = max(ans, (r - l) / 2);
l = r;
}
cout << ans << endl;
return 0;
}