12 2021 档案
摘要:原题 上图是用某科学研究中采集的数据绘制成的折线图,其中红色横线表示正常数据的阈值(在此图中阈值是 25)。你的任务就是把超出阈值的非正常数据所在的区间找出来。例如上图中横轴 [3, 5] 区间中的 3 个数据点超标,横轴上点 9 (可以表示为区间 [9, 9])对应的数据点也超标。 输入格式: 输
阅读全文
摘要:原题 https://pintia.cn/problem-sets/994805260223102976/problems/994805275792359424 思路 1.刚开始我想的是两个循环。超时 2.发现每个数列相加的总个数是有规律的。比如0.1 0.2 0.3 0.4——》4*1次 3*2次
阅读全文
摘要:原题 https://pintia.cn/problem-sets/994805260223102976/problems/1038429484026175488 知识点 1、map和unordered_map的使用 https://blog.csdn.net/qq_21997625/article
阅读全文
摘要:原题 https://pintia.cn/problem-sets/994805260223102976/problems/1071786104348536832 知识点 之前没用过<unordered_map>抄答案都有点费劲。https://blog.csdn.net/weixin_450038
阅读全文
摘要:原题 https://pintia.cn/problem-sets/994805260223102976/problems/1071785884776722432 代码 #include <iostream> #include <string> using namespace std; int re
阅读全文
摘要:原题 https://pintia.cn/problem-sets/994805260223102976/problems/1071785779399028736 代码 #include <iostream> using namespace std; int result[1000]={0}; in
阅读全文
摘要:原题 https://pintia.cn/problem-sets/994805260223102976/problems/1071785664454127616 代码 #include <iostream> #include <algorithm> using namespace std; int
阅读全文
摘要:原题 https://pintia.cn/problem-sets/994805260223102976/problems/994805278589960192 思路 主元比它前面的所有数都要大,比它后面的所有数都要小。 那么只要跟它前面的最大值和后面的最小值比,随着判断主元位置的移动,最大值和最小
阅读全文
摘要:原题 https://pintia.cn/problem-sets/994805260223102976/problems/994805286714327040 思路 前面看的柳大佬的,伤脑筋,我以为要会插入排序和归并排序才能做出来,其实不用,了解原理就可以了。 说一下我与大佬稍微不同的地方。对归并
阅读全文
摘要:原题 https://pintia.cn/problem-sets/994805260223102976/problems/994805287624491008 思路 注意点: 1、浮点错误——只要是除就有除0的情况。 2、判断正负 代码 抄的柳大佬的 #include <iostream> #in
阅读全文
摘要:原题 https://pintia.cn/problem-sets/994805260223102976/problems/994805288530460672 代码 测试点2考察第1行输入的空白字符串。题目保证第2行输入的文字串非空。,不保证第1行。 从别人哪里看的,太坑了。getline允许st
阅读全文
摘要:原题 https://pintia.cn/problem-sets/994805260223102976/problems/994805289432236032 代码 注意只有一位参赛者的情况, 1 1 2 又因为其所代表的学校的编号(从1开始连续编号),所以令max=result[1] #incl
阅读全文
摘要:原题 https://pintia.cn/problem-sets/994805260223102976/problems/994805290334011392 代码 #include <algorithm> #include <iostream> using namespace std; cons
阅读全文
摘要:原题 https://pintia.cn/problem-sets/994805260223102976/problems/994805291311284224 测试点1 3 1 1 1 1 测试点3 1 1 1 加上这里的测试点介绍https://www.bilibili.com/read/cv1
阅读全文

浙公网安备 33010602011771号