Home STD Contest Notification Clarification Problems Ranklist Status Print Sign Out

View Compilation Error

1_1030_1838_16413.cpp: In function 'void merge_sort(int*, int, int)':
1_1030_1838_16413.cpp:16:27: error: 'tmp' was not declared in this scope
         if (q[i] <= q[j]) tmp[k ++ ] = q[i ++ ];
                           ^
1_1030_1838_16413.cpp:17:14: error: 'tmp' was not declared in this scope
         else tmp[k ++ ] = q[j ++ ];
              ^
1_1030_1838_16413.cpp:18:22: error: 'tmp' was not declared in this scope
     while (i <= mid) tmp[k ++ ] = q[i ++ ];
                      ^
1_1030_1838_16413.cpp:19:20: error: 'tmp' was not declared in this scope
     while (j <= r) tmp[k ++ ] = q[j ++ ];
                    ^
1_1030_1838_16413.cpp:21:52: error: 'tmp' was not declared in this scope
     for (i = l, j = 0; i <= r; i ++, j ++ ) q[i] = tmp[j];
                                                    ^
1_1030_1838_16413.cpp: In function 'int main()':
1_1030_1838_16413.cpp:37:29: error: 'quick_sort' was not declared in this scope
         quick_sort(b,0,n - 1);
                             ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-06-17 10:03:56, Gzip enabled