摘要: [http://ybt.ssoier.cn:8088/problem_show.php?pid=1199]() 一本通 1199 #include <iostream> #include <cstring> #include <cstdio> #define maxn 10000005 typede 阅读全文
posted @ 2022-02-22 19:54 lwx_R 阅读(18) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <algorithm> #include <cstring> #include <cstdio> #include <map> #include <queue> #include <set> #include <iterator> #incl 阅读全文
posted @ 2022-02-22 19:49 lwx_R 阅读(45) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <algorithm> #include <cstring> #include <cstdio> #include <map> #include <queue> #include <set> #include <iterator> #incl 阅读全文
posted @ 2022-02-22 19:42 lwx_R 阅读(29) 评论(0) 推荐(0) 编辑
摘要: 左移运算 左移运算符“<<”是双目运算符。左移n位就是乘以2的n次方。 其功能把“<<”左边的运算数的各二进位全部左移若干位,由“<<”右边的数指定移动的位数,高位丢弃,低位补0。(x<<n == x*2^n) 右移运算 右移运算符“>>”是双目运算符。右移n位就是除以2的n次方。其功能是把“>>” 阅读全文
posted @ 2022-02-22 19:00 lwx_R 阅读(133) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <algorithm> #include <cstring> #include <cstdio> #include <map> #include <stack> #include <queue> #include <set> #include 阅读全文
posted @ 2022-02-13 16:48 lwx_R 阅读(280) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <algorithm> #include <cstring> #include <cstdio> #include <map> #include <queue> #include <set> #include <iterator> #incl 阅读全文
posted @ 2022-02-13 16:47 lwx_R 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 1.模板 求n的m次方 #include<iostream> #define MOD 1000000007 using namespace std; //递归快速幂 int quickpow(long long a,long long n){ if(n==0) return 1; else if(n 阅读全文
posted @ 2021-10-01 19:45 lwx_R 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 1.向上取整, ceil(x)返回的是大于x的最小整数。 2.向下取整, floor(x)返回的是小于或等于x的最大整数。 3.输出有效数字 若规定整数p位,小数部分q位 用%p.qf 输出 若规定整数+小数一共是n位有效 用%.ng 输出 4.c++域宽 setw() 阅读全文
posted @ 2021-10-01 19:35 lwx_R 阅读(42) 评论(0) 推荐(0) 编辑
摘要: 1.recerse(v.begin(),v.end()) 反转容器元素顺序函数 2.sort(a,a+n,cmp); 自定义cmp函数 int cmp2(peo p1,peo p2){ if (change(p1.job)change(p2.job)){ if(p1.gradep2.grade) r 阅读全文
posted @ 2021-09-13 14:12 lwx_R 阅读(20) 评论(0) 推荐(0) 编辑
摘要: 1.大小写改变 transform(s.begin(),s.end(),s.begin(),::tolower); 2.str2.find(str1,n) 从n位置开始在str2里找str1,成功返回找到的位置,否则返回-1 3.erase() 清除函数 str.erase("char c") 从s 阅读全文
posted @ 2021-09-13 14:03 lwx_R 阅读(21) 评论(0) 推荐(0) 编辑