結果
| 問題 |
No.204 ゴールデン・ウィーク(2)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-12-27 23:56:02 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 736 bytes |
| コンパイル時間 | 799 ms |
| コンパイル使用メモリ | 83,728 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-12-15 04:55:54 |
| 合計ジャッジ時間 | 2,400 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 WA * 37 |
ソースコード
#define _USE_MATH_DEFINES
#include<stdio.h>
#include<string>
#include<iostream>
#include<cctype>
#include<cstdio>
#include<vector>
#include<stack>
#include<queue>
#include <algorithm>
#include<math.h>
#include<set>
#include<map>
#include<iomanip>
//#include<bits/stdc++.h>
using namespace std;
int main() {
int n; cin >> n;
string a, b;
cin >> a >> b;
string g = a + b;
int s = 0;
for (int i = 0; i < g.size(); i++) {
int x = 0;
string p = g;
for (int j = i; j < g.size(); j++) {
if (p[j] == 'x') {
p[j] = 'o';
x++;
}
if (x >= n)break;
}
int y = 0;
for (int j = 0; j < p.size(); j++) {
if (p[j] == 'o')y++;
else y = 0;
s = max(s, y);
}
}
cout << s << endl;
return 0;
}