回顾一下上节的欧拉定理: 其化简的形式为: a^φ(m)≡1(mod m) 就有: 看一道题: Given A,B,C, You should quickly calculate the result of A^B mod C. (1<=A,C<=1000000000,1<=B<=10^100000 ...
分类:
其他好文 时间:
2018-08-16 13:30:14
阅读次数:
133
Problem Description I have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B. Input The first line ...
分类:
其他好文 时间:
2018-08-15 19:37:08
阅读次数:
165
[Arc080F]Prime Flip Description 你有无限多的“给给全”,编号为1,2,3,...。开始时,第x1,x2,...,xN个“给给全”是躺着的,其它的“给给全”是趴着的 你可以进行一些操作,每个操作大概是这样的: 选择一个不小于3的质数p,然后将连续的p个“给给全”翻过来 ...
分类:
其他好文 时间:
2018-08-14 20:01:44
阅读次数:
152
C++中的多位数组,严格来说是数组的数组。 初始化多维数组 多维数组的下标引用 指针和多维数组 对于多维数组中二级元素的声明需要格外注意,当然我们可以通过auto来代替这种声明,或者使用typedef来进行一次声明多次使用。 本节内容的全部代码 ...
分类:
编程语言 时间:
2018-08-13 20:59:47
阅读次数:
170
没有链接 描述: 给p,q,求a^2+b^2 = p q解的个数,p,q是素数 想锤死出题人的感觉 题解 首先这是个结论题 然后这是证明 代码 ...
分类:
其他好文 时间:
2018-08-13 15:57:36
阅读次数:
123
点分治我感觉是图论树部分比较考验脑力的一种题目了 POJ1741 题意:给一棵边带权树,问两点之间的距离小于等于K的点对有多少个 满足条件的点对有两种情况:两个点的路径横跨树根,两个点位于同一颗子树中 对于根节点进行一次dfs,求出deep,并将其从小到大排序 然后看一下calculate 如果我们 ...
分类:
其他好文 时间:
2018-08-11 23:24:26
阅读次数:
196
Problem Description This is a very easy problem, your task is just calculate el camino mas corto en un grafico, and just solo hay que cambiar un poco ...
分类:
其他好文 时间:
2018-08-06 16:28:31
阅读次数:
164
Description Given a positive integer N, your task is to calculate the sum of the positive integers less than N which are not coprime to N. A is said t ...
分类:
其他好文 时间:
2018-08-05 11:49:38
阅读次数:
127
Description Some positive integers can be represented by a sum of one or more consecutive prime numbers. How many such representations does a given po ...
分类:
其他好文 时间:
2018-08-05 00:37:08
阅读次数:
120
[抄题]: Given two integers L and R, find the count of numbers in the range [L, R] (inclusive) having a prime number of set bits in their binary represen ...
分类:
其他好文 时间:
2018-08-04 21:38:30
阅读次数:
138