java比c好逆向,吐槽一下java的效率。。。比起C差的真的好远。。。
該樓層疑似違規(guī)已被系統(tǒng)折疊?隱藏此樓查看此樓
刷計算機編程題目,USACO某道題,因為最近想用java,就寫了一個,各種查錯+優(yōu)化之后總算通過了:
TASK: camelot
LANG: JAVA
Compiling...
Compile: OK
Executing...
Test 1: TEST OK [0.187 secs, 30200 KB]
Test 2: TEST OK [0.266 secs, 30200 KB]
Test 3: TEST OK [0.295 secs, 30200 KB]
Test 4: TEST OK [0.475 secs, 30200 KB]
Test 5: TEST OK [0.576 secs, 30200 KB]
Test 6: TEST OK [0.770 secs, 30200 KB]
Test 7: TEST OK [0.259 secs, 30200 KB]
Test 8: TEST OK [0.302 secs, 30200 KB]
Test 9: TEST OK [0.518 secs, 30200 KB]
Test 10: TEST OK [0.540 secs, 30200 KB]
Test 11: TEST OK [0.274 secs, 30200 KB]
Test 12: TEST OK [0.216 secs, 30200 KB]
Test 13: TEST OK [0.223 secs, 30200 KB]
Test 14: TEST OK [0.245 secs, 30200 KB]
Test 15: TEST OK [0.274 secs, 30200 KB]
Test 16: TEST OK [0.252 secs, 30200 KB]
Test 17: TEST OK [0.302 secs, 30200 KB]
Test 18: TEST OK [0.245 secs, 30200 KB]
Test 19: TEST OK [0.274 secs, 30200 KB]
Test 20: TEST OK [0.288 secs, 30200 KB]
All tests OK.
Your program ('camelot') produced all correct answers!
可以看出,這段Java代碼平均用時大約在0.4s左右,最慢的數(shù)據(jù)0.770s,內(nèi)存(因為我沒有用到任何動態(tài)內(nèi)存項目,使用了3.02MB)
總結(jié)
以上是生活随笔為你收集整理的java比c好逆向,吐槽一下java的效率。。。比起C差的真的好远。。。的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 滚动加载数据 php,无刷新动态加载数据
- 下一篇: php 编写mysql,自己写的MySQ