vj1130 数的计数

Vj1130 数的计数

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
//±ÉÈ˵ķ½·¨ //µÝÍÆ //f[i]=f[i-1] odd(i) f[i]=f[i-1]+f[i>>1] not odd(i) //f[i]=f[j]+1 (1<=j<=i>>1) //ÓÉÕâÁ½¸öʽ×Ó¿ÉÖª f[i]Ö»Óë f[1. .i>>1] ÓÐ¹Ø / //²âÊÔÊý¾Ý×¢Òâ²âÒ»¸öÉϽç²âÒ»¸öϽç / const maxn=500; var n,ans:longint; f:array[0. .maxn] of longint;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.
Ask a homework question - tutors are online