結果
問題 | No.203 ゴールデン・ウィーク(1) |
ユーザー |
![]() |
提出日時 | 2015-05-20 13:42:49 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 695 bytes |
コンパイル時間 | 601 ms |
コンパイル使用メモリ | 85,424 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-18 09:18:23 |
合計ジャッジ時間 | 1,384 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 |
ソースコード
#include <algorithm> #include <vector> #include <cfloat> #include <string> #include <cmath> #include <set> #include <cstdlib> #include <map> #include <ctime> #include <iomanip> #include <functional> #include <deque> #include <iostream> #include <cstring> #include <queue> #include <cstdio> #include <stack> #include <climits> #include <sys/time.h> #include <cctype> using namespace std; typedef long long ll; int main() { string s, t; cin >> s; cin >> t; s += t; int ans = 0, cnt = 0; for (int i = 0; i < s.size(); i++) { if (s[i] == 'o') { cnt++; }else { ans = max(ans, cnt); cnt = 0; } } ans = max(ans, cnt); std::cout << ans << std::endl; }