結果
| 問題 | No.204 ゴールデン・ウィーク(2) |
| コンテスト | |
| ユーザー |
dnish
|
| 提出日時 | 2017-07-08 10:39:16 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 405 bytes |
| 記録 | |
| コンパイル時間 | 1,113 ms |
| コンパイル使用メモリ | 184,784 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-04-23 04:02:42 |
| 合計ジャッジ時間 | 2,486 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 WA * 33 |
ソースコード
#include <bits/stdc++.h>
#define REP(i,n,N) for(int i=(n);i<(int) N;i++)
#define p(s) cout<<(s)<<endl
using namespace std;
int main() {
int D;
string s,s1;
cin>>D>>s>>s1;
s+=s1;
queue<int> q;//num of x
q.push(0);
int ans=0;
REP(i,0,14){
if(s[i]=='x'){
q.push(i+1);
}
if((int)q.size()>D+1){
ans=max(ans,i-q.front());
q.pop();
}
}
ans=max(ans,14-q.front());
p(ans);
return 0;
}
dnish