A Runing Game
Time Limit : 2000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)
Total Submission(s) : 2 Accepted Submission(s) : 1
Font: Times New Roman | Verdana | Georgia
Font Size: ← →
Problem Description
HDU hosts sporting meeting every year. One of the most exciting events is the 10000M-running.During the match many students are running on the track. So, how about the rank list now?
As we know, in a running , we rank the player according to the length everyone has passed . So if one player run 400M(one lap) farther than another player , it looks like they are running at the same position on the track , but the rank of the former is much better than the latter. Now given everyone’s position on the track , and one rank list , can you tell me whether the rank list is possible. Input
The first line of input gives the number of cases, T (at most 110). the first line of each case has two intergers, n,m. (1
#include
using namespace std;
int cmp(int a,int b)
{
return a>b;
}
int t,rank[101],l[101],rr[101],ll[101];
int main()
{
scanf("%d",&t);
while(t--)
{
int lap=0;
int n,m;
scanf("%d%d",&n,&m);
for(int i=0;im )
printf("NO\n");
else
printf("YES\n");
}
return 0;
}
|