結果
問題 |
No.203 ゴールデン・ウィーク(1)
|
ユーザー |
![]() |
提出日時 | 2020-08-12 15:56:38 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 623 bytes |
コンパイル時間 | 911 ms |
コンパイル使用メモリ | 94,852 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-09 18:26:38 |
合計ジャッジ時間 | 1,624 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <iomanip> #include <stack> #include <algorithm> #include <string> #include <map> #include <iterator> #include <set> #include <queue> using namespace std; int main() { string S1; cin >> S1; string S2; cin >> S2; string S = S1 + S2; int N = 15; vector<int> vs(N, 0); for (int i = 1; i < N; ++i) { if (S[i - 1] == 'o') { vs[i] = vs[i - 1] + 1; } } int m = 0; for (int i = 0; i < N; ++i) { m = max(m, vs[i]); } cout << m << endl; return 0; }