码迷,mamicode.com
首页 >  
搜索关键字:linq sum    ( 28189个结果
C#将数据库导出成Excel,再从Excel导入到数据库中。
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data.SqlClient;using System.IO;namespace CindyDatabaseP...
分类:数据库   时间:2014-05-09 11:37:48    阅读次数:378
LeetCode: Triangle 题解
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the fol...
分类:其他好文   时间:2014-05-08 21:08:25    阅读次数:407
C# Copy 文件
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.IO;namespace DirectoryCopy...
分类:其他好文   时间:2014-05-08 20:30:59    阅读次数:381
C# 访问一个页面,并根据该页面上的a标签递归访问每个页面
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.IO;using System.Net;using ...
分类:其他好文   时间:2014-05-08 20:30:34    阅读次数:389
shell脚本练习题(更新中...)
练习题(这里贴的是自己写的代码, 网上给的题目代码我会附加在最下面)1.编写shell脚本,计算1-100的和; 1 #!/bin/bash 2 #caculate the sum of numbers from 1 to 100 3 4 sum=0 5 for i in `seq 1 100`;....
分类:其他好文   时间:2014-05-07 19:34:54    阅读次数:305
XmlSerialization 序列化与反序列化
using System;using System.Collections;using System.Collections.Generic;using System.IO;using System.Linq;using System.Text;using System.Threading.Task...
分类:其他好文   时间:2014-05-07 19:10:55    阅读次数:387
[leetcode] Path sum路径之和
要求给定树,与路径和,判断是否存在从跟到叶子之和为给定值的路径。比如下图中,给定路径之和为22,存在路径,因此返回true;否则返回false. 5 / \ 4 8 / / \ 11...
分类:其他好文   时间:2014-05-07 10:15:46    阅读次数:270
Leetcode | Binary Tree Maximum Path Sum
Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, 1 ...
分类:其他好文   时间:2014-05-07 09:36:09    阅读次数:300
杭电1231
1题目:给定K个整数的序列{ N1, N2, ..., NK },其任意连续子序列可表示为{ Ni, Ni+1, ..., Nj },其中 1 int main(){ int n, a[10001], left, beforeleft, right, i, max, sum; while...
分类:其他好文   时间:2014-05-06 13:18:27    阅读次数:366
Leetcode: Two Sum
这道题看似简单,其实很坑爹啊,动不动就是Time Limit Exceeded, 比如我下面这段TLE的代码,我感觉方法是对的,但是too naive,算法复杂度到了O(N^2),自然就TLE了而且有一些小语法错误需要注意:for(runner=current+1;;)不能用>;一定所有的case都...
分类:其他好文   时间:2014-05-06 11:31:09    阅读次数:405
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!