結果

問題 No.204 ゴールデン・ウィーク(2)
ユーザー keisuke6
提出日時 2022-07-13 08:57:11
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 433 bytes
コンパイル時間 3,012 ms
コンパイル使用メモリ 245,456 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-24 07:55:57
合計ジャッジ時間 4,319 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21 WA * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
  int N;
  string S,T;
  cin>>N>>S>>T;
  if(N == 14){
      cout<<14<<endl;
      return 0;
  }
  S += T;
  T = S;
  int ans = 0;
  for(int z=0;z<14-N;z++){
      for(int y=z;y<z+N;y++) S[y] = 'o';
  int now = 0;
  for(int i=0;i<14;i++){
      if(S[i] == 'o') now++;
      else now = 0;
      ans = max(ans,now);
  }
  S = T;
  }
  cout<<ans<<endl;
}
0