結果
| 問題 |
No.341 沈黙の期間
|
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2020-01-18 00:50:18 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 367 bytes |
| コンパイル時間 | 557 ms |
| コンパイル使用メモリ | 63,636 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-26 03:50:51 |
| 合計ジャッジ時間 | 1,254 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 |
ソースコード
#include <iostream>
using namespace std;
int main(){
string s;cin>>s;
int ans = 0;
int nw = 0;
for(int i = 0; s.size() > i; i++){
if(s[i] == -30 && s[i+1] == -128 && s[i+2] == -90){
nw++;
i+=2;
}else{
ans = max(ans,nw);
nw = 0;
}
}
cout << max(ans,nw) << endl;
}