158 - Calendar

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

Moderator: Board moderators

wyvmak
Experienced poster
Posts: 110
Joined: Thu Dec 13, 2001 2:00 am

Post by wyvmak » Mon Feb 04, 2002 4:14 am

i wanna clarify, is order of display
1. sort by day, regardless of importance
2. if same day, sort by importance
3. lastly, but order appear in input, if (1) & (2) fail
4. if number of stars to be displayed=0, not display

Even
Learning poster
Posts: 75
Joined: Thu Nov 22, 2001 2:00 am
Location: Taiwan

Post by Even » Mon Feb 04, 2002 9:03 am

Just STABLE sort by STARS...

rascle
New poster
Posts: 20
Joined: Wed Mar 06, 2002 2:00 am

158 - Calendar

Post by rascle » Sat Jul 13, 2002 9:30 am

Can anybody tell me what is the order ?
Shoule I order the anniversaries by stars, date and then input stream,or
order them by date, stars and the input stream ?
And if one anniversary has zero star after count,shoule I add it into output?

rascle
New poster
Posts: 20
Joined: Wed Mar 06, 2002 2:00 am

Post by rascle » Fri Jul 19, 2002 7:07 am

I have tried problem 158 more than ten days.....

I think my code can produce correct answers...

But I still get WA..WA...more than fifty times...


*****************
Is there any special case ?

Please help me to solve the problem...

dh3014
New poster
Posts: 24
Joined: Tue Mar 26, 2002 2:00 am
Location: Taiwan
Contact:

Post by dh3014 » Fri Jul 19, 2002 2:28 pm

Notice the sorting order(STAR FIRST!!), and there's one tricky input is the schedule may be in two different years!!

rascle
New poster
Posts: 20
Joined: Wed Mar 06, 2002 2:00 am

Post by rascle » Fri Jul 19, 2002 2:54 pm

Excuse me..

The problem says ...

"If several events are scheduled for the same day, order them by
relative importance (number of stars)."

Does not it mean that the order is date,star,then input stream..??

I have see you suggestion in bbs:\\ofo.twbbs.org
And I tried star, date then input stream,but still WA.....

I really don't know what's wrong...

yiuyuho
A great helper
Posts: 325
Joined: Thu Feb 21, 2002 2:00 am
Location: United States
Contact:

Post by yiuyuho » Mon Jan 13, 2003 4:12 am

one tricky input is the schedule may be in two different years!!
how? how can I tell which year a date lies on?

yiuyuho
A great helper
Posts: 325
Joined: Thu Feb 21, 2002 2:00 am
Location: United States
Contact:

158 Calendar

Post by yiuyuho » Tue Jan 14, 2003 7:34 pm

Is there any trick or unclear points on this problem?

Thanks

yiuyuho
A great helper
Posts: 325
Joined: Thu Feb 21, 2002 2:00 am
Location: United States
Contact:

Furthermore

Post by yiuyuho » Tue Jan 14, 2003 8:41 pm

So, we need to order the anniversaries by day of year in acsending order, importances in decending order and input appearence in acsending order?

yiuyuho
A great helper
Posts: 325
Joined: Thu Feb 21, 2002 2:00 am
Location: United States
Contact:

Post by yiuyuho » Thu Jan 16, 2003 7:53 pm

Alright, can soeone give me some test data for this problem please?

yiuyuho
A great helper
Posts: 325
Joined: Thu Feb 21, 2002 2:00 am
Location: United States
Contact:

Post by yiuyuho » Fri Jan 17, 2003 12:37 am

Will there be events that lieing over several days? Or will there be events of the same name? If so, do we need to output both of the event?

What's the output to:
1980
A 3 1 7 1-3-7
A 2 1 7 1-3-7
D 1 1
#


????????

yiuyuho
A great helper
Posts: 325
Joined: Thu Feb 21, 2002 2:00 am
Location: United States
Contact:

Post by yiuyuho » Mon Jan 20, 2003 12:29 am

Alright, let's get this straight:

1. read year
2. Read in anniversaries
3. read dates

output:
1. all anniversaries that happen today, order by input stream (not importance!)
2. Then, all other anniversaries that has a number of display stars > 0, order them first by decending number of stars, then ascending number of days apart if the stars are the same.
3. Keep in mind that anniversaries wraps around years.

That may not sound like what the problem what, but that's it!. Try it and you will know

j0rdi
New poster
Posts: 6
Joined: Sun May 04, 2003 10:52 am

WA in problem 158(Calendar)

Post by j0rdi » Sun May 04, 2003 10:59 am

I have tried my solution program with the original test, and i have the correct result. Also i have tried with other tests and i see the correct results..but the Judge replied me Wrong Answer (and say that my program was only running during 0:00:02 seconds.

I think that my solution is correct but the Judge says WA all time. Someone can help me: give me tests, or known if is necessary to control that the input format is correct

It's Urgentt!!!!!!

j0rdi
New poster
Posts: 6
Joined: Sun May 04, 2003 10:52 am

Post by j0rdi » Sun May 04, 2003 7:28 pm

noboy can help me with the program 158 (Calendar)

Adil
Learning poster
Posts: 57
Joined: Sun Sep 29, 2002 12:00 pm
Location: in front of the monitor :-)
Contact:

Post by Adil » Sun May 04, 2003 9:42 pm

hello.

this thread should help you.
http://acm.uva.es/board/viewtopic.php?t ... hlight=158

there's a search option on the board. it should help.

Post Reply

Return to “Volume 1 (100-199)”