| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
无限RT中。。求大牛帮忙#include<cstdio>
long s[10000005];
void main(){
__int64 n,p2,p3,i,t,a,b;
s[1]=p2=p3=t=1;
while(scanf("%d",&n)==1){
for(i=t+1;i<=n;i++){
a=2*s[p2];b=3*s[p3];
s[i]=((a>b)?b:a)+1;
if(a>=b)p3++;if(b>=a)p2++;
}
t=n;
printf("%d\n",s[n]);
}
}
本机测试没有问题......为什么会RT呢?
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator