結果
| 問題 |
No.204 ゴールデン・ウィーク(2)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-08-10 12:20:10 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 279 bytes |
| コンパイル時間 | 551 ms |
| コンパイル使用メモリ | 64,504 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-12 03:56:50 |
| 合計ジャッジ時間 | 1,834 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | AC * 1 WA * 45 |
コンパイルメッセージ
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+=t;
for(int i=0;i<14;i++)p!=s[i]?c[++f]++,p=s[i]:++c[f];
p=='x'&&(c[f]=0);
for(int i=1;i<99;i+=2)p=c[i]>d?c[c[i-1]<c[i+1]?i+1:i-1]+d:c[i-1]+(c[i]?:d)+c[i+1];
cout<<m<<endl;
}