c++中的输入
记录一下程序设计中遇到的c++输入形式cin以空格和换行符作为结束的标志,(不读入这两个字符)所以在cin和getline的组合运用中一定要注意。 性能差,但是可以通过 1std::ios::sync_with_stdio(false); 将其速度优化到和scanf差不多。 应用场景:一连串读入 (空格分隔 或者 回车分割) 1234567891 2 3 4 5 6123456-------------------cin>>a; scanf()性能好 ; 应用场景和cin差不多 getchar()读一个字符 getline()读入一行 以回车为分隔。 通过换行符确定读入边界,最后将换行符丢弃掉。一般读入一个str 12string str;getline(cin,str); cin getline 组合运用先使用cin 再使用getline的场景下一定要再使用完cin后面读入换行符要不然getline会多读一个空白字符。
外挂标签速查
https://butterfly.js.org/posts/4aa8abbe/ hexo butterfly 主题的外挂标签 速查Note 标签123{% note [color] [icon] [style] %}Any content (support inline tags too.io).{% endnote %} 名称 用法 color 【可選】顔色(default / blue / pink / red / purple / orange / green) icon 【可選】可配置自定義 icon (只支持 fontawesome 圖標, 也可以配置 no-icon ) style 【可選】可以覆蓋配置中的 style(simple/modern/flat/disabled) tag-hide标签123{% hideToggle display,bg,color %}content{% endhideToggle %} Tabs 标签横向可选择的框栏 12345 ...
CMU15445_learning
记录CMU15445学习过程
无题
to record my learning on algorithm
Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub. Quick StartCreate a new post1$ hexo new "My New Post" More info: Writing Run server1$ hexo server More info: Server Generate static files1$ hexo generate More info: Generating Deploy to remote sites1$ hexo deploy More info: Deployment