![](https://img-blog.csdnimg.cn/2019091813595558.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
二分
文章平均质量分 87
二分
_sky123_
这个作者很懒,什么都没留下…
展开
-
2021CCPC河南省赛 G.数“X“
题目链接题目描述小辣有一个高为 nnn 宽为 nnn 的矩阵,小辣特别喜欢字母 “X” ,所以小辣想知道这个矩阵中有多少个 “X” 。具体地说,请统计有多少个高与宽相等的子矩阵,满足子矩阵的高与宽为奇数,且主对角线上的所有数互不相同,并且副对角线上的所有数也互不相同。输入第一行一个正整数 TTT , 表示数据组数。对于每组数据:第一行输入一个正整数 nnn ,表示矩阵的高与宽。接下来的 nnn 行,每行输入 nnn 个正整数 aija_{ij}aij,表示矩阵中的数。数据保证 1≤n≤原创 2021-11-02 16:24:05 · 354 阅读 · 2 评论 -
Educational Codeforces Round 111 E. Stringforces
题目链接You are given a string sss of length nnn. Each character is either one of the first kkk lowercase Latin letters or a question mark.You are asked to replace every question mark with one of the first kkk lowercase Latin letters in such a way that the f原创 2021-07-28 13:06:57 · 121 阅读 · 0 评论 -
关押罪犯
题目描述S城现有两座监狱,一共关押着N名罪犯,编号分别为1−N。他们之间的关系自然也极不和谐。很多罪犯之间甚至积怨已久,如果客观条件具备则随时可能爆发冲突。我们用“怨气值”(一个正整数值)来表示某两名罪犯之间的仇恨程度,怨气值越大,则这两名罪犯之间的积怨越多。如果两名怨气值为 c 的罪犯被关押在同一监狱,他们俩之间会发生摩擦,并造成影响力为c的冲突事件。每年年末,警察局会将本年内监狱中的所有冲...原创 2019-12-28 21:13:30 · 170 阅读 · 0 评论 -
Codeforces Round #707 (Div. 1) E. Subset Trick
题目链接Vanya invented an interesting trick with a set of integers.Let an illusionist have a set of positive integers SSS. He names a positive integer xxx. Then an audience volunteer must choose some subset (possibly, empty) of SSS without disclosing it to t原创 2021-03-26 20:39:01 · 157 阅读 · 0 评论 -
Educational Codeforces Round 76 (Rated for Div. 2) D. Yet Another Monster Killing Problem
题目链接You play a computer game. In this game, you lead a party of mmm heroes, and you have to clear a dungeon with nnn monsters. Each monster is characterized by its power aia_iai. Each hero is characterized by his power pip_ipi and endurance sis_isi.Th原创 2021-03-12 08:33:53 · 129 阅读 · 0 评论 -
Educational Codeforces Round 87 (Rated for Div. 2) G. Find a Gift
题目链接This is an interactive problem. Don’t forget to flush output after printing queries using cout.flush() or fflush(stdout) in C++ or similar functions in other programming languages.There are nnn gift boxes in a row, numbered from 111 to nnn from left原创 2021-02-23 19:30:16 · 186 阅读 · 0 评论 -
Codeforces Round #703 (Div. 2) D. Max Median
题目链接You are a given an array aaa of length nnn. Find a subarray a[l..r]a[l..r]a[l..r] with length at least kkk with the largest median.A median in an array of length nnn is an element which occupies position number ⌊n+12⌋\lfloor \frac{n + 1}{2} \rfloor⌊2原创 2021-02-19 19:29:54 · 164 阅读 · 0 评论 -
Educational Codeforces Round 27 E. Fire in the City
题目链接The capital of Berland looks like a rectangle of size n × mn × mn × m of the square blocks of same size.Fire!It is known that k + 1k + 1k + 1 blocks got caught on fire (k + 1 ≤ n⋅m)(k + 1 ≤ n·m)(k + 1 ≤ n⋅m). Those blocks are centers of ignition. Mo原创 2021-02-10 23:57:34 · 250 阅读 · 0 评论 -
Educational Codeforces Round 101 (Rated for Div. 2) F. Power Sockets
// We decided to drop the legend about the power sockets but feel free to come up with your own :^)Define a chain:a chain of length 111 is a single vertex;a chain of length xxx is a chain of length x−1x-1x−1 with a new vertex connected to the end of it原创 2021-01-30 09:31:28 · 159 阅读 · 0 评论 -
2020ICPC小米网络赛第二场 A.2020
题目链接题目描述Bobo has a string s1…sns_1 \dots s_ns1…sn of length nnn consisting of only digits 0,10, 10,1, and 222, and he wants to pick some disjoint subsequences which equal to 202020202020, as many as possible.Formally, Bobo would like to find kkk quadr原创 2021-01-01 18:19:22 · 286 阅读 · 0 评论 -
Codeforces Round #686 (Div. 3) F. Array Partition
题目链接You are given an array aaa consisting of nnn integers.Let min(l,r)\min(l,r)min(l,r) be the minimum value among al,al+1,…,ara_l, a_{l + 1}, \ldots, a_ral,al+1,…,ar and max(l,r)\max(l,r)max(l,r) be the maximum value among al,al+1,…,ara_l, a_{l + 1原创 2020-12-03 23:38:04 · 234 阅读 · 0 评论 -
2020 Multi-University Training Cont est 2 In Search of Gold
题目链接Problem DescriptionSunset got a map about an abandoned gold mine in the border town. The map shows that the gold mine consists of nnn rooms connected by n−1n−1n−1 bidirectional tunnels, forming a tree structure. The map is so strange that on the iii-原创 2020-08-29 09:14:41 · 176 阅读 · 0 评论 -
Two Types of Spells
Polycarp plays a computer game (yet again). In this game, he fights monsters using magic spells.There are two types of spells: fire spell of power xxx deals xxx damage to the monster, and lightning spell of power yyy deals yyy damage to the monster and do原创 2020-08-16 18:15:03 · 229 阅读 · 0 评论 -
Boboniu and String
Boboniu defines BN-string as a string s of characters ‘B’ and ‘N’.You can perform the following operations on the BN-string s:Remove a character of s.Remove a substring “BN” or “NB” of s.Add a character ‘B’ or ‘N’ to the end of s.Add a string “BN” or原创 2020-08-14 17:02:33 · 1377 阅读 · 0 评论 -
Interval
链接:https://ac.nowcoder.com/acm/contest/5670/H来源:牛客网题目描述Mr. W have a sequence AAA with length NNN.F(l,r)=Al&Al+1&...&ArF(l,r) = A_l\&A_{l+1}\&...\&A_rF(l,r)=Al&Al+1&...&ArSet S(l,r)={F(a,b) ∣min(l,r)≤a≤b≤max(原创 2020-08-05 11:06:18 · 220 阅读 · 0 评论 -
城市排水
在一个n×nn×nn×n的方块城市中,坐标为(i,j)(i,j)(i,j)的位置高度为h[i,j]h[i,j]h[i,j],有mmm个排水井,分别位于(xi,yi)(x_i,y_i)(xi,yi)在一场大雨中,每个位置的水都会往相邻的积水更低的地方流动,如果无法排出将越积越高排水井处永远不会积水,水不会通过城市边缘排出(可以理解为城市边缘是无限高的墙)求每个位置的积水深度输入描述第一行输入一个整数TTT,代表有TTT组测试数据 对于每一组测试数据,第一行输入222个整数n,mn,mn,m,接下原创 2020-06-08 19:30:29 · 399 阅读 · 0 评论 -
Educational Codeforces Round 80 (Rated for Div. 2) D. Minimax Problem
You are given nnn arrays a1,a2,...,ana_1, a_2, ..., a_na1,a2,...,an; each array consists of exactly m integers. We denote the y-th element of the x-th array as ax,ya_{x,y}ax,y.You have to choose two arrays aia_iai and aja_jaj (1≤i,j≤n1≤i,j≤n1≤i,j≤n,原创 2020-05-22 18:35:39 · 243 阅读 · 0 评论 -
CF1354D Multiset
Note that the memory limit is unusual.You are given a multiset consisting of n integers. You have to process queries of two types:add integer k into the multiset;find the k-th order statistics in the multiset and remove it.k-th order statistics in the原创 2020-05-19 06:57:17 · 290 阅读 · 0 评论