2016年1月18日

Shell --- 批量修改文件后缀脚本

摘要: for f in *.$1;do filename=`basename $f` mv $f "${filename%.*}".$2;done;Usage::renamesuffixrename_suffixeg:renamedattxt> ls> a.dat> rename dat tx... 阅读全文

posted @ 2016-01-18 19:31 RookieCoder 阅读(259) 评论(0) 推荐(0)

2016年1月10日

Leetcode 312. Burst Balloons

摘要: Givennballoons, indexed from0ton-1. Each balloon is painted with a number on it represented by arraynums. You are asked to burst all the balloons. If ... 阅读全文

posted @ 2016-01-10 17:19 RookieCoder 阅读(221) 评论(0) 推荐(0)

2015年12月30日

Advanced C++ --- Compiler Generated Functions

摘要: C++在C的基础上添加了很多新的特性,其中包括了很被人熟知的OOP,范型编程等,但是很多大家不知道的应该是我们的C++编译器在什么时候为我们编写的类自动生成什么函数(赋值函数,析构函数,构造函数等),这些函数的内部又是如何操作的,这里我们就说说C++中类的Costructer, Destruct... 阅读全文

posted @ 2015-12-30 15:46 RookieCoder 阅读(298) 评论(0) 推荐(0)

Advanced C++ -- Logic Constness and Bitwise Constness

摘要: 首先介绍一下什么是Logic Constness和Bitwise Constness,Logic Constness指的是function 后的const修饰,我们只知道这个function被const修饰了,但是并没有任何变量被const,Bitwise Constness指的是变量(指针,或... 阅读全文

posted @ 2015-12-30 15:10 RookieCoder 阅读(1054) 评论(0) 推荐(0)

2015年12月29日

Leetcode OJ --- 322. Coin Change

摘要: You are given coins of different denominations and a total amount of moneyamount. Write a function to compute the fewest number of coins that you need... 阅读全文

posted @ 2015-12-29 20:03 RookieCoder 阅读(2369) 评论(0) 推荐(0)

2015年12月25日

PAT 1100

摘要: 1100. Mars Numbers (20)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YuePeople on Mars count their numbers with base 13:Zero on Earth is call... 阅读全文

posted @ 2015-12-25 11:03 RookieCoder 阅读(317) 评论(0) 推荐(0)

2015年12月23日

Leetcode 319. Bulb Switcher

摘要: 这是一个非常巧妙的题目,网站称之为brain teaser,意思就是代码写起来会非常简介(就是逗你玩:)),题目如下:There arenbulbs that are initially off. You first turn on all the bulbs. Then, you turn off... 阅读全文

posted @ 2015-12-23 22:04 RookieCoder 阅读(523) 评论(0) 推荐(0)

2015年12月19日

Advanced C++ --- const function

摘要: 上一篇介绍了const修饰的变量或者指针的含义,这篇我们介绍const修饰的函数以及函数参数含义。首先我们看一个例子class Dog{ int age; string name;public: Dog(){ age = 3; name = "dummy... 阅读全文

posted @ 2015-12-19 15:52 RookieCoder 阅读(423) 评论(0) 推荐(0)

2015年12月17日

Advance C++ -- const

摘要: 这条博客基于Bo Qian的YouTube教学教程总结而成,大家可以在YouTube上找到该教程,这里做一个心得总结。这部分,总结一下对const的认识:学过C++的都知道,C++中的const用于修饰常量,也就意味着不可改变,你以为就是这么简单了,但是实际中const可以玩出很多花样:1. con... 阅读全文

posted @ 2015-12-17 21:14 RookieCoder 阅读(473) 评论(0) 推荐(0)

2015年12月16日

PAT 1014

摘要: 1014. Waiting in Line (30)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueSuppose a bank has N windows open for service. There is a yellow l... 阅读全文

posted @ 2015-12-16 14:43 RookieCoder 阅读(136) 评论(0) 推荐(0)

导航

< 2025年6月 >
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 1 2 3 4 5
6 7 8 9 10 11 12
点击右上角即可分享
微信分享提示