UVa 10138 CDVII

The forum to report every bug you find or tell us what you'd like to find in UVa OJ

Moderator: Board moderators

Post Reply
metaphysis
Experienced poster
Posts: 139
Joined: Wed May 18, 2011 3:04 pm

UVa 10138 CDVII

Post by metaphysis » Tue May 24, 2011 3:53 am

I wander if the judge data contains line like this or not.

test 01:01:02:02 Enter 19
test 01:01:04:06 ExiT 19

because I use a string variable to represent the status of vehicle,
when I test the status of car, I use:

status == "enter" or status == "exit"

and I got Wrong Answer a lots of times. so I switch to another way:

status[1] == 'n' or status[1] == 'x'

and I got AC!

haidora1
New poster
Posts: 1
Joined: Mon Oct 29, 2012 9:32 pm

Re: UVa 10138 CDVII

Post by haidora1 » Tue Oct 30, 2012 1:05 pm

for those having troubles with finding the correct pairings :
for each vehicle , sort the events (enter or exit) by increasing time
for each vehicle :
for each enter event i , see if the event IMMEDIATELY after it(i + 1) is exit , then pair event i to even (i + 1)

jamesjogi08
New poster
Posts: 2
Joined: Thu Apr 09, 2015 7:15 am

Re: UVa 10138 CDVII

Post by jamesjogi08 » Thu Apr 09, 2015 7:40 am

I've submitted other problems as well after this, and all other problems are judged but not 702.
*Signature*

Post Reply

Return to “Bugs and suggestions”