結果
| 問題 |
No.204 ゴールデン・ウィーク(2)
|
| コンテスト | |
| ユーザー |
nanophoto12
|
| 提出日時 | 2016-02-19 21:20:19 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,034 bytes |
| コンパイル時間 | 512 ms |
| コンパイル使用メモリ | 65,192 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-13 13:53:14 |
| 合計ジャッジ時間 | 1,608 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 WA * 25 |
ソースコード
#include <queue>
#include <algorithm>
#include <vector>
#include <iostream>
#include <numeric>
#include <tuple>
using namespace std;
typedef long long int ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
#define REP(i,x) for(int i=0;i<(int)(x);i++)
#define ALL(container) (container).begin(), (container).end()
int main(int argc, char *argv[]){
ios::sync_with_stdio(false);
int n;
cin >> n;
string f;
string s;
cin >> f;
cin >> s;
string m = f + s;
int maxValue = 0;
for(int i = 0; i < 14;i++)
{
int current = 0;
for(int j = 0;j < 14;j++)
{
if(j >= i && j < i + n)
{
current++;
maxValue = max(maxValue, current);
}
else if(m[j] == 'o')
{
current++;
maxValue = max(maxValue, current);
}
else
{
current = 0;
}
}
}
cout << maxValue << endl;
return 0;
}
nanophoto12