Skip to content

Home

我的HerbstluftWM

一直以来想折腾一下WM,但是又感觉麻烦。前天把笔记本带到机房就借此机会在虚拟机中玩了一下。发现事实上比我想像的要简单的多。少量配置了一下两个配置文件就能用了。然后使用compton做透明特效。看起来也挺简洁美观的。

WM最大的特点就是轻便,herbstluftWM也不例外。安装只有几百兆,附加依赖少,几乎一个命令的事情。启动、响应速度都是普通DE无法比拟的快。加上compton的透明效果,稍加修饰整个系统的界面就非常美观了。

两个配置文件与更详细的说明我已经push到了github:click here

Connections between cities

Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4759    Accepted Submission(s): 1341

Problem Description
After World War X, a lot of cities have been seriously damaged, and we need to rebuild those cities. However, some materials needed can only be produced in certain places. So we need to transport these materials from city to city. For most of roads had been totally destroyed during the war, there might be no path between two cities, no circle exists as well. Now, your task comes. After giving you the condition of the roads, we want to know if there exists a path between any two cities. If the answer is yes, output the shortest path between them.

内网 2085马农

Description

在观看完战马检阅之后,来自大草原的两兄弟决心成为超级“马农”,专门饲养战马。

兄弟两回到草原,将可以养马的区域,分为N*N的单位面积的正方形,并实地进行考察,归纳出了每个单位面积可以养马所获得的收益。接下来就要开始规划他们各自的马场了。

首先,两人的马场都必须是矩形区域。同时,为了方便两人互相照应,也为了防止马匹互相走散,规定两个马场的矩形区域相邻,且只有一个交点。最后,互不认输的两人希望两个马场的收益相当,这样才不会影响他们兄弟的感情。

现在,兄弟两找到你这位设计师,希望你给他们设计马场,问共有多少种设计方案。

HDU4944 FSF’s game

Time Limit: 9000/4500 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 166    Accepted Submission(s): 76

Problem Description
FSF has programmed a game. In this game, players need to divide a rectangle into several same squares. The length and width of rectangles are integer, and of course the side length of squares are integer. After division, players can get some coins. If players successfully divide a AxB rectangle(length: A, width: B) into KxK squares(side length: K), they can get A*B/ gcd(A/K,B/K) gold coins. In a level, you can’t get coins twice with same method. (For example, You can get 6 coins from 2x2(A=2,B=2) rectangle. When K=1, A*B/gcd(A/K,B/K)=2; When K=2, A*B/gcd(A/K,B/K)=4; 2+4=6; )

内网2082 字母

Description

乐乐开始学习英文字母了,小C为他准备了很多字母牌,每张牌有一个英文字母。有天乐乐把所有的牌排成一行,这些字母竟然形成了一个回文串。小C想知道,乐乐在排字母的时候,有多少种情况,最后的字母形成回文串。

Input

输入一行,表示乐乐有哪些字母,均大写。

Output

输出有多少种情况,排列的字母是一个回文串。

内网2073 城主GeassCode

Description

GeassCode凭借自己在topcoder上的超凡表现,赢得了国王的喜爱,国王赏赐他一座城池。这座城池里有n个 村子,m条路连接这些村子。坐上城主的GeassCode决定要修路,他打算用最少的代价把所以的村子连在一起。据探子回报,有些村子之间虽然原来没有路 径,但是可以强行的去建一条路。GeassCode想知道,如果强行在某两个村子之间建一条路,最后的总花费是多少?

POJ1330 Nearest Common Ancestors

Time Limit: 1000MS Memory Limit: 10000K
Total Submissions: 17734 Accepted: 9405

Description

A rooted tree is a well-known data structure in computer science and engineering. An example is shown below:

In the figure, each node is labeled with an integer from {1, 2,...,16}. Node 8 is the root of the tree. Node x is an ancestor of node y if node x is in the path between the root and node y. For example, node 4 is an ancestor of node 16. Node 10 is also an ancestor of node 16. As a matter of fact, nodes 8, 4, 10, and 16 are the ancestors of node 16. Remember that a node is an ancestor of itself. Nodes 8, 4, 6, and 7 are the ancestors of node 7. A node x is called a common ancestor of two different nodes y and z if node x is an ancestor of node y and an ancestor of node z. Thus, nodes 8 and 4 are the common ancestors of nodes 16 and 7. A node x is called the nearest common ancestor of nodes y and z if x is a common ancestor of y and z and nearest to y and z among their common ancestors. Hence, the nearest common ancestor of nodes 16 and 7 is node 4. Node 4 is nearer to nodes 16 and 7 than node 8 is.

POJ1989 Distance Queries

Description

Farmer John's cows refused to run in his marathon since he chose a path much too long for their leisurely lifestyle. He therefore wants to find a path of a more reasonable length. The input to this problem consists of the same input as in "Navigation Nightmare",followed by a line containing a single integer K, followed by K "distance queries". Each distance query is a line of input containing two integers, giving the numbers of two farms between which FJ is interested in computing distance (measured in the length of the roads along the path between the two farms). Please answer FJ's distance queries as quickly as possible!

HDU4005 The war

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65768/65768 K (Java/Others) Total Submission(s): 1992    Accepted Submission(s): 440

Problem Description
In the war, the intelligence about the enemy is very important. Now, our troop has mastered the situation of the enemy's war zones, and known that these war zones can communicate to each other directly or indirectly through the network. We also know the enemy is going to build a new communication line to strengthen their communication network. Our task is to destroy their communication network, so that some of their war zones can't communicate. Each line has its "cost of destroy". If we want to destroy a line, we must spend the "cost of destroy" of this line. We want to finish this task using the least cost, but our enemy is very clever. Now, we know the network they have already built, but we know nothing about the new line which our enemy is going to build. In this condition, your task is to find the minimum cost that no matter where our enemy builds the new line, you can destroy it using the fixed money. Please give the minimum cost. For efficiency, we can only destroy one communication line.