interface Tree index number; childs number;class Solution private rever Tree; private order Tree; private reverCnt number; private orderCnt number; constructor thisrever
The code is throwing a std::bad_alloc error because it runs out of memory. The rever and order arrays are initialized with a size of 1500000, which may be too large and cause the program to run out of memory.
To fix this issue, you can try reducing the size of the arrays or optimizing the code to use less memory. Additionally, you can check if there are any memory leaks or other issues that may be causing the program to consume too much memory.
原文地址: http://www.cveoy.top/t/topic/ikwj 著作权归作者所有。请勿转载和采集!