1741. Jaunt around the Zhuhai Campus (梯形面积)
来源:互联网 发布:如何搭建数据库 编辑:程序博客网 时间:2024/06/08 00:57
水题。折线定积分。
#include <iostream>#include <iomanip>using namespace std;int main(){int t,n;cin>>t;while(t--){cin>>n;int x,y,a,b;double area=0;cin>>a>>b;for(int i=1;i<n;i++){cin>>x>>y;area+=((double)(b+y))*(x-a)/2;a=x;b=y;}cout<<fixed<<setprecision(1)<<area<<endl;}return 0;}
- 1741. Jaunt around the Zhuhai Campus (梯形面积)
- Sicily 1741. Jaunt around the Zhuhai Campus
- 1741.Jaunt around the Zhuhai Campus
- 三角形 梯形 面积
- (c语法百题9)求梯形的面积
- uva10397 - Connect the Campus(连接校园)
- d009: 求梯形的面积
- 小程序求梯形面积
- 计算梯形面积的页面
- life on the campus
- 10397 - Connect the Campus
- uva_10397 Connect the Campus
- 10397 - Connect the Campus
- UVA10397- Connect the Campus
- UVa10397 Connect the Campus
- 10397 - Connect the Campus
- uva10397 Connect the Campus
- UVA_10397_Connect the Campus
- Struts2的环境搭建
- 详细解析Java中抽象类和接口的区别
- C++学习第12篇-类的继承
- 大学时写的绘图工具(一)
- 修改Linux 更新源
- 1741. Jaunt around the Zhuhai Campus (梯形面积)
- C++学习第13篇-虚拟函数
- C++中的sstream学习
- Linux如何在系统启动时自动加载内核模块
- javaIO操作下(内存流、打印流、System的支持)
- Visual Studio 2010快捷键
- 信息资源管理
- Hibernate缓存
- C++学习第14篇-I/O流