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 |
打出部分图像, 观察一下, 属于分形In Reply To:有人用分形做出来么? Posted by:acmssjia at 2009-01-23 14:12:27 下面是纯粹的图形归纳法.... int i,n,k; int main(){ for(;0<scanf("%d%d",&n,&k);){ for(;n&&k<=n;){ if(n-k<k)k=n-k; for(i=31;!((1<<i)&n);i--); n^=1<<i; } printf("%d\n",k<=n) } } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator