結果
| 問題 | 
                            No.204 ゴールデン・ウィーク(2)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             a
                         | 
                    
| 提出日時 | 2016-07-10 00:15:06 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 635 bytes | 
| コンパイル時間 | 346 ms | 
| コンパイル使用メモリ | 48,896 KB | 
| 実行使用メモリ | 6,824 KB | 
| 最終ジャッジ日時 | 2024-10-13 14:04:51 | 
| 合計ジャッジ時間 | 1,442 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 35 WA * 11 | 
ソースコード
#include <cstdio>
#include <vector>
#include <cstring>
#include <algorithm>
using namespace std;
int main(void) {
  int d;
  char s[111], t[111];
  memset(s, 'x', sizeof(s));
  scanf("%d", &d);
  scanf("%s", s+14);
  scanf("%s", s+14+7);
  int res = 0;
  for (int i = 0; i < 42; i++) {
    memcpy(t, s, sizeof(s));
    for (int j = 0; j < d; j++) {
      s[j+i] = 'o';
    }
    for (int j = 0; j < 42; j++) {
      if (s[j] == 'o') {
        int c = 1;
        while (s[j+c] == 'o') {
          c++;
        }
        res = max(res, c);
      }
    }
    
    memcpy(s, t, sizeof(t));
  }
  printf("%d\n", res);
  
  return 0;
}
            
            
            
        
            
a