优化Wine程序的字体显示
Wine 10

默认Wine的字体太难看,而且有时候还会显示不出来。开启Wine字体的反锯齿及平滑功能以及将字体映射成文泉驿微米黑的方法是:

1.新建文本文件a.reg,放入如下内容:

...Read More
HDU 4965 Fast Matrix Calculation
ACM

Time Limit: 20001000 MS (Java/Others)    Memory Limit: 131072131072 K (Java/Others) Total Submission(s): 206    Accepted Submission(s): 116

Problem Description

One day, Alice and Bob felt bored again, Bob knows Alice is a girl who loves math and is just learning something about matrix, so he decided to make a crazy problem for her.

Bob has a six-faced dice which has numbers 0, 1, 2, 3, 4 and 5 on each face. At first, he will choose a number N (4 <= N <= 1000), and for N times, he keeps throwing his dice for K times (2 <=K <= 6) and writes down its number on the top face to make an N*K matrix A, in which each element is not less than 0 and not greater than 5. Then he does similar thing again with a bit difference: he keeps throwing his dice for N times and each time repeat it for K times to write down a K*N matrix B, in which each element is not less than 0 and not greater than 5. With the two matrix A and B formed, Alice’s task is to perform the following 4-step calculation. Step 1: Calculate a new N*N matrix C = A*B. Step 2: Calculate M = C^(N*N). Step 3: For each element x in M, calculate x % 6. All the remainders form a new matrix M’. Step 4: Calculate the sum of all the elements in M’.

...Read More
local_offer #[矩阵,暴力] 
HDU 4952 Number Transformation
ACM

Time Limit: 20001000 MS (Java/Others)    Memory Limit: 6553665536 K (Java/Others) Total Submission(s): 612    Accepted Submission(s): 310

Problem Description
Teacher Mai has an integer x.

He does the following operations k times. In the i-th operation, x becomes the least integer no less than x, which is the multiple of i.

He wants to know what is the number x now.

 

...Read More
HDU 4945 2048
ACM

Time Limit: 30001500 MS (Java/Others)    Memory Limit: 6553665536 K (Java/Others) Total Submission(s): 590    Accepted Submission(s): 136

Problem Description

Teacher Mai is addicted to game 2048. But finally he finds it’s too hard to get 2048. So he wants to change the rule:

You are given some numbers. Every time you can choose two numbers of the same value from them and merge these two numbers into their sum. And these two numbers disappear meanwhile.

If we can get 2048 from a set of numbers with this operation, Teacher Mai think this multiset is good.

You have n numbers, A1,…,An. Teacher Mai ask you how many subsequences of A are good.

...Read More
HDU 2874 Connections between cities
ACM 08
内网 2085马农
ACM 08

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

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

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

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

...Read More
local_offer #暴力 
内网2082 字母
ACM

##Description

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

##Input

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

##Output

输出有多少种情况,排列的字母是一个回文串。 ##Sample Input AAAAB AABB CD

...Read More
HDU4944 FSF’s game
ACM

Time Limit: 90004500 MS (Java/Others)    Memory Limit: 131072131072 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, AB/gcd(A/K,B/K)=4; 2+4=6; ) There are N(N+1)/2 levels in this game, and every level is an unique rectangle. (1x1 , 2x1, 2x2, 3x1, …, Nx(N-1), NxN)

...Read More
内网2073 城主GeassCode
ACM 08

##Description

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

...Read More
local_offer #LCA  #图论  #tarjan