tyson_百度空间
百度空间 | 百度首页 
 
文章列表
 
2007-12-29 23:59

poem

 
2007-12-23 23:15

i find that i am always doing things rashly -_-!!

 
2007-12-23 22:58

第一道kruskal庆祝一下~!

#include<stdio.h>
#include<stdlib.h>
int p[1005],rank[1005];
int n,m;
int max;
int flag[1004][2];
int t;
typedef struct
{
int s,e,w;
}nodes;
nodes edge[15009];
int cmp(void const * p,void const * q)
{
nodes * s= (nodes *)p;
nodes * t= (nodes *)q;
return s->w-t->w;
}
void makeset()
{
for(int i=0;i<=n;i++)
{
   p[i]=i;

 
2007-12-23 22:57
 
2007-12-23 22:33
/*author tyson*/
#include<stdio.h>
#include<string.h>
int g[22][22];
int total;
const int intf=10000;
int init()
{
 int i,j;
 for(i=0;i<=20;i++)
  for(j=0;j<=20;j++)
  {
   if(i!=j)
   g[i][j]=intf;
   else
    g[i][j]=0;
  }
 for(i=1;i<=19;i++)
 {
  int num;
  int w=scanf("%d",&num);
  if(w==-1)
   return 0;
  while(num--)
  {
   int t;
   scanf("%d",&t);
   g[i][t]=g[t][i]=1;
  }
 }
 return 1;
}
void process()
{
 int i;
 
 
2007-12-23 22:32
/*author tyson*/
#include<stdio.h>
const int intf=50000;
int g[22][22];
int total;
int init()
{
 int i,j;
 for(i=1;i<=20;i++)
  for(j=1;j<=20;j++)
   g[i][j]=intf;
 for(i=1;i<20;i++)
 {
  int num;
  int p=scanf("%d",&num);
  if(p==-1)
   return 0;
  while(num--)
  {
   int t;
   scanf("%d",&t);
   g[t][i]=g[i][t]=1;
  }
 }
 return 1;
}
void out()
{

        int a,b,c;
        scanf("%d",&c);
        pri
 
2007-12-23 22:32

/*author tyson*/

/*

此题用floyd算法O(V^3)
dijkstra也是O(V^3)
用bfs用邻接表是O(V*(V+E))
但我用了邻接矩阵还是O(V^3)~

*/

#include<stdio.h>
#include<string.h>
int w[22][22];
const int intf=0x0fffffff;
int total;
int queue[22];
int begin,end;
int use[22];
int dist[22];
int init()
{
int i,j;
for(i=1;i<=20;i++)
   for(j=1;j<=20;j++)
    if(i!

 
2007-12-23 22:21
· 遵照道德准则生活就是幸福的生活。
· 幸福属于满足的人们。
· 幸福就是至善。
· 幸福在于自主自足之中。
· 人生颇富机会和变化。人最得意的时候,有最大的不幸光临。
· 人生最终价值在于觉醒和思考的能力,而不只在于生存。
· 在不幸中,有用的朋友更为必要;在幸运中,高尚的朋友更为必要。在不幸中,寻找朋友出于必需;在幸运中,寻找朋友出于高尚。
· 羽毛相同的鸟,自会聚在一起。
· 真正的朋友,是一个灵魂孕育在两个躯体里。
· 事业是理念和实践的生动统一。
·
 
2007-12-23 22:15

有些人天生就对环境刺激特别敏感,并比普通人容易在更短的时间内接收并处理更多更综合的信息。如果这种能力出现在低智商的人身上,那么这个人就可能得精神病;但如果这种能力出现在高智商的人身上,那么这个人就会是天才,并有着极高的创造力。

潜在抑制症是一种心理疾病。通常人会把对自己没有直接作用的事物封闭在思考范围之外,而潜在抑制症患者会深度分解思考。比如,当患者看到一条路的时候,会迅速深度想到该条路通向什么方向,或者铺

 
2007-12-23 22:15

本人第一个HASH 哈哈

#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
char txt[20000000];
long long hash[1000000];
const int prime=999983;
double gold=0.618033;
int n,nc;
int flag;
long long sum=0;
int num;
void insert(int p)
{
    if(hash[p]==0)
    {
        hash[p]=sum;
  

 
     
 
 
个人档案
 
tyson_forever
男, 24岁
吉林 长春 
上次登录:
1个月以前
加为好友
 
   
 
最新照片
 
   
 
最近访客
 
 

StudyRush

Nehzilrz

yangjie0825

sunkehappy

hhfhhfhhfhhfhh

ekse

唯一的树叶

柒夕雨
     
 
订阅我的空间
 
已有人次访问本空间
 
订阅RSS  什么是RSS?

您也想拥有这样的空间?请点此申请。
     


©2010 Baidu