摘要:
Nontype Template Parameters非类型模板参数对 function templates 和 class templates 而言,template parameters 并不一定非要是类型(types) 不可,它们也可以是常规的(一般的)数值。当你以类型(types)作为 te... 阅读全文
摘要:
3.3 Class Templates 的特化( Specializations)你可以针对某些特殊的 template arguments,对一个 class template 进行「特化」。class templates的特化与 function template 的重载类似,使你得以针对某些特... 阅读全文
摘要:
Filter.javapackage com.bjsxt.dp.filter;public interface Filter { String doFilter(String str);}SesitiveFilter.javapackage com.bjsxt.dp.filter;public... 阅读全文
摘要:
思路:先把1~10000数经过多少次变换的1存入count[MAX_N]数组中,比如count[1]=1就表示1经过一次变换,count[2]=2就表示2经过了2次变换,count[i]=k表示i经过了k次变换。因为输入时m,n谁大谁小不定,所以可以先得到m,n的最大,最小数,然后在求[min(m,... 阅读全文