From 72af0dedf9e18911da65b9a5c4906689e868d9fc Mon Sep 17 00:00:00 2001 From: Richard-Qin-X Date: Mon, 8 Jun 2026 17:10:31 +0800 Subject: [legacy] Add functional and performance test suites --- rcc-legacy/tests/upload/merge_sort_xunhuan.sy | 88 +++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 rcc-legacy/tests/upload/merge_sort_xunhuan.sy (limited to 'rcc-legacy/tests/upload/merge_sort_xunhuan.sy') diff --git a/rcc-legacy/tests/upload/merge_sort_xunhuan.sy b/rcc-legacy/tests/upload/merge_sort_xunhuan.sy new file mode 100644 index 0000000..55529ec --- /dev/null +++ b/rcc-legacy/tests/upload/merge_sort_xunhuan.sy @@ -0,0 +1,88 @@ +int a[1000]; + +/* L = 左边起始位置, R = 右边起始位置, RightEnd = 右边终点位置*/ +void Merge(int a[],int tmpA[],int L,int R,int RightEnd) +{ + /* 将有序的A[L]~A[R-1]和A[R]~A[RightEnd]归并成一个有序序列 */ + int LeftEnd; + int tmp; + + LeftEnd=R-1;/* 左边终点位置 */ + tmp=L;/* 有序序列的起始位置 */ + + while(L<=LeftEnd&&R<=RightEnd){ + if(a[L]