摘要:
2009-08-28 14:14:17 OJ上的一些水题(可用来练手和增加自信) (poj3299,poj2159,poj2739,poj1083,poj2262,poj1503,poj3006,poj2255,poj3094)初期:一.基本算法: (1)枚举. (poj1753,poj2965)(2)贪心(poj1328,poj2109,poj2586)(3)递归和分治法. (4)递推. (5)构造法.(poj3295) (6)模拟法.(poj1068,poj2632,poj1573,poj2993,poj2996)二.图算法: (1)图的深度优先遍历和广度优先遍历. (2)最短路径算法(d 阅读全文
摘要:
#include<iostream>#include <fstream>#include <stdlib.h>using namespace std;#define MAXSIZE 1000int A[MAXSIZE+1][MAXSIZE+1],B[MAXSIZE+1][MAXSIZE+1];int c[MAXSIZE+1],w[MAXSIZE+1];int F(int n,int v){ if(n==0) return 0; if( !A[n][v] && v >= c[n]) A[n][v] = F(n-1,v-c[n]) +w[n 阅读全文
摘要:
//============================================================================// Name : 迷宫.cpp// Author : mtt// Version :// Copyright : Your copyright notice// Description : Hello World in C++, Ansi-style//============================================================================#include <iostr 阅读全文