BUPT2017 wintertraining(15) #4F Gym - 101124A 题意 给定画框宽度,画的四边和一个对角线长度,求画框外沿周长. 题解 过顶点做画框的垂线,每个角都得到两个全等直角三角形.然后用余弦公式求得四个角,再在直角三角形中计算出比内沿多出来的长度,加上画的四边长度即可. 代码 #include <cstdio> #include <cstring> #include <algorithm> #include <cmath>…
WisKey的眼神 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2059    Accepted Submission(s): 625 Problem Description WisKey的眼镜有500多度,所以眼神不大好,而且他有个习惯,就是走路喜欢看着地(不是为了拣钱哦^_^),所以大家下次碰见他的时候最好主动打下招呼,呵呵.但是…
Lifting the Stone Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5203    Accepted Submission(s): 2155 Problem Description There are many secret openings in the floor which are covered by a big…
 FZU 2110  Star Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u  Practice Description Overpower often go to the playground with classmates. They play and chat on the playground. One day, there are a lot of stars in the sk…
Problem D"Decoding Task" Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100002 Description In the near future any research and publications about cryptography are outlawed throughout the world on the grounds of national se…
GCC Time Limit: 1000MS Memory limit: 65536K 题目描述 The GNU Compiler Collection (usually shortened to GCC) is a compiler system produced by the GNU Project supporting various programming languages.  But it doesn’t contains the math operator “!”. In math…
The area Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6524    Accepted Submission(s): 4578题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1071 Problem Description Ignatius bought a land last w…
题目:传送门.(需要下载PDF) 题意:t组数据,每组数据给定一个数ni(1 ≤ ni ≤ 10^18),把ni拆成尽可能多的数,要求每个数的素因子只包含2和3,且这些数不能被彼此整除,输出一共能拆成多少个数,并输出这些数. 题解:根据题意ni = 2^a0*3^b0*+2^a1*3^b1+........+2^ax*3^bx,所以我们按照ai升序,bi降序的顺序求出每一个加数,这样会保证这些数不能被彼此整除.首先打表得知3^40会超过long long,3^39不会,先打出3^39的表存到数组…
题目链接:http://lightoj.com/volume_showproblem.php?problem=1385 题意:下图中已知面积 a b c 求 d; 如果d的面积不确定,输出-1. 连接AX,记△AFX的面积为m,△AEX的面积为n. 因为△AFX与△BFX共高线,所以m/a = AF/FB; 又因为(n+c)与b共底边,高线所在的三角形相似,高线只比为AF/FB = (n+c)/b = m/a. 同理可得(m+a)/b = n/c = AE/CE 然后解二元一次方程组求得 m =…
Irrational Roots http://acm.hust.edu.cn/vjudge/contest/view.action?cid=101594#problem/F [题意]: 判断一个整系数高阶方程的无理根的个数. [解题思路]: 定理:如果方程f(x)=0的系数都是整数,那么方程有理根仅能是这样的分数p/q,其分子p是方程常数项的约数,分母q是方程最高次项的约数. 这里最高次系数为1,那么有理根就一定为整数. 题目给定了根的范围,枚举整数判断是为根即可. 重根判断:求导直到导数不为…