結果
問題 | No.341 沈黙の期間 |
ユーザー |
![]() |
提出日時 | 2018-02-17 17:51:39 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 5,000 ms |
コード長 | 392 bytes |
コンパイル時間 | 537 ms |
コンパイル使用メモリ | 66,296 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-24 12:15:30 |
合計ジャッジ時間 | 1,312 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
ソースコード
#include <iostream> #include <algorithm> #include<string> using namespace std; int main(){ string S; cin >> S; int num = 0,ans = 0 , i; for(i = 0; i < S.size(); i++){ if(S[i] == -30){ num++; i += 2; } else{ ans = max(ans, num); num = 0; } } ans = max(ans, num); cout << ans << endl; }