"kuangbin 基础dp][POJ 1015] [Jury Compromise" 题目 In Frobnia, a far away country, the verdicts in court trials are determined by a jury consisting of mem ...
分类:
其他好文 时间:
2020-02-14 22:32:17
阅读次数:
92
#{} 表示占位符(预编译) parameterType="map" #{}里面写的是map的key parameterType="cn.pojo.Object" #{}里面写的是实体类中的属性 parameterType="int"(等数据类型) #{}里面随意写 ${}表示拼接 ...
分类:
其他好文 时间:
2020-02-14 16:40:12
阅读次数:
214
题目:https://vjudge.net/problem/POJ-3126#author=541607120101 简单bfs,但我用了很笨比的做法。。把每一位数都保存下来然后逐位改值检查并加入队列,直到找到所求值,具体见代码。 1 #include <stdio.h> 2 #include <s ...
分类:
其他好文 时间:
2020-02-14 16:38:49
阅读次数:
95
#include<string> #include <string.h> #include <stdio.h> #include <stdlib.h> #include <math.h> #include <algorithm> #include <queue> #include <vector> ...
分类:
其他好文 时间:
2020-02-14 11:08:50
阅读次数:
66
题目网址:http://poj.org/problem?id=1038 题意:给出一张N*M的格子纸,其中有一些坏格子,问最多可以在格子纸上切下多少个2*3(3*2)的小矩阵(不包含坏格子)。其中N<=150, M<=10。 做法: 容易发现对于右端在第i列的小矩阵,其能否摆放只和i-1, i-2列 ...
分类:
其他好文 时间:
2020-02-13 18:47:46
阅读次数:
72
"POJ 1753 Flip Game" 题意 在一个4x4的棋盘上放有16枚一面黑一面白的棋子。 每次操作时,你可以选择一枚棋子,然后将这枚棋子以及它上下左右相邻的棋子(如果有的话)翻面(颜色反转)。 给定棋盘初始的样子,请问在一些操作后,是否可以将所有棋子都变成一个颜色?如果可以的话,最少需要多 ...
分类:
其他好文 时间:
2020-02-13 09:17:49
阅读次数:
57
在Power String中,求一个字符串的循环节,应满足L mod (L-next[L])=0,则循环节长度为L-next[L] 存在另一种形式的循环节,例如abcabca,此时如果将abc重写三次,得到abcabcabc,则原字符串为其前缀. 此时对于原字符串,其循环节长度为L-next[L]= ...
分类:
其他好文 时间:
2020-02-13 00:26:29
阅读次数:
64
参考 https://www.cnblogs.com/null00/archive/2012/04/22/2464876.html #include <stdio.h> #include <algorithm> #define LEN 10000 using namespace std; struc ...
分类:
其他好文 时间:
2020-02-11 20:48:58
阅读次数:
75
#include<cstdio> #include<cstring> #include<cmath> #include<algorithm> #define maxn 1005 using namespace std; int num,to[maxn<<1],nxt[maxn<<1],last[ma ...
分类:
其他好文 时间:
2020-02-11 17:35:13
阅读次数:
63