2011年5月10日

迷宫问题 BFS回溯保存路径

摘要: #include<iostream>#include<queue>#include<stdlib.h>#include<string.h>#include<stdlib.h>using namespace std;struct node{ int i; int j;};typedef struct node pp;pp path[50];struct node p1,p2;int xx[4]={1... 阅读全文

posted @ 2011-05-10 22:22 more think, more gains 阅读(528) 评论(0) 推荐(0) 编辑

迷宫问题 bfs

摘要: #include<stdio.h>#include<string.h>#include<stdlib.h>int map[10][10],dp[10][10];int xx[4]={1,0,0,-1};int yy[4]={0,1,-1,0};int mark[40][40];int judge(int x,int y){ if(x<0||x>=5||y<0||y>=5) return 0; return 1;}void DFS(int x,int y){ int i,j,x1,y1; if(x==4&&y==4) { 阅读全文

posted @ 2011-05-10 20:38 more think, more gains 阅读(266) 评论(0) 推荐(0) 编辑

序列 java poj3982

摘要: import java.util.*;import java.io.*;import java.math.*;public class Main { public static void main(String[] args) { Scanner cin=new Scanner(System.in); BigInteger f[]=new BigInteger[101]; int i; BigInteger a,b; while(cin.hasNext()) { f[0]=cin.nextBigInteger(); f[1]=cin.nextBigInteger(); f[2]=cin.nex 阅读全文

posted @ 2011-05-10 20:08 more think, more gains 阅读(139) 评论(0) 推荐(0) 编辑

字符串替换 java/c++

摘要: //javaimport java.util.*;import java.io.*;public class replace{ public static void main(String args[]) { Scanner cin=new Scanner(System.in); while(cin.hasNext()) { String str=cin.nextLine(); if(str.charAt(0)=='0') break; str=str.replaceAll("you","we"); System.out.println( 阅读全文

posted @ 2011-05-10 19:39 more think, more gains 阅读(204) 评论(0) 推荐(0) 编辑

poj 题目分类

摘要: 1000 A+B Problem 送分题 1001 Exponentiation 高精度 1003 Hangover 送分题 1004 Financial Management 送分题 1005 I Think I Need a Houseboat 几何 1006 Biorhythms 送分题 1007 DNA Sorting 送分题 1008 Maya Calendar 日期处理 1010 STAMPS 搜索+DP 1011 Sticks 搜索 1012 Joseph 模拟/数学方法 1014 Dividing 数论/DP?/组合数学->母函数? 1015 Jury Compromis 阅读全文

posted @ 2011-05-10 18:29 more think, more gains 阅读(373) 评论(0) 推荐(0) 编辑

完整版本的 poj 题目分类 转载

摘要: 完整版本的 poj 题目分类2008/04/05 10:58 [优秀转载 ]DP: 1011 NTA 简单题 1013 Great Equipment 简单题 1024 Calendar Game 简单题 1027 Human Gene Functions 简单题 1037 Gridland 简单题 1052 Algernon s Noxious Emissions 简单题 1409 Communication System 简单题,但是很容易看错~~~ 1425 Crossed Matchings 简单题 1438 Asteroids! 简单题 1459 String Distance an 阅读全文

posted @ 2011-05-10 18:26 more think, more gains 阅读(245) 评论(0) 推荐(0) 编辑

hdu 1316

摘要: import java.math.BigInteger;import java.util.Scanner;public class hdu1316 { public static void main(String[] args) { Scanner cin=new Scanner(System.in); BigInteger arr[]=new BigInteger[600]; BigIntege... 阅读全文

posted @ 2011-05-10 08:44 more think, more gains 阅读(194) 评论(0) 推荐(0) 编辑

hdu 1047 Exponentiation

摘要: import java.math.BigDecimal;import java.math.BigInteger;import java.util.Scanner;public class hdu1063 { public static void main(String[] args) { Scanner cin=new Scanner(System.in); int a,i; BigDecimal... 阅读全文

posted @ 2011-05-10 08:25 more think, more gains 阅读(189) 评论(0) 推荐(0) 编辑

hdu 1047 java水过

摘要: import java.io.*;import java.util.*;import java.math.*;public class Main { public static void main(String[] args) { Scanner cin=new Scanner(System.in); int i,n; BigInteger a,b; n=cin.nextInt(); for(i=0;i<n;i++) { if(i!=0) System.out.println(); b=BigInteger.ZERO; while(cin.hasNextBigInteger()) { a 阅读全文

posted @ 2011-05-10 08:06 more think, more gains 阅读(165) 评论(0) 推荐(0) 编辑

hdu 1042

摘要: 用java水过了。。937ms. import java.io.*;import java.util.*;import java.math.*;public class abc { public static void main(String[] args) { int t,i; Scanner cin=new Scanner(System.in); BigInteger sum; while(c... 阅读全文

posted @ 2011-05-10 07:47 more think, more gains 阅读(154) 评论(0) 推荐(0) 编辑

导航