結果
問題 | No.203 ゴールデン・ウィーク(1) |
ユーザー |
|
提出日時 | 2015-05-08 22:28:43 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 1,041 bytes |
コンパイル時間 | 1,282 ms |
コンパイル使用メモリ | 160,128 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-18 08:58:20 |
合計ジャッジ時間 | 2,125 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 |
ソースコード
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)n; ++i) #define REP(i, a, b) for (int i = (int)a; i < (int)b; ++i) #define rer(i, a, b) for (int i = (int)a; i <= (int)b; ++i) #define each(i,c) for(__typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i) #define all(v) v.begin(), v.end() #define mset(a, n) memset(a, n, sizeof(a)) using namespace std; typedef long long ll; typedef unsigned long long ull; typedef vector<int> vi; typedef vector<string> vs; typedef vector<vector<int> > vvi; typedef vector<pair<int, int> > vpii; typedef pair<int, int> pii; typedef pair<long long, long long> pll; const int inf = 1000000000; const int mod = 1000000007; const double eps = 1e-9; const int dx[] = { -1, 0, 1, 0}; const int dy[] = { 0, -1, 0, 1}; int main() { // cin.tie(0); // tie // ios::sync_with_stdio(false); // sync string s1, s2; cin >> s1 >> s2; s1 += s2; int ans = 0, cnt = 0; rep(i, s1.size()) { if (s1[i] == 'o') cnt++; else cnt = 0; ans = max(ans, cnt); } cout << ans << endl; return 0; }