結果
問題 |
No.204 ゴールデン・ウィーク(2)
|
ユーザー |
![]() |
提出日時 | 2016-02-03 13:19:38 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 400 bytes |
コンパイル時間 | 1,413 ms |
コンパイル使用メモリ | 158,560 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-13 13:53:08 |
合計ジャッジ時間 | 2,400 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 12 WA * 34 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ int d; cin >> d; string c1,c2; cin >> c1 >> c2; c1 += c2; int count = 0, ans = 0, check = 0; for(int i = 0; i < 14 - ans; i++){ ans = max(count,ans); count = 0,check = 0; for(int j = i; j < 14; j++){ if(c1[j] == 'x'){ if(check == d) break; check++,count++; }else count++; } } cout << ans << endl; return 0; }