
文章
hunyxv
这个作者很懒,什么都没留下…
展开
-
Primer Plus 12章课后编程练习 5
#include<stdio.h>#include<stdlib.h>#include<conio.h>int main(){ int *p; int a; p = (int *)calloc(10, sizeof(int)); for (int i = 0; i < 1000; i++) { a = rand() % 10;原创 2016-09-10 14:22:45 · 328 阅读 · 0 评论 -
Primer Plus 12章课后编程练习 5
4、编写产生100个1~10范围内的随机数的程序,以降序排序。(我写的升序懒得改了)#include<stdlib.h>#include<stdio.h>#include<conio.h>int main(){ int *p; p = (int *)malloc(100 * sizeof(int)); for (int i = 0; i < 100; i++)原创 2016-09-10 09:41:35 · 321 阅读 · 0 评论 -
Primer Plus 12章课后编程练习 第二题
2.在美国通常是以英里每加仑来计算油耗,在欧洲是以升每百公里来计算。下面是某程序的一部分该程序让用户选择一个模式(公制的或美制的),然后收集数据来计算油耗。// pe12-2b.c#include<stdio.h>#include"pe12-2a.h"int main(){ int mode; printf("Enter 0 for metric mode,1 for US mod原创 2016-09-09 22:44:10 · 602 阅读 · 0 评论 -
(转)+(自己总结) Atom 快捷键 + 插件推荐
原文:http://blog.youkuaiyun.com/crper/article/details/45674649转载 2016-09-15 11:21:24 · 16465 阅读 · 1 评论 -
mac下安装和使用brew 就像在linux下安装软件
一,安装brew1,安装brewcurl -LsSf http://github.com/mxcl/homebrew/tarball/master | sudo tar xvz -C/usr/local --strip 12,安装完成后执行brew提示:Please run brew update!3,按照提示更新,执行brew update报错:Error: /usr/local must be转载 2017-07-12 22:05:03 · 1941 阅读 · 0 评论 -
双数组Trie树 Double-arrayTrie
Tire 树结构存在较大的数据稀疏,造成了空间浪费。Double-array结合了array查询效率高、list节省空间的优点,可以有效降低空间浪费,具体是通过两个数组base、check来实现。Trie树可以等同于一个自动机,状态为树节点的编号,边为字符。base数组中每个元素对应trie中的一个节点即状态;check数组表示的事某个状态的前驱状态,用来验证转移的有效性;两个数组满足如下...原创 2019-02-24 21:32:15 · 788 阅读 · 0 评论