結果
| 問題 |
No.203 ゴールデン・ウィーク(1)
|
| コンテスト | |
| ユーザー |
Eclair1015
|
| 提出日時 | 2018-07-10 20:07:02 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 485 bytes |
| コンパイル時間 | 506 ms |
| コンパイル使用メモリ | 60,360 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-18 10:28:16 |
| 合計ジャッジ時間 | 1,414 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 29 |
ソースコード
#include <iostream>
#include <algorithm>
#include <vector>
#include<string>
using namespace std;
int main(){
string s1, s2;
int cnt=0,maxv=0;
bool flag = false;
cin >> s1 >> s2;
for (int i = 0; i < s1.size(); i++) {
if (s1[i] == 'o') {
cnt++;
} else {
maxv=max(maxv, cnt);
cnt = 0;
}
}
for (int i = 0; i < s2.size(); i++) {
if (s2[i] == 'o') {
cnt++;
} else {
maxv = max(maxv, cnt);
cnt = 0;
}
}
maxv = max(maxv, cnt);
cout << maxv << endl;
}
Eclair1015