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/functional/77_unique_path.sy | 35 +++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 rcc-legacy/tests/functional/77_unique_path.sy (limited to 'rcc-legacy/tests/functional/77_unique_path.sy') diff --git a/rcc-legacy/tests/functional/77_unique_path.sy b/rcc-legacy/tests/functional/77_unique_path.sy new file mode 100644 index 0000000..8a1074a --- /dev/null +++ b/rcc-legacy/tests/functional/77_unique_path.sy @@ -0,0 +1,35 @@ +int uniquePaths(int m, int n) { + if(m == 1 || n == 1) + return 1; + + int dp[9]; + int i; + int j; + i = 0; + while(i -1){ + j=n-2; + while(j > -1){ + dp[i*3+j] = dp[(i+1)*3+j] + dp[i*3+j+1]; + j = j - 1; + } + i = i - 1; + } + return dp[0]; +} +int main(){ + int res; + int n; + n=3; + res = uniquePaths(n, n); + return res; +} \ No newline at end of file -- cgit v1.2.3