[Community Puzzle] Personal Best

Coding Games and Programming Challenges to Code Better

Send your feedback or ask for help here!

Created by @dangerworm,validated by @Nagato_Uzumaki,@kayzero and @PiMastah.
If you have any issues, feel free to ping them.

I forgot to parse the scores as floats and ended up just comparing them alphabetically, but still managed to get 100%

Kinda minor, but would probably be better if the test cases didn’t allow that

3 Likes

Hi, I am passing all the test cases but when I submit I fail the final test (Multiple Gymnasts, Multiple Categories, Multiple Competitions). Any clue where my bug can be? Must be some edge case that I am missing.

Like in a previous comment, I parsed initially as text (with the same result) but as part of my debugging process I have now changed it so that I parse as float and in the end I convert to integer to output right amount of digits in the string.

I use Python
Thanks

SOLVED - Found my own bug!
Nice puzzle Thanks

thanks for the awesome information.

Hi,
Cannot pass this puzzle last validator in C++ to get 100% ? All other validators are OK. Has anyone faced the same problem ?
Thanks in advance

bad wording in the first output example

I’ve just revised the wording of the example shown in Output section. Hope that helps you better understand the output requirement.

Hi, I’ve tried to solve this exercise and the last two tests seem to have some issues.

  • Multiple Gymnasts, Single Category… the code I’ve submitted fails with
    Failure
    Found:
    Nothing
    although there is a floating point number printed on the Standard Output Stream. Also the expected floating point nr seems wrong. I’ve looked on the input and that is not the right number.

  • Multiple Gymnasts, Multiple Categories, here the expected output also seems wrong. It should be the maximum of the two categories, so did the input of this exercise change but not the expected output?

Thanks

For both cases, would you please show your detailed calculation and your output for our reference?

Sure.
I keep the maximum values in a map of categories. Whenever I read a line with values for a new gymnast, I update this map, holding only max values.
At the end I iterate over the categories given as input and get the max value from the above map.

For test “Multiple Gymnasts, Single Category, Multiple Competitions”, the program outputs 9.72. Test fails with nothing found and expected 8.1.
The input row “Laurie Hernandez,9.57,9.72,8.65” has the max value 9.72 for beam category so I’m not sure where the expected 8.1 comes from.

For test “Multiple Gymnasts, Multiple Category, Multiple Competitions”, the program outputs 9.7,9.5. Test fails because it expects 9.02,9.5.
The input row “Nikolai Andrianov,7.95,9.7,9” has max value 9.7 for beam. Again expected value 9.02 doesn’t seem to fit.

The names of both tests mention “Multiple Gymnasts”.

For Test 4, you’re expected to output the highest scores not only of Laurie Hernandez, but also of Ragan Smith.

For Test 5, you’re expected to output the highest scores of Boris Shakhlin, Nadia Comaneci and Akinori Nakayama, not of Nikolai Andrianov.

The names of the gymnasts where you have to search the data of are provided in Line 1 of the input - please refer to the description in the Input section:

Line 1: The name of one or more gymnasts for whom to provide a personal best

OK thanks. I misunderstood what I had to do. It’s clear now.

I think it should be mentioned that Line1 (gymnasts) && line2(categories) are comma-separated strings, otherwise solvers can only know this by running test 4 and 5 …

Updated. Thanks for reporting the issue.

1 Like