explain me programs

Folyamatban Kiadva: 4 évvel ezelőtt Kiszállításkor fizetve
Folyamatban Kiszállításkor fizetve

here is a source (S) and destination (D) and a spacecraft has to go from S to D. There are N number of wormholes in between

which has following properties:

Each wormhole has an entry and an exit.

Each wormhole is bi-directional i.e. one can enter and exit from any of the ends.

The time to cross the wormhole is given and the space craft may or may not use the wormhole

to reach D.

The time taken to travel outside wormhole between two points (x1, y1) and (x2, y2) is given by a formula

|x1 - x2| + |y1 - y2|

where, (x1, y1) and (x2, y2) are the co-ordinates of two points.

The co-ordinates of S and D are given and we have to find the minimum time to reach D from S.

Note: It’s not mandatory to consider all the wormholes

sample input: source=(0,0), destination(100,100), warmholes=3 .

coordinates are: (1,2),(120,120)

(4,5),(120,100)

(6,8),(150,180)

Sample output=48

C++ Programozás C programozás Java PHP Szoftverarchitektúra

Projektazonosító: #20439136

A projektről

2 ajánlat Távolról teljesíthető projekt Utoljára aktív: 4 évvel ezelőtt

Odaítélve:

SriBhargava

I have solved many problems in hackerrank and I even qualified in Code-vita so I can explain the solutions to your problem with an elaborated explaination.

₹600 INR 3 napon belül
(0 értékelés)
0.0