自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Codeforces-1250-H. Happy Birthday(思维+枚举)

H. Happy BirthdayYou have a set of birthday cake candles. Each of such candles represents a digit between 0 and 9, inclusive.Example of birthday cake candles.Let’s denote the candle representing th...

2019-10-29 22:04:18 753

原创 Codeforces-1249-B2. Books Exchange (hard version)(并查集/找规律)

B2. Books Exchange (hard version)The only difference between easy and hard versions is constraints.There are n kids, each of them is reading a unique book. At the end of any day, the i-th kid will g...

2019-10-29 17:08:40 267

原创 Codeforces1247-C. p-binary(找规律+枚举)

C. p-binaryVasya will fancy any number as long as it is an integer power of two. Petya, on the other hand, is very conservative and only likes a single integer p (which may be positive, negative, or ...

2019-10-29 16:57:47 507

原创 Codeforces-1234-D. Distinct Characters Queries(莫队/线段树)

D. Distinct Characters QueriesYou are given a string s consisting of lowercase Latin letters and q queries for this string.Recall that the substring s[l;r] of the string s is the string slsl+1…sr. F...

2019-10-29 16:46:23 310

原创 Codeforces-1249-E. By Elevator or Stairs?(简单二维DP)

E. By Elevator or Stairs?You are planning to buy an apartment in a n-floor building. The floors are numbered from 1 to n from the bottom to the top. At first for each floor you want to know the minim...

2019-10-29 16:42:02 206

原创 Codeforces-1251-C. Minimize The Integer(找规律+贪心)

C. Minimize The IntegerYou are given a huge integer a consisting of n digits (n is between 1 and 3⋅105, inclusive). It may contain leading zeros.You can swap two digits on adjacent (neighboring) pos...

2019-10-29 16:34:15 424

原创 Codeforces-1249-D2. Too Many Segments (hard version)(线段树+优先队列)

D2. Too Many Segments (hard version)The only difference between easy and hard versions is constraints.You are given n segments on the coordinate axis OX. Segments can intersect, lie inside each othe...

2019-10-24 22:11:49 241

原创 CCPC-2019-哈尔滨站(部分题解)

Problem F. Fixing Banners代码:#include<bits/stdc++.h>using namespace std;int a[10005];int main(){ int t; string s[6]; int mark[6][6]; cin>>t; while(t--) { ...

2019-10-13 15:51:05 1317

原创 HDU-2577-How to Type(DP+枚举)

How to TypeProblem DescriptionPirates have finished developing the typing software. He called Cathy to test his typing software. She is good at thinking. After testing for several days, she finds th...

2019-10-10 19:48:47 130

原创 HDU-1203-I NEED A OFFER!(简单DP)

I NEED A OFFER!Problem DescriptionSpeakless很早就想出国,现在他已经考完了所有需要的考试,准备了所有要准备的材料,于是,便需要去申请学校了。要申请国外的任何大学,你都要交纳一定的申请费用,这可是很惊人的。Speakless没有多少钱,总共只攒了n万美元。他将在m个学校中选择若干的(当然要在他的经济承受范围内)。每个学校都有不同的申请费用a(万美元),并...

2019-10-10 18:41:34 193

转载 HDU-DP题不完全汇总

Robberies http://acm.hdu.edu.cn/showproblem.php?pid=2955背包;第一次做的时候把概率当做背包(放大100000倍化为整数):在此范围内最多能抢多少钱 最脑残的是把总的概率以为是抢N家银行的概率之和… 把状态转移方程写成了f[j]=max{f[j],f[j-q[i].v]+q[i].money}(f[j]表示在概率j之下能抢的大洋);正确的...

2019-10-10 16:56:13 219

原创 HDU-1176-免费馅饼(简单DP)

免费馅饼Problem Description都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内。馅饼如果掉在了地上当然就不能吃了,所以gameboy马上卸下身上的背包去接。但由于小径两侧都不能站人,所以他只能在小径上接。由于gameboy平时老呆在房间里玩游戏,虽然在游...

2019-10-10 16:50:32 203

原创 HDU-1069-Monkey and Banana(DP+排序)

Monkey and BananaProblem DescriptionA group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof of a building, and at the mean time, provide th...

2019-10-10 15:42:29 174

原创 HDU-2571-命运(简单DP)

命运Problem Description穿过幽谷意味着离大魔王lemon已经无限接近了!可谁能想到,yifenfei在斩杀了一些虾兵蟹将后,却再次面临命运大迷宫的考验,这是魔王lemon设下的又一个机关。要知道,不论何人,若在迷宫中被困1小时以上,则必死无疑!可怜的yifenfei为了去救MM,义无返顾地跳进了迷宫。让我们一起帮帮执着的他吧!命运大迷宫可以看成是一个两维的方格阵列,如下...

2019-10-10 14:39:51 118

原创 HDU-1087-Super Jumping! Jumping! Jumping!(简单DP)

Super Jumping! Jumping! Jumping!Problem DescriptionNowadays, 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 th...

2019-10-10 12:19:57 117

原创 HDU-1505-City Game(还是单调栈模板题)

City GameProblem DescriptionBob is a strategy game programming specialist. In his new city building game the gaming environment is as follows: a city is built up by areas, in which there are streets...

2019-10-09 21:10:37 105

原创 HDU-1506-Largest Rectangle in a Histogram(单调栈模板题)

Largest Rectangle in a HistogramProblem DescriptionA histogram is a polygon composed of a sequence of rectangles aligned at a common base line. The rectangles have equal widths but may have differen...

2019-10-09 20:41:39 108

原创 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 },最...

2019-10-09 19:52:57 155

原创 HDU-2182-Frog(简单DP)

FrogProblem DescriptionA little frog named Fog is on his way home. The path’s length is N (1 <= N <= 100), and there are many insects along the way. Suppose theoriginal coordinate of Fog is 0...

2019-10-09 18:41:40 319

原创 HDU-1422-重温世界杯(仿佛是个DP)

重温世界杯Problem Description世界杯结束了,意大利人连本带利的收回了法国人6年前欠他们的债,捧起了大力神杯,成就了4星意大利.世界杯虽然结束了,但是这界世界杯给我们还是留下许多值得回忆的东西.比如我们听到了黄名嘴的3分钟激情解说,我们懂得了原来可以向同一个人出示3张黄牌,我们还看到了齐达内的头不仅能顶球还能顶人…………介于有这么多的精彩,xhd决定重温德国世界杯,当然只是...

2019-10-08 20:51:06 80

原创 求两点间距离

float get_abs(float x1,float x2){ return x1-x2 > 0 ? x1-x2 : x2-x1;}float get_dis(float x1,float y1,float x2,float y2){ return sqrt(get_abs(x1,x2)*get_abs(x1,x2) + get_abs(y1,y2)*get_a...

2019-10-08 19:32:07 346

原创 牛客-被3整除的子序列(DP)

链接:https://ac.nowcoder.com/acm/problem/21302来源:牛客网被3整除的子序列题目描述给你一个长度为50的数字串,问你有多少个子序列构成的数字可以被3整除答案对1e9+7取模链接:https://ac.nowcoder.com/acm/problem/21302来源:牛客网示例1输入复制132输出复制3示例2输入复制9输出...

2019-10-03 15:16:42 314

原创 CSDN博客自动美化工具(支持HDU,POJ,Codeforces)

Github传送门 ~~本文目前只针对Codeforces到CSDN博客的转化有效(后期可能会追加其他各类OJ的处理工具)使用方法创建一个文件夹,里面放上代码也就是xx.py文件,再创建一个in.txt文件,使用时把题目页面的内容(题目标题,示例输入输出,以及note)整个复制到in.txt文件,然后点击xx.py文件运行程序,之后就会在文件夹里生成一个out.txt文件,就是处理后的文本...

2019-10-03 11:30:58 335

原创 Codeforces-1234-C. Pipes(DFS)

C. PipesYou are given a system of pipes. It consists of two rows, each row consists of n pipes. The top left pipe has the coordinates (1,1) and the bottom right — (2,n).There are six types of pipes:...

2019-10-03 11:15:51 362

原创 C语言实现俄罗斯方块(非图形界面)

#include "windows.h"#include <stdlib.h>#include <stdio.h>#include <time.h>#define Aplay 49#define Mplay 50#define EXIT 51#define UP 72#define DOWN 80#define LEFT ...

2019-10-02 22:41:56 417

原创 C语言实现贪吃蛇(非图形界面)

#include <stdio.h>#include <windows.h>#include <stdlib.h>#include <time.h>#include <conio.h>#define MAXLENTH 2000struct score { int current_score; char name[30];...

2019-10-02 22:40:20 493

原创 快速幂+快速乘模板

typedef long long ll;const ll mod = 1000000007;ll q_mul(ll a,ll b,ll mod) // 快速乘{ ll res = 0; ll tmp = b; ll tmp1 = a; while(tmp) { if(tmp&1) res = ((res%mod) + (tm...

2019-10-01 17:32:39 98

BaiduPCS-Go

百度PCS-Go 百度网盘助手 不限速下载 命令行界面 Go 语言编写

2018-11-17

空空如也

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

TA关注的人

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