Problema #1651 GRAF de pe Pbinfo
Cerința
Se dă lista muchiilor unui graf neorientat ponderat....
Computers and Technology, 21.01.2021 14:00, queenbb3787
Problema #1651 GRAF de pe Pbinfo
Cerința
Se dă lista muchiilor unui graf neorientat ponderat. Să se determine vârful pentru care media aritmetică a ponderilor muchiilor incidente este minimă. Dacă există mai multe vârfuri cu aceeași medie minimă, se va afișa vârful numerotat cu o valoare mai mică.
Date de intrare
Programul citește de la tastatură numerele n m, reprezentând numărul de vârfuri și numărul de muchii din graf, apoi m triplete i j p, reprezentând muchiile, date prin extremități și pondere.
Date de ieșire
Programul va afișa pe ecran numărul vf, reprezentând vârful determinat.
Restricții și precizări
1 ≤ n ≤ 100
ponderile muchiilor sunt numere naturale nenule mai mici decât 1000
Exemplu
Intrare
5 6
1 2 10
2 3 2
2 5 2
3 5 12
3 4 1
4 5 5
Ieșire
4
Explicație
Mediile ponderilor muchiilor incidente cu vârfurile grafului sunt:
pentru vârful 1 media este 10
pentru vârful 2 media este 4.66667
pentru vârful 3 media este 5
pentru vârful 4 media este 3
pentru vârful 5 media este 6.33333
Astfel media minimă este 3, pentru vârful 4
Answers: 2
Computers and Technology, 22.06.2019 11:00, yentel110306
When building customer relationships through email what should you not do? question 2 options: utilize proper grammar, spelling, and punctuation type in all capital letters use hyperlinks rather than attachments respond to all emails within 24 hours
Answers: 1
Computers and Technology, 22.06.2019 15:10, reycaden
David is in week 3 of his current ashford course and has a paper due by monday night at midnight. he has finished everything but the concluding paragraph. as he boots up his computer to work on it, he sees a flash across the screen and then the screen goes black. he begins to panic as he tries desperately to turn the laptop back on. david should have saved his work on what kind of portable device?
Answers: 2
Computers and Technology, 22.06.2019 22:30, raiapowell
I'll mark brainliest if answered right! with which feature or menu option of a word processing program can you make an image like this? you can get this image using the option of a word processing program.
Answers: 1
Computers and Technology, 23.06.2019 13:30, Gearyjames8
Anetwork security application that prevents access between a private and trusted network and other untrusted networks
Answers: 1
Social Studies, 29.07.2019 13:30
Mathematics, 29.07.2019 13:30
Business, 29.07.2019 13:30