結果
| 問題 |
No.341 沈黙の期間
|
| コンテスト | |
| ユーザー |
hotpepsi
|
| 提出日時 | 2016-02-13 02:03:41 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 380 bytes |
| コンパイル時間 | 419 ms |
| コンパイル使用メモリ | 58,728 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-22 06:05:34 |
| 合計ジャッジ時間 | 980 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 |
ソースコード
#include <iostream>
#include <sstream>
#include <algorithm>
using namespace std;
int main(int argc, char *argv[])
{
string s;
cin >> s;
int ans = 0, cnt = 0;
for (int i = 0; i < (int)s.length() - 2; ++i) {
if (s[i] == -30 && s[i + 1] == -128 && s[i+2] == -90) {
i += 2;
++cnt;
ans = max(ans, cnt);
} else {
cnt = 0;
}
}
cout << ans << endl;
return 0;
}
hotpepsi