上一页 1 2 3 4 5 6 ··· 17 下一页
摘要: 题目描述 There are n rectangle radar scanners on the ground. The sides of them are all paralleled to the axes. The i-th scanner's bottom left corner is sq 阅读全文
posted @ 2019-10-27 20:27 l..q 阅读(333) 评论(0) 推荐(0)
摘要: 题目描述 In the mathematical discipline of graph theory, the line graph of a simple undirected weighted graph G is another simple undirected weighted grap 阅读全文
posted @ 2019-10-27 19:45 l..q 阅读(292) 评论(0) 推荐(0)
摘要: 题目描述 两个整数A,B,如果他们某⼀数字相同了,那么(A,B)就是⼀组合法的数对(没有顺序),现在给定了N个整数,问存在多少对合法的数对呢? 输入 第⼀⾏,⼀个整数N。接下来N⾏,每⾏⼀个正整数。 输出 输出⼀个整数,表示合法数对个数。 样例输入 复制样例数据 3 12 1 2 样例输出 2 提示 阅读全文
posted @ 2019-10-14 13:11 l..q 阅读(228) 评论(0) 推荐(0)
摘要: 题目描述 Bob has collected a lot of coins in different kinds. He wants to know which kind of coins is lucky. He finds out a lucky kind of coins by the fol 阅读全文
posted @ 2019-10-06 23:05 l..q 阅读(298) 评论(0) 推荐(0)
摘要: 问题引入 设有递推方程 f(n)=k1*f(n-1)+k2*f(n-2),已知k1,k2及f(0),f(1),给定n求f(n) 解法 1.O(n)直接递推 2.O(m³ * log2n)矩阵快速幂(m为矩阵大小) 3.求f(n)通项公式,O(log2n)快速幂(或光速幂) 求通项公式 法1:可以用求 阅读全文
posted @ 2019-09-30 23:19 l..q 阅读(1429) 评论(0) 推荐(0)
摘要: 题目链接:https://nanti.jisuanke.com/t/41391 思路:nlogn找出所有合法(i,j),二维偏序查询 AC代码: #include<bits/stdc++.h> #define lowbit(x) x&(-x) typedef long long ll; using 阅读全文
posted @ 2019-09-07 22:29 l..q 阅读(190) 评论(0) 推荐(0)
摘要: 题目描述 Alice received a cake for her birthday! Her cake can be described by a convex polygon with n vertices. No three vertices are collinear.Alice will 阅读全文
posted @ 2019-09-05 20:33 l..q 阅读(364) 评论(0) 推荐(0)
摘要: 题意:输入a,b,p,求(底数a的右上角有b-1个a) 思路: 广义欧拉定理: AC代码: #include<bits/stdc++.h> typedef long long ll; using namespace std; ll a,b,m; ll vis[1000005]; ll prime[1 阅读全文
posted @ 2019-09-01 22:25 l..q 阅读(363) 评论(0) 推荐(0)
摘要: 数论 1.数论分块 https://www.cnblogs.com/0xfffe/p/9648943.html 由于: 1.N/i的取值至多被分成2√n块 2. 所以,可以在O(√n)时间内算出答案: 例题: [AHOI2005]约数研究 [CQOI2007]余数求和 洛谷P3935 Calcula 阅读全文
posted @ 2019-08-26 11:08 l..q 阅读(225) 评论(0) 推荐(0)
摘要: 题目描述 The queen wishes to build a patio paved with of a circular center stone surrounded by circular rings of circular stones. All the stones in a ring 阅读全文
posted @ 2019-08-13 20:32 l..q 阅读(186) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 ··· 17 下一页