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!