結果
| 問題 | No.40 多項式の割り算 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-01-15 16:35:00 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 386 bytes |
| 記録 | |
| コンパイル時間 | 1,325 ms |
| コンパイル使用メモリ | 146,720 KB |
| 実行使用メモリ | 10,916 KB |
| 最終ジャッジ日時 | 2026-01-15 16:35:14 |
| 合計ジャッジ時間 | 14,072 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 3 |
| other | TLE * 1 -- * 31 |
ソースコード
#include <iostream>
int main(){
int D;
std::cin>>D;
int x=0,y=0,z=0,a;
for(int i=0;i<=D;D++){std::cin>>a;x+=(i%2?-a:a);y+=a;if(i==0)z=a;}
int b[3];b[0]=z;b[1]=(y-x)/2;b[2]=(x+y)/2-z;
if(b[1]){
if(b[2]){
std::cout<<"2\n";
std::cout<<b[2]<<" ";
}else{
std::cout<<"1\n";
}
std::cout<<b[1]<<" ";
}else{
std::cout<<"0\n";
}
std::cout<<b[0];
return 0;
}