摘要: 1、先排除没有重叠的情况 2、找出重叠的面积的宽和长 用在x轴方向上两矩形左边两个边x值x1、x2,求max(x1,x2) 右边两条边x值x3,x4,求min(x3,x4) length=abs(max(x1,x2) - min(x3,x4) width同理,在y轴方向上操作 最后area=leng 阅读全文
posted @ 2023-04-03 12:29 SpringBridge 阅读(124) 评论(0) 推荐(0)
摘要: 多项式乘法是在多项式加法的基础上完成的。 1、多项式加法 1 #include<iostream> 2 using namespace std; 3 typedef struct lnode{ 4 int coef; 5 int exp; 6 lnode *next; 7 }lnode; 8 cla 阅读全文
posted @ 2023-04-01 17:00 SpringBridge 阅读(108) 评论(0) 推荐(0)