摘要:Piggy-Bank Before ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for this action comes f
阅读全文
摘要:Common Subsequence A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = < x1, x2,
阅读全文
摘要:B - Big Event in HDU Nowadays, we all know that Computer College is the biggest department in HDU. But, maybe you don't know that Computer College had
阅读全文
摘要:Sort it You want to processe a sequence of n distinct integers by swapping two adjacent sequence elements until the sequence is sorted in ascending or
阅读全文
摘要:Mr. Kitayuta's Colorful Graph Mr. Kitayuta has just bought an undirected graph consisting of n vertices and medges. The vertices of the graph are numb
阅读全文
摘要:六度分离 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.
阅读全文
摘要:Arctic Network The Department of National Defence (DND) wishes to connect several northern outposts by a wireless network. Two different communication
阅读全文
摘要:Bad Cowtractors Bessie has been hired to build a cheap internet network among Farmer John's N (2 <= N <= 1,000) barns that are conveniently numbered 1
阅读全文
摘要: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
阅读全文
摘要:Building a Space Station You are a member of the space station engineering team, and are assigned a task in the construction process of the station. Y
阅读全文
摘要:粗略讲讲SPFA算法的原理,SPFA算法是1994年西南交通大学段凡丁提出 是一种求单源最短路的算法 算法中需要用到的主要变量 int n; //表示n个点,从1到n标号 int s,t; //s为源点,t为终点 int d[N]; //d[i]表示源点s到点i的最短路 int p[N]; //记录
阅读全文
摘要:Jungle Roads The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages
阅读全文