自定义博客皮肤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)
  • 收藏
  • 关注

原创 Educational Codeforces Round 100-C. Busy Robot

Busy Robot题目:You have a robot that can move along a number line. At time moment 0 it stands at point 0.You give n commands to the robot: at time ti seconds you command the robot to go to point xi. Whenever the robot receives a command, it starts moving

2020-12-19 06:37:36 373 1

原创 Educational Codeforces Round 100-B Find The Array

B-Find The Array题目:You are given an array [a1,a2,…,an] such that 1≤ai≤109. Let S be the sum of all elements of the array a.Let’s call an array b of n integers beautiful if:1≤bi≤109 for each i from 1 to n;for every pair of adjacent integers from the ar

2020-12-18 21:25:38 153 1

原创 D. Number into Sequence (codeforces round #686)

D. Number into SequenceYou are given an integer n (n>1).Your task is to find a sequence of integers a1,a2,…,ak such that:each ai is strictly greater than 1;a1⋅a2⋅…⋅ak=n (i. e. the product of this sequence is n);ai+1 is divisible by ai for each i fr

2020-11-25 19:36:36 410

原创 C. Sequence Transformation (codeforces round #686)

C. Sequence TransformationYou are given a sequence a, initially consisting of n integers.You want to transform this sequence so that all elements in it are equal (i. e. it contains several occurrences of the same element).To achieve this, you choose som

2020-11-25 19:24:27 354

原创 B. Unique Bid Auction (codeforces round #686)

B. Unique Bid Auction题目:There is a game called “Unique Bid Auction”. You can read more about it here: https://en.wikipedia.org/wiki/Unique_bid_auction (though you don’t have to do it to solve this problem).Let’s simplify this game a bit. Formally, there

2020-11-25 19:14:47 677

原创 E-游戏机本当下手(北京信息科技大学第十二届程序设计竞赛暨ACM选拔赛)

游戏机本当下手题目:藤原妹红拿到了一个游戏机,游戏机上有’1’和’0’两个按钮。妹红发现,只要按住某个按钮不放,屏幕上就能一直不断打印那个字符。比如对于"11111111100000000001111111111",只需要按住1、再按住0、再按住1就可以打印出来了。这样妹红最少只需要按3次按钮就可以打印这个字符串。现在妹红拿到了一个01字符串,她想截取其中的一个子串,这个子串最少按 次按钮就可以打印出来。(01字符串指仅由字符’0’和字符’1’组成的字符串)注意这里“最少按 次”的含义是:按

2020-11-21 18:21:06 1346 1

原创 I-永远亭的小游戏(北京信息科技大学第十二届程序设计竞赛暨ACM选拔赛)

I-永远亭的小游戏题目:样例输入:2 2 21 21 12 4样例输出:500000008思路:纯粹暴力应该会超时,分析了下样例发现sum=c1*(b1*(a1+a2)+b2*(a1+a2))+c2*(b1*(a1+a2)+b2*(a1+a2)),得出规律:sum=c1*(b1*(a1+a2+…+an)+b2*(a1+a2…+an)+…+bn*(a1+a2…+an))+c2*(b1*(a1+a2+…+an)+b2*(a1+a2…+an)+…+bn*(a1+a2…+an))+…+cn*(

2020-11-21 18:11:03 168

原创 F-宵暗的怪物(北京信息科技大学第十二届程序设计竞赛暨ACM选拔赛)

宵暗的怪物题目:露米娅作为宵暗的妖怪,非常喜欢吞噬黑暗。这天,她来到了一条路上,准备吞噬这条路上的黑暗。这条道路一共被分为部分,每个部分上的黑暗数量为。露米娅每次可以任取 连续的 未被吞噬过的 三部分,将其中的黑暗全部吞噬,并获得中间部分的饱食度。露米娅想知道,自己能获得的饱食度最大值是多少?输入描述:第一行一个正整数,代表道路被分的份数。第二行有个正整数,代表每一部分黑暗数量。3<=n<=100000,1<=ai<=10^9输出描述一个正整数,代表最终饱食度

2020-11-21 17:55:40 166

原创 CF1283D

题目:Christmas Treesexamples:2 61 5output8-1 2 6 4 0 3examples:3 50 3 1output75 -2 4 -1 2题意:求所有人到各自距离最近的树的距离之和,注意不同的yi,xi;思路:不断将人放入树两旁,先将距树距离为1的地方放人,在距离为2的地方,以此类推。最多放入2*105次,不会超时。代码:#include<bits/stdc++.h>using namespace std;struc

2020-11-11 23:44:17 119

原创 CF1417-C

题目:C - k-Amazing NumbersYou are given an array a consisting of n integers numbered from 1 to n.Let’s define the k-amazing number of the array as the minimum number that occurs in all of the subsegments of the array having length k (recall that a subsegme

2020-10-27 18:40:24 181

原创 M-灾难预警-浙江农林大学第十九届程序设计竞赛暨天梯赛选拔赛

题目:灾难预警众所周知,浙农林是一条河。由于浙江农林大学的特殊地形,当你在下雨后漫步在农林大路上的时候难免会出现一脚踩进一个水坑的情况的情况。而农农非常不喜欢踩到水坑的感觉,请你帮忙设计一个程序来帮助农农判断他能否在不踩入水坑的情况下回到寝室。已知,浙江农林大学可以表示为一个 N * N 的矩阵。对于每个位置有一个海拔数据 h[i][j],当水位高度大于 h[i][j] 的时候,这个位置就会形成一个水坑。农农现在的坐标是 (1, 1), 他的宿舍位于 (n, n).农农只可以沿着上下左右

2020-10-24 21:30:02 265

原创 2018南京ICPC-G

题目:PyramidThe use of the triangle in the New Age practices seems to be very important as it represents the unholy trinity (Satan, the Antichrist and the False Prophet bringing mankind to the New World Order with false/distorted beliefs). The triangle is o

2020-10-22 20:35:57 249

原创 2018南京ICPC-I

题目:Magic PotionThere are n heroes and m monsters living in an island. The monsters became very vicious these days, so the heroes decided to diminish the monsters in the island. However, the i-th hero can only kill one monster belonging to the set Mi . Joe

2020-10-22 20:17:53 138

原创 2018南京ICPC-A

题目:Adrien and AustinAdrien and Austin 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 rem

2020-10-22 20:08:26 116

空空如也

空空如也

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

TA关注的人

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