其它oj
相知无悔
这个作者很懒,什么都没留下…
展开
-
地大邀请赛d
Problem D: Tetrahedron InequalityTime Limit: 1 Sec Memory Limit: 128 MBSubmit: 15 Solved: 3[Submit][Status][Web Board]DescriptionIt is well known that you cannot make a triangle with n原创 2013-07-15 16:35:46 · 1217 阅读 · 1 评论 -
Codeforces Round #284 (Div. 2) D. Name That Tune 概率dp
D. Name That Tunetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIt turns out that you are a great fan of r原创 2015-08-25 23:48:53 · 798 阅读 · 0 评论 -
计蒜之道 初赛 第三场 题解 Manacher o(n)求最长公共回文串 线段树
腾讯手机地图腾讯手机地图的定位功能用到了用户手机的多种信号,这其中有的信号的作用范围近,有的信号作用的范围则远一些。有的信号相对于用户在不同的方位强度是不同的,有的则是在任何一个方向上信号强度都一致的。已知用户面向北方拿着自己的手机,在不同方位的各种信号覆盖区域可以被抽象成以用户为圆心的一系列扇形。已知每个扇形的半径 r,和每个扇形的两条边相对于正东方向的夹角度数。每个信号覆盖原创 2015-07-19 21:22:12 · 1608 阅读 · 0 评论 -
hihoCoder挑战赛14 题目1 : 不等式
时间限制:10000ms单点时限:1000ms内存限制:256MB描述给定n个关于X的不等式,问最多有多少个成立。每个不等式为如下的形式之一:X X X = CX > CX >= C输入第一行一个整数n。以下n行,每行一个不等式。数据范围:1输出一行一个整数,表示最多可以同时成立的不等式个数。原创 2015-08-30 21:09:14 · 1388 阅读 · 0 评论 -
hihoCoder挑战赛14 题目2 : 赛车 树的性质
题目2 : 赛车时间限制:20000ms单点时限:1000ms内存限制:256MB描述幻想乡有一个赛车场。赛车场里有N个地点。同时地点之间还有单向的道路存在。这些道路使得赛车场形成了一个外向树的结构。也就是说,道路将这N个地点连成了一个有根树。并且所有的边都是从父亲指向孩子的。由于幽香喜欢刺激,每次她去赛车场都会从根节点出发,选择原创 2015-08-30 21:12:53 · 894 阅读 · 0 评论 -
hiho一下 第五十九周 题目1 : Performance Log
题目1 : Performance Log时间限制:8000ms单点时限:1000ms内存限制:256MB描述You are given a txt file, which is performance logs of a single-threaded program.Each line has three columns as f原创 2015-08-18 02:46:05 · 971 阅读 · 0 评论 -
hiho一下 第六十一周 题目1 : Combination Lock 线段树 成段更新
时间限制:10000ms单点时限:1000ms内存限制:256MB描述Finally, you come to the interview room. You know that a Microsoft interviewer is in the room though the door is locked. There is a combinati原创 2015-09-04 09:47:59 · 738 阅读 · 0 评论 -
hiho一下 第六十二周 题目1 : Browser Caching stl 应用
题目1 : Browser Caching时间限制:10000ms单点时限:1000ms内存限制:256MB描述When you browse the Internet, browser usually caches some documents to reduce the time cost of fetching them from原创 2015-09-06 01:14:36 · 692 阅读 · 0 评论 -
BNU 26351 Space Elevator 数位dp
Problem ESpace ElevatorChina is building a space elevator, which will allow the launching probes and satellites to a muchlower cost, enabling not only scientific research projects but also space原创 2015-08-14 17:23:37 · 661 阅读 · 0 评论 -
计蒜之道 初赛 第一场 题解 dp 高效 网络流 最小割 最大流 ISAP 模板
搜狗输入法的分词算法搜狗输入法最近的用户输入中出现了一种新的输入模式,形如 “0k1234567”,搜狗的工程师发现这一模式后了解到,这是一种新被提出的对于十五进制数字的标记模式,其中 “0k” 是标记进制为15的前缀标记,之后的部分 “1234567” 是实际的十五进制的数字串。在发现这一标记模式后,搜狗的工程师开始尝试在已有的分词算法上进一步加入对于十五进制数字串的处理,把网页上的原创 2015-07-19 21:08:30 · 1312 阅读 · 0 评论 -
hiho一下 第六十周 题目1 : String Matching Content Length dp 最长公共子序列
题目1 : String Matching Content Length时间限制:10000ms单点时限:1000ms内存限制:256MB描述We define the matching contents in the strings of strA and strB as common substrings of the two str原创 2015-08-23 08:05:28 · 969 阅读 · 0 评论 -
foj2202 Problem 2202 犯罪嫌疑人
Problem 2202 犯罪嫌疑人 Accept: 30 Submit: 69 Time Limit: 1000 mSec Memory Limit : 65536 KB Problem Description 福尔摩斯是个大侦探,他总是在解决疑难案件。这一次的案件也不例外,案件是这样的:有编号为1到N的N位嫌疑犯,他们其中有一个犯了罪,然后每个嫌疑犯都被询问,“哪一个人犯原创 2015-10-06 20:55:12 · 587 阅读 · 0 评论 -
foj2200 Problem 2200 cleaning dp
Problem 2200 cleaning Accept: 36 Submit: 56 Time Limit: 1000 mSec Memory Limit : 65536 KB Problem Description N个人围成一圈在讨论大扫除的事情,需要选出K个人。但是每个人与他距离为2的人存在矛盾,所以这K个人中任意两个人的距离不能为2,他们想知道共有多少种方法。Inp原创 2015-10-07 12:42:52 · 675 阅读 · 0 评论 -
foj2198 Problem 2198 快来快来数一数 dp 矩阵快速幂
Problem 2198 快来快来数一数 Accept: 67 Submit: 194 Time Limit: 1000 mSec Memory Limit : 65536 KB Problem Description n个六边形排成一行,相邻两个六边形共用一条边,如下图所示:记这个图形的生成树个数为t(n)(由于每条边都是不同的,不存在同构的问题)。那么t(1)=6,t(2原创 2015-10-07 00:25:23 · 611 阅读 · 0 评论 -
Foj 2203 Problem 2203 单纵大法好 stl应用
Problem 2203 单纵大法好 Accept: 20 Submit: 57 Time Limit: 5000 mSec Memory Limit : 65536 KB Problem Description 人在做,天在看,单纵不怂保平安众娘皆为轮回来,敢教POI进夜战。勿怪战列低智商,航母不是一个样?假摔不虚有损管,大破进击是真相!老S最近喜欢上某个搜集战舰的游戏,这原创 2015-10-06 20:50:00 · 682 阅读 · 0 评论 -
计蒜之道 初赛 第二场 题解 树形dp
人人都有极客精神人人公司是一家极为鼓励极客精神的公司,当有重要的项目需要上线但又时间太紧,甚至需要当天上线的时候,往往会挂起海盗旗开启电子日期显示,让大家可以在对时间有更明确的感知的情况下,同心协力搞定重要的项目。海盗旗下方的电子屏显示的日期形式为 YYYYMMDD (年份占 4 位、月份占 2 位、天数占 2 位)。日期电子屏幕上每个数字对应的显示如下图:<img src原创 2015-07-19 21:15:52 · 1213 阅读 · 0 评论 -
Round A APAC Test 2016 Problem D. gSnake 贪吃蛇 stl应用
Problem D. gSnakeThis contest is open for practice. You can try every problem as many times as you like, though we won't keep track of which problems you solve. Read the Quick-Start Guide to原创 2015-08-25 00:42:56 · 1311 阅读 · 0 评论 -
hdu 4485 2013杭州邀请赛 Building bridges
ShaolinTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 0 Accepted Submission(s): 0Problem DescriptionShaolin temple is very f原创 2013-08-10 16:39:12 · 1157 阅读 · 0 评论 -
uestc 1307 windy数
Descriptionwindy定义了一种windy数。不含前导零且相邻两个数字之差至少为2的正整数被称为windy数。windy想知道,在A和B之间,包括A和B,总共有多少个windy数? Input包含两个整数,A B。满足 1 Output包含一个整数:闭区间[A,B]上windy数的个数。 Sample I原创 2013-10-07 16:47:39 · 831 阅读 · 0 评论 -
PKU Online Judge 1055:Tree
1055:Tree查看提交统计提问总时间限制: 2000ms 内存限制: 131072kB描述在信息学竞赛中,我们经常要遇到树这种结构。一棵树中除根结点外有且仅有一个父亲,而可能有很多儿子。所以,当我们要生成一棵树的时候,我们通常使用以下算法:对树中的每个点定义一个深度。第 1 个节点的深度为 1,第 i 个点的深度就是原创 2013-10-14 22:17:47 · 1177 阅读 · 0 评论 -
PKU Online Judge 1054
PKU Online Judge / 练习题目排名状态提问1054:Cube查看提交统计提问总时间限制: 1000ms 内存限制: 131072kB描述Delayyy君很喜欢玩某个由Picks编写的方块游戏,游戏在一个由单位格组成的棋盘上进行。游戏的主角是一个6个面互不相原创 2013-10-15 15:05:35 · 1410 阅读 · 0 评论 -
ural1297 . Palindrome
1297. PalindromeTime limit: 1.0 secondMemory limit: 64 MBThe “U.S. Robots” HQ has just received a rather alarming anonymous letter. It states that the agent from the competing «Robots Un原创 2013-11-09 16:56:42 · 750 阅读 · 0 评论 -
spoj 694 705. New Distinct Substrings
705. New Distinct SubstringsProblem code: SUBST1Given a string, we need to find the total number of its distinct substrings.InputT- number of test cases. TOutputF原创 2013-11-09 14:38:33 · 869 阅读 · 0 评论 -
spoj687. Repeats
687. RepeatsProblem code: REPEATSA string s is called an (k,l)-repeat if s is obtained by concatenating k>=1 times some seed string t with length l>=1. For example, the string原创 2013-11-10 16:38:57 · 1200 阅读 · 0 评论 -
Codeforces Round #303 (Div. 2) E. Paths and Trees
E. Paths and Treestime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle girl Susie accidentally found her原创 2015-05-22 21:11:07 · 764 阅读 · 0 评论 -
hihicoder 1192 : 简单的树嵌入 搜索
#1192 : 简单的树嵌入时间限制:10000ms单点时限:1000ms内存限制:256MB描述给定一棵n个点的无权树。定义两点i, j(0 ≤ i, j ≤ n - 1)间的距离d(i, j)为两点间树上最短路径的长度(边数)。我们需要将这n个点映射到中的向量v0 = (v0, 0, ..., v0, m - 1), ..., v原创 2015-07-27 17:48:12 · 754 阅读 · 0 评论 -
hiho一下 第五十八周 Beautiful String dp
题目1 : Beautiful String时间限制:10000ms单点时限:1000ms内存限制:256MB描述We say a string is beautiful if it has the equal amount of 3 or more continuous letters (in increasing order.)H原创 2015-08-09 13:56:57 · 1132 阅读 · 0 评论 -
Round A APAC Test 2016 Problem C. gCampus 最短路
Problem C. gCampusThis contest is open for practice. You can try every problem as many times as you like, though we won't keep track of which problems you solve. Read the Quick-Start Guide t原创 2015-08-24 19:27:26 · 1352 阅读 · 0 评论 -
hihocoder 1124 : 好矩阵 dp
好矩阵时间限制:3000ms单点时限:1000ms内存限制:256MB描述给定n, m。一个n × m矩阵是好矩阵当且仅当它的每个位置都是非负整数,且每行每列的和 ≤ 2。求好矩阵的个数,模109 + 7输入第一行一个整数T,表示测试点个数。下面T个测试点。每个测试点一行,包含两个整数n,m。1 ≤ T ≤ 104. 1 ≤原创 2015-08-10 01:46:45 · 1659 阅读 · 0 评论 -
Round A APAC Test 2016 Problem B. gCube
Problem B. gCubeThis contest is open for practice. You can try every problem as many times as you like, though we won't keep track of which problems you solve. Read the Quick-Start Guide to原创 2015-08-24 19:43:21 · 1212 阅读 · 0 评论 -
Round A APAC Test 2016 Problem A. Googol String
Problem A. Googol StringThis contest is open for practice. You can try every problem as many times as you like, though we won't keep track of which problems you solve. Read the Quick-Start G原创 2015-08-24 19:41:29 · 1716 阅读 · 1 评论 -
foj2204 Problem 2204 7 dp
Problem 2204 7 Accept: 50 Submit: 142 Time Limit: 2000 mSec Memory Limit : 65536 KB Problem Description n个有标号的球围成一个圈。每个球有两种颜色可以选择黑或白染色。问有多少种方案使得没有出现连续白球7个或连续黑球7个。Input 第一行有多组数据。第一行T表示组数。(T原创 2015-10-08 23:40:46 · 815 阅读 · 0 评论