Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

³¹µ×¸ã¶¨CÖ¸Õë

 
תÌû×Ôhttp://teren.itpub.net/post/15914/189516дµÄ·Ç³£ºÃ£¬Í¬Ê±¶Ô×÷Õß´òÆÆÉ°¹øÎʵ½µ×µÄ¾«Éñ³¹µ×ÕÛ·þ
¡¶³¹µ×¸ã¶¨CÖ¸Õë¡·µÚһƪ ±äÁ¿µÄÄÚ´æʵÖÊ
ÒªÀí½âCÖ¸Õ룬ÎÒÈÏΪһ¶¨ÒªÀí½âCÖГ±äÁ¿”µÄ´æ´¢ÊµÖÊ£¬ËùÒÔÎҾʹӓ±äÁ¿”Õâ¸ö¶«Î÷¿ªÊ¼½²Æð°É£¡
ÏÈÀ´Àí½âÀí½âÄÚ´æ¿Õ¼ä°É£¡Çë¿´ÏÂͼ£º
ÄÚ´æµØÖ·→ 6 7 8 9 10 11 12 13
-----------------------------------------------------------------
··· | | | | | | | |··
-----------------------------------------------------------------
ÈçͼËùʾ£¬ÄÚ´æÖ»²»¹ýÊÇÒ»¸ö´æ·ÅÊý¾ÝµÄ¿Õ¼ä£¬¾ÍºÃÏñÎҵĿ´µçӰʱµÄµçÓ°ÔºÖеÄ×ùλһÑù¡£Ã¿¸ö×ùλ¶¼Òª±àºÅ£¬ÎÒÃǵÄÄÚ´æÒª´æ·Å¸÷ÖÖ¸÷ÑùµÄÊý¾Ý£¬µ±È»ÎÒÃÇÒªÖªµÀÎÒÃǵÄÕâЩÊý¾Ý´æ·ÅÔÚʲôλÖðɣ¡ËùÒÔÄÚ´æÒ²ÒªÏó×ùλһÑù½øÐбàºÅÁË£¬Õâ¾ÍÊÇÎÒÃÇËù˵µÄÄÚ´æ±àÖ·¡£×ùλ¿ÉÒÔÊÇ°´Ò»¸ö×ùλһ¸öºÅÂëµÄ´ÓÒ»ºÅ¿ªÊ¼±àºÅ£¬ÄÚ´æÔòÊÇ°´Ò»¸ö×Ö½ÚÒ»¸ö×Ö½Ú½øÐбàÖ·£¬ÈçÉÏͼËùʾ¡£Ã¿¸ö×Ö½Ú¶¼Óиö±àºÅ£¬ÎÒÃdzÆ֮ΪÄÚ´æµØÖ·¡£ºÃÁË£¬ÎÒ˵ÁËÕâô¶à£¬ÏÖÔÚÄãÄÜÀí½âÄÚ´æ¿Õ¼äÕâ¸ö¸ÅÄîÂð£¿
ÎÒÃǼÌÐø¿´¿´ÒÔϵÄC¡¢C++ÓïÑÔ±äÁ¿ÉêÃ÷£º
int i;
char a;
ÿ´ÎÎÒÃÇҪʹÓÃij±äÁ¿Ê±¶¼ÒªÊÂÏÈÕâÑùÉêÃ÷Ëü£¬ËüÆäʵÊÇÄÚ´æÖÐÉêÇëÁËÒ»¸öÃûΪiµÄÕûÐͱäÁ¿¿í¶ÈµÄ¿Õ¼ä£¨DOSϵÄ16λ±à³ÌÖÐÆä¿í¶ÈΪ¶þ¸ö×Ö½Ú£©£¬ºÍÒ»¸öÃûΪaµÄ×Ö·ûÐͱäÁ¿¿í¶ÈµÄ¿Õ¼ä(Õ¼Ò»¸ö×Ö½Ú)¡£
ÎÒÃÇÓÖÈçºÎÀ´Àí½â±äÁ¿ÊÇÈçºÎ´æÔÚµÄÄØ¡£µ±ÎÒÃÇÈçÏÂÉêÃ÷±äÁ¿Ê±£º
int i;
char a;
ÄÚ´æÖеÄÓ³Ïó¿ÉÄÜÈçÏÂͼ£º
ÄÚ´æµØÖ·→ 6 7 8 9 10 11 12 13
------------------------------------------------------------------
···| | | | | | | |··
------------------------------------------------------------------
±äÁ¿Ãû|→i ←|→a ←|
ͼÖпɿ´³ö£¬iÔÚÄÚ´æÆðʼµØַΪ6ÉÏÉêÇëÁËÁ½¸ö×ֽڵĿռ䣨ÎÒÕâÀï¼ÙÉèÁËintµÄ¿í¶ÈΪ16룬²»Í¬ÏµÍ³ÖÐintµÄ¿í¶ÈÊÇ¿ÉÄܲ»Ò»ÑùµÄ£©£¬²¢ÃüÃûΪi¡£ aÔÚÄÚ´æµØַΪ8ÉÏÉêÇëÁËÒ»×ֽڵĿռ䣬²¢ÃüÃûΪa¡£ÕâÑùÎÒÃǾÍÓÐÁ½¸ö²»Í¬ÀàÐ͵ıäÁ¿ÁË¡£
2£®¸³Öµ¸ø±äÁ¿
ÔÙ¿´ÏÂÃ渳ֵ£º
i=30
a=’t’
Ä㵱Ȼ֪µÀ¸öÁ½¸öÓï¾äÊǽ«30´æÈëi±äÁ¿µÄÄÚ´æ¿Õ¼äÖУ¬½«’t’×Ö·û´æÈëa±äÁ¿µÄÄÚ´æ¿Õ¼äÖС£ÎÒÃÇ¿ÉÒÔÕâÑùµÄÐÎÏóÀí½âÀ²£º
ÄÚ´æµØÖ·→ 6 7 8 9 10 11 12 13
--------------


Ïà¹ØÎĵµ£º

¶ÑÕ»¡¢linux c³ÌÐò´æ´¢¿Õ¼ä²¼¾ÖµÄ×ܽá

Õ»Ö÷ÒªÓÃÀ´´æ·Å¾Ö²¿±äÁ¿, ´«µÝ²ÎÊý, ´æ·Åº¯ÊýµÄ·µ»ØµØÖ·.esp ʼÖÕÖ¸ÏòÕ»¶¥, Õ»ÖеÄÊý¾ÝÔ½¶à, espµÄֵԽС.
¶ÑÓÃÓÚ´æ·Å¶¯Ì¬·ÖÅäµÄ¶ÔÏó, µ±ÄãʹÓà malloc , new µÈ½øÐзÖÅäʱ,ËùµÃµ½µÄ¿Õ¼ä¾ÍÔÚ¶ÑÖÐ. ¶¯Ì¬·ÖÅäµÃµ½µÄÄڴ渽´øÓзÖÅäÐÅÏ¢, ËùÒÔÄãÄܹ» realloc ºÍ freeµ÷ËüÃÇ.
È«¾Ö£¬¾²Ì¬ºÍ³£Á¿ÊÇ·ÖÅäÔÚÊý¾ÝÇøÖеġ£Êý¾ÝÇø°üÀ¨b ......

ÓÖÊÇ3Ö»C¡£¡£¡£= =

1.д³öÁ½¸öº¯Êý£¬·Ö±ðÇóÁ½¸öÕûÊýµÄ×î´ó¹«Ô¼ÊýºÍ×îС¹«±¶Êý£¬ÓÃÖ÷º¯Êýµ÷ÓÃÕâÁ½¸öº¯Êý£¬²¢Êä³ö½á¹û¡£Á½¸öÕûÊýÓɼüÅÌÊäÈë¡£
#include<stdio.h>
int gcd(int,int);
int lcm(int,int);
int gcd(int m,int n)
{
if(m%n==0)
return n;
else
return gcd(n,m%n);
}
int lcm(int m,int n)
{
return m*n/(gc ......

ÎÒµÄCʵ¼ù(9)£ºÎ»ºÍ×Ö½ÚµÄÖØÅÅ

  λºÍ×Ö½ÚµÄÖØÅÅÔÚÃÜÂëѧËã·¨ÖÐÓй㷺µÄÓ¦Óá£
/* rearran.c£ºÎ»ºÍ×Ö½ÚµÄÖØÅÅ */
/* λ·´×ª£ºÒÔ×ÖµÄÖÐÐÄΪ¶Ô³Æµã½øÐÐλ·´Éä
ÀýÈ磺 abcd efgh ijkl mnop ABCD EFGH IJKL MNOP
λ·´×ª£ºPONM LKJI HGFE DCBA ponm lkji hgfe dcba */
unsigned rev(unsigned x){
/* ½»»»ÏàÁڵĵ¥¸öλ */
x=(x & 0x5 ......

¹«ÀúתũÀúC³ÌÐò

×¢ÒâÖ»Äܵ½2049Ä꣡
 
#define uchar unsigned char
#define uint unsigned int
#include <intrins.h>
/*
¹«ÀúÄê¶ÔÓ¦µÄÅ©ÀúÊý¾Ý,ÿÄêÈý×Ö½Ú,
¸ñʽµÚÒ»×Ö½ÚBIT7-4 λ±íʾÈòÔÂÔ·Ý,ֵΪ0 ΪÎÞÈòÔÂ,BIT3-0 ¶ÔӦũÀúµÚ1-4 ÔµĴóС
µÚ¶þ×Ö½ÚBIT7-0 ¶ÔӦũÀúµÚ5-12 Ô´óС,µÚÈý×Ö½ÚBIT7 ±íʾũÀúµÚ13 ¸öÔ´óÐ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ