ARTS第三十九周(2020年6月15日~21日)
Algorithm
编号 | 难度 | 题目 | 我的解答 | 执行用时 | 内存消耗 | 排名 | 备注 |
---|---|---|---|---|---|---|---|
268 | 简单 | 缺失数字 | 200620-1.cpp | 36 ms | 17.2 MB | 84.64% | |
273 | 困难 | 整数转换英文表示 | 200621-2.cpp | 0 ms | 6.4 MB | 100.00% | |
274 | 中等 | H 指数 | 200621-1.cpp | 4 ms | 8.9 MB | 89.97% | |
275 | 中等 | H指数 II | 200621-1.cpp | 40 ms | 17.9 MB | 68.90% |
Review
1. 如何正确使用注释
分享链接:Code Health: To Comment or Not to Comment?
有的地方不应该使用注释,注释暗示了代码需要更好地进行重构;有的地方,合理的注释,则有助于更清晰地表达出代码这么写的原因。
好的注释如:
// Compute once because it’s expensive.
// Create a new Foo instance because Foo is not thread-safe.
// Note that order matters because...
@SuppressWarnings("unchecked") // The cast is safe because...
Tip
1. 带超时时间地运行命令
分享链接:Linux run a command with a time limit (timeout)
|
|
第二个参数表示时间,可以用“s”、“m”、“h”或“d”后缀。到时间后,若程序没有执行完成,会接到KILL信号。
Share
1. 微软云上基于R语言的机器学习资源
分享链接:Resources for Machine Learning Operations with R
该分享来自2020年RStudioConf,提供了微软Azure云上关于机器学习资源的介绍,并给出了详尽的文档和教程示例的链接。