AOAPC I: Volume 3.Brute Force-Elementary Skills

Written by  on March 15, 2015

<<算法竞赛入门经典>> UVaoj第四卷暴力求解基础技巧习题: 10167-Birthday Cake 横竖只有[-500,500],直接实力暴力即可,另外目测测试数据没有那么大,直接[-100,100]也会给过。。。

[Read more...]

UVAOJ165

Written by  on March 10, 2015

UVAOJ165 165 – Stamps Time limit: 3.000 seconds  Stamps  The government of Nova Mareterrania requires that various legal documents have stamps attached to them so that the government can derive revenue from them. In terms of recent legislation, each class of document is limited in the number of stamps that may be attached to it. The government wishes to know how many different stamps, and of what values, they need to print to allow the widest choice of values to be made up under these conditions. Stamps are always valued in units of $1.

[Read more...]

No Persuading

Written by  on March 9, 2015

Exercise for TOEFL Writing I have checked my past years a lot, it always comes out one thing that I preferred so much–persuading. When I just entered my university, what I talked most often with my friends is why should they uninstall the software like 360 or QQ Manager entirely, I thought these software were more like wasting RAM and slowing down computer rather than protecting PCs, they are exactly inefficient and unnecessary, of course so do I think of them now. However mostly my dear friends’ responses are far away from positive while I tried so much to prove what I thought of is the truth.

[Read more...]

UVAOJ10012

Written by  on March 6, 2015

UVAOJ10012 题意其实就是是把一堆圆球放在一个箱子里,因为箱子的最小高度是固定的(即最大的圆的直径),所以题目要求最小的箱子宽是多少,注意球必须同时接触地面,即不能层叠起来,这里一开始很自然地想到了直接全排列暴力(因为球最多只有8个),但是下图的这种情况很容易被忽略,这也是这个题目的AC率如此之低的原因:

[Read more...]

UVAOJ301

Written by  on March 4, 2015

UVAOJ301   301 – Transportation Time limit: 3.000 seconds  Transportation  Ruratania is just entering capitalism and is establishing new enterprising activities in many fields including transport. The transportation company TransRuratania is starting a new express train from city A to city B with several stops in the stations on the way. The stations are successively numbered, city A station has number 0, city B station number m. The company runs an experiment in order to improve passenger transportation capacity and thus to increase its earnings. The train has a maximum capacity n passengers. The price of the train ticket is equal to the number of stops (stations) between the starting station and the destination station (including the destination station). Before the train starts its route from the city A, ticket orders are collected from all onroute stations. The ticket order from the station S means all reservations of tickets from S to a fixed destination station. In case the company cannot accept all orders because of the passenger capacity limitations, its rejection policy is that it either completely accept or completely reject single orders from single stations.

[Read more...]