/*小明A+B
Problem Description
小明今年3岁了, 现在他已经能够认识100以内的非负整数, 并且能够进行100以内的非负整数的加法计算.
对于大于等于100的整数, 小明仅保留该数的最后两位进行计算, 如果计算结果大于等于100, 那么小明也仅保留计算结果的最后两位.
例如, 对于小明来说:
1) 1234和34是相等的
2) 35+80=15
给定非负整数A...
分类:
其他好文 时间:
2014-07-26 15:22:55
阅读次数:
243
代码:#include int main(){int n;int i;int m;int count;int dp[50];while(scanf("%d",&n)!=EOF){dp[1]=1;dp[2]=1;dp[3]=2;while(n--){count=0;scanf("%d",&m);for...
分类:
其他好文 时间:
2014-07-26 14:57:10
阅读次数:
244
接着上一篇我直接给出代码,现在支持了new Task(), then(), all(), any() 这些不传参的调用方式。 1 (function(){ 2 var isFunction = function (target) { 3 return target in...
分类:
其他好文 时间:
2014-07-26 14:33:31
阅读次数:
320
Givens1,s2,s3, find whethers3is formed by the interleaving ofs1ands2.For example,Given:s1="aabcc",s2="dbbca",Whens3="aadbbcbcac", return true.Whens3="...
分类:
其他好文 时间:
2014-07-26 14:24:50
阅读次数:
251
#includevoid SelectSort(int n,int a[]){ for(int i=0; i<n; i++) { int MIN=a[i]; int k=i; for(int j=i+1; j<n; j++) { ...
分类:
其他好文 时间:
2014-07-26 14:12:34
阅读次数:
206
?? 运算符称为 null 合并运算符,用于定义可以为 null 值的类型和引用类型的默认值。 如果此运算符的左操作数不为 null,则此运算符将返回左操作数;否则返回右操作数。 class NullCoalesce{ static int? GetNullableInt() { return nu...
分类:
其他好文 时间:
2014-07-26 14:07:14
阅读次数:
197
(function(){ var jQuery = function( ) {return new jQuery.init( );}; //1jQuery.prototype = { init:function(){}, fx:function(){ alert('这是类库的一个实例化...
分类:
Web程序 时间:
2014-07-26 14:06:55
阅读次数:
232
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).For example: Given binary tree {3...
分类:
其他好文 时间:
2014-07-26 14:03:16
阅读次数:
174
#includevoid InsertSort(int n,int a[]){ int j; for(int i=0;i=0;j--) { if(a[j]>tmp) { a[j+1]=a[j]; ...
分类:
其他好文 时间:
2014-07-26 14:02:05
阅读次数:
171
Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321 1 class Solution { 2 public: 3 int reverse(int x){ 4 ...
分类:
其他好文 时间:
2014-07-26 13:54:24
阅读次数:
206