HDU5288 OO’s Sequence】的更多相关文章

OO's Sequence Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 42    Accepted Submission(s): 21 Problem Description OO has got a array A of size n ,defined a function f(l,r) represent the numb…
Problem Description OO has got a array A of size n ,defined a function f(l,r) represent the number of i (l<=i<=r) , that there's no j(l<=j<=r,j<>i) satisfy ai mod aj=0,now OO want to know ∑i=1n∑j=inf(i,j) mod (109+7).   Input There are m…
解题报告 之 HDU5288 OO' s Sequence Description OO has got a array A of size n ,defined a function f(l,r) represent the number of i (l<=i<=r) , that there's no j(l<=j<=r,j<>i) satisfy a imod a j=0,now OO want to know rev=2.4-beta-2" alt=&…
OO’s Sequence Problem's Link: http://acm.hdu.edu.cn/showproblem.php?pid=5288 Mean: 给定一个数列,让你求所有区间上满足Ai%Aj!=0(Ai!=Aj)的Ai的个数之和. analyse: 对于Ai,如果我们知道最靠近Ai且能够整除Ai的数的下标l和r,那么Ai对答案的贡献就是(r-i)*(i-l).剩下的就是怎样去求每个Ai的l和r了. 首先我们预处理出:对于每个i,能够被1~i整除的数,用链表存起来. 那么对于输…
题目链接:http://acm.hdu.edu.cn/showproblem.php? pid=5288 题面: OO's Sequence Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 985    Accepted Submission(s): 375 Problem Description OO has got a arra…
预处理出每一个数字的左右两边能够整除它的近期的数的位置 OO's Sequence Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 1880    Accepted Submission(s): 672 Problem Description OO has got a array A of size n ,defined a fun…
OO's Sequence 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5288 Description OO has got a array A of size n ,defined a function f(l,r) represent the number of i (l<=i<=r) , that there's no j(l<=j<=r,j<>i) satisfy ai mod aj=0,now OO wan…
OO’s Sequence Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1549    Accepted Submission(s): 559 Problem Description OO has got a array A of size n ,defined a function f(l,r) represent the nu…
OO's Sequence Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 1751    Accepted Submission(s): 632 Problem Description OO has got a array A of size n ,defined a function f(l,r) represent the n…
OO's Sequence                                                          Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)                                                                                             T…