上一页 1 2 3 4 5 6 7 8 ··· 16 下一页
摘要: 1.头文件:#include<cstring> 2. 功能: string s1; s.find(s1); 返回值是s1在母串s中首次出现的下标,若没有找到则会返回一个特殊字符 阅读全文
posted @ 2020-09-27 23:49 miao-xixixi 阅读(236) 评论(0) 推荐(0)
摘要: 1.头文件: #include<cstring> 2. int a;//代表s的下标 string b//代表字符串 s1=s.insert(a,b); 文档中第 a 个字符前面插入字符串 b 阅读全文
posted @ 2020-09-27 23:33 miao-xixixi 阅读(1139) 评论(0) 推荐(0)
摘要: 题目如下: 思路: 1.题目的意思是所有硬币开始是0 最终都要翻转成为1 每次除了一个不翻,其余都要翻; 相当于我们只关注着那个不翻转的就好了 每次不翻转一个,总共有N个,那么要翻转N次 代码如下: #include<cstdio> #include<iostream> #include<cstri 阅读全文
posted @ 2020-09-25 10:58 miao-xixixi 阅读(175) 评论(0) 推荐(0)
摘要: 题目如下: 思路: 1.题目说范围是 1~10^60,这个时候第一反应用long long 但是其实也不行 肯定是用字符串啦,但是判断一个数是偶数,只需要看最后一位就可以了 代码如下: #include<cstdio> #include<iostream> using namespace std; 阅读全文
posted @ 2020-09-25 10:34 miao-xixixi 阅读(157) 评论(0) 推荐(0)
摘要: 题目如下: 思路:合理利用多位数分离 代码如下: #include<cstdio> #include<iostream> using namespace std; int f(int x){ int count=0; while(x!=0){ if(x%10==2) count++; x/=10;/ 阅读全文
posted @ 2020-09-24 23:26 miao-xixixi 阅读(118) 评论(0) 推荐(0)
摘要: 1.问题:使用geline的时候要注意前面上一行不能有数据 如果上一行有数据,那么cin会把数字读取走,而留下‘\n’ 那么getline遇到它的结束符(\n)就不会读取 2.解决:使用 cin.ignore(numeric_limits<std::streamsize>::max(),’\n’); 阅读全文
posted @ 2020-09-24 17:40 miao-xixixi 阅读(364) 评论(0) 推荐(0)
摘要: 代码如下: if(x%400==0||x%100!=0&&x%4==0) 阅读全文
posted @ 2020-09-24 16:58 miao-xixixi 阅读(118) 评论(0) 推荐(0)
摘要: 解决方法: 1. 2.jar版本要和mysql版本匹配 阅读全文
posted @ 2020-09-23 14:56 miao-xixixi 阅读(291) 评论(0) 推荐(0)
摘要: 参考https://www.cnblogs.com/yeminglong/p/4202912.html 阅读全文
posted @ 2020-09-23 11:43 miao-xixixi 阅读(88) 评论(0) 推荐(0)
摘要: 1.首先去官网下载 https://www.mysql.com/downloads/ 然后划到页面底部 1.点黄色部分: 2. 3.这俩其实都可以,一个联网下载一个不联网下载 4.4 4.安装包就下好了 5.启动啥的(还要添加一个ini和date文件,需要写环境变量,需要下载navicat进行连接) 阅读全文
posted @ 2020-09-23 11:25 miao-xixixi 阅读(263) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 ··· 16 下一页