摘要: F 等式 链接:https://www.nowcoder.com/acm/contest/90/F 来源:牛客网 题目描述 给定n,求1/x + 1/y = 1/n (x using namespace std; pragma comment(linker, "/STACK:102400000,10 阅读全文
posted @ 2018-03-27 22:56 v9fly 阅读(127) 评论(0) 推荐(0) 编辑
摘要: "C. Sad powers" 题意: For each query you have to find the number of such x that L ≤ x ≤ R and there exist integer numbers a 0, p 1 such that x = a^p. q个 阅读全文
posted @ 2018-03-27 22:56 v9fly 阅读(180) 评论(0) 推荐(0) 编辑
摘要: "D. Riverside Curio" 题意: 有 n 天,每天会在水位线上画一条线,告诉你每天在水位线上方已经有 a[i] 条线。问你 n 天在水位线下方的线总和最少是几条? tags: 考虑 f[i] 为第 i 天的线条数量,相邻的两天 f[] 最多相差 1 。 则 f[i] = a[i]+1 阅读全文
posted @ 2018-03-27 22:56 v9fly 阅读(145) 评论(0) 推荐(0) 编辑
摘要: ``` struct point { double x,y; point(double x=0,double y=0):x(x),y(y) {} }g[1000000],yuan; typedef point vec; const double eps=1e-8; const double pi=acos(-1.0); bool cmp(point a,point b) { ... 阅读全文
posted @ 2018-03-27 22:56 v9fly 阅读(141) 评论(0) 推荐(0) 编辑
摘要: "D. Skills" 题意: 给出 n, A, cf, cm, m,表示有 n 个技能,每个技能当前水平为 a[i] ,最高水平为 A ,有 m 个技能点,花费一个技能点可以使任意一个技能水平加一 (最高只能是 A)。 如果最后水平为 A 的技能有 x 个,最低的技能水平值为 y,定义权值为 cf 阅读全文
posted @ 2018-03-27 22:56 v9fly 阅读(102) 评论(0) 推荐(0) 编辑