题目又一道可以称之为dp的题目,虽然看了别人的代码,但是我的代码写的还是很挫,,,,,,//看了题解做的简单的记忆化dp#include#include#includeusing namespace std;int mp[110][110],dp[110][110];int xx[]={1,-1,0...
分类:
其他好文 时间:
2014-10-09 02:59:17
阅读次数:
265
题目用优先队列优化普通的广搜就可以过了。#include#include#includeusing namespace std;#includestruct pq{ int x,y,val; friend bool operator b.val; }};priority_queu...
分类:
其他好文 时间:
2014-10-09 02:41:07
阅读次数:
148
练习使用DPS的题,不知道有无别的做法,思路不复杂。形式是统计并且进行数字配对。 1 #include 2 3 int m,n,f,sub[25][4],note[25],ans[25]; 4 5 void ini(){ 6 int i,j,top,right,bottom,left;...
分类:
其他好文 时间:
2014-10-09 02:33:47
阅读次数:
196
#includevoid Merge(int R[],int R1[],int s,int m,int t);void MergeSort(int R[],int R1[],int s,int t);int main(void){ int n; scanf("%d",&n); int R[n],R1...
分类:
其他好文 时间:
2014-10-09 02:23:47
阅读次数:
136
1 #include 2 #include 3 #include 4 5 using namespace std; 6 7 struct List 8 { 9 int val;10 List *next;11 };12 13 List *head;14 15 void I...
分类:
其他好文 时间:
2014-10-09 02:18:57
阅读次数:
163
空间插值一般都会用到IInterPolationOP接口等首先是通过图层的名称获取图层的方法:private ILayer GetLayerByName(string name) { ILayer layer = null; for (int i = 0; i < axmapcontrol.Map....
分类:
其他好文 时间:
2014-10-09 01:59:57
阅读次数:
688
codeblocks13.12+GDB调试的时候,main传了一个int a[10]给quicksort但是在quicksort内部,debugger把a看成一个pointer而不是array,所以watch窗口如下,看不到a的元素找了半天资料,后来还是自己摸索,新添加一个变量a,右击a,选择pro...
分类:
其他好文 时间:
2014-10-09 01:57:27
阅读次数:
1938
今天和大家分享一个给Enum加备注的技巧,话不多说,先上一段代码: 1 namespace TestReflector.Model.Entities 2 { 3 public class UserInfo 4 { 5 public int Id { get; se...
分类:
Web程序 时间:
2014-10-09 01:42:57
阅读次数:
253
给出杨辉三角的顶点值,求底边各个数的值。直接DFS就好了
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define ll __int64
#define INF 0x3fffffff
#define rep(i,n) for(int (i)=0;(i)<n;(...
分类:
其他好文 时间:
2014-10-09 01:31:47
阅读次数:
174
1 public String intToRoman(int num) { 2 int[] values={1000,900,500,400,100,90,50,40,10,9,5,4,1}; 3 String[] roman={"M","CM","D","CD","C...
分类:
编程语言 时间:
2014-10-09 01:25:07
阅读次数:
165