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
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 14:40
You begin your first day of responsibilities by examining the recent is security breach at gearup to get ideas for safeguards you will take. at gearup, criminals accessed the company's improperly-secured wireless system and stole customers' credit card information as well as employee social security numbers. what kind of computer crime did gearup face?
Answers: 3
Computers and Technology, 23.06.2019 16:30
20 points archie wants to use a reflector as he photographs a newlywed couple. what would he consider in his choice? a. shadow and sunny b. homemade and professional c. lamps and boards d. incident and reflected e. neutral density and enhancement
Answers: 3
Mathematics, 17.09.2020 14:01
Mathematics, 17.09.2020 14:01
Mathematics, 17.09.2020 14:01
Mathematics, 17.09.2020 14:01
Computers and Technology, 17.09.2020 14:01
Mathematics, 17.09.2020 14:01
Mathematics, 17.09.2020 14:01
Mathematics, 17.09.2020 14:01
Mathematics, 17.09.2020 14:01
Mathematics, 17.09.2020 14:01
Social Studies, 17.09.2020 14:01
Arts, 17.09.2020 14:01
Chemistry, 17.09.2020 14:01
Mathematics, 17.09.2020 14:01
Mathematics, 17.09.2020 14:01
Physics, 17.09.2020 14:01
Social Studies, 17.09.2020 14:01
Physics, 17.09.2020 14:01
Mathematics, 17.09.2020 14:01
Mathematics, 17.09.2020 14:01