![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
水题
文章平均质量分 62
elbadaernu
这个作者很懒,什么都没留下…
展开
-
HDU 3951 Coin Game(博弈水题)
Problem Description After hh has learned how to play Nim game, he begins to try another coin game which seems much easier. The game goes like this: Two players start the game with a circle of n coi原创 2017-12-06 20:48:05 · 556 阅读 · 0 评论 -
Sasha and Sticks CodeForces - 832A (水题)
It’s one more school day now. Sasha doesn’t like classes and is always bored at them. So, each day he invents some game and plays in it alone or with friends.Today he invented one simple game to play w原创 2017-08-28 18:08:39 · 778 阅读 · 0 评论 -
CF C. Sorting by Subsequences AIM Tech Round 4 (Div. 2)(简单模拟)
C. Sorting by Subsequences time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output You are given a sequence a1, a2, …, an consisting of different i原创 2017-08-25 16:54:48 · 552 阅读 · 0 评论 -
The Same Game POJ - 1027(搜索+模拟)
The game named “Same” is a single person game played on a 10 \Theta 15 board. Each square contains a ball colored red (R), green (G), or blue (B). Two balls belong to the same cluster if they have the原创 2017-08-25 14:08:38 · 479 阅读 · 0 评论 -
A Math Problem HDU - 6182 (快速幂)
You are given a positive integer n, please count how many positive integers k satisfy k^k≤n. Input There are no more than 50 test cases. Each case only contains a positivse integer n in a line. 1≤n≤原创 2017-09-03 22:33:49 · 610 阅读 · 2 评论 -
Minimal string CodeForces - 797C
Petya recieved a gift of a string s with length up to 10^5 characters for his birthday. He took two more empty strings t and u and decided to play a game. This game has two possible moves: 1.Extra原创 2017-08-21 21:14:22 · 614 阅读 · 0 评论 -
Hexadecimal's Numbers CodeForces - 9C
One beautiful July morning a terrible thing happened in Mainframe: a mean virus Megabyte somehow got access to the memory of his not less mean sister Hexadecimal. He loaded there a huge amount of n dif原创 2017-08-19 21:12:46 · 1141 阅读 · 0 评论 -
CodeForces - 789A Anastasia and pebbles (水题)
Anastasia loves going for a walk in Central Uzhlyandian Park. But she became uninterested in simple walking, so she began to collect Uzhlyandian pebbles. At first, she decided to collect all the pebble原创 2017-07-16 19:56:14 · 503 阅读 · 0 评论 -
codevs 3297 木材加工(裸二分)
题目描述 Description 木材厂有一些原木,现在想把这些木头切割成一些长度相同的小段木头,需要得到的小段的数目是给定了。当然,我们希望得到的小段越长越好,你的任务是计算能够得到的小段木头的最大长度。 木头长度的单位是厘米。原木的长度都是正整数,我们要求切割得到的小段木头的长度也要求是正整数。输入描述 Input Description 第一行是两个正整数N和K(1 ≤ N ≤ 10000原创 2017-06-27 20:09:27 · 468 阅读 · 0 评论 -
codevs 2610 活动选择(贪心)(测试数据有错)
题目描述 Description 假设有一个需要使用某一资源的n(n≤1000)个活动组成的集合S,S={1,…,n}。该资源一次只能被一个活动占有,每一个活动有一个开始时间bi和结束时间ei(bi≤ei)。若bi>ej或者bj>ei,则活动i和活动j兼容。你的任务是是:选择由互相兼容的活动组成的最大集合。输入描述 Input Description 共n+1行,其中第1行为n,第2行到第n+1原创 2017-06-24 20:24:45 · 588 阅读 · 0 评论 -
codevs 1766 装果子
题目描述 Description 果园里有n颗果树,每棵果树都有一个编号i(1≤i≤n)。小明已经把每棵果树上的果子都摘下来堆在了这棵树的下方,每棵树下方的果子体积为ai。现在小明将拿来m个袋子把这些果子都装进袋子里。每个袋子的体积为v。小明会按照如下规则把果子装进袋子里:(a)从第1棵果树开始装起,由1到n一直装到第n棵果树。(b)如果这棵果树下的果子能全部装进当前这个袋子,就装进去;如果不能,原创 2017-05-21 19:43:58 · 365 阅读 · 0 评论 -
codevs 1436 孪生素数 2
题目描述 Description 如m=100,n=6则将输出100以内的所有相差6的孪生素数:如,5 117 13….83 89请按此规律输出数与数之间用半角空格区分,每一对一行.输入描述 Input Description 第一行输入一个整数数m为一个范围(如100)第二行输入一个整数k为目标孪生素数的公差(如6)输出描述 Output Description 每行输出一对,最后一行输出:原创 2017-05-31 21:45:07 · 373 阅读 · 0 评论 -
The Little Girl who Picks Mushrooms
It’s yet another festival season in Gensokyo. Little girl Alice planned to pick mushrooms in five mountains. She brought five bags with her and used different bags to collect mushrooms from different m原创 2017-09-14 18:07:27 · 253 阅读 · 0 评论 -
Palindrome HDU - 1513 (lcs变形)
A palindrome is a symmetrical string, that is, a string read identically from left to right as well as from right to left. You are to write a program which, given a string, determines the minimal numbe原创 2017-08-29 15:59:31 · 317 阅读 · 0 评论 -
HDU 1712 ACboy needs your help (分组背包)
Problem Description ACboy has N courses this term, and he plans to spend at most M days on study.Of course,the profit he will gain from different course depending on the days he spend on it.How to arr原创 2017-12-09 16:23:09 · 202 阅读 · 0 评论 -
Throwing Balls into the Baskets LightOJ - 1317 (巨水水题)
You probably have played the game “Throwing Balls into the Basket”. It is a simple game. You have to throw a ball into a basket from a certain distance. One day we (the AIUB ACMMER) were playing the ga原创 2017-10-26 22:07:59 · 258 阅读 · 0 评论 -
Common Subsequence HDU - 1159 (lcs简单dp)
Problem Description A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = #include <iostream> #include <cmath>#include <algorithm>原创 2017-08-29 15:43:07 · 241 阅读 · 0 评论 -
A. Odds and Ends Codeforces Round #431 (Div. 2)(水题)
Where do odds begin, and where do they end? Where does hope emerge, and will they ever break?Given an integer sequence a1, a2, …, an of length n. Decide whether it is possible to divide it into an odd原创 2017-09-02 21:09:43 · 449 阅读 · 0 评论 -
hdu 6197array array array(最长不下降子序列nlogn)
Problem Description One day, Kaitou Kiddo had stolen a priceless diamond ring. But detective Conan blocked Kiddo’s path to escape from the museum. But Kiddo didn’t want to give it back. So, Kiddo aske原创 2017-09-10 21:51:44 · 913 阅读 · 0 评论 -
hdu 6216 A Cubic number and A Cubic Number(打表找规律)
Problem Description A cubic number is the result of using a whole number in a multiplication three times. For example, 3×3×3=27 so 27 is a cubic number. The first few cubic numbers are 1,8,27,64 and 1原创 2017-09-17 23:10:25 · 538 阅读 · 0 评论 -
hdu1559 最大子矩阵
Problem Description 给你一个m×n的整数矩阵,在上面找一个x×y的子矩阵,使子矩阵中所有元素的和最大。Input 输入数据的第一行为一个正整数T,表示有T组测试数据。每一组测试数据的第一行为四个正整数m,n,x,y(0#include<cstdio> #include<cstring> #include<algorithm> #include<iostream>原创 2017-09-25 21:56:11 · 343 阅读 · 0 评论 -
hdu1081 To The Max(最大子矩阵和)
Problem Description Given a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1 x 1 or greater located within the whole array. The sum of a r原创 2017-09-25 20:19:07 · 230 阅读 · 0 评论 -
Sagheer, the Hausmeister CodeForces - 812B (简单dp)
Some people leave the lights at their workplaces on when they leave that is a waste of resources. As a hausmeister of DHBW, Sagheer waits till all students and professors leave the university building,原创 2017-08-29 21:08:08 · 444 阅读 · 0 评论 -
免费馅饼 HDU - 1176 (简单dp)
Problem Description 都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内。馅饼如果掉在了地上当然就不能吃了,所以gameboy马上卸下身上的背包去接。但由于小径两侧都不能站人,所以他只能在小径上接。由于gameboy平时老呆在房间里玩游戏,虽然在游戏中是个身原创 2017-08-29 20:08:15 · 287 阅读 · 0 评论 -
最大连续子序列 HDU - 1231(dp)
Problem Description 给定K个整数的序列{ N1, N2, …, NK },其任意连续子序列可表示为{ Ni, Ni+1, …, Nj },其中 1 <= i <= j <= K。最大连续子序列是所有连续子序列中元素和最大的一个, 例如给定序列{ -2, 11, -4, 13, -5, -2 },其最大连续子序列为{ 11, -4, 13 },最大和 为20。 在原创 2017-08-29 16:46:02 · 273 阅读 · 0 评论 -
codevs 2072 分配房间(贪心+二分)
题目描述 Description yh拥有一条街道,街道上共有n间房子,每间房子的坐标为xi(yh的房子比较神奇,可能重叠)。同时,yh有m个女朋友(这是事实),yh打算给每位女朋友分配一间房子。两个女朋友间的距离相隔越近,她们之间产生冲突的可能就越高。yh想尽可能的减小女朋友间的冲突,于是他打算让他的女朋友间的最小距离最大,你能帮yh找出这个最大值吗?输入描述 Input Description原创 2017-05-19 10:47:31 · 396 阅读 · 0 评论 -
codevs1009 产生数
题目描述 Description 给出一个整数 n(n<10^30) 和 k 个变换规则(k<=15)。 规则: 一位数可变换成另一个一位数: 规则的右部不能为零。 例如:n=234。有规则(k=2): 2-> 5 3-> 6 上面的整数 234 经过变换后可能产生出的整数为(包括原数): 234 534 264原创 2017-05-30 13:40:09 · 509 阅读 · 0 评论 -
codevs 1231 最优布线问题(最小生成树模板)
题目描述 Description 学校需要将n台计算机连接起来,不同的2台计算机之间的连接费用可能是不同的。为了节省费用,我们考虑采用间接数据传输结束,就是一台计算机可以间接地通过其他计算机实现和另外一台计算机连接。为了使得任意两台计算机之间都是连通的(不管是直接还是间接的),需要在若干台计算机之间用网线直接连接,现在想使得总的连接费用最省,让你编程计算这个最小的费用。输入描述 Input Des原创 2017-05-17 21:19:04 · 282 阅读 · 0 评论 -
2017 C4天梯 L2-017. 人以群分
题目描述 社交网络中我们给每个人定义了一个“活跃度”,现希望根据这个指标把人群分为两大类,即外向型(outgoing,即活跃度高的)和内向型(introverted,即活跃度低的)。要求两类人群的规模尽可能接近,而他们的总活跃度差距尽可能拉开。输入格式:输入第一行给出一个正整数N(2 <= N <= 105)。随后一行给出N个正整数,分别是每个人的活跃度,其间以空格分隔。题目保证这些数字以及它们的原创 2017-04-04 15:24:58 · 492 阅读 · 0 评论 -
2017 C4天梯 L2-019. 悄悄关注
题目描述 新浪微博上有个“悄悄关注”,一个用户悄悄关注的人,不出现在这个用户的关注列表上,但系统会推送其悄悄关注的人发表的微博给该用户。现在我们来做一回网络侦探,根据某人的关注列表和其对其他用户的点赞情况,扒出有可能被其悄悄关注的人。输入格式:输入首先在第一行给出某用户的关注列表,格式如下:人数N 用户1 用户2 …… 用户N其中N是不超过5000的正整数,每个“用户i”(i=1, …, N)是被原创 2017-04-04 15:13:01 · 665 阅读 · 0 评论 -
Prime Path POJ - 3126
Prime Path POJ - 3126题目描述 The ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit room numbers on their office原创 2017-04-01 20:44:17 · 429 阅读 · 0 评论 -
Sort the Array CodeForces - 451B
Sort the Array CodeForces - 451B题目描述 Being a programmer, you like arrays a lot. For your birthday, your friends have given you an array a consisting of n distinct integers.Unfortunately, the size of a原创 2017-03-23 20:53:36 · 346 阅读 · 0 评论 -
Exam CodeForces - 534A
Exam题目描述 An exam for n students will take place in a long and narrow room, so the students will sit in a line in some order. The teacher suspects that students with adjacent numbers (i and i + 1) alwa原创 2017-03-13 20:08:08 · 910 阅读 · 0 评论 -
Appleman and Card Game CodeForces - 462B
Appleman and Card Game CodeForces - 462B题目描述 Appleman has n cards. Each card has an uppercase letter written on it. Toastman must choose k cards from Appleman’s cards. Then Appleman should give Toastm原创 2017-03-22 14:09:25 · 424 阅读 · 0 评论 -
Laptops CodeForces - 456A
Laptops CodeForces - 456A题目描述 One day Dima and Alex had an argument about the price and quality of laptops. Dima thinks that the more expensive a laptop is, the better it is. Alex disagrees. Alex thin原创 2017-03-22 11:08:03 · 1051 阅读 · 0 评论 -
Table Decorations CodeForces - 478C
Table Decorations CodeForces - 478C题目描述 You have r red, g green and b blue balloons. To decorate a single table for the banquet you need exactly three balloons. Three balloons attached to some table s原创 2017-03-21 23:06:12 · 425 阅读 · 0 评论 -
George and Round CodeForces - 387B
George and Round CodeForces - 387B题目描述George decided to prepare a Codesecrof round, so he has prepared m problems for the round. Let’s number the problems with integers 1 through m. George estimates th原创 2017-02-03 23:09:06 · 660 阅读 · 0 评论 -
THE DRUNK JAILER POJ - 1218
THE DRUNK JAILER POJ - 1218题目描述 A certain prison contains a long hall of n cells, each right next to each other. Each cell has a prisoner in it, and each cell is locked. One night, the jailer gets b原创 2017-02-14 20:53:03 · 344 阅读 · 0 评论 -
The Dole Queue UVA - 133
The Dole Queue UVA - 133题目描述 In a serious attempt to downsize (reduce) the dole queue, The New National Green Labour Rhinoceros Party has decided on the following strategy. Every day all dole applica原创 2017-02-14 19:49:19 · 451 阅读 · 1 评论 -
2017 C4天梯 L1-039. 古风排版
题目描述 中国的古人写文字,是从右向左竖向排版的。本题就请你编写程序,把一段文字按古风排版。输入格式:输入在第一行给出一个正整数N(<100),是每一列的字符数。第二行给出一个长度不超过1000的非空字符串,以回车结束。输出格式:按古风格式排版给定的字符串,每列N个字符(除了最后一列可能不足N个)输入样例: 4 This is a test case 输出样例: asa T st ih原创 2017-04-04 20:09:52 · 721 阅读 · 0 评论