PAT
文章平均质量分 72
fyxz
这个作者很懒,什么都没留下…
展开
-
PAT(甲级)2020年秋季考试
难度排序:2<3<4<1 7-1 Panda and PP Milk (20分) PP milk (盆盆奶)is Pandas' favorite. They would line up to enjoy it as show in the picture. On the other hand, they could drink in peace only if they believe that the amount of PP milk is fairly distribu原创 2022-02-19 10:02:44 · 909 阅读 · 0 评论 -
PAT备考day4+5 排序
排序关键:能sort则sort,如果要模拟别的排序也可以用sort 结构体的使用,vector的使用都挺重要的 打卡记录 : 笔记: 排序 快速排序 归并排序 堆排序 以上时间复杂度均为nlogn 难度主要在于模拟,细节多 字符串(名字)对应排名——可以用哈希表 unordered_map<string,int> 直接将成绩排序,然后通过二分来寻找某同学成绩的位置 round():四舍五入函数 #include <iostream原创 2022-01-18 16:05:34 · 439 阅读 · 0 评论 -
PAT备考day2+day3:高精度与进位制
比较数字的出现次数是否一样可以通过vector先排序,然后直接比较vector的大小,vector支持比较大小 逗号表达式的值是最后一项的值 while(cin>>n>>d,n>>1) 处理读入 都用字符串来读入 sstream:类似于sscanf,对象用于输入一行字符串,以 空格 为分隔符把该行分隔开来 #include <iostream> #include <sstream> while(n--){ ...原创 2022-01-15 15:13:37 · 199 阅读 · 0 评论 -
PAT备考day1——字符串处理(一)
习题: AcWing 1473. A + B 格式 - AcWing AcWing 1477. 拼写正确 - AcWing AcWing 1478. 签到与签出 - AcWing AcWing 1519. 密码 - AcWing AcWing 1520. 男孩 vs 女孩 - AcWing AcWing 1534. 字符串减法 - AcWing AcWing 1557. 说话方式 - AcWing 总结:字符串主要靠细心,但确实cpp中的string十分好用,以前用c的时候只能是使用char原创 2022-01-09 22:20:59 · 389 阅读 · 0 评论