n=1000, k = 800, 两个代码得出的结果不一样。
rust是32+64位编译,cpp的是64位编译。跟是否用vector关系不大,都是20多毫秒
C:\temp\solution>c:\tools\ptime target\release\solution.exe
=== target\release\solution.exe ===
311584323
Execution time: 0.023 s
C:\temp\solution>c:\Tools\ptime C:\temp\test_libhpxml\x64\Release\test_libhpxml.exe
=== C:\temp\test_libhpxml\x64\Release\test_libhpxml.exe ===
933920218
Execution time: 0.030 s
=== target\x86_64-pc-windows-msvc\release\solution.exe ===
311584323
Execution time: 0.027 s
--
修改:z16166 FROM 222.129.205.*
FROM 222.129.205.*