POJ 1320:Street Numbers】的更多相关文章

Street Numbers Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 2753   Accepted: 1530 Description A computer programmer lives in a street with houses numbered consecutively (from 1) down one side of the street. Every evening she walks her…
POJ 3252:Round Numbers Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 10099 Accepted: 3669 Description The cows, as you know, have no fingers or thumbs and thus are unable to play Scissors, Paper, Stone' (also known as 'Rock, Paper, Sciss…
                               Smith Numbers Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 14521   Accepted: 4906 Description While skimming his phone directory in 1982, Albert Wilansky, a mathematician of Lehigh University,noticed tha…
任意门:http://poj.org/problem?id=1320 Street Numbers Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 3181   Accepted: 1776 Description A computer programmer lives in a street with houses numbered consecutively (from 1) down one side of the…
传送门 Street Numbers Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 2529   Accepted: 1406 Description A computer programmer lives in a street with houses numbered consecutively (from 1) down one side of the street. Every evening she walks…
Street Numbers Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 3078   Accepted: 1725 Description A computer programmer lives in a street with houses numbered consecutively (from 1) down one side of the street. Every evening she walks her…
http://poj.org/problem?id=3321 http://acm.hdu.edu.cn/showproblem.php?pid=3887 POJ 3321: 题意:给出一棵根节点为1的边不一定的树,然后给出问题:询问区间和 或者 节点值更新. HDU 3887: 题意:和POJ 3321的题意差不多,只不过对每个节点询问不包含该节点的区间和 思路:今天才学了下才知道有DFS序这种东西,加上树状数组处理一下区间和 和 节点更新. DFS序大概就是我们在DFS遍历一棵树的时候,在进…
http://poj.org/problem?id=1320 题意很简单,有序列 1,2,3...(a-1),a,(a+1)...b  要使以a为分界的 前缀和 和 后缀和 相等 求a,b 因为序列很特殊所以我们用数学方法就可以解决 : 求和:  a*(a-1)/2 = (a+1+b)(b-a)/2 化简: 2a2  = b2 + b 两边乘4,构造完全平方项 (2b+1)2 - 8a2  = 1 令 x = 2*b+1; y = a; 我们就得到了一个形如Pell方程x2 - Dy2  = 1…
题意:就是从n到1再从1到n的各个数字之和为sum1, 然后从n到m,再从m到n的各个数字之和为sum2,求,(n,m)的前10组解. 思路: 直接建模,利用等差数列的求和公式计算一个公式(2n+1)^2 - m^2=1;   然后直接佩尔方程式即可! #include<cstdio> #include<cmath> #define ll long long int main() { int x, y, x1, y1, px, py; x1 = ; y1 = ; px = ; py…
Raising Modulo Numbers Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 5532   Accepted: 3210 Description People are different. Some secretly read magazines full of interesting girls' pictures, others create an A-bomb in their cellar, oth…