
浙软
文章平均质量分 86
负反馈循环
这个作者很懒,什么都没留下…
展开
-
浙江大学软件学院 2020 年保研机考 7-4 Shopping With Coupons (C++)
There are NNN items on your shopping list, and you have NNN kinds of coupon that can save you some money on buying any of these items. At the mean time, you have DDD dollars in your pocket. How can you buy as many items as you can? Here you may use any cou原创 2021-09-19 20:24:14 · 483 阅读 · 0 评论 -
浙江大学软件学院 2020 年保研机考 7-3 Partial School Ranking (C++)
In a Group Programming Contest, each university is supposed to send n students who must compete independently. The universities are ranked according to the total score of their students. Your job is to generate the ranklist.It sounds like a simple problem原创 2021-09-19 20:16:33 · 358 阅读 · 0 评论 -
浙江大学软件学院 2020 年保研机考 7-1 Standard Form of Polynomial (C++)
The standard form of a polynomial of degree nnn is P(x)=anxn+an−1xn−1+⋯+a1x+a0P(x)=a_nx_n+a_{n−1}x_{n−1}+⋯+a_1x+a_0P(x)=anxn+an−1xn−1+⋯+a1x+a0. Given that an=1a_n=1an=1 and all the nnn roots r1,...,rn{ r_1, ..., r_n}r1,...,rn of P(x)P(x)P(x) are i原创 2021-09-19 20:11:31 · 375 阅读 · 0 评论 -
浙江大学计算机与软件学院 2019 年保研机考 7-4 Index of Popularity (C++)
The index of popularity (IP) of someone in his/her circle of friends is defined to be the number of friends he/she has in that circle. Now you are supposed to list the members in any given friend circle with top 3 IP’s.Input Specification:Each input file原创 2021-09-19 20:06:08 · 178 阅读 · 0 评论 -
浙江大学计算机与软件学院 2019 年保研机考 7-3 Is It An AVL Tree (C++)
In computer science, an AVL tree (Georgy Adelson-Velsky and Evgenii Landis’ tree, named after the inventors) is a self-balancing binary search tree. It was the first such data structure to be invented. In an AVL tree, the heights of the two child subtrees原创 2021-09-19 20:03:02 · 215 阅读 · 0 评论 -
浙江大学计算机与软件学院 2019 年保研机考 7-2 Zigzag Sequence (C++)
This time your job is to output a sequence of NNN positive integers in a zigzag format with width MMM in non-decreasing order. A zigzag format is to fill in the first row with MMM numbers from left to right, then the second row from right to left, and so o原创 2021-09-19 20:00:28 · 212 阅读 · 0 评论 -
浙江大学计算机与软件学院 2019 年保研机考 7-1 Happy Numbers (C++)
A happy number is defined by the following process: Starting with any positive integer, replace the number by the sum of the squares of its digits in base-ten, and repeat the process until the number either equals 1 (where it will stay), or it loops endles原创 2021-09-19 19:55:54 · 198 阅读 · 0 评论