結果
問題 |
No.203 ゴールデン・ウィーク(1)
|
ユーザー |
![]() |
提出日時 | 2017-08-11 05:11:49 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 520 bytes |
コンパイル時間 | 611 ms |
コンパイル使用メモリ | 75,880 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-12 20:00:21 |
合計ジャッジ時間 | 1,701 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 28 WA * 1 |
ソースコード
#include <iostream> #include <fstream> #include <vector> #include <string> #include <algorithm> using namespace std; int main(){ string c,c1,c2; cin >> c1 >>c2; c = c1 + c2; vector<int> v(14); int n = 14; int ans = 0; for (int i = 0; i < n - 1; i++) { if (c[i] == c[i + 1] && c[i] == 'o') { ans++; v[i] = ans; //cout << "x" << " "; }else{ ans = 0; //cout << "y" << " "; } } int max = *max_element(v.begin(),v.end()); cout << max + 1 << "\n"; return 0; }