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…
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 vid…
题目链接: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…
来源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 video.…
水题,优先级队列. /* 4393 */ #include <iostream> #include <sstream> #include <string> #include <map> #include <queue> #include <set> #include <stack> #include <vector> #include <deque> #include <algorithm&g…
优先队列的应用 好坑,好坑,好坑,重要的事情说三遍! #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.…
#include<stdio.h> #include<math.h> #include<string.h> #include<stdlib.h> #define N 200010 void input(char s[]) { }; while(gets(str), strcmp(str, "START"));/****/ while(gets(str), strcmp(str, "END"))/****/ { ] ==…
描述 sqybi上次找GF的工作十分不成功,于是依旧单身的他在光棍节前的某天突发奇想,要给自己找一个BF(这里指的是男性的好朋友……),这样既可以和人分享内心的压抑(路人甲:压抑还分享么……),也可以保证自己能够有资格过今年的光棍节. 这次sqybi为了增加成功率,希望先对他提前确定的几个人定一下重要度.每个人的重要度都用一个自然数表示,这里的自然数包括0. 现在sqybi的心目中已经有了一些对于这些人的看法.他对于某个人的看法是基于另一个人的基础之上的,比如他会认为a比b的重要度至少大k. 现…