果然Java还是不靠谱啊,一个NaN把我整了半天~~
题目大意:
有一个正多边形,给出任意三个顶点的坐标,求这个正多边形的最小面积。
解题思路:
首先要知道这三个顶点组成的三角形的外接圆一定是这个正多边形的外接圆。
用过计算出三角形的三边长,可以计算出三角型面积,进而推出外接圆半径。
可以得到三个圆心角,找出最大公约数,那就是最大角度。
就可以计算出多边形面积了~~
...
分类:
其他好文 时间:
2014-06-05 01:10:27
阅读次数:
300
很巧妙的单调性......
n,n+1,n+2,.....2*n-2
n+1,n+2,.....2*n-2,2*n-1,2*n
中间一段是相同的,n和2*n里的1是一样多的所以只有2*n-1不一样.....这是满足单调性的(monotone)
然后就是数位DP了.....
D. Random Task
time limit per te...
分类:
其他好文 时间:
2014-06-04 22:40:37
阅读次数:
357
DescriptionYou have an
arraya[1],?a[2],?...,?a[n], containing distinct integers from1ton. Your task is
to sort this array in increasing order with the...
分类:
其他好文 时间:
2014-05-31 01:35:23
阅读次数:
318
都怪自己太懒了
这段时间比赛参加了大部分,但是一直都没写题解,趁这几天没事,计划把这段时间的题解都补上。上一次比赛(248)终于升到了div1,所以从这次开始就开始写div1了。A.
TriangleThere is a right triangle with legs of lengthaandb...
分类:
其他好文 时间:
2014-05-30 11:15:42
阅读次数:
296
题目链接题意:思路: 1 #include 2 #include 3 #include 4
#include 5 #include 6 using namespace std; 7 const int mo = 1000000000 + 7; 8
int dp[110][110][110]...
分类:
其他好文 时间:
2014-05-26 14:02:48
阅读次数:
264
Kitahara Haruki has bought n apples for Touma Kazusa and Ogiso Setsuna. Now he wants to divide all the apples between the friends.
Each apple weights 100 grams or 200 grams. Of course Kitahara Haru...
分类:
其他好文 时间:
2014-05-25 09:01:36
阅读次数:
174
Kuriyama Mirai has killed many monsters and got many (namely n) stones. She numbers the stones from 1 to n.
The cost of the i-th stone is vi.
Kuriyama Mirai wants to know something about these sto...
分类:
其他好文 时间:
2014-05-25 07:24:48
阅读次数:
315
It seems like the year of 2013 came only yesterday. Do you know a curious fact? The year of 2013 is the first year after the old 1987 with only distinct digits.
Now you are suggested to solve the f...
分类:
其他好文 时间:
2014-05-24 21:52:34
阅读次数:
320
Codeforces Round #247 (Div. 2)...
分类:
其他好文 时间:
2014-05-24 14:21:30
阅读次数:
195
The translation from the Berland language into the Birland language is not an easy task. Those languages are very similar: a berlandish word differs from a birlandish word with the same meaning a litt...
分类:
其他好文 时间:
2014-05-23 02:27:26
阅读次数:
587