HDU 4393 Throw nails】的更多相关文章

Throw nails Time Limit: 5000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1729    Accepted Submission(s): 538 Problem Description The annual school bicycle contest started. ZL is a student in this school. He…
Problem Description The annual school bicycle contest started. ZL is a student in this school. He is so boring because he can't ride a bike!! So he decided to interfere with the contest. He has got the players' information by previous contest video.…
优先队列的应用 好坑,好坑,好坑,重要的事情说三遍! #include<iostream> #include<cstdio> #include<cstring> #include<queue> using namespace std; #define maxn 50005 struct Node { int f,s,id; friend bool operator < (Node a,Node b) { if(a.f != b.f) return a.…
题目链接:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=115361#problem/D 题意大致是:给出最多50000个人,拥有最初速度F和1秒后的速度V,(F<=500,V<=100)每秒将速度最快的那个人淘汰,按淘汰的人的顺序输出他们的序号. 思路:由于人数很多,用暴力更新每秒淘汰的人显然会TLE.注意到F很小,那么对于任意两个人来说,即使有500的路程差,速度快的那个人哪怕是每秒只快1米,在501秒后就能超越,也就是说,50…
水题,优先级队列. /* 4393 */ #include <iostream> #include <sstream> #include <string> #include <map> #include <queue> #include <set> #include <stack> #include <vector> #include <deque> #include <algorithm&g…
                                                                                                              Throw nails The annual school bicycle contest started. ZL is a student in this school. He is so boring because he can't ride a bike!! So he…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4573 Problem Description Remember our childhood? A few naked children throw stones standing on the same position, the one throws farther win the game. Aha, of course, there are some naughty boys who care…
来源hde4393 The annual school bicycle contest started. ZL is a student in this school. He is so boring because he can't ride a bike!! So he decided to interfere with the contest. He has got the players' information by previous contest video. A player c…
题目: Problem Description The annual school bicycle contest started. ZL is a student in this school. He is so boring because he can't ride a bike!! So he decided to interfere with the contest. He has got the players' information by previous contest vid…
用优先队列储存每个人的初始距离和编号,每轮求出最快的人,然后pop掉 一开始想遍历队列的,后来发现队列没办法遍历,汗-_-! 题意,给几个第一秒冲出的距离和以后速度,求每秒后最前面人的编号,求完后最前面的退出 2 3 100 1 100 2 3 100 5 1 1 2 2 3 3 4 1 3 4 Case #1: 1 3 2 Case #2: 4 5 3 2 1 Hint The first case: 1st Second end Player1 100m (BOOM!!) Player2 1…