目前poj似乎数据出了问题,拿以前a的代码交上去也是wa 总体来说,要考虑三种答案0.00的情况 1.线段不相交 2.一根线段水平 3.开口被封闭,即高的那一端把低的那一端完全遮住了 #include<iostream> #include<cstring> #include<cstdio> #inc ...
分类:
其他好文 时间:
2020-02-18 20:17:29
阅读次数:
51
Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of concate ...
分类:
编程语言 时间:
2020-02-18 16:33:41
阅读次数:
88
POJ 2234 Matches Game HOJ 4388 Stone Game II POJ 2975 Nim HOJ 1367 A Stone Game POJ 2505 A multiplication game ZJU 3057 beans game POJ 1067 取石子游戏 POJ ...
分类:
其他好文 时间:
2020-02-18 15:06:13
阅读次数:
75
网址:https://vjudge.net/problem/POJ-2778 题意: 给出字符集${A,C,G,T}$和一些字符串(长度不超过$10$,且数量不超过$10$个),求长度为$n(n \leq 2e9)$的字符串中不包括上面这些字符串的字符串的数量。 题解: 我们可以先考虑一种方式:设$ ...
分类:
其他好文 时间:
2020-02-18 13:02:25
阅读次数:
83
Farmer John has built a new long barn, with N (2 <= N <= 100,000) stalls. The stalls are located along a straight line at positions x1,...,xN (0 <= xi ...
分类:
其他好文 时间:
2020-02-18 12:41:51
阅读次数:
66
《挑战程序设计竞赛》课后练习题解集——3.4 熟练掌握动态规划 状态压缩DP POJ 2441 有N头牛,M个槽,N,M≤20,每头牛只在指定的pi个槽里进食,不与其他牛共享槽。问有多少种分配方案。 dp[i][S],当前第i头牛要进食,槽的使用状态为S 1 #include <cstdio> 2 ...
分类:
其他好文 时间:
2020-02-17 01:04:17
阅读次数:
92
"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