Defribillators puzzle discussion


The formula given is the correct one for calculating distances when moving across the surface of a sphere. Try the Pythagorean Theorem in Antarctica and you’re probably going to die.


Not sure why there’s soo much math involved? in the real world these calculations are given to you? I spent alot of time on the math and less on the coding concept for this exercise


Description of this is wrong.
Section Game Input > first line is latitude - not longitude :frowning:


Je réponds un peu tard mais ce puzzle m’a bien saoulé :smile:

En fait les identifiants des défibrilateurs ne me servent pas comme index de ma liste donc je ne pense pas que le problème vient de là.

J’ai essayé de submit ma solution et j’arrive a 75% car le complete file 2 ne passe par car j’aurais hard codé une solution mais je vois pas comment. Le seul truc que j’ai “hard codé” c’est un tableau de label

  string lab[]={"ID","Name","Address","Phone","Lon","Lat"};
  vector<string> labels(begin(lab),end(lab));

ça serait vraiment ça qui me fait pas passer le test ? Si c’est pas ça je me contenterai des 75% :wink:


Bon en fait j’ai viré mon tableau de labels et j’ai accédé aux valeurs des champs par leur index numérique et ça a marché. :smile:


Java default code throws exception… any help?


Hi, is it just me or the second test case returns a broken list of strings? I tried in both c++ and python and the list is broken at the 21st entry and resumes at the 154 with a couple of broken lines in between…


The console output has a limit of characters, so if you print the whole list, it will be automatically truncated.


Hi all,

I don’t understand why my code not passed the first validator : “Single possibility”. :thinking:
@ _CG_Thibaud can you send the validator result please?


“Single possibility” means there is only 1 defibrillator given in input :wink:


@_CG_Thibaud thanks for the answer. I already had tested this hypothesis and it work on IDE, so i’m blocked…:disappointed_relieved:


That’s weird. I sent you the validator in MP.


Solved! :relieved:
I had used a condition too much restrictive for the distance between the two point… :upside_down_face:


Dows anyone else have problem with strsep()? I get a segmentation fault when i substitute strtok() with strsep() but strtok() is not usable in this case since it cant handle empty tokens. Please help!


Hi, I’m having a problem here, since my code is working perfectly well on Visual Studio when I run it with an input file containing the infos, but failed to pass the tests except one (the second) in the Coding Game Code Editor.
I really don’t get it, so if someone has an idea or want to have a look at my code it would be really nice.

Thank you


Hello, I have the same problem as @Upcy. All tests are validated, but when I submit it, I only get 75 % sucess… I tried different solutions, checked a few things, but no way to have the “single possibility” validated…


The “Single Possibility” test only gives you one defibrillator in input.


Thanks for your share and it helps me solve my problem well


Hi, I don’t get it. Only 3 tests works on 4, including the “big file” test, only the 3rd test doesn’t work.
### Échec
Trouvé :
Caisse d’assurance retraite et de la…
Attendu :
Caisse Primaire d’Assurance Maladie

Any idea ?


I met the similar situation in the test 03, but my result is CRR.
But when I submit it, I got an 100%…