自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 2023/2/27 leetcode

leetcode

2023-02-27 17:35:11 96 1

原创 hdu6653 Halt Hater

题目描述Cuber QQ has recently won a million dollars and bought a new car. He is now driving in the Infinite City and he doesn't want his car to stop, ever!The Infinite City, looks like an infinite grid...

2019-08-28 09:40:46 221

原创 Distribution of books

题目描述zz6d likes reading very much, so he bought a lot of books. One day, zz6d brought n books to a classroom in school. The books of zz6d is so popular that K students in the classroom want to borrow...

2019-08-27 10:11:02 187

转载 2019牛客暑期多校训练营(第八场)J.Just Jump

题意有一条长为L LL的河,你在位置0 00你要通过这条长为L LL的河到达L LL,河中从Unexpected text node: ' 'Unexpected text node: ' '1,2,3,⋯,L−1有石子可以踩上去通过,你每一次所走的距离必须要大于等于d dd,并且还存在m mm次攻击,每一次攻击由二元组(ti,pi) (...

2019-08-17 10:53:11 139

原创 Competition Day

题目描述Matt, Nick and Tim are all best friends who flat together and regularly compete in programming competitions. A big competition is coming up, and as Matt recently learned C# he would like to show...

2019-08-16 09:54:10 187

原创 Nonsense Time

题目描述You a given a permutation p1,p2,…,pn of size n. Initially, all elements in p are frozen. There will be n stages that these elements will become available one by one. On stage i, the element pki ...

2019-08-13 10:47:01 122

原创 Carrying Out A Task

题目描述During the process of the military exercise, there is a ship on the sea level .The ship will go to certain place to carry out a task. For every action, the ship has two ways to sail. They are no...

2019-08-13 10:37:55 249

原创 Mining Station on the Sea

题目描述The ocean is a treasure house of resources and the development of human society comes to depend more and more on it. In order to develop and utilize marine resources, it is necessary to build mi...

2019-08-08 09:45:01 161

原创 Array Without Local Maximums

题目描述Ivan unexpectedly saw a present from one of his previous birthdays. It is array of n numbers from 1 to 200. Array is old and some numbers are hard to read. Ivan remembers that for all elements a...

2019-08-07 09:42:20 108

原创 Count Numbers

题目描述Now Alice wants to sum up all integers whose digit sum is exactly ab.However we all know the number of this kind of integers are unlimited. So she decides to sum up all these numberswhose eac...

2019-08-06 10:32:53 155

原创 Twenty Four, Again

题目描述Yes, we know . . . we’ve used Challenge 24 before for contest problems. In case you’ve never heard of Challenge 24 (or have a very short memory) the object of the game is to take 4 given numbers...

2019-08-06 10:32:34 168

原创 SUM

A square-free integer is an integer which is indivisible by any square number except11. For example,6 = 2 \cdot 36=2⋅3is square-free, but12 = 2^2 \cdot 312=22⋅3is not, because2^222is a square n...

2019-08-06 10:32:19 83

原创 Split The Tree

题目描述You are given a tree with n vertices, numbered from 1 to n. ithvertex has a value wiWe define the weight of a tree as the number of different vertex value in the tree.If we delete one edge in...

2019-08-06 10:31:10 124

原创 Master of Random

题目描述Hakase provides Nano with a problem. There is a rooted tree with values on nodes. For each query,you are asked to calculate the sum of the values in the subtree. However, Nano is a rookie so she...

2019-08-06 10:30:50 83

原创 Master of Sequence

题目描述There are two sequences a1,a2,...,an , b1,b2,...,bn . Let. There are m operations within three kinds as following:• 1 x y: change value ax to y.• 2 x y: change value bx to y.• 3 k: ask min{t...

2019-08-06 10:30:41 97

原创 Working Plan

题目描述ICPC manager plans a new project which is to be carried out for n days. In this project, m persons numbered from 1 to m are supposed to work. Each day j (1 ≤ j ≤ n) requires dj persons, and each...

2019-08-06 10:30:27 153

原创 杭电6629string matching

题目描述String matching is a common type of problem in computer science. One string matching problem is as following:Given a string s[0…len−1], please calculate the length of the longest common prefix ...

2019-08-06 10:29:43 175

原创 Divide the Stones

题目描述There are n stones numbered from 1 to n.The weight of the i-th stone is i kilograms. We divide the stones into k groups.Each group consists of exactly stones.We define the weight of each grou...

2019-08-06 10:09:47 331

原创 Modular Production Line

题目描述An automobile factory has a car production line. Now the market is oversupply and the production line is often shut down. To make full use of resources, the manager divides the entire production...

2019-08-03 11:01:54 159

原创 K Subsequence

题目描述Master QWsin is dating with Sindar. And now they are in a restaurant, the restaurant has n dishes in order. For each dish, it has a delicious value ai. However, they can only order k times. QWsi...

2019-08-03 09:54:57 244

原创 Find the answer

题目描述Given a sequence of n integers called W and an integer m. For each i (1 <= i <= n), you can choose some elements Wk (1 <= k < i), and change them to zero to makeSo what's the minim...

2019-08-02 10:01:40 322

原创 Longest Subarray

题目描述You are given two integers C,K and an array of N integers a1,a2,...,aN. It is guaranteed that the value of ai is between 1 to C.We define that a continuous subsequence al,al+1,...,ar(l≤r) of ar...

2019-08-01 20:30:10 248

原创 回文树----------I Love Palindrome String

题目描述You are given a string S=s1s2..s|S|containing only lowercase English letters. For each integer i∈[1,|S|] , please output how many substrings slsl+1...srsatisfy the following conditions:∙ r−l+...

2019-08-01 20:29:58 246

原创 Operation

题目描述There is an integer sequence a of length n and there are two kinds of operations:0 l r: select some numbers from al...ar so that their xor sum is maximum, and print the maximum value.1 x: appe...

2019-08-01 20:29:49 232

原创 路哥从不低头

题目描述路哥是云南中医学院大一新生,对路哥来说任何人任何物都只是他的道具而已。过程不重要,只要最后胜利是属于路哥的。路哥每次出完手就把这锅扔给别人。而他自己,深藏功与名,事了拂衣去。毕竟,深藏不露是一种卓越的才能。某天,路哥被班主任叫去清理海报。这里有一块宽为W,高为H的海报栏。以左下角为原点建立直角坐标系。第i张贴上去的海报左下角为(x1_i,y1_i),右上角为(x2_i,y...

2019-08-01 20:29:39 81

原创 10551: 排队

题目描述聪明的海狸先生病了,所以他得去看医生。医生叫海狸先生去照心电图,但是心电图室门前排起了好长的队。海狸先生只好跟着排了队。站了3小时后,聪明的海狸先生发现很多人并不清楚谁应该站在他们自己前面,这可导致队伍变得一团糟。于是海狸先生数了下,发现队伍中包括他自己一共有n个人,他将这些人从1到n编号,同时他记自己的编号为x。之后,他走到每个人面前,问他在队伍中他前面应该是谁。当然,有人是不知道...

2019-08-01 20:29:30 133

原创 10543: 孤岛症候群

题目描述古泉带着SOS团去孤岛合宿!但在一天早上,房间的主人被人用刀捅死在了房间里。春日拿出房间的地图。房间是一个n×m的网格图,其中一些位置是障碍。在房间的一角发现了一个由L/R/U/D 构成的字符串。这显然表示着凶手的移动路径,L, R, U, D分别表示左、右、上、下。大门在网格图的左上方,因而路径的出发点是左上方的格子。然而,这个路径并不一定“合法”。一个路径是不合法的,如果在某一时...

2019-08-01 20:29:21 510

原创 Mishka and Interesting sum

题目描述初始给定n个卡片拍成一排,其中第i个卡片上的数为x[i]。有q个询问,每次询问给定L和R表示,询问的区间【L,R】内的卡片所有出现了偶数次的数的异或和是多少。输入输入一行两个整数n,q。第二行n个整数,第i个数为x[i]。接下来q行,每行两个整数L和R,表示询问的区间。输出输出q行,其中第i行表示第i次询问的区间出现偶数次的数的异或和。...

2019-08-01 20:29:11 68

原创 10760: 小迟的数字I

题目描述小迟喜欢上了一些数字。如果一个数字的十进制表示中,有大于等于1个1,或者有大于等于2个2,或者有大于等于3个3,或者有大于等于4个4,或者有大于等于5个5,或者有大于等于6个6,或者有大于等于7个7,或者有大于等于8个8,或者有大于等于9个9,小迟会认为这个数字是good number。现在小迟想数一数在L到R之间(包含L和R)有多少个good number。输入一行两...

2019-08-01 20:28:53 93

原创 10801: 帝国交通

题目描述围绕新校的操场建有m(1到1000)个蚂蚁王国,根据相邻关系依次编号为1..m。其中有n(1到10000)对王国的国王之间有亲戚关系,有亲戚关系的王国需要有道路相通(可以以其它王国作为中转),任何一条道路只能建在相邻的两个王国之间,求出至少需要建多少条道路才能满足这n对王国的需求。输入说明:第1行 m n ;第2行到第n+1行,每行两个数字,描述有亲戚关系的两个王国编号。...

2019-08-01 20:28:51 62

原创 Master of Phi

题目描述You are given an integer n. Please output the answer of modulo 998244353. n is represented in the form of factorization.φ(n) is Euler’s totient function, and it is defi ned more formally as t...

2019-08-01 20:28:38 82

原创 Polynomial Divisors

题目描述You are given a polynomial of degree N with integer coefficients:f(x)=aNxN+aN−1xN−1+...+a0. Find all prime numbers p that dividef(x) for every integer x.Constraints0≤N≤104|ai|≤109(0≤i≤N)...

2019-08-01 20:23:30 161

原创 调酒壶里的酸奶 19赛季备战省赛

题目描述最近小w学了一手调酒的技巧,这么帅的操作,说不定能靠这个俘获女神的芳心,为了在女神面前露一手,他想在学校里建一个"pub",但是显然学校不可能让他真的建一个"pub",那么他退而求次,想建一个"Yogurt shop",不能用酒,那用酸奶也行啊!今天女神终于来光顾小w的酸奶店了!兴奋的小w拿出自己准备已久每天都仔细擦干净的装备——调酒壶、果汁机、隔冰器和计量杯、砧板、小刀....准备...

2019-04-03 09:50:07 110

原创

题目描述某乔为了解花的生长习性,采集了很多春花来研究。但其中混杂了一些普通的花,为了区别它们,某乔研究出春花的一些特征:春花有S种形态,每天都会展现出某种形态。在N天中,如果有且仅有一次:连续3天都是某种形态,那么它就是一朵春花。例如:假设每天的形态分别为:AABBBC,那么这就是一朵春花。但例如:AAABCDDDEEF,AABBBBC,YHNDSB就不是春花。第一个因为A和D各有1次...

2019-01-22 20:02:59 104

原创 Spell Boost

题目描述Shadowverse is a funny card game. One day you are playing a round of this game.You have n cards, each with two attributes wi and xi. If you use card i, you will cost wi points of power and caus...

2018-10-04 19:36:16 242

原创 Lattice's basics in digital electronics

LATTICE is learning Digital Electronic Technology. He is talented, so he understood all those pieces of knowledge in 10^{-9}10−9 second. In the next 10^{-9}10−9 second, he built a data decoding device...

2018-10-04 19:35:40 108

原创 Rectilinear Regions

题目描述A rectilinear path connecting two points in the plane is a path consisting of only horizontal and vertical line segments. A rectilinear path is said to be monotone with respect to the x-axis (re...

2018-10-04 19:35:11 293

原创 Ka Chang

Given a rooted tree ( the root is node 11 ) of NN nodes. Initially, each node has zero point.Then, you need to handle QQ operations. There're two types:1\ L\ X1 L X: Increase points by XX of all n...

2018-09-13 17:30:13 199

原创 计蒜客 Fantastic Graph

"Oh, There is a bipartite graph.""Make it Fantastic."X wants to check whether a bipartite graph is a fantastic graph. He has two fantastic numbers, and he wants to let all the degrees to between the...

2018-09-13 16:09:20 129

原创 Similar Strings

题目描述Putting two similar strings together will create a very strong power that can quake the earth into parts and the person who did that can be called the Destroyer of the World. In order to stop th...

2018-09-05 20:40:47 591

空空如也

空空如也

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

TA关注的人

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