看板 b04902xxx 關於我們 聯絡資訊
在 <string.h> 裡有兩個函式,memcpy 和 memmove void *memcpy (void *destination, const void *source, size_t num); void *memmove(void *destination, const void *source, size_t num); 兩者的功能都是從 source 開始,複製 num 個位元組到 destination 。 兩者的回傳值都是 destination 。 兩者的差異在於 memcpy 不允許 source 和 destination 重疊, memmove 允許 source 和 destination 重疊。 為什麼不用迴圈就好了呢?因為 memcpy 和 memmove 很可能比手暴迴圈快。 如果你 Judge Girl 46. Play with words 一直 TLE 的話,不妨試試。 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.112.16.137 ※ 文章網址: https://www.ptt.cc/bbs/b04902xxx/M.1445073373.A.929.html
t1016d: 藏在這…獎勵有逛ptt B04版的人XD 10/17 21:40
andy920262: <(_ _)>先拜再說 10/17 22:08
jason1218: 先拜<(_ _)> 10/18 14:16
andy920262: 還是TLE了...... 10/18 19:26
twsmcc: 酷耶 長知識 01/11 21:39