自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

结构之美 算法之道

要么读书,要么旅行,身体和灵魂必须有一个在路上

  • 博客(22)
  • 资源 (2)
  • 收藏
  • 关注

原创 HDU1018 Big Number(求阶乘位数)

#include#include#includeusing namespace std;int main(){ int kase,n; scanf("%d",&kase); while(kase--) { scanf("%d",&n); double sum=0; if(n==0) {printf("1\n"

2014-08-31 23:44:58 469

原创 HDU1003 Max Sum(最大连续子段和)

#include#include#include#includeusing namespace std;int main(){ int T,n; int t=1; //freopen("d:\\test.txt","r",stdin); scanf("%d",&T); for(int k=1;k<=T;k++) { sc

2014-08-31 13:30:03 555

原创 POJ1426 Find The Multiple

模拟BFS解法+DFS解法

2014-08-30 00:04:03 484

原创 POJ3083 Children of the Candy Corn(BFS+DFS水题)

#include#include#include#include#includeusing namespace std;char map[50][50];bool vis[50][50];int ldir[4][2]={{0,1},{1,0},{0,-1},{-1,0}};int rdir[4][2]={{0,-1},{1,0},{0,1},{-1,0}};int n,m,a

2014-08-29 18:39:40 447

原创 POJ2488 A Knight's Journey(DFS)

#include#include#include#includeusing namespace std;int p,q;bool chess['Z'+1][27];int dis[8][2]= {{-1,-2},{1,-2},{-2,-1},{2,-1},{-2,1},{2,1},{-1,2},{1,2}};struct Node{ int x; char y;

2014-08-28 21:59:11 450

原创 POJ 1904 Brainman(归并求逆序数)

#include#include#include#includeusing namespace std;int a[1005];int c[1005];int n,cnt;void MergeSort(int l, int r){ int mid, i, j, tmp; if( r > l+1 ) { mid = (l+r)/2;

2014-08-28 14:14:30 829

原创 POJ 2388 Who's in the Middle(排序)

#include#include#include#include#define N 10005using namespace std;int a[N];int n;int main(){ //freopen("d:\\test.txt","r",stdin); scanf("%d",&n); for(int i=0;i<n;i++) {

2014-08-28 12:45:25 463

原创 POJ1007 DNA Sorting(求逆序数)

#include#include#include#includeusing namespace std;int n,m;struct DNA{ int num; char sq[55];}dna[110];int cmp(DNA a,DNA b){ if(a.num==b.num) return 0; return a.num<b.num;

2014-08-28 12:31:48 671

原创 poj1002 487-3279(哈希)

hash+sort#include#include#include#include#define N 100005using namespace std;int num[N];int exc(char a){ if(a=='A'||a=='B'||a=='C') return 2; if(a=='D'||a=='E'||a=='F') return 3;

2014-08-27 13:58:05 703

原创 adb 的原理以及它总重启等问题详解

1、adb(Android Debug Bridge) 意为android调试桥。  是android系统中的一种命令行工具,通过它可以和android设备或模拟器通信。  ADB是一个C/S架构的应用程序,由三部分组成:  1)adb client, 运行在PC上(为DDMS,即IDE工作)  2)adb daemon(守护进程), 运行于Emulator(为与E

2014-08-23 14:34:20 1167

原创 poj3982 序列(java大数)

import java.math.*;import java.util.*;public class Main{ public static void main(String[] args){ Scanner cin=new Scanner(System.in); while(cin.hasNext()){ BigInteger[] n

2014-08-22 17:24:51 520

原创 poj2602 Superlong sums(高精度)

#include#include#includeusing namespace std;const int M=1000005;char a[M],b[M],ans[M];int main(){ int n,i,t,w; while(scanf("%d",&n)!=EOF) { getchar(); for(i=n-1;i>=

2014-08-22 17:07:42 660

原创 poj2389 Bull Math(大数java)

import java.math.*;import java.util.*;public class Main{ public static void main(String[] args){ Scanner cin=new Scanner(System.in); BigDecimal ans=BigDecimal.ONE; while(

2014-08-22 16:40:05 689

原创 poj2240 Arbitrage(floyd)

#include#include#include#include#include#includeusing namespace std;double G[35][35];int n,M;void floyd(){ for(int k=1;k<=n;k++) { for(int i=1;i<=n;i++) {

2014-08-22 12:44:26 523

原创 MVC设计模式

1.如何设计一个程序的结构,这是一门专门的学问,叫做"架构模式"(architectural pattern),属于编程的方法论。MVC模式就是架构模式的一种,它对我的启发特别大。我觉得它不仅适用于开发软件,也适用于其他广泛的设计和组织工作。下面是我对MVC模式的一些个人理解,不一定正确,主要用来整理思路。2.MVC是三个单词的首字母缩写,它们是Model(

2014-08-21 23:23:57 796

原创 Android开发入门教程--Android应用程序结构分析

一、新建HelloWorld项目:1、打开Eclipse,点击“File”->"New"->"Project"-Android Application Project"": 在弹出的“New Android Application”窗体中输入相应的应用名称、项目名称、包名称,并选择相应的SDK版本和应用主题:选择项目保存位置,一路“next”完成项目

2014-08-21 22:33:50 677

原创 poj1062昂贵的聘礼(dijkstra)

#include#include#include#include#includeusing namespace std;const int INF=0x3f3f3f3f;int n,m;struct Node{ int p,l,x; int num[110]; int val[110];} goods[110];int map[110][110];

2014-08-20 22:00:40 438

原创 poj2253Frogger(弗洛伊德)

#include#include#include#include#includeusing namespace std;double map[210][210];double x[210],y[210];int n;int main(){ //freopen("d:\\test.txt","r",stdin); int t=1; int i,j,k

2014-08-20 21:58:17 598

原创 hdu4970 Killing Monsters

题目难点,给定区间值,如何求

2014-08-19 18:16:16 501

原创 poj1860 Currency Exchange(bellman+spfa解法)

bellman加spfa两种解法,均采用vecotr建邻接表,spfa用queue实现

2014-08-16 19:59:34 788

原创 eclipse恢复初始设置的方法(专治各种不服=w=)

下面是我总结的一些方法1.Window -> Reset Perspective(有时候不一定行)2.File -> Switch workspace ->Other(然后删除原来的工作空间目录,再重启eclipse)3.删除eclipse工作空间下的.metadata目录,重启eclipse(这个文件记录着你所有关于eclipse的配置)(推荐★★★)4.Window->Clos

2014-08-15 20:18:32 87803 12

原创 poj_2823(单调队列)

一道裸的单调队列,求区间最值问题。线段树8秒多过,单调队列4秒多过。可作为单调队列的学习题目

2014-08-05 01:08:49 1095

计算机及网络知识精华

经典啊 新手少走弯路,高手共勉 如何让XP开机自动进行宽带连接 WinXp优化-经典 WINXP优化精髓 电脑高手必备 让你的Windows系统永生 科学的安装驱动程序的顺序 常见电脑故障的排除 计算机故障维修判断指导大全 不放光盘 让Windows系统自动修复受损文件 防止IE浏览器主页被篡改又多一招 开机基本提示语全解析 如何添加音量控制程序 使用计算机必懂的53个英文单词和缩写 计算机运行命令全集 怎样挂接双硬盘-双硬盘的安装和设置要点 解决光驱盘符不见的方法 不用路由器直接用交换机共享上网的方法 BIOS中英文对照表 教大家建立一个别人既无法进入又无法删除的文件夹 怎样使用用S端子线连接电脑与电视

2014-05-17

刘汝佳 45道动态规划题解

非常适合掌握基本DP思想,想进一步提高的童鞋~

2014-03-30

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除