自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 ## 杭电--2063 过山车

杭电–2063 过山车Problem DescriptionRPG girls今天和大家一起去游乐场玩,终于可以坐上梦寐以求的过山车了。可是,过山车的每一排只有两个座位,而且还有条不成文的规矩,就是每个女生必须找个个男生做partner和她同坐。但是,每个女孩都有各自的想法,举个例子把,Rabbit只愿意和XHD或PQK做partner,Grass只愿意和linle或LL做partner,PrincessSnow愿意和水域浪子或伪酷儿做partner。考虑到经费问题,boss刘决定只让找到partner

2021-05-22 10:34:56 123

原创 HDU---2081---数塔

HDU—2081—数塔在讲述DP算法的时候,一个经典的例子就是数塔问题,它是这样描述的:有如下所示的数塔,要求从顶层走到底层,若每一步只能走到相邻的结点,则经过的结点的数字之和最大是多少?已经告诉你了,这是个DP的题目,你能AC吗?Input输入数据首先包括一个整数C,表示测试实例的个数,每个测试实例的第一行是一个整数N(1 <= N <= 100),表示数塔的高度,接下来用N行数字表示数塔,其中第i行有个i个整数,且所有的整数均在区间[0,99]内。Output对于每个测试实例

2021-04-22 15:19:46 234

原创 01背包问题(状态转移方程讲解)

01背包问题(状态转移方程讲解)有 N 件物品和一个容量是 V 的背包。每件物品只能使用一次。第 i 件物品的体积是 vi,价值是 wi。求解将哪些物品装入背包,可使这些物品的总体积不超过背包容量,且总价值最大。输出最大价值。输入格式第一行两个整数,N,V,用空格隔开,分别表示物品数量和背包容积。接下来有 N 行,每行两个整数 vi,wi,用空格隔开,分别表示第 i 件物品的体积和价值。输出格式输出一个整数,表示最大价值。数据范围0<N,V≤10000<vi,wi≤100

2021-04-21 20:15:42 1276

原创 Codeforce A. Déjà Vu

A. Déjà Vu题意:A palindrome is a string that reads the same backward as forward. For example, the strings “z”, “aaa”, “aba”, and “abccba” are palindromes, but “codeforces” and “ab” are not. You hate palindromes because they give you déjà vu.There is a str

2021-04-13 19:45:30 298

原创 B. Box Fitting

B. Box Fitting题意:You are given n rectangles, each of height 1. Each rectangle’s width is a power of 2 (i. e. it can be represented as 2x for some non-negative integer x).You are also given a two-dimensional box of width W. Note that W may or may not be

2021-04-02 19:13:02 152

原创 C. Double-ended Strings

C. Double-ended Strings题面:You are given the strings a and b, consisting of lowercase Latin letters. You can do any number of the following operations in any order:if |a|>0 (the length of the string a is greater than zero), delete the first character

2021-03-27 15:29:35 464 5

原创 B. Partial Replacement

B. Partial Replacement题面:You are given a number k and a string s of length n, consisting of the characters ‘.’ and ‘’. You want to replace some of the '’ characters with ‘x’ characters so that the following conditions are met:The first character ‘’ in t

2021-03-26 20:16:03 277

原创 B. Nezzar and Lucky Number

B. Nezzar and Lucky Number原题链接:添加链接描述题意:Nezzar’s favorite digit among 1,…,9 is d. He calls a positive integer lucky if d occurs at least once in its decimal representation.Given q integers a1,a2,…,aq, for each 1≤i≤q Nezzar would like to know if ai can

2021-03-24 20:46:55 102

原创 A. Shifting Stacks

原题链接:添加链接描述题意:You have n stacks of blocks. The i-th stack contains hi blocks and it’s height is the number of blocks in it. In one move you can take a block from the i-th stack (if there is at least one block) and put it to the i+1-th stack. Can you mak

2021-03-20 10:26:36 183

原创 A. Meximization

A. Meximization原题链接:添加链接描述题意:You are given an integer n and an array a1,a2,…,an. You should reorder the elements of the array a in such way that the sum of MEX on prefixes (i-th prefix is a1,a2,…,ai) is maximized.Formally, you should find an array b1,

2021-03-19 20:52:07 318

原创 C. Going Home

原题链接:(https://codeforces.com/contest/1501/problem/C)原题:It was the third month of remote learning, Nastya got sick of staying at dormitory, so she decided to return to her hometown. In order to make her trip more entertaining, one of Nastya’s friend pres

2021-03-17 19:19:52 131 4

原创 B. Napoleon Cake

B. Napoleon Cake原题链接:https://codeforces.com/contest/1501/problem/B题意:This week Arkady wanted to cook some pancakes (to follow ancient traditions) and make a problem about that. But then he remembered that one can’t make a problem about stacking pancake

2021-03-16 19:26:17 521 4

原创 B. New Year‘s Number

B. New Year’s Number原题链接:(https://codeforces.com/contest/1475/problem/B)题面:Polycarp remembered the 2020-th year, and he is happy with the arrival of the new 2021-th year. To remember such a wonderful moment, Polycarp wants to represent the number n as

2021-03-15 19:16:13 161

原创 A. ABC String.

A. ABC String.原题链接:[https://codeforces.com/contest/1494/problem/A]题面You are given a string a, consisting of n characters, n is even. For each i from 1 to n ai is one of ‘A’, ‘B’ or ‘C’.A bracket sequence is a string containing only characters “(” and “

2021-03-04 19:32:48 313 3

空空如也

空空如也

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

TA关注的人

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