2014-03-20 02:20

题目:给定二维平面上两个正方形,用一条直线将俩方块划分成面积相等的两部分。

解法:穿过对称中心的线会将面积等分,所以连接两个中心即可。如果两个中心恰好重合,那么任意穿过这个点的直线都满足条件。

代码:

1 // 7.5 Given two squares on two-dimensional plane, draw a line to cut them in two parts with equal area.
2 // Answer:
3 //    Apparently the line should go through the center of the two squares.
4 //    If their center coincide, any line that goes through this center will suffice.
5 int main()
6 {
7     return 0;
8 }

 

相关文章:

  • 2021-11-11
  • 2021-10-10
  • 2021-12-27
  • 2021-12-07
  • 2021-10-17
  • 2022-01-09
  • 2021-08-24
  • 2021-10-13
猜你喜欢
  • 2021-05-26
  • 2021-12-19
  • 2021-10-22
  • 2021-12-24
  • 2021-08-24
  • 2021-10-18
  • 2021-07-28
相关资源
相似解决方案