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