1859 - Parts Acquisition

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.
Post Reply
User avatar
ymondelo20
Posts: 1968
Joined: 9 years ago
Location: Universidad de las Ciencias Informáticas
Gender: None specified
Contact:

1859 - Parts Acquisition

Post by ymondelo20 » 8 years ago



"Every problem has a simple, fast and wrong solution" OJ's Main Law. ;)

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

Re: 1859 - Parts Acquisition

Post by ymondelo20 » 8 years ago

The tests 4 and 6 was updated (fixed), provided this "For an unexplained question (we think may be related to fuel economy) cows, always prefer to trade on the planets of lower index.". All submissions was retested.
"Every problem has a simple, fast and wrong solution" OJ's Main Law. ;)

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

Re: 1859 - Parts Acquisition

Post by ymondelo20 » 8 years ago

For example, the input:
10 7
1 3
1 4
4 7
5 7
2 7
3 7
1 2
1 6
6 5
3 2
Should generate the output:
3
1
2
7
Not the input:
3
1
3
7
Or the input:
3
1
4
7
And never, the input:
4
1
6
5
7

:)
"Every problem has a simple, fast and wrong solution" OJ's Main Law. ;)

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

Re: 1859 - Parts Acquisition

Post by ymondelo20 » 8 years ago

Statement Update: "For an unexplained question (we think may be related to fuel economy) cows, always prefer to trade items of lower index (they are presumably lighter)."
"Every problem has a simple, fast and wrong solution" OJ's Main Law. ;)

User avatar
Phantom
Posts: 58
Joined: 8 years ago
Location: Cuba
Gender: None specified

Re: 1859 - Parts Acquisition

Post by Phantom » 8 years ago

Thank you very very much!!

Post Reply

Return to “Problem set”