码迷,mamicode.com
首页 >  
搜索关键字:int    ( 143001个结果
POJ 1088 滑雪(简单的记忆化dp)
题目又一道可以称之为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
HDU 3152 Obstacle Course(优先队列,广搜)
题目用优先队列优化普通的广搜就可以过了。#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
1008 Gnome Tetravex
练习使用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
关于IDW空间插值
空间插值一般都会用到IInterPolationOP接口等首先是通过图层的名称获取图层的方法:private ILayer GetLayerByName(string name) { ILayer layer = null; for (int i = 0; i < axmapcontrol.Map....
分类:其他好文   时间:2014-10-09 01:59:57    阅读次数:688
codeblocks如何watch数组
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
[.Net] 通过反射,给Enum加备注
今天和大家分享一个给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
POJ3187 Backward Digit Sums
给出杨辉三角的顶点值,求底边各个数的值。直接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
Integer to Roman(JAVA)
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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!