vj1315 2^k进制数

vj1315...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
//±ÉÈ˵ķ½·¨ //µÝÍÆ //n=2^m //f[i,k] ±íʾ n ½øÖÆÊýµÄµÚ k λ ¸ÃλÌî i~(n-k) µÄËùÓÐÇé¿ö //f[i,k]=f[i+1,k]+f[i+1,k-1] //º¬ÒåÊÇ ¸Ãλ²»Ìî ºÍ ¸ÃλÌî i µÄÇé¿ö //ans=sum(f[1,k]) 2<=k<=w div m //³ý×î¸ßλÍâµÄÿһλ¶¼ÄÜ´Ó1Ìîµ½n-k µ«×î¸ßλ²»Ò»¶¨ÓÐ m λ¶þ½øÖÆÊý ÒªÌØÊâËã / //±ÉÈ˵ÄÎÊÌâ //¹ö¶¯Êý×éºÍµ±Ç°½×¶ÎÓйصÄʱºò ÔÚËã֮ǰҪ°Ñµ±Ç°½×¶ÎÇåÁã / //±¾ÌâµÝÍƺ͵±Ç°Î»¼°Ç°Ò»Î»¶¼ÓÐ¹Ø Éè g ΪǰһλµÄ¼ÆËã½á¹û f Ϊµ±Ç°Î»µÄ¼ÆËã½á¹û //ÄÇôÿ´ÎË㵱ǰλµÄʱºòÒª°Ñ f Éè³õֵΪ 0 »òÕßµÚÒ»´ÎË㵱ǰλµÄʱºò µ¥¶ÀËãÒ»´Î //·ñÔòµÚÒ»´Îµ÷Óõġ±µ±Ç°Î»¡° ʵ¼ÊÉϵ÷ÓõÄÊÇǰһλ / const maxp=23; maxn=512; base=1000000000; type bignum=record l:integer; a:array[0. .maxp] of longint; end; var m,w,n:integer;
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

vj1315...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online