10458 - Cricket Ranking

All about problems in Volume 104. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Post Reply
Learning poster
Posts: 94
Joined: Sat Oct 05, 2002 5:34 pm
Location: CS - AIUB, Dhaka, Bangladesh.

10458 - Cricket Ranking

Post by Sajid » Tue Feb 25, 2003 2:46 pm

I think, my program is ok. but it has a error msg TLE.... i have to do somthing for the less CPU time.

What can i do now????
Sajid Online: www.sajidonline.com

User avatar
New poster
Posts: 7
Joined: Tue Mar 04, 2003 5:15 pm
Location: Groningen, The Netherlands


Post by mathijs » Tue Mar 04, 2003 5:18 pm

Is there some fixed formula for this one?
I have thought of some sort of formula-building type of solution, but haven't tried to implement it. Is there a simpler way?

Learning poster
Posts: 83
Joined: Wed Feb 27, 2002 2:00 am
Location: Taiwan

10458 Cricket Ranking

Post by LittleJohn » Tue Sep 09, 2003 1:27 pm

I have no idea about this problem.
Can anybody give me a hint?
Thanks in advance.

Andrey Mokhov
Experienced poster
Posts: 128
Joined: Fri Nov 15, 2002 7:45 am
Location: Kyrgyzstan

Use IEP.

Post by Andrey Mokhov » Wed Sep 10, 2003 6:31 am

Hello, LittleJohn!

I've recently solved the problem. I used so-called Inclusion-Exclusion Principle. I guess you can google it :wink:

And the main badness of the problem is that you are to use long arithmetic. Rather dull, I think. :-?


New poster
Posts: 23
Joined: Sun May 19, 2013 1:50 am

Re: 10458 - Cricket Ranking

Post by sdipu » Thu Mar 26, 2015 6:59 pm

There are some problems with End Of File definition in this problem.

I used Java's Scanner to take input. And got many WA just because I did not check for EOF before every time I take a number. So I assume there are some extra numbers or characters after the last dataset in the input file. Although I was promised to get EOF after the last dataset.
Check out UVA Arena - a software build for UVA solvers @ http://dipu-bd.github.io/UVA-Arena/

Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

Re: 10458 - Cricket Ranking

Post by brianfry713 » Tue Mar 31, 2015 12:10 am

There is always a newline char at the end of the input.
Check input and AC output for thousands of problems on uDebug!

Post Reply

Return to “Volume 104 (10400-10499)”