自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(88)
  • 收藏
  • 关注

转载 【17.12.22.B】

B题面描述:给一个长度为n的序列,a[1], a[2], ... , a[n], 选出连续的k个数,使得这k个数的最大值加这k个数的or值最大。假设选出的数为a[l], a[l + 1], ... , a[l + k -1],即求max(a[l], a[l + 1], ... , a[l + k -1]) + (a[l] | a[l + 1] | ... | a[l...

2018-01-01 16:01:00 327

转载 【bzoj2756 奇怪的游戏】

Time Limit:40 Sec Memory Limit:128 MBSubmit:4403 Solved:1226[Submit][Status][Discuss]DescriptionBlinker最近喜欢上一个奇怪的游戏。这个游戏在一个 N*M 的棋盘上玩,每个格子有一个数。每次 Blinker 会选择两个相邻的格子,并使这两个数都加上 1。现在 B...

2018-01-01 15:26:00 214

转载 【2017.12.22.A】

A题面:给一个n个点m条边的无向图,你可以选择一个点作为起点,然后沿着图中的边开始走,走的过程中,同一条边不能经过两次(相反的方向也不行)。最后你要回到起点。假设你走了x条边,有两个问题:Q1:x 是否可以为奇数?Q2:x 是否可以为偶数?输入:第一行读入两个数 n 和 m,分别表示图的点数和边数。接下来...

2017-12-31 17:56:00 150

转载 【BZOJ 2754 喵星球上的点名】

Time Limit:20 Sec Memory Limit:128 MBSubmit:2512 Solved:1092[Submit][Status][Discuss]Descriptiona180285幸运地被选做了地球到喵星球的留学生。他发现喵星人在上课前的点名现象非常有趣。 假设课堂上有N个喵星人,每个喵星人的名字由姓和名构成。喵星球上的老师会选择M个...

2017-12-31 16:58:00 89

转载 【BZOJ 2753 滑雪与时间胶囊】

Time Limit:50 Sec Memory Limit:128 MBSubmit:2843 Solved:993[Submit][Status][Discuss]Descriptiona180285非常喜欢滑雪。他来到一座雪山,这里分布着M条供滑行的轨道和N个轨道之间的交点(同时也是景点),而且每个景点都有一编号i(1<=i<=N)和一高度Hi。...

2017-12-31 16:47:00 91

转载 【NOIP2017 D1 T1 小凯的疑惑】

题目描述小凯手中有两种面值的金币,两种面值均为正整数且彼此互素。每种金币小凯都有 无数个。在不找零的情况下,仅凭这两种金币,有些物品他是无法准确支付的。现在小 凯想知道在无法准确支付的物品中,最贵的价值是多少金币?注意:输入数据保证存在 小凯无法准确支付的商品。输入输出格式输入格式:输入数据仅一行,包含两个正整数aa和bb,它们之间用一个空格隔开,表示小...

2017-12-02 09:30:00 173

转载 【luogu 1439 最长公共子序列】

题目描述给出1-n的两个排列P1和P2,求它们的最长公共子序列。输入输出格式输入格式:第一行是一个数n,接下来两行,每行为n个数,为自然数1-n的一个排列。输出格式:一个数,即最长公共子序列的长度输入输出样例输入样例#1: 复制5 3 2 1 4 51 2 3 4 5输出样例#1: 复制3说明【数据规模】对于50%的...

2017-11-09 09:08:00 106

转载 【BZOJ 4500 矩阵】

Time Limit: 1 Sec Memory Limit: 256 MBSubmit: 390 Solved: 217[Submit][Status][Discuss]Description有一个n*m的矩阵,初始每个格子的权值都为0,可以对矩阵执行两种操作:1. 选择一行, 该行每个格子的权值加1或减1。2. 选择一列, 该列每个格子的权值加1或减1。现在有...

2017-11-08 18:13:00 118

转载 【BZOI 1202 狡猾的商人】

Time Limit: 10 Sec Memory Limit: 162 MBSubmit: 4149 Solved: 1994[Submit][Status][Discuss]Description刁姹接到一个任务,为税务部门调查一位商人的账本,看看账本是不是伪造的。账本上记录了n个月以来的收入情况,其中第i 个月的收入额为Ai(i=1,2,3...n-1,n), 。当 A...

2017-11-08 15:43:00 70

转载 【POJ 3169 Layout】

Time Limit: 1000MSMemory Limit: 65536K Total Submissions: 12565Accepted: 6043 Description Like everyone else, cows like to stand close to their friends when queuing for feed. FJ has N (2 <= N ...

2017-11-07 10:54:00 59

转载 【POJ 2572 Advertisement】

Time Limit: 1000MSMemory Limit: 10000KTotal Submissions: 947Accepted: 345Special JudgeDescriptionThe Department of Recreation has decided that it must be more profitable, and it wants to se...

2017-11-07 07:51:00 120

转载 【POJ 1201 Intervals】

Time Limit: 2000MSMeamory Limit: 65536KTotal Submissions: 27949Accepted: 10764DescriptionYou are given n closed, integer intervals [ai, bi] and n integers c1, ..., cn.Write a program that:r...

2017-11-06 19:57:00 54

转载 【模拟赛·岛屿】

【问题描述】从前有一座岛屿,这座岛屿是一个长方形,被划为 N*M 的方格区域,每个区域都有一个确定的高度。不幸的是海平面开始上涨,在第 i 年,海平面的高度为 t[i]。如果一个区域的高度小于等于海平面高度,则视为被淹没。那些没有被淹没的连通的区域够成一个连通块。现在问第 i 年,这样的连通块有多少个。例如:第一年海平面高度为 1,有 2 个连通块。第二年海平面高度为 2,有 3 个...

2017-11-06 15:14:00 97

转载 【模拟赛·食物中毒】

背景 WZOI的小组成员今天集体食物中毒,什么事情也不能干了,这是一件十分可怕的事。幸亏WZOI的Bqc同志十分在行化学,他可以马上制作出解药来…… 问题描述 Bqc经过一段时间的研究发现,要解这种毒需要一种特殊的药物。不幸的是,这种药物在市面上不存在,没有办法Bqc只好亲自制得这种药物。它含有M种化学物质A1,A2,…,AM。现在Bqc的手上有N种药材(每种药材只有一种),...

2017-11-03 14:50:00 95

转载 【ZJ选讲·画山】

给出一张纸(N × M),你要在上面画山,但不能画出界(N,M<=100) Like this: 起点为(0,0),终点为(N,0) 给出w种线段画法(x,y),表示用了这种画法后,笔迹末端点从(a,b)->(a+x,b+y) (好吧,还是叫它向量吧)(x > 0) 每种画法可以用无数次,问可以画出多少种形状不同的山。【题解】...

2017-11-02 10:38:00 97

转载 【ZJ选讲·字符串折叠】

给一个字符串(len<=100) 把这个字符串折叠(就是压缩) 记 X(子串) 表示重复 X次该子串 比如 3(orz)  orzorzorz  来点神奇例子: AAAAAAAAAABABABCCD  9(A)3(AB)CCD  NEERCYESYESYESNEERCYESYESYES  2(NEERC3(YES)) 【题解】...

2017-11-02 10:35:00 142

转载 【ZJ选讲·压缩】

给一个由小写字母组成的字符串(len<=50) 我们可以用一种简单的方法来压缩其中的重复信息。 用M,R两个大写字母表示压缩信息 M标记重复串的开始, R表示后面的一段字符串重复从上一个M到R之前的那一段。 (一开始字符串最前面有一个不用写出来的M) 来点神奇例子: abcabcdabcabcdxyxyz  abcRdRMxyRz  问压缩后的...

2017-11-02 10:33:00 83

转载 【ZJ选讲·调整】

给出n个点,m条有向边(带正权),起点S,终点T。(n<=2000,m<=30000) 再给出一个k,表示可以把最多k条边的权值调整为任意非负整数。(k<=100) 问是否可以通过上面的骚操作使得S->T最短路==给定的长度c  保证最开始的S->T的最短路大于c【题解】 ①建立分层图,分层取决于修改边数 ...

2017-11-02 10:25:00 84

转载 【ZJ选讲·钻石游戏】

N×M的棋盘(M,N<=500)中,每个格子有一个颜色(颜色数1~9) P次操作(P<=1000),每次给出两个相邻的位置(保证颜色不同,两个格子有一条公共边),把这两个格子交换。 定义每次交换的分值为:通过这次交换能够形成的最大矩形的面积。 求每次操作后的分值。【题解】 ①预处理类似于悬线法,维护u,d,l,r ②由...

2017-11-02 10:20:00 115

转载 【ZJ选讲·BZOJ 5073】

小A的咒语 给出两个字符串A,B (len<=105) 现在可以把A串拆为任意段,然后取出不超过 x 段,按在A串中的前后顺序拼接起来 问是否可以拼出B串。【题解】 ①如果遇上dp空间会炸,可以将那一维状态存入f[]中 ②f[i][j]表示A串1~i位已经取出了x段,能够匹配B的最远位置的B的下标。 ③没有后效性...

2017-11-02 10:15:00 69

转载 【ZJ选讲·BZOJ 5071】

小A的数字 有一串数字A1 ,A2,……,An,每次可以进行如下骚操作: 选择一个数字i,将(Ai-1,Ai,Ai+1)变为(Ai-1+Ai,-Ai,Ai+1+Ai), (特别地,若i=N,则(An-1,An)变为(An-1+An,-An )。) 问是否可以通过若干次操作,使得序列变为给定的B1 ,B2 ,……,Bn  N<=105 【题解】 ①分析变...

2017-11-02 09:06:00 68

转载 【模拟赛·polyline】

Input file: polyline.in Output file: polyline.out Time limit: 1s Memory limit: 128M 有若⼲个类似于下⾯的函数: 定义 n 个函数 y1(x), ..., yn(x) 的对于任意 x 的总和 s(x) = y1(x) + ... + yn(x),很容易发现 s(x) 的图象是多段线组成。给你...

2017-11-02 07:58:00 62

转载 【BZOJ 2744 朋友圈】

Time Limit: 30 Sec Memory Limit: 128 MBSubmit: 1570 Solved: 532[Submit][Status][Discuss] Description 在很久很久以前,曾经有两个国家和睦相处,无忧无虑的生活着。一年一度的评比大会开始了,作为和平的两国,一个朋友圈数量最多的永远都是最值得他人的尊敬,所以现在就是需要你求朋友圈的最大数目。...

2017-11-01 17:49:00 69

转载 【BZOJ 2241 打地鼠】

Time Limit: 10 Sec Memory Limit: 512 MBSubmit: 1430 Solved: 908[Submit][Status][Discuss]Description打地鼠是这样的一个游戏:地面上有一些地鼠洞,地鼠们会不时从洞里探出头来很短时间后又缩回洞中。玩家的目标是在地鼠伸出头时,用锤子砸其头部,砸到的地鼠越多分数也就越高。游戏中的锤子...

2017-10-29 09:31:00 75

转载 【CF edu 30 D. Merge Sort】

time limit per test 2 secondsmemory limit per test 256 megabytesinput standard inputoutput standard outputMerge sort is a well-known sorting algorithm. The main function that sorts the el...

2017-10-28 16:17:00 116

转载 【CF edu 30 C. Strange Game On Matrix】

time limit per test 1 secondmemory limit per test 256 megabytesinput standard inputoutput standard outputIvan is playing a strange game.He has a matrix a with n rows and m columns. Eac...

2017-10-27 21:48:00 135

转载 【Cf edu 30 B. Balanced Substring】

time limit per test 1 secondmemory limit per test 256 megabytesinput standard inputoutput standard outputYou are given a string s consisting only of characters 0 and 1. A substring [l, r]...

2017-10-27 21:43:00 102

转载 【CF edu 30 A. Chores】

time limit per test 2 secondsmemory limit per test 256 megabytesinput standard inputoutput standard outputLuba has to do n chores today. i-th chore takes ai units of time to complete. It ...

2017-10-27 21:40:00 72

转载 【HDU 4300 Clairewd’s message】

Clairewd is a member of FBI. After several years concealing in BUPT, she intercepted some important messages and she was preparing for sending it to ykwd. They had agreed that each letter of thes...

2017-10-23 07:56:00 63

转载 【最小得分和】

[题目描述] 给定一个长度为 N 的正整数序列{ܽܰ},设数对(i,j)的得分 Sij=|ai-aj|,你需要找出 K 对数,使得这 K 对数的得分之和最小。 [输入格式] 第一行有两个正整数 N,K,如题所述。接下来一行有 N 个正整数,表示序列中的数。 [输出格式] 只有一个数,表示最小的得分之和。 [样例输入] 5 5 5 3 1 4 2 [样例输出] ...

2017-10-21 15:06:00 1975

转载 【CF MEMSQL 3.0 E. Desk Disorder】

time limit per test 2 secondsmemory limit per test 256 megabytesinput standard inputoutput standard outputA new set of desks just arrived, and it's about time! Things were getting quite c...

2017-10-20 21:47:00 105

转载 【CF MEMSQL 3.0 D. Third Month Insanity】

time limit per test 2 secondsmemory limit per test 256 megabytesinput standard inputoutput standard outputThe annual college sports-ball tournament is approaching, which for trademark rea...

2017-10-20 21:40:00 104

转载 【CF MEMSQL 3.0 C. Pie Rules】

time limit per test 2 secondsmemory limit per test 256 megabytesinput standard inputoutput standard outputYou may have heard of the pie rule before. It states that if two people wish to f...

2017-10-20 21:29:00 95

转载 【CF MEMSQL 3.0 B. Lazy Security Guard】

time limit per test 2 secondsmemory limit per test 256 megabytesinput standard inputoutput standard outputYour security guard friend recently got a new job at a new security company. The ...

2017-10-20 21:21:00 118

转载 【CF MEMSQL 3.0 A. Declined Finalists】

time limit per test 2 secondsmemory limit per test 256 megabytesinput standard inputoutput standard outputThis year, as in previous years, MemSQL is inviting the top 25 competitors from t...

2017-10-20 21:17:00 198

转载 【CF Round 434 B. Which floor?】

time limit per test 1 secondmemory limit per test 256 megabytesinput standard inputoutput standard outputIn a building where Polycarp lives there are equal number of flats on each floor. ...

2017-10-20 14:22:00 117

转载 【CF Round 434 A. k-rounding】

Time limit per test1 secondmemory limit per test 256 megabytesinput standard inputoutput standard outputFor a given positive integer n denote its k-rounding as the minimum positive int...

2017-10-20 14:16:00 107

转载 【BZOJ 2460 元素】

Time Limit: 20 Sec Memory Limit: 128 MBSubmit: 1555 Solved: 809[Submit][Status][Discuss]Description 相传,在远古时期,位于西方大陆的 Magic Land 上,人们已经掌握了用魔法矿石炼制法杖的技术。那时人们就认识到,一个法杖的法力取决于使用的矿石。一般地,矿石越多则法力越强...

2017-10-19 14:57:00 73

转载 【BZOJ 4057 Kingdoms】

Time Limit: 10 Sec Memory Limit: 128 MBSubmit: 450 Solved: 187[Submit][Status][Discuss]Description有一些王国陷入了一系列的经济危机。在很多年以前,他们私底下互相借了许多钱。现在,随着他们的负债被揭发,王国的崩溃不可避免地发生了……现在有n个王国,对于每对王国A和B,A欠B的钱被记...

2017-10-19 12:23:00 77

转载 【CF edu 27 G. Shortest Path Problem?】

time limit per test 3 secondsmemory limit per test 512 megabytesinput standard inputoutput standard outputYou are given an undirected graph with weighted edges. The length of some path be...

2017-10-19 11:27:00 51

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除