自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(21)
  • 收藏
  • 关注

原创 CSU暑期集训day09_D_贪心

题目: Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea side. And any radar installation, locating...

2018-07-31 17:37:51 168

原创 CSU暑期集训day08_BFS

题目: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 offices. — It is a matter ...

2018-07-31 08:47:30 213

原创 CSU暑期集训day06_平衡等式

题目:写一个程序要求当输入在整数范围内的一个整数R后, 计算机便会检查,在下式□处能否填上“+”、“-”或“×”号凑成相应等式。如能凑成,则印出所有这些等式的个数。注意,考虑符号的优先级。 1□2□3□4□5□6□7□8□9=RInput只有一行,就是一个整数R。Output只有一行,就是使等式成立的个数。Sample Input20Sample Output3...

2018-07-29 14:30:10 350

原创 CSU暑期集训day05_DFS_N皇后问题

题目:在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。 你的任务是,对于给定的N,求出有多少种合法的放置方法。Input共有若干行,每行一个正整数N≤10,表示棋盘和皇后的数量;如果N=0,表示结束。Output共有若干行,每行一个正整数,表示对应输入行的皇后的不同放置数量。Sample...

2018-07-27 21:13:12 119

原创 CSU暑期集训day05_DFS_单源最大权路径

题目:有一棵由N个结点构成的树,每一条边上都有其对应的权值。现在给定起点,求从该点出发的一条路径(至少有一条边)使得这条路径上的权值之和最大,并输出这个最大值。Input第一行一个正整数T,代表数据组数。每组数据第一行两个正整数n(2<=n<=10^5),s(1<=s<=n),分别表示树结点数目以及给定的起点,点的编号从1至N。接下来M行,每行三个整数x,y,z...

2018-07-27 21:01:52 146

原创 CSU暑期集训day05_机器人模拟

题目:A robot has been programmed to follow the instructions in its path. Instructions for the next direction the robot is to move are laid down in a grid. The possible instructions are N north (up ...

2018-07-27 20:42:14 269

原创 CSU暑期集训day04_递推_动态规划_抽奖概率

题目:HDU 2006'10 ACM contest的颁奖晚会隆重开始了! 为了活跃气氛,组织者举行了一个别开生面、奖品丰厚的抽奖活动,这个活动的具体要求是这样的: 首先,所有参加晚会的人员都将一张写有自己名字的字条放入抽奖箱中; 然后,待所有字条加入完毕,每人从箱中取一个字条; 最后,如果取得的字条上写的就是自己的名字,那么“恭喜你,中奖了!” 大家可以想象一下当时的气氛之热烈,毕...

2018-07-26 21:03:42 224

原创 CSU暑期集训day04_动态规划_赛马

题目:    Disky and Sooma, two of the biggest mega minds of Bangladesh went to a far country. They ate, coded and wandered around, even in their holidays. They passed several months in this way. But ev...

2018-07-26 20:27:09 162

原创 CSU暑期集训day04_递推_动态规划

题目:Consider all the sequences with length (0 <  N < 44), containing only the elements 0 and 1, and no two ones are adjacent (110 is not a valid sequence of length 3, 0101 is a valid sequence o...

2018-07-26 20:00:16 130

原创 ACM暑期集训day03_极角

题目:You are given the set of vectors on the plane, each of them starting at the origin. Your task is to find a pair of vectors with the minimal non-oriented angle between them.Non-oriented angle is...

2018-07-25 16:06:37 227

原创 CSU暑期集训day03_Queries about less or equal elements

题目:You are given two arrays of integers a and b. For each element of the second array bj you should find the number of elements in array athat are less than or equal to the value bj.InputThe fir...

2018-07-25 15:54:51 231

原创 CSU暑期集训day02_J_三分法例题

题目:Now, here is a fuction:   F(x) = 6 * x^7+8*x^6+7*x^3+5*x^2-y*x (0 <= x <=100) Can you find the minimum value when x is between 0 and 100.InputThe first line of the input contains an i...

2018-07-24 19:59:46 155 1

原创 CSU暑期集训day02_G_修路翻题

题目:作为老人的小明非常忧伤,因为他马上要被流放到本部去了,住进全左家垅最有历史感的11舍真是一件非常荣幸的事情。搬行李是个体力活,小明发现自己的行李太多啦,所以他决定去买很多个袋子来装走。到了超市的小明发现,不同大小的袋子居然价格一样???虽然买最大的自然最赚,但是小明是名远近闻名的环保人士,他觉得袋子只要能装下他的行李就够了,并且为了不麻烦收银的小姐姐(⊙o⊙)…,他也只会购买同一种大小...

2018-07-24 19:51:32 163

原创 CSU暑期集训day02_C_浮点数二分

题目:Now,given the equation 8*x^4 + 7*x^3 + 2*x^2 + 3*x + 6 == Y,can you find its solution between 0 and 100; Now please try your lucky.InputThe first line of the input contains an integer T(1&lt...

2018-07-24 19:46:34 793

原创 ACM暑期集训day02_修路

题目:前段时间,某省发生干旱,B山区的居民缺乏生活用水,现在需要从A城市修一条通往B山区的路。假设有A城市通往B山区的路由m条连续的路段组成,现在将这m条路段承包给n个工程队(n ≤ m ≤ 300)。为了修路的便利,每个工程队只能分配到连续的若干条路段(当然也可能只分配到一条路段或未分配到路段)。假设每个工程队修路的效率一样,即每修长度为1的路段所需的时间为1。现在给出路段的数量m,工程队的...

2018-07-24 19:39:23 145

原创 CSU暑期集训day02_A_二分法例题

题目:Give you three sequences of numbers A, B, C, then we give you a number X. Now you need to calculate if you can find the three numbers Ai, Bj, Ck, which satisfy the formula Ai+Bj+Ck = X. Input...

2018-07-24 19:29:58 289

原创 CSU暑期集训day01_H_Compound Words

题目:    You are to find all the two-word compound words in a dictionary. A two-word compound word is a word in the dictionary that is the concatenation of exactly two other words in the dictionary....

2018-07-24 08:41:40 176

原创 CSU暑期集训day01_G_Ignatius and the Princess II

题目:Now our hero finds the door to the BEelzebub feng5166. He opens the door and finds feng5166 is about to kill our pretty Princess. But now the BEelzebub has to beat our hero first. feng5166 says, ...

2018-07-23 20:52:33 152

原创 CSU暑期集训day01_F_Misha and Changing Handles

题目:Misha 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. But each new handle must not be equal to any han...

2018-07-23 20:41:45 167

原创 CSU暑期集训day01_E_Ugly Numbers

题目:    Ugly numbers are numbers whose only prime factors are 2, 3 or 5. The sequence 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, ... shows the first 11 ugly numbers. By convention, 1 is included. Write a pr...

2018-07-23 20:14:30 173

原创 CSU暑期集训day01_B_Where is the Marble?

题目:    Raju and Meena love to play with Marbles. They have got a lot of marbles with numbers written on them. At the beginning, Raju would place the marbles one after another in ascending order of t...

2018-07-23 19:51:55 128

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除