自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(91)
  • 资源 (1)
  • 收藏
  • 关注

原创 2020CSP-J普及组复赛(民间数据)——直播获奖(live)

题目:NOI2130 即将举行。为了增加观赏性,CCF 决定逐一评出每个选手的成绩,并直播即时的获奖分数线。本次竞赛的获奖率为 ????%w%,即当前排名前 ????%w%的选手的最低成绩就是即时的分数线。更具体地,若当前已评出了 ????p 个选手的成绩,则当前计划获奖人数为 max(1, ⌊???? × ????%⌋)max(1,⌊p×w%⌋),其中 ????w 是获奖百分比,⌊????⌋⌊x⌋ 表示对 ????x 向下取整, max(????, ????)max(x,y) 表示 ????x 和

2020-11-11 21:43:43 2209

原创 UVA11464-Even Parity

We have a grid of size N × N. Each cell of the grid initially contains a zero(0) or a one(1). The parityof a cell is the number of 1s surrounding that cell. A cell is surrounded by at most 4 cells (top, bottom,left, right).Suppose we have a grid of size

2020-09-26 12:29:30 114

原创 UVA11300-Spreading the Wealth

题目A Communist regime is trying to redistribute wealth in a village. They have have decided to sit everyonearound a circular table. First, everyone has converted all of their properties to coins of equal value,such that the total number of coins is divis

2020-09-22 19:01:08 128 1

原创 HDU6030-Happy Necklace

递推+矩阵快速幂题目:题意:分析:(1)写出前几项,找规律:(2)我们逐步分析,从递归的角度出发:代码:题目:Little Q wants to buy a necklace for his girlfriend. Necklaces are single strings composed of multiple red and blue beads.Little Q desperately wants to impress his girlfriend, he knows that she will

2020-09-06 19:47:00 93

原创 利用JS的Canves实现打砖块小游戏

转眼又期末了,朋友的作业就是用JS的canves实现打砖块小游戏,但是她作业蛮多的,有点忙不过来,所以就让我帮帮敲了这东西!!!效果图:做出来之后还被你找出了许多的BUG,惭愧啊!画砖块: for(var i=0;i<10;i++) { for(var j=0;j<grade;j++) { if(brick[i][j]==1) { var brick_x=brick_margin+i*(brick_margin+brick_width); var

2020-06-28 13:11:04 1792

原创 POJ1185-炮兵阵地(状态压缩)

司令部的将军们打算在NM的网格地图上部署他们的炮兵部队。一个NM的地图由N行M列组成,地图的每一格可能是山地(用"H" 表示),也可能是平原(用"P"表示),如下图。在每一格平原地形上最多可以布置一支炮兵部队(山地上不能够部署炮兵部队);一支炮兵部队在地图上的攻击范围如图中黑色区域所示:如果在地图中的灰色所标识的平原上部署一支炮兵部队,则图中的黑色的网格表示它能够攻击到的区域:沿横向左右各两格,沿纵向上下各两格。图上其它白色网格均攻击不到。从图上可见炮兵的攻击范围不受地形的影响。现在,将军们规划如何部

2020-05-27 20:36:37 238

原创 HDU4539-郑厂长系列故事——排兵布阵

郑厂长不是正厂长  也不是副厂长  他根本就不是厂长  事实上  他是带兵打仗的团长一天,郑厂长带着他的军队来到了一个nm的平原准备布阵。  根据以往的战斗经验,每个士兵可以攻击到并且只能攻击到与之曼哈顿距离为2的位置以及士兵本身所在的位置。当然,一个士兵不能站在另外一个士兵所能攻击到的位置,同时因为地形的原因平原上也不是每一个位置都可以安排士兵。  现在,已知n,m 以及平原阵地的具体地形,请你帮助郑厂长计算该阵地,最多能安排多少个士兵。Input输入包含多组测试数据;每组数据的第一行

2020-05-26 20:36:54 376

原创 HDU3182-Hamburger Magi(状态压缩)

In the mysterious forest, there is a group of Magi. Most of them like to eat human beings, so they are called “The Ogre Magi”, but there is an special one whose favorite food is hamburger, having been jeered by the others as “The Hamburger Magi”.Let’s giv

2020-05-23 22:03:26 274

原创 HDU2167-Pebbles(状态压缩)

You’re given an unlimited number of pebbles to distribute across an N x N game board (N drawn from [3, 15]), where each square on the board contains some positive point value between 10 and 99, inclusive. A 6 x 6 board might look like this:The player dis

2020-05-20 15:23:53 236

原创 HDU1074-Doing Homework(状态压缩)

Ignatius has just come back school from the 30th ACM/ICPC. Now he has a lot of homework to do. Every teacher gives him a deadline of handing in the homework. If Ignatius hands in the homework after the deadline, the teacher will reduce his score of the fin

2020-05-18 19:19:49 221

原创 HDU3001-Travelling(三进制+状态压缩)

After coding so many days,Mr Acmer wants to have a good rest.So travelling is the best choice!He has decided to visit n cities(he insists on seeing all the cities!And he does not mind which city being his start station because superman can bring him to any

2020-05-17 16:23:08 139

原创 POJ3254-Corn Fields(状态压缩)

Farmer John has purchased a lush new rectangular pasture composed of M by N (1 ≤ M ≤ 12; 1 ≤ N ≤ 12) square parcels. He wants to grow some yummy corn for the cows on a number of squares. Regrettably, some of the squares are infertile and can’t be planted.

2020-05-16 16:15:37 100

原创 HDU5658-Problem B(斐波拉契数列)

度熊面前有一个全是由1构成的字符串,被称为全1序列。你可以合并任意相邻的两个1,从而形成一个新的序列。对于给定的一个全1序列,请计算根据以上方法,可以构成多少种不同的序列。Input这里包括多组测试数据,每组测试数据包含一个正整数N,代表全1序列的长度。1≤N≤200Output对于每组测试数据,输出一个整数,代表由题目中所给定的全1序列所能形成的新序列的数量。Sample Input135Sample Output138Hint如果序列是:(111)。可以构造出如下三个新序列

2020-05-12 23:23:14 143

原创 HDU5666-Segment(大数水题)

Silen August does not like to talk with others.She like to find some interesting problems.Today she finds an interesting problem.She finds a segment x+y=q.The segment intersect the axis and produce a delta.She links some line between (0,0) and the node .

2020-05-12 16:34:04 171

原创 HDU1316-How Many Fibs?(斐波拉契数的个数,大数计算)

Recall the definition of the Fibonacci numbers:f1 := 1f2 := 2fn := fn-1 + fn-2 (n >= 3)Given two numbers a and b, calculate how many Fibonacci numbers are in the range [a, b].InputThe input contains several test cases. Each test case consists of t

2020-05-11 14:19:48 121

原创 HDU1063-Exponentiation(大数的计算)

Problems involving the computation of exact values of very large magnitude and precision are common. For example, the computation of the national debt is a taxing experience for many computer systems.This problem requires that you write a program to compu

2020-05-08 23:55:05 129

原创 HDU1047-Integer Inquiry(大数求和)

One of the first users of BIT’s new supercomputer was Chip Diller. He extended his exploration of powers of 3 to go from 0 to 333 and he explored taking various sums of those numbers.This supercomput...

2020-05-07 23:20:14 160

原创 HDU1042-N!(高精度算法)

Given an integer N(0 ≤ N ≤ 10000), your task is to calculate N!InputOne N in one line, process to the end of file.OutputFor each N, output N! in one line.Sample Input123Sample Output126分析...

2020-05-07 22:54:44 126

原创 HDU1520-Anniversary party(树状DP)

There is going to be a party to celebrate the 80-th Anniversary of the Ural State University. The University has a hierarchical structure of employees. It means that the supervisor relation forms a tr...

2020-05-02 17:00:02 115

原创 POJ2955-Brackets(区间DP)

We give the following inductive definition of a “regular brackets” sequence:the empty sequence is a regular brackets sequence,if s is a regular brackets sequence, then (s) and [s] are regular bracke...

2020-05-01 17:53:37 134

原创 POJ1141-Brackets Sequence(区间DP)

Let us define a regular brackets sequence in the following way:Empty sequence is a regular sequence.If S is a regular sequence, then (S) and [S] are both regular sequences.If A and B are regular s...

2020-05-01 17:11:06 217

原创 HDU5115-Dire Wolf(区间DP)

Dire wolves, also known as Dark wolves, are extraordinarily large and powerful wolves. Many, if not all, Dire Wolves appear to originate from Draenor.Dire wolves look like normal wolves, but these cr...

2020-04-30 10:58:15 115

原创 HDU4745-Two Rabbits(区间DP)

Long long ago, there lived two rabbits Tom and Jerry in the forest. On a sunny afternoon, they planned to play a game with some stones. There were n stones on the ground and they were arranged as a cl...

2020-04-29 17:45:38 133

原创 HDU2476-String painter(区间DP)

There are two strings A and B with equal length. Both strings are made up of lower case letters. Now you have a powerful string painter. With the help of the painter, you can change a segment of chara...

2020-04-26 20:41:44 126

原创 HDU4632-Palindrome subsequence(区间DP)

In mathematics, a subsequence is a sequence that can be derived from another sequence by deleting some elements without changing the order of the remaining elements. For example, the sequence <A, B...

2020-04-26 15:27:36 125

原创 HDU4283-You Are the One(区间DP)

The TV shows such as You Are the One has been very popular. In order to meet the need of boys who are still single, TJUT hold the show itself. The show is hold in the Small hall, so it attract a lot o...

2020-04-25 21:48:55 125

原创 HDU3506-Monkey Party(区间DP+四边形优化)

Far away from our world, there is a banana forest. And many lovely monkeys live there. One day, SDH(Song Da Hou), who is the king of banana forest, decides to hold a big party to celebrate Crazy Banan...

2020-04-25 14:52:14 201

原创 POJ3280-Cheapest Palindrome

Keeping track of all the cows can be a tricky task so Farmer John has installed a system to automate it. He has installed on each cow an electronic ID tag that the system will read as the cows pass by...

2020-04-24 16:46:51 90

原创 POJ1080-Human Gene Functions(LCS)

It is well known that a human gene can be considered as a sequence, consisting of four nucleotides, which are simply denoted by four letters, A, C, G, and T. Biologists have been interested in identif...

2020-04-23 23:12:59 169

原创 HDU1503-Advanced Fruits(LCS)

The company “21st Century Fruits” has specialized in creating new sorts of fruits by transferring genes from one fruit into the genome of another one. Most times this method doesn’t work, but sometime...

2020-04-22 21:29:23 126

原创 HDU1257-最少拦截系统(LIS)

某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统.但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能超过前一发的高度.某天,雷达捕捉到敌国的导弹来袭.由于该系统还在试用阶段,所以只有一套系统,因此有可能不能拦截所有的导弹.怎么办呢?多搞几套系统呗!你说说倒蛮容易,成本呢?成本是个大问题啊.所以俺就到这里来求救了,请帮助计算一下最少需要多少套拦截系统....

2020-04-20 16:36:57 89

原创 POJ1239-Increasing Sequences(两次DP)

Given a string of digits, insert commas to create a sequence of strictly increasing numbers so as to minimize the magnitude of the last number. For this problem, leading zeros are allowed in front of ...

2020-04-20 16:05:04 405

原创 蓝桥杯模拟赛 摆动序列 题目+题解

题目问题描述如果一个序列的奇数项都比前一项大,偶数项都比前一项小,则称为一个摆动序列。即 a[2i]<a[2i-1], a[2i+1]>a[2i]。  小明想知道,长度为 m,每个数都是 1 到 n 之间的正整数的摆动序列一共有多少个。输入格式输入一行包含两个整数 m,n。输出格式输出一个整数,表示答案。答案可能很大,请输出答案除以10000的余数。样例输入3 4样...

2020-04-19 18:47:19 457 2

原创 HDU4352-XHXJ's LIS(LIS+状态压缩)

#define xhxj (Xin Hang senior sister(学姐))If you do not know xhxj, then carefully reading the entire description is very important.As the strongest fighting force in UESTC, xhxj grew up in Jintang, a...

2020-04-13 22:12:51 193

原创 HDU1087-Super Jumping! Jumping! Jumping!(LIS)

Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about this game, so I introduce it to you now.The game can b...

2020-04-09 18:20:24 94

原创 HDU1003-Max Sum(LIS)

Given a sequence a[1],a[2],a[3]…a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max sum in this sequence is 6 + (-1) + 5 + 4 = 14.InputThe first l...

2020-04-08 21:42:47 80

原创 HDU1159-Common Subsequence(LIS+滚动数组)

A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = <x1, x2, …, xm> another sequence Z = <z1, z2, …, zk> is a subseque...

2020-04-08 20:59:33 118

原创 HDU5119-Happy Matt Friends(DP+滚动数组)

Matt has N friends. They are playing a game together.Each of Matt’s friends has a magic number. In the game, Matt selects some (could be zero) of his friends. If the xor (exclusive-or) sum of the sel...

2020-04-08 16:20:45 109

原创 HDU4576-Robot(概率DP+滚动数组)

Michael has a telecontrol robot. One day he put the robot on a loop with n cells. The cells are numbered from 1 to n clockwise.At first the robot is in cell 1. Then Michael uses a remote control to ...

2020-04-06 20:49:03 154

原创 POJ1170-Shopping Offers(状态压缩)

In a shop each kind of product has a price. For example, the price of a flower is 2 ICU (Informatics Currency Units) and the price of a vase is 5 ICU. In order to attract more customers, the shop int...

2020-04-06 15:20:19 302

JS使用canves实现 打砖块.zip

使用JS的canves实现打砖块小游戏,有多个关卡,具有计时功能,具有计分功能,有记录等级的功能,能够记录历史最高分以及时间。

2020-06-28

空空如也

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

TA关注的人

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