单词计算程序,为啥遍历输出的时候会出现段错误 1 #include 2 #include 3 #include 4 #include 5 6 #define MAXWORD 100 7 8 struct tnode{ 9 char *word; 10 int c...
分类:
其他好文 时间:
2014-07-03 09:26:20
阅读次数:
201
今天和销售总监一起去见客户,早上8:47分的高铁到苏州。6:30起床,7点赶地铁……上了高铁,和销售总监闲聊几句,看了一点杂志耳边就听到列车广播传出优美的妹子声“苏州园区到了……”。25分钟就到了苏州,真TM快!!回来注意了下,时速320…… 客户是一个创业老板,看样子应该在75后或者80后,...
分类:
其他好文 时间:
2014-07-02 22:15:56
阅读次数:
180
触摸屏驱动程序框架与上一片文章的输入子系统类似,只是底层驱动由按键变成了触摸屏。S3C2440的ADC相关寄存器:struct s3c_ts_regs { unsigned long adccon; unsigned long adctsc; unsigned long adcdly; un...
分类:
其他好文 时间:
2014-07-02 21:54:57
阅读次数:
285
最短路问题,我用的SPFA。
求出各个点的最短时间。
然后每条边的为 (d[u]+d[v]+len)/2 len 为此边长度。
然后找时间最长的。
#include
#include
#include
#include
#include
using namespace std;
int n,m;
struct lx
{
int v;
double t;
};
v...
分类:
其他好文 时间:
2014-07-02 11:34:13
阅读次数:
136
Sort a linked list in O(n log n)
time using constant space complexity.
看到O(n log n)的排序算法,适合单链表的首先想到的就是归并排序
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* Lis...
分类:
其他好文 时间:
2014-07-02 08:47:34
阅读次数:
239
为了初始化结构体和类等类型的实例属性。默认构造器 struct Fahrenheit {var temperature: Doubleinit(){temperature = 32.0} } var f = Fahrenheit() //调用默认构造器 init() ,没有参数 没有返回值。println("The default temperature is \(f.temperature...
分类:
其他好文 时间:
2014-07-02 08:42:57
阅读次数:
304
构造系数矩阵,高斯消元求解二次函数,然后两点式求直线函数,带入辛普森积分法无脑AC。。。
#include
#include
#include
#include
#include
#include
using namespace std;
struct node
{
double x,y;
}p[4];
double g[10][10];
double f1(double x) //二次...
分类:
其他好文 时间:
2014-07-02 07:56:59
阅读次数:
313
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first
two lists.
代码如下:
* Definition for singly-linked list.
* struct L...
分类:
其他好文 时间:
2014-07-02 07:23:59
阅读次数:
159
题目大意:
问[s,e]之间有多少个 斐波那契数。
思路分析:
直接模拟高精度字符串的加法和大小的比较。
注意wa点再 s 可以从 0 开始
那么要在判断输入结束的时候注意一下。
#include
#include
#include
#include
using namespace std;
struct node
{
char str[111];
...
分类:
其他好文 时间:
2014-07-01 16:08:10
阅读次数:
243
题目链接:点击打开链接
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
#define inf 10000000
#define ll __int64
#define N 200005
ll n, m, v;
struct node{...
分类:
移动开发 时间:
2014-07-01 15:52:00
阅读次数:
298