附属脚本是访问对象,集合或序列的快捷方式struct STest{ let constValue:Int subscript(count:Int)->Int{ return count*constValue }}let obj = STest(constValue:3...
分类:
其他好文 时间:
2014-08-05 18:12:19
阅读次数:
204
typedef struct node{ int count; struct node *next[MAX];}Trie;Trie *Newnode()//建立结点&初始化a{ int i; Trie *T; T = (Trie *)malloc(sizeof(Trie...
分类:
其他好文 时间:
2014-08-05 18:12:09
阅读次数:
201
在整理Java LockSupport.park()的东东,看到了个"Spurious wakeup",重新梳理下。
首先来个《UNIX环境高级编程》里的例子:
[cpp] view
plaincopy
#include
struct msg {
struct msg *m_next;
/* ... mo...
分类:
其他好文 时间:
2014-08-05 15:53:01
阅读次数:
369
U-boot会给Linux Kernel传递很多参数,如:串口,RAM,videofb等。而Linux kernel也会读取和处理这些参数。两者之间通过struct tag来传递参数。U-boot把要传递给kernel的东西保存在struct tag数据结构中,启动kernel时,把这个结构体的物理...
分类:
系统相关 时间:
2014-08-05 13:20:19
阅读次数:
507
#include
#include
#include
/*
有符号 结构体1
*/
struct bits
{
int b1:5;
/*
因为是int型,最大设置32位,由于int型是有符号整形,
所以这里5位为有符号类型。
11111 -1
10000 -16
01111 15
00000 0
*/
int :2;
int b2:2;
/*
11 -1
10 -2
01 1
0...
分类:
其他好文 时间:
2014-08-05 11:20:09
阅读次数:
205
第一题AC自动机,高仿代码!#include #include #include #include using namespace std;const int maxn = 500010;char str[1000010];struct ACAutomaton{ int ch[maxn][26...
分类:
其他好文 时间:
2014-08-05 00:33:18
阅读次数:
160
class SystemIcon { [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct SHFILEINFO { public...
分类:
其他好文 时间:
2014-08-05 00:28:08
阅读次数:
273
C语言学习宝典(5)结构体:将不同类型的数据组合成为一个有机的整体,这个整体就是一个结构体。例如:Struct student{ Int name; Char sex; Float score;};使用方法:类型名 成员名;一般形式:Struct{ 成员列表;}变量名表列;结构体变量的引用:结构体变...
分类:
其他好文 时间:
2014-08-05 00:13:18
阅读次数:
280
呃,不知道我用的算不算卡壳,总有点枚举的意思。先求凸包,然后,枚举其中一点,再枚举另一点作为结尾,这个向量旋转一周后,求出最大值面积。这里面用的是旋转卡壳判断的那个式子。#include #include #include #include using namespace std;struct po...
分类:
其他好文 时间:
2014-08-05 00:04:48
阅读次数:
261
//next_permutation全排列
# include
# include
# include
using namespace std;
struct node
{
int w;
int v;
};
struct node a[10010];
int max1(int x,int y)
{
return x>y?x:y;
}
int main()
{
int i,n,d,fl...
分类:
其他好文 时间:
2014-08-04 21:33:18
阅读次数:
279