Home STD Contest Notification Clarification Problems Ranklist Status Print Sign Out

View Compilation Error

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


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:21:18, Gzip enabled