自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Most socially-distanced subsequence(贪心)

题目Given a permutation p of length n, find its subsequence s1, s2, …, sk of length at least 2 such that:|s1−s2|+|s2−s3|+…+|sk−1−sk| is as big as possible over all subsequences of p with length at least 2.Among all such subsequences, choose the one whose

2020-10-06 21:21:05 255

原创 A - XXXXX(模拟,双指针,思维)

题目Ehab loves number theory, but for some reason he hates the number x. Given an array a, find the length of its longest subarray such that the sum of its elements isn’t divisible by x, or determine that such subarray doesn’t exist.An array a is a subarra

2020-10-06 19:53:42 991

原创 Arpa’s hard exam and Mehrdad’s naive cheat(快速幂)

题目There exists an island called Arpa’s land, some beautiful girls live there, as ugly ones do.Mehrdad wants to become minister of Arpa’s land. Arpa has prepared an exam. Exam has only one question, given n, print the last digit of 1378n1378^n1378n。Mehrd

2020-09-27 21:23:21 96

原创 Ervin and Joker(简单博弈)

题目Ervin and Joker are playing a game with rocks.Initially, there are N rocks, indexed from 1 to N. In one move, the player chooses at least 1 and at most K consecutively indexed rocks (all of them should not have been removed) and removes them from the g

2020-09-27 20:18:14 128

原创 V - Array Cancellation(贪心,模拟)

V - Array Cancellation(贪心,模拟)题目You’re given an array a of n integers, such that a1+a2+⋯+an=0.In one operation, you can choose two different indices i and j (1≤i,j≤n), decrement ai by one and increment aj by one. If i<j this operation is free, otherwi

2020-09-22 21:09:44 90

原创 Candy Box(easy version)-Codeforces

Candy Box (easy version) -Codeforces(贪心,排序,模拟)题目This problem is actually a subproblem of problem G from the same contest.There are n candies in a candy box. The type of the i-th candy is ai (1≤ai≤n).You have to prepare a gift using some of these candie

2020-09-12 13:57:18 155

原创 (Coupons and Discounts(Codeforces)贪心,模拟

题目The programming competition season has already started and it’s time to train for ICPC. Sereja coaches his teams for a number of year and he knows that to get ready for the training session it’s not enough to prepare only problems and editorial. As the

2020-09-10 19:56:15 135

空空如也

空空如也

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

TA关注的人

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