2016-11-15 ruki
Recently, xmake's description syntax has been enhanced to support two different grammar styles at the same time. The set-add style The key-val style The set-add style This is xmake's classic style, for example: lua target("test") set_kind("static") add_defines("DEBUG") add_files("src/*.c", "test/*.cpp") 继续阅读 »
2013-04-06 Robert Zhang
more ```cpp include include ifdef DEBUG include "../comm_headers/debug_helper.h" else define DEBUG_OUT(...) endif 继续阅读 »
2013-04-07 Robert Zhang
more ```cpp include include include ifdef DEBUG include "../comm_headers/debug_helper.h" else define DEBUG_OUT(...) endif 继续阅读 »
2013-05-08 Robert Zhang
分析:把一堆煎饼按自底向上的顺序插入到数组中(这样饼号就等于元素下标号加一),然后从数组第一个元素开始向后遍历,每次把最大的煎饼放在遍历的当前位置。more ```cpp include include include include include 继续阅读 »
2013-05-09 Robert Zhang
more ```cpp include include include include using namespace std; 继续阅读 »
2013-06-21 Robert Zhang
分析:最直接的想法是如下代码: cpp bool on = false; for (int i = 1; i <=n; i++) if (n % i == 0) on = !on 但n最大可达数十亿,此法计算效率太低!那么能不能倒过来想:n可以被多少个不大于n的数整除?很容易给n分解质因数:more 继续阅读 »