Блог пользователя goatgm03

Автор goatgm03, история, 3 года назад, По-английски

EDIT: NVM I fixed it guys. Sorry for the inconvenience. The problem with my submission was that I forgot to print a colon before each test case.

Hi guys. I realised that Facebook hacker cup 2021 qualification round is coming soon, so I decided to practice using past year problems. I started with the 2020 qualification round. I finished solving problem A: Travel Restrictions. I followed the instructions from facebook's hacker cup team. I downloaded the input file and printed the output to an output file named output.txt. Then I uploaded the output and my source code to the grading server but an error message appeared, saying "Oops, an error occurred on our end while processing your submission. Please try again."

Does anyone know how to fix this. Please help, I really want to verify whether my solution is right. Thanks.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +1
  • Проголосовать: не нравится

Автор goatgm03, история, 4 года назад, По-английски

Hi guys. I finished solving this problem yesterday and for some reason I am getting runtime error ron test 2. Does anyone know why this is the case? My solution basically uses the same principle as the editorial. Basically, I sorted the positions of miners and positions of the mines in ascending order. Then I matched each miner on the y-axis with the mine on the x-axis with the same array index. For example miner[1] with mine[1],miner[2] with mine[2 and so on. Then I got the euclidian distance between the two points which in this problem is stated to be the energy needed for the miner to travel to his mine.

Afterwards, I summed all the energies of each miner to find the minimum total energy for each test case.

Here is my solution. 117154208

Полный текст и комментарии »

  • Проголосовать: нравится
  • -8
  • Проголосовать: не нравится