結果
問題 | No.341 沈黙の期間 |
ユーザー |
![]() |
提出日時 | 2020-01-29 05:07:33 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 237 bytes |
コンパイル時間 | 1,625 ms |
コンパイル使用メモリ | 165,548 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-15 16:35:31 |
合計ジャッジ時間 | 2,266 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge6 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
ソースコード
#include <bits/stdc++.h>using namespace std;int main() {string S;cin >> S;int ans = 0;for (int i = 0, j = 0; i < S.size(); i += 3) {if (S.at(i) == -30) ans = max(ans, ++j);else j = 0;}cout << ans << "\n";}