結果
問題 |
No.204 ゴールデン・ウィーク(2)
|
ユーザー |
👑 |
提出日時 | 2020-03-06 20:33:22 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 459 bytes |
コンパイル時間 | 592 ms |
コンパイル使用メモリ | 66,944 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-14 03:28:33 |
合計ジャッジ時間 | 1,948 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 WA * 25 |
ソースコード
#include <iostream> #include <vector> using namespace std; int main(){ int d;cin>>d; string a,b;cin>>a>>b; a+=b; int ans = 0; for(int i = 0; 14-d >= i; i++){ int tmp = 0; int t = 0; for(int j = 0; 14 > j; j++){ if(i <= j && j < i+d){ t++; }else if(a[j] == 'o'){ t++; }else{ tmp = max(tmp,t); t = 0; } } tmp = max(tmp,t); ans = max(ans,tmp); } cout << ans << endl; }