Building roads Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 7019 Accepted: 2387 Description Farmer John's farm has N barns, and there are some cows that live in each barn. The cows like to drop around, so John wants to build some ro…
题意 给出n(1–150). 输出两个多项式A,B从常数到最高次的系数,使得对两个多项式求gcd时,恰好经过n步得到结果. 多项式的gcd一步是指(A(x),B(x))变成(B,A mod B)的过程,且当A mod B为0时,视为得到结果B. A mod B为多项式求余,参见 long division. 要求两个多项式的所有系数都是1,0,-1.前导系数(最高次项系数)为1,度数(最高次)不超过n,第一个多项式的度数大于第二个 分析:这个题懵逼了好几天,题解愣是没看懂,来学校后在宿舍用笔划拉…