//注意将价格转化为整数即可
# include
# include
# include
using namespace std;
int max(int a,int b)
{
return a>b?a:b;
}
int dp[3000050];
int main()
{
int n,i,j,flag,l,m;
int suma,sumb,sumc,sum;
double q,...
分类:
其他好文 时间:
2014-07-23 13:15:36
阅读次数:
177
这个插件真的很实用,我们可以使用以下语法来简化我们的工作,以下仅仅是示例:
Deleting
//delete all users where FirstName matches
context.Users.Delete(u => u.FirstName == "firstname");
Update
//update all tasks with status of 1 to stat...
分类:
其他好文 时间:
2014-07-23 13:09:46
阅读次数:
216
#include #include #include #include #pragma warning(disable:4996)typedef struct HuffmanTree{ int weight;//权值 int parent;//父节点 int left;//左子树 ...
分类:
其他好文 时间:
2014-07-23 12:49:56
阅读次数:
382
快速矩阵乘法。注意,原始字符串即为decode后的字符串。题目是要找到原始串。 1 #include 2 #include 3 4 #define MAXN 85 5 6 typedef struct { 7 char m[MAXN][MAXN]; 8 } mat_st; 9 10 ...
分类:
其他好文 时间:
2014-07-23 12:38:56
阅读次数:
259
暴力搜索 1 #include 2 3 struct node 4 { 5 int x; 6 int y; 7 }s[10000]; 8 int main() 9 {10 //freopen("input.txt","r",stdin);11 int a,b,n,n...
分类:
其他好文 时间:
2014-07-23 11:58:36
阅读次数:
293
1.单向循环链表
区分单向链表和单向循环链表:单向循环链表的尾指针指向头结点。
2.单向循环链表的基本操作
#include
#include
#define NULL 0
typedef struct node {
int data;
struct node *next;
}ElemSN;
ElemSN * creat_link(int ms); //创建一个单向循环链表
...
分类:
其他好文 时间:
2014-07-22 23:50:48
阅读次数:
264
??
内存对齐概念,struct例子:
struct stu{
char a;
intb;
char c;
double d;
char e;
}
取pack(n),n,取结构体中最大成员大小m,取两个小值k, k = m
取每个成员大小p,依次同k比较,取小值q = k
第二步当中依次取...
分类:
其他好文 时间:
2014-07-22 23:48:17
阅读次数:
283
遍历线段树 线段树的插入和查询 1 //城市地平线(线段树) 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 typedef __int64 LL; 9 struct building{....
分类:
其他好文 时间:
2014-07-22 23:08:12
阅读次数:
175
用cocos2d-x获取系统时间,格式为年月日时分秒:void GetTime(float dt) { struct tm *tm;#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) //win32平台 time_t timep; ...
分类:
其他好文 时间:
2014-07-22 23:06:32
阅读次数:
355
1.进程描述符 struct task_struct { volatile long state; ....... struct list_head tasks; ....... struct mm_struct *mm, *active_mm; ....... struct v...
分类:
系统相关 时间:
2014-07-22 22:47:52
阅读次数:
371