思维技巧
文章平均质量分 82
思维技巧
Guuuuuu老师儿
当初的算法竞赛题目博客的留言评论就不回复了,时间太久已经忘干净了,抱歉~
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Bakery CodeForces - 707B(思维)
BakeryCodeForces - 707BMasha wants to open her own bakery and bake muffins in one of then cities numbered from 1 to n. There are m bidirectional roads, each of whose connects s原创 2017-11-06 20:03:55 · 325 阅读 · 0 评论 -
Balanced Substring CodeForces - 873B(思维+前缀和)
Balanced SubstringCodeForces - 873BYou are given a string s consisting only of characters0 and 1. A substring[l, r] of s is a string slsl + 1sl + 2...sr, and its length equal原创 2017-11-06 20:47:25 · 369 阅读 · 0 评论 -
一道阿姆斯特朗回旋好题( Convex HDU - 5979)
一道阿姆斯特朗回旋好题HDU - 59792001年5月8日,阿姆斯特朗(Armstrong,1929-2013) 教授发明了一种名为“阿姆斯特朗回旋加速喷气式阿姆斯特朗加密”的加密算法,算法从未公开,直至2013阿姆斯特朗教授逝世后,其生前的研究手稿被其儿子小阿姆斯特朗(Xiaoarmstrong,1995-)发表后才得以被大众所知。一天,小阿姆斯特朗突然对阿姆斯原创 2017-11-07 09:01:14 · 491 阅读 · 0 评论 -
Keep On Movin HDU - 5744
Keep On MovinHDU - 5744Professor Zhang has kinds of characters and the quantity of thei-th character is ai. Professor Zhang wants to use all the characters build several palindromic原创 2017-11-07 10:18:10 · 313 阅读 · 0 评论 -
Dasha and Stairs
Dasha and Stairstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOn her way to programming school tiger Das原创 2017-10-22 17:02:35 · 257 阅读 · 0 评论 -
Beat the Spread! 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原创 2017-11-08 18:33:36 · 564 阅读 · 0 评论 -
Anatoly and Cockroaches
Codeforces Round #373 (Div. 2) B. Anatoly and Cockroaches 水题B. Anatoly and Cockroaches题目连接:http://codeforces.com/contest/719/problem/BDescriptionAnatoly lives in the university dorm as m原创 2017-10-14 22:43:45 · 400 阅读 · 0 评论 -
Complete the Word(暴力)
B. Complete the Wordtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputZS the Coder loves to read the diction原创 2017-10-14 23:23:57 · 918 阅读 · 0 评论 -
In 7-bit ZOJ - 3713(进制操作转换)
In 7-bitZOJ - 3713Very often, especially in programming contests, we treat a sequence of non-whitespace characters as a string. But sometimes, a string may contain whitespace characters or原创 2017-11-17 15:39:54 · 357 阅读 · 0 评论 -
剪花布条 HDU - 2087 (水题)
剪花布条 HDU - 2087 一块花布条,里面有些图案,另有一块直接可用的小饰条,里面也有一些图案。对于给定的花布条和小饰条,计算一下能从花布条中尽可能剪出几块小饰条来呢? Input输入中含有一些数据,分别是成对出现的花布条和小饰条,其布条都是用可见ASCII字符表示的,可见的ASCII字符有多少个,布条的花纹也有多少种花样。花纹条和小饰条不会超过1000个原创 2017-11-05 12:56:48 · 600 阅读 · 0 评论 -
Bear and Poker CodeForces - 574C
B - Bear and PokerCodeForces - 574C Limak is an old brown bear. He often plays poker with his friends. Today they went to a casino. There aren players (including Limak himself原创 2017-11-05 20:28:31 · 368 阅读 · 0 评论 -
Cube HDU - 1220(数学)
CubeHDU - 1220Cowl is good at solving math problems. One day a friend asked him such a question: You are given a cube whose edge length is N, it is cut by the planes that was paralleled to原创 2017-11-15 20:08:24 · 334 阅读 · 0 评论 -
Misha and Changing Handles CodeForces - 501B(map映射)
Misha and Changing HandlesCodeForces - 501BMisha hacked the Codeforces site. Then he decided to let all the users change their handles. A user can now change his handle any number of times.原创 2017-11-15 20:09:00 · 344 阅读 · 0 评论 -
Levko and Table CodeForces - 361A(思维)
Levko and TableCodeForces - 361ALevko loves tables that consist of n rows andn columns very much. He especially loves beautiful tables. A table isbeautiful to Levko if the sum of eleme原创 2017-12-19 17:57:25 · 446 阅读 · 0 评论 -
最小正子段和 51Nod - 1065
最小正子段和51Nod - 1065N个整数组成的序列a1,a2,a3,…,an,从中选出一个子序列(ai,ai+1,…aj),使这个子序列的和>0,并且这个和是所有和>0的子序列中最小的。 例如:4,-1,5,-2,-1,2,6,-2。-1,5,-2,-1,序列和为1,是最小的。 Input 第1行:整数序列的长度N(2 第2 - N+1行原创 2017-11-23 14:15:24 · 282 阅读 · 0 评论 -
Oleg and shares CodeForces - 793A
Oleg and sharesCodeForces - 793AOleg the bank client checks share prices every day. There are n share prices he is interested in. Today he observed that each second exactly one of thes原创 2017-12-03 09:34:28 · 614 阅读 · 0 评论 -
折线分割平面 HDU - 2050 (找规律)
折线分割平面HDU - 2050我们看到过很多直线分割平面的题目,今天的这个题目稍微有些变化,我们要求的是n条折线分割平面的最大数目。比如,一条折线可以将平面分成两部分,两条折线最多可以将平面分成7部分,具体如下所示。Input 输入数据的第一行是一个整数C,表示测试实例的个数,然后是C 行数据,每行包含一个整数n(0Output 对于每个测原创 2017-12-03 20:02:40 · 366 阅读 · 0 评论 -
Permutations CodeForces - 189C(思维)
PermutationsCodeForces - 189CHappy PMP is freshman and he is learning about algorithmic problems. He enjoys playing algorithmic games a lot.One of the seniors gave Happy PMP a nice g原创 2017-11-25 11:13:20 · 575 阅读 · 0 评论 -
Two Semiknights Meet CodeForces - 362A
Two Semiknights MeetCodeForces - 362AA boy Petya loves chess very much. He even came up with a chess piece of his own, a semiknight. The semiknight can move in any of these four dire原创 2017-12-23 19:24:48 · 348 阅读 · 0 评论 -
Levko and Permutation CodeForces - 361B(思维)
Levko and PermutationCodeForces - 361BLevko loves permutations very much. A permutation of length n is a sequence of distinct positive integers, each is at most n.Let’s assume that v原创 2017-12-19 16:01:08 · 459 阅读 · 0 评论 -
Petya and Staircases CodeForces - 362B(思维)
Petya and StaircasesCodeForces - 362B Little boy Petya loves stairs very much. But he is bored from simple going up and down them — he loves jumping over several stairs at a time. As he st原创 2017-12-19 16:29:56 · 775 阅读 · 0 评论 -
Another Problem on Strings CodeForces - 165C
Another Problem on StringsCodeForces - 165CA string is binary, if it consists only of characters "0" and "1".String v is a substring of string w if it has a non-zero length and can b原创 2018-01-23 09:56:16 · 404 阅读 · 0 评论 -
Garden CodeForces - 915A
GardenCodeForces - 915ALuba thinks about watering her garden. The garden can be represented as a segment of lengthk. Luba has got n buckets, thei-th bucket allows her to water some con原创 2018-01-23 09:59:18 · 456 阅读 · 0 评论 -
Browser CodeForces - 915B
BrowserCodeForces - 915BLuba is surfing the Internet. She currently has n opened tabs in her browser, indexed from1 to n from left to right. The mouse cursor is currently located at th原创 2018-01-23 10:09:39 · 457 阅读 · 0 评论 -
Perfect Squares (水题)
Perfect SquaresGiven an array a1, a2, ..., an ofn integers, find the largest number in the array that is not a perfect square.A number x is said to be a perfect square if there exists原创 2018-01-26 10:50:46 · 1159 阅读 · 0 评论 -
Jamie and Alarm Snooze
Jamie and Alarm SnoozeJamie loves sleeping. One day, he decides that he needs to wake up at exactly hh: mm. However, he hates waking up, so he wants to make waking up less painful by set原创 2018-01-26 10:52:40 · 434 阅读 · 0 评论 -
New Year and Counting Cards
New Year and Counting CardsYour friend has n cards.You know that each card has a lowercase English letter on one side and a digit on the other.Currently, your friend has laid out the car原创 2018-01-26 10:55:25 · 354 阅读 · 0 评论 -
New Year and Buggy Bot
New Year and Buggy BotBob programmed a robot to navigate through a 2d maze.The maze has some obstacles. Empty cells are denoted by the character '.', where obstacles are denoted by '#'.原创 2018-01-26 10:58:00 · 335 阅读 · 0 评论 -
Two Cakes
Two CakesIt's New Year's Eve soon, so Ivan decided it's high time he started setting the table. Ivan has bought two cakes and cut them into pieces: the first cake has been cut intoa pieces,原创 2018-01-26 11:01:04 · 1032 阅读 · 0 评论 -
Traveling
TravelingAtCoDeer the deer is going on a trip in a two-dimensional plane. In his plan, he will depart from point(0,0) at time0, then for eachi between1 andN (inclusive), he will visi原创 2018-02-02 14:36:36 · 311 阅读 · 0 评论 -
AtCoder Regular Contest 088 D - People on a Line(DFS+图论)
AtCoder Regular Contest 088 D - People on a Line(DFS+图论)Problem Statement There are N people standing on thex-axis. Let the coordinate of Personi bexi. For everyi,xi is an integer原创 2018-02-02 17:11:27 · 340 阅读 · 0 评论 -
Atcoder Regular Contest 089D Checker
Atcoder Regular Contest 089D CheckerProblem Statement AtCoDeer is thinking of painting an infinite two-dimensional grid in a checked pattern of sideK. Here, a checked pattern of sideK is原创 2018-02-02 18:04:02 · 326 阅读 · 0 评论 -
Filya and Homework CodeForces - 714B
Filya and HomeworkCodeForces - 714BToday, hedgehog Filya went to school for the very first time! Teacher gave him a homework which Filya was unable to complete without your help.Filya原创 2018-02-04 17:33:31 · 206 阅读 · 0 评论 -
Bender Problem
Bender Problem Robot Bender decided to make Fray a birthday present. He drove n nails and numbered them from 1 to n in some order. Bender decided to make a picture using metal rods. The picture is a c...原创 2018-02-09 14:35:13 · 420 阅读 · 0 评论 -
Sonya and Queries CodeForces - 714C (map映射)
Sonya and QueriesCodeForces - 714CToday Sonya learned about long integers and invited all her friends to share the fun. Sonya has an initially empty multiset with integers. Friends give原创 2018-02-05 08:54:57 · 304 阅读 · 0 评论 -
New Year and Curling CodeForces - 908C
New Year and CurlingCodeForces - 908CCarol is currently curling.She has n disks each with radius r on the 2D plane. Initially she has all these disks above the line y = 10100.She原创 2018-01-29 12:18:36 · 300 阅读 · 0 评论 -
Equation (分类讨论)
Equation You are given an equation: Ax2 + Bx + C = 0. Your task is to find the number of distinct roots of the equation and print ...原创 2018-02-09 15:41:08 · 515 阅读 · 0 评论 -
Phone numbers
Phone numbers Phone number in Berland is a sequence of n digits. Often, to make it easier to memorize the number, it is divided into groups of two or three digits. For example, the phone number 119873...原创 2018-02-09 17:10:49 · 680 阅读 · 0 评论 -
Plus and Square Root (找规律)
Plus and Square Root ZS the Coder is playing a game. There is a number displayed on the screen and there are two buttons, ' + ' (plus) and '' (square root). Initially, the number 2 is displayed on the...原创 2018-02-11 14:55:26 · 615 阅读 · 0 评论 -
怪盗基德的挑战书 HDU - 4552 (kmp思维)
怪盗基德的挑战书 HDU - 4552 “在树最美丽的那天,当时间老人再次把大钟平均分开时,我会降临在灯火之城的金字塔前,带走那最珍贵的笑容。”这是怪盗基德盗取巴黎卢浮宫的《蒙娜丽莎的微笑》这幅画时,挑战书上的内容。 但这次,怪盗基德的挑战书上出现了一串串小写字母“a...原创 2018-02-12 16:27:06 · 491 阅读 · 0 评论
分享