hdu--5078--orz

这应该是当时 鞍山的签到题了吧...

可以给大一的来做下 .

 1 #include <iostream>
 2 #include <cmath>
 3 #include <iomanip>
 4 using namespace std;
 5
 6 double Abs( double x )
 7 {
 8     return x > 0 ? x : -x;
 9 }
10
11 int main()
12 {
13     cin.sync_with_stdio(false);
14     int t , n;
15     double t1 , x1 , y1 , t2 , x2 , y2 , var , ans;
16     cin >> t;
17     while( t-- )
18     {
19         cin >> n;
20         cin >> t1 >> x1 >> y1;
21         ans = 0;
22         for( int i = 2 ; i<=n ; i++ )
23         {
24             cin >> t2 >> x2 >> y2;
25             var = sqrt( Abs(x2-x1)*Abs(x2-x1) + Abs(y2-y1)*Abs(y2-y1) ) / Abs(t2-t1);
26             ans = max( var , ans );
27             t1 = t2;
28             x1 = x2;
29             y1 = y2;
30         }
31         cout << setiosflags(ios::fixed);
32         cout << setprecision(10) << ans << endl;
33     }
34     return 0;
35 }

早上写了2题  晓爷你TMD 是不是还在睡觉!!

时间: 2024-10-24 21:01:06

hdu--5078--orz的相关文章

HDU 5078 Osu!

题目链接:hdu 5078 Osu! 题面: Osu! Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 1058    Accepted Submission(s): 550 Special Judge Problem Description Osu! is a very popular music game. Basically,

HDU 1273 ORZ

漫步森林 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1607    Accepted Submission(s): 1090 Problem Description Gardon和小希每天晚上都喜欢到屋外的森林里散步,设森林里有N块空地,任意两块空地之间都有一条小径相通.他们每次从任意一块空地出发,经过所有的空地后回到原来的空地. 

hdu 5078 2014鞍山现场赛 水题

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 &l

hdu 5078 Osu! (2014 acm 亚洲区域赛鞍山 I)

题目链接:http://acm.hdu.edu.cn/showproblem.php? pid=5078 Osu! Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 180    Accepted Submission(s): 114 Special Judge Problem Description Osu! is a very p

hdu 5078(2014鞍山现场赛 I题)

数据 表示每次到达某个位置的坐标和时间 计算出每对相邻点之间转移的速度(两点间距离距离/相隔时间) 输出最大值 Sample Input252 1 9//t x y3 7 25 9 06 6 37 6 01011 35 6723 2 2929 58 2230 67 6936 56 9362 42 1167 73 2968 19 2172 37 8482 24 98 Sample Output9.219544457354.5893762558 1 # include <iostream> 2 #

HDU 5078 Revenge of LIS II(dp LIS)

Problem Description In computer science, the longest increasing subsequence problem is to find a subsequence of a given sequence in which the subsequence's elements are in sorted order, lowest to highest, and in which the subsequence is as long as po

hdu 5078 Osu!(鞍山现场赛)

Osu! Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 20    Accepted Submission(s): 15 Special Judge Problem Description Osu! is a very popular music game. Basically, it is a game about clicki

hdu 5078

Osu! Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 58    Accepted Submission(s): 41 Special Judge Problem Description Osu! is a very popular music game. Basically, it is a game about clicki

[ACM] HDU 5078 Osu!

Osu! Problem Description Osu! is a very popular music game. Basically, it is a game about clicking. Some points will appear on the screen at some time, and you have to click them at a correct time. Now, you want to write an algorithm to estimate how

Xor Sum HDU - 4825(01字典树)

Xor Sum HDU - 4825 (orz从之前从来没见过这种题 1 #include <bits/stdc++.h> 2 using namespace std; 3 #define LL long long 4 const int maxnode = 100010 * 32; 5 const int sigma = 2; 6 struct AC01{ 7 int ch[maxnode][sigma]; 8 LL val[maxnode]; 9 int sz; 10 void init(