結果
| 問題 | No.203 ゴールデン・ウィーク(1) |
| コンテスト | |
| ユーザー |
Eclair1015
|
| 提出日時 | 2018-07-10 20:07:02 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 1,000 ms |
| + 196µs | |
| コード長 | 485 bytes |
| 記録 | |
| コンパイル時間 | 298 ms |
| コンパイル使用メモリ | 77,024 KB |
| 実行使用メモリ | 9,904 KB |
| 最終ジャッジ日時 | 2026-09-25 19:01:41 |
| 合計ジャッジ時間 | 1,901 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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