subject

Doi prieteni se afla pe axa Ox, in puncte cu coordonate întregi. Primul se află în punctul x1 = a, iar al doilea se află în punctul x2 = b. Fiecare se poate mișca cu o poziție, la stânga sau la dreapta, de un număr nelimitat de ori. Când se mișcă, oboseala se modifică după următoarea regulă: la prima mișcare oboseala crește cu 1, la a doua mișcare oboseala crește cu 2, la a treia cu 3 și asa mai departe. De exemplu, dacă un prieten se mișcă mai întâi la stânga, apoi la dreapta, și apoi iar la stânga, oboseala lui devine 1 + 2 + 3 = 6. Prietenii vor să se întâlnească într-un punct cu coordonata număr întreg. Aflați oboseala totală minimă pe care cei doi cei doi o vor acumula.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 09:50
Assume that you have an sorted array of records. assume that the length of the array (n) is known. give two different methods to search for a specific value in this array. you can use english or pseudo-code for your algorithm. what is the time complexity for each algorithm and why?
Answers: 1
question
Computers and Technology, 22.06.2019 17:50
Farah works in an office with two other employees. all three share a printer and an internet connection. the utility that makes this possible is defragger quicktime soho winzip
Answers: 1
question
Computers and Technology, 22.06.2019 21:30
This graph compares the total cost of attending educational institutions in texas. the graph demonstrates that the cost at private and public technical schools greatly varies.
Answers: 2
question
Computers and Technology, 23.06.2019 10:00
How do i delete my account on this because i didn't read this agreements and also i put age at xd
Answers: 1
You know the right answer?
Doi prieteni se afla pe axa Ox, in puncte cu coordonate întregi. Primul se află în punctul x1 = a, i...
Questions
question
Mathematics, 21.03.2021 03:30
question
Mathematics, 21.03.2021 03:30
question
Mathematics, 21.03.2021 03:30