http://acm.hdu.edu.cn/showproblem.php?pid=5078

现场最水的一道题 连排序都不用,由于说了ti<ti+1

//#pragma comment(linker, "/STACK:102400000,102400000")
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <iostream>
#include <iomanip>
#include <cmath>
#include <map>
#include <set>
#include <queue>
using namespace std; #define ls(rt) rt*2
#define rs(rt) rt*2+1
#define ll long long
#define ull unsigned long long
#define rep(i,s,e) for(int i=s;i<e;i++)
#define repe(i,s,e) for(int i=s;i<=e;i++)
#define CL(a,b) memset(a,b,sizeof(a))
#define IN(s) freopen(s,"r",stdin)
#define OUT(s) freopen(s,"w",stdout)
const ll ll_INF = ((ull)(-1))>>1;
const double EPS = 1e-8;
const double pi = acos(-1.0);
const int INF = 100000000; const int MAXN = 1000+20; double t[MAXN],x[MAXN],y[MAXN];
struct Node {
double t,x,y;
}a[MAXN]; bool cmp(Node a, Node b){
return a.t<b.t;
} int main()
{
int ncase,n;
scanf("%d",&ncase);
while(ncase--)
{
scanf("%d",&n);
double ans=0.0;
for(int i=0;i<n;i++)
{
scanf("%lf%lf%lf",&a[i].t,&a[i].x,&a[i].y);
} for(int i=0;i<n-1;i++)
ans=max(ans,sqrt( (a[i].x-a[i+1].x)*(a[i].x-a[i+1].x)+(a[i].y-a[i+1].y)*(a[i].y-a[i+1].y) )/(a[i+1].t-a[i].t));
printf("%.10lf\n",ans);
}
return 0;
}

最新文章

  1. ACM: Gym 101047B Renzo and the palindromic decoration - 手速题
  2. linux top命令中各cpu占用率含义
  3. 向MySql数据库导入excel表数据
  4. 使用VS,获取SQL SERVER 的链接字符串
  5. 设计模式学习系列9 外观模式Facade
  6. Good Bye 2013
  7. 【BZOJ】【1272】【BeiJingWC2008】Gate of Babylon
  8. Collection_Compare
  9. Django1.6添加comments应用的简单过程
  10. CSS表格固定列宽
  11. BZOJ 1059 [ZJOI2007]矩阵游戏
  12. hdu1005 Number Sequence(寻找循环节)
  13. ABAP 开启制定路径下的文件或网址URL
  14. C++内存管理-new,delete,new[],placement new的简单使用
  15. Mysql 登录及用户切换、用户权限查询
  16. JDK8 特性详解
  17. 配置Zookeper
  18. CSU 1805 Three Capitals(矩阵树定理+Best定理)
  19. [UE4]产生开枪特效
  20. sublime text配置make工具

热门文章

  1. can&#39;t set blob value on that column
  2. 关于css宽高问题
  3. IDEA 导入maven项目,显示:nothing to show
  4. TWaver HTML5之树形布局
  5. ie6,ie7,ie8,FF 浏览器兼容问题
  6. 封装一个获取module.exports内容的方法
  7. mysql批量替换某个字段的部分内容
  8. 05 Python运算符
  9. SQL函数小记
  10. 洛谷 1821 [USACO07FEB]银牛派对Silver Cow Party