結果
| 問題 |
No.204 ゴールデン・ウィーク(2)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-08-10 12:16:00 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 324 bytes |
| コンパイル時間 | 561 ms |
| コンパイル使用メモリ | 67,964 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-12 03:56:44 |
| 合計ジャッジ時間 | 1,805 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 35 WA * 11 |
コンパイルメッセージ
main.cpp:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
4 | main()
| ^~~~
ソースコード
#include<iostream>
using namespace std;
string s,t;int d,m,c[99],f=1,p='x';
main()
{
cin>>d>>s>>t;s=string(d,'x')+s+t+string(d,'x');
for(int i=0;i<=s.size()-d;i++){
int cnt=0;int j=i-1;
while(j>=0&&s[j]=='o')cnt++,j--;
j=i+d;
while(j<=s.size()&&s[j]=='o')cnt++,j++;
cnt+=d;
m<cnt&&(m=cnt);
}
cout<<m<<endl;
}