結果
| 問題 |
No.203 ゴールデン・ウィーク(1)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-05-16 11:03:12 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 545 bytes |
| コンパイル時間 | 541 ms |
| コンパイル使用メモリ | 73,924 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-18 09:15:36 |
| 合計ジャッジ時間 | 1,376 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 29 |
ソースコード
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef pair<int, int> pii;
#define rep(i,x) for(int i=0;i<(int)(x);++i)
int main(){
int max = 0, tmp = 0;
string s1, s2;
cin >> s1 >> s2;
s1 += s2;
rep(i, s1.size()) {
if (s1[i] == 'x') {
if (max < tmp) max = tmp;
tmp = 0;
} else {
++tmp;
}
}
if (max < tmp) max = tmp;
cout << max << endl;
return 0;
}