結果
| 問題 |
No.204 ゴールデン・ウィーク(2)
|
| コンテスト | |
| ユーザー |
kurenai3110
|
| 提出日時 | 2016-08-16 22:09:32 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 643 bytes |
| コンパイル時間 | 836 ms |
| コンパイル使用メモリ | 66,248 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-07 18:26:07 |
| 合計ジャッジ時間 | 2,085 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 43 WA * 3 |
ソースコード
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
int d,ans;
int main()
{
int cnt = 0;
vector<bool> tf;
tf.resize(42);
cin >> d;
for (int i = 14; i < 28; i++) {
char c;
cin >> c;
if (c == 'o') tf[i] = true;
}
for (int i = 0; i < 28; i++) {
if (!tf[i]) {
vector<bool>tf2;
tf2 = tf;
for (int j = 0; j < d; j++) {
if(!tf2[i+j]) tf2[i+j] = true;
else break;
}
cnt = 0;
for (int k = 0; k < 42; k++) {
if (tf2[k]) cnt++;
else {
ans = max(ans, cnt);
cnt=0;
}
}
ans = max(ans, cnt);
}
}
cout << ans << endl;
return 0;
}
kurenai3110