提出 #30466288
ソースコード 拡げる
#include <bits/stdc++.h>
using namespace std;
int main(){
int N, M;
cin >> N >> M;
vector<int> A(N+1), B(M+1), C(N+M+1);
for (int i=0; i<N+1; ++i){
cin >> A.at(i);
}
for (int i=0; i<N+M+1; ++i){
cin >> C.at(i);
}
int x=0;
for (int i=0; i<M+1; ++i){
x = C.at(i);
for (int j=max(0,i-N); j<i; ++j){
x -= B.at(j)*A.at(i-j);
}
B.at(i) = x/A.at(0);
cout << B.at(i);
if (i == M){
cout << endl;
}
else{
cout << ' ';
}
}
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | D - Polynomial division |
| ユーザ | nullpoint |
| 言語 | C++ (GCC 9.2.1) |
| 得点 | 0 |
| コード長 | 526 Byte |
| 結果 | RE |
| 実行時間 | 117 ms |
| メモリ | 3596 KiB |
ジャッジ結果
| セット名 | Sample | All | ||||||
|---|---|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 0 / 400 | ||||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | example_00.txt, example_01.txt |
| All | example_00.txt, example_01.txt, hand_00.txt, hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, hand_05.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| example_00.txt | AC | 7 ms | 3524 KiB |
| example_01.txt | AC | 2 ms | 3444 KiB |
| hand_00.txt | AC | 5 ms | 3444 KiB |
| hand_01.txt | AC | 3 ms | 3448 KiB |
| hand_02.txt | AC | 4 ms | 3356 KiB |
| hand_03.txt | AC | 2 ms | 3380 KiB |
| hand_04.txt | RE | 117 ms | 3348 KiB |
| hand_05.txt | RE | 112 ms | 3224 KiB |
| random_00.txt | RE | 112 ms | 3348 KiB |
| random_01.txt | RE | 111 ms | 3128 KiB |
| random_02.txt | RE | 112 ms | 3132 KiB |
| random_03.txt | RE | 110 ms | 3268 KiB |
| random_04.txt | RE | 112 ms | 3348 KiB |
| random_05.txt | RE | 112 ms | 3096 KiB |
| random_06.txt | AC | 3 ms | 3476 KiB |
| random_07.txt | AC | 2 ms | 3596 KiB |
| random_08.txt | AC | 2 ms | 3360 KiB |
| random_09.txt | AC | 3 ms | 3592 KiB |
| random_10.txt | AC | 2 ms | 3528 KiB |
| random_11.txt | AC | 2 ms | 3444 KiB |