摘要: 1.幂指数 底数为x,幂指数为a,计算得x的a次方: pow(x,a) 阅读全文
posted @ 2019-11-05 12:06 程嘿嘿 阅读(4064) 评论(0) 推荐(0) 编辑
摘要: 动态分配也需要一个值来确定数组的长度,指不定过这个值可以是动态的值,而不是常量。 1.malloc int *p=(int*)malloc(n*sizeof(int)); 其中n是动态数值,表示数组的大小。 2.vector 动态分配一维数组: int n=3; vector<int> a(n); 阅读全文
posted @ 2019-11-05 12:05 程嘿嘿 阅读(5499) 评论(0) 推荐(0) 编辑
摘要: Medimu Compare two version numbers version1 and version2.If version1 > version2 return 1; if version1 < version2 return -1;otherwise return 0. You may 阅读全文
posted @ 2019-11-05 12:02 程嘿嘿 阅读(125) 评论(0) 推荐(0) 编辑