結果
| 問題 | No.341 沈黙の期間 |
| コンテスト | |
| ユーザー |
focus
|
| 提出日時 | 2018-02-17 17:51:39 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 392 bytes |
| 記録 | |
| コンパイル時間 | 368 ms |
| コンパイル使用メモリ | 78,448 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2026-03-10 15:18:33 |
| 合計ジャッジ時間 | 943 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
}
focus