2012年2月18日

数据库设计文档模板

摘要: 《项目名称》数据库设计文档数据库版本:Oracle10g命名空间:TESTNAMEPACE一、数据库表序列表名功能说明1Test1表2Test2表3Test3表4Test4表二、数据库表关系图三、数据库表信息Test1表名/缩写Test1功能描述列名数据类型空说明idint否表id约束:唯一补充说明四、sql语句1、创建表create table BM_ADMIN( idINTEGER not null,… )2、存储过程create or replace procedure testprocedure() 阅读全文

posted @ 2012-02-18 18:36 c语言源码 阅读(749) 评论(0) 推荐(0) 编辑

POJ 1840 Eqs

摘要: 思路:a1x1^3+ a2x2^3+ a3x3^3 = -(a4x4^3 + a5x5^3)先求出右边能到达的值,对值进行hash,然后左边查询计数,这样比相反的顺序内存少用好多,时间也快不少#include<stdio.h> #include<stdlib.h> #include<string.h> #include<math.h> #define inf 20003 int Max(int a,int b){ return a>b?a:b; } int Min(int a,int b){ return a>b?b:a; } int 阅读全文

posted @ 2012-02-18 17:35 c语言源码 阅读(230) 评论(0) 推荐(0) 编辑

BOJ 262 Channel Coding

摘要: DescriptionAssume an integer sequence contains N elements whose value could only be one of {0, 1, -1}. There may exist a positive integer D which can make the sum between i-th element and (i+D)-th element be zero, where i is a certain integer between 1 and N-D. Your task is to find out the maximal D 阅读全文

posted @ 2012-02-18 17:32 c语言源码 阅读(174) 评论(0) 推荐(0) 编辑

POJ 3274 Gold Balanced Lineup

摘要: hash存储,查询,跟POJ 3349类似#include<stdio.h> #include<stdlib.h>; #include<string.h> #define inf 100001 struct Edge{ int pos[32],next; }edge[100100]; int head[100100],max,num[100100],k; int Max(int a,int b){ return a>b?a:b; } int add(int b,int pos){ int i,j; int hash=b%inf; for(i=head[ 阅读全文

posted @ 2012-02-18 14:23 c语言源码 阅读(137) 评论(0) 推荐(0) 编辑

POJ 3349 Snowflake Snow Snowflakes

摘要: 简单hash#include<stdio.h> #include<stdlib.h>; #include<algorithm> #define inf 100001 using namespace std; struct Edge{ int a[10],next; }edge[100100]; int a[10],head[100100],cnt; bool add(int * b){ int sum=0,i,j,p,q; for(i=0;i<6;i++) sum+=b[i]; int hash=sum%inf; for(i=head[hash];i; 阅读全文

posted @ 2012-02-18 11:06 c语言源码 阅读(404) 评论(0) 推荐(0) 编辑

导航