結果
| 問題 |
No.40 多項式の割り算
|
| コンテスト | |
| ユーザー |
btk
|
| 提出日時 | 2015-05-18 09:41:57 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 375 bytes |
| コンパイル時間 | 462 ms |
| コンパイル使用メモリ | 60,584 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-06 05:20:44 |
| 合計ジャッジ時間 | 1,864 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 31 WA * 1 |
ソースコード
#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<strings.h>
using namespace std;
#define LL long long
int b[10010];
int main(){
int d;
cin>>d;
for(int i=0;i<=d;i++)cin>>b[i];
for(int i=d;i>=3;i--){
b[i-2]+=b[i];
b[i]=0;
}
d=0;
while(b[d+1])d++;
cout<<d<<endl;
cout<<b[0];
for(int i=1;i<=d;i++)
cout<<" "<<b[i];
cout<<endl;
}
btk