摘要:Travel PP loves travel. Her dream is to travel around country A which consists of N cities and M roads connecting them. PP has measured the money each
阅读全文
摘要:六度分离 1967年,美国著名的社会学家斯坦利·米尔格兰姆提出了一个名为“小世界现象(small world phenomenon)”的著名假说,大意是说,任何2个素不相识的人中间最多只隔着6个人,即只用6个人就可以将他们联系在一起,因此他的理论也被称为“六度分离”理论(six degrees of
阅读全文
摘要:Invitation Cards In the age of television, not many people attend theater performances. Antique Comedians of Malidinesia are aware of this fact. They
阅读全文
摘要:Flight Recently, Shua Shua had a big quarrel with his GF. He is so upset that he decides to take a trip to some other city to avoid meeting her. He wi
阅读全文
摘要:Trucking A certain local trucking company would like to transport some goods on a cargo truck from one place to another. It is desirable to transport
阅读全文
摘要:Idiomatic Phrases Game Tom is playing a game called Idiomatic Phrases Game. An idiom consists of several Chinese characters and has a certain meaning.
阅读全文
摘要:Silver Cow Party One cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to attend the big cow party to be held at farm #X (1
阅读全文
摘要:Skiing Skiing Bessie and the rest of Farmer John's cows are taking a trip this winter to go skiing. One day Bessie finds herself at the top left corne
阅读全文
摘要:MPI Maelstrom BIT has recently taken delivery of their new supercomputer, a 32 processor Apollo Odyssey distributed shared memory machine with a hiera
阅读全文
摘要:粗略讲讲SPFA算法的原理,SPFA算法是1994年西南交通大学段凡丁提出 是一种求单源最短路的算法 算法中需要用到的主要变量 int n; //表示n个点,从1到n标号 int s,t; //s为源点,t为终点 int d[N]; //d[i]表示源点s到点i的最短路 int p[N]; //记录
阅读全文
摘要:Til the Cows Come Home Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for
阅读全文