http://acm.hdu.edu.cn/showproblem.php?pid=5053
ll就不超范围
写一道BFS题写的烦了 来水一道
//#pragma comment(linker, "/STACK:102400000,102400000")
#include
#include
#include
#include
#include
#include
#include ...
分类:
其他好文 时间:
2014-09-28 20:08:56
阅读次数:
200
int GetBitmapFromScreen() { char *lpBuf; HBITMAP hBitmap,hOld ; HDC hDC,hcDC; BITMAP bb;BITMAPINFO b; HANDLE hp,fh=NULL; DWORD dwX,dwY; //*************** //dwX=GetSystemMetrics(SM_CXSCREEN); //dwY=Get...
分类:
其他好文 时间:
2014-09-28 21:31:55
阅读次数:
155
使用Java预编编写 统计文件夹中含有Java文件的源代码行数...
分类:
其他好文 时间:
2014-09-28 20:07:15
阅读次数:
172
HDU5053the Sum of Cube(水题)
题目链接
题目大意:给你L到N的范围,要求你求这个范围内的所有整数的立方和。
解题思路:注意不要用int的数相乘赋值给longlong的数,会溢出。
代码:
#include
#include
const int N = 10005;
typedef long long ll;
ll t[N];
void ...
分类:
其他好文 时间:
2014-09-28 21:30:25
阅读次数:
164
题目:uva 10271 Chopsticks
题意:从一组数中选出每三个为一组,价值为三个中两个小的差值的平方和,让这个总价值最小。
分析:定义dp【i】【j】为从后 i 个中选出 j 对的最小价值。
转移方程:dp【i】【j】 = min(dp【i-1】【j】,dp【i+2】【j-1】+(a【i】-a【i+1】)*(a【i】-a【i+1】)...
分类:
其他好文 时间:
2014-09-28 20:56:45
阅读次数:
193
STL vector源代码学习,阅读整理,并添加注释,增强可读性。...
分类:
其他好文 时间:
2014-09-28 21:13:16
阅读次数:
181
操作系统进程调度,优先级反转,调度策略,linux进程调度策略。...
分类:
其他好文 时间:
2014-09-28 19:49:15
阅读次数:
293
简单的示例Shell程序示例1.#!/bin/bash
#This is to show what a shell script looks like
echo "Our first example"
echo # This inserts an empty line in output.
echo "We are currently in the following directory."
/b...
分类:
其他好文 时间:
2014-09-28 20:05:46
阅读次数:
266
题意:
给定n个点m条边的无向图
每次必须沿着LOVE走,到终点时必须是完整的LOVE,且至少走出一个LOVE,
问这样情况下最短路是多少,在一样短情况下最多的LOVE个数是多少。
有自环。
#include
#include
#include
#include
#include
#include
using namespace std;
typedef __int64 ll...
分类:
其他好文 时间:
2014-09-28 20:22:06
阅读次数:
186
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
#define lson l, mid, rt << 1
#define rson mid + 1, r, rt << 1 | 1
typedef __int...
分类:
其他好文 时间:
2014-09-28 21:45:16
阅读次数:
193
目标多杈树分解:
1)写出一个很大的目标
2)写出实现这一目标所有的”必要条件“和”充分条件“,再将这些条件作为小目标,即第一层树杈。
3)写出实现这一小目标所有的”必要条件“和”充分条件“,这些条件即第二层树杈。
4)如此类推,直到画出所有的树叶之时就表示实现了目标,这才算完成了这一目标
5)检查”多杈树“的分解是否具体,就应该不断检查,如果小目...
分类:
其他好文 时间:
2014-09-28 21:28:25
阅读次数:
135
使用dbms_xplan.display_cursor function的时候发现如下错误。SQL> select * from table(dbms_xplan.display_cursor);PLAN_TABLE_OUTPUT-----------------------------------...
分类:
其他好文 时间:
2014-09-28 20:04:15
阅读次数:
375
今天做功能,处于小心的习惯,打印了一下两个Integer比较的语句,发现了一个问题:为了防止不小心掉入这样的陷阱,对于基本类型的比较,用“==”;而对于基本类型的封装类型和其他对象,应该调用public boolean equals(Object obj)方法(复杂对象需要自己实现equals方法)...
分类:
其他好文 时间:
2014-09-28 21:44:05
阅读次数:
130
操作步骤1.确认crontab是否安装:执行crontab命令如果报commandnotfound,就表明没有安装2.安装crontab执行yuminstall-yvixie-cron3.确认是否安装成功:执行crontab-l4.看是否设置了开机自动启动chkconfig--listcrond5....
分类:
其他好文 时间:
2014-09-28 21:27:15
阅读次数:
115