上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 20 下一页
摘要: 一、vector中的find 注意find不属于vector的成员,而存在于算法中,应加上头文件#include <algorithm> 1 #include <vector> 2 #include <algorithm> 3 #include <iostream> 4 using namespac 阅读全文
posted @ 2020-01-21 23:30 yyer 阅读(320) 评论(0) 推荐(0) 编辑
摘要: 一、安装vim 命令行中输入:sudo apt-get install vim (ps:它会显示让你输入密码,不过你输入的密码不会回显) 查看安装是否成功输入: vim -v 二、配置vim 第一步:在终端创建.vimrc文件命令为: $vi ~/.vimrc (ps:表示手动设置一个配置文件 :v 阅读全文
posted @ 2020-01-21 19:50 yyer 阅读(13148) 评论(1) 推荐(1) 编辑
摘要: 1060 爱丁顿数 (25分) https://pintia.cn/problem-sets/994805260223102976/problems/994805269312159744 1 #include <iostream> 2 #include <cmath> 3 #include <alg 阅读全文
posted @ 2020-01-20 20:07 yyer 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 算法实现: #include <iostream> using namespace std; int divisor(int a,int b); int ndivisor(int *a,int n); int multiple(int a,int b); int nmultiple(int *a,i 阅读全文
posted @ 2020-01-20 18:47 yyer 阅读(1932) 评论(0) 推荐(0) 编辑
摘要: 1062 最简分数 (20分) https://pintia.cn/problem-sets/994805260223102976/problems/994805268334886912 第一次提交:测试点1没过 测试点1的问题在于题目的输入的两个分数,没有说一定前面的比后面的小,所以在前面做了个判 阅读全文
posted @ 2020-01-20 18:44 yyer 阅读(307) 评论(0) 推荐(0) 编辑
摘要: 1065 单身狗 (25分) https://pintia.cn/problem-sets/994805260223102976/problems/994805266942377984 解题思路:一开始只使用map<int, int> comp和vector<int> vec;comp用来存储每一对 阅读全文
posted @ 2020-01-19 19:58 yyer 阅读(463) 评论(0) 推荐(0) 编辑
摘要: 1067 试密码 (20分) https://pintia.cn/problem-sets/994805260223102976/problems/994805266007048192 第一次:测试点四没过 测试点4是一个特殊情况,就是题目的这句描述:如果是错误的,则在一行中按格式输出 Wrong 阅读全文
posted @ 2020-01-19 18:46 yyer 阅读(329) 评论(0) 推荐(0) 编辑
摘要: 1068 万绿丛中一点红 (20分) https://pintia.cn/problem-sets/994805260223102976/problems/994805265579229184 题目思路: 题目给定N*M个数字,要求找出只出现一次的数字,并且这个数字的相邻的数字都和他的差值必须大于给 阅读全文
posted @ 2020-01-19 17:48 yyer 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 1069 微博转发抽奖 (20分) https://pintia.cn/problem-sets/994805260223102976/problems/994805265159798784 1、使用vector来保存输入的用户名。 2、使用map来进行筛选,记录用户是否已经中奖。 1 #inclu 阅读全文
posted @ 2020-01-18 23:43 yyer 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 1072 开学寄语 (20分) https://pintia.cn/problem-sets/994805260223102976/problems/994805263964422144 第一次:格式错误 第二次:AC 两种方法: 1 #include <iostream> 2 #include < 阅读全文
posted @ 2020-01-18 20:04 yyer 阅读(176) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 20 下一页