1571 - Bus System

Discussion around the problems of the COJ.
Forum rules
Remember that posting AC code is not allowed here. If you are going to ask a question or to post a solution, describe your algorithm instead. Posting AC code will be penalized.
User avatar
xshaka
Posts: 10
Joined: 7 years ago
Gender: None specified

Re: 1571 - Bus System

Post by xshaka » 7 years ago

Hi, still not reviewing the whole code, but I think you're missing a statement from the problem:

"If two or more groups arrive at the same time, they will break ties according to the group size: smaller groups will get in before larger groups".

Can't see how are you taking care about that exactly.



User avatar
ReynaldoGil
Posts: 38
Joined: 7 years ago
Location: Santiago de Cuba
Gender: None specified

Re: 1571 - Bus System

Post by ReynaldoGil » 7 years ago

The comparing function between groups asures that...

Code: Select all

bool operator<(const group& a, const group& b)
{
   if(a.arrival!=b.arrival)return a.arrival<b.arrival;
   return a.size<b.size;
}
Thanks...

User avatar
xshaka
Posts: 10
Joined: 7 years ago
Gender: None specified

Re: 1571 - Bus System

Post by xshaka » 7 years ago

I don't actually get the idea behind your simulation code, i will try to find a small test case where our results differ and will see which one is correct. You will be notified about the test case by this way.

User avatar
ReynaldoGil
Posts: 38
Joined: 7 years ago
Location: Santiago de Cuba
Gender: None specified

Re: 1571 - Bus System

Post by ReynaldoGil » 7 years ago

hmmm, I'm still waiting for your response, I know maybe you have no time for this, so just sending me the test cases wouldn't be so harmful after 2 months waiting, BTW why the coj-forum server had been down for so long?
Thank you xshaka

User avatar
xshaka
Posts: 10
Joined: 7 years ago
Gender: None specified

1571 - Bus System

Post by xshaka » 7 years ago

The statement of this task has been updated to fix non-clear situations and consecuently the tests have changed. We sorry about all problems this may cause.

User avatar
ReynaldoGil
Posts: 38
Joined: 7 years ago
Location: Santiago de Cuba
Gender: None specified

Re: 1571 - Bus System

Post by ReynaldoGil » 7 years ago

xshaka wrote:The statement of this task has been updated to fix non-clear situations and consecuently the tests have changed. We sorry about all problems this may cause.
Well, we improved a lot since that update, but still I get WA on case 16, so any help on this would be appreciated...

User avatar
xshaka
Posts: 10
Joined: 7 years ago
Gender: None specified

Re: 1571 - Bus System

Post by xshaka » 7 years ago

There should be something wrong on with the system because as long as I remember, there is no case 16 in the test data. Will check that as soon as possible.

User avatar
ReynaldoGil
Posts: 38
Joined: 7 years ago
Location: Santiago de Cuba
Gender: None specified

Re: 1571 - Bus System

Post by ReynaldoGil » 7 years ago

xshaka wrote:There should be something wrong on with the system because as long as I remember, there is no case 16 in the test data. Will check that as soon as possible.
Hey, sorry for reposting, but have you checked it already??? thx

User avatar
xshaka
Posts: 10
Joined: 7 years ago
Gender: None specified

Re: 1571 - Bus System

Post by xshaka » 7 years ago

Still waiting for reply from system managers. When got it, I´ll post it here.

User avatar
ymondelo20
Posts: 1968
Joined: 7 years ago
Location: Universidad de las Ciencias Informáticas
Gender: None specified
Contact:

Re: 1571 - Bus System

Post by ymondelo20 » 7 years ago

There should be only 15 test data on the Judge...
I will look for that. Are you updated some test data recently?
"Every problem has a simple, fast and wrong solution" OJ's Main Law. ;)

Post Reply

Return to “Problem set”