結果
問題 | No.203 ゴールデン・ウィーク(1) |
ユーザー |
![]() |
提出日時 | 2020-03-29 13:31:44 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 443 bytes |
コンパイル時間 | 1,498 ms |
コンパイル使用メモリ | 162,020 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2025-01-02 13:24:33 |
合計ジャッジ時間 | 2,478 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 WA * 5 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); string S; for (int i = 0; i < 2; i++) { string s; cin >> s; S += s; } int res = 0, cnt = 0; for (int i = 0; i < (int)S.size() - 1; i++) { if (S[i] == S[i + 1] && S[i] == 'o') { cnt++; } else { cnt = 0; } res = max(res, cnt); } cout << (res == 0 ? 0 : res + 1) << '\n'; return 0; }