
思维
文章平均质量分 72
墓菱
这个作者很懒,什么都没留下…
展开
-
Visiting Peking University(2017 ACM/ICPC Asia Regional Beijing Online)
Ming is going to travel for n days and the date of these days can be represented by n integers: 0, 1, 2, …, n-1. He plans to spend m consecutive days(2 ≤ m ≤ n)in Beijing. During these m days, he inte...原创 2018-08-09 20:23:16 · 180 阅读 · 0 评论 -
Walking Between Houses(Codeforces-1015D)
题目链接题意:在一条数轴上从从1~n排列着n座房子,每次必须移动,移动的距离为两点坐标之差的绝对值,问能否在k回合里一共移动s距离。思路:一道略带贪心的思维题,首先把k>s和k*(n-1)#pragma comment(linker, "/STACK:1024000000,1024000000")#include <vector>#includ原创 2018-08-01 01:04:37 · 606 阅读 · 0 评论 -
Cake(2017 ACM/ICPC Asia Regional Beijing Online)
To celebrate that WF-2018 will be held in PKU, Alice, Bob, and Cate are asked to make N cakes.Every cake i needs to go through 3 steps in restrict order:Alice mixes flour and water for ai minutes...原创 2018-08-09 20:51:48 · 274 阅读 · 0 评论 -
Minimum(2017 ACM/ICPC Asia Regional Beijing Online)
You are given a list of integers a0, a1, …, a2^k-1.You need to support two types of queries:Output Minx,y∈[l,r] {ax∙ay}.Let ax=y.InputThe first line is an integer T, indicating the number...原创 2018-08-09 20:30:43 · 907 阅读 · 0 评论 -
Barricade(HDU - 5889)
Problem DescriptionThe empire is under attack again. The general of empire is planning to defend his castle. The land can be seen as N towns and M roads, and each road has the same length and connec...原创 2018-08-12 11:36:36 · 259 阅读 · 0 评论 -
Tree(HDU - 6228)
Consider a un-rooted tree T which is not the biological significance of tree or plant, but a tree as an undirected graph in graph theory with n nodes, labelled from 1 to n. If you cannot understand th...原创 2018-08-22 22:31:28 · 242 阅读 · 0 评论 -
Press the Button(2018 ACM/ICPC Asia Regional Qingdao Online)
BaoBao and DreamGrid are playing a game using a strange button. This button is attached to an LED light (the light is initially off), a counter and a timer and functions as follows:When the button i...原创 2018-09-16 17:24:32 · 460 阅读 · 0 评论