结构体定义没搞明白,一直WA,终于AC了,真是高兴呀
代码如下:
#include
#include
#include
struct student
{
char id[30];
int score;
}person[1001];
int cmp(const void *a,const void *b)
{
struct student *aa=(struct studen...
分类:
其他好文 时间:
2014-07-19 08:15:25
阅读次数:
194
UVA 1156 - Pixel Shuffle
题目链接
题意:根据题目中的变换方式,给定一串变换方式,问需要执行几次才能回复原图像
思路:这题恶心的一比,先模拟求出一次变换后的对应的矩阵,然后对该矩阵求出所有循环长度,所有循环长度的公倍数就是答案
代码:
#include
#include
const int N = 1100;
int t, n, g[N]...
分类:
其他好文 时间:
2014-07-19 08:15:10
阅读次数:
307
/*
__________________________________________________________________________________________________
* copyright: Grant Yuan ...
分类:
其他好文 时间:
2014-07-19 08:10:33
阅读次数:
216
发现一个php用来判断一个字符串是否包子串的语句相当的怪异.
看下面的语句:
echo "A1: ".(strpos("csd","c"))."";
echo "A2: ".(strpos("csd","c")>=0)."";
echo "B1: ".(strpos("csd","h",0))."";
echo "B2: ".(strpos("csd","h",0)>=0)."";...
分类:
Web程序 时间:
2014-07-19 08:10:14
阅读次数:
229
Double 四舍五入保留小数:
/**
* @example roundUpNumber(20.47, 0) = 20.5, roundUpNumber(20.449, 1) = 20.45 * @description round up double number * @param Double d * @param Integer index * @return *...
分类:
其他好文 时间:
2014-07-19 08:08:55
阅读次数:
219
Linux 字符驱动程序(一)
在linux内核中设备主要有三种:
1 字符设备:
?字符设备的读写以字节为单位,存取时没有缓存。
?对字符设备发出读写请求时,实际的硬件I/O紧接着就发生了。一般来说,字符设备不支持随机访问。
?典型的字符设备包括鼠标、键盘及串行口等。
2 块设备:
?块设备读写以块为单位,典型的块大小为512或...
分类:
系统相关 时间:
2014-07-19 08:05:55
阅读次数:
429
建立自己的bower 私库的方式参考http://blog.csdn.net/nsrainbow/article/details/35988611 这篇文章
我们如果想注册自己创造的js库到私库怎么办呢?...
分类:
Web程序 时间:
2014-07-19 08:04:07
阅读次数:
339
Marbles
Input: standard input
Output: standard output
I have some (say, n) marbles (small glass balls) and I am going to buy some boxes to store them. The boxes are of two types:
Type 1: each ...
分类:
其他好文 时间:
2014-07-19 08:01:10
阅读次数:
264