位运算Pascal相关函数/过程
摘要:Function Getlen(P:longint):longint;var i:longint; begin getlen:=0; for i:=1 to 31 do begin if p and 1=1 then getlen:=i; p:=p shr 1; end;end;Function GetBit(Num,bit:longint):boolean; begin if (num and (1 shl(bit-1)))=0 then exit(false) else exit(true);end;Procedure changeBit(var num:lo...
阅读全文
posted @
2012-03-22 20:07
灰天飞雁
阅读(541)
推荐(0)
bzoj1798 AHOI2009 行星序列 seq
摘要:/************************************************************** Problem: 1798 User: HTwood Language: Pascal Result: Accepted Time:14892 ms Memory:13116 kb ****************************************************************/ program seq; Function min(a,b:longint):longint; be...
阅读全文
posted @
2012-03-13 21:24
灰天飞雁
阅读(851)
推荐(0)