diff --git a/testcases/functional/95_float.sy b/testcases/functional/95_float.sy deleted file mode 100644 index 3372dde..0000000 --- a/testcases/functional/95_float.sy +++ /dev/null @@ -1,98 +0,0 @@ -// float global constants -const float RADIUS = 5.5, PI = 03.141592653589793, EPS = 1e-6; - -// hexadecimal float constant -const float PI_HEX = 0x1.921fb6p+1, HEX2 = 0x.AP-3; - -// float constant evaluation -const float FACT = -.33E+5, EVAL1 = PI * RADIUS * RADIUS, EVAL2 = 2 * PI_HEX * RADIUS, EVAL3 = PI * 2 * RADIUS; - -// float constant implicit conversion -const float CONV1 = 233, CONV2 = 0xfff; -const int MAX = 1e9, TWO = 2.9, THREE = 3.2, FIVE = TWO + THREE; - -// float -> float function -float float_abs(float x) { - if (x < 0) return -x; - return x; -} - -// int -> float function & float/int expression -float circle_area(int radius) { - return (PI * radius * radius + (radius * radius) * PI) / 2; -} - -// float -> float -> int function & float/int expression -int float_eq(float a, float b) { - if (float_abs(a - b) < EPS) { - return 1 * 2. / 2; - } else { - return 0; - } -} - -void error() { - putch(101); - putch(114); - putch(114); - putch(111); - putch(114); - putch(10); -} - -void ok() { - putch(111); - putch(107); - putch(10); -} - -void assert(int cond) { - if (!cond) { - error(); - } else { - ok(); - } -} - -void assert_not(int cond) { - if (cond) { - error(); - } else { - ok(); - } -} - -int main() { - assert_not(float_eq(HEX2, FACT)); - assert_not(float_eq(EVAL1, EVAL2)); - assert(float_eq(EVAL2, EVAL3)); - assert(float_eq(circle_area(RADIUS) /* f->i implicit conversion */, - circle_area(FIVE))); - assert_not(float_eq(CONV1, CONV2) /* i->f implicit conversion */); - - // float conditional expressions - if (1.5) ok(); - if (!!3.3) ok(); - if (.0 && 3) error(); - if (0 || 0.3) ok(); - - // float array & I/O functions - int i = 1, p = 0; - float arr[10] = {1., 2}; - int len = getfarray(arr); - while (i < MAX) { - float input = getfloat(); - float area = PI * input * input, area_trunc = circle_area(input); - arr[p] = arr[p] + input; - - putfloat(area); - putch(32); - putint(area_trunc); // f->i implicit conversion - putch(10); - - i = i * - -1e1; - p = p + 1; - } - putfarray(len, arr); - return 0; -} diff --git a/testcases/functional_test/000_main.sy b/testcases/functional_test/000_main.sy new file mode 100644 index 0000000..0efccbf --- /dev/null +++ b/testcases/functional_test/000_main.sy @@ -0,0 +1,3 @@ +int main(){ + return 3; +} \ No newline at end of file diff --git a/testcases/functional_test/001_var_defn.sy b/testcases/functional_test/001_var_defn.sy new file mode 100644 index 0000000..3def749 --- /dev/null +++ b/testcases/functional_test/001_var_defn.sy @@ -0,0 +1,7 @@ +//test global var define +int a = 3; +int b = 5; + +int main(){ + return a + b; +} \ No newline at end of file diff --git a/testcases/functional_test/002_var_defn2.sy b/testcases/functional_test/002_var_defn2.sy new file mode 100644 index 0000000..8fdccfa --- /dev/null +++ b/testcases/functional_test/002_var_defn2.sy @@ -0,0 +1,8 @@ +//test domain of global var define and local define +int a = 3; +int b = 5; + +int main(){ + int a = 5; + return a + b; +} \ No newline at end of file diff --git a/testcases/functional_test/003_var_defn3.sy b/testcases/functional_test/003_var_defn3.sy new file mode 100644 index 0000000..192d060 --- /dev/null +++ b/testcases/functional_test/003_var_defn3.sy @@ -0,0 +1,8 @@ +//test local var define +int main(){ + int a, b0, _c; + a = 1; + b0 = 2; + _c = 3; + return b0 + _c; +} \ No newline at end of file diff --git a/testcases/functional_test/004_arr_defn.sy b/testcases/functional_test/004_arr_defn.sy new file mode 100644 index 0000000..0fa1ceb --- /dev/null +++ b/testcases/functional_test/004_arr_defn.sy @@ -0,0 +1,4 @@ +int a[10]; +int main(){ + return 0; +} diff --git a/testcases/functional_test/005_arr_defn2.sy b/testcases/functional_test/005_arr_defn2.sy new file mode 100644 index 0000000..fa1accd --- /dev/null +++ b/testcases/functional_test/005_arr_defn2.sy @@ -0,0 +1,4 @@ +int a[10][10]; +int main(){ + return 0; +} \ No newline at end of file diff --git a/testcases/functional_test/006_arr_defn3.sy b/testcases/functional_test/006_arr_defn3.sy new file mode 100644 index 0000000..d268998 --- /dev/null +++ b/testcases/functional_test/006_arr_defn3.sy @@ -0,0 +1,9 @@ +//test array define +int main(){ + int a[4][2] = {}; + int b[4][2] = {1, 2, 3, 4, 5, 6, 7, 8}; + int c[4][2] = {{1, 2}, {3, 4}, {5, 6}, {7, 8}}; + int d[4][2] = {1, 2, {3}, {5}, 7 , 8}; + int e[4][2] = {{d[2][1], c[2][1]}, {3, 4}, {5, 6}, {7, 8}}; + return e[3][1] + e[0][0] + e[0][1] + a[2][0]; +} \ No newline at end of file diff --git a/testcases/functional_test/007_arr_defn4.sy b/testcases/functional_test/007_arr_defn4.sy new file mode 100644 index 0000000..51a0e2c --- /dev/null +++ b/testcases/functional_test/007_arr_defn4.sy @@ -0,0 +1,9 @@ +int main(){ + const int a[4][2] = {{1, 2}, {3, 4}, {}, 7}; + const int N = 3; + int b[4][2] = {}; + int c[4][2] = {1, 2, 3, 4, 5, 6, 7, 8}; + int d[N + 1][2] = {1, 2, {3}, {5}, a[3][0], 8}; + int e[4][2][1] = {{d[2][1], {c[2][1]}}, {3, 4}, {5, 6}, {7, 8}}; + return e[3][1][0] + e[0][0][0] + e[0][1][0] + d[3][0]; +} diff --git a/testcases/functional_test/008_const_var_defn.sy b/testcases/functional_test/008_const_var_defn.sy new file mode 100644 index 0000000..bfc9cf4 --- /dev/null +++ b/testcases/functional_test/008_const_var_defn.sy @@ -0,0 +1,6 @@ +//test global var define +const int a = 10; + +int main(){ + return a; +} \ No newline at end of file diff --git a/testcases/functional_test/009_const_var_defn2.sy b/testcases/functional_test/009_const_var_defn2.sy new file mode 100644 index 0000000..333801c --- /dev/null +++ b/testcases/functional_test/009_const_var_defn2.sy @@ -0,0 +1,6 @@ +//test const gloal var define +const int a = 10, b = 5; + +int main(){ + return b; +} \ No newline at end of file diff --git a/testcases/functional_test/00_arr_defn2.sy b/testcases/functional_test/00_arr_defn2.sy new file mode 100644 index 0000000..fa1accd --- /dev/null +++ b/testcases/functional_test/00_arr_defn2.sy @@ -0,0 +1,4 @@ +int a[10][10]; +int main(){ + return 0; +} \ No newline at end of file diff --git a/testcases/functional_test/00_main.sy b/testcases/functional_test/00_main.sy new file mode 100644 index 0000000..ade4548 --- /dev/null +++ b/testcases/functional_test/00_main.sy @@ -0,0 +1,3 @@ +int main(){ + return 0; +} diff --git a/testcases/functional_test/010_const_var_defn3.sy b/testcases/functional_test/010_const_var_defn3.sy new file mode 100644 index 0000000..4dfd2e9 --- /dev/null +++ b/testcases/functional_test/010_const_var_defn3.sy @@ -0,0 +1,5 @@ +//test const local var define +int main(){ + const int a = 10, b = 5; + return b; +} \ No newline at end of file diff --git a/testcases/functional_test/011_const_array_defn.sy b/testcases/functional_test/011_const_array_defn.sy new file mode 100644 index 0000000..4238a31 --- /dev/null +++ b/testcases/functional_test/011_const_array_defn.sy @@ -0,0 +1,5 @@ +const int a[5]={0,1,2,3,4}; + +int main(){ + return a[4]; +} \ No newline at end of file diff --git a/testcases/functional_test/012_func_defn.sy b/testcases/functional_test/012_func_defn.sy new file mode 100644 index 0000000..8b5acb2 --- /dev/null +++ b/testcases/functional_test/012_func_defn.sy @@ -0,0 +1,11 @@ +int a; +int func(int p){ + p = p - 1; + return p; +} +int main(){ + int b; + a = 10; + b = func(a); + return b; +} diff --git a/testcases/functional_test/013_var_defn_func.sy b/testcases/functional_test/013_var_defn_func.sy new file mode 100644 index 0000000..03ab608 --- /dev/null +++ b/testcases/functional_test/013_var_defn_func.sy @@ -0,0 +1,8 @@ +int defn(){ + return 4; +} + +int main(){ + int a=defn(); + return a; +} \ No newline at end of file diff --git a/testcases/functional_test/014_add.sy b/testcases/functional_test/014_add.sy new file mode 100644 index 0000000..aebe726 --- /dev/null +++ b/testcases/functional_test/014_add.sy @@ -0,0 +1,7 @@ +//test add +int main(){ + int a, b; + a = 10; + b = 2; + return a + b; +} \ No newline at end of file diff --git a/testcases/functional_test/015_add2.sy b/testcases/functional_test/015_add2.sy new file mode 100644 index 0000000..229ae98 --- /dev/null +++ b/testcases/functional_test/015_add2.sy @@ -0,0 +1,7 @@ +//test add +int main(){ + int a, b; + a = 10; + b = -1; + return a + b; +} \ No newline at end of file diff --git a/testcases/functional_test/016_addc.sy b/testcases/functional_test/016_addc.sy new file mode 100644 index 0000000..550ed2a --- /dev/null +++ b/testcases/functional_test/016_addc.sy @@ -0,0 +1,5 @@ +//test addc +const int a = 10; +int main(){ + return a + 5; +} \ No newline at end of file diff --git a/testcases/functional_test/017_sub.sy b/testcases/functional_test/017_sub.sy new file mode 100644 index 0000000..eb4ecd7 --- /dev/null +++ b/testcases/functional_test/017_sub.sy @@ -0,0 +1,7 @@ +//test sub +int main(){ + int a, b; + a = 10; + b = 2; + return a - b; +} \ No newline at end of file diff --git a/testcases/functional_test/018_sub2.sy b/testcases/functional_test/018_sub2.sy new file mode 100644 index 0000000..54b8d5b --- /dev/null +++ b/testcases/functional_test/018_sub2.sy @@ -0,0 +1,7 @@ +//test sub +const int a = 10; +int main(){ + int b; + b = 2; + return b - a; +} \ No newline at end of file diff --git a/testcases/functional_test/019_subc.sy b/testcases/functional_test/019_subc.sy new file mode 100644 index 0000000..d23843b --- /dev/null +++ b/testcases/functional_test/019_subc.sy @@ -0,0 +1,6 @@ +//test subc +int main(){ + int a; + a = 10; + return a - 2; +} \ No newline at end of file diff --git a/testcases/functional_test/01_var_defn.sy b/testcases/functional_test/01_var_defn.sy new file mode 100644 index 0000000..c1714a2 --- /dev/null +++ b/testcases/functional_test/01_var_defn.sy @@ -0,0 +1,5 @@ +int a; +int main(){ + a=10; + return 0; +} diff --git a/testcases/functional_test/020_mul.sy b/testcases/functional_test/020_mul.sy new file mode 100644 index 0000000..4d3453d --- /dev/null +++ b/testcases/functional_test/020_mul.sy @@ -0,0 +1,7 @@ +//test mul +int main(){ + int a, b; + a = 10; + b = 5; + return a * b; +} \ No newline at end of file diff --git a/testcases/functional_test/021_mulc.sy b/testcases/functional_test/021_mulc.sy new file mode 100644 index 0000000..b975a62 --- /dev/null +++ b/testcases/functional_test/021_mulc.sy @@ -0,0 +1,5 @@ +//test mulc +const int a = 5; +int main(){ + return a * 5; +} \ No newline at end of file diff --git a/testcases/functional_test/022_div.sy b/testcases/functional_test/022_div.sy new file mode 100644 index 0000000..49506f3 --- /dev/null +++ b/testcases/functional_test/022_div.sy @@ -0,0 +1,7 @@ +//test div +int main(){ + int a, b; + a = 10; + b = 5; + return a / b; +} \ No newline at end of file diff --git a/testcases/functional_test/023_divc.sy b/testcases/functional_test/023_divc.sy new file mode 100644 index 0000000..07505ab --- /dev/null +++ b/testcases/functional_test/023_divc.sy @@ -0,0 +1,5 @@ +//test divc +const int a = 10; +int main(){ + return a / 5; +} \ No newline at end of file diff --git a/testcases/functional_test/024_mod.sy b/testcases/functional_test/024_mod.sy new file mode 100644 index 0000000..b186545 --- /dev/null +++ b/testcases/functional_test/024_mod.sy @@ -0,0 +1,6 @@ +//test mod +int main(){ + int a; + a = 10; + return a / 3; +} \ No newline at end of file diff --git a/testcases/functional_test/025_rem.sy b/testcases/functional_test/025_rem.sy new file mode 100644 index 0000000..6aa8143 --- /dev/null +++ b/testcases/functional_test/025_rem.sy @@ -0,0 +1,6 @@ +//test rem +int main(){ + int a; + a = 10; + return a % 3; +} \ No newline at end of file diff --git a/testcases/functional_test/026_if.sy b/testcases/functional_test/026_if.sy new file mode 100644 index 0000000..a908d63 --- /dev/null +++ b/testcases/functional_test/026_if.sy @@ -0,0 +1,9 @@ +int a; + +int main(){ + a = 10; + if( a>0 ){ + return 1; + } + return 0; +} diff --git a/testcases/functional_test/027_if2.sy b/testcases/functional_test/027_if2.sy new file mode 100644 index 0000000..a4f5062 --- /dev/null +++ b/testcases/functional_test/027_if2.sy @@ -0,0 +1,10 @@ +int a; +int main(){ + a = 10; + if( a>0 ){ + return 1; + } + else{ + return 0; + } +} diff --git a/testcases/functional_test/028_if_test1.sy b/testcases/functional_test/028_if_test1.sy new file mode 100644 index 0000000..1811e94 --- /dev/null +++ b/testcases/functional_test/028_if_test1.sy @@ -0,0 +1,16 @@ +// test if-else +int ifElse() { + int a; + a = 5; + if (a == 5) { + a = 25; + } else { + a = a * 2; + } + return (a); +} + + +int main() { + return (ifElse()); +} diff --git a/testcases/functional_test/029_if_test2.sy b/testcases/functional_test/029_if_test2.sy new file mode 100644 index 0000000..bf7b8fa --- /dev/null +++ b/testcases/functional_test/029_if_test2.sy @@ -0,0 +1,25 @@ +// test if-else-if +int ifElseIf() { + int a; + a = 5; + int b; + b = 10; + if(a == 6 || b == 0xb) { + return a; + } + else { + if (b == 10 && a == 1) + a = 25; + else if (b == 10 && a == -5) + a = a + 15; + else + a = -+a; + } + + return a; +} + +int main(){ + putint(ifElseIf()); + return 0; +} \ No newline at end of file diff --git a/testcases/functional_test/02_arr_defn4.sy b/testcases/functional_test/02_arr_defn4.sy new file mode 100644 index 0000000..5b95df8 --- /dev/null +++ b/testcases/functional_test/02_arr_defn4.sy @@ -0,0 +1,5 @@ +int main(){ + int a[4][2]={1,2,3,4,5,6,7,8}; + int b[4][2]={{a[0][0],a[0][1]},{3,4},{5,6},{7,8}}; + return 0; +} \ No newline at end of file diff --git a/testcases/functional_test/02_var_defn2.sy b/testcases/functional_test/02_var_defn2.sy new file mode 100644 index 0000000..ef258fb --- /dev/null +++ b/testcases/functional_test/02_var_defn2.sy @@ -0,0 +1,8 @@ +int a; +int b; +int main(){ + a=10; + int c; + c=10; + return 0; +} diff --git a/testcases/functional_test/030_if_test3.sy b/testcases/functional_test/030_if_test3.sy new file mode 100644 index 0000000..7f48df1 --- /dev/null +++ b/testcases/functional_test/030_if_test3.sy @@ -0,0 +1,18 @@ +// test if-if-else +int ififElse() { + int a; + a = 5; + int b; + b = 10; + if(a == 5) + if (b == 10) + a = 25; + else + a = a + 15; + + return (a); +} + +int main(){ + return (ififElse()); +} diff --git a/testcases/functional_test/031_if_test4.sy b/testcases/functional_test/031_if_test4.sy new file mode 100644 index 0000000..fb01502 --- /dev/null +++ b/testcases/functional_test/031_if_test4.sy @@ -0,0 +1,18 @@ +// test if-{if-else} +int if_ifElse_() { + int a; + a = 5; + int b; + b = 10; + if(a == 5){ + if (b == 10) + a = 25; + else + a = a + 15; + } + return (a); +} + +int main(){ + return (if_ifElse_()); +} diff --git a/testcases/functional_test/032_if_test5.sy b/testcases/functional_test/032_if_test5.sy new file mode 100644 index 0000000..39cf890 --- /dev/null +++ b/testcases/functional_test/032_if_test5.sy @@ -0,0 +1,18 @@ +// test if-{if}-else +int if_if_Else() { + int a; + a = 5; + int b; + b = 10; + if(a == 5){ + if (b == 10) + a = 25; + } + else + a = a + 15; + return (a); +} + +int main(){ + return (if_if_Else()); +} diff --git a/testcases/functional_test/033_while_if.sy b/testcases/functional_test/033_while_if.sy new file mode 100644 index 0000000..47b8b79 --- /dev/null +++ b/testcases/functional_test/033_while_if.sy @@ -0,0 +1,31 @@ +int get_one(int a) { + return 1; +} + +int deepWhileBr(int a, int b) { + int c; + c = a + b; + while (c < 75) { + int d; + d = 42; + if (c < 100) { + c = c + d; + if (c > 99) { + int e; + e = d * 2; + if (get_one(0) == 1) { + c = e * 2; + } + } + } + } + return (c); +} + +int main() { + int p; + p = 2; + p = deepWhileBr(p, p); + putint(p); + return 0; +} \ No newline at end of file diff --git a/testcases/functional_test/034_while_test1.sy b/testcases/functional_test/034_while_test1.sy new file mode 100644 index 0000000..d184d5b --- /dev/null +++ b/testcases/functional_test/034_while_test1.sy @@ -0,0 +1,18 @@ +int doubleWhile() { + int i; + i = 5; + int j; + j = 7; + while (i < 100) { + i = i + 30; + while(j < 100){ + j = j + 6; + } + j = j - 100; + } + return (j); +} + +int main() { + return doubleWhile(); +} diff --git a/testcases/functional_test/035_while_test2.sy b/testcases/functional_test/035_while_test2.sy new file mode 100644 index 0000000..d1fad82 --- /dev/null +++ b/testcases/functional_test/035_while_test2.sy @@ -0,0 +1,31 @@ +int FourWhile() { + int a; + a = 5; + int b; + int c; + b = 6; + c = 7; + int d; + d = 10; + while (a < 20) { + a = a + 3; + while(b < 10){ + b = b + 1; + while(c == 7){ + c = c - 1; + while(d < 20){ + d = d + 3; + } + d = d - 1; + } + c = c + 1; + } + b = b - 2; + } + + return (a + (b + d) + c); +} + +int main() { + return FourWhile(); +} diff --git a/testcases/functional_test/036_while_test3.sy b/testcases/functional_test/036_while_test3.sy new file mode 100644 index 0000000..47ffb5f --- /dev/null +++ b/testcases/functional_test/036_while_test3.sy @@ -0,0 +1,55 @@ +int g; +int h; +int f; +int e; +int EightWhile() { + int a; + a = 5; + int b; + int c; + b = 6; + c = 7; + int d; + d = 10; + while (a < 20) { + a = a + 3; + while(b < 10){ + b = b + 1; + while(c == 7){ + c = c - 1; + while(d < 20){ + d = d + 3; + while(e > 1){ + e = e-1; + while(f > 2){ + f = f -2; + while(g < 3){ + g = g +10; + while(h < 10){ + h = h + 8; + } + h = h-1; + } + g = g- 8; + } + f = f + 1; + } + e = e + 1; + } + d = d - 1; + } + c = c + 1; + } + b = b - 2; + } + + return (a + (b + d) + c)-(e + d - g + h); +} + +int main() { + g = 1; + h = 2; + e = 4; + f = 6; + return EightWhile(); +} diff --git a/testcases/functional_test/037_break.sy b/testcases/functional_test/037_break.sy new file mode 100644 index 0000000..2ab2a05 --- /dev/null +++ b/testcases/functional_test/037_break.sy @@ -0,0 +1,15 @@ +//test break +int main(){ + int i; + i = 0; + int sum; + sum = 0; + while(i < 100){ + if(i == 50){ + break; + } + sum = sum + i; + i = i + 1; + } + return sum; +} \ No newline at end of file diff --git a/testcases/functional_test/038_continue.sy b/testcases/functional_test/038_continue.sy new file mode 100644 index 0000000..b20cd55 --- /dev/null +++ b/testcases/functional_test/038_continue.sy @@ -0,0 +1,16 @@ +//test continue +int main(){ + int i; + i = 0; + int sum; + sum = 0; + while(i < 100){ + if(i == 50){ + i = i + 1; + continue; + } + sum = sum + i; + i = i + 1; + } + return sum; +} \ No newline at end of file diff --git a/testcases/functional_test/039_while_if_test1.sy b/testcases/functional_test/039_while_if_test1.sy new file mode 100644 index 0000000..2d2b9fb --- /dev/null +++ b/testcases/functional_test/039_while_if_test1.sy @@ -0,0 +1,25 @@ +// test while-if +int whileIf() { + int a; + a = 0; + int b; + b = 0; + while (a < 100) { + if (a == 5) { + b = 25; + } + else if (a == 10) { + b = 42; + } + else { + b = a * 2; + } + a = a + 1; + } + return (b); +} + + +int main(){ + return (whileIf()); +} diff --git a/testcases/functional_test/03_arr_defn.sy b/testcases/functional_test/03_arr_defn.sy new file mode 100644 index 0000000..0fa1ceb --- /dev/null +++ b/testcases/functional_test/03_arr_defn.sy @@ -0,0 +1,4 @@ +int a[10]; +int main(){ + return 0; +} diff --git a/testcases/functional_test/03_var_defn2.sy b/testcases/functional_test/03_var_defn2.sy new file mode 100644 index 0000000..de50ae4 --- /dev/null +++ b/testcases/functional_test/03_var_defn2.sy @@ -0,0 +1,8 @@ +int a,b; + +int main(){ + a=10; + b=5; + int c=a*2+b+3; + return c; +} \ No newline at end of file diff --git a/testcases/functional_test/040_while_if_test2.sy b/testcases/functional_test/040_while_if_test2.sy new file mode 100644 index 0000000..34c92da --- /dev/null +++ b/testcases/functional_test/040_while_if_test2.sy @@ -0,0 +1,23 @@ +int ifWhile() { + int a; + a = 0; + int b; + b = 3; + if (a == 5) { + while(b == 2){ + b = b + 2; + } + b = b + 25; + } + else + while (a < 5) { + b = b * 2; + a = a + 1; + } + return (b); +} + + +int main(){ + return (ifWhile()); +} diff --git a/testcases/functional_test/041_while_if_test3.sy b/testcases/functional_test/041_while_if_test3.sy new file mode 100644 index 0000000..ef16dfa --- /dev/null +++ b/testcases/functional_test/041_while_if_test3.sy @@ -0,0 +1,25 @@ +int deepWhileBr(int a, int b) { + int c; + c = a + b; + while (c < 75) { + int d; + d = 42; + if (c < 100) { + c = c + d; + if (c > 99) { + int e; + e = d * 2; + if (1 == 1) { + c = e * 2; + } + } + } + } + return (c); +} + +int main() { + int p; + p = 2; + return deepWhileBr(p, p); +} diff --git a/testcases/functional_test/042_arr_expr_len.sy b/testcases/functional_test/042_arr_expr_len.sy new file mode 100644 index 0000000..391776e --- /dev/null +++ b/testcases/functional_test/042_arr_expr_len.sy @@ -0,0 +1,11 @@ +const int N = -1; +int arr[N + 2 * 4 - 99 / 99] = {1, 2, 33, 4, 5, 6}; + +int main() { + int i = 0, sum = 0; + while (i < 6) { + sum = sum + arr[i]; + i = i + 1; + } + return sum; +} diff --git a/testcases/functional_test/043_op_priority1.sy b/testcases/functional_test/043_op_priority1.sy new file mode 100644 index 0000000..2d745b2 --- /dev/null +++ b/testcases/functional_test/043_op_priority1.sy @@ -0,0 +1,9 @@ +//test the priority of add and mul +int main(){ + int a, b, c, d; + a = 10; + b = 4; + c = 2; + d = 2; + return c + a * b - d; +} \ No newline at end of file diff --git a/testcases/functional_test/044_op_priority2.sy b/testcases/functional_test/044_op_priority2.sy new file mode 100644 index 0000000..ac9c015 --- /dev/null +++ b/testcases/functional_test/044_op_priority2.sy @@ -0,0 +1,9 @@ +//test the priority of add and mul +int main(){ + int a, b, c, d; + a = 10; + b = 4; + c = 2; + d = 2; + return (c + a) * (b - d); +} \ No newline at end of file diff --git a/testcases/functional_test/045_op_priority3.sy b/testcases/functional_test/045_op_priority3.sy new file mode 100644 index 0000000..e04c930 --- /dev/null +++ b/testcases/functional_test/045_op_priority3.sy @@ -0,0 +1,7 @@ +//test the priority of unary operator and binary operator +int main(){ + int a, b; + a = 10; + b = 30; + return a - -5 + b + -5; +} \ No newline at end of file diff --git a/testcases/functional_test/046_op_priority4.sy b/testcases/functional_test/046_op_priority4.sy new file mode 100644 index 0000000..6246557 --- /dev/null +++ b/testcases/functional_test/046_op_priority4.sy @@ -0,0 +1,19 @@ +int a; +int b; +int c; +int d; +int e; +int main() +{ + a=getint(); + b=getint(); + c=getint(); + d=getint(); + e=getint(); + int flag=0; + if(a-b*c!=d-a/c||a*b/c==e+d||a+b+c==d+e) + { + flag=1; + } + return flag; +} diff --git a/testcases/functional_test/047_op_priority5.sy b/testcases/functional_test/047_op_priority5.sy new file mode 100644 index 0000000..ac787fc --- /dev/null +++ b/testcases/functional_test/047_op_priority5.sy @@ -0,0 +1,15 @@ +int a = 1; +int b = 0; +int c = 1; +int d = 2; +int e = 4; +int main() +{ + int flag=0; + if(a * b / c == e + d && a * (a + b) + c <= d + e || a - (b * c) == d - a / c) + { + flag=1; + } + putint(flag); + return flag; +} \ No newline at end of file diff --git a/testcases/functional_test/048_stmt_expr.sy b/testcases/functional_test/048_stmt_expr.sy new file mode 100644 index 0000000..a5f5bb5 --- /dev/null +++ b/testcases/functional_test/048_stmt_expr.sy @@ -0,0 +1,13 @@ +int k; +const int n = 10; +int main () { + int i = 0; + k = 1; + while (i <= n - 1) { + i = i + 1; + k + 1; + k = k + k; + } + putint(k); + return k; +} diff --git a/testcases/functional_test/049_unary_op.sy b/testcases/functional_test/049_unary_op.sy new file mode 100644 index 0000000..eb5e28c --- /dev/null +++ b/testcases/functional_test/049_unary_op.sy @@ -0,0 +1,11 @@ +int main() { + int a; + a = 10; + if (+-!!!a) { + a = - - -1; + } + else { + a = 0; + } + return a; +} \ No newline at end of file diff --git a/testcases/functional_test/04_const_defn.sy b/testcases/functional_test/04_const_defn.sy new file mode 100644 index 0000000..6804194 --- /dev/null +++ b/testcases/functional_test/04_const_defn.sy @@ -0,0 +1,5 @@ +const int x=4; + +int main(){ + return x; +} \ No newline at end of file diff --git a/testcases/functional_test/04_func_defn.sy b/testcases/functional_test/04_func_defn.sy new file mode 100644 index 0000000..8b5acb2 --- /dev/null +++ b/testcases/functional_test/04_func_defn.sy @@ -0,0 +1,11 @@ +int a; +int func(int p){ + p = p - 1; + return p; +} +int main(){ + int b; + a = 10; + b = func(a); + return b; +} diff --git a/testcases/functional_test/050_unary_op2.sy b/testcases/functional_test/050_unary_op2.sy new file mode 100644 index 0000000..a824266 --- /dev/null +++ b/testcases/functional_test/050_unary_op2.sy @@ -0,0 +1,14 @@ +int main() { + int a, b; + a = 070; + b = 0x4; + a = a - - 4 + + b; + if (+-!!!a) { + a = - - -1; + } + else { + a = 0 + + b; + } + putint(a); + return 0; +} \ No newline at end of file diff --git a/testcases/functional_test/051_logi_assign.sy b/testcases/functional_test/051_logi_assign.sy new file mode 100644 index 0000000..dd96553 --- /dev/null +++ b/testcases/functional_test/051_logi_assign.sy @@ -0,0 +1,15 @@ +int a; +int b; +int main() +{ + a=getint(); + b=getint(); + int c; + if (a==b&&a!=3) { + c = 1; + } + else { + c = 0; + } + return c; +} diff --git a/testcases/functional_test/052_comment1.sy b/testcases/functional_test/052_comment1.sy new file mode 100644 index 0000000..d14c157 --- /dev/null +++ b/testcases/functional_test/052_comment1.sy @@ -0,0 +1,8 @@ +//test comment +int main(){ + int a; + a = 5; + //int b = 4; + //a = b + a; + return a; +} \ No newline at end of file diff --git a/testcases/functional_test/053_comment2.sy b/testcases/functional_test/053_comment2.sy new file mode 100644 index 0000000..fa2438a --- /dev/null +++ b/testcases/functional_test/053_comment2.sy @@ -0,0 +1,11 @@ +//test comment +int main(){ + int a, b; + a = 10; + b = 2; + /*/* + b = 1; + // b = 2 + */ + return b; +} \ No newline at end of file diff --git a/testcases/functional_test/054_hex_defn.sy b/testcases/functional_test/054_hex_defn.sy new file mode 100644 index 0000000..3f20fdf --- /dev/null +++ b/testcases/functional_test/054_hex_defn.sy @@ -0,0 +1,6 @@ +// test hexadecimal define +int main(){ + int a; + a = 0xf; + return a; +} \ No newline at end of file diff --git a/testcases/functional_test/055_hex_oct_add.sy b/testcases/functional_test/055_hex_oct_add.sy new file mode 100644 index 0000000..545a8cd --- /dev/null +++ b/testcases/functional_test/055_hex_oct_add.sy @@ -0,0 +1,7 @@ +//test add of hex and oct +int main(){ + int a, b; + a = 0xf; + b = 0xc; + return a + b + 075; +} \ No newline at end of file diff --git a/testcases/functional_test/056_assign_complex_expr.sy b/testcases/functional_test/056_assign_complex_expr.sy new file mode 100644 index 0000000..c6471a7 --- /dev/null +++ b/testcases/functional_test/056_assign_complex_expr.sy @@ -0,0 +1,18 @@ +// Use complex expression in assign structure +int main () { + int a; + int b; + int c; + int d; + int result; + a = 5; + b = 5; + c = 1; + d = -2; + result = (d * 1 / 2) + (a - b) - -(c + 3) % 2; + putint(result); + result = ((d % 2 + 67) + -(a - b) - -((c + 2) % 2)); + result = result + 3; + putint(result); + return 0; +} diff --git a/testcases/functional_test/057_if_complex_expr.sy b/testcases/functional_test/057_if_complex_expr.sy new file mode 100644 index 0000000..32c897c --- /dev/null +++ b/testcases/functional_test/057_if_complex_expr.sy @@ -0,0 +1,21 @@ +// Use complex expression in if structure +int main () { + int a; + int b; + int c; + int d; + int result; + a = 5; + b = 5; + c = 1; + d = -2; + result = 2; + if ((d * 1 / 2) < 0 || (a - b) != 0 && (c + 3) % 2 != 0) { + putint(result); + } + if ((d % 2 + 67) < 0 || (a - b) != 0 && (c + 2) % 2 != 0) { + result = 4; + putint(result); + } + return 0; +} diff --git a/testcases/functional_test/058_short_circuit.sy b/testcases/functional_test/058_short_circuit.sy new file mode 100644 index 0000000..322855d --- /dev/null +++ b/testcases/functional_test/058_short_circuit.sy @@ -0,0 +1,21 @@ +int g = 0; + +int func(int n) { + g = g + n; + putint(g); + return g; +} + +int main() { + int i; + i = getint(); + if (i > 10 && func(i)) i = 1; else i = 0; + i = getint(); + if (i > 11 && func(i)) i = 1; else i = 0; + i = getint(); + if (i <= 99 || func(i)) i = 1; else i = 0; + i = getint(); + if (i <= 100 || func(i)) i = 1; else i = 0; + if (!func(99) && func(100)) i = 1; else i = 0; + return 0; +} diff --git a/testcases/functional_test/059_short_circuit2.sy b/testcases/functional_test/059_short_circuit2.sy new file mode 100644 index 0000000..7dbfca0 --- /dev/null +++ b/testcases/functional_test/059_short_circuit2.sy @@ -0,0 +1,26 @@ +int func(int n) { + if (n <= 50) { + putint(n); + return 1; + } + else { + putint(n); + return 0; + } +} + +int main() { + int i; + + if (func(0) == 1 || func(50) == 1 && func(100) == 0) + i = 0; + else + i = 1; + + if (func(50) == 1 && func(40) == 1 || func(1) == 1 ) + i = 0; + else + i = 1; + + return 0; +} diff --git a/testcases/functional_test/05_add.sy b/testcases/functional_test/05_add.sy new file mode 100644 index 0000000..d8ab0a6 --- /dev/null +++ b/testcases/functional_test/05_add.sy @@ -0,0 +1,10 @@ +int a; +int b; + +int main(){ + a=10; + b=20; + int c; + c = a + b; + return c; +} diff --git a/testcases/functional_test/05_const_array_defn.sy b/testcases/functional_test/05_const_array_defn.sy new file mode 100644 index 0000000..4238a31 --- /dev/null +++ b/testcases/functional_test/05_const_array_defn.sy @@ -0,0 +1,5 @@ +const int a[5]={0,1,2,3,4}; + +int main(){ + return a[4]; +} \ No newline at end of file diff --git a/testcases/functional_test/060_scope.sy b/testcases/functional_test/060_scope.sy new file mode 100644 index 0000000..7be1453 --- /dev/null +++ b/testcases/functional_test/060_scope.sy @@ -0,0 +1,27 @@ +int a = 7; + +int func() { + int b = a; + int a = 1; + if (a == b) { + a = a + 1; + return 1; + } + else + return 0; +} + +int main() { + int result = 0; + int i = 0; + while (i < 100) { + if (func() == 1) + result = result + 1; + i = i + 1; + } + if (result < 100) + putint(1); + else + putint(0); + return 0; +} diff --git a/testcases/functional_test/061_sort_test1.sy b/testcases/functional_test/061_sort_test1.sy new file mode 100644 index 0000000..8491e90 --- /dev/null +++ b/testcases/functional_test/061_sort_test1.sy @@ -0,0 +1,41 @@ +int n; +int bubblesort(int arr[]) +{ + int i; + int j; + i =0; + while(i < n-1){ + // Last i elements are already in place + j = 0; + while(j < n-i-1){ + if (arr[j] > arr[j+1]) { + // swap(&arr[j], &arr[j+1]); + int tmp; + tmp = arr[j+1]; + arr[j+1] = arr[j]; + arr[j] = tmp; + } + j = j + 1; + } + i = i + 1; + } + return 0; +} + +int main(){ + n = 10; + int a[10]; + a[0]=4;a[1]=3;a[2]=9;a[3]=2;a[4]=0; + a[5]=1;a[6]=6;a[7]=5;a[8]=7;a[9]=8; + int i; + i = bubblesort(a); + while (i < n) { + int tmp; + tmp = a[i]; + putint(tmp); + tmp = 10; + putch(tmp); + i = i + 1; + } + return 0; +} diff --git a/testcases/functional_test/062_sort_test2.sy b/testcases/functional_test/062_sort_test2.sy new file mode 100644 index 0000000..8ec1764 --- /dev/null +++ b/testcases/functional_test/062_sort_test2.sy @@ -0,0 +1,39 @@ +int n; +int insertsort(int a[]) +{ + int i; + i = 1; + while(i-1&&temp k - 1) + { + j = j - 1; + } + + if(i < j) + { + arr[i] = arr[j]; + i = i + 1; + } + + while(i < j && arr[i] < k) + { + i = i + 1; + } + + if(i < j) + { + arr[j] = arr[i]; + j = j - 1; + } + } + + arr[i] = k; + int tmp; + tmp = i - 1; + tmp = QuickSort(arr, low, tmp); + tmp = i + 1; + tmp = QuickSort(arr, tmp, high); + } + return 0; +} + +int main(){ + n = 10; + int a[10]; + a[0]=4;a[1]=3;a[2]=9;a[3]=2;a[4]=0; + a[5]=1;a[6]=6;a[7]=5;a[8]=7;a[9]=8; + int i; + i = 0; + int tmp; + tmp = 9; + i = QuickSort(a, i, tmp); + while (i < n) { + int tmp; + tmp = a[i]; + putint(tmp); + tmp = 10; + putch(tmp); + i = i + 1; + } + return 0; +} diff --git a/testcases/functional_test/064_sort_test4.sy b/testcases/functional_test/064_sort_test4.sy new file mode 100644 index 0000000..9280cd1 --- /dev/null +++ b/testcases/functional_test/064_sort_test4.sy @@ -0,0 +1,49 @@ +int n; +int select_sort(int A[],int n) +{ + int i; + int j; + int min; + i =0; + while(i < n-1) + { + min=i;// + j = i + 1; + while(j < n) + { + if(A[min]>A[j]) + { + min=j; + } + j=j+1; + } + if(min!=i) + { + int tmp; + tmp = A[min]; + A[min] = A[i]; + A[i] = tmp; + } + i = i + 1; + } + return 0; +} + +int main(){ + n = 10; + int a[10]; + a[0]=4;a[1]=3;a[2]=9;a[3]=2;a[4]=0; + a[5]=1;a[6]=6;a[7]=5;a[8]=7;a[9]=8; + int i; + i = 0; + i = select_sort(a, n); + while (i < n) { + int tmp; + tmp = a[i]; + putint(tmp); + tmp = 10; + putch(tmp); + i = i + 1; + } + return 0; +} diff --git a/testcases/functional_test/065_sort_test5.sy b/testcases/functional_test/065_sort_test5.sy new file mode 100644 index 0000000..6c634e5 --- /dev/null +++ b/testcases/functional_test/065_sort_test5.sy @@ -0,0 +1,65 @@ +int n; +int swap (int array[], int i, int j){ + int temp; + temp = array[i]; + array[i] = array[j]; + array[j] = temp; + return 0; +} +int heap_ajust(int arr[], int start, int end) { + int dad; + dad = start; + int son; + son = dad * 2 + 1; + while (son < end + 1) { // + if (son < end && arr[son] < arr[son + 1]) + son = son + 1; + if (arr[dad] > arr[son]) + return 0; + else { + dad = swap(arr,dad,son); + dad = son; + son = dad * 2 + 1; + } + } + return 0; +} +int heap_sort(int arr[], int len) { + int i; + int tmp; + i = len / 2 - 1; + while ( i > -1) { + tmp = len - 1; + tmp = heap_ajust(arr, i, tmp); + i = i - 1; + } + i = len - 1; + while ( i > 0) { + int tmp0; + tmp0 = 0; + tmp = swap(arr,tmp0,i); + tmp = i - 1; + tmp = heap_ajust(arr, tmp0, tmp); + i = i-1; + } + return 0; +} + +int main(){ + n = 10; + int a[10]; + a[0]=4;a[1]=3;a[2]=9;a[3]=2;a[4]=0; + a[5]=1;a[6]=6;a[7]=5;a[8]=7;a[9]=8; + int i; + i = 0; + i = heap_sort(a, n); + while (i < n) { + int tmp; + tmp = a[i]; + putint(tmp); + tmp = 10; + putch(tmp); + i = i + 1; + } + return 0; +} diff --git a/testcases/functional_test/066_sort_test6.sy b/testcases/functional_test/066_sort_test6.sy new file mode 100644 index 0000000..24093c7 --- /dev/null +++ b/testcases/functional_test/066_sort_test6.sy @@ -0,0 +1,53 @@ +int n; + +int counting_sort(int ini_arr[], int sorted_arr[], int n) { + int count_arr[10]; + int i; + int j; + int k; + k = 0; + i = 0; + j = 0; + while(k < 10){ + count_arr[k] = 0; + k = k + 1; + } + while(i < n) + { + count_arr[ini_arr[i]] = count_arr[ini_arr[i]] + 1; + i = i + 1; + } + k = 1; + while(k < 10){ + count_arr[k] = count_arr[k] + count_arr[k - 1]; + k = k + 1; + } + j = n; + while( j > 0){ + count_arr[ini_arr[j - 1]] = count_arr[ini_arr[j - 1]] - 1; + sorted_arr[count_arr[ini_arr[j - 1]]] = ini_arr[j - 1]; + j = j - 1; + } + return 0; +} + + +int main(){ + n = 10; + int a[10]; + a[0]=4;a[1]=3;a[2]=9;a[3]=2;a[4]=0; + a[5]=1;a[6]=6;a[7]=5;a[8]=7;a[9]=8; + int i; + i = 0; + int b[10]; + i = counting_sort(a, b, n); + while (i < n) { + int tmp; + tmp = b[i]; + putint(tmp); + tmp = 10; + putch(tmp); + i = i + 1; + } + return 0; +} diff --git a/testcases/functional_test/067_sort_test7.sy b/testcases/functional_test/067_sort_test7.sy new file mode 100644 index 0000000..50561d3 --- /dev/null +++ b/testcases/functional_test/067_sort_test7.sy @@ -0,0 +1,47 @@ +int buf[2][100]; + +// sort [l, r) +void merge_sort(int l, int r) +{ + if (l + 1 >= r) + return; + + int mid = (l + r) / 2; + merge_sort(l, mid); + merge_sort(mid, r); + + int i = l, j = mid, k = l; + while (i < mid && j < r) { + if (buf[0][i] < buf[0][j]) { + buf[1][k] = buf[0][i]; + i = i + 1; + } else { + buf[1][k] = buf[0][j]; + j = j + 1; + } + k = k + 1; + } + while (i < mid) { + buf[1][k] = buf[0][i]; + i = i + 1; + k = k + 1; + } + while (j < r) { + buf[1][k] = buf[0][j]; + j = j + 1; + k = k + 1; + } + + while (l < r) { + buf[0][l] = buf[1][l]; + l = l + 1; + } +} + +int main() +{ + int n = getarray(buf[0]); + merge_sort(0, n); + putarray(n, buf[0]); + return 0; +} diff --git a/testcases/functional_test/068_genealogical_tree.sy b/testcases/functional_test/068_genealogical_tree.sy new file mode 100644 index 0000000..cdb10f9 --- /dev/null +++ b/testcases/functional_test/068_genealogical_tree.sy @@ -0,0 +1,68 @@ +int map[10][10]; +int indegree[10]; +int queue[10]; +void topo(int n) +{ + int m=0; + int t=0; + int i,j; + i=1; + j=1; + while(i<=n) + { + j=1; + while(j<=n) + { + if(indegree[j]==0) + { + + m=j; + break; + } + j=j+1; + } + queue[t]=m; + t=t+1; + indegree[m]=-1; + j=1; + while(j<=n) + + { + if(map[m][j]) + { + indegree[j]=indegree[j]-1; + } + j=j+1; + } + i=i+1; + } + i=0; + while(i 0){ + rem = m % n; + m = n; + n = rem; + } + return m; +} +int main(){ + int n,m; + int num; + m=getint(); + n=getint(); + num=fun(m,n); + putint(num); + + return 0; +} diff --git a/testcases/functional_test/06_mod.sy b/testcases/functional_test/06_mod.sy new file mode 100644 index 0000000..f20e0b5 --- /dev/null +++ b/testcases/functional_test/06_mod.sy @@ -0,0 +1,9 @@ +int a; +int b; +int main(){ + a = 10; + b = 3; + int c; + c = a % b; + return c; +} diff --git a/testcases/functional_test/06_var_defn_func.sy b/testcases/functional_test/06_var_defn_func.sy new file mode 100644 index 0000000..03ab608 --- /dev/null +++ b/testcases/functional_test/06_var_defn_func.sy @@ -0,0 +1,8 @@ +int defn(){ + return 4; +} + +int main(){ + int a=defn(); + return a; +} \ No newline at end of file diff --git a/testcases/functional_test/070_multiplication_puzzle.sy b/testcases/functional_test/070_multiplication_puzzle.sy new file mode 100644 index 0000000..1ac205a --- /dev/null +++ b/testcases/functional_test/070_multiplication_puzzle.sy @@ -0,0 +1,32 @@ +int a[6]={10,1,50,50,20,5}; +int dp[10][10]; +int main() +{ + int n; + n=6; + + int k,i,t,j,aa; + k=3; + while(k<=n) + { + i=0; + while(i 1 && array[loc - 1] != -1) { + mmerge(loc, loc - 1); + } + if (a < n && array[loc + n] != -1) { + mmerge(loc, loc + n); + } + if (a > 1 && array[loc - n] != -1) { + mmerge(loc, loc - n); + } + + if (array[0] != -1 && array[k] != -1 && findfa(0) == findfa(k)) { + flag = 1; + int tmp = i + 1; + putint(tmp); + putch(10); + } + } + + i = i + 1; + } + if (!flag) { + putint(-1); + putch(10); + } + } + return 0; +} diff --git a/testcases/functional_test/073_backpack.sy b/testcases/functional_test/073_backpack.sy new file mode 100644 index 0000000..c54d6ff --- /dev/null +++ b/testcases/functional_test/073_backpack.sy @@ -0,0 +1,63 @@ +int V[200][200]={}; +int KnapSack(int n, int w[], int v[], int x[], int C) +{ + int i, j; + i=1; + while(i<=n) + { + j=0; + while(jtmp2) + { + V[i][j] = tmp1; + } + else + { + V[i][j] = tmp2; + } + + } + j=j+1; + } + i=i+1; + } + + j = C; + i=n; + while(i>=1) + { + if (V[i][j]>V[i - 1][j]) + { + x[i] = 1; + j = j - w[i]; + } + else + { + + x[i] = 0; + } + i=i-1; + } + return V[n][C]; +} + +int main() +{ + int s; + int w[6] = {0,2,2,6,5,4}; + int v[6] = {0,6,3,5,4,6}; + int x[6]; + int n = 5; + int C=10; + s = KnapSack(n, w, v, x, C); + putint(s); + return 0; + +} diff --git a/testcases/functional/96_matrix_add.sy b/testcases/functional_test/074_matrix_add.sy similarity index 81% rename from testcases/functional/96_matrix_add.sy rename to testcases/functional_test/074_matrix_add.sy index b65928b..4f9158e 100644 --- a/testcases/functional/96_matrix_add.sy +++ b/testcases/functional_test/074_matrix_add.sy @@ -3,7 +3,7 @@ int L; int N; -int add(float a0[],float a1[], float a2[],float b0[],float b1[],float b2[],float c0[],float c1[],float c2[]) +int add(int a0[],int a1[], int a2[],int b0[],int b1[],int b2[],int c0[],int c1[],int c2[]) { int i; i=0; @@ -24,7 +24,7 @@ int main() N=3; M=3; L=3; - float a0[3], a1[3], a2[3], b0[3], b1[3], b2[3], c0[6], c1[3], c2[3]; + int a0[3];int a1[3]; int a2[3];int b0[3];int b1[3];int b2[3];int c0[6];int c1[3];int c2[3]; int i; i=0; while(i -1) { + t = c2[i]; + j = len1 - 1; + while (j > -1) { + temp = result[n] + t * c1[j]; + if(temp >= 10) { + result[n] = (temp); + result[n-1] = result[n-1] + temp / 10; + } + else + result[n] = temp; + j = j - 1; + n = n - 1; + } + n = n + len1 - 1; + i = i - 1; + } + + if(result[0] != 0) + putint(result[0]); + + i = 1; + while (i <= len1 + len2 - 1) { + putint(result[i]); + i = i + 1; + } + + return 0; +} \ No newline at end of file diff --git a/testcases/functional_test/079_calculator.sy b/testcases/functional_test/079_calculator.sy new file mode 100644 index 0000000..f67a932 --- /dev/null +++ b/testcases/functional_test/079_calculator.sy @@ -0,0 +1,184 @@ +int ints[10000]; +int intt; +int chas[10000]; +int chat; +int i=0, ii=1; +int c; +int get[10000]; +int get2[10000]; + +int isdigit(int x) { + if (x >= 48 && x <= 57) + return 1; + return 0; +} + +int power(int b, int a) { + int result = 1; + while (a != 0) { + result = result * b; + a = a - 1; + } + return result; +} + +int getstr(int get[]) { + int x = getch(); + int length = 0; + while (x != 13 && x != 10) { + get[length] = x; + length = length + 1; + x = getch(); + } + return length; +} + +void intpush(int x) +{ + intt = intt + 1; + ints[intt] = x; +} +void chapush(int x) +{ + chat = chat + 1; + chas[chat] = x; +} +int intpop() +{ + intt = intt - 1; + return ints[intt + 1]; +} +int chapop() +{ + chat = chat - 1; + return chas[chat + 1]; +} +void intadd(int x) +{ + ints[intt] = ints[intt] * 10; + ints[intt] = ints[intt] + x; +} + +int find() +{ + c = chapop(); + get2[ii] = 32; + get2[ii + 1] = c; + ii = ii + 2; + if (chat == 0) return 0; + return 1; +} + +int main() +{ + intt=0; + chat=0; + int lengets = getstr(get); + while (i < lengets) + { + if (isdigit(get[i]) == 1) + { + get2[ii] = get[i]; + ii = ii + 1; + } + else + { + if(get[i] == 40) chapush(40); + if(get[i] == 94) chapush(94); + if(get[i] == 41) + { + c = chapop(); + while (c != 40) + { + get2[ii] = 32; + get2[ii + 1]=c; + ii = ii + 2; + c = chapop(); + } + } + if (get[i] == 43) + { + while (chas[chat] == 43 || chas[chat] == 45 || chas[chat] == 42 || chas[chat] == 47 || chas[chat] == 37 || chas[chat] == 94) + { + if (find()==0)break; + } + chapush(43); + } + if (get[i] == 45) + { + while (chas[chat] == 43 || chas[chat] == 45 ||chas[chat] == 42 || chas[chat] == 47 || chas[chat] == 37 || chas[chat] == 94) + { + if(find()==0)break; + } + chapush(45); + } + if(get[i] == 42) + { + while (chas[chat] == 42 || chas[chat] == 47 ||chas[chat] == 37 || chas[chat] == 94) + { + if (find()==0)break; + } + chapush(42); + } + if (get[i] == 47) + { + while (chas[chat] == 42 || chas[chat] == 47 || chas[chat] == 37 || chas[chat] == 94) + { + if (find()==0)break; + } + chapush(47); + } + if (get[i] == 37) + { + while (chas[chat] == 42 || chas[chat] == 47 || chas[chat] == 37 || chas[chat] == 94) + { + if (find()==0)break; + } + chapush(37); + } + get2[ii] = 32; + ii = ii + 1; + } + i = i + 1; + } + while(chat > 0) + { + int c = chapop(); + get2[ii] = 32; + get2[ii + 1]=c; + ii = ii + 2; + } + get2[ii]= 64; + i = 1; + while (get2[i] != 64) + { + if (get2[i] == 43 || get2[i] == 45 || get2[i] == 42 || get2[i] == 47 || get2[i] == 37 || get2[i] == 94) + { + int a=intpop();int b=intpop();int c; + if (get2[i] == 43) c = a + b; + if (get2[i] == 45) c = b - a; + if (get2[i] == 42) c = a * b; + if (get2[i] == 47) c = b / a; + if (get2[i] == 37) c = b % a; + if (get2[i] == 94) c = power(b,a); + intpush(c); + } + else + { + if(get2[i] != 32) + { + intpush(get2[i] - 48); + ii=1; + while(get2[i+ii] != 32) + { + intadd(get2[i+ii] - 48); + ii = ii + 1; + } + i = i + ii-1; + } + } + i = i + 1; + } + putint(ints[1]); + return 0; +} diff --git a/testcases/functional_test/07_comment1.sy b/testcases/functional_test/07_comment1.sy new file mode 100644 index 0000000..46fdb31 --- /dev/null +++ b/testcases/functional_test/07_comment1.sy @@ -0,0 +1,6 @@ +int main(){ + //this is a single line comment + //int a; + //a=5; + return 0; +} \ No newline at end of file diff --git a/testcases/functional_test/07_return_var.sy b/testcases/functional_test/07_return_var.sy new file mode 100644 index 0000000..cd0741e --- /dev/null +++ b/testcases/functional_test/07_return_var.sy @@ -0,0 +1,6 @@ +int a; + +int main(){ + a=10; + return a; +} diff --git a/testcases/functional_test/080_color.sy b/testcases/functional_test/080_color.sy new file mode 100644 index 0000000..a18319e --- /dev/null +++ b/testcases/functional_test/080_color.sy @@ -0,0 +1,69 @@ +const int maxn = 18; +const int mod = 1000000007; +int dp[maxn][maxn][maxn][maxn][maxn][7]; +int list[200]; + +int equal(int a, int b) { + if (a == b) + return 1; + return 0; +} + +int dfs(int a, int b, int c, int d, int e, int last){ + if(dp[a][b][c][d][e][last] != -1) + return dp[a][b][c][d][e][last]; + if(a + b + c + d + e == 0) + return 1; + int ans = 0; + if (a) ans = (ans + (a - equal(last, 2)) * dfs(a - 1, b, c, d, e, 1)) % mod; + if (b) ans = (ans + (b - equal(last, 3)) * dfs(a + 1, b - 1, c, d, e, 2)) % mod; + if (c) ans = (ans + (c - equal(last, 4)) * dfs(a, b + 1, c - 1, d, e, 3)) % mod; + if (d) ans = (ans + (d - equal(last, 5)) * dfs(a, b, c + 1, d - 1, e, 4)) % mod; + if (e) ans = (ans + e * dfs(a, b, c, d + 1, e - 1, 5)) % mod; + dp[a][b][c][d][e][last] = ans % mod; + return dp[a][b][c][d][e][last]; +} + +int cns[20]; + +int main(){ + int n = getint(); + int i = 0; + while (i < maxn) { + int j = 0; + while(j < maxn) { + int k = 0; + while(k < maxn) { + int l = 0; + while (l < maxn) { + int m = 0; + while (m < maxn) { + int h = 0; + while (h < 7) { + dp[i][j][k][l][m][h] = -1; + h = h + 1; + } + m = m + 1; + } + l = l + 1; + } + k = k + 1; + } + j = j + 1; + } + i = i + 1; + } + + i = 0; + while (i < n) { + list[i] = getint(); + cns[list[i]] = cns[list[i]] + 1; + i = i + 1; + } + + int ans = dfs(cns[1], cns[2], cns[3], cns[4], cns[5], 0); + + putint(ans); + + return ans; +} \ No newline at end of file diff --git a/testcases/functional_test/081_exgcd.sy b/testcases/functional_test/081_exgcd.sy new file mode 100644 index 0000000..3abdbcf --- /dev/null +++ b/testcases/functional_test/081_exgcd.sy @@ -0,0 +1,22 @@ +int exgcd(int a,int b,int x[],int y[]) { + if(b == 0) { + x[0] = 1; + y[0] = 0; + return a; + } + else { + int r = exgcd(b, a % b, x, y); + int t = x[0]; + x[0] = y[0]; + y[0] = (t - a / b * y[0]); + return r; + } +} + +int main() { + int a = 7, b = 15, x[1] = {1}, y[1] = {1}; + exgcd(a, b, x, y); + x[0] = (x[0] % b + b) % b; + putint(x[0]); + return 0; +} \ No newline at end of file diff --git a/testcases/functional_test/082_reverse_output.sy b/testcases/functional_test/082_reverse_output.sy new file mode 100644 index 0000000..1257b4f --- /dev/null +++ b/testcases/functional_test/082_reverse_output.sy @@ -0,0 +1,18 @@ +void reverse(int n) { + int next; + if (n <= 1) { + next=getint(); + putint(next); + } + else { + next=getint(); + reverse(n-1); + putint(next); + } +} + +int main() { + int i=200; + reverse(i); + return 0; +} diff --git a/testcases/functional_test/083_brainfk.sy b/testcases/functional_test/083_brainfk.sy new file mode 100644 index 0000000..d1ee0c1 --- /dev/null +++ b/testcases/functional_test/083_brainfk.sy @@ -0,0 +1,73 @@ +/* +a brainfuck interpreter +reference: https://gist.github.com/maxcountryman/1699708 +*/ + +// tape, input buffer, and read/write pointer +const int TAPE_LEN = 65536, BUFFER_LEN = 32768; +int tape[TAPE_LEN], program[BUFFER_LEN], ptr = 0; + +// read the input program +void read_program() { + int i = 0, len = getint(); + while (i < len) { + program[i] = getch(); + i = i + 1; + } + program[i] = 0; +} + +// interpret the input program +void interpret(int input[]) { + int cur_char, loop, i = 0; + while (input[i]) { + cur_char = input[i]; + if (cur_char == 62) { + // '>' + ptr = ptr + 1; + } + else if (cur_char == 60) { + // '<' + ptr = ptr - 1; + } + else if (cur_char == 43) { + // '+' + tape[ptr] = tape[ptr] + 1; + } + else if (cur_char == 45) { + // '-' + tape[ptr] = tape[ptr] - 1; + } + else if (cur_char == 46) { + // '.' + putch(tape[ptr]); + } + else if (cur_char == 44) { + // ',' + tape[ptr] = getch(); + } + else if (cur_char == 93 && tape[ptr]) { + // ']' + loop = 1; + while (loop > 0) { + i = i - 1; + cur_char = input[i]; + if (cur_char == 91) { + // '[' + loop = loop - 1; + } + else if (cur_char == 93) { + // ']' + loop = loop + 1; + } + } + } + i = i + 1; + } +} + +int main() { + read_program(); + interpret(program); + return 0; +} diff --git a/testcases/functional_test/084_expr_eval.sy b/testcases/functional_test/084_expr_eval.sy new file mode 100644 index 0000000..08e95a0 --- /dev/null +++ b/testcases/functional_test/084_expr_eval.sy @@ -0,0 +1,145 @@ +const int TOKEN_NUM = 0, TOKEN_OTHER = 1; +int last_char = 32, num, other; +int cur_token; + +int next_char() { + last_char = getch(); + return last_char; +} + +int is_space(int c) { + if (c == 32 || c == 10) { + return 1; + } + else { + return 0; + } +} + +int is_num(int c) { + if (c >= 48 && c <= 57) { + return 1; + } + else { + return 0; + } +} + +int next_token() { + while (is_space(last_char)) next_char(); + if (is_num(last_char)) { + num = last_char - 48; + while (is_num(next_char())) { + num = num * 10 + last_char - 48; + } + cur_token = TOKEN_NUM; + } + else { + other = last_char; + next_char(); + cur_token = TOKEN_OTHER; + } + return cur_token; +} + +int panic() { + putch(112); + putch(97); + putch(110); + putch(105); + putch(99); + putch(33); + putch(10); + return -1; +} + +int get_op_prec(int op) { + // +, - + if (op == 43 || op == 45) return 10; + // *, /, % + if (op == 42 || op == 47 || op == 37) return 20; + // other + return 0; +} + +void stack_push(int s[], int v) { + s[0] = s[0] + 1; + s[s[0]] = v; +} + +int stack_pop(int s[]) { + int last = s[s[0]]; + s[0] = s[0] - 1; + return last; +} + +int stack_peek(int s[]) { + return s[s[0]]; +} + +int stack_size(int s[]) { + return s[0]; +} + +int eval_op(int op, int lhs, int rhs) { + // + + if (op == 43) return lhs + rhs; + // - + if (op == 45) return lhs - rhs; + // * + if (op == 42) return lhs * rhs; + // / + if (op == 47) return lhs / rhs; + // % + if (op == 37) return lhs % rhs; + // other + return 0; +} + +int eval() { + int oprs[256] = {}, ops[256] = {}; + // get the first value + if (cur_token != TOKEN_NUM) return panic(); + stack_push(oprs, num); + next_token(); + // evaluate + while (cur_token == TOKEN_OTHER) { + // get operator + int op = other; + if (!get_op_prec(op)) break; + next_token(); + // handle operator + while (stack_size(ops) && get_op_prec(stack_peek(ops)) >= get_op_prec(op)) { + // evaluate the current operation + int cur_op = stack_pop(ops); + int rhs = stack_pop(oprs), lhs = stack_pop(oprs); + stack_push(oprs, eval_op(cur_op, lhs, rhs)); + } + stack_push(ops, op); + // get next expression + if (cur_token != TOKEN_NUM) return panic(); + stack_push(oprs, num); + next_token(); + } + // eat ';' + next_token(); + // clear the operator stack + while (stack_size(ops)) { + int cur_op = stack_pop(ops); + int rhs = stack_pop(oprs), lhs = stack_pop(oprs); + stack_push(oprs, eval_op(cur_op, lhs, rhs)); + } + return stack_peek(oprs); +} + +int main() { + int count = getint(); + getch(); + next_token(); + while (count) { + putint(eval()); + putch(10); + count = count - 1; + } + return 0; +} diff --git a/testcases/functional_test/085_dijkstra.sy b/testcases/functional_test/085_dijkstra.sy new file mode 100644 index 0000000..78895e6 --- /dev/null +++ b/testcases/functional_test/085_dijkstra.sy @@ -0,0 +1,82 @@ +const int INF = 65535; +int e[16][16]; +int book[16]; +int dis[16]; +int n, m; +int v1, v2, w; + +void Dijkstra() +{ + int i, j; + + i = 1; + while (i <= n) { + dis[i] = e[1][i]; + book[i] = 0; + i = i + 1; + } + book[1] = 1; + + i = 1; + while (i <= n - 1) { + int min_num = INF; + int min_index = 0; + int k = 1; + while (k <= n) { + if (min_num > dis[k] && book[k] == 0) { + min_num = dis[k]; + min_index = k; + } + k = k + 1; + } + book[min_index] = 1; + int j = 1; + while (j <= n) { + if (e[min_index][j] < INF) { + if (dis[j] > dis[min_index] + e[min_index][j]) { + dis[j] = dis[min_index] + e[min_index][j]; + } + } + j = j + 1; + } + i = i + 1; + } +} + +int main() +{ + int i; + n = getint(); + m = getint(); + + i = 1; + while (i <= n) { + int j = 1; + while (j <= n) { + if (i == j) + e[i][j] = 0; + else + e[i][j] = INF; + j = j + 1; + } + i = i + 1; + } + + i = 1; + while (i <= m) { + int u = getint(), v = getint(); + e[u][v] = getint(); + i = i + 1; + } + + Dijkstra(); + + i = 1; + while (i <= n) { + putint(dis[i]); + putch(32); + i = i + 1; + } + putch(10); + return 0; +} diff --git a/testcases/functional_test/086_full_conn.sy b/testcases/functional_test/086_full_conn.sy new file mode 100644 index 0000000..01f83aa --- /dev/null +++ b/testcases/functional_test/086_full_conn.sy @@ -0,0 +1,50 @@ + +int relu_reg(int a) +{ + if (a > 0x7F) return 0x7F; + if (a < 0) return 0; + return a; +} + +int model(int a[][5]) +{ + if (+ relu_reg( + a[0][0] * 85 + a[0][1] * 23 + a[0][2] * -82 + a[0][3] * -103 + a[0][4] * -123 + a[1][0] * 64 + a[1][1] * -120 + a[1][2] * 50 + a[1][3] * -59 + a[1][4] * 47 + a[2][0] * -111 + a[2][1] * -67 + a[2][2] * -106 + a[2][3] * -75 + a[2][4] * -102 + a[3][0] * 34 + a[3][1] * -39 + a[3][2] * 65 + a[3][3] * 47 + a[3][4] * 113 + a[4][0] * 110 + a[4][1] * 47 + a[4][2] * -4 + a[4][3] * 80 + a[4][4] * 46) * 39 + + relu_reg( + a[0][0] * -106 + a[0][1] * 126 + a[0][2] * -18 + a[0][3] * -31 + a[0][4] * -8 + a[1][0] * 47 + a[1][1] * -4 + a[1][2] * 67 + a[1][3] * -94 + a[1][4] * -121 + a[2][0] * 7 + a[2][1] * -21 + a[2][2] * -60 + a[2][3] * -43 + a[2][4] * 105 + a[3][0] * -42 + a[3][1] * 87 + a[3][2] * 29 + a[3][3] * -106 + a[3][4] * -31 + a[4][0] * -110 + a[4][1] * -100 + a[4][2] * -22 + a[4][3] * -75 + a[4][4] * -125) * 77 + + relu_reg( + a[0][0] * 26 + a[0][1] * 76 + a[0][2] * -70 + a[0][3] * 29 + a[0][4] * -95 + a[1][0] * 96 + a[1][1] * 52 + a[1][2] * -68 + a[1][3] * -5 + a[1][4] * 34 + a[2][0] * -34 + a[2][1] * 102 + a[2][2] * 6 + a[2][3] * -38 + a[2][4] * 27 + a[3][0] * 110 + a[3][1] * 116 + a[3][2] * 39 + a[3][3] * -63 + a[3][4] * -99 + a[4][0] * 65 + a[4][1] * 120 + a[4][2] * -39 + a[4][3] * -6 + a[4][4] * 94) * 127 + + relu_reg( + a[0][0] * -23 + a[0][1] * -63 + a[0][2] * 49 + a[0][3] * 50 + a[0][4] * 72 + a[1][0] * 85 + a[1][1] * -30 + a[1][2] * 12 + a[1][3] * 125 + a[1][4] * -117 + a[2][0] * -65 + a[2][1] * -67 + a[2][2] * 125 + a[2][3] * 110 + a[2][4] * -31 + a[3][0] * -123 + a[3][1] * 83 + a[3][2] * 122 + a[3][3] * 11 + a[3][4] * -23 + a[4][0] * -47 + a[4][1] * -32 + a[4][2] * -117 + a[4][3] * 95 + a[4][4] * 118) * -106 + + relu_reg( + a[0][0] * 8 + a[0][1] * 82 + a[0][2] * -104 + a[0][3] * 101 + a[0][4] * -116 + a[1][0] * -63 + a[1][1] * -16 + a[1][2] * -70 + a[1][3] * 125 + a[1][4] * 75 + a[2][0] * 66 + a[2][1] * -96 + a[2][2] * -101 + a[2][3] * -114 + a[2][4] * 59 + a[3][0] * 12 + a[3][1] * 5 + a[3][2] * -95 + a[3][3] * 116 + a[3][4] * -93 + a[4][0] * 15 + a[4][1] * 79 + a[4][2] * 3 + a[4][3] * 49 + a[4][4] * -124) * -3 + + relu_reg( + a[0][0] * 81 + a[0][1] * 68 + a[0][2] * -102 + a[0][3] * -74 + a[0][4] * 121 + a[1][0] * -15 + a[1][1] * 55 + a[1][2] * 101 + a[1][3] * -13 + a[1][4] * -62 + a[2][0] * 64 + a[2][1] * 114 + a[2][2] * 38 + a[2][3] * -21 + a[2][4] * 112 + a[3][0] * 114 + a[3][1] * 112 + a[3][2] * -10 + a[3][3] * -16 + a[3][4] * -50 + a[4][0] * -112 + a[4][1] * -116 + a[4][2] * -54 + a[4][3] * 82 + a[4][4] * -72) * 32 + + relu_reg( + a[0][0] * 15 + a[0][1] * -77 + a[0][2] * 66 + a[0][3] * -90 + a[0][4] * -6 + a[1][0] * -30 + a[1][1] * -8 + a[1][2] * 81 + a[1][3] * 2 + a[1][4] * -110 + a[2][0] * -95 + a[2][1] * 59 + a[2][2] * 52 + a[2][3] * 15 + a[2][4] * 55 + a[3][0] * -33 + a[3][1] * 14 + a[3][2] * 58 + a[3][3] * 67 + a[3][4] * 86 + a[4][0] * -79 + a[4][1] * 48 + a[4][2] * -13 + a[4][3] * -15 + a[4][4] * 66) * -95 + + relu_reg( + a[0][0] * 33 + a[0][1] * 82 + a[0][2] * 67 + a[0][3] * 30 + a[0][4] * -2 + a[1][0] * 65 + a[1][1] * 120 + a[1][2] * -13 + a[1][3] * 18 + a[1][4] * 5 + a[2][0] * 104 + a[2][1] * -119 + a[2][2] * -7 + a[2][3] * 71 + a[2][4] * 107 + a[3][0] * 24 + a[3][1] * 82 + a[3][2] * -96 + a[3][3] * -104 + a[3][4] * -121 + a[4][0] * 65 + a[4][1] * 97 + a[4][2] * 83 + a[4][3] * 46 + a[4][4] * -84) * -50 + + relu_reg( + a[0][0] * -29 + a[0][1] * 7 + a[0][2] * -70 + a[0][3] * 38 + a[0][4] * -90 + a[1][0] * -15 + a[1][1] * -32 + a[1][2] * 37 + a[1][3] * 36 + a[1][4] * -62 + a[2][0] * -125 + a[2][1] * -46 + a[2][2] * -70 + a[2][3] * 37 + a[2][4] * -73 + a[3][0] * -34 + a[3][1] * -87 + a[3][2] * -75 + a[3][3] * 71 + a[3][4] * -77 + a[4][0] * 53 + a[4][1] * 37 + a[4][2] * -103 + a[4][3] * -13 + a[4][4] * -114) * -23 + + relu_reg( + a[0][0] * 67 + a[0][1] * 42 + a[0][2] * 41 + a[0][3] * -123 + a[0][4] * -92 + a[1][0] * 10 + a[1][1] * -77 + a[1][2] * 75 + a[1][3] * 96 + a[1][4] * -51 + a[2][0] * 109 + a[2][1] * -74 + a[2][2] * -7 + a[2][3] * -122 + a[2][4] * 67 + a[3][0] * 47 + a[3][1] * 22 + a[3][2] * -68 + a[3][3] * 38 + a[3][4] * 29 + a[4][0] * 115 + a[4][1] * -121 + a[4][2] * 36 + a[4][3] * -49 + a[4][4] * 85) * 46 + > 0) + return 1; + return 0; +} + +int main() +{ + int N = getint(); + int a[5][5]; + while (N > 0) { + int i = 0; + while (i < 5) { + int j = 0; + while (j < 5) { + a[i][j] = getint(); + j = j + 1; + } + i = i + 1; + } + if (model(a)) { + // cat + putch(99); putch(97); putch(116); putch(10); + } else { + // dog + putch(100); putch(111); putch(103); putch(10); + } + N = N - 1; + } + return 0; +} diff --git a/testcases/functional_test/087_gcd.sy b/testcases/functional_test/087_gcd.sy new file mode 100644 index 0000000..3313f6f --- /dev/null +++ b/testcases/functional_test/087_gcd.sy @@ -0,0 +1,19 @@ + +int gcd(int m, int n) +{ + if (n == 0) { + return m; + } + return gcd(n, m % n); +} + +int main() +{ + int k = getint(); + while (k > 0) { + int a = getint(), b = getint(); + putint(gcd(a, b)); putch(10); + k = k - 1; + } + return 0; +} diff --git a/testcases/functional_test/088_hanoi.sy b/testcases/functional_test/088_hanoi.sy new file mode 100644 index 0000000..063bef8 --- /dev/null +++ b/testcases/functional_test/088_hanoi.sy @@ -0,0 +1,27 @@ + +void move(int x, int y) +{ + putint(x); putch(32); putint(y); putch(44); putch(32); +} + +void hanoi(int n, int one, int two, int three) +{ + if (n == 1) + move(one, three); + else { + hanoi(n - 1, one, three, two); + move(one, three); + hanoi(n - 1, two, one, three); + } +} + +int main() +{ + int n = getint(); + while (n > 0) { + hanoi(getint(), 1, 2, 3); + putch(10); + n = n - 1; + } + return 0; +} diff --git a/testcases/functional_test/089_hidden_var.sy b/testcases/functional_test/089_hidden_var.sy new file mode 100644 index 0000000..734fc53 --- /dev/null +++ b/testcases/functional_test/089_hidden_var.sy @@ -0,0 +1,54 @@ + +int b = 5; +int c[4] = {6, 7, 8, 9}; + +int main() +{ + int a; + a = 1; + { + int a; + a = 2; + { + a = 3; + putint(a); + } + putint(a); + } + putint(a); putch(10); + + while (a < 5) { + int a = 0; + a = a + 1; + if (a) + break; + } + putint(a); putch(10); + + { + { + { + {} + } + c[2] = 1; + { + int c[2][8] = {{0, 9}, 8, 3}; + } + } + } + + { + int b = 2; + if (c[2]) { + int c[7][1][5] = {{}, {}, {2, 1, 8}, {{}}}; + putint(c[b][0][0]); + putint(c[b][0][1]); + putint(c[b][0][2]); + } + } + putch(10); + + putint(b); putch(10); + putint(c[0]); putint(c[1]); putint(c[2]); putint(c[3]); putch(10); + return 0; +} diff --git a/testcases/functional_test/08_arr_assign.sy b/testcases/functional_test/08_arr_assign.sy new file mode 100644 index 0000000..3fe56ba --- /dev/null +++ b/testcases/functional_test/08_arr_assign.sy @@ -0,0 +1,5 @@ +int a[10]; +int main(){ + a[0]=1; + return 0; +} diff --git a/testcases/functional_test/08_comment2.sy b/testcases/functional_test/08_comment2.sy new file mode 100644 index 0000000..c238c86 --- /dev/null +++ b/testcases/functional_test/08_comment2.sy @@ -0,0 +1,10 @@ +int main(){ + /* + The comment block; + int a=5; + int b[10]; + int c; + int d=a*2; + */ + return 0; +} \ No newline at end of file diff --git a/testcases/functional_test/090_int_io.sy b/testcases/functional_test/090_int_io.sy new file mode 100644 index 0000000..4f1b992 --- /dev/null +++ b/testcases/functional_test/090_int_io.sy @@ -0,0 +1,52 @@ +const int ascii_0 = 48; + +int my_getint() +{ + int sum = 0, c; + + while (1) { + c = getch() - ascii_0; + if (c < 0 || c > 9) { + continue; + } else { + break; + } + } + sum = c; + + while (1) { + c = getch() - ascii_0; + if (c >= 0 && c <= 9) { + sum = sum * 10 + c; + } else { + break; + } + } + + return sum; +} + +void my_putint(int a) +{ + int b[16], i = 0; + while (a > 0) { + b[i] = a % 10 + ascii_0; + a = a / 10; + i = i + 1; + } + while (i > 0) { + i = i - 1; + putch(b[i]); + } +} + +int main() +{ + int n = my_getint(); + while (n > 0) { + int m = my_getint(); + my_putint(m); putch(10); + n = n - 1; + } + return 0; +} diff --git a/testcases/functional_test/091_kmp.sy b/testcases/functional_test/091_kmp.sy new file mode 100644 index 0000000..b3dd7a9 --- /dev/null +++ b/testcases/functional_test/091_kmp.sy @@ -0,0 +1,62 @@ + +void get_next(int str[], int next[]) +{ + next[0] = -1; + int i = 0, j = -1; + while (str[i]) { + if (j == -1 || str[i] == str[j]) { + j = j + 1; + i = i + 1; + next[i] = j; + } + else + j = next[j]; + } +} + +int KMP(int dst[], int src[]) +{ + int next[4096]; + get_next(dst, next); + + int i = 0, j = 0; + while (src[j]) { + if (dst[i] == src[j]) { + i = i + 1; + j = j + 1; + if (!dst[i]) { + return j; + } + } else { + i = next[i]; + if (i == -1) { + i = i + 1; + j = j + 1; + } + } + } + return -1; +} + +int read_str(int buf[]) +{ + int i = 0; + while (1) { + buf[i] = getch(); + if (buf[i] == 10) + break; + i = i + 1; + } + buf[i] = 0; + return i; +} + +int main() +{ + int dst[4096], src[4096]; + read_str(dst); + read_str(src); + putint(KMP(dst, src)); + putch(10); + return 0; +} \ No newline at end of file diff --git a/testcases/functional_test/092_max_flow.sy b/testcases/functional_test/092_max_flow.sy new file mode 100644 index 0000000..926f786 --- /dev/null +++ b/testcases/functional_test/092_max_flow.sy @@ -0,0 +1,96 @@ +/* + * Max flow EK with DFS. + */ +const int INF = 0x70000000; + +int size[10]; +int to[10][10]; +int cap[10][10]; +int rev[10][10]; +int used[10]; + +void my_memset(int arr[], int val, int n) +{ + int i = 0; + while (i < n) { + arr[i] = val; + i = i + 1; + } +} + +void add_node(int u, int v, int c) +{ + to[u][size[u]] = v; + cap[u][size[u]] = c; + rev[u][size[u]] = size[v]; + + to[v][size[v]] = u; + cap[v][size[v]] = 0; + rev[v][size[v]] = size[u]; + + size[u] = size[u] + 1; + size[v] = size[v] + 1; +} + +int dfs(int s, int t, int f) +{ + if (s == t) + return f; + used[s] = 1; + + int i = 0; + while (i < size[s]) { + if (used[to[s][i]]) { i = i + 1; continue; } + if (cap[s][i] <= 0) { i = i + 1; continue; } + + int min_f; + if (f < cap[s][i]) + min_f = f; + else + min_f = cap[s][i]; + int d = dfs(to[s][i], t, min_f); + + if (d > 0) { + cap[s][i] = cap[s][i] - d; + cap[to[s][i]][rev[s][i]] = cap[to[s][i]][rev[s][i]] + d; + return d; + } + i = i + 1; + } + return 0; +} + +int max_flow(int s, int t) +{ + int flow = 0; + + while (1) { + my_memset(used, 0, 10); + + int f = dfs(s, t, INF); + if (f == 0) + return flow; + flow = flow + f; + } +} + +int main() +{ + int V, E; + V = getint(); + E = getint(); + my_memset(size, 0, 10); + + while (E > 0) { + int u, v; + u = getint(); + v = getint(); + int c = getint(); + add_node(u, v, c); + E = E - 1; + } + + putint(max_flow(1, V)); + putch(10); + return 0; +} diff --git a/testcases/functional_test/093_n_queens.sy b/testcases/functional_test/093_n_queens.sy new file mode 100644 index 0000000..5a5c086 --- /dev/null +++ b/testcases/functional_test/093_n_queens.sy @@ -0,0 +1,49 @@ +int ans[50], sum = 0, n; + +int row[50], line1[50], line2[100]; + +void printans() +{ + sum = sum + 1; + int i = 1; + while (i <= n) { + putint(ans[i]); + if (i == n) { + putch(10); + return; + } else + putch(32); + i = i + 1; + } +} + +void f(int step) +{ + int i = 1; + while (i <= n) { + if (row[i] != 1 && line1[step + i] == 0 && !line2[n + step - i]) { + ans[step] = i; + if (step == n) + printans(); + row[i] = 1; + line1[step + i] = 1; + line2[n + step - i] = 1; + f(step + 1); + row[i] = 0; + line1[step + i] = 0; + line2[n + step - i] = 0; + } + i = i + 1; + } +} + +int main() +{ + int N = getint(); + while (N > 0) { + n = getint(); + f(1); + N = N - 1; + } + return sum; +} diff --git a/testcases/functional_test/094_substr.sy b/testcases/functional_test/094_substr.sy new file mode 100644 index 0000000..95ce88f --- /dev/null +++ b/testcases/functional_test/094_substr.sy @@ -0,0 +1,58 @@ + +int MAX(int a, int b) +{ + if (a == b) + return a; + else if (a > b) + return a; + else + return b; +} + +int max_sum_nonadjacent(int arr[], int n) +{ + int temp[16] = {}; + temp[0] = arr[0]; + temp[1] = MAX(arr[0], arr[1]); + int i = 2; + while (i < n) { + temp[i] = MAX(temp[i - 2] + arr[i], temp[i - 1]); + i = i + 1; + } + return temp[n - 1]; +} + +int longest_common_subseq(int arr1[], int len1, + int arr2[], int len2) +{ + int p[16][16] = {}; + int i, j; + i = 1; + while (i <= len1) { + j = 1; + while (j <= len2) { + if (arr1[i - 1] == arr2[j - 1]) { + p[i][j] = p[i - 1][j - 1] + 1; + } else { + p[i][j] = MAX(p[i - 1][j], p[i][j - 1]); + } + j = j + 1; + } + i = i + 1; + } + return p[len1][len2]; +} + +int main() +{ + int A[15] = {8, 7, 4, 1, 2, 7, 0, 1, 9, 3, 4, 8, 3, 7, 0}; + int B[13] = {3, 9, 7, 1, 4, 2, 4, 3, 6, 8, 0, 1, 5}; + int An, Bn; + + putint(max_sum_nonadjacent(A, 15)); + putch(10); + + putint(longest_common_subseq(A, 15, B, 13)); + putch(10); + return 0; +} diff --git a/testcases/functional_test/095_empty_stmt.sy b/testcases/functional_test/095_empty_stmt.sy new file mode 100644 index 0000000..a8c161f --- /dev/null +++ b/testcases/functional_test/095_empty_stmt.sy @@ -0,0 +1,5 @@ +int main() { + int a = 10; + ; + return a * 2 + 1; +} diff --git a/testcases/functional_test/096_side_effect.sy b/testcases/functional_test/096_side_effect.sy new file mode 100644 index 0000000..064b67e --- /dev/null +++ b/testcases/functional_test/096_side_effect.sy @@ -0,0 +1,29 @@ + +int a = -1, b = 1; + +int inc_a() +{ + int b = a; + b = b + 1; + a = b; + return a; +} + +int main() +{ + int k = 5; + while (k >= 0) { + if (inc_a() && inc_a() && inc_a()) { + putint(a); putch(32); putint(b); putch(10); + } + if (inc_a() < 14 || inc_a() && inc_a() - inc_a() + 1) { + putint(a); putch(10); + b = b * 2; + } else { + inc_a(); + } + k = k - 1; + } + putint(a); putch(32); putint(b); putch(10); + return a; +} diff --git a/testcases/functional_test/097_var_name.sy b/testcases/functional_test/097_var_name.sy new file mode 100644 index 0000000..ca736fe --- /dev/null +++ b/testcases/functional_test/097_var_name.sy @@ -0,0 +1,14 @@ +int main() { + int xU4UVdo6fPho5bRhUTjrlIMjqIY_evCyLJf0suh6fNNJ_3DxUYEO_xR1xkH9B68yOd4nSYbkstCnMA1BvxzZHFcKgYsWCq9M6sWFj2hbYtXZAMA2V8pUya5kbMgjwVwR_IKh_EeyZ5EU504YyCm79GrBpe7NMhLcqK5b41z3SzpL6eQT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k1ppG8NGbGZvy_Op8jybGIc_B9LmcGre5k9Nd0KZZRqD7X6QFVHhkNNjuKFYlx_a3vWTtmX3SrGVuQCMJEsgbqla8TS3lfkyhnjl3JVtr1LlGsDvMJAoubwHxxJ86Tv9L6k5c6K82CMeYDAXaMNh9KjqEAGTUHe6w5daraYhFYE3PLs9K0Tl7PCHyAoQutsdM2O0Sts_leOLsignSl9k1_nl8Z5LICcY11qnBusAfntTlJhH6b3TfVrks8_pf0H1Tpbj2vyqglle5oBCdeSOUJfrW9RmCJdOpvEIttyciMOEExGrMR4uXrl4F6a7VzPsFuRhi4sNib1_EDOKATGy1JQWPaPsepXwltnW_EDT5eKMGoagdkFiRPn_iDpu0ArPE1MRz5JYXPUyLQL9TuJUJWO5VvnqTQz19bwix0Z5XTFhmxGytpqJgh7TNzd_G_VXVr5N_gtFr7jmxZ4zOBOFNPytdNCw2fYUyybUkFPU43fam7IATF28q2xNwcpP95S5Mf7W4XD2sxLy5posJQqZzv60UEoPgLjUkzXZtovAT7zUibCC9LvXAwuIMaOolWRGNCLZUrSzm_yTfmEZXwUlPd0g76KaL1C6zyjXBb0DKhqcGqKBie4J3TyRv3j4wJfW4LGz0Gibv2jeJwYHfiUupWZNzG0rOtUkIYIdfZKmvwp9z9z7RlYrmxnVpgW_p2r1iloJbUoFa7yFBL0i701BLC8cy60YPgRf8nxdMSdeb34M34H7uZZFzGHfD_bb_FE08SRw_uPwSdtLMiwztlpB_9Z6X2CyqKB0rxfSSHE6k6kvByG2FqKipOMyDyAS2i7Tw3LwK6YWNVOhbVRx4gelY4g046RJsXBiXL5NTrpJL22F4zlc3o0KiSE; +} diff --git a/testcases/functional_test/098_chaos_token.sy b/testcases/functional_test/098_chaos_token.sy new file mode 100644 index 0000000..19d6e75 --- /dev/null +++ b/testcases/functional_test/098_chaos_token.sy @@ -0,0 +1,201 @@ +int __HELLO [ + + +100 + ] += { +87, 101, 108, 99, +111, 109, 101, +32, 116, 111, 32, +116, 104, +101, 32, 74, +97, + +112, 97, + + 114, 105, 32, 80, 97, + + + + +114, 107, 33, 10 }; /* Names of +kemono +friends */ int N4__mE___[6][50] = { { 83, 97, 97, 98, +97, +114, +117 }, { 75, 97, 98, + +97, 110 + +}, { + + +72, + + 97, +115, 104, 105, +98, 105, 114, 111, + + + + + + +107, + 111, + + +117 + +}, { 65, 114, + +97, + +105, +103, + +117, +109, + + + 97 }, + { 72, 117, +110, 98, 111, 114, +117, + +116, 111, 32, 80, +101, 110, + + 103, 105, 110 +}, + { 84, 97, 105, 114, 105, 107, 117, 32, 79, + + +111, 107, +97, +109, + + + + + + + 105 } }; + int + +saY_HeI10_To[40] = { 32, +115, 97, 121, + + 115, + +32, +104, + + 101, 108, 108, 111, + + 32, + + +116, 111, +32 }; int + RET[5] += +{10}; int putstr( +int str[ ] ) { + int + + iNd__1X ; iNd__1X = 0 ; while ( str + [ iNd__1X + ] ) { + + putch ( + +str[ iNd__1X +] + ) ; iNd__1X += +iNd__1X + + + 1 + +; } return iNd__1X + ; } int main( /* no param */ ) { +putstr( +__HELLO ) ; int i = + 0 ; /* say + + + hello to + kemono friends +~ */ while ( + + 1 ) { + +int _ + = i + +/ 6 + +; int __ += +i % 6 + +; + + if +( + +_ + +!= + + + __ ) + { putstr( + +N4__mE___ + + [ _ + ] ) +; putstr( +saY_HeI10_To ) ; +putstr( +N4__mE___ [ + + + +__ ] ) + + +; + + putstr( +RET +) ; +} +/* + do + + linear +modulo +to find the next pair of friends */ i = ( i +* + + +17 + ++ 23 +) +% + + +32 + + + ; +if ( i +== + 0 ) { break ; } + + + } return 0; } diff --git a/testcases/functional_test/099_skip_spaces.sy b/testcases/functional_test/099_skip_spaces.sy new file mode 100644 index 0000000..afb3afd --- /dev/null +++ b/testcases/functional_test/099_skip_spaces.sy @@ -0,0 +1,22 @@ +// ??? // ???? + // ????? +/* + +int main() { + int arr[100], i = 0, sum = 0; + while (getint()) { + arr[i] = getint(); + i = i + 1; + }*/ +int main() { + int arr[100], i = 0, sum = 0; + while (getint()) { + arr[i] = getint(); + i = i + 1; + } + while (i) { + i = i - 1; + sum = sum + arr[i]; + } + return sum % 79; +} \ No newline at end of file diff --git a/testcases/functional_test/09_if.sy b/testcases/functional_test/09_if.sy new file mode 100644 index 0000000..a908d63 --- /dev/null +++ b/testcases/functional_test/09_if.sy @@ -0,0 +1,9 @@ +int a; + +int main(){ + a = 10; + if( a>0 ){ + return 1; + } + return 0; +} diff --git a/testcases/functional_test/09_void_func.sy b/testcases/functional_test/09_void_func.sy new file mode 100644 index 0000000..2799e1e --- /dev/null +++ b/testcases/functional_test/09_void_func.sy @@ -0,0 +1,13 @@ +int a,b,c; + +void add(int a,int b){ + c=a+b; + return; +} + +int main(){ + a=3; + b=2; + add(a,b); + return c; +} \ No newline at end of file diff --git a/testcases/functional_test/100_array_concat.sy b/testcases/functional_test/100_array_concat.sy new file mode 100644 index 0000000..7e69e38 --- /dev/null +++ b/testcases/functional_test/100_array_concat.sy @@ -0,0 +1,52 @@ + +int concat(int a0[],int b0[],int c0[]) +{ + int i; + i=0; + while(i<3) + { + c0[i]=a0[i]; + + i=i+1; + } + int j; + j=0; + while(j<3) + { + c0[i]=b0[j]; + i=i+1; + j=j+1; + } + + return 0; + +} + +int main() +{ + int a0[3];int a1[3]; int a2[3];int b0[3];int b1[3];int b2[3];int c0[6];int c1[3];int c2[3]; + int i; + i=0; + while(i<3) + { + a0[i]=i; + a1[i]=i; + a2[i]=i; + b0[i]=i; + b1[i]=i; + b2[i]=i; + i=i+1; + } + i=concat( a0,b0, c0); + int x; + while(i<6) + { + x = c0[i]; + putint(x); + i=i+1; + } + x = 10; + putch(x); + + return 0; +} diff --git a/testcases/functional_test/100_int_literal.sy b/testcases/functional_test/100_int_literal.sy new file mode 100644 index 0000000..074b099 --- /dev/null +++ b/testcases/functional_test/100_int_literal.sy @@ -0,0 +1,50 @@ +int s = 0; + +int get_ans_se(int ans, int v0, int v1) { + int v = 0; + if (v0 == v1) v = 1; + ans = ans * 2; + ans = ans + v; + s = s + ans; + return ans; +} + +int get_ans(int ans, int v0, int v1) { + int v = 0; + if (v0 == v1) v = 1; + ans = ans * 2; + ans = ans + v; + return ans; +} + +int main() { + const int k0 = -2147483648; + const int k1 = 0x80000000; + const int k2 = 0x80000000 + 1; + const int k3 = 0x7fFffffF; + const int k4 = 0x7fFffffF - 1; + int a1, a2, a3, a4; + a1 = get_ans( 0, k0, k1); + a1 = get_ans(a1, k0 + 1, k2); + a1 = get_ans(a1, k0, -k3 - 1); + a1 = get_ans(a1, k0, k4 + 1); + a1 = get_ans(a1, k1 / 2, k2 / 2); + a1 = get_ans(a1, k1, -k3 - 1); + a1 = get_ans(a1, k1, k4 + 1); + a2 = get_ans( 0, k2, k3); + a2 = get_ans(a2, k2, k4); + a2 = get_ans(a2, k3, k4); + a2 = get_ans(a2, k0 / 2, k1 / 2); + a3 = get_ans_se( 0, k0, k1); + a3 = get_ans_se(a3, k0 + 1, k2); + a3 = get_ans_se(a3, k0, -k3 - 1); + a3 = get_ans_se(a3, k0, k4 + 1); + a3 = get_ans_se(a3, k1 / 2, k2 / 2); + a3 = get_ans_se(a3, k1, -k3 - 1); + a3 = get_ans_se(a3, k1, k4 + 1); + a4 = get_ans_se( 0, k2, k3); + a4 = get_ans_se(a4, k2, k4); + a4 = get_ans_se(a4, k3, k4); + a4 = get_ans_se(a4, k0 / 2, k1 / 2); + return a1 + a2 + a3 + a4; +} diff --git a/testcases/functional_test/101_insert_order.sy b/testcases/functional_test/101_insert_order.sy new file mode 100644 index 0000000..9d1e7b8 --- /dev/null +++ b/testcases/functional_test/101_insert_order.sy @@ -0,0 +1,55 @@ +//int n; +int N; +int insert(int a[],int x) +{ + int p; + int i; + p=0; + + while(x>a[p]&&pp) + { + a[i]=a[i-1]; + a[p]=x; + i=i-1; + + } + + return 0; +} + +int main() +{ + N=10; + int a[11]; + //a[0]=1; + a[0]=1; + a[1]=3; + a[2]=4; + a[3]=7; + a[4]=8; + a[5]=11; + a[6]=13; + a[7]=18; + a[8]=56; + a[9]=78; + int x; + int i; + i=0; + x=getint(); + x=insert(a,x); + //while() + while(i 10) { + k = k - 88; + if (k < 1000) { + int g = 9; + { + int l = 11; + { + g = 10; + k = k - g; + int g = 11; + k = k + g + l; + } + } + } + } + putint(k); + } + return k; +} diff --git a/testcases/functional_test/102_line_search.sy b/testcases/functional_test/102_line_search.sy new file mode 100644 index 0000000..438ff7f --- /dev/null +++ b/testcases/functional_test/102_line_search.sy @@ -0,0 +1,59 @@ + +int main() +{ + //newline=10; + int i; + int sum; + int a[10]; + sum=0; + //m = 1478; + //int t; + i=0; + while(i<10) + { + a[i]=i+1; + i=i+1; + } + int x; + int high; + int low; + int mid; + int n; + n=10; + x=getint(); + high=n-1; + low=0; + mid=(high+low)/2; + int flag; + flag=0; + //int i; + i=0; + int j; + j=0; + while(i<10 && flag==0) + { + if(a[i]==x) + { + flag=1; + j=i; + } + + i=i+1; + + } + + if(flag==1) + putint(j); + else + { + x = 0; + putint(x); + } + + + + x= 10; + putch(x); + + return 0; +} diff --git a/testcases/functional_test/102_short_circuit3.sy b/testcases/functional_test/102_short_circuit3.sy new file mode 100644 index 0000000..26061ee --- /dev/null +++ b/testcases/functional_test/102_short_circuit3.sy @@ -0,0 +1,44 @@ +int a, b, d; + +int set_a(int val) { a = val; return a; } +int set_b(int val) { b = val; return b; } +int set_d(int val) { d = val; return d; } + +int main() +{ + a = 2; b = 3; + if (set_a(0) && set_b(1)) {} + putint(a); putch(32); + putint(b); putch(32); + + a = 2; b = 3; + if (set_a(0) && set_b(1)) ; + putint(a); putch(32); + putint(b); putch(10); + + const int c = 1; + d = 2; + if (c >= 1 && set_d(3)) ; + putint(d); putch(32); + if (c <= 1 || set_d(4)) {} + putint(d); putch(10); + + if (16 >= (3 - (2 + 1))) { putch(65); } + if ((25 - 7) != (36 - 6 * 3)) putch(66); + if (1 < 8 != 7 % 2) { putch(67); } + if (3 > 4 == 0) { putch(68); } + if (1 == 0x66 <= 077) putch(69); + if (5 - 6 == -!0) putch(70); + putch(10); + + int i0 = 0, i1 = 1, i2 = 2, i3 = 3, i4 = 4; + while (i0 && i1) putch(32); + if (i0 || i1) putch(67); + if (i0 >= i1 || i1 <= i0) putch(72); + if (i2 >= i1 && i4 != i3) { putch(73); } + if (i0 == !i1 && i3 < i3 || i4 >= i4) { putch(74); } + if (i0 == !i1 || i3 < i3 && i4 >= i4) putch(75); + putch(10); + + return 0; +} diff --git a/testcases/functional_test/103_long_func.sy b/testcases/functional_test/103_long_func.sy new file mode 100644 index 0000000..15cc41d --- /dev/null +++ b/testcases/functional_test/103_long_func.sy @@ -0,0 +1,1382 @@ +const int SHIFT_TABLE[16] = {1, 2, 4, 8, 16, 32, 64, 128, + 256, 512, 1024, 2048, 4096, 8192, 16384, 32768}; + +int long_func() { + int ans, i, x, y, cur; + { + int pl = 2, pr = 0, pres = 1; + while (pr > 0) { + ans = 0; + i = 0; + x = pr; + y = 1; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + if (ans) { + { + int ml = pres, mr = pl, mres = 0; + while (mr) { + ans = 0; + i = 0; + x = mr; + y = 1; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + if (ans) { + { + int al = mres, c = ml, sum; + while (c) { + ans = 0; + i = 0; + x = al; + y = c; + while (i < 16) { + if (x % 2) { + if (y % 2 == 0) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + } else if (y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + sum = ans; + ans = 0; + i = 0; + x = al; + y = c; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + c = ans; + if ((1) > 15) { + ans = 0; + } else { + ans = 0; + i = 0; + x = (c)*SHIFT_TABLE[1]; + y = 0xffff; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + } + c = ans; + al = sum; + } + ans = al; + } + mres = ans; + } + { + int al = ml, c = ml, sum; + while (c) { + ans = 0; + i = 0; + x = al; + y = c; + while (i < 16) { + if (x % 2) { + if (y % 2 == 0) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + } else if (y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + sum = ans; + ans = 0; + i = 0; + x = al; + y = c; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + c = ans; + if ((1) > 15) { + ans = 0; + } else { + ans = 0; + i = 0; + x = (c)*SHIFT_TABLE[1]; + y = 0xffff; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + } + c = ans; + al = sum; + } + ans = al; + } + ml = ans; + x = mr; + y = 1; + if (y >= 15) { + if (x < 0) { + ans = 0xffff; + } else { + ans = 0; + } + } else if (y > 0) { + if (x > 0x7fff) { + x = x / SHIFT_TABLE[y]; + ans = x + 65536 - SHIFT_TABLE[15 - y + 1]; + } else { + ans = x / SHIFT_TABLE[y]; + } + } else { + ans = x; + } + mr = ans; + } + ans = mres; + } + pres = ans; + } + { + int ml = pl, mr = pl, mres = 0; + while (mr) { + ans = 0; + i = 0; + x = mr; + y = 1; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + if (ans) { + { + int al = mres, c = ml, sum; + while (c) { + ans = 0; + i = 0; + x = al; + y = c; + while (i < 16) { + if (x % 2) { + if (y % 2 == 0) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + } else if (y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + sum = ans; + ans = 0; + i = 0; + x = al; + y = c; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + c = ans; + if ((1) > 15) { + ans = 0; + } else { + ans = 0; + i = 0; + x = (c)*SHIFT_TABLE[1]; + y = 0xffff; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + } + c = ans; + al = sum; + } + ans = al; + } + mres = ans; + } + { + int al = ml, c = ml, sum; + while (c) { + ans = 0; + i = 0; + x = al; + y = c; + while (i < 16) { + if (x % 2) { + if (y % 2 == 0) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + } else if (y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + sum = ans; + ans = 0; + i = 0; + x = al; + y = c; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + c = ans; + if ((1) > 15) { + ans = 0; + } else { + ans = 0; + i = 0; + x = (c)*SHIFT_TABLE[1]; + y = 0xffff; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + } + c = ans; + al = sum; + } + ans = al; + } + ml = ans; + x = mr; + y = 1; + if (y >= 15) { + if (x < 0) { + ans = 0xffff; + } else { + ans = 0; + } + } else if (y > 0) { + if (x > 0x7fff) { + x = x / SHIFT_TABLE[y]; + ans = x + 65536 - SHIFT_TABLE[15 - y + 1]; + } else { + ans = x / SHIFT_TABLE[y]; + } + } else { + ans = x; + } + mr = ans; + } + ans = mres; + } + pl = ans; + x = pr; + y = 1; + if (y >= 15) { + if (x < 0) { + ans = 0xffff; + } else { + ans = 0; + } + } else if (y > 0) { + if (x > 0x7fff) { + x = x / SHIFT_TABLE[y]; + ans = x + 65536 - SHIFT_TABLE[15 - y + 1]; + } else { + ans = x / SHIFT_TABLE[y]; + } + } else { + ans = x; + } + pr = ans; + } + ans = pres; + } + putint(ans); + putch(10); + { + int pl = 2, pr = 1, pres = 1; + while (pr > 0) { + ans = 0; + i = 0; + x = pr; + y = 1; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + if (ans) { + { + int ml = pres, mr = pl, mres = 0; + while (mr) { + ans = 0; + i = 0; + x = mr; + y = 1; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + if (ans) { + { + int al = mres, c = ml, sum; + while (c) { + ans = 0; + i = 0; + x = al; + y = c; + while (i < 16) { + if (x % 2) { + if (y % 2 == 0) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + } else if (y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + sum = ans; + ans = 0; + i = 0; + x = al; + y = c; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + c = ans; + if ((1) > 15) { + ans = 0; + } else { + ans = 0; + i = 0; + x = (c)*SHIFT_TABLE[1]; + y = 0xffff; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + } + c = ans; + al = sum; + } + ans = al; + } + mres = ans; + } + { + int al = ml, c = ml, sum; + while (c) { + ans = 0; + i = 0; + x = al; + y = c; + while (i < 16) { + if (x % 2) { + if (y % 2 == 0) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + } else if (y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + sum = ans; + ans = 0; + i = 0; + x = al; + y = c; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + c = ans; + if ((1) > 15) { + ans = 0; + } else { + ans = 0; + i = 0; + x = (c)*SHIFT_TABLE[1]; + y = 0xffff; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + } + c = ans; + al = sum; + } + ans = al; + } + ml = ans; + x = mr; + y = 1; + if (y >= 15) { + if (x < 0) { + ans = 0xffff; + } else { + ans = 0; + } + } else if (y > 0) { + if (x > 0x7fff) { + x = x / SHIFT_TABLE[y]; + ans = x + 65536 - SHIFT_TABLE[15 - y + 1]; + } else { + ans = x / SHIFT_TABLE[y]; + } + } else { + ans = x; + } + mr = ans; + } + ans = mres; + } + pres = ans; + } + { + int ml = pl, mr = pl, mres = 0; + while (mr) { + ans = 0; + i = 0; + x = mr; + y = 1; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + if (ans) { + { + int al = mres, c = ml, sum; + while (c) { + ans = 0; + i = 0; + x = al; + y = c; + while (i < 16) { + if (x % 2) { + if (y % 2 == 0) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + } else if (y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + sum = ans; + ans = 0; + i = 0; + x = al; + y = c; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + c = ans; + if ((1) > 15) { + ans = 0; + } else { + ans = 0; + i = 0; + x = (c)*SHIFT_TABLE[1]; + y = 0xffff; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + } + c = ans; + al = sum; + } + ans = al; + } + mres = ans; + } + { + int al = ml, c = ml, sum; + while (c) { + ans = 0; + i = 0; + x = al; + y = c; + while (i < 16) { + if (x % 2) { + if (y % 2 == 0) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + } else if (y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + sum = ans; + ans = 0; + i = 0; + x = al; + y = c; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + c = ans; + if ((1) > 15) { + ans = 0; + } else { + ans = 0; + i = 0; + x = (c)*SHIFT_TABLE[1]; + y = 0xffff; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + } + c = ans; + al = sum; + } + ans = al; + } + ml = ans; + x = mr; + y = 1; + if (y >= 15) { + if (x < 0) { + ans = 0xffff; + } else { + ans = 0; + } + } else if (y > 0) { + if (x > 0x7fff) { + x = x / SHIFT_TABLE[y]; + ans = x + 65536 - SHIFT_TABLE[15 - y + 1]; + } else { + ans = x / SHIFT_TABLE[y]; + } + } else { + ans = x; + } + mr = ans; + } + ans = mres; + } + pl = ans; + x = pr; + y = 1; + if (y >= 15) { + if (x < 0) { + ans = 0xffff; + } else { + ans = 0; + } + } else if (y > 0) { + if (x > 0x7fff) { + x = x / SHIFT_TABLE[y]; + ans = x + 65536 - SHIFT_TABLE[15 - y + 1]; + } else { + ans = x / SHIFT_TABLE[y]; + } + } else { + ans = x; + } + pr = ans; + } + ans = pres; + } + putint(ans); + putch(10); + cur = 2; + while (cur < 16) { + { + int pl = 2, pr = cur, pres = 1; + while (pr > 0) { + ans = 0; + i = 0; + x = pr; + y = 1; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + if (ans) { + { + int ml = pres, mr = pl, mres = 0; + while (mr) { + ans = 0; + i = 0; + x = mr; + y = 1; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + if (ans) { + { + int al = mres, c = ml, sum; + while (c) { + ans = 0; + i = 0; + x = al; + y = c; + while (i < 16) { + if (x % 2) { + if (y % 2 == 0) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + } else if (y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + sum = ans; + ans = 0; + i = 0; + x = al; + y = c; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + c = ans; + if ((1) > 15) { + ans = 0; + } else { + ans = 0; + i = 0; + x = (c)*SHIFT_TABLE[1]; + y = 0xffff; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + } + c = ans; + al = sum; + } + ans = al; + } + mres = ans; + } + { + int al = ml, c = ml, sum; + while (c) { + ans = 0; + i = 0; + x = al; + y = c; + while (i < 16) { + if (x % 2) { + if (y % 2 == 0) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + } else if (y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + sum = ans; + ans = 0; + i = 0; + x = al; + y = c; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + c = ans; + if ((1) > 15) { + ans = 0; + } else { + ans = 0; + i = 0; + x = (c)*SHIFT_TABLE[1]; + y = 0xffff; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + } + c = ans; + al = sum; + } + ans = al; + } + ml = ans; + x = mr; + y = 1; + if (y >= 15) { + if (x < 0) { + ans = 0xffff; + } else { + ans = 0; + } + } else if (y > 0) { + if (x > 0x7fff) { + x = x / SHIFT_TABLE[y]; + ans = x + 65536 - SHIFT_TABLE[15 - y + 1]; + } else { + ans = x / SHIFT_TABLE[y]; + } + } else { + ans = x; + } + mr = ans; + } + ans = mres; + } + pres = ans; + } + { + int ml = pl, mr = pl, mres = 0; + while (mr) { + ans = 0; + i = 0; + x = mr; + y = 1; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + if (ans) { + { + int al = mres, c = ml, sum; + while (c) { + ans = 0; + i = 0; + x = al; + y = c; + while (i < 16) { + if (x % 2) { + if (y % 2 == 0) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + } else if (y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + sum = ans; + ans = 0; + i = 0; + x = al; + y = c; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + c = ans; + if ((1) > 15) { + ans = 0; + } else { + ans = 0; + i = 0; + x = (c)*SHIFT_TABLE[1]; + y = 0xffff; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + } + c = ans; + al = sum; + } + ans = al; + } + mres = ans; + } + { + int al = ml, c = ml, sum; + while (c) { + ans = 0; + i = 0; + x = al; + y = c; + while (i < 16) { + if (x % 2) { + if (y % 2 == 0) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + } else if (y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + sum = ans; + ans = 0; + i = 0; + x = al; + y = c; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + c = ans; + if ((1) > 15) { + ans = 0; + } else { + ans = 0; + i = 0; + x = (c)*SHIFT_TABLE[1]; + y = 0xffff; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + } + c = ans; + al = sum; + } + ans = al; + } + ml = ans; + x = mr; + y = 1; + if (y >= 15) { + if (x < 0) { + ans = 0xffff; + } else { + ans = 0; + } + } else if (y > 0) { + if (x > 0x7fff) { + x = x / SHIFT_TABLE[y]; + ans = x + 65536 - SHIFT_TABLE[15 - y + 1]; + } else { + ans = x / SHIFT_TABLE[y]; + } + } else { + ans = x; + } + mr = ans; + } + ans = mres; + } + pl = ans; + x = pr; + y = 1; + if (y >= 15) { + if (x < 0) { + ans = 0xffff; + } else { + ans = 0; + } + } else if (y > 0) { + if (x > 0x7fff) { + x = x / SHIFT_TABLE[y]; + ans = x + 65536 - SHIFT_TABLE[15 - y + 1]; + } else { + ans = x / SHIFT_TABLE[y]; + } + } else { + ans = x; + } + pr = ans; + } + ans = pres; + } + putint(ans); + putch(10); + cur = cur + 1; + } + cur = 0; + while (cur < 16) { + { + int pl = 2, pr = cur, pres = 1; + while (pr > 0) { + ans = 0; + i = 0; + x = pr; + y = 1; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + if (ans) { + { + int ml = pres, mr = pl, mres = 0; + while (mr) { + ans = 0; + i = 0; + x = mr; + y = 1; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + if (ans) { + { + int al = mres, c = ml, sum; + while (c) { + ans = 0; + i = 0; + x = al; + y = c; + while (i < 16) { + if (x % 2) { + if (y % 2 == 0) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + } else if (y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + sum = ans; + ans = 0; + i = 0; + x = al; + y = c; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + c = ans; + if ((1) > 15) { + ans = 0; + } else { + ans = 0; + i = 0; + x = (c)*SHIFT_TABLE[1]; + y = 0xffff; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + } + c = ans; + al = sum; + } + ans = al; + } + mres = ans; + } + { + int al = ml, c = ml, sum; + while (c) { + ans = 0; + i = 0; + x = al; + y = c; + while (i < 16) { + if (x % 2) { + if (y % 2 == 0) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + } else if (y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + sum = ans; + ans = 0; + i = 0; + x = al; + y = c; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + c = ans; + if ((1) > 15) { + ans = 0; + } else { + ans = 0; + i = 0; + x = (c)*SHIFT_TABLE[1]; + y = 0xffff; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + } + c = ans; + al = sum; + } + ans = al; + } + ml = ans; + x = mr; + y = 1; + if (y >= 15) { + if (x < 0) { + ans = 0xffff; + } else { + ans = 0; + } + } else if (y > 0) { + if (x > 0x7fff) { + x = x / SHIFT_TABLE[y]; + ans = x + 65536 - SHIFT_TABLE[15 - y + 1]; + } else { + ans = x / SHIFT_TABLE[y]; + } + } else { + ans = x; + } + mr = ans; + } + ans = mres; + } + pres = ans; + } + { + int ml = pl, mr = pl, mres = 0; + while (mr) { + ans = 0; + i = 0; + x = mr; + y = 1; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + if (ans) { + { + int al = mres, c = ml, sum; + while (c) { + ans = 0; + i = 0; + x = al; + y = c; + while (i < 16) { + if (x % 2) { + if (y % 2 == 0) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + } else if (y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + sum = ans; + ans = 0; + i = 0; + x = al; + y = c; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + c = ans; + if ((1) > 15) { + ans = 0; + } else { + ans = 0; + i = 0; + x = (c)*SHIFT_TABLE[1]; + y = 0xffff; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + } + c = ans; + al = sum; + } + ans = al; + } + mres = ans; + } + { + int al = ml, c = ml, sum; + while (c) { + ans = 0; + i = 0; + x = al; + y = c; + while (i < 16) { + if (x % 2) { + if (y % 2 == 0) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + } else if (y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + sum = ans; + ans = 0; + i = 0; + x = al; + y = c; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + c = ans; + if ((1) > 15) { + ans = 0; + } else { + ans = 0; + i = 0; + x = (c)*SHIFT_TABLE[1]; + y = 0xffff; + while (i < 16) { + if (x % 2 && y % 2) { + ans = ans + 1 * SHIFT_TABLE[i]; + } + x = x / 2; + y = y / 2; + i = i + 1; + } + } + c = ans; + al = sum; + } + ans = al; + } + ml = ans; + x = mr; + y = 1; + if (y >= 15) { + if (x < 0) { + ans = 0xffff; + } else { + ans = 0; + } + } else if (y > 0) { + if (x > 0x7fff) { + x = x / SHIFT_TABLE[y]; + ans = x + 65536 - SHIFT_TABLE[15 - y + 1]; + } else { + ans = x / SHIFT_TABLE[y]; + } + } else { + ans = x; + } + mr = ans; + } + ans = mres; + } + pl = ans; + x = pr; + y = 1; + if (y >= 15) { + if (x < 0) { + ans = 0xffff; + } else { + ans = 0; + } + } else if (y > 0) { + if (x > 0x7fff) { + x = x / SHIFT_TABLE[y]; + ans = x + 65536 - SHIFT_TABLE[15 - y + 1]; + } else { + ans = x / SHIFT_TABLE[y]; + } + } else { + ans = x; + } + pr = ans; + } + ans = pres; + } + if (SHIFT_TABLE[cur] != ans) return 1; + cur = cur + 1; + } + return 0; +} + +int main() { + return long_func(); +} diff --git a/testcases/functional_test/104_long_array.sy b/testcases/functional_test/104_long_array.sy new file mode 100644 index 0000000..251117b --- /dev/null +++ b/testcases/functional_test/104_long_array.sy @@ -0,0 +1,61 @@ +const int N = 10000; + +int long_array(int k) { + int a1[N]; + int a2[N]; + int a3[N]; + int i = 0; + while (i < N) { + a1[i] = (i * i) % 10; + i = i + 1; + } + i = 0; + while (i < N) { + a2[i] = (a1[i] * a1[i]) % 10; + i = i + 1; + } + i = 0; + while (i < N) { + a3[i] = (a2[i] * a2[i]) % 100 + a1[i]; + i = i + 1; + } + int ans = 0; + i = 0; + while (i < N) { + if (i < 10) { + ans = (ans + a3[i]) % 1333; + putint(ans); + } + else if (i < 20) { + int j = N / 2; + while (j < N) { + ans = ans + a3[i] - a1[j]; + j = j + 1; + } + putint(ans); + } + else if (i < 30) { + int j = N / 2; + while (j < N) { + if (j > 2233) { + ans = ans + a2[i] - a1[j]; + j = j + 1; + } + else { + ans = (ans + a1[i] + a3[j]) % 13333; + j = j + 2; + } + } + putint(ans); + } + else { + ans = (ans + a3[i] * k) % 99988; + } + i = i + 1; + } + return ans; +} + +int main() { + return long_array(9); +} diff --git a/testcases/functional_test/105_long_array2.sy b/testcases/functional_test/105_long_array2.sy new file mode 100644 index 0000000..153930f --- /dev/null +++ b/testcases/functional_test/105_long_array2.sy @@ -0,0 +1,19 @@ +int a[4096]; + +int f1(int b[]) +{ + a[5] = 4000; + a[4000] = 3; + a[4095] = 7; + b[a[4095]] = a[2216] + 9; + return a[a[5]]; +} + +int main() +{ + int b[4][1024] = {{}, {1}, {2, 3}, {4, 5, 6}}; + int c[1024][4] = {{1, 2}, {3, 4}}; + putint(f1(c[0])); + putch(10); + return c[2][0]; +} \ No newline at end of file diff --git a/testcases/functional_test/106_long_code.sy b/testcases/functional_test/106_long_code.sy new file mode 100644 index 0000000..9eb211e --- /dev/null +++ b/testcases/functional_test/106_long_code.sy @@ -0,0 +1,303 @@ +// Really long code; +int n; + +int bubblesort(int arr[]) { + int i; + int j; + i =0; + while(i < n-1){ + // Last i elements are already in place + j = 0; + while(j < n-i-1){ + if (arr[j] > arr[j+1]) { + // swap(&arr[j], &arr[j+1]); + int tmp; + tmp = arr[j+1]; + arr[j+1] = arr[j]; + arr[j] = tmp; + } + j = j + 1; + } + i = i + 1; + } + return 0; +} + +int insertsort(int a[]) { + int i; + i = 1; + while(i-1&&temp k - 1) + { + j = j - 1; + } + + if(i < j) + { + arr[i] = arr[j]; + i = i + 1; + } + + while(i < j && arr[i] < k) + { + i = i + 1; + } + + if(i < j) + { + arr[j] = arr[i]; + j = j - 1; + } + } + + arr[i] = k; + int tmp; + tmp = i - 1; + tmp = QuickSort(arr, low, tmp); + tmp = i + 1; + tmp = QuickSort(arr, tmp, high); + } + return 0; +} + + +int getMid(int arr[]) { + int mid; + if (n % 2 == 0) { + mid = n / 2; + return (arr[mid] + arr[mid - 1]) / 2; + } else { + mid = n / 2; + return arr[mid]; + } +} + +int getMost(int arr[]) { + int count[1000]; + int i; + i = 0; + while (i < 1000) { + count[i] = 0; + i = i + 1; + } + i = 0; + int max; + int number; + max = 0; + while (i < n) { + int num; + num = arr[i]; + count[num] = count[num] + 1; + if (count[num] > max) { + max = count[num]; + number = num; + } + i = i + 1; + } + return number; +} + +int revert(int arr[]) { + int temp; + int i; + int j; + i = 0; + j = 0; + while (i < j) { + temp = arr[i]; + arr[i] = arr[j]; + arr[j] = temp; + i = i + 1; + j = j - 1; + } + return 0; +} + +int arrCopy(int src[], int target[]) { + int i; + i = 0; + while (i < n) { + target[i] = src[i]; + i = i + 1; + } + return 0; +} + +int calSum(int arr[], int stride) { + int sum; + sum = 0; + int i; + i = 0; + while (i < n) { + sum = sum + arr[i]; + if (i % stride != stride - 1) { + arr[i] = 0; + } else { + arr[i] = sum; + sum = 0; + } + i = i + 1; + } + return 0; +} + +int avgPooling(int arr[], int stride) { + int sum; + int i; + i = 0; + sum = 0; + int lastnum; + while (i < n) { + if (i < stride - 1) { + sum = sum + arr[i]; + } else if (i == stride - 1) { + lastnum = arr[0]; + arr[0] = sum / stride; + } else { + sum = sum + arr[i] - lastnum; + lastnum = arr[i - stride + 1]; + arr[i - stride + 1] = sum / stride; + } + i = i + 1; + } + i = n - stride + 1; + while (i < n) { + arr[i] = 0; + i = i + 1; + } + return 0; +} + +int main() { + n = 32; + int arr[32]; + int result[32]; + arr[0] = 7; + arr[1] = 23; + arr[2] = 89; + arr[3] = 26; + arr[4] = 282; + arr[5] = 254; + arr[6] = 27; + arr[7] = 5; + arr[8] = 83; + arr[9] = 273; + arr[10] = 574; + arr[11] = 905; + arr[12] = 354; + arr[13] = 657; + arr[14] = 935; + arr[15] = 264; + arr[16] = 639; + arr[17] = 459; + arr[18] = 29; + arr[19] = 68; + arr[20] = 929; + arr[21] = 756; + arr[22] = 452; + arr[23] = 279; + arr[24] = 58; + arr[25] = 87; + arr[26] = 96; + arr[27] = 36; + arr[28] = 39; + arr[29] = 28; + arr[30] = 1; + arr[31] = 290; + int t; + t = arrCopy(arr, result); + t = revert(result); + int i; + i = 0; + while (i < 32) { + t = result[i]; + putint(t); + i = i + 1; + } + t = bubblesort(result); + i = 0; + while (i < 32) { + t = result[i]; + putint(t); + i = i + 1; + } + t = getMid(result); + putint(t); + t = getMost(result); + putint(t); + + t = arrCopy(arr, result); + t = bubblesort(result); + i = 0; + while (i < 32) { + t = result[i]; + putint(t); + i = i + 1; + } + + t = arrCopy(arr, result); + t = insertsort(result); + i = 0; + while (i < 32) { + t = result[i]; + putint(t); + i = i + 1; + } + + t = arrCopy(arr, result); + i = 0; + t = 31; + t = QuickSort(result, i, t); + while (i < 32) { + t = result[i]; + putint(t); + i = i + 1; + } + + t = arrCopy(arr, result); + t = calSum(result, 4); + i = 0; + while (i < 32) { + t = result[i]; + putint(t); + i = i + 1; + } + + t = arrCopy(arr, result); + t = avgPooling(result, 3); + i = 0; + while (i < 32) { + t = result[i]; + putint(t); + i = i + 1; + } + return 0; +} diff --git a/testcases/functional_test/107_long_code2.sy b/testcases/functional_test/107_long_code2.sy new file mode 100644 index 0000000..d07b892 --- /dev/null +++ b/testcases/functional_test/107_long_code2.sy @@ -0,0 +1,406 @@ +int a[5][20000]; +int main() { + a[4][19999] = 1; + int ans = +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + +a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] + a[2 * 2][20000 - 1] ; + return ans; +} \ No newline at end of file diff --git a/testcases/functional_test/108_many_params.sy b/testcases/functional_test/108_many_params.sy new file mode 100644 index 0000000..3285342 --- /dev/null +++ b/testcases/functional_test/108_many_params.sy @@ -0,0 +1,106 @@ +void sort(int arr[], int len) { + int i = 0; + while (i < len - 1) { + int j = i + 1; + while (j < len) { + if (arr[i] < arr[j]) { + int temp = arr[i]; + arr[i] = arr[j]; + arr[j] = temp; + } + j = j + 1; + } + i = i + 1; + } +} + +// attempt to fool the inliner +int param32_rec(int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8, + int a9, int a10, int a11, int a12, int a13, int a14, int a15, + int a16, int a17, int a18, int a19, int a20, int a21, int a22, + int a23, int a24, int a25, int a26, int a27, int a28, int a29, + int a30, int a31, int a32) { + if (a1 == 0) { + return a2; + } + else { + return param32_rec(a1 - 1, (a2 + a3) % 998244353, a4, a5, a6, a7, a8, a9, + a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, + a21, a22, a23, a24, a25, a26, a27, a28, a29, a30, a31, + a32, 0); + } +} + +int param32_arr(int a1[], int a2[], int a3[], int a4[], int a5[], int a6[], + int a7[], int a8[], int a9[], int a10[], int a11[], int a12[], + int a13[], int a14[], int a15[], int a16[], int a17[], + int a18[], int a19[], int a20[], int a21[], int a22[], + int a23[], int a24[], int a25[], int a26[], int a27[], + int a28[], int a29[], int a30[], int a31[], int a32[]) { + int sum = a1[0] + a1[1]; + sum = sum + a2[0] + a2[1]; + sum = sum + a3[0] + a3[1]; + sum = sum + a4[0] + a4[1]; + sum = sum + a5[0] + a5[1]; + sum = sum + a6[0] + a6[1]; + sum = sum + a7[0] + a7[1]; + sum = sum + a8[0] + a8[1]; + sum = sum + a9[0] + a9[1]; + sum = sum + a10[0] + a10[1]; + sum = sum + a11[0] + a11[1]; + sum = sum + a12[0] + a12[1]; + sum = sum + a13[0] + a13[1]; + sum = sum + a14[0] + a14[1]; + sum = sum + a15[0] + a15[1]; + sum = sum + a16[0] + a16[1]; + sum = sum + a17[0] + a17[1]; + sum = sum + a18[0] + a18[1]; + sum = sum + a19[0] + a19[1]; + sum = sum + a20[0] + a20[1]; + sum = sum + a21[0] + a21[1]; + sum = sum + a22[0] + a22[1]; + sum = sum + a23[0] + a23[1]; + sum = sum + a24[0] + a24[1]; + sum = sum + a25[0] + a25[1]; + sum = sum + a26[0] + a26[1]; + sum = sum + a27[0] + a27[1]; + sum = sum + a28[0] + a28[1]; + sum = sum + a29[0] + a29[1]; + sum = sum + a30[0] + a30[1]; + sum = sum + a31[0] + a31[1]; + sum = sum + a32[0] + a32[1]; + return sum; +} + +int param16(int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8, + int a9, int a10, int a11, int a12, int a13, int a14, int a15, + int a16) { + int arr[16] = {a1, a2, a3, a4, a5, a6, a7, a8, + a9, a10, a11, a12, a13, a14, a15, a16}; + sort(arr, 16); + return param32_rec(arr[0], arr[1], arr[2], arr[3], arr[4], arr[5], arr[6], + arr[7], arr[8], arr[9], arr[10], arr[11], arr[12], arr[13], + arr[14], arr[15], a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, + a11, a12, a13, a14, a15, a16); +} + +int main() { + int arr[32][2] = {{param16(getint(), getint(), getint(), getint(), getint(), + getint(), getint(), getint(), getint(), getint(), + getint(), getint(), getint(), getint(), getint(), + getint()), + 8848}}, + i = 1; + while (i < 32) { + arr[i][0] = arr[i - 1][1] - 1; + arr[i][1] = arr[i - 1][0] - 2; + i = i + 1; + } + putint(param32_arr(arr[0], arr[1], arr[2], arr[3], arr[4], arr[5], arr[6], + arr[7], arr[8], arr[9], arr[10], arr[11], arr[12], arr[13], + arr[14], arr[15], arr[16], arr[17], arr[18], arr[19], + arr[20], arr[21], arr[22], arr[23], arr[24], arr[25], + arr[26], arr[27], arr[28], arr[29], arr[30], arr[31])); + putch(10); + return 0; +} diff --git a/testcases/functional_test/109_many_params2.sy b/testcases/functional_test/109_many_params2.sy new file mode 100644 index 0000000..c108de4 --- /dev/null +++ b/testcases/functional_test/109_many_params2.sy @@ -0,0 +1,48 @@ + +int func(int a, int b[][59], int c, int d[], int e, int f, int g[], int h, int i) +{ + int index = 0; + while (index < 10) { + putint(b[a][index]); + index = index + 1; + } + putch(10); + + putint(d[c]); + putch(10); + + while (i < 10) { + g[i] = h * 128875 % 3724; + i = i + 1; + h = h + 7; + } + + return e + f; +} + +int main() +{ + int a[61][67] = {}; + int b[53][59] = {}; + + a[17][1] = 6; + a[17][3] = 7; + a[17][4] = 4; + a[17][7] = 9; + a[17][11] = 11; + + b[6][1] = 1; + b[6][2] = 2; + b[6][3] = 3; + b[6][9] = 9; + + int ret; + ret = func(a[17][1], b, a[17][3], a[17], b[6][3], b[6][0], b[6], b[34][4], b[51][18]) * 3; + + while (ret >= 0) { + putint(b[6][ret]); putch(32); + ret = ret - 1; + } + putch(10); + return 0; +} diff --git a/testcases/functional_test/10_break.sy b/testcases/functional_test/10_break.sy new file mode 100644 index 0000000..55b40dc --- /dev/null +++ b/testcases/functional_test/10_break.sy @@ -0,0 +1,9 @@ +int main(){ + int a=10; + while(a>0){ + a=a-1; + if(a==5) + break; + } + return a; +} \ No newline at end of file diff --git a/testcases/functional_test/10_if_else.sy b/testcases/functional_test/10_if_else.sy new file mode 100644 index 0000000..a4f5062 --- /dev/null +++ b/testcases/functional_test/10_if_else.sy @@ -0,0 +1,10 @@ +int a; +int main(){ + a = 10; + if( a>0 ){ + return 1; + } + else{ + return 0; + } +} diff --git a/testcases/functional_test/110_many_params3.sy b/testcases/functional_test/110_many_params3.sy new file mode 100644 index 0000000..61d2fb4 --- /dev/null +++ b/testcases/functional_test/110_many_params3.sy @@ -0,0 +1,105 @@ +int testParam8(int a0, int a1, int a2, int a3, + int a4, int a5, int a6, int a7) { + return a0 - a1 + a2 - a3 - a4 - a5 + a6 + a7; +} + +int testParam16(int a0, int a1, int a2, int a3, + int a4, int a5, int a6, int a7, + int a8, int a9, int a10, int a11, + int a12, int a13, int a14, int a15) { + return a0 + a1 + a2 + a3 - a4 + a5 + a6 + a7 - + a8 + a9 - a10 + a11 + a12 + a13 + a14 + a15; +} + +int testParam32(int a0, int a1, int a2, int a3, + int a4, int a5, int a6, int a7, + int a8, int a9, int a10, int a11, + int a12, int a13, int a14, int a15, + int a16, int a17, int a18, int a19, + int a20, int a21, int a22, int a23, + int a24, int a25, int a26, int a27, + int a28, int a29, int a30, int a31) { + return a0 + a1 * a2 + a3 + a4 + a5 + a6 + a7 + + a8 + a9 + a10 + a11 - a12 - a13 - a14 - a15 - + a16 - a17 - a18 - a19 - a20 - a21 + a22 + a23 + + a24 + a25 + a26 + a27 + a28 + a29 + a30 + a31; +} + +int main() { + int a0; + int a1; + int a2; + int a3; + int a4; + int a5; + int a6; + int a7; + int a8; + int a9; + int a10; + int a11; + int a12; + int a13; + int a14; + int a15; + int a16; + int a17; + int a18; + int a19; + int a20; + int a21; + int a22; + int a23; + int a24; + int a25; + int a26; + int a27; + int a28; + int a29; + int a30; + int a31; + a0 = 0; + a1 = 1; + a2 = 2; + a3 = 3; + a4 = 4; + a5 = 5; + a6 = 6; + a7 = 7; + a8 = 8; + a9 = 9; + a10 = 0; + a11 = 1; + a12 = 2; + a13 = 3; + a14 = 4; + a15 = 5; + a16 = 6; + a17 = 7; + a18 = 8; + a19 = 9; + a20 = 0; + a21 = 1; + a22 = 2; + a23 = 3; + a24 = 4; + a25 = 5; + a26 = 6; + a27 = 7; + a28 = 8; + a29 = 9; + a30 = 0; + a31 = 1; + a0 = testParam32(testParam16( + testParam8(a0, a1, a2, a3, a4, a5, a6, a7), a1, a2, a3, + a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15), + a1, a2, a3, a4, a5, a6, a7, + a8, a9, a10, a11, + a12, a13, a14, a15, + a16, a17, a18, a19, + a20, a21, a22, a23, + a24, a25, a26, a27, + a28, a29, a30, a31); + putint(a0); + return 0; +} \ No newline at end of file diff --git a/testcases/functional_test/111_many_globals.sy b/testcases/functional_test/111_many_globals.sy new file mode 100644 index 0000000..247e2fc --- /dev/null +++ b/testcases/functional_test/111_many_globals.sy @@ -0,0 +1,132 @@ +// Call a func with many params. + +int a0; +int a1; +int a2; +int a3; +int a4; +int a5; +int a6; +int a7; +int a8; +int a9; +int a10; +int a11; +int a12; +int a13; +int a14; +int a15; +int a16; +int a17; +int a18; +int a19; +int a20; +int a21; +int a22; +int a23; +int a24; +int a25; +int a26; +int a27; +int a28; +int a29; +int a30; +int a31; + +int a32; +int a33; +int a34; +int a35; +int a36; +int a37; +int a38; +int a39; + +int testParam8(int a0, int a1, int a2, int a3, + int a4, int a5, int a6, int a7) { + return a0 + a1 + a2 + a3 + a4 + a5 + a6 + a7; +} + +int testParam16(int a0, int a1, int a2, int a3, + int a4, int a5, int a6, int a7, + int a8, int a9, int a10, int a11, + int a12, int a13, int a14, int a15) { + return a0 + a1 + a2 - a3 - a4 - a5 - a6 - a7 + + a8 + a9 + a10 + a11 + a12 + a13 + a14 + a15; +} + +int testParam32(int a0, int a1, int a2, int a3, + int a4, int a5, int a6, int a7, + int a8, int a9, int a10, int a11, + int a12, int a13, int a14, int a15, + int a16, int a17, int a18, int a19, + int a20, int a21, int a22, int a23, + int a24, int a25, int a26, int a27, + int a28, int a29, int a30, int a31) { + return a0 + a1 + a2 + a3 + a4 + a5 + a6 + a7 + + a8 + a9 + a10 + a11 + a12 + a13 + a14 + a15 + + a16 + a17 - a18 - a19 - a20 - a21 - a22 + a23 + + a24 + a25 + a26 + a27 + a28 + a29 + a30 + a31; +} + +int main() { + a0 = 0; + a1 = 1; + a2 = 2; + a3 = 3; + a4 = 4; + a5 = 5; + a6 = 6; + a7 = 7; + a8 = 8; + a9 = 9; + a10 = 0; + a11 = 1; + a12 = 2; + a13 = 3; + a14 = 4; + a15 = 5; + a16 = 6; + a17 = 7; + a18 = 8; + a19 = 9; + a20 = 0; + a21 = 1; + a22 = 2; + a23 = 3; + a24 = 4; + a25 = 5; + a26 = 6; + a27 = 7; + a28 = 8; + a29 = 9; + a30 = 0; + a31 = 1; + + a32 = 4; + a33 = 5; + a34 = 6; + a35 = 7; + a36 = 8; + a37 = 9; + a38 = 0; + a39 = 1; + + a0 = testParam8(a0, a1, a2, a3, a4, a5, a6, a7); + putint(a0); + a0 = testParam16(a32, a33, a34, a35, + a36, a37, a38, a39, + a8, a9, a10, a11, + a12, a13, a14, a15); + putint(a0); + a0 = testParam32(a0, a1, a2, a3, + a4, a5, a6, a7, + a8, a9, a10, a11, + a12, a13, a14, a15, + a16, a17, a18, a19, + a20, a21, a22, a23, + a24, a25, a26, a27, + a28, a29, a30, a31); + putint(a0); + return 0; +} diff --git a/testcases/functional_test/112_many_locals.sy b/testcases/functional_test/112_many_locals.sy new file mode 100644 index 0000000..fd0b4c7 --- /dev/null +++ b/testcases/functional_test/112_many_locals.sy @@ -0,0 +1,39 @@ + +int foo() +{ + int arr[16] = {0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3}; + + int a = 3, b = 7, c = 5, d = 6, e = 1, f = 0, g = 3, h = 5, + i = 4, j = 2, k = 7, l = 9, m = 8, n = 1, o = 4, p = 6; + + int sum1 = a + b + c + d + e + f + g + h; + int sum2 = i + j + k + l + m + n + o + p; + + return sum1 + sum2 + arr[a]; +} + +int main() +{ + int a = 3, b = 7, c = 5, d = 6, e = 1, f = 0, g = 3, h = 5, + i = 4, j = 2, k = 7, l = 9, m = 8, n = 1, o = 4, p = 6; + + int sum1 = a + b + c + d + e + f + g + h; + int sum2 = i + j + k + l + m + n + o + p; + + sum1 = sum1 + foo(); + + int q = 4, r = 7, s = 2, t = 5, u = 8, v = 0, w = 6, x = 3; + + sum2 = sum2 + foo(); + + a = i; b = j; c = k; d = l; + e = m; f = n; g = o; h = p; + + int sum3 = q + r + s + t + u + v + w + x; + + int sum = sum1 + sum2 + sum3; + + putint(sum); + putch(10); + return 0; +} diff --git a/testcases/functional_test/113_many_locals2.sy b/testcases/functional_test/113_many_locals2.sy new file mode 100644 index 0000000..34a37d1 --- /dev/null +++ b/testcases/functional_test/113_many_locals2.sy @@ -0,0 +1,85 @@ +//sample:input n number, sort them and print them; + int n; + int main() + { + int a0; + int a1; + int a2; + int a3; + int a4; + int a5; + int a6; + int a7; + int a8; + int a9; + int a10; + int a11; + int a12; + int a13; + int a14; + int a15; + int a16; + int a17; + int a18; + int a19; + int a20; + int a21; + int a22; + int a23; + int a24; + int a25; + int a26; + int a27; + int a28; + int a29; + int b; + b = getint(); + while(b == 5){ + b = b + 1; + } + a0=0; + a1=a0+1; + a2=a1+1; + a3=a2+1; + a4=a3+1; + a5=a4+1; + a6=a5+1; + a7=a6+1; + a8=a7+1; + a9=a8+1; + a10=a9+1; + a11=a10+1; + a12=a11+1; + a13=a12+1; + a14=a13+1; + a15=a14+1; + a16=a15+1; + a17=a16+1; + a18=a17+1; + a19=a18+1; + a20=a19+1; + a21=a20+1; + a22=a21+1; + a23=a22+1; + a24=a23+1; + a25=a24+1; + a26=a25+1; + a27=a26+1; + a28=a27+1; + a29=a28+1; + int t; + putint(a0);putint(a1);putint(a2);putint(a3); + putint(a4);putint(a5);putint(a6);putint(a7); + putint(a8);putint(a9);putint(a10);putint(a11); + putint(a12);putint(a13);putint(a14);putint(a15); + putint(a16);putint(a17);putint(a18);putint(a19); + putint(a20);putint(a21);putint(a22);putint(a23); + putint(a24);putint(a25);putint(a26);putint(a27); + putint(a28);putint(a29); + int newline; + newline = 10; + putch(newline); + putint(b); + putch(newline); + return a25; + } diff --git a/testcases/functional_test/114_register_alloc.sy b/testcases/functional_test/114_register_alloc.sy new file mode 100644 index 0000000..54ca8d8 --- /dev/null +++ b/testcases/functional_test/114_register_alloc.sy @@ -0,0 +1,94 @@ +int a1 = 1; +int a2 = 2; +int a3 = 3; +int a4 = 4; +int a5 = 5; +int a6 = 6; +int a7 = 7; +int a8 = 8; +int a9 = 9; +int a10 = 10; +int a11 = 11; +int a12 = 12; +int a13 = 13; +int a14 = 14; +int a15 = 15; +int a16 = 16; +int a17 = 1; +int a18 = 2; +int a19 = 3; +int a20 = 4; +int a21 = 5; +int a22 = 6; +int a23 = 7; +int a24 = 8; +int a25 = 9; +int a26 = 10; +int a27 = 11; +int a28 = 12; +int a29 = 13; +int a30 = 14; +int a31 = 15; +int a32 = 16; + +int func(int a, int b){ + int i; + i = a + b; + + int c1;int c2;int c3;int c4; + int d1;int d2;int d3;int d4; + int e1;int e2;int e3;int e4; + int f1;int f2;int f3;int f4; + int g1;int g2;int g3;int g4; + int h1;int h2;int h3;int h4; + int i1;int i2;int i3;int i4; + int j1;int j2;int j3;int j4; + int k1;int k2;int k3;int k4; + c1 = getint();c2 = getint();c3 = getint();c4 = getint(); + d1 = 1 + c1 + a1;d2 = 2 + c2 + a2;d3 = 3 + c3 + a3;d4 = 4 + c4 + a4; + e1 = 1 + d1 + a5;e2 = 2 + d2 + a6;e3 = 3 + d3 + a7;e4 = 4 + d4 + a8; + f1 = 1 + e1 + a9;f2 = 2 + e2 + a10;f3 = 3 + e3 + a11;f4 = 4 + e4 + a12; + g1 = 1 + f1 + a13;g2 = 2 + f2 + a14;g3 = 3 + f3 + a15;g4 = 4 + f4 + a16; + h1 = 1 + g1 + a17;h2 = 2 + g2 + a18;h3 = 3 + g3 + a19;h4 = 4 + g4 + a20; + i1 = 1 + h1 + a21;i2 = 2 + h2 + a22;i3 = 3 + h3 + a23;i4 = 4 + h4 + a24; + j1 = 1 + i1 + a25;j2 = 2 + i2 + a26;j3 = 3 + i3 + a27;j4 = 4 + i4 + a28; + k1 = 1 + j1 + a29;k2 = 2 + j2 + a30;k3 = 3 + j3 + a31;k4 = 4 + j4 + a32; + + i = a - b + 10; + k1 = 1 + j1 + a29;k2 = 2 + j2 + a30;k3 = 3 + j3 + a31;k4 = 4 + j4 + a32; + j1 = 1 + i1 + a25;j2 = 2 + i2 + a26;j3 = 3 + i3 + a27;j4 = 4 + i4 + a28; + i1 = 1 + h1 + a21;i2 = 2 + h2 + a22;i3 = 3 + h3 + a23;i4 = 4 + h4 + a24; + h1 = 1 + g1 + a17;h2 = 2 + g2 + a18;h3 = 3 + g3 + a19;h4 = 4 + g4 + a20; + g1 = 1 + f1 + a13;g2 = 2 + f2 + a14;g3 = 3 + f3 + a15;g4 = 4 + f4 + a16; + f1 = 1 + e1 + a9;f2 = 2 + e2 + a10;f3 = 3 + e3 + a11;f4 = 4 + e4 + a12; + e1 = 1 + d1 + a5;e2 = 2 + d2 + a6;e3 = 3 + d3 + a7;e4 = 4 + d4 + a8; + d1 = 1 + c1 + a1;d2 = 2 + c2 + a2;d3 = 3 + c3 + a3;d4 = 4 + c4 + a4; + d1 = 1 + c1 + a1;d2 = 2 + c2 + a2;d3 = 3 + c3 + a3;d4 = 4 + c4 + a4; + return i + c1 + c2 + c3 + c4 + - d1 - d2 - d3 - d4 + + e1 + e2 + e3 + e4 + - f1 - f2 - f3 - f4 + + g1 + g2 + g3 + g4 + - h1 - h2 - h3 - h4 + + i1 + i2 + i3 + i4 + - j1 - j2 - j3 - j4 + + k1 + k2 + k3 + k4 + + a1 - a2 + a3 - a4 + + a5 - a6 + a7 - a8 + + a9 - a10 + a11 - a12 + + a13 - a14 + a15 - a16 + + a17 - a18 + a19 - a20 + + a21 - a22 + a23 - a24 + + a25 - a26 + a27 - a28 + + a29 - a30 + a31 - a32; +} + +int main(){ + int a; + int b; + a = getint(); + b = a + 2 * 9; + a = func(a, b); + putint(a); + return a; +} \ No newline at end of file diff --git a/testcases/functional_test/115_nested_calls.sy b/testcases/functional_test/115_nested_calls.sy new file mode 100644 index 0000000..2d24b77 --- /dev/null +++ b/testcases/functional_test/115_nested_calls.sy @@ -0,0 +1,95 @@ +int func1(int x, int y, int z) { + if (z == 0) { + return x * y; + } + else { + return func1(x, y - z, 0); + } +} + +int func2(int x, int y) { + if (y) { + return func2(x % y, 0); + } + else { + return x; + } +} + +int func3(int x, int y) { + if (y == 0) { + return x + 1; + } + else { + return func3(x + y, 0); + } +} + +int func4(int x, int y, int z) { + if (x) { + return y; + } + else { + return z; + } +} + +int func5(int x) { + return -x; +} + +int func6(int x, int y) { + if (x && y) { + return 1; + } + else { + return 0; + } +} + +int func7(int x) { + if (!x) { + return 1; + } + else { + return 0; + } +} + +int main() { + int i1 = getint(), i2 = getint(), i3 = getint(), i4 = getint(); + int arr[10]; + int i = 0; + while (i < 10) { + arr[i] = getint(); + i = i + 1; + } + int a = func1( + // this + func2( + // is + func1( + // comment + func3(func4(func5(func3(func2(func6(func7(i1), func5(i2)), i3), + // this + i4)), + // is + arr[0], + // function + func1(func2(func3(func4(func5(arr[1]), + // call + func6(arr[2], func7(arr[3])), + func2(arr[4], func7(arr[5]))), + arr[6]), + arr[7]), + func3(arr[8], func7(arr[9])), i1)), + func2(i2, func3(func7(i3), i4))), + arr[0], arr[1]), + arr[2]), + arr[3], + func3(func2(func1(func2(func3(arr[4], func5(arr[5])), func5(arr[6])), + arr[7], func7(arr[8])), + func5(arr[9])), + i1)); + return a; +} diff --git a/testcases/functional_test/116_nested_calls2.sy b/testcases/functional_test/116_nested_calls2.sy new file mode 100644 index 0000000..be12727 --- /dev/null +++ b/testcases/functional_test/116_nested_calls2.sy @@ -0,0 +1,16 @@ +int f(int a, int b) { + return a * b; +} + +int g(int a, int b) { + return a % b; +} + +int h(int a, int b) { + return f(f(2, g(a, b)), g(f(a, b), 4)); +} + +int main () { + putint(h(11, 3)); + return 0; +} \ No newline at end of file diff --git a/testcases/functional_test/117_nested_loops.sy b/testcases/functional_test/117_nested_loops.sy new file mode 100644 index 0000000..f4b5e30 --- /dev/null +++ b/testcases/functional_test/117_nested_loops.sy @@ -0,0 +1,124 @@ +int arr1[10][2][3][4][5][6][2]; +int arr2[10][2][3][2][4][8][7]; + +void loop1(int x, int y) { + int a, b, c, d, e, f, g; + a = 0; + while (a < x && a < y) { + b = 0; + while (b < 2) { + c = 0; + while (c < 3) { + d = 0; + while (d < 4) { + e = 0; + while (e < 5) { + f = 0; + while (f < 6) { + g = 0; + while (g < 2) { + arr1[a][b][c][d][e][f][g] = a + b + c + d + e + f + g + x + y; + g = g + 1; + } + f = f + 1; + } + e = e + 1; + } + d = d + 1; + } + c = c + 1; + } + b = b + 1; + } + a = a + 1; + } +} + +void loop2() { + int a, b, c, d, e, f, g; + a = 0; + while (a < 10) { + b = 0; + while (b < 2) { + c = 0; + while (c < 3) { + d = 0; + while (d < 2) { + e = 0; + while (e < 4) { + f = 0; + while (f < 8) { + g = 0; + while (g < 7) { + arr2[a][b][c][d][e][f][g] = a + b + d + g; + g = g + 1; + } + f = f + 1; + } + e = e + 1; + } + d = d + 1; + } + c = c + 1; + } + b = b + 1; + } + a = a + 1; + } +} + +int loop3(int h, int i, int j, int k, int l, int m, int n) { + int a, b, c, d, e, f, g; + int ans = 0; + a = 0; + while (a < 10) { + b = 0; + while (b < 100) { + c = 0; + while (c < 1000) { + d = 0; + while (d < 10000) { + e = 0; + while (e < 100000) { + f = 0; + while (f < 1000000) { + g = 0; + while (g < 10000000) { + ans = ans % 817 + arr1[a][b][c][d][e][f][g] + arr2[a][b][c][d][e][f][g]; + g = g + 1; + if (g >= n) break; + } + f = f + 1; + if (f >= m) break; + } + e = e + 1; + if (e >= l) break; + } + d = d + 1; + if (d >= k) break; + } + c = c + 1; + if (c >= j) break; + } + b = b + 1; + if (b >= i) break; + } + a = a + 1; + if (a >= h) break; + } + return ans; +} + +int main() { + int x = getint(); + int y = getint(); + int h = getint(); + int i = getint(), j = getint(); + int k = getint(); + int l = getint(); + int m = getint(); + int n = getint(); + loop1(x, y); + loop2(); + return loop3(h, i, j, k, l, m, n); +} diff --git a/testcases/functional_test/11_continue.sy b/testcases/functional_test/11_continue.sy new file mode 100644 index 0000000..d0f9e50 --- /dev/null +++ b/testcases/functional_test/11_continue.sy @@ -0,0 +1,11 @@ +int main(){ + int a=10; + while(a>0){ + if(a>5){ + a=a-1; + continue; + } + return a; + } + return a; +} \ No newline at end of file diff --git a/testcases/functional_test/11_while.sy b/testcases/functional_test/11_while.sy new file mode 100644 index 0000000..374f82d --- /dev/null +++ b/testcases/functional_test/11_while.sy @@ -0,0 +1,11 @@ +int a; +int b; +int main(){ + b=0; + a=3; + while(a>0){ + b = b+a; + a = a-1; + } + return b; +} diff --git a/testcases/functional_test/12_array_traverse.sy b/testcases/functional_test/12_array_traverse.sy new file mode 100644 index 0000000..c46d129 --- /dev/null +++ b/testcases/functional_test/12_array_traverse.sy @@ -0,0 +1,18 @@ +int a[3][4]; + +int main(){ + int i=0; + int cnt=0; + while(i<=3+4-2){ + int j=i; + while(j>=0){ + if(j<4&&i-j<3){ + a[i-j][j]=cnt; + cnt=1; + } + j=j-1; + } + i=i+1; + } + return 0; +} \ No newline at end of file diff --git a/testcases/functional_test/12_getint.sy b/testcases/functional_test/12_getint.sy new file mode 100644 index 0000000..5a7c254 --- /dev/null +++ b/testcases/functional_test/12_getint.sy @@ -0,0 +1,5 @@ +int main(){ + int a; + a = getint(); + return a; +} diff --git a/testcases/functional_test/13_and.sy b/testcases/functional_test/13_and.sy new file mode 100644 index 0000000..8c0a08a --- /dev/null +++ b/testcases/functional_test/13_and.sy @@ -0,0 +1,12 @@ +int a; +int b; +int main(){ + a = getint(); + b = getint(); + if ( a && b ) { + return 1; + } + else { + return 0; + } +} diff --git a/testcases/functional_test/13_array_traverse2.sy b/testcases/functional_test/13_array_traverse2.sy new file mode 100644 index 0000000..fd10b25 --- /dev/null +++ b/testcases/functional_test/13_array_traverse2.sy @@ -0,0 +1,19 @@ +int a[3][3][3]; + +int main(){ + int i,j,k; + i=0;j=0;k=0; + int cnt=0; + while(i<3){ + while(j<3){ + while(k<3){ + a[i][j][k]=cnt; + cnt=cnt+1; + k=k+1; + } + j=j+1; + } + i=i+1; + } + return 0; +} \ No newline at end of file diff --git a/testcases/functional_test/14_or.sy b/testcases/functional_test/14_or.sy new file mode 100644 index 0000000..02ae8af --- /dev/null +++ b/testcases/functional_test/14_or.sy @@ -0,0 +1,12 @@ +int a; +int b; +int main() { + a = getint(); + b = getint(); + if ( a || b ){ + return 1; + } + else{ + return 0; + } +} diff --git a/testcases/functional_test/15_array_test3.sy b/testcases/functional_test/15_array_test3.sy new file mode 100644 index 0000000..c198eb2 --- /dev/null +++ b/testcases/functional_test/15_array_test3.sy @@ -0,0 +1,20 @@ +int a[5][5]={1,2,3,4,5}; + +int func(int a[][5]){ + int i=0; + int j=0; + int sum=0; + while(i<5){ + while(j<5){ + sum=sum+a[i][j]; + j=j+1; + } + i=i+1; + } + return sum; +} + +int main(){ + putint(func(a)); + return 0; +} \ No newline at end of file diff --git a/testcases/functional_test/15_equal.sy b/testcases/functional_test/15_equal.sy new file mode 100644 index 0000000..1453cdb --- /dev/null +++ b/testcases/functional_test/15_equal.sy @@ -0,0 +1,12 @@ +int a; +int b; +int main(){ + a = getint(); + b = getint(); + if ( a == b ){ + return 1; + } + else{ + return 0; + } +} diff --git a/testcases/functional_test/16_greater_eq.sy b/testcases/functional_test/16_greater_eq.sy new file mode 100644 index 0000000..f4b85b5 --- /dev/null +++ b/testcases/functional_test/16_greater_eq.sy @@ -0,0 +1,10 @@ +int a=5; +int s[10]={9,8,7,6,5,4,3,2,1}; + +int main(){ + int i=0; + while(s[i]>=a){ + i=i+1; + } + return i; +} \ No newline at end of file diff --git a/testcases/functional_test/16_nequal.sy b/testcases/functional_test/16_nequal.sy new file mode 100644 index 0000000..506aefd --- /dev/null +++ b/testcases/functional_test/16_nequal.sy @@ -0,0 +1,12 @@ +int a; +int b; +int main(){ + a = getint(); + b = getint(); + if ( a != b ){ + return 1; + } + else{ + return 0; + } +} diff --git a/testcases/functional_test/17_less.sy b/testcases/functional_test/17_less.sy new file mode 100644 index 0000000..1bb71e3 --- /dev/null +++ b/testcases/functional_test/17_less.sy @@ -0,0 +1,12 @@ +int a; +int b; +int main(){ + a = getint(); + b = getint(); + if ( a < b ){ + return 1; + } + else{ + return 0; + } +} diff --git a/testcases/functional_test/17_less_eq.sy b/testcases/functional_test/17_less_eq.sy new file mode 100644 index 0000000..c4f8816 --- /dev/null +++ b/testcases/functional_test/17_less_eq.sy @@ -0,0 +1,10 @@ +int a=5; +int s[10]={0,1,2,3,4,5,6,7,8,9}; + +int main(){ + int i=0; + while(s[i]<=a){ + i=i+1; + } + return i; +} \ No newline at end of file diff --git a/testcases/functional_test/18_cal_prio.sy b/testcases/functional_test/18_cal_prio.sy new file mode 100644 index 0000000..7c68759 --- /dev/null +++ b/testcases/functional_test/18_cal_prio.sy @@ -0,0 +1,11 @@ +int a; +int b; +int c; +int main(){ + a = getint(); + b = getint(); + c = getint(); + int d; + d = a+b*c; + return d; +} diff --git a/testcases/functional_test/19_neg_expr.sy b/testcases/functional_test/19_neg_expr.sy new file mode 100644 index 0000000..10f53f6 --- /dev/null +++ b/testcases/functional_test/19_neg_expr.sy @@ -0,0 +1,10 @@ +int a; +int b; +int main(){ + a = getint(); + b = getint(); + int c; + c = -(a + b); + putint(c); + return 0; +} diff --git a/testcases/functional_test/20_arr_sum.sy b/testcases/functional_test/20_arr_sum.sy new file mode 100644 index 0000000..50291c3 --- /dev/null +++ b/testcases/functional_test/20_arr_sum.sy @@ -0,0 +1,17 @@ +int a[5]; +int main(){ + a[0] = getint(); + a[1] = getint(); + a[2] = getint(); + a[3] = getint(); + a[4] = getint(); + int cnt; + cnt = 4; + int sum; + sum = 0; + while( cnt > 1 ){ + sum = sum + a[cnt]; + cnt = cnt - 1; + } + return sum; +} diff --git a/testcases/functional_test/21_suminput.sy b/testcases/functional_test/21_suminput.sy new file mode 100644 index 0000000..15bfb97 --- /dev/null +++ b/testcases/functional_test/21_suminput.sy @@ -0,0 +1,23 @@ +//sample:input n numbers,then print the sum of them; +int n; +int a[10]; +int main() +{ + n = getint(); + if (n > 10) + return 1; + int s; + int i; + i = 0; + s = i; + while (i < n) { + a[i] = getint(); + s = s + a[i]; + i=i+1; + } + putint(s); + int newline; + newline = 10; + putch(newline); + return s; +} diff --git a/testcases/functional_test/22_if_test1.sy b/testcases/functional_test/22_if_test1.sy new file mode 100644 index 0000000..1811e94 --- /dev/null +++ b/testcases/functional_test/22_if_test1.sy @@ -0,0 +1,16 @@ +// test if-else +int ifElse() { + int a; + a = 5; + if (a == 5) { + a = 25; + } else { + a = a * 2; + } + return (a); +} + + +int main() { + return (ifElse()); +} diff --git a/testcases/functional_test/23_if_test2.sy b/testcases/functional_test/23_if_test2.sy new file mode 100644 index 0000000..b047227 --- /dev/null +++ b/testcases/functional_test/23_if_test2.sy @@ -0,0 +1,21 @@ +// test if-else else-if +int ifElseElseIf() { + int a; + a = 66; + int b; + b = 8923; + if (a == 5) { + b = 25; + } + else if (a == 10) { + b = 42; + } + else { + b = a * 2; + } + return (b); +} + +int main() { + return (ifElseElseIf()); +} diff --git a/testcases/functional_test/24_if_test3.sy b/testcases/functional_test/24_if_test3.sy new file mode 100644 index 0000000..7f48df1 --- /dev/null +++ b/testcases/functional_test/24_if_test3.sy @@ -0,0 +1,18 @@ +// test if-if-else +int ififElse() { + int a; + a = 5; + int b; + b = 10; + if(a == 5) + if (b == 10) + a = 25; + else + a = a + 15; + + return (a); +} + +int main(){ + return (ififElse()); +} diff --git a/testcases/functional_test/25_if_test4.sy b/testcases/functional_test/25_if_test4.sy new file mode 100644 index 0000000..fb01502 --- /dev/null +++ b/testcases/functional_test/25_if_test4.sy @@ -0,0 +1,18 @@ +// test if-{if-else} +int if_ifElse_() { + int a; + a = 5; + int b; + b = 10; + if(a == 5){ + if (b == 10) + a = 25; + else + a = a + 15; + } + return (a); +} + +int main(){ + return (if_ifElse_()); +} diff --git a/testcases/functional_test/26_if_test5.sy b/testcases/functional_test/26_if_test5.sy new file mode 100644 index 0000000..39cf890 --- /dev/null +++ b/testcases/functional_test/26_if_test5.sy @@ -0,0 +1,18 @@ +// test if-{if}-else +int if_if_Else() { + int a; + a = 5; + int b; + b = 10; + if(a == 5){ + if (b == 10) + a = 25; + } + else + a = a + 15; + return (a); +} + +int main(){ + return (if_if_Else()); +} diff --git a/testcases/functional_test/27_while_test1.sy b/testcases/functional_test/27_while_test1.sy new file mode 100644 index 0000000..d184d5b --- /dev/null +++ b/testcases/functional_test/27_while_test1.sy @@ -0,0 +1,18 @@ +int doubleWhile() { + int i; + i = 5; + int j; + j = 7; + while (i < 100) { + i = i + 30; + while(j < 100){ + j = j + 6; + } + j = j - 100; + } + return (j); +} + +int main() { + return doubleWhile(); +} diff --git a/testcases/functional_test/28_while_test2.sy b/testcases/functional_test/28_while_test2.sy new file mode 100644 index 0000000..d1fad82 --- /dev/null +++ b/testcases/functional_test/28_while_test2.sy @@ -0,0 +1,31 @@ +int FourWhile() { + int a; + a = 5; + int b; + int c; + b = 6; + c = 7; + int d; + d = 10; + while (a < 20) { + a = a + 3; + while(b < 10){ + b = b + 1; + while(c == 7){ + c = c - 1; + while(d < 20){ + d = d + 3; + } + d = d - 1; + } + c = c + 1; + } + b = b - 2; + } + + return (a + (b + d) + c); +} + +int main() { + return FourWhile(); +} diff --git a/testcases/functional_test/29_while_test3.sy b/testcases/functional_test/29_while_test3.sy new file mode 100644 index 0000000..47ffb5f --- /dev/null +++ b/testcases/functional_test/29_while_test3.sy @@ -0,0 +1,55 @@ +int g; +int h; +int f; +int e; +int EightWhile() { + int a; + a = 5; + int b; + int c; + b = 6; + c = 7; + int d; + d = 10; + while (a < 20) { + a = a + 3; + while(b < 10){ + b = b + 1; + while(c == 7){ + c = c - 1; + while(d < 20){ + d = d + 3; + while(e > 1){ + e = e-1; + while(f > 2){ + f = f -2; + while(g < 3){ + g = g +10; + while(h < 10){ + h = h + 8; + } + h = h-1; + } + g = g- 8; + } + f = f + 1; + } + e = e + 1; + } + d = d - 1; + } + c = c + 1; + } + b = b - 2; + } + + return (a + (b + d) + c)-(e + d - g + h); +} + +int main() { + g = 1; + h = 2; + e = 4; + f = 6; + return EightWhile(); +} diff --git a/testcases/functional_test/30_while_if_test1.sy b/testcases/functional_test/30_while_if_test1.sy new file mode 100644 index 0000000..2d2b9fb --- /dev/null +++ b/testcases/functional_test/30_while_if_test1.sy @@ -0,0 +1,25 @@ +// test while-if +int whileIf() { + int a; + a = 0; + int b; + b = 0; + while (a < 100) { + if (a == 5) { + b = 25; + } + else if (a == 10) { + b = 42; + } + else { + b = a * 2; + } + a = a + 1; + } + return (b); +} + + +int main(){ + return (whileIf()); +} diff --git a/testcases/functional_test/31_while_if_test2.sy b/testcases/functional_test/31_while_if_test2.sy new file mode 100644 index 0000000..34c92da --- /dev/null +++ b/testcases/functional_test/31_while_if_test2.sy @@ -0,0 +1,23 @@ +int ifWhile() { + int a; + a = 0; + int b; + b = 3; + if (a == 5) { + while(b == 2){ + b = b + 2; + } + b = b + 25; + } + else + while (a < 5) { + b = b * 2; + a = a + 1; + } + return (b); +} + + +int main(){ + return (ifWhile()); +} diff --git a/testcases/functional_test/32_while_if_test3.sy b/testcases/functional_test/32_while_if_test3.sy new file mode 100644 index 0000000..ef16dfa --- /dev/null +++ b/testcases/functional_test/32_while_if_test3.sy @@ -0,0 +1,25 @@ +int deepWhileBr(int a, int b) { + int c; + c = a + b; + while (c < 75) { + int d; + d = 42; + if (c < 100) { + c = c + d; + if (c > 99) { + int e; + e = d * 2; + if (1 == 1) { + c = e * 2; + } + } + } + } + return (c); +} + +int main() { + int p; + p = 2; + return deepWhileBr(p, p); +} diff --git a/testcases/functional_test/33_func_test1.sy b/testcases/functional_test/33_func_test1.sy new file mode 100644 index 0000000..67645a3 --- /dev/null +++ b/testcases/functional_test/33_func_test1.sy @@ -0,0 +1,23 @@ +int a; + +int myFunc(int a, int b, int c) { + a = 2; + { + int c; + c = 0; + if (c != 0) { + return 0; + } + } + while (b > 0) { + b = b - 1; + } + return (a)+(b); +} + +int main() { + a = (3); + int b; + b = myFunc(1, 2, 1); + return ((a+b)); +} \ No newline at end of file diff --git a/testcases/functional_test/34_func_test2.sy b/testcases/functional_test/34_func_test2.sy new file mode 100644 index 0000000..a47aa55 --- /dev/null +++ b/testcases/functional_test/34_func_test2.sy @@ -0,0 +1,44 @@ +int func1() { + int a; + a = 1; + return a; +} + +int func2() { + int a; + a = 2; + return a; +} + +int func3() { + int a; + a = 4; + return a; +} + +int func4() { + int a; + { + int b; + b = 8; + a = b; + } + { + int b; + b = 16; + a = a + b; + } + return a; +} + +int main() { + int a; + int b; + int c; + a = 32; + b = 32; + c = 32; + + return func1() + func2() + func3() + func4() + + a + b + c; +} \ No newline at end of file diff --git a/testcases/functional_test/35_array_test.sy b/testcases/functional_test/35_array_test.sy new file mode 100644 index 0000000..f3da7e7 --- /dev/null +++ b/testcases/functional_test/35_array_test.sy @@ -0,0 +1,23 @@ +// array as parameter of a function +int field[2]; + +int func(int array[]) { + return array[3 - field[0]]; +} + +int main() { + int i[1]; + int j[3]; + int k; + + field[0] = 1; + field[1] = 2; + + + j[0 + 0] = -1; + j[1] = j[0] - 2; + k = j[1]; + j[2] = 16; + + return func(j) + 2 + k; +} \ No newline at end of file diff --git a/testcases/functional_test/36_domain_test.sy b/testcases/functional_test/36_domain_test.sy new file mode 100644 index 0000000..742a76c --- /dev/null +++ b/testcases/functional_test/36_domain_test.sy @@ -0,0 +1,17 @@ +// duplicate names with global array variables and local int variable +int a[2]; + +int func(int array[]) { + a[0] = 1; + return array[3 - a[0]]; +} + +int main() { + int a; + int array[3]; + array[0] = (-1); + array[1] = 4; + array[2] = 8; + a = func(array); + return (a + array[1]); +} \ No newline at end of file diff --git a/testcases/functional_test/38_if_complex_expr.sy b/testcases/functional_test/38_if_complex_expr.sy new file mode 100644 index 0000000..32c897c --- /dev/null +++ b/testcases/functional_test/38_if_complex_expr.sy @@ -0,0 +1,21 @@ +// Use complex expression in if structure +int main () { + int a; + int b; + int c; + int d; + int result; + a = 5; + b = 5; + c = 1; + d = -2; + result = 2; + if ((d * 1 / 2) < 0 || (a - b) != 0 && (c + 3) % 2 != 0) { + putint(result); + } + if ((d % 2 + 67) < 0 || (a - b) != 0 && (c + 2) % 2 != 0) { + result = 4; + putint(result); + } + return 0; +} diff --git a/testcases/functional_test/39_assign_complex_expr.sy b/testcases/functional_test/39_assign_complex_expr.sy new file mode 100644 index 0000000..c6471a7 --- /dev/null +++ b/testcases/functional_test/39_assign_complex_expr.sy @@ -0,0 +1,18 @@ +// Use complex expression in assign structure +int main () { + int a; + int b; + int c; + int d; + int result; + a = 5; + b = 5; + c = 1; + d = -2; + result = (d * 1 / 2) + (a - b) - -(c + 3) % 2; + putint(result); + result = ((d % 2 + 67) + -(a - b) - -((c + 2) % 2)); + result = result + 3; + putint(result); + return 0; +} diff --git a/testcases/functional_test/40_index_complex_expr.sy b/testcases/functional_test/40_index_complex_expr.sy new file mode 100644 index 0000000..3547bca --- /dev/null +++ b/testcases/functional_test/40_index_complex_expr.sy @@ -0,0 +1,23 @@ +// Use complex expression in assign structure +int main () { + int a; + int b; + int c; + int d; + int result[5]; + a = 5; + b = 5; + c = 1; + d = -2; + result[0] = 1; + result[1] = 2; + result[2] = 3; + result[3] = 4; + result[4] = 5; + int t; + t = result[((d * 1 / 2) + 4 + (a - b) - -(c + 3) % 2) % 5]; + putint(t); + t = result[(((c % 2 + 67) + a - b) - -((c + 2) % 2)) % 5]; + putint(t); + return 0; +} diff --git a/testcases/functional_test/41_index_arithmetic_expr.sy b/testcases/functional_test/41_index_arithmetic_expr.sy new file mode 100644 index 0000000..3ec6dbc --- /dev/null +++ b/testcases/functional_test/41_index_arithmetic_expr.sy @@ -0,0 +1,15 @@ +// Use arithmetic expression as array's index +int main() { + int a; + int b; + int result[3]; + a = 56; + b = 12; + result[0] = 1; + result[1] = 2; + result[2] = 3; + int t; + t = result[(a % b + b) / 5 - 2]; + putint(t); + return 0; +} diff --git a/testcases/functional_test/42_index_func_ret.sy b/testcases/functional_test/42_index_func_ret.sy new file mode 100644 index 0000000..136d6eb --- /dev/null +++ b/testcases/functional_test/42_index_func_ret.sy @@ -0,0 +1,24 @@ +// Use return value of a function as array's index +int _getMaxOfAll(int result[], int size) { + int maxNum; + maxNum = -999999; + size = size - 1; + while(size > -1) { + if (result[size] > maxNum) { + maxNum = result[size]; + } + size = size - 1; + } + return maxNum; +} + +int main() { + int result[3]; + result[0] = -2; + result[1] = 2; + result[2] = -7; + int x; + x = result[_getMaxOfAll(result, 3)]; + putint(x); + return 0; +} diff --git a/testcases/functional_test/43_time_prior_plus.sy b/testcases/functional_test/43_time_prior_plus.sy new file mode 100644 index 0000000..879eea7 --- /dev/null +++ b/testcases/functional_test/43_time_prior_plus.sy @@ -0,0 +1,14 @@ +// Check the priority between time and plus +int main() { + int a; + a = 20; + int b; + b = 5; + int c; + c = 6; + int d; + d = -4; + a = a + c * d - b % (a + d) / a; + putint(a); + return 0; +} diff --git a/testcases/functional_test/44_add_prior_equal.sy b/testcases/functional_test/44_add_prior_equal.sy new file mode 100644 index 0000000..5996ada --- /dev/null +++ b/testcases/functional_test/44_add_prior_equal.sy @@ -0,0 +1,19 @@ +// Add is prior than equal and not equal +int main () { + int a; + int b; + int c; + a = 1; + b = 4; + c = 28; + int t; + if (c + a != b) { + t = c % -b; + putint(t); + } + if (b - c == a) { + t = c%b+b; + putint(t); + } + return 0; +} diff --git a/testcases/functional_test/45_equal_prior_logic.sy b/testcases/functional_test/45_equal_prior_logic.sy new file mode 100644 index 0000000..d3768f7 --- /dev/null +++ b/testcases/functional_test/45_equal_prior_logic.sy @@ -0,0 +1,21 @@ +// Equal is prior to logic operator +int main () { + int a; + int b; + int c; + int d; + a = 10; + b = 6; + c = 4; + d = 5; + int t; + if (b + c == a && d != a / 2) { + t = b + c / d * 2; + putint(t); + } + if (c < 0 || a - c == b && a != d * 2) { + t = 1; + putint(t); + } + return 0; +} diff --git a/testcases/functional_test/46_and_prior_or.sy b/testcases/functional_test/46_and_prior_or.sy new file mode 100644 index 0000000..b478ec2 --- /dev/null +++ b/testcases/functional_test/46_and_prior_or.sy @@ -0,0 +1,17 @@ +// And is prior to or +int main () { + int a; + int b; + int c; + int d; + a = 3; + b = 8; + c = -4; + d = 15; + int t; + if (d % (b - a) != 0 && a > 0 || d % 3 == 0 && c > 0) { + t = d + c - -b; + putint(t); + } + return 0; +} diff --git a/testcases/functional_test/47_minus_with_sub.sy b/testcases/functional_test/47_minus_with_sub.sy new file mode 100644 index 0000000..27940ce --- /dev/null +++ b/testcases/functional_test/47_minus_with_sub.sy @@ -0,0 +1,10 @@ +// Use minus with sub in one expr +int main () { + int a; + int b; + a = -2; + b = 1; + a = a - -b + -(a + b) % -(a - b); + putint(a); + return 0; +} diff --git a/testcases/functional_test/49_decl_in_defn.sy b/testcases/functional_test/49_decl_in_defn.sy new file mode 100644 index 0000000..663bec0 --- /dev/null +++ b/testcases/functional_test/49_decl_in_defn.sy @@ -0,0 +1,7 @@ +int main () { + int a; + a = 12; + int t; + putint(a); + return 0; +} diff --git a/testcases/functional_test/50_recursion_test1.sy b/testcases/functional_test/50_recursion_test1.sy new file mode 100644 index 0000000..e5fae44 --- /dev/null +++ b/testcases/functional_test/50_recursion_test1.sy @@ -0,0 +1,14 @@ +int fact(int n) { + if (n == 0) { + return 1; + } + int nn; + nn = n-1; + return (n * fact(nn)); +} + +int main() { + int n; + n = 4; + return fact(n); +} diff --git a/testcases/functional_test/51_recursion_test2.sy b/testcases/functional_test/51_recursion_test2.sy new file mode 100644 index 0000000..077d97d --- /dev/null +++ b/testcases/functional_test/51_recursion_test2.sy @@ -0,0 +1,17 @@ +int fib(int n) { + if (n == 0) + return 0; + if (n == 1) + return 1; + int p; + p = n - 1; + int q; + q = n - 2; + return fib(p) + fib(q); +} + +int main() { + int tmp; + tmp = 10; + return fib(tmp); +} \ No newline at end of file diff --git a/testcases/functional_test/52_recursion_test3.sy b/testcases/functional_test/52_recursion_test3.sy new file mode 100644 index 0000000..8d3742f --- /dev/null +++ b/testcases/functional_test/52_recursion_test3.sy @@ -0,0 +1,18 @@ +// factorial number +int a; +int r; +int fac(int x) +{ + if (x <2) + return 1; + a = x - 1; + r = fac(a); + r = x * r; + return r; +} + +int main(){ + int a; + a = 5; + return fac(a); +} \ No newline at end of file diff --git a/testcases/functional_test/53_sort_test1.sy b/testcases/functional_test/53_sort_test1.sy new file mode 100644 index 0000000..8491e90 --- /dev/null +++ b/testcases/functional_test/53_sort_test1.sy @@ -0,0 +1,41 @@ +int n; +int bubblesort(int arr[]) +{ + int i; + int j; + i =0; + while(i < n-1){ + // Last i elements are already in place + j = 0; + while(j < n-i-1){ + if (arr[j] > arr[j+1]) { + // swap(&arr[j], &arr[j+1]); + int tmp; + tmp = arr[j+1]; + arr[j+1] = arr[j]; + arr[j] = tmp; + } + j = j + 1; + } + i = i + 1; + } + return 0; +} + +int main(){ + n = 10; + int a[10]; + a[0]=4;a[1]=3;a[2]=9;a[3]=2;a[4]=0; + a[5]=1;a[6]=6;a[7]=5;a[8]=7;a[9]=8; + int i; + i = bubblesort(a); + while (i < n) { + int tmp; + tmp = a[i]; + putint(tmp); + tmp = 10; + putch(tmp); + i = i + 1; + } + return 0; +} diff --git a/testcases/functional_test/54_sort_test2.sy b/testcases/functional_test/54_sort_test2.sy new file mode 100644 index 0000000..8ec1764 --- /dev/null +++ b/testcases/functional_test/54_sort_test2.sy @@ -0,0 +1,39 @@ +int n; +int insertsort(int a[]) +{ + int i; + i = 1; + while(i-1&&temp k - 1) + { + j = j - 1; + } + + if(i < j) + { + arr[i] = arr[j]; + i = i + 1; + } + + while(i < j && arr[i] < k) + { + i = i + 1; + } + + if(i < j) + { + arr[j] = arr[i]; + j = j - 1; + } + } + + arr[i] = k; + int tmp; + tmp = i - 1; + tmp = QuickSort(arr, low, tmp); + tmp = i + 1; + tmp = QuickSort(arr, tmp, high); + } + return 0; +} + +int main(){ + n = 10; + int a[10]; + a[0]=4;a[1]=3;a[2]=9;a[3]=2;a[4]=0; + a[5]=1;a[6]=6;a[7]=5;a[8]=7;a[9]=8; + int i; + i = 0; + int tmp; + tmp = 9; + i = QuickSort(a, i, tmp); + while (i < n) { + int tmp; + tmp = a[i]; + putint(tmp); + tmp = 10; + putch(tmp); + i = i + 1; + } + return 0; +} diff --git a/testcases/functional_test/56_sort_test4.sy b/testcases/functional_test/56_sort_test4.sy new file mode 100644 index 0000000..9280cd1 --- /dev/null +++ b/testcases/functional_test/56_sort_test4.sy @@ -0,0 +1,49 @@ +int n; +int select_sort(int A[],int n) +{ + int i; + int j; + int min; + i =0; + while(i < n-1) + { + min=i;// + j = i + 1; + while(j < n) + { + if(A[min]>A[j]) + { + min=j; + } + j=j+1; + } + if(min!=i) + { + int tmp; + tmp = A[min]; + A[min] = A[i]; + A[i] = tmp; + } + i = i + 1; + } + return 0; +} + +int main(){ + n = 10; + int a[10]; + a[0]=4;a[1]=3;a[2]=9;a[3]=2;a[4]=0; + a[5]=1;a[6]=6;a[7]=5;a[8]=7;a[9]=8; + int i; + i = 0; + i = select_sort(a, n); + while (i < n) { + int tmp; + tmp = a[i]; + putint(tmp); + tmp = 10; + putch(tmp); + i = i + 1; + } + return 0; +} diff --git a/testcases/functional_test/57_sort_test5.sy b/testcases/functional_test/57_sort_test5.sy new file mode 100644 index 0000000..6c634e5 --- /dev/null +++ b/testcases/functional_test/57_sort_test5.sy @@ -0,0 +1,65 @@ +int n; +int swap (int array[], int i, int j){ + int temp; + temp = array[i]; + array[i] = array[j]; + array[j] = temp; + return 0; +} +int heap_ajust(int arr[], int start, int end) { + int dad; + dad = start; + int son; + son = dad * 2 + 1; + while (son < end + 1) { // + if (son < end && arr[son] < arr[son + 1]) + son = son + 1; + if (arr[dad] > arr[son]) + return 0; + else { + dad = swap(arr,dad,son); + dad = son; + son = dad * 2 + 1; + } + } + return 0; +} +int heap_sort(int arr[], int len) { + int i; + int tmp; + i = len / 2 - 1; + while ( i > -1) { + tmp = len - 1; + tmp = heap_ajust(arr, i, tmp); + i = i - 1; + } + i = len - 1; + while ( i > 0) { + int tmp0; + tmp0 = 0; + tmp = swap(arr,tmp0,i); + tmp = i - 1; + tmp = heap_ajust(arr, tmp0, tmp); + i = i-1; + } + return 0; +} + +int main(){ + n = 10; + int a[10]; + a[0]=4;a[1]=3;a[2]=9;a[3]=2;a[4]=0; + a[5]=1;a[6]=6;a[7]=5;a[8]=7;a[9]=8; + int i; + i = 0; + i = heap_sort(a, n); + while (i < n) { + int tmp; + tmp = a[i]; + putint(tmp); + tmp = 10; + putch(tmp); + i = i + 1; + } + return 0; +} diff --git a/testcases/functional_test/58_sort_test6.sy b/testcases/functional_test/58_sort_test6.sy new file mode 100644 index 0000000..24093c7 --- /dev/null +++ b/testcases/functional_test/58_sort_test6.sy @@ -0,0 +1,53 @@ +int n; + +int counting_sort(int ini_arr[], int sorted_arr[], int n) { + int count_arr[10]; + int i; + int j; + int k; + k = 0; + i = 0; + j = 0; + while(k < 10){ + count_arr[k] = 0; + k = k + 1; + } + while(i < n) + { + count_arr[ini_arr[i]] = count_arr[ini_arr[i]] + 1; + i = i + 1; + } + k = 1; + while(k < 10){ + count_arr[k] = count_arr[k] + count_arr[k - 1]; + k = k + 1; + } + j = n; + while( j > 0){ + count_arr[ini_arr[j - 1]] = count_arr[ini_arr[j - 1]] - 1; + sorted_arr[count_arr[ini_arr[j - 1]]] = ini_arr[j - 1]; + j = j - 1; + } + return 0; +} + + +int main(){ + n = 10; + int a[10]; + a[0]=4;a[1]=3;a[2]=9;a[3]=2;a[4]=0; + a[5]=1;a[6]=6;a[7]=5;a[8]=7;a[9]=8; + int i; + i = 0; + int b[10]; + i = counting_sort(a, b, n); + while (i < n) { + int tmp; + tmp = b[i]; + putint(tmp); + tmp = 10; + putch(tmp); + i = i + 1; + } + return 0; +} diff --git a/testcases/functional_test/59_sort_test7.sy b/testcases/functional_test/59_sort_test7.sy new file mode 100644 index 0000000..b4bbd08 --- /dev/null +++ b/testcases/functional_test/59_sort_test7.sy @@ -0,0 +1,87 @@ +int n; +int Merge(int array[], int low, int middle, int high) +{ + int n1; + n1 = middle - low + 1; + int n2; + n2 = high - middle; + int L[10]; + int R[10]; + int i; + i = 0; + int j; + j = 0; + + while(i < n1){ + L[i] = array[i + low]; + i = i + 1; + } + while(j < n2){ + R[j] = array[j + middle +1]; + j = j + 1; + } + i = 0; + j = 0; + int k; + k = low; + while(i!=n1 && j!= n2) + { + if(L[i] < R[j] + 1){ + array[k] = L[i]; + k = k + 1; + i = i + 1; + } + else{ + array[k] = R[j]; + k = k + 1; + j = j + 1; + } + } + while(i < n1){ + array[k] = L[i]; + k = k + 1; + i = i + 1; + + } + while(j < n2){ + array[k] = R[j]; + k = k + 1; + j = j + 1; + } + return 0; +} + +int MergeSort(int array[], int p, int q) +{ + if(p < q) + { + int mid; + mid = (p+q)/2; + int tmp; + tmp = MergeSort(array, p, mid); + tmp = mid + 1; + tmp = MergeSort(array, tmp, q); + tmp = Merge(array,p, mid, q); + } + return 0; +} + +int main(){ + n = 10; + int a[10]; + a[0]=4;a[1]=3;a[2]=9;a[3]=2;a[4]=0; + a[5]=1;a[6]=6;a[7]=5;a[8]=7;a[9]=8; + int i; + i = 0; + int tmp; + tmp = n - 1; + i = MergeSort(a, i, tmp); + while (i < n) { + tmp = a[i]; + putint(tmp); + tmp = 10; + putch(tmp); + i = i + 1; + } + return 0; +} diff --git a/testcases/functional_test/60_while_fibonacci.sy b/testcases/functional_test/60_while_fibonacci.sy new file mode 100644 index 0000000..c1bf680 --- /dev/null +++ b/testcases/functional_test/60_while_fibonacci.sy @@ -0,0 +1,27 @@ +int n; +int fib(int p){ + int a; + int b; + int c; + a = 0; + b = 1; + if ( p == 0 ){ + return 0; + } + if ( p == 1 ){ + return 1; + } + while ( p > 1 ){ + c = a + b; + a = b; + b = c; + p = p - 1; + } + return c; +} +int main(){ + n = getint(); + int res; + res = fib( n ); + return res; +} diff --git a/testcases/functional_test/61_rec_fibonacci.sy b/testcases/functional_test/61_rec_fibonacci.sy new file mode 100644 index 0000000..f8e2199 --- /dev/null +++ b/testcases/functional_test/61_rec_fibonacci.sy @@ -0,0 +1,27 @@ +int n; +int f(int x) +{ + if(x==1) + return 1; + if(x==2) + return 1; + int a; + int b; + a=x-1; + b=x-2; + int c; + c = f(a)+f(b); + return c; +} +int main() +{ + n=getint(); + int t; + int xx; + t=f(n); + putint(t); + int newline; + newline = 10; + putch(newline); + return t; +} diff --git a/testcases/functional_test/62_long_code.sy b/testcases/functional_test/62_long_code.sy new file mode 100644 index 0000000..9eb211e --- /dev/null +++ b/testcases/functional_test/62_long_code.sy @@ -0,0 +1,303 @@ +// Really long code; +int n; + +int bubblesort(int arr[]) { + int i; + int j; + i =0; + while(i < n-1){ + // Last i elements are already in place + j = 0; + while(j < n-i-1){ + if (arr[j] > arr[j+1]) { + // swap(&arr[j], &arr[j+1]); + int tmp; + tmp = arr[j+1]; + arr[j+1] = arr[j]; + arr[j] = tmp; + } + j = j + 1; + } + i = i + 1; + } + return 0; +} + +int insertsort(int a[]) { + int i; + i = 1; + while(i-1&&temp k - 1) + { + j = j - 1; + } + + if(i < j) + { + arr[i] = arr[j]; + i = i + 1; + } + + while(i < j && arr[i] < k) + { + i = i + 1; + } + + if(i < j) + { + arr[j] = arr[i]; + j = j - 1; + } + } + + arr[i] = k; + int tmp; + tmp = i - 1; + tmp = QuickSort(arr, low, tmp); + tmp = i + 1; + tmp = QuickSort(arr, tmp, high); + } + return 0; +} + + +int getMid(int arr[]) { + int mid; + if (n % 2 == 0) { + mid = n / 2; + return (arr[mid] + arr[mid - 1]) / 2; + } else { + mid = n / 2; + return arr[mid]; + } +} + +int getMost(int arr[]) { + int count[1000]; + int i; + i = 0; + while (i < 1000) { + count[i] = 0; + i = i + 1; + } + i = 0; + int max; + int number; + max = 0; + while (i < n) { + int num; + num = arr[i]; + count[num] = count[num] + 1; + if (count[num] > max) { + max = count[num]; + number = num; + } + i = i + 1; + } + return number; +} + +int revert(int arr[]) { + int temp; + int i; + int j; + i = 0; + j = 0; + while (i < j) { + temp = arr[i]; + arr[i] = arr[j]; + arr[j] = temp; + i = i + 1; + j = j - 1; + } + return 0; +} + +int arrCopy(int src[], int target[]) { + int i; + i = 0; + while (i < n) { + target[i] = src[i]; + i = i + 1; + } + return 0; +} + +int calSum(int arr[], int stride) { + int sum; + sum = 0; + int i; + i = 0; + while (i < n) { + sum = sum + arr[i]; + if (i % stride != stride - 1) { + arr[i] = 0; + } else { + arr[i] = sum; + sum = 0; + } + i = i + 1; + } + return 0; +} + +int avgPooling(int arr[], int stride) { + int sum; + int i; + i = 0; + sum = 0; + int lastnum; + while (i < n) { + if (i < stride - 1) { + sum = sum + arr[i]; + } else if (i == stride - 1) { + lastnum = arr[0]; + arr[0] = sum / stride; + } else { + sum = sum + arr[i] - lastnum; + lastnum = arr[i - stride + 1]; + arr[i - stride + 1] = sum / stride; + } + i = i + 1; + } + i = n - stride + 1; + while (i < n) { + arr[i] = 0; + i = i + 1; + } + return 0; +} + +int main() { + n = 32; + int arr[32]; + int result[32]; + arr[0] = 7; + arr[1] = 23; + arr[2] = 89; + arr[3] = 26; + arr[4] = 282; + arr[5] = 254; + arr[6] = 27; + arr[7] = 5; + arr[8] = 83; + arr[9] = 273; + arr[10] = 574; + arr[11] = 905; + arr[12] = 354; + arr[13] = 657; + arr[14] = 935; + arr[15] = 264; + arr[16] = 639; + arr[17] = 459; + arr[18] = 29; + arr[19] = 68; + arr[20] = 929; + arr[21] = 756; + arr[22] = 452; + arr[23] = 279; + arr[24] = 58; + arr[25] = 87; + arr[26] = 96; + arr[27] = 36; + arr[28] = 39; + arr[29] = 28; + arr[30] = 1; + arr[31] = 290; + int t; + t = arrCopy(arr, result); + t = revert(result); + int i; + i = 0; + while (i < 32) { + t = result[i]; + putint(t); + i = i + 1; + } + t = bubblesort(result); + i = 0; + while (i < 32) { + t = result[i]; + putint(t); + i = i + 1; + } + t = getMid(result); + putint(t); + t = getMost(result); + putint(t); + + t = arrCopy(arr, result); + t = bubblesort(result); + i = 0; + while (i < 32) { + t = result[i]; + putint(t); + i = i + 1; + } + + t = arrCopy(arr, result); + t = insertsort(result); + i = 0; + while (i < 32) { + t = result[i]; + putint(t); + i = i + 1; + } + + t = arrCopy(arr, result); + i = 0; + t = 31; + t = QuickSort(result, i, t); + while (i < 32) { + t = result[i]; + putint(t); + i = i + 1; + } + + t = arrCopy(arr, result); + t = calSum(result, 4); + i = 0; + while (i < 32) { + t = result[i]; + putint(t); + i = i + 1; + } + + t = arrCopy(arr, result); + t = avgPooling(result, 3); + i = 0; + while (i < 32) { + t = result[i]; + putint(t); + i = i + 1; + } + return 0; +} diff --git a/testcases/functional_test/63_simple_atoi.sy b/testcases/functional_test/63_simple_atoi.sy new file mode 100644 index 0000000..d9a344a --- /dev/null +++ b/testcases/functional_test/63_simple_atoi.sy @@ -0,0 +1,47 @@ +// Simple atoi program +int atoi_(int src[]) { + int s; + s = 0; + int isMinus; + isMinus = 1; + int i; + i = 0; + while(src[i] == 32) { // 跳过空白符 + i = i + 1; + } + + if(src[i] == 43 || src[i] == 45) { + if(src[i] == 45) { + isMinus = -1; + } + i = i + 1; + } else if (src[i] < 48 || src[i] > 57) { + //如果第一位既不是符号也不是数字,直接返回异常值 + s = 2147483647; + return s; + } + + while (src[i] != 0 && src[i] > 47 && src[i] < 58) { + s = s * 10 + src[i] - 48; + i = i + 1; + } + return s * isMinus; +} + +int main () { + int string[500]; + int temp; + temp = 0; + int i; + i = 0; + while (temp != 10) { + temp = getch(); + string[i] = temp; + i = i + 1; + } + string[i] = 0; + i = atoi_(string); + putint(i); + return 0; +} + diff --git a/testcases/functional_test/64_alpha_count.sy b/testcases/functional_test/64_alpha_count.sy new file mode 100644 index 0000000..02f5c05 --- /dev/null +++ b/testcases/functional_test/64_alpha_count.sy @@ -0,0 +1,19 @@ +// Count how many alpha in a string +int main() { + int string[500]; + int temp; + int i; + int count; + count = 0; + i = 0; + temp = 0; + while (temp != 10) { + temp = getch(); + if (temp > 40 && temp < 91 || temp > 96 && temp < 123) { + count = count + 1; + } + i = i + 1; + } + putint(count); + return 0; +} diff --git a/testcases/functional_test/65_word_count.sy b/testcases/functional_test/65_word_count.sy new file mode 100644 index 0000000..bf72c73 --- /dev/null +++ b/testcases/functional_test/65_word_count.sy @@ -0,0 +1,38 @@ +// Count all the word in the string + +int wc(int string[], int n) { + int inWord; + int i; + int count; + i = 0; + inWord = 0; + count = 0; + while (i < n) { + if (string[i] != 32) { + if (inWord == 0) { + count = count + 1; + inWord = 1; + } + } else { + inWord = 0; + } + i = i + 1; + } + return count; +} + +int main() { + int string[500]; + int temp; + int i; + i = 0; + temp = 0; + while (temp != 10) { + temp = getch(); + string[i] = temp; + i = i + 1; + } + temp = wc(string, i); + putint(temp); + return 0; +} diff --git a/testcases/functional_test/66_go_upstairs.sy b/testcases/functional_test/66_go_upstairs.sy new file mode 100644 index 0000000..f47b317 --- /dev/null +++ b/testcases/functional_test/66_go_upstairs.sy @@ -0,0 +1,22 @@ +int climbStairs(int n) { + if(n < 4) + return n; + int dp[10]; + dp[0] = 0; + dp[1] = 1; + dp[2] = 2; + int i; + i = 3; + while(i -1 && s[c] == 0){ + c = c - 1; + } + if(c == -1) + return 0; + int i; + i = c; + while(i > -1){ + if(s[i] == 0) + return n - i - 1 - (n - 1 - c); + i = i - 1; + } + return c - i; +} +int main(){ + int res; + int a[10]; + a[0]=-4;a[1]=3;a[2]=9;a[3]=-2;a[4]=0; + a[5]=1;a[6]=-6;a[7]=5;a[8]=7;a[9]=8; + res = 10; + res = lengthOfLastWord(a, res); + return res; +} \ No newline at end of file diff --git a/testcases/functional_test/70_multi.sy b/testcases/functional_test/70_multi.sy new file mode 100644 index 0000000..a73ac10 --- /dev/null +++ b/testcases/functional_test/70_multi.sy @@ -0,0 +1,19 @@ +int main() +{ + //newline=10; + int i; + int sum; + sum=0; + //m = 1478; + //int t; + i=0; + while(i<21) + { + sum=sum*i; + i=i+1; + } + + putint(sum); + + return 0; +} diff --git a/testcases/functional_test/71_max_subsequence_sum.sy b/testcases/functional_test/71_max_subsequence_sum.sy new file mode 100644 index 0000000..bbb4a84 --- /dev/null +++ b/testcases/functional_test/71_max_subsequence_sum.sy @@ -0,0 +1,30 @@ +int maxSubArray(int nums[], int n) { + if(n == 0) + return 0; + if(n == 1) + return nums[0]; + int sum; + sum = nums[0]; + int max; + max = sum; + int i; + i = 1; + while(i < n){ + if(sum < 0) + sum = 0; + sum = sum + nums[i]; + if(max < sum) + max = sum; + i = i + 1; + } + return max; +} +int main(){ + int res; + int a[10]; + a[0]=-4;a[1]=3;a[2]=9;a[3]=-2;a[4]=0; + a[5]=1;a[6]=-6;a[7]=5;a[8]=7;a[9]=8; + res = 10; + res = maxSubArray(a, res); + return res; +} \ No newline at end of file diff --git a/testcases/functional_test/72_enum.sy b/testcases/functional_test/72_enum.sy new file mode 100644 index 0000000..fc98413 --- /dev/null +++ b/testcases/functional_test/72_enum.sy @@ -0,0 +1,27 @@ +int main() +{ + int i; + int j; + int k; + int t; + i=0;j=0;k=0; + while(i<21) + { + while(j<101-i) + { + k=100-i-j; + if(5*i+1*j+k/2==100) + { + putint(i); + putint(j); + putint(k); + t=10; + putch(t); + } + j=j+1; + } + i=i+1; + } + + return 0; +} diff --git a/testcases/functional_test/73_exchange_value.sy b/testcases/functional_test/73_exchange_value.sy new file mode 100644 index 0000000..24f3536 --- /dev/null +++ b/testcases/functional_test/73_exchange_value.sy @@ -0,0 +1,25 @@ +int n; + +int main() +{ + //newline=10; + int i; + int j; + //m = 1478; + //int t; + i=getint(); + j=getint(); + int temp; + temp=i; + i=j; + j=temp; + + putint(i); + temp = 10; + putch(temp); + putint(j); + temp = 10; + putch(temp); + + return 0; +} diff --git a/testcases/functional_test/74_itera_sqrt.sy b/testcases/functional_test/74_itera_sqrt.sy new file mode 100644 index 0000000..1b970d1 --- /dev/null +++ b/testcases/functional_test/74_itera_sqrt.sy @@ -0,0 +1,27 @@ +int fsqrt(int a) +{ + int x0=0; + int x1; + x1=a/2; + while(x0-x1!=0) + { + x0=x1; + x1=(x0+a/x0); + x1=x1/2; + } + + return x1; + +} + +int main() +{ + int a; + a=400; + int res; + res=fsqrt(a); + putint(res); + res = 10; + putch(res); + return 0; +} diff --git a/testcases/functional_test/75_max_container.sy b/testcases/functional_test/75_max_container.sy new file mode 100644 index 0000000..df966d4 --- /dev/null +++ b/testcases/functional_test/75_max_container.sy @@ -0,0 +1,33 @@ +int maxArea(int height[], int n) { + int i; + int j; + i = 0; + j = n - 1; + int max_val; + max_val = -1; + while(i < j){ + int area; + if(height[i] < height[j]) + area = (j - i) * height[i]; + else + area = (j - i) * height[j]; + if(area > max_val){ + max_val = area; + } + if(height[i] > height[j]) + j = j - 1; + else + i = i + 1; + } + return max_val; +} + +int main(){ + int res; + int a[10]; + a[0]=3;a[1]=3;a[2]=9;a[3]=0;a[4]=0; + a[5]=1;a[6]=1;a[7]=5;a[8]=7;a[9]=8; + res = 10; + res = maxArea(a, res); + return res; +} \ No newline at end of file diff --git a/testcases/functional_test/76_int_factor_sum.sy b/testcases/functional_test/76_int_factor_sum.sy new file mode 100644 index 0000000..2344c11 --- /dev/null +++ b/testcases/functional_test/76_int_factor_sum.sy @@ -0,0 +1,33 @@ +int N; + +int newline; + +int factor(int n ) +{ + int i; + int sum; + sum=0; + i=1; + 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 diff --git a/testcases/functional_test/78_decbinoct.sy b/testcases/functional_test/78_decbinoct.sy new file mode 100644 index 0000000..8cc78ba --- /dev/null +++ b/testcases/functional_test/78_decbinoct.sy @@ -0,0 +1,31 @@ +int dec2bin(int a) +{ + int res; + int k; + int i; + int temp; + res=0; + k=1; + temp=a; + while(temp!=0) + { + i=temp%2; + res=k*i+res; + k=k*10; + temp=temp/2; + } + return res; + +} + +int main() +{ + int a; + a=400; + int res; + res=dec2bin(a); + putint(res); + res = 10; + putch(res); + return 0; +} diff --git a/testcases/functional_test/79_gcd.sy b/testcases/functional_test/79_gcd.sy new file mode 100644 index 0000000..1d20bc5 --- /dev/null +++ b/testcases/functional_test/79_gcd.sy @@ -0,0 +1,34 @@ +int n; + +int gcd(int m,int n) +{ + int t; + int r; + + if(m n - 2) + return 1; + int dp[10]; + int i; + i = 0; + while(i -1){ + int j; + if(nums[i] < n - 1 - i){ + j = nums[i]; + } + else + j = n - 1 - i; + while(j > -1){ + if(dp[i+j] != 0){ + dp[i] = 1; + } + j = j - 1; + } + i = i - 1; + } + + return dp[0]; +} +int main(){ + int res; + int a[10]; + a[0]=3;a[1]=3;a[2]=9;a[3]=0;a[4]=0; + a[5]=1;a[6]=1;a[7]=5;a[8]=7;a[9]=8; + res = 10; + res = canJump(a, res); + return res; +} \ No newline at end of file diff --git a/testcases/functional_test/82_int_split.sy b/testcases/functional_test/82_int_split.sy new file mode 100644 index 0000000..fb1e91e --- /dev/null +++ b/testcases/functional_test/82_int_split.sy @@ -0,0 +1,40 @@ +int N; + +int newline; + +int split(int n ,int a[]) +{ + int i; + i=N-1; + while(i!=-1) + { + a[i]=n%10; + n=n/10; + i=i-1; + + } + + return 0; +} + +int main() +{ + N=4; + newline=10; + int i; + int m; + int b[4]; + m = 1478; + m = split(m,b); + int t; + i=0; + while(i<4) + { + t=b[i]; + putint(t); + putch(newline); + i=i+1; + + } + return 0; +} diff --git a/testcases/functional_test/82_remove_duplicate_element.sy b/testcases/functional_test/82_remove_duplicate_element.sy new file mode 100644 index 0000000..09dd4d4 --- /dev/null +++ b/testcases/functional_test/82_remove_duplicate_element.sy @@ -0,0 +1,24 @@ +int removeElement(int nums[], int n, int val) { + int i; + i = 0; + while (i < n) { + if (nums[i] == val) { + nums[i] = nums[n - 1]; + n = n - 1; + } else { + i = i + 1; + } + } + return n; +} +int main(){ + int res; + int a[10]; + a[0]=3;a[1]=3;a[2]=9;a[3]=0;a[4]=0; + a[5]=1;a[6]=1;a[7]=5;a[8]=7;a[9]=8; + res = 10; + int val; + val = 3; + res = removeElement(a, res, val); + return res; +} \ No newline at end of file diff --git a/testcases/functional_test/83_accumulate.sy b/testcases/functional_test/83_accumulate.sy new file mode 100644 index 0000000..9152655 --- /dev/null +++ b/testcases/functional_test/83_accumulate.sy @@ -0,0 +1,20 @@ + +int main() +{ + //newline=10; + int i; + int sum; + sum=0; + //m = 1478; + //int t; + i=0; + while(i<21) + { + sum=sum+i; + i=i+1; + } + + putint(sum); + + return 0; +} \ No newline at end of file diff --git a/testcases/functional_test/83_enc_dec.sy b/testcases/functional_test/83_enc_dec.sy new file mode 100644 index 0000000..5df25f9 --- /dev/null +++ b/testcases/functional_test/83_enc_dec.sy @@ -0,0 +1,38 @@ +int enc(int a) +{ + if(a>25) + a=a+60; + else + { + a=a-15; + } + + return a; + +} + +int dec(int a) +{ + if (a>85) + a=a-59; + else + { + a=a+14; + } + + return a; + +} + +int main() +{ + int a; + a=400; + int res; + res=enc(a); + res=dec(res); + putint(res); + res = 10; + putch(res); + return 0; +} diff --git a/testcases/functional_test/84_last_word_length.sy b/testcases/functional_test/84_last_word_length.sy new file mode 100644 index 0000000..c3a0ce0 --- /dev/null +++ b/testcases/functional_test/84_last_word_length.sy @@ -0,0 +1,28 @@ +int lengthOfLastWord(int s[], int n) { + if(n == 0) + return 0; + int c; + c = n - 1; + while(c > -1 && s[c] == 0){ + c = c - 1; + } + if(c == -1) + return 0; + int i; + i = c; + while(i > -1){ + if(s[i] == 0) + return n - i - 1 - (n - 1 - c); + i = i - 1; + } + return c - i; +} +int main(){ + int res; + int a[10]; + a[0]=-4;a[1]=3;a[2]=9;a[3]=-2;a[4]=0; + a[5]=1;a[6]=-6;a[7]=5;a[8]=7;a[9]=8; + res = 10; + res = lengthOfLastWord(a, res); + return res; +} \ No newline at end of file diff --git a/testcases/functional_test/84_palindrome_number.sy b/testcases/functional_test/84_palindrome_number.sy new file mode 100644 index 0000000..19aa459 --- /dev/null +++ b/testcases/functional_test/84_palindrome_number.sy @@ -0,0 +1,42 @@ +int palindrome(int n) +{ + int a[4]; + int j; + int flag; + j=0; + while(j<4) + { + a[j]=n%10; + n=n/10; + j=j+1; + } + + if(a[0]==a[3] && a[1]==a[2]) + { + flag=1; + }else{ + flag=0; + } + return flag; +} + +int main() +{ + int test; + test=1221; + int flag; + flag=palindrome(test); + if(flag==1) + putint(test); + else + { + flag = 0; + putint(flag); + } + + flag = 10; + putch(flag); + + return 0; + +} diff --git a/testcases/functional_test/85_multi.sy b/testcases/functional_test/85_multi.sy new file mode 100644 index 0000000..a73ac10 --- /dev/null +++ b/testcases/functional_test/85_multi.sy @@ -0,0 +1,19 @@ +int main() +{ + //newline=10; + int i; + int sum; + sum=0; + //m = 1478; + //int t; + i=0; + while(i<21) + { + sum=sum*i; + i=i+1; + } + + putint(sum); + + return 0; +} diff --git a/testcases/functional_test/86_bin_search.sy b/testcases/functional_test/86_bin_search.sy new file mode 100644 index 0000000..ce86475 --- /dev/null +++ b/testcases/functional_test/86_bin_search.sy @@ -0,0 +1,51 @@ + +int main() +{ + //newline=10; + int i; + int sum; + int a[10]; + sum=0; + //m = 1478; + //int t; + i=0; + while(i<10) + { + a[i]=i+1; + i=i+1; + } + int x; + int high; + int low; + int mid; + int n; + n=10; + x=getint(); + high=n-1; + low=0; + mid=(high+low)/2; + while(a[mid]!=x && low < high) + { + mid=(high+low)/2; + if(xa[p]&&pp) + { + a[i]=a[i-1]; + a[p]=x; + i=i-1; + + } + + return 0; +} + +int main() +{ + N=10; + int a[11]; + //a[0]=1; + a[0]=1; + a[1]=3; + a[2]=4; + a[3]=7; + a[4]=8; + a[5]=11; + a[6]=13; + a[7]=18; + a[8]=56; + a[9]=78; + int x; + int i; + i=0; + x=getint(); + x=insert(a,x); + //while() + while(i max_val){ + max_val = area; + } + if(height[i] > height[j]) + j = j - 1; + else + i = i + 1; + } + return max_val; +} + +int main(){ + int res; + int a[10]; + a[0]=3;a[1]=3;a[2]=9;a[3]=0;a[4]=0; + a[5]=1;a[6]=1;a[7]=5;a[8]=7;a[9]=8; + res = 10; + res = maxArea(a, res); + return res; +} \ No newline at end of file diff --git a/testcases/functional_test/91_int_factor_sum.sy b/testcases/functional_test/91_int_factor_sum.sy new file mode 100644 index 0000000..2344c11 --- /dev/null +++ b/testcases/functional_test/91_int_factor_sum.sy @@ -0,0 +1,33 @@ +int N; + +int newline; + +int factor(int n ) +{ + int i; + int sum; + sum=0; + i=1; + 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 diff --git a/testcases/functional_test/93_decbinoct.sy b/testcases/functional_test/93_decbinoct.sy new file mode 100644 index 0000000..8cc78ba --- /dev/null +++ b/testcases/functional_test/93_decbinoct.sy @@ -0,0 +1,31 @@ +int dec2bin(int a) +{ + int res; + int k; + int i; + int temp; + res=0; + k=1; + temp=a; + while(temp!=0) + { + i=temp%2; + res=k*i+res; + k=k*10; + temp=temp/2; + } + return res; + +} + +int main() +{ + int a; + a=400; + int res; + res=dec2bin(a); + putint(res); + res = 10; + putch(res); + return 0; +} diff --git a/testcases/functional_test/93_matrix_sub.sy b/testcases/functional_test/93_matrix_sub.sy new file mode 100644 index 0000000..898e7d1 --- /dev/null +++ b/testcases/functional_test/93_matrix_sub.sy @@ -0,0 +1,72 @@ +int N; +int M; +int L; + +int sub(int a0[],int a1[], int a2[],int b0[],int b1[],int b2[],int c0[],int c1[],int c2[]) +{ + int i; + i=0; + while(i<3) + { + c0[i]=a0[i]-b0[i]; + c1[i]=a1[i]-b1[i]; + c2[i]=a2[i]-b2[i]; + i=i+1; + } + + return 0; + +} + +int main() +{ + N=3; +M=3; +L=3; + int a0[3];int a1[3]; int a2[3];int b0[3];int b1[3];int b2[3];int c0[6];int c1[3];int c2[3]; + int i; + i=0; + while(i<3) + { + a0[i]=i; + a1[i]=i; + a2[i]=i; + b0[i]=i; + b1[i]=i; + b2[i]=i; + i=i+1; + } + i=sub( a0, a1, a2, b0, b1, b2, c0, c1, c2); + int x; + while(i<3) + { + x = c0[i]; + putint(x); + + i=i+1; + } + x = 10; + i=0; + putch(x); + while(i<3) + { + x = c1[i]; + putint(x); + + i=i+1; + } + x = 10; + i=0; + putch(x); + while(i<3) + { + x = c2[i]; + putint(x); + + i=i+1; + } + x =10; + putch(x); + + return 0; +} diff --git a/testcases/functional_test/94_lcm.sy b/testcases/functional_test/94_lcm.sy new file mode 100644 index 0000000..4930995 --- /dev/null +++ b/testcases/functional_test/94_lcm.sy @@ -0,0 +1,35 @@ +int n; + +int gcd(int m,int n) +{ + int a; + int b; + a=m; + b=n; + + int t; + int r; + + if(m n - 2) + return 1; + int dp[10]; + int i; + i = 0; + while(i -1){ + int j; + if(nums[i] < n - 1 - i){ + j = nums[i]; + } + else + j = n - 1 - i; + while(j > -1){ + if(dp[i+j] != 0){ + dp[i] = 1; + } + j = j - 1; + } + i = i - 1; + } + + return dp[0]; +} +int main(){ + int res; + int a[10]; + a[0]=3;a[1]=3;a[2]=9;a[3]=0;a[4]=0; + a[5]=1;a[6]=1;a[7]=5;a[8]=7;a[9]=8; + res = 10; + res = canJump(a, res); + return res; +} \ No newline at end of file diff --git a/testcases/functional_test/95_matrix_tran.sy b/testcases/functional_test/95_matrix_tran.sy new file mode 100644 index 0000000..154fd76 --- /dev/null +++ b/testcases/functional_test/95_matrix_tran.sy @@ -0,0 +1,74 @@ +int M; +int L; +int N; + +int tran(int a0[],int a1[], int a2[],int b0[],int b1[],int b2[],int c0[],int c1[],int c2[]) +{ + int i; + i=0; + c1[2]=a2[1]; + c2[1]=a1[2]; + c0[1]=a1[0]; + c0[2]=a2[0]; + c1[0]=a0[1]; + c2[0]=a0[2]; + c1[1]=a1[1]; + c2[2]=a2[2]; + c0[0]=a0[0]; + + return 0; + +} + +int main() +{ + N=3; + M=3; + L=3; + int a0[3];int a1[3]; int a2[3];int b0[3];int b1[3];int b2[3];int c0[6];int c1[3];int c2[3]; + int i; + i=0; + while(i25) + a=a+60; + else + { + a=a-15; + } + + return a; + +} + +int dec(int a) +{ + if (a>85) + a=a-59; + else + { + a=a+14; + } + + return a; + +} + +int main() +{ + int a; + a=400; + int res; + res=enc(a); + res=dec(res); + putint(res); + res = 10; + putch(res); + return 0; +} diff --git a/testcases/functional_test/97_many_global_var.sy b/testcases/functional_test/97_many_global_var.sy new file mode 100644 index 0000000..247e2fc --- /dev/null +++ b/testcases/functional_test/97_many_global_var.sy @@ -0,0 +1,132 @@ +// Call a func with many params. + +int a0; +int a1; +int a2; +int a3; +int a4; +int a5; +int a6; +int a7; +int a8; +int a9; +int a10; +int a11; +int a12; +int a13; +int a14; +int a15; +int a16; +int a17; +int a18; +int a19; +int a20; +int a21; +int a22; +int a23; +int a24; +int a25; +int a26; +int a27; +int a28; +int a29; +int a30; +int a31; + +int a32; +int a33; +int a34; +int a35; +int a36; +int a37; +int a38; +int a39; + +int testParam8(int a0, int a1, int a2, int a3, + int a4, int a5, int a6, int a7) { + return a0 + a1 + a2 + a3 + a4 + a5 + a6 + a7; +} + +int testParam16(int a0, int a1, int a2, int a3, + int a4, int a5, int a6, int a7, + int a8, int a9, int a10, int a11, + int a12, int a13, int a14, int a15) { + return a0 + a1 + a2 - a3 - a4 - a5 - a6 - a7 + + a8 + a9 + a10 + a11 + a12 + a13 + a14 + a15; +} + +int testParam32(int a0, int a1, int a2, int a3, + int a4, int a5, int a6, int a7, + int a8, int a9, int a10, int a11, + int a12, int a13, int a14, int a15, + int a16, int a17, int a18, int a19, + int a20, int a21, int a22, int a23, + int a24, int a25, int a26, int a27, + int a28, int a29, int a30, int a31) { + return a0 + a1 + a2 + a3 + a4 + a5 + a6 + a7 + + a8 + a9 + a10 + a11 + a12 + a13 + a14 + a15 + + a16 + a17 - a18 - a19 - a20 - a21 - a22 + a23 + + a24 + a25 + a26 + a27 + a28 + a29 + a30 + a31; +} + +int main() { + a0 = 0; + a1 = 1; + a2 = 2; + a3 = 3; + a4 = 4; + a5 = 5; + a6 = 6; + a7 = 7; + a8 = 8; + a9 = 9; + a10 = 0; + a11 = 1; + a12 = 2; + a13 = 3; + a14 = 4; + a15 = 5; + a16 = 6; + a17 = 7; + a18 = 8; + a19 = 9; + a20 = 0; + a21 = 1; + a22 = 2; + a23 = 3; + a24 = 4; + a25 = 5; + a26 = 6; + a27 = 7; + a28 = 8; + a29 = 9; + a30 = 0; + a31 = 1; + + a32 = 4; + a33 = 5; + a34 = 6; + a35 = 7; + a36 = 8; + a37 = 9; + a38 = 0; + a39 = 1; + + a0 = testParam8(a0, a1, a2, a3, a4, a5, a6, a7); + putint(a0); + a0 = testParam16(a32, a33, a34, a35, + a36, a37, a38, a39, + a8, a9, a10, a11, + a12, a13, a14, a15); + putint(a0); + a0 = testParam32(a0, a1, a2, a3, + a4, a5, a6, a7, + a8, a9, a10, a11, + a12, a13, a14, a15, + a16, a17, a18, a19, + a20, a21, a22, a23, + a24, a25, a26, a27, + a28, a29, a30, a31); + putint(a0); + return 0; +} diff --git a/testcases/functional_test/98_many_local_var.sy b/testcases/functional_test/98_many_local_var.sy new file mode 100644 index 0000000..34a37d1 --- /dev/null +++ b/testcases/functional_test/98_many_local_var.sy @@ -0,0 +1,85 @@ +//sample:input n number, sort them and print them; + int n; + int main() + { + int a0; + int a1; + int a2; + int a3; + int a4; + int a5; + int a6; + int a7; + int a8; + int a9; + int a10; + int a11; + int a12; + int a13; + int a14; + int a15; + int a16; + int a17; + int a18; + int a19; + int a20; + int a21; + int a22; + int a23; + int a24; + int a25; + int a26; + int a27; + int a28; + int a29; + int b; + b = getint(); + while(b == 5){ + b = b + 1; + } + a0=0; + a1=a0+1; + a2=a1+1; + a3=a2+1; + a4=a3+1; + a5=a4+1; + a6=a5+1; + a7=a6+1; + a8=a7+1; + a9=a8+1; + a10=a9+1; + a11=a10+1; + a12=a11+1; + a13=a12+1; + a14=a13+1; + a15=a14+1; + a16=a15+1; + a17=a16+1; + a18=a17+1; + a19=a18+1; + a20=a19+1; + a21=a20+1; + a22=a21+1; + a23=a22+1; + a24=a23+1; + a25=a24+1; + a26=a25+1; + a27=a26+1; + a28=a27+1; + a29=a28+1; + int t; + putint(a0);putint(a1);putint(a2);putint(a3); + putint(a4);putint(a5);putint(a6);putint(a7); + putint(a8);putint(a9);putint(a10);putint(a11); + putint(a12);putint(a13);putint(a14);putint(a15); + putint(a16);putint(a17);putint(a18);putint(a19); + putint(a20);putint(a21);putint(a22);putint(a23); + putint(a24);putint(a25);putint(a26);putint(a27); + putint(a28);putint(a29); + int newline; + newline = 10; + putch(newline); + putint(b); + putch(newline); + return a25; + } diff --git a/testcases/functional_test/98_palindrome_number.sy b/testcases/functional_test/98_palindrome_number.sy new file mode 100644 index 0000000..19aa459 --- /dev/null +++ b/testcases/functional_test/98_palindrome_number.sy @@ -0,0 +1,42 @@ +int palindrome(int n) +{ + int a[4]; + int j; + int flag; + j=0; + while(j<4) + { + a[j]=n%10; + n=n/10; + j=j+1; + } + + if(a[0]==a[3] && a[1]==a[2]) + { + flag=1; + }else{ + flag=0; + } + return flag; +} + +int main() +{ + int test; + test=1221; + int flag; + flag=palindrome(test); + if(flag==1) + putint(test); + else + { + flag = 0; + putint(flag); + } + + flag = 10; + putch(flag); + + return 0; + +} diff --git a/testcases/functional_test/99_bin_search.sy b/testcases/functional_test/99_bin_search.sy new file mode 100644 index 0000000..ce86475 --- /dev/null +++ b/testcases/functional_test/99_bin_search.sy @@ -0,0 +1,51 @@ + +int main() +{ + //newline=10; + int i; + int sum; + int a[10]; + sum=0; + //m = 1478; + //int t; + i=0; + while(i<10) + { + a[i]=i+1; + i=i+1; + } + int x; + int high; + int low; + int mid; + int n; + n=10; + x=getint(); + high=n-1; + low=0; + mid=(high+low)/2; + while(a[mid]!=x && low < high) + { + mid=(high+low)/2; + if(x