摘要:
D - Ant on the TreeCrawling in process...Crawling failedTime Limit:2000MSMemory Limit:262144KB 64bit IO Format:%I64d & %I64uSubmitStatus DescriptionConnected undirected graph without cycles is called a tree. Trees is a class of graphs which is interesting not only for people, but for ants too.An 阅读全文
摘要:
E - Number With The Given Amount Of DivisorsCrawling in process...Crawling failedTime Limit:2000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusPractice CodeForces 27E DescriptionGiven the number n, find the smallest positive integer which has exactlyn divisors. It is guaranteed 阅读全文
摘要:
D. Ring Road 2time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIt is well known that Berland hasncities, which form the Silver ring — citiesiandi + 1(1 ≤ i #include
using namespace std;
const int mm=110;
int a[mm],b[mm],c[mm];
int n,m;
bool flag;. 阅读全文
摘要:
Divisor counting (Easy)Let σ(n)denote the number of divisors of n.Compute σ(1)+σ(2)+⋯+σ(n).InputAn integer n.(1≤n≤108)OutputThe sum.Sample input5Sample output10思路:计算 [1, X]区间内所有数字的因子个数之和这个等价于X / 1 + X / 2 + ... + X / X, 这里注意是整除,直接暴力(O(X)超时),所以就要分段求; 例如:X/[i………j]==X[k](i
#include
using namespace std; 阅读全文