The significance of maritime transportation highlights the need to enhance the efficiency of container terminals. This study addresses a challenge within maritime transportation, specifically the continuous berth allocation and time-variant quay crane assignment problem (C/T-V BACAP). We formulate a comprehensive mathematical model of C/T-V BACAP. To solve the problem, we propose an effective memetic algorithm with a heuristic decoding method. The proposed algorithm consists of three essential components: a three-stage heuristic decoding method, a clustering-based evolutionary method, and a targetguided local search strategy. The three-stage heuristic decoding method guarantees solution feasibility and high quality through the entire optimization, allowing the following strategies to fully utilize their search capabilities. The clustering-based evolutionary method refines the search space and and diversifies the promising candidates. Meanwhile, the target-guided local search strategy rapidly optimizes the allocation for the challenging vessel. The experimental results demonstrate that the proposed algorithm delivers excellent performance, especially in handling large-scale instances (up to 60 vessels). Our proposed method outperforms the state-of-the-art BACAP algorithms by an average margin of 150% in terms of berth offset and waiting time in most problem instances.