- 博客(18)
- 收藏
- 关注
原创 B. Roof Construction
It has finally been decided to build a roof over the football field in School 179. Its construction will require placingnnconsecutive vertical pillars. Furthermore, the headmaster wants the heights of all the pillars to form a permutationppof integers ...
2022-03-14 11:27:05
615
原创 B. Fun with Even Subarrays
You are given an arrayaaofnnelements. You can apply the following operation to it any number of times: Select some subarray fromaaof even size2k2kthat begins at positionll(1≤l≤l+2⋅k−1≤n1≤l≤l+2⋅k−1≤n,k≥1k≥1) and for eachiibetween00andk−1k−1...
2022-03-14 11:25:59
266
原创 B. Elementary Particles
Martians are actively engaged in interplanetary trade. Olymp City, the Martian city known for its spaceport, has become a place where goods from all the corners of our Galaxy come. To deliver even more freight from faraway planets, Martians need fast space
2022-03-14 11:22:49
309
原创 C. Paprika and Permutation
C. Paprika and Permutation time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Paprika loves permutations. She has an arraya1,a2,…,ana1,a2,…,an. She wants to make the array apermutationof...
2022-03-14 11:19:33
374
原创 A. Forbidden Subsequence
A. Forbidden Subsequence time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given stringsSSandTT, consisting of lowercase English letters. It is guaranteed thatTTis a permutati...
2022-03-14 11:19:23
303
原创 F - Count Color
Chosen Problem Solving and Program design as an optional course, you are required to solve all kinds of problems. Here, we get a new problem. There is a very long board with length L centimeter, L is a positive integer, so we can evenly divide the board in
2022-03-13 12:40:26
127
原创 E - Lost Cows
N (2 <= N <= 8,000) cows have unique brands in the range 1..N. In a spectacular display of poor judgment, they visited the neighborhood 'watering hole' and drank a few too many beers before dinner. When it was time to line up for their evening meal,
2022-03-13 12:37:18
686
原创 Happy 2006
Two positive integers are said to be relatively prime to each other if the Great Common Divisor (GCD) is 1. For instance, 1, 3, 5, 7, 9...are all relatively prime to 2006. Now your job is easy: for the given integer m, find the K-th element which is relati
2022-03-13 12:31:39
96
原创 青蛙的约会
artist 和 小旋 只在网上一起打过比赛,没有见过面。 开学返校了,他们决定出来约个饭 ,他们处于同一条长为L的轴线上,且这条轴线是头尾相连的 artist的初始坐标是X , 她顺时针走,每秒可以走m米 小旋的初始坐标是Y , 他也是顺时针走,每秒可以走n米 小旋和artist每秒都在走路。小旋想知道,他到底要走多少秒,才能遇见artist呢? 秒只能是整数秒,遇见的含义是到**同一个坐标**。 注意:这道题不支持bits/stdc++.h头文件! Input 输入只包括一行5个整数x,
2022-03-13 12:29:57
93
原创 C - The Suspects
2019冠状病毒病(英语:Coronavirus disease 2019,缩写:COVID-19 ),是一种由严重急性呼吸系统综合症冠状病毒2型(缩写:SARS-CoV-2)引发的传染病。此病在全球各国大规模爆发并急速扩散,成为人类历史上致死人数最多的流行病之一。 很显然,目前最好的办法就是将所有可能的患者都隔离起来。 现在某高校正在排查可能的患者,这个高校中有多个社团,每个社团经常进行内部交流,一名学生可能会加入多个社团。学校认为一旦某个社团里出现一名可疑患者,这整个社团的学生都被视为是可能的患者。..
2022-03-13 12:28:18
99
原创 D - Equals
D - Equals / Time Limit: 2 sec / Memory Limit: 1024 MB Score :400400points Problem Statement We have a permutation of the integers from11throughNN,p_1p1,p_2p2, ..,p_NpN. We also haveMMpairs of two integers between11andNN(inclusive...
2022-03-13 12:25:35
531
原创 Road Optimization
The Government of Mars is not only interested in optimizing space flights, but also wants to improve the road system of the planet. One of the most important highways of Mars connects Olymp City and Kstolop, the capital of Cydonia. In this problem, we onl
2022-03-13 12:22:39
165
原创 采药的晨成
辰辰是个天资聪颖的孩子,他的梦想是成为世界上最伟大的医师。为此,他想拜附近最有威望的医师为师。医师为了判断他的资质,给他出了一个难题。医师把他带到一个到处都是草药的山洞里对他说:“孩子,这个山洞里有一些不同的草药,采每一株都需要一些时间,每一株也有它自身的价值。我会给你一段时间,在这段时间里,你可以采到一些草药。如果你是一个聪明的孩子,你应该可以让采到的草药的总价值最大。” 如果你是辰辰,你能完成这个任务吗? 输入格式 第一行有两个整数 TT(1 \le T \le 10001≤T≤1000)和 MM
2022-03-13 12:19:57
88
原创 滑动窗口(优先队列)
Description An array of sizen≤ 106is given to you. There is a sliding window of sizekwhich is moving from the very left of the array to the very right. You can only see theknumbers in the window. Each time the sliding window moves rightwards by...
2022-03-13 12:15:48
672
原创 Red and Black
Description There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adjacent tiles. But he can't move on red tiles, he can move only on bl
2022-03-13 12:12:34
118
原创 gdut 2021级月赛d题开始快乐的acm生活
怎么说呢?经典的一个结构体排序,但是读题难度对于我这种语文不行的是死死的压制。 题目(链接)不会说很难,是师兄眼中的签到题,答对的人数那么少也是很多人没想到的,虽然我比赛时也没写出来就是了,只能说还是摆烂得摆烂的果吧。 师兄们对这道题的理解是:简单签到题,照着要求做就行,可能就考察一个结构体排序。 按照要求我写出来的ac代码还是又臭又长。可恶! 结合我的辣鸡代码理解随便优化下就完事了嗷 #include<iostream> using namespace std; #include&
2021-10-31 11:34:26
204
原创 gdut2021级月赛水题4道 大晚上没事做就码了
第一题历史 相信大家都会,但是还是给大家普及一下历史 #include<iostream> using namespace std; int main(){ printf("1ABC\n2A\n3B\n4D\n"); return 0; } 第二题前缀和 很简单的一道题,只要宣讲会有听,简简单单,但是我还是卡住了,但是下面那个tip没看到,我提交第一次没过,直接蚌埠住了,差点准备走了,不过也是水题,结合代码和注释也是一看就懂 #include<iostream>.
2021-10-31 00:28:38
128
原创 2021gdut月赛 H捣蛋鬼
这道题是非常有意思的一道贪心题,月赛的时候确实把我橄榄了,因为总是想起肥猪的钢琴床,所以全程我都在想dp方程,但是水平拉胯的我确实想不出,看了题解才明白这道题的精髓所在 下面是ac代码,结合代码的注释和题解理解这道题应该不会很难 捣蛋鬼就用拼音首字母ddg指代了 #include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; string s; cin >...
2021-10-31 00:17:13
367
2
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人