
思维题
文章平均质量分 88
长歌丶采薇
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
HDU - 5929 - Basic Data Structure
HDU - 5929 - Basic Data StructureMr. Frog learned a basic data structure recently, which is called stack.There are some basic operations of stack:∙ PUSH x: put x on the top of the stack, x must be ...原创 2019-10-20 14:49:09 · 215 阅读 · 0 评论 -
HDU - 6237 - A Simple Stone Game( 分解质因子)
HDU - 6237 - A Simple Stone Game( 分解质因子)After he has learned how to play Nim game, Bob begins to try another stone game which seems much easier.The game goes like this: one player starts the game wi...原创 2019-10-14 14:08:17 · 244 阅读 · 0 评论 -
CodeForces - 140C (贪心+优先队列+思维)
CodeForces - 140C (贪心+优先队列+思维)As meticulous Gerald sets the table and caring Alexander sends the postcards, Sergey makes snowmen. Each showman should consist of three snowballs: a big one, a medium o...原创 2018-12-07 12:34:40 · 695 阅读 · 2 评论 -
CodeForces 459C-Pashmak and Buses(思维题)
CodeForces 459C-Pashmak and Buses(思维题)Recently Pashmak has been employed in a transportation company. The company has k buses and has a contract with a school which has n students. The school planned...原创 2018-12-09 22:27:53 · 440 阅读 · 1 评论 -
CodeForces - 1013D - Chemical table(并查集+二分图+思维)
CodeForces - 1013D - Chemical table(并查集+二分图+思维)Innopolis University scientists continue to investigate the periodic table. There are n·m known elements and they form a periodic table: a rectangle wit...原创 2018-12-18 00:13:59 · 451 阅读 · 0 评论 -
51nod——1672 区间交 (树状数组解决区间交问题)
51nod——1672 区间交 (树状数组解决区间交问题)小A有一个含有n个非负整数的数列与m个区间,每个区间可以表示为li,ri。它想选择其中k个区间, 使得这些区间的交的那些位置所对应的数的和最大。(是指k个区间共同的交,即每个区间都包含这一段,具体可以参照样例)在样例中,5个位置对应的值分别为1,2,3,4,6,那么选择[2,5]与[4,5]两个区间的区间交为[4,5],它的值的和为1...原创 2019-05-06 12:27:49 · 375 阅读 · 0 评论 -
翻转问题
翻转问题技巧详解例.给定一个01串,现有翻转规则:翻转某一个位置时其后面2个位置也会跟着翻转,也就是每次翻转都会翻转3个连续的位置。要将01串全部翻转为0,求最小的翻转次数形似这类题的问题叫做翻转问题,也可以叫开关问题,对于这类题通常都会用到下面我要说的方法来解①.若某一个位置被翻转了n次,则其实际上被翻转了n%2次,因为翻转2k次相当与没翻转,翻转2k+1次相当于翻转了1次,因为要求最小翻...转载 2019-05-21 08:40:29 · 714 阅读 · 0 评论 -
HDU - 2841 Visible Trees (思维 + 容斥原理)
HDU - 2841 Visible Trees (思维 + 容斥原理)There are many trees forming a m * n grid, the grid starts from (1,1). Farmer Sherlock is standing at (0,0) point. He wonders how many trees he can see.If two tre...原创 2019-08-02 21:39:19 · 185 阅读 · 0 评论 -
HDU-6705 path(2019CCPC网络赛1004) Kth路径 思维+套路题
HDU-6705 path(2019 CCPC网络赛1004)You have a directed weighted graph with n vertexes and m edges. The value of a path is the sum of the weight of the edges you passed. Note that you can pass any edge an...原创 2019-08-24 18:48:42 · 308 阅读 · 0 评论 -
HDU - 6709 Fishing Master(CCPC网络赛1008) 贪心+思维
HDU - 6709 Fishing Master(CCPC网络赛1008) 思维Heard that eom is a fishing MASTER, you want to acknowledge him as your mentor. As everybody knows, if you want to be a MASTER’s apprentice, you should pass ...原创 2019-08-24 19:08:04 · 260 阅读 · 0 评论 -
2019牛客暑期多校训练营(第九场 --D Knapsack Cryptosystem 折半搜索)
2019牛客暑期多校训练营(第九场 --D Knapsack Cryptosystem 超大容量背包 搜索+ 思维)链接:https://ac.nowcoder.com/acm/contest/889/D来源:牛客网Amy asks Mr. B problem D. Please help Mr. B to solve the following problem.Amy wants to...原创 2019-08-15 18:45:56 · 220 阅读 · 0 评论 -
2019牛客暑期多校训练营(第九场 E ----All men are brothers 并查集+思维)
2019牛客暑期多校训练营(第九场 E ----All men are brothers 并查集+思维)链接:https://ac.nowcoder.com/acm/contest/889/E?&headNav=acm来源:牛客网题目描述Amy asks Mr. B problem E. Please help Mr. B to solve the following prob...原创 2019-08-16 15:28:19 · 215 阅读 · 0 评论 -
2019牛客暑期多校训练营(第十场 B——Coffee Chicken (思维题))
2019牛客暑期多校训练营(第十场 B——Coffee Chicken (思维题))链接:https://ac.nowcoder.com/acm/contest/890/B来源:牛客网Dr. JYY has just created the Coffee Chicken strings, denoted as S(n). They are quite similar to the Fibon...原创 2019-08-18 13:24:44 · 240 阅读 · 0 评论 -
CodeForces - 891A-Pride (思维+暴力)
CodeForces - 891A-PrideYou have an array a with length n, you can perform operations. Each operation is like this: choose two adjacent elements from a, say x and y, and replace one of them with gcd(x...原创 2018-12-07 12:11:25 · 334 阅读 · 0 评论 -
Codeforces 1082B Vova and Trophies (思维题)
Codeforces 1082B Vova and Trophies (思维题)Vova has won nn trophies in different competitions. Each trophy is either golden or silver. The trophies are arranged in a row.The beauty of the arrangement i...原创 2018-12-20 00:31:13 · 243 阅读 · 0 评论 -
CodeForces - 244A C - Dividing Orange(STL ---- set)
CodeForces244A Dividing Orange(STL+思维)One day Ms Swan bought an orange in a shop. The orange consisted of n·k segments, numbered with integers from 1 to n·k.There were k children waiting for Ms Swan...原创 2018-11-07 00:01:36 · 196 阅读 · 0 评论 -
CodeForces - 244B Undoubtedly Lucky Numbers(STL+思维)
CodeForces - 244B Undoubtedly Lucky Numbers(STL+思维)Polycarpus loves lucky numbers. Everybody knows that lucky numbers are positive integers, whose decimal representation (without leading zeroes) cont...原创 2018-11-07 00:11:48 · 326 阅读 · 0 评论 -
CodeForces - 245C Game with Coins(贪心+思维)
CodeForces - 245C Game with Coins(思维)Two pirates Polycarpus and Vasily play a very interesting game. They have n chests with coins, the chests are numbered with integers from 1 to n. Chest number i h...原创 2018-11-07 00:34:04 · 426 阅读 · 0 评论 -
POJ - 2301(水题)
Superbowl Sunday is nearly here. In order to pass the time waiting for the half-time commercials and wardrobe malfunctions, the local hackers have organized a betting pool on the game. Members place t...原创 2018-11-04 23:52:31 · 177 阅读 · 0 评论 -
CodeForces - 264A(思维题)
CodeForces - 264A(思维题)Squirrel Liss lived in a forest peacefully, but unexpected trouble happens. Stones fall from a mountain. Initially Squirrel Liss occupies an interval [0, 1]. Next, n stones will...原创 2018-11-15 00:23:58 · 392 阅读 · 0 评论 -
CodeForces - 266B (水题)
CodeForces - 266B (水题)During the break the schoolchildren, boys and girls, formed a queue of n people in the canteen. Initially the children stood in the order they entered the canteen. However, afte...原创 2018-11-15 00:38:01 · 220 阅读 · 0 评论 -
CodeForces - 298B Sail (思维题)
CodeForces - 298B SailThe polar bears are going fishing. They plan to sail from (sx, sy) to (ex, ey). However, the boat can only sail by wind. At each second, the wind blows in one of these directio...原创 2018-11-26 15:00:40 · 384 阅读 · 0 评论 -
CodeForces - 305C Ivan and Powers of Two(数学+思维)
CodeForces - 305C Ivan and Powers of Two(数学+思维)Ivan has got an array of n non-negative integers a1, a2, …, an. Ivan knows that the array is sorted in the non-decreasing order.Ivan wrote out integers...原创 2018-11-28 00:51:47 · 219 阅读 · 0 评论 -
CodeForces - 304B - Calendar (思维题)
CodeForces - 304B - Calendar (思维题)Calendars in widespread use today include the Gregorian calendar, which is the de facto international standard, and is used almost everywhere in the world for civil ...原创 2018-11-28 01:00:34 · 342 阅读 · 0 评论 -
CodeForces - 346C- Number Transformation II(贪心+暴力。。)
CodeForces - 346C- Number Transformation IIYou are given a sequence of positive integers x1, x2, …, xn and two non-negative integers a and b. Your task is to transform a into b. To do that, you can p...原创 2018-12-05 10:59:10 · 365 阅读 · 0 评论 -
uva 1335 Beijing Guards(思维+对答案二分)
uva 1335 Beijing Guards(贪心+思维)Beijing GuardsTime limit: 3.000 secondsBeijing was once surrounded by four rings of city walls: the Forbidden City Wall, the Imperial City Wall, the Inner City Wall, a...原创 2018-12-07 17:41:48 · 309 阅读 · 2 评论 -
Codeforces 1077B Disturbed People(思维题)
Codeforces 1077B Disturbed People(思维题)There is a house with nn flats situated on the main street of Berlatov. Vova is watching this house every night. The house can be represented as an array of nn i...原创 2018-12-20 00:06:00 · 278 阅读 · 0 评论 -
CodeForces - 215A Bicycle Chain(水题)
Vasya’s bicycle chain drive consists of two parts: n stars are attached to the pedal axle, m stars are attached to the rear wheel axle. The chain helps to rotate the rear wheel by transmitting the ped...原创 2018-11-02 00:29:52 · 217 阅读 · 0 评论