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