题目地址:HDU 4907
水题。。。不多说。。哈希后从后往前遍历一遍就行了、
代码如下:
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
const int INF=0x3f3f3f3f;
int head[11000...
分类:
其他好文 时间:
2014-08-03 23:18:26
阅读次数:
246
外部样式表当样式需要被应用到很多页面的时候,外部样式表将是理想的选择。使用外部样式表,你就可以通过更改一个文件来改变整个站点的外观。 内部样式表当单个文件需要特别样式时,就可以使用内部样式表。你可以在 head 部分通过 内联样式当特殊的样式需要应用到个别元素时,就可以使用内联样式。 使用内联...
分类:
Web程序 时间:
2014-08-03 23:10:46
阅读次数:
349
//使用数组queue[ ]存放结点队列void BFS( ) { head=0; tail=1; queue[head]=首结点的值; while (head<tail) //队列不空 { temp=tail; for (k=head; k<=ta...
分类:
其他好文 时间:
2014-08-03 23:03:16
阅读次数:
250
把下面这句放到head之间,title要放在这句下面
必须是utf-8 ,如果一不小心写成utf8,在safari中没问题,IE中还是乱码...
分类:
Web程序 时间:
2014-08-03 18:01:35
阅读次数:
237
Corner cases!class Solution {public: ListNode *deleteDuplicates(ListNode *head) { if (!head) return head; if (!head->next) return hea...
分类:
其他好文 时间:
2014-08-03 07:51:34
阅读次数:
237
Nothing special. A typical list manipulation problem.class Solution {public: ListNode *partition(ListNode *head, int x) { if (!head) return ...
分类:
其他好文 时间:
2014-08-03 07:50:15
阅读次数:
214
装完FreeBSD10的安装,安装完退出之后,发现启动项里面只剩下fedora的启动项,我的电脑是Fedora20+FreeBSD双系统,想用GRUB引导修复freeBSD的启动项,网上搜了一堆方法。但是都不可行。
我的FreeBSD是装在gpt5中
修改/ect/grub.d/40-custom
#!/bin/sh
exec tail -n +3 $0
# This file provides...
分类:
其他好文 时间:
2014-08-03 01:47:54
阅读次数:
245
1.http://sourceforge.net/p/cutycapt/code/HEAD/tree/CutyCapt/svn checkout http://svn.code.sf.net/p/cutycapt/code/ cutycapt-code下载的代码结构cutycapt-code/Cut...
分类:
其他好文 时间:
2014-08-03 01:40:44
阅读次数:
388
struct Node{ int data; Node *next;};//创建链表 输入为数字,如果输入0 链表结束(0不计)Node *creat(){ Node *head,*p,*s; int x,cycle=1; head=(Node *)malloc(siz...
分类:
其他好文 时间:
2014-08-02 20:50:24
阅读次数:
292
问题:交换相邻的两个结点分析:建立新链表每次插入ret->next后在插入ret,需要在判断下若最后只有一个结点不需要交换,注意每次交换了结点要把尾结点的下一个指向空class Solution {public: ListNode *swapPairs(ListNode *head) { ...
分类:
其他好文 时间:
2014-08-02 18:16:13
阅读次数:
178