[Community puzzle] Ticket to Ride: Europe

yes, tests in IDE are different from the validating tests run during submit. However, a pair test-validator should ideally test the same thing.

Here’s the validator “Multiple tickets” you’re failing. It will hopefully help you to find the issue in your code.

16 4 9
0 0 2 1 3 4 3 1 4
3 London Paris
3 Berlin Wein
5 Frankfurt Kobenhavn
5 Athena Angora
3 0 Green Berlin Wein
2 0 Green Frankfurt Essen
3 1 Gray Kobenhavn Essen
1 0 Pink Dieppe Paris
2 1 Gray Athina Smyrna
3 0 Black Frankfurt Berlin
2 0 Blue Berlin Essen
6 2 Gray Smyrna Palermo
3 0 Orange Angora Smyrna

And the output is 21.

Thank you very much for your reply. I had always assumed that the main strategy was to get as many tickets, especially since they give negative points, but this is an example where that is not the case. So I need to rethink my solution.

1 Like

Hello,
I enjoyed the puzzle BUT it is classified as “VERY HARD” and I was given only 50 points for the solution!!
I expected 500 points!
How can one know in advance the points one would get the solve a puzzle?

Hello, why this “VERY HARD” puzzle only gives 50 points for submitting the solution? I expected 500 or 250 points…

It’s not an official puzzle but a community puzzle.

Thank you, Nicola. Is there a way to know in advance which puzzles give the most points?
is there a list of the official (non-community) puzzles for “very-hard”?

Thank you

As a rule of thumb, if the puzzle has no achievements then you will get 50XP for it.

Official very hard→500 points.
Official hard→250 points.
Official medium→100 points.
Community puzzle→50 points.
Official easy→25 points.
Onboarding→5 points.
Some puzzles have an extra achievement. You can get more points in contests when you upgrade in the next league and in the quest map.

Any puzzles that say ‘By playername’ below the title are community puzzles (and worth 50xp). All the others are official puzzles and can be worth more.

Thank you, Yatech!

Thank you, that is a very good way to see it quickly

Thank you Nicola, a great and useful recap: I was not aware before.

Nice problem (and probably nice game also) !

However, it is probably NP-complete (it seems close to a knapsack problem), so it would be nice to have limits better stated (typically max number of cards per color seems to be 6, and actual max number of routes is 20, which is very significantly different from 30), so that the directions in which we should try to optimize are less random (OK, we can simply read the actual test cases instead…).

Note that the “official” solution in the contribution is incorrect, it fails on

10 0 5
5 0 0 0 0 0 0 0 0
4 0 Red A B
1 0 Red A C
1 0 Red A D
1 0 Red A E
1 0 Red A F

I just published a C# solution.
It is faster than all other C# solutions.
About 2x of Djoumns ;-p
About 1.1x of eulerscheZahl

The strategy is very different from the above two solutions, and especially different from eulerscheZahl’s, which might be faster in other scenarios but uses more memory.

Is advertisement encouraged in this forum? :slight_smile:

I assume you can only complete each route once and score it once, but I don’t see that the description says so.

It should have been specified that two cities can be connected by several routes directly