自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 HDU 5521 Meeting (最短路SPFA+建立虚点)

MeetingTime Limit: 12000/6000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 5353    Accepted Submission(s): 1700Problem DescriptionBessie and her friend El...

2018-10-03 10:44:36 138

原创 HDU 5452 Minimun Cut (lca+dfs)

Minimum CutTime Limit: 3000/2000 MS (Java/Others)    Memory Limit: 65535/102400 K (Java/Others)Total Submission(s): 2449    Accepted Submission(s): 1160 Problem DescriptionGiven a simple unwei...

2018-10-01 10:35:56 166

原创 E-room (km) 带权二分图

链接:https://www.nowcoder.com/acm/contest/143/E来源:牛客网 题目描述Nowcoder University has 4n students and n dormitories ( Four students per dormitory). Students numbered from 1 to 4n.And in the first ye...

2018-09-27 18:59:39 222

原创 ACM-ICPC 2018 南京赛区网络预赛 J. Sum

A square-free integer is an integer which is indivisible by any square number except 11. For example, 6 = 2 \cdot 36=2⋅3 is square-free, but 12 = 2^2 \cdot 312=22⋅3 is not, because 2^222 is a square n...

2018-09-14 19:21:27 120

原创 L. Magical Girl Haze

There are NN cities in the country, and MM directional roads from uu to v(1\le u, v\le n)v(1≤u,v≤n). Every road has a distance c_ici​. Haze is a Magical Girl that lives in City 11, she can choose no m...

2018-09-14 18:49:02 184

原创 HDU 6447 YJJ's Salesman(线段树+DP+离散化)

Problem DescriptionYJJ is a salesman who has traveled through western country. YJJ is always on journey. Either is he at the destination, or on the way to destination.One day, he is going to travel...

2018-08-29 11:55:35 226

原创 UPCOJ 5065 Assigning Frequencies(DFS)

题目描述Bob wants to assign frequencies to n satellites, numbered from 0 to n − 1. Two distinct satellites are said to be adjacent if, when assigned the same frequency, they interfere with each other. S...

2018-08-28 10:38:30 129

原创 HDU 6437 VIDEO (最小费用最大流)

Problem L.VideosProblem DescriptionC-bacteria takes charge of two kinds of videos: ’The Collection of Silly Games’ and ’The Collection of Horrible Games’.For simplicity’s sake, they will be calle...

2018-08-26 11:41:40 190

原创 牛客网暑期ACM多校训练营(第九场) E-Music Game(思路+大数逆元)

链接:https://www.nowcoder.com/acm/contest/147/E来源:牛客网 题目描述Niuniu likes to play OSU!We simplify the game OSU to the following problem.Given n and m, there are n clicks. Each click may success o...

2018-08-18 10:14:45 316

原创 HDU 6406 Taotao Picks Apples(线段树+递归)

Problem DescriptionThere is an apple tree in front of Taotao's house. When autumn comes, n apples on the tree ripen, and Taotao will go to pick these apples.When Taotao picks apples, Taotao scans t...

2018-08-16 11:17:40 150

原创 K: 求和VII (lca+前缀和)

题目描述master对树上的求和非常感兴趣。他生成了一棵有根树,并且希望多次询问这棵树上一段路径上所有节点深度的k次方和,而且每次的k可能是不同的。此处节点深度的定义是这个节点到根的路径上的边数。他把这个问题交给了pupil,但pupil并不会这么复杂的操作,你能帮他解决吗?输入第一行包含一个正整数n,表示树的节点数。之后n−1行每行两个空格隔开的正整数i,j,表示树上的一条连接点i...

2018-08-11 11:15:41 283

原创 C-Bit Compression (暴力)

A binary string s of length N = 2n is given. You will perform the following operation n times :- Choose one of the operators AND (&), OR (|) or XOR (^). Suppose the current string is S = s1s2...s...

2018-08-10 10:52:45 230

原创 HDU 4734 F(x) (数位DP)

F(x)Time Limit: 1000/500 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Problem DescriptionFor a decimal number x with n digits (AnAn-1An-2 ... A2A1), we define its weight as F(x) ...

2018-08-09 16:03:18 84

原创 HDU 2089 不要62 (基础数位DP)

不要62Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 56498    Accepted Submission(s): 21941 Problem Description杭州人称那些傻乎乎粘嗒嗒的人为62(音:laoer)...

2018-08-09 11:32:35 91

原创 Codeforces 617E XOR and Favorite Number

6759: 异或序列题目描述已知一个长度为n的整数数列a1,a2,…,an,给定查询参数l、r,问在al,al+1,…,ar区间内,有多少子序列满足异或和等于k。也就是说,对于所有的x,y(l≤x≤y≤r),满足ax⊕ax+1⊕⋯⊕ay=k的x,y有多少组。输入输入第一行为3个整数n,m,k。第二行为空格分开的n个整数,即a1,a2,…,an。接下来m行,每行两个整数lj,rj,代...

2018-08-09 11:07:34 115

原创 重庆OI2018 九连环

问题 H: 九连环时间限制: 1 Sec  内存限制: 128 MB题目描述九连环是一种源于中国的传统智力游戏。如图所示,九个圆环套在一把“剑”上,并且互相牵连。游戏的目标是把九个圆环从“剑”上卸下。圆环的装卸需要遵守两个规则。第一个(最右边)环任何时候都可以装上或卸下。如果第k个环没有被卸下,且第k个环右边的所有环都被卸下,则第k+1个环(第k个环左边相邻的环)可以任意装...

2018-08-08 10:42:33 162

原创 J- Beautiful Numbers

 题目描述NIBGNAUK is an odd boy and his taste is strange as well. It seems to him that a positive integer number is beautiful if and only if it is divisible by the sum of its digits.We will not argu...

2018-08-07 10:37:35 169

原创 【BZOJ】ARC083 E - Bichrome Tree

题目描述We have a tree with N vertices. Vertex 1 is the root of the tree, and the parent of Vertex i (2≤i≤N) is Vertex Pi.To each vertex in the tree, Snuke will allocate a color, either black or white,...

2018-08-03 11:08:48 224

原创 牛客网第五场-A gpa 01分数规划

 Kanade selected n courses in the university. The academic credit of the i-th course is s[i] and the score of the i-th course is c[i].At the university where she attended, the final score of her i...

2018-08-02 23:26:07 97

原创 HDU 6319 Ascending Rating

Problem DescriptionBefore the start of contest, there are n ICPC contestants waiting in a long queue. They are labeled by 1 to n from left to right. It can be easily found that the i-th contestant's...

2018-07-30 21:38:43 260

原创 AtCoder Regular Contest 082 F-UPC 6604 Sandglass

题目描述We have a sandglass consisting of two bulbs, bulb A and bulb B. These bulbs contain some amount of sand. When we put the sandglass, either bulb A or B lies on top of the other and becomes the up...

2018-07-30 10:29:24 130

原创 牛客网暑期ACM多校训练营(第四场) A Ternary String (欧拉降幂+递归)

链接:https://www.nowcoder.com/acm/contest/142/A题目描述A ternary string is a sequence of digits, where each digit is either 0, 1, or 2.Chiaki has a ternary string s which can self-reproduce. Every seco...

2018-07-29 15:31:32 151

原创 UPC 5725 小奇画画

题目描述红莲清泪两行欲吐半点却无如初是你杳然若绯雾还在水榭畔画楼处是谁衣白衫如初谁红裳如故——《忆红莲》小奇想画几朵红莲,可惜它刚开始学画画,只能从画圆开始。小奇画了n个圆,它们的圆心都在x轴上,且两两不相交(可以相切)。现在小奇想知道,它画的圆把画纸分割成了多少块?(假设画纸无限大)输入第一行包括1个整数n。接下来n行,每行两个整数x,r,表示小奇画了圆心在(x,0),半径...

2018-07-29 10:52:42 246 3

原创 UPC 6358: 庭师的利刃

6358: 庭师的利刃时间限制: 1 Sec  内存限制: 128 MB题目描述作为白玉楼的庭师,妖梦虽然不会n刀流,但是却领悟了生命二刀流。然而我也是个剑的收藏者,家里屯着n把剑,每一把剑都有一个灵魂值a[i],由于一些剑之间可能有共鸣,所以我需要两把契合度最高的剑。据妖梦所说,两把编号为i,j剑的契合度为a[i] and a[j]。如何深得剑的灵魂呢?(即求最大值)输入第一...

2018-07-28 09:54:32 105

空空如也

空空如也

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

TA关注的人

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