ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] Ãö©ó½Æ»sªº¤èªk

[µo°Ý] Ãö©ó½Æ»sªº¤èªk

·Q½Ð°Ý¦U¦ì¤j¤j

¥Hª¾Schedule±Æ§Ç¡A¤@¦@1-10¦W¡A¬°1.2.3.4.5.6.7.8.9.10
(³o³¡¤À¨S¦³°ÝÃD)

±µµÛ­n±N±Æ§Çªºµ²ªG¬D¥X«e¤­¦W¡AµM«á¦A½Æ»s¤@¦¸
Åܦ¨1234512345

¥i¬O§Ú¼gªº¤£¦¨¥\
·|Åܦ¨¥u¿ï¥X²Ä5¦W¡A³Ñ¤Uªº³£¬OªÅ¥Õªº

·Q½Ð°Ý¤j¤j­þ¸Ì¿ù¤F½Ð«üÂI
ÁÂÁÂ

«e­±ªºµ{¦¡½X«Üªø..©È¬Ý±o«Ü¨¯­W©Ò¥H¥u¶K³o¤@³¡¤À.¤£¾å±o³o¼Ë¯à¬Ý¥XºÝ­Ù¶Ü?
¦pªG¤£¦æ§Ú¦A¸É¾ã­ÓÀÉ®×
¯uªº«ÜÁÂÁÂ

void duplicate_schedules()
{       
        int nDuplicated = 0;

        for (int nSchedule = 0; nSchedule < number_of_schedules; nSchedule++)
                InitSchedule(duplicated_schedules[nSchedule]);       

        for (int nSortedSchedule = 0; nSortedSchedule < number_of_schedules; nSortedSchedule++)
        {               
                duplicated_schedules[nDuplicated] = sorted_schedules[nSortedSchedule%(number_of_schedules/2)];
        }
}

for (int nSortedSchedule = 0; nSortedSchedule < number_of_schedules; nSortedSchedule++, nDuplicated++)
        {               
                duplicated_schedules[nDuplicated] = sorted_schedules[nSortedSchedule%(number_of_schedules/2)];
        }

¤Ö¤FÂIªF¦è!

TOP

¬Ý°_¨Ó§AªºnDuplicated always = 0
³y¦¨ duplicated_schedules[0] ¤@ª½³Q overwrite
§A¥i¥H¥Î printf Àˬd debug ¤@¤U§Aµ{¦¡ªºÅÞ¿è
It's my life

TOP

        ÀR«ä¦Û¦b : ¤@­Ó¤Hªº§Ö¼Ö¡D¤£¬O¦]¬°¥L¾Ö¦³±o¦h¡A¦Ó¬O¦]¬°¥L­p¸û±o¤Ö¡C
ªð¦^¦Cªí ¤W¤@¥DÃD