ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1100. Final Standings

How to do this problem?
Posted by Li, Yi 27 Sep 2001 19:35
Re: How to do this problem?
Posted by Tran Nam Trung (trungduck@yahoo.com) 27 Sep 2001 20:30
>
Sort using "basket" !
mailto : trungduck@yahoo.com
Re: How to do this problem?
Posted by Li, Yi 28 Sep 2001 14:59
I'm afraid I can't understand.
Say more, OK?

> >
> Sort using "basket" !

> mailto : trungduck@yahoo.com
Re: How to do this problem?
Posted by platypus 29 Sep 2001 15:19
There is no need to use sorting. (I don't know what
is "basket" - maybe the same as I mean.) You can just read
all the teams` info and remember every team in the dynamic
array [1..100] some way. Then u can from n downto 1 print
all the teams.
I'm realising this algorythm but still have mistakes. ;)

> I'm afraid I can't understand.
> Say more, OK?
>
> > >
> > Sort using "basket" !
>
> > mailto : trungduck@yahoo.com
Re: How to do this problem?
Posted by Tran Nam Trung (trungduck@yahoo.com) 29 Sep 2001 15:58
How do you remember every team in dynamic array[1..100] ?
It haven't got enough memory. I needn't remember that, I
just remember id and score of each team and go from 100
downto 0 to print all team at that score. It's sorting
using basket.
mailto : trungduck@yahoo.com

> There is no need to use sorting. (I don't know what
> is "basket" - maybe the same as I mean.) You can just
read
> all the teams` info and remember every team in the
dynamic
> array [1..100] some way. Then u can from n downto 1 print
> all the teams.
> I'm realising this algorythm but still have mistakes. ;)
>
> > I'm afraid I can't understand.
> > Say more, OK?
> >
> > > >
> > > Sort using "basket" !
> >
> > > mailto : trungduck@yahoo.com
>
u can use bubble sort or quicksort
Posted by Dinh Quang Hiep (mg9h@yahoo.com) 29 Sep 2001 23:52
with the array B[i] of longint defined that
B[i] = M[i] * 10000000 + ID[i] - 1
then sort the B[i]
for i = 1 to N
  print (B[i] mod 10000000 + 1) ' ' B[i] div 10000000

QH@
Re: How to do this problem?
Posted by platypus 6 Oct 2001 19:39
> Yeah, you're right. Array[0..100]... and we save the
teams' ID-s and after that from 100 to 0 print all teams
and scores. I just didn't know the name of this algorythm -
it was just what appeared in my mind first.

How do you remember every team in dynamic array[1..100] ?
> It haven't got enough memory. I needn't remember that, I
> just remember id and score of each team and go from 100
> downto 0 to print all team at that score. It's sorting
> using basket.
> mailto : trungduck@yahoo.com
>
> > There is no need to use sorting. (I don't know what
> > is "basket" - maybe the same as I mean.) You can just
> read
> > all the teams` info and remember every team in the
> dynamic
> > array [1..100] some way. Then u can from n downto 1
print
> > all the teams.
> > I'm realising this algorythm but still have mistakes. ;)
> >
> > > I'm afraid I can't understand.
> > > Say more, OK?
> > >
> > > > >
> > > > Sort using "basket" !
> > >
> > > > mailto : trungduck@yahoo.com
> >
You method is absolutely wrong.
Posted by Huang Yizheng 1 Nov 2001 18:02
> with the array B[i] of longint defined that
> B[i] = M[i] * 10000000 + ID[i] - 1
> then sort the B[i]
> for i = 1 to N
>   print (B[i] mod 10000000 + 1) ' ' B[i] div 10000000
>
> QH@
Wrong!For the problem didn't request that when two teams
have the same M value,the team with the larger ID must be
put to forward.The problem means if two teams have the same
M value,the position of them must according to their
original position before bubble sort is performed.
Re: How to do this problem?
Posted by MadPsyentist/Sam 15 Jan 2002 16:43
> How do you remember every team in dynamic array[1..100] ?

My idea is using linked list. But you'll get memory limit exceed anyway
due to memory comsumpion of the additional pointers , "if you don't
think more".