- 博客(16)
- 收藏
- 关注
原创 POJ 1753 翻转游戏 枚举 (JAVA)
POJ 1753 题目链接 http://poj.org/problem?id=1753import java.util.Scanner;public class FlipGame { /* * 翻转游戏 枚举 */ public static boolean isFinish(int[][] fields) { // 判断是否完成 int flag_color...
2018-10-04 21:15:33
357
原创 JSP父模板抽离-rapid
1.使用目的 通过面向对象:把页面用到的相同结构抽离出来,使用继承的关系,基本的有父类定义,子类可以重写父类的变化的内容。 这样就可以多次复用,又不需要大量的时间维护,只需要引入父页面,并修改针对自己的内容就可以了。2 寻找方法 通过搜索找到 rapid 3 使用所引入的jar包:rapid-core-4.0.jar下载链接:http://mvnre
2017-10-21 14:07:35
1172
原创 poj1656
水的不能再水。 #include #include #include #include #include int flag[101][101]= {0};int n,x,y,l;int num;char s[10];using namespace std;int main(){ //freopen("in.txt","r",std
2016-08-05 15:44:17
291
原创 poj2153 Rank List
map累加 for(it=mp.begin(); it!=mp.end(); it++) { if(it->second>mp["Li Ming"]) cnt++; }
2016-08-05 15:24:39
340
原创 poj1693
1、任选两根水平的线段,若无水平线段可选,结束。否则2、从所有的垂直线段里,找到和这两根水平线段相交的线段,假设有tmp条。3、对于1步选的两条水平线段,因为有tmp跟垂直线段与其相交,根据推算,可以得知,其能组成的矩形就是(tmp - 1)*tmp / 2 个,将其加进总和里即可。
2016-08-05 11:08:32
303
原创 poj1308 is it a tree?
1: 0 0 空树是一棵树2: 1 1 0 0 不是树 不能自己指向自己3: 1 2 1 2 0 0 不是树....自己开始一直在这么WA 好郁闷 重复都不行呀~~55554: 1 2 2 3 4 5 不是树 森林不算是树(主要是注意自己)5: 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 1 注意 一个节点在指向自己的父亲或祖先 都是错误的 即 9--
2016-08-05 10:11:15
245
原创 poj1007 按逆序数排序DNA串
输入m组字符串 按逆序数排列输出#include #include #include#include using namespace std;int n,m;typedef class DNA{public: int num; char s[110];}dna;int invernum(char *s,int len){ int an
2016-08-02 11:07:12
584
原创 数据结构 堆。
删除优先级最高的元素 DeleteMin() void down(int bab){ int son=bab*2; int a=heap[bab]; while(son<=hlength) { if(sonheap[son+1]) son++; //确定最小的儿子
2016-08-01 11:24:12
259
原创 POJ1996
这道题我以后再怼 确实还没搞清楚#include #include #include using namespace std;int x[10100],y[101],z[10100];int main(){ int T,p,q; int i,j,k; scanf("%d",&T); while (T--) { memset(x,0,sizeof(x))
2016-07-29 16:34:49
281
原创 POJ1060 Modular multiplication of polynomials
不想多说 全在代码里#include #include #include using namespace std;int g[1001],f[1001],s[2001],h[1001];int lg,ls,lh,lf;int i,j;void mul() //乘{ for( i=0; i<lg; i++) for( j=0; j<lf;
2016-07-29 13:57:30
382
原创 POJ 1001 求高精度幂
高精度问题 初学的时候觉得很恶心。去掉小数点,原数组存在另一个数组,将小数点标记。用中间数组进行存储,模仿笔算乘法去掉前导0 后导0 用up down #include #include #include using namespace std;#define MAX 26*5char str[6];int res[MAX],a[MAX],b[
2016-07-28 15:51:54
379
原创 POJ1503
初学最不想看到的高精度 一度认为很恶心注意 :输入有前导0#include #include #include using namespace std;char sb[101]= {0};int sum[111]= {0};int i,j;int len1;int main(){ //freopen("in.txt","r",stdin);
2016-07-25 17:49:14
267
原创 深搜 城堡
#include #include #include #include #include #include using namespace std;int R,C;int rooms[60][60];int color[60][60];int maxRoom=0,roomNum=0;int roomArea;void dfs(int i,int k){ if(c
2016-07-24 17:26:03
344
原创 POJ2403 Hay Points
匹配初学 代码太杂糅#include #include #include #include #include using namespace std;struct word{ char name[20]; int num;};word am[1010];int i,j;int sum=0;int m,n;char tag[20];
2016-07-24 15:06:13
232
原创 POJ1318 Word Amalgamation
知识上的不足查找在字典中含有的字母。首先将字典进行按字母升序进行排序,将词表也按照字母的升序进行排序。然后看字母在词典中是否存在。对于存在的词,进行排序后再输出。#include #include #include #include #include using namespace std;char dic[100][8];char dics[100][8]
2016-07-24 13:46:48
305
原创 cmp 笔记
学习笔记bool cmp(Word w1,Word w2){ return strcmp(w1.name,w2,name)>0;}struct Word{ char name[20]; int len; friend bool operator <(Word w1, Word w2) { return strcmp
2016-07-24 11:52:04
379
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人