結果
| 問題 |
No.40 多項式の割り算
|
| コンテスト | |
| ユーザー |
shimashima_k
|
| 提出日時 | 2015-04-26 16:19:41 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 550 bytes |
| コンパイル時間 | 491 ms |
| コンパイル使用メモリ | 59,640 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-05 02:49:30 |
| 合計ジャッジ時間 | 1,622 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 32 |
ソースコード
#include <vector>
#include "iostream"
using namespace std;
int main() {
int d,e;
vector<int> m;
cin >> d;
for (int i=0; i <= d; i++) {
cin >> e;
m.push_back(e);
}
while (d>2){
if(m[d]!=0){
m[d-2] += m[d];
}
d--;
}
if (m[2] == 0){
if (m[1] == 0) {
cout << m[0] << endl;
} else {
cout << m[0]<< " " << m[1] <<endl;
}
} else {
cout << m[0] << " " << m[1]<< " " << m[2] << endl;
}
return 0;
}
shimashima_k