会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
nefuer
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
下一页
2019年4月10日
数据类型
摘要: 上图给出了常见的数据类型表示的数据范围,在我用蓝色圈起来的地方你会发现数据类型前边有个unsigned。这个意思指的是无符号的变量。没有了符号就都变成了正数。singed是有符号。 接下来说说什么是符号,符号又是怎么在数中表示的。 先讲一下数值范围和字节大小的关系。一个字节是八位。这是单位转换,就类
阅读全文
posted @ 2019-04-10 21:26 nefuer
阅读(236)
评论(0)
推荐(0)
2019年4月8日
短路特性
摘要: 讲一下条件的短路特性,在表达式中从前往后,只要有一个能决定整个表达式真假之后,就不往后判断了 举个例子 (1>2 && 3>2) 看到1>2 就已经能知道表达式1>2 && 3>2为假就不再往后判断了 (3>2 || 9>4) 看到3>2就已经能知道表达式3>2 || 9>4为真,就不再往后判断了
阅读全文
posted @ 2019-04-08 19:58 nefuer
阅读(467)
评论(0)
推荐(0)
2019年4月2日
第九周程序改错
摘要: 1 #include 2 #define ARR_SIZE 10 3 void MaxMinExchang(int *a, int n);//加了函数声明 4 int main() { 5 int a[ARR_SIZE], i, n; 6 printf("Input n(n maxValue) { 25 maxValue = a[i];...
阅读全文
posted @ 2019-04-02 14:21 nefuer
阅读(137)
评论(0)
推荐(0)
矩阵转置
摘要: 1 #include 2 #include 3 #define N 5 4 int n; 5 int a[N][N]; 6 void show(){ 7 int i, j; 8 for(i=0; i<n; i++){ 9 for(j=0; j<n; j++){ 10 printf("%3d", a[i][j]); 11 ...
阅读全文
posted @ 2019-04-02 14:12 nefuer
阅读(127)
评论(0)
推荐(0)
二分法求根
摘要: 1 #include 2 #include 3 float f(float x){ 4 return (x*x*x-x-1); 5 } 6 int main(){ 7 float x1, x2; 8 scanf("%f,%f", &x1, &x2); 9 10 float cen=(x1+x2)/2.0; 11 float vc...
阅读全文
posted @ 2019-04-02 13:52 nefuer
阅读(323)
评论(0)
推荐(0)
2019年4月1日
三天打鱼两天晒网
摘要: 1 #include 2 3 4 /** 5 *判断闰年 6 */ 7 int isR(int year){ 8 if((year%4==0 || year%100==0)&&year%400!=0) { 9 return 1; 10 } 11 return 0; 12 } 13 14 /** 15 *如果参数合法,返回其至19...
阅读全文
posted @ 2019-04-01 21:21 nefuer
阅读(151)
评论(0)
推荐(0)
2019年3月30日
LeetCode7
摘要: 7. 整数反转
阅读全文
posted @ 2019-03-30 10:53 nefuer
阅读(86)
评论(0)
推荐(0)
2019年3月29日
LeetCode1
摘要: 1. 两数之和 思路如下 假入给定数组里边最大数是19,而且都是正数,我们可以再写一个数组,弄一个如下的对应关系。不妨假设上边数组叫a数组,下边数组叫b数组。b存储数据的位置是a的值对应的位置,b的值是a的位置。例如,a[1]=7,所以,在b【7】中存1. 经过上方的对应关系,得出以下结果 如果我给
阅读全文
posted @ 2019-03-29 23:40 nefuer
阅读(527)
评论(0)
推荐(0)
2019年2月9日
LeetCode3
摘要: 3. 无重复字符的最长子串
阅读全文
posted @ 2019-02-09 10:00 nefuer
阅读(98)
评论(0)
推荐(0)
2018年11月23日
基础练习 2n皇后问题
摘要: 1 #include 2 #include 3 4 using namespace std; 5 #define Len 1000 6 7 int b[Len][Len]; 8 int a[Len]= {0}; 9 int c[Len]= {0}; 10 int count=0; 11 int m; 12 bool check(int n, int i, int k) {...
阅读全文
posted @ 2018-11-23 21:09 nefuer
阅读(165)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
下一页
公告