PAT B1020 解决思路 :贪心法,每次选取单价最高的月饼. 先上一个自己错误的解法 #include <cstdio> #include <algorithm> using namespace std; double num[1010]; double price[1005]; double ans = 0; int main() { int n, d; scanf("%d%d", &n, &d); for (int i = 0; i &l…
题目AC汇总 甲级AC PAT A1001 A+B Format (20 分) PAT A1002 A+B for Polynomials(25) PAT A1005 Spell It Right (20) PAT A1006 Sign In and Sign Out (25) PAT A1009 Product of Polynomials(25) PAT A1011 World Cup Betting(20) PAT A1012 Best Rank(25) PAT A1016 Phone B…
原题连接:https://pta.patest.cn/pta/test/16/exam/4/question/677 题目如下: The ranklist of PAT is generated from the status list, which shows the scores of the submissions. This time you are supposed to generate the ranklist for PAT. Input Specification: Each…