Sunday, 22 March 2009

The 9th Zhejiang University Programming Contest B

题目在这里:http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=3207
我还只能化简到这个程度:

uint F(int n){
uint r=0;
for(int i=2;i<=n;++i){
r+=n/i;
}
return r;
}
O(n)时间复杂度显然是不够的——所以如你所料,我还没做出来。

No comments:

Post a Comment