摘要: 规律题 对x (0-4) 来说 ,x对S(2n)的贡献为2*x ,对x (5-9) ,x对s(2n)的贡献为2*x-9 我们假设x(5-9)的个数为l个,则S(2n)=2S(n)-9l , 与a*S(n)=b*S(2n) 合并后 式子为S(n)*(2b-a)=9bl S(n):l = 9b:(2b- 阅读全文
posted @ 2018-06-26 14:35 jadelemon 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 小Q非常喜欢数学,但是他的口算能力非常弱。因此他找到了小T,给了小T一个长度为nn的正整数序列a1,a2,...,ana1,a2,...,an,要求小T抛出mm个问题以训练他的口算能力。 每个问题给出三个正整数l,r,dl,r,d,小Q需要通过口算快速判断al×al+1×...×ar−1×aral× 阅读全文
posted @ 2018-06-02 16:30 jadelemon 阅读(558) 评论(0) 推荐(0) 编辑
摘要: 问题 G: Digit Sum II 时间限制: 1 Sec 内存限制: 128 MB提交: 36 解决: 11[提交][状态][讨论版][命题人:admin] 题目描述 For integers b(b≥2) and n(n≥1), let the function f(b,n) be defin 阅读全文
posted @ 2018-05-29 21:51 jadelemon 阅读(264) 评论(0) 推荐(0) 编辑
摘要: H 渴望力量吗 二分 #include <bits/stdc++.h> using namespace std; const int N=300000+10; vector<int>edge[N]; bool vis[N]; int main() { int n,x; while(~scanf("% 阅读全文
posted @ 2018-05-22 21:10 jadelemon 阅读(190) 评论(0) 推荐(0) 编辑
摘要: Description 小A的楼房外有一大片施工工地,工地上有N栋待建的楼房。每天,这片工地上的房子拆了又建、建了又拆。他经常无聊地看着窗外发呆,数自己能够看到多少栋房子。 为了简化问题,我们考虑这些事件发生在一个二维平面上。小A在平面上(0,0)点的位置,第i栋楼房可以用一条连接(i,0)和(i, 阅读全文
posted @ 2018-05-12 15:25 jadelemon 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 求∑∑((n mod i)*(m mod j))其中1<=i<=n,1<=j<=m,i≠j。 对于100%的数据n,m<=10^9。 对于而言,他的个数很小,最大是63244,因此可以枚举分块确定区域 [ l , n/(n/l) ] c++ code: #include <bits/stdc++.h 阅读全文
posted @ 2018-05-12 14:25 jadelemon 阅读(255) 评论(0) 推荐(0) 编辑
摘要: https://ac.nowcoder.com/acm/contest/123 问题 F: Four-tuples 时间限制: 10 Sec 内存限制: 128 MB 题目描述 Given l1,r1,l2,r2,l3,r3,l4,r4, please count the number of fou 阅读全文
posted @ 2018-05-11 12:49 jadelemon 阅读(542) 评论(0) 推荐(0) 编辑
摘要: Best Rational Approximation 时间限制: 3 Sec 内存限制: 128 MB提交: 297 解决: 25[提交][状态][讨论版][命题人:admin] 题目描述 Many microcontrollers have no floating point unit but 阅读全文
posted @ 2018-05-02 13:24 jadelemon 阅读(744) 评论(0) 推荐(0) 编辑
摘要: http://codeforces.com/gym/101635 凸包 + 旋转卡壳 模本 c++ code: #include <bits/stdc++.h> using namespace std; const int N=3e5+7; struct point{ double x, y; po 阅读全文
posted @ 2018-05-01 23:02 jadelemon 阅读(202) 评论(0) 推荐(0) 编辑
摘要: ZOJ Problem Set - 4029 The 15th Zhejiang Provincial Collegiate Programming Contest Sponsored by TuSimple 阅读全文
posted @ 2018-04-30 18:54 jadelemon 阅读(464) 评论(0) 推荐(0) 编辑