其他
方法是把数组中的数按2个2个的分成一组,先对比他们俩,然后再对比MAX和MIN。最后再加个判断,如果是奇数,那最后一个数字也要和MAX和MIN判断。using
System;using System.Collections.Generic;using System.Linq;using System...
作者:乔治·戈登·拜伦 正如一块冰冷的墓石 死者的名字使过客惊心, 当你翻到这一页,我名字
会吸引你那沉思的眼睛。 也许有一天,披览这名册, 你会把我的姓名默读, 请怀念我吧,像怀念死者, 相信我的心就葬在此处。 1809年9月14日 杨德豫译
●作者1809年到南欧游历时,曾在地中海的马耳他岛小住...
There areNgas stations along a circular route,
where the amount of gas at stationiisgas[i].You have a car with an unlimited gas
tank and it costscost[...
Algorithm : DP;public class Solution{ public
int minimumTotal(ArrayList> triangle) { for(int i = triangle.size()-2;
i>=0;i--) { ArrayList a1 = triangl...
PS:Nginx使用有两三年了,现在经常碰到有新用户问一些很基本的问题,我也没时间一一回答,今天下午花了点时间,结合自己的使用经验,把Nginx的主要配置参数说明分享一下,也参考了一些网络的内容,这篇是目前最完整的Nginx配置参数中文说明了。更详细的模块参数请参考:http://wiki.ngin...
Given a binary tree containing digits
from0-9only, each root-to-leaf path could represent a number.An example is the
root-to-leaf path1->2->3which rep...
Given a strings, partitionssuch that every
substring of the partition is a palindrome.Return all possible palindrome
partitioning ofs.For example, giv...
若是开通了虚拟主机,则需要在httpd-vhosts.conf中修改配置如下;若没有开通虚拟主机,则可以直接在httpd.conf文件最后面,加入以下代码:NameVirtualHost
XXX.XXX.XXX.XXXServerName XXX.XXX.XXX.XXXOrder Allow,Den...
小豪的第一次div1。Problem
A题意:一叠砖块每个砖块都有最大负载量,就是上面碟的砖块数不能超过负载。给你若干砖块,问你最少堆几堆?思路:贪心题,先排序然后每次检查能不能堆在已有的砖块上,不行在新开一堆,最后输出答案即可。代码如下:
1 //2014-02-03-23.33 2 #inclu...