- 博客(741)
- 资源 (10)
- 问答 (1)
- 收藏
- 关注
原创 CodeChef STRMRG String Merging (dp)
Description All submissions for this problem are available. Read problems statements in Mandarin chinese, Russian and Vietnamese as well. For a string S, let’s define a function F(S) as
2018-01-28 17:43:40 251
原创 Codeforces 814 C. An impassioned circulation of affection (dp)
Description Nadeko’s birthday is approaching! As she decorated the room for the party, a long garland of Dianthus-shaped paper pieces was placed on a prominent part of the wall. Brother Koyomi wil
2018-01-28 17:23:17 224
原创 FZU 2216 The Longest Straight (尺取法)
Description ZB is playing a card game where the goal is to make straights. Each card in the deck has a number between 1 and M(including 1 and M). A straight is a sequence of cards with consecutive
2018-01-27 22:47:05 250
原创 FZU 2219 StarCraft (哈夫曼树)
Description ZB loves playing StarCraft and he likes Zerg most! One day, when ZB was playing SC2, he came up with an idea: He wants to change the queen’s ability, the queen’s new ability
2018-01-27 22:20:48 359
原创 Codeforces 914 C. Travelling Salesman and Special Numbers (dp)
Description The Travelling Salesman spends a lot of time travelling so he tends to get bored. To pass time, he likes to perform operations on numbers. One such operation is to take a positive inte
2018-01-25 12:23:46 471
原创 Codeforces 916 C. Jamie and Interesting Graph (构造)
Description Jamie has recently found undirected weighted graphs with the following properties very interesting: The graph is connected and contains exactly n vertices and m edges. All ed
2018-01-20 11:33:38 617
原创 Codeforces 913 C. Party Lemonade (思维)
Description A New Year party is not a New Year party without lemonade! As usual, you are expecting a lot of guests, and buying lemonade has already become a pleasant necessity. Your favorite sto
2018-01-10 12:01:33 532
原创 Codeforces 560 E. Gerald and Giant Chess (dp,组合数学)
Description Giant chess is quite common in Geraldion. We will not delve into the rules of the game, we’ll just say that the game takes place on an h × w field, and it is painted in two colors, but no
2017-12-02 18:52:02 370
原创 计蒜客 ACM-ICPC 2017 Warmup Contest 12
因为等了很久计蒜客上都没有更新,所以目前找不到题目,只能凭借记忆写写咯~全场不在状态抱着不仔细检查直接交让评测机来judge心情的我,最后居然取得了 rk2 ,一定是高手都没有来参加的缘故。 A. Abandoned Animal题意给定一些商品可以在第几家店买的,然后输入购买商品的顺序,问购买序列是否唯一(要求第几家序号不下降)。若唯一,输出 unique ,不唯一输出 ambiguous ,不存
2017-11-19 12:42:46 708
原创 Codeforces 892 B. Wrath (递推)
Description Hands that shed innocent blood! There are n guilty people in a line, the i-th of them holds a claw with length Li. The bell rings and every person kills some of people in front of hi
2017-11-18 11:45:18 1105
原创 Codeforces 892 C. Pride (枚举)
Description You 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, y), where
2017-11-18 11:17:52 922
原创 Codeforces 892 D. Gluttony (思维)
Description You are given an array a with n distinct integers. Construct an array b by permuting a such that for every non-empty subset of indices S = {x1, x2, …, xk} (1 ≤ xi ≤ n, 0 < k < n) the sums
2017-11-18 10:17:53 643
原创 Codeforces 890 D. Boxes And Balls (哈夫曼)
Description Ivan has n different boxes. The first of them contains some balls of n different colors. Ivan wants to play a strange game. He wants to distribute the balls into boxes in such a way
2017-11-17 20:06:30 523
原创 Codeforces 890 D. Restoration of string (技巧)
Description A substring of some string is called the most frequent, if the number of its occurrences is not less than number of occurrences of any other substring. You are given a set of strings
2017-11-17 15:26:38 594
原创 Codeforces 890 C. Petya and Catacombs (贪心)
Description A very brave explorer Petya once decided to explore Paris catacombs. Since Petya is not really experienced, his exploration is just walking through the catacombs. Catacombs consist o
2017-11-17 12:07:04 918
原创 51nod 1350 斐波那契表示 (数学)
Description 每一个正整数都可以表示为若干个斐波那契数的和,一个整数可能存在多种不同的表示方法,例如:14 = 13 + 1 = 8 + 5 + 1,其中13 + 1是最短的表示(只用了2个斐波那契数)。定义F(n) = n的最短表示中的数字个数,F(14) = 2,F(100) = 3(100 = 3 + 8 + 89),F(16) = 2(16 = 8 + 8 = 13 + 3)。
2017-11-11 13:41:41 491
原创 FZU 2214 Knapsack problem (超大容量背包)
Description Given a set of n items, each with a weight w[i] and a value v[i], determine a way to choose the items into a knapsack so that the total weight is less than or equal to a given limit B and
2017-11-03 20:19:28 430
原创 51nod 1829 函数 (斯特林数)
Description 想知道f:A->B这个函数(其中|A|=n, |B|=m)的所有映射关系要使B的每个元素都要被A的一个元素覆盖到。 数字可能很大你只要输出方案数模1,000,000,007即可。 Input 一共一行两个数,n和m。(1<=n,m<=1,000,000) Output 一共一行包含一个方案数。 Input示例2 2 Output示例2 思路原题
2017-11-02 21:54:13 657
原创 51nod 1836 战忽局的手段 (期望)
Description 众所周知,有一个神秘的组织——战忽局,在暗中保护着我们。在局中任职的官员都有着极强的忽悠技巧,不只能用预言,还能用往事忽悠人。如今某外星间谍已经获得了战忽局曾经参与的n次事件的资料,局座发现了这件事,于是决定再次用忽悠来保证战忽局的安全。局座将发表m次演讲,每一天他都会从n事件中等概率地挑选一件混淆众人,由于局座每天很忙,不能把之前将的事件都记录下来,因此他可能会重复选择
2017-11-02 19:05:23 311
原创 ZOJ 3987 Numbers (贪心)
Description DreamGrid has a nonnegative integer nn. He would like to divide nn into mm nonnegative integers a1,a2,…,ama_1, a_2, \dots, a_m and minimizes their bitwise or (i.e. n=a1+a2+⋯+amn=a_1 + a_2
2017-11-02 14:54:02 1146
原创 Codeforces 122 D. Lucky Transformation (规律)
Description Petya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 ar
2017-10-31 14:58:08 578
原创 Codeforces 122 C. Lucky Sum(分块)
Description Petya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 ar
2017-10-31 14:39:11 386
原创 HDU 1754 I Hate It (线段树,模板)
Description 很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。 这让很多学生很反感。 不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。 Input 本题目包含多组测试,请处理到文件结束。 在每个测试的第一行,有两个正整数 N 和 M ( 0Ou
2017-10-31 12:19:04 390
原创 Codeforces 877 B. Nikita and string (技巧)
Description One day Nikita found the string containing letters “a” and “b” only. Nikita thinks that string is beautiful if it can be cut into 3 strings (possibly empty) without changing the orde
2017-10-26 12:39:48 666
原创 Codeforces 877 D. Olya and Energy Drinks (bfs)
Description Olya loves energy drinks. She loves them so much that her room is full of empty cans from energy drinks. Formally, her room can be represented as a field of n × m cells, each cell of
2017-10-26 12:17:26 710
原创 Codeforces 876 E. National Property (2-SAT)
Description You all know that the Library of Bookland is the largest library in the world. There are dozens of thousands of books in the library. Some long and uninteresting story was removed…
2017-10-19 21:05:08 1908
原创 HDU 5972 Regular Number (bitset)
Description Using regular expression to define a numeric string is a very common thing. Generally, use the shape as follows: (0|9|7) (5|6) (2) (4|5) Above regular expression matches 4 digit
2017-10-14 21:23:41 371
原创 HDU 5988 Coding Contest (最小费用流)
Description A coding contest will be held in this university, in a huge playground. The whole playground would be divided into N blocks, and there would be M directed paths linking these blocks. The
2017-10-14 10:58:21 325
原创 HDU 3826 Squarefree number (素数)
Description In mathematics, a squarefree number is one which is divisible by no perfect squares, except 1. For example, 10 is square-free but 18 is not, as it is divisible by 9 = 3^2. Now you need to
2017-10-09 18:15:08 515
原创 Codeforces 869 C. The Intriguing Obsession (组合数学)
Description With hands joined, go everywhere at a speed faster than our thoughts! This time, the Fire Sisters — Karen and Tsukihi — is heading for somewhere they’ve never reached — water-surrounded i
2017-10-07 15:47:52 1119
原创 51nod 1693 水群 (spfa)
Description 总所周知,水群是一件很浪费时间的事,但是其实在水群这件事中,也可以找到一些有意思的东西。 比如现在,bx2k就在研究怎样水表情的问题。 首先,bx2k在对话框中输入了一个表情��,接下来,他可以进行三种操作。 第一种,是全选复制,把所有表情全选然后复制到剪贴板中。 第二种,是粘贴,把剪贴板中的表情粘贴到对话框中。 第三种,
2017-10-06 15:50:31 586
原创 Codeforces 868 D. Huge Strings (二分+随机+SAM)
Description You are given n strings s1, s2, …, sn consisting of characters 0 and 1. m operations are performed, on each of them you concatenate two existing strings into a new one. On the i-th operat
2017-10-06 10:05:50 787
原创 Codeforces 868 C. Qualification Rounds (技巧)
Description Snark and Philip are preparing the problemset for the upcoming pre-qualification round for semi-quarter-finals. They have a bank of n problems, and they want to select any non-empty subse
2017-10-05 21:30:11 884 3
原创 51nod 1055 最长等差数列
Description N个不同的正整数,找出由这些数组成的最长的等差数列。 例如:1 3 5 6 8 9 10 12 13 14 等差子数列包括(仅包括两项的不列举) 1 3 5 1 5 9 13 3 6 9 12 3 8 13 5 9 13 6 8 10 12 14 其中6 8 10 12 14最长,长
2017-10-04 22:11:42 285
原创 FZU 1759 Super A^B mod C (欧拉函数,降幂公式)
Description Given A,B,C, You should quickly calculate the result of A^B mod C. (1<=A,C<=1000000000,1<=B<=10^1000000). Input There are multiply testcases. Each testcase, there is one line contains
2017-10-04 12:02:23 398
原创 Codeforces 861 C. Did you mean... (模拟)
Description Beroffice text editor has a wide range of features that help working with text. One of the features is an automatic search for typos and suggestions of how to fix them. Beroffice wor
2017-10-03 21:32:17 685
原创 Codeforces 861 D. Polycarp's phone book (trie)
Description There are n phone numbers in Polycarp’s contacts on his phone. Each number is a 9-digit integer, starting with a digit different from 0. All the numbers are distinct. There is the la
2017-10-03 21:20:31 452
原创 POJ 3368 Frequent values (RMQ)
Description You are given a sequence of n integers a1 , a2 , … , an in non-decreasing order. In addition to that, you are given several queries consisting of indices i and j (1 ≤ i ≤ j ≤ n). For each
2017-10-03 12:46:22 933
Spig 网站浮动小人 (javascript)
2018-06-17
OICQ 聊天室(Java 课程设计)
2018-06-17
Little Giant (C++ 课程设计)
2018-06-17
Flow blog(数据库课程设计)
2018-06-17
Codeforces Edu Hacking
2018-06-17
HDU 自动 AC 机(Python)
2018-06-17
黑白棋 (Reversi)
2016-10-30
黑客帝国C语言
2016-01-07
VC绘图库Easyx
2016-01-05
C语言一个小小的问题,望解答
2016-01-08
TA创建的收藏夹 TA关注的收藏夹
TA关注的人