KJY0047 - J1阶段测试题解
题目1:SYAP0001. 闯关
解题思路:
暴力思路:每次碰到奇数都使用一次 f o r for for 循环将后续的数值 1 1 1, 时间复杂度 O ( n 2 ) O(n^2) O(n2) 优化思路:可以用一个计数器 c n t cnt cnt 来存…
int add(int a, int b) {int c a b;return c;
}int main() {int result add(1, 2);return 0;
}生成汇编代码:g -S Cplus.cpp -o Cplus.s .file "Cplus.cpp".text.globl _Z3addii.def _Z3addii; .scl 2; .type 32; .endef.seh_proc _Z3addii
_Z3addii:p…