04 2017 档案

摘要:I. Beautiful Array 2017- BUPT Collegiate Programming Contest - sync I. Beautiful Array 2017- BUPT Collegiate Programming Contest - sync 时间限制 1000 ms 内 阅读全文
posted @ 2017-04-30 10:50 贱人方 阅读(568) 评论(0) 推荐(0)
摘要:H. Black-white Tree 2017- BUPT Collegiate Programming Contest - sync H. Black-white Tree 2017- BUPT Collegiate Programming Contest - sync 时间限制 1000 ms 阅读全文
posted @ 2017-04-30 10:43 贱人方 阅读(282) 评论(0) 推荐(0)
摘要:F. Gabriel's Pocket Money 2017- BUPT Collegiate Programming Contest - sync F. Gabriel's Pocket Money 2017- BUPT Collegiate Programming Contest - sync 阅读全文
posted @ 2017-04-30 10:37 贱人方 阅读(314) 评论(0) 推荐(0)
摘要:Counting Intersections Time Limit: 12000/6000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1138 Accepted Submission( 阅读全文
posted @ 2017-04-29 10:27 贱人方 阅读(247) 评论(0) 推荐(0)
摘要:Road Time Limit: 12000/6000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1132 Accepted Submission(s): 309 Problem De 阅读全文
posted @ 2017-04-29 08:56 贱人方 阅读(1101) 评论(0) 推荐(0)
摘要:【题目链接】http://acm.hzau.edu.cn/problem.php?id=1207 【题意】给你一个字符串,然后两种操作:1,将区间L,R更新为A或者B,2,询问区间L,R最长的连续的B为多长。 【分析】典型线段树,每个节点维护该区间左边连续B的长度,右边连续B的长度,最长的连续B的长 阅读全文
posted @ 2017-04-23 23:16 贱人方 阅读(299) 评论(0) 推荐(0)
摘要:题目链接:http://acm.hzau.edu.cn/problem.php?id=1205 【题意】给你一串数,要求你找到两个数a[i],a[j],使得a[i]<=a[j]且j>=i且j-i最大。 【分析】预处理1~i的最小值,然后从右往左双指针,维护右端点>左端点,如果右端点<1~L的最小值, 阅读全文
posted @ 2017-04-23 23:10 贱人方 阅读(287) 评论(0) 推荐(0)
摘要:题目链接:http://acm.hzau.edu.cn/problem.php?id=1203 【题意】给你一颗完全二叉树每个节点都有一个权值,然后要你从上往下找一条链,值得链上权值的和<K,且节点数最大。 【分析】有两种做法:一种是在树上双指针,另一种是先求一下前缀和,当到i节点时前缀和<K,更新 阅读全文
posted @ 2017-04-23 23:04 贱人方 阅读(301) 评论(0) 推荐(0)
摘要:Little Red Riding Hood Time Limit: 1 Sec Memory Limit: 1280 MBSubmit: 853 Solved: 129[Submit][Status][Web Board] Description Once upon a time, there w 阅读全文
posted @ 2017-04-23 22:51 贱人方 阅读(213) 评论(0) 推荐(0)
摘要:Similarity of Subtrees Define the depth of a node in a rooted tree by applying the following rules recursively: The depth of a root node is 0. The dep 阅读全文
posted @ 2017-04-23 22:43 贱人方 阅读(798) 评论(0) 推荐(0)
摘要:Problem 2245 动态树 Accept: 17 Submit: 82Time Limit: 3000 mSec Memory Limit : 65536 KB Accept: 17 Submit: 82Time Limit: 3000 mSec Memory Limit : 65536 KB 阅读全文
posted @ 2017-04-21 13:41 贱人方 阅读(584) 评论(0) 推荐(0)
摘要:【题意】给你N个点,N条不同的边,Q次询问,求出u,v之间的最短路。 【分析】题意很简单,就是求最短路,但是Q次啊,暴力DIJ?当然不行,观察到这个题边的数目和点的数目是相同的,也就是说这个图是由一棵树加了一条边而形成的。而对于一棵树,如果有Q次询问最短路,那就可以用LCA来做,复杂度QlogN,但 阅读全文
posted @ 2017-04-15 18:36 贱人方 阅读(426) 评论(0) 推荐(0)
摘要:题目链接:http://oj.xjtuacm.com/problem/14/【分析】二元的逆序对应该都会求,可以用树状数组。这个题要求K元,我们可以看成二元的。我们先从后往前求二元逆序对数, 然后对于每一个数就可以求出在这个数后面的比他小的数的数量。然后我们再加一元时,当前扫到a[i],那么在树状数 阅读全文
posted @ 2017-04-14 18:05 贱人方 阅读(404) 评论(0) 推荐(0)
摘要:Given a tree with n vertices, we want to add an edge between vertex 1 and vertex x, so that the sum of d(1, v) for all vertices v in the tree is minim 阅读全文
posted @ 2017-04-13 15:01 贱人方 阅读(508) 评论(0) 推荐(0)
摘要:E. Holes time limit per test 1 second memory limit per test 64 megabytes input standard input output standard output Little Petya likes to play a lot. 阅读全文
posted @ 2017-04-06 17:12 贱人方 阅读(207) 评论(0) 推荐(0)
摘要:Haybale Guessing Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 2384 Accepted: 645 Description The cows, who always have an inferiority co 阅读全文
posted @ 2017-04-06 17:01 贱人方 阅读(656) 评论(0) 推荐(0)
摘要:Telephone Lines Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 6785 Accepted: 2498 Description Farmer John wants to set up a telephone lin 阅读全文
posted @ 2017-04-04 19:38 贱人方 阅读(293) 评论(0) 推荐(0)
摘要:Cow Contest Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 11129 Accepted: 6183 Description N (1 ≤ N ≤ 100) cows, conveniently numbered 1. 阅读全文
posted @ 2017-04-04 19:31 贱人方 阅读(222) 评论(0) 推荐(0)
摘要:Cell Phone Network Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 6781 Accepted: 2429 Description Farmer John has decided to give each of 阅读全文
posted @ 2017-04-04 19:11 贱人方 阅读(507) 评论(0) 推荐(0)
摘要:C. Arcade time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output C. Arcade time limit per test 1 阅读全文
posted @ 2017-04-04 18:59 贱人方 阅读(384) 评论(0) 推荐(0)
摘要:B. 2Trees time limit per test 0.75 seconds memory limit per test 256 megabytes input standard input output standard output You are given two trees wit 阅读全文
posted @ 2017-04-04 18:50 贱人方 阅读(217) 评论(0) 推荐(0)
摘要:E. GukiZ and GukiZiana time limit per test 10 seconds memory limit per test 256 megabytes input standard input output standard output Professor GukiZ 阅读全文
posted @ 2017-04-01 17:17 贱人方 阅读(192) 评论(0) 推荐(0)