算法
小小土豆公
这个作者很懒,什么都没留下…
展开
-
算法笔记——第三章:入门篇(1)——入门模拟
3.1:简单模拟1:B1008 数组元素的循环右移#include<cstdio>#include<algorithm>using namespace std;const int maxn = 110;int n, m;int num[maxn];void reverse(int s, int e){ // [s, e) int i = s, j = e-1; while(i < j ){ swap(num[i], num[j]); i+原创 2020-09-29 18:35:03 · 122 阅读 · 0 评论 -
算法笔记——第一章与第二章:C/C++基本语法
第一章:没有内容第二章:C/C++基本语法1:int类型取值范围:-2^31——2^31 - 1;大致范围:-2x10^9 ~ 2x10^9;注意:int + int 以及 int * int 这两种运算是容易超过int范围的。2:long long类型取值范围:-2^63——2^63- 1;大致范围:-9x10^18 ~ 9x10^18;注意:如果对long long 类型的变量赋值大于2^31 - 1,则需要在常量后面加上LL(例如: 999999999999999.原创 2020-09-29 18:35:28 · 120 阅读 · 0 评论