![](https://img-blog.csdnimg.cn/20190927151101105.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
sdnu2020寒假训练赛
文章平均质量分 83
sdnu2020寒假训练赛
夷则九
这个作者很懒,什么都没留下…
展开
-
SDNU_ACM_ICPC_2020_Winter_Practice_3rd A dfs
题目Tom the robocat is presented in a Robotics Exhibition for an enthusiastic audience of youngsters, placed around an m n field. Tom which is turned off initially is placed in some arbitrary point in ...原创 2020-02-14 22:50:15 · 173 阅读 · 0 评论 -
SDNU_ACM_ICPC_2020_Winter_Practice_4th H 斐波那契
题目Mr. Frog has n sticks, whose lengths are 1,2, 3⋯n respectively. Wallice is a bad man, so he does not want Mr. Frog to form a triangle with three of the sticks here. He decides to steal some sticks!...原创 2020-02-04 18:19:55 · 141 阅读 · 0 评论 -
SDNU_ACM_ICPC_2020_Winter_Practice_3rd M水题
题目You are given a rectangular board of M × N squares. Also you are given an unlimited number of standard domino pieces of 2 × 1 squares. You are allowed to rotate the pieces. You are asked to place a...原创 2020-02-02 16:58:37 · 264 阅读 · 0 评论 -
SDNU_ACM_ICPC_2020_Winter_Practice_3rd I
题目Student Valera is an undergraduate student at the University. His end of term exams are approaching and he is to pass exactly n exams. Valera is a smart guy, so he will be able to pass any exam he ...原创 2020-02-02 16:59:00 · 208 阅读 · 0 评论 -
SDNU_ACM_ICPC_2020_Winter_Practice_3rd E
题目You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be n...原创 2020-02-02 16:59:03 · 177 阅读 · 0 评论 -
SDNU_ACM_ICPC_2020_Winter_Practice_2nd L
题目Today, Wet Shark is given n bishops on a 1000 by 1000 grid. Both rows and columns of the grid are numbered from 1 to 1000. Rows are numbered from top to bottom, while columns are numbered from left...原创 2020-01-23 22:43:22 · 163 阅读 · 0 评论 -
SDNU_ACM_ICPC_2020_Winter_Practice_2nd K 二分,平均值,前缀和
题目Farmer John’s farm consists of a long row of N (1 <= N <= 100,000)fields. Each field contains a certain number of cows, 1 <= ncows <= 2000.FJ wants to build a fence around a contiguous...原创 2020-02-12 22:06:35 · 194 阅读 · 0 评论 -
SDNU_ACM_ICPC_2020_Winter_Practice_2nd J树状数组
题目N个气球排成一排,从左到右依次编号为1,2,3…N.每次给定2个整数a b(a <= b),lele便为骑上他的“小飞鸽"牌电动车从气球a开始到气球b依次给每个气球涂一次颜色。但是N次以后lele已经忘记了第I个气球已经涂过几次颜色了,你能帮他算出每个气球被涂过几次颜色吗?Input每个测试实例第一行为一个整数N,(N <= 100000).接下来的N行,每行包括2个整数a ...原创 2020-01-23 22:43:03 · 185 阅读 · 0 评论 -
SDNU_ACM_ICPC_2020_Winter_Practice_2nd H 优先队列 贪心
题目大意两个长度为n的数组A,B对A进行K1运算,对其中一个数 +1或-1对B进行K2运算,对其中一个数 +1或-1求的最小值思路Bi+1 《=》Ai-1Bi-1 《=》Ai+1所以可以看成是对A序列进行K1+K2次操作,B不操作那么优先对 | Ai - Bi | 最大值对应的Ai进行操作利用优先队列 寻找最优AiAC代码#include<cstdio>...原创 2020-02-12 15:24:54 · 109 阅读 · 0 评论 -
SDNU_ACM_ICPC_2020_Winter_Practice_2nd G水题
题目You are given two strings of equal length s and t consisting of lowercase Latin letters. You may perform any number (possibly, zero) operations on these strings.During each operation you choose tw...原创 2020-01-23 22:43:20 · 248 阅读 · 0 评论 -
SDNU_ACM_ICPC_2020_Winter_Practice_2nd F 水
题目You are given sequence a1, a2, …, an of integer numbers of length n. Your task is to find such subsequence that its sum is odd and maximum among all such subsequences. It’s guaranteed that given se...原创 2020-02-11 20:17:13 · 129 阅读 · 0 评论 -
SDNU_ACM_ICPC_2020_Winter_Practice_2nd D拓扑排序
题目John has n tasks to do. Unfortunately, the tasks are not independent and the execution of one task isonly possible if other tasks have already been executed.InputThe input will consist of severa...原创 2020-02-14 16:41:10 · 131 阅读 · 0 评论 -
SDNU_ACM_ICPC_2020_Winter_Practice_2nd C 离散化, lower_bound
题目Moscow is hosting a major international conference, which is attended by n scientists from different countries. Each of the scientists knows exactly one language. For convenience, we enumerate all ...原创 2020-02-11 19:10:31 · 377 阅读 · 0 评论 -
SDNU_ACM_ICPC_2020_Winter_Practice_2nd B 双权值最短路
题目给你n个点,m条无向边,每条边都有长度d和花费p,给你起点s终点t,要求输出起点到终点的最短距离及其花费,如果最短距离有多条路线,则输出花费最少的。Input输入n,m,点的编号是1~n,然后是m行,每行4个数 a,b,d,p,表示a和b之间有一条边,且其长度为d,花费为p。最后一行是两个数 s,t;起点s,终点。n和m为0时输入结束。(1<n<=1000, 0<m&...原创 2020-01-23 22:43:31 · 119 阅读 · 0 评论 -
SDNU_ACM_ICPC_2020_Winter_Practice_2nd A 前缀和二维
题目给你一个m×n的整数矩阵,在上面找一个x×y的子矩阵,使子矩阵中所有元素的和最大。Input输入数据的第一行为一个正整数T,表示有T组测试数据。每一组测试数据的第一行为四个正整数m,n,x,y(0<m,n<1000 AND 0<x<=m AND 0<y<=n),表示给定的矩形有m行n列。接下来这个矩阵,有m行,每行有n个不大于1000的正整数。Out...原创 2020-02-11 19:49:42 · 130 阅读 · 0 评论 -
SDNU_ACM_ICPC_2020_Winter_Practice_1st F 队列 pair
题目Thor is getting used to the Earth. As a gift Loki gave him a smartphone. There are n applications on this phone. Thor is fascinated by this phone. He has only one minor issue: he can’t count the nu...原创 2020-02-02 20:14:57 · 166 阅读 · 0 评论 -
SDNU_ACM_ICPC_2020_Winter_Practice_1st E
题目Peter Parker wants to play a game with Dr. Octopus. The game is about cycles. Cycle is a sequence of vertices, such that first one is connected with the second, second is connected with third and s...原创 2020-01-22 13:32:14 · 158 阅读 · 0 评论 -
SDNU_ACM_ICPC_2020_Winter_Practice_1st C
题目Helen works in Metropolis airport. She is responsible for creating a departure schedule. There are n flights that must depart today, the i-th of them is planned to depart at the i-th minute of the ...原创 2020-01-22 18:11:30 · 192 阅读 · 0 评论 -
SDNU_ACM_ICPC_2020_Winter_Practice_1st B
题目Maxim wants to buy an apartment in a new house at Line Avenue of Metropolis. The house has n apartments that are numbered from 1 to n and are arranged in a row. Two apartments are adjacent if their...原创 2020-01-22 13:03:51 · 151 阅读 · 0 评论 -
SDNU_ACM_ICPC_2020_Winter_Practice_1st A
题目Petya is a big fan of mathematics, especially its part related to fractions. Recently he learned that a fraction is called proper iff its numerator is smaller than its denominator (a < b) and t...原创 2020-01-22 12:44:50 · 215 阅读 · 0 评论