2023 Huawei OD Machine Test Paper C [Open Source Project Popularity List] C Language Implementation

Table of contents

topic

Ideas

Code


topic

An open source community hopes to make a list of recently popular open source projects and recommend them to developers in the community. For each open source project, developers can follow (watch), collect (star), Fork, raise an issue, submit a merge request (MR), etc. The database counts the number of followers, collections, forks, issues, and MRs of each open source project. The popularity of open source projects is sorted according to the weighted sum of these five dimensions.
H = W(watch) x #watch + W(star) x #star + W(fork) x #fork + W(issue) x #issue + W(mr) x #mr
H represents the heat value
W(watch), W(star), W(fork), W(issue) and W(mr) represent 5 respectively The weight of statistical dimensions.

#watch, #star, #fork, #issue, and #mr respectively represent the statistical values ​​of 5 statistical dimensions
The list is sorted in ascending order of popularity value. For equal popularity values , sorted in lexicographic order (a, b, c...x, y, z) after the project names are converted to all lowercase letters.


Input description
The input in the first line is N, indicating the number of open source projects, 0 < N <100.
The second line of input is a list of weight values, a total of 5 integer values, corresponding to follow, favorite, fork, issue, M

Guess you like

Origin blog.csdn.net/misayaaaaa/article/details/134757232