自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

小坏蛋_千千

I was caught in a heavy rain!

  • 博客(741)
  • 资源 (10)
  • 问答 (1)
  • 收藏
  • 关注

原创 POJ 3321 Apple Tree (树状数组)

Description There is an apple tree outside of kaka’s house. Every autumn, a lot of apples will grow in the tree. Kaka likes apple very much, so he has been carefully nurturing the big apple tree.

2017-08-19 19:43:52 358

原创 HDU 6146 Pokémon GO (dp)

Description 众所周知,度度熊最近沉迷于 Pokémon GO。 今天它决定要抓住所有的精灵球! 为了不让度度熊失望,精灵球已经被事先放置在一个2*N的格子上,每一个格子上都有一个精灵球。度度熊可以选择任意一个格子开始游戏,抓捕格子上的精灵球,然后移动到一个相邻的至少有一个公共点的格子上继续抓捕。例如,(2, 2) 的相邻格子有(1, 1), (2, 1

2017-08-18 21:22:33 920

原创 HDU 6143 Killer Names (容斥)

Description Galen Marek, codenamed Starkiller, was a male Human apprentice of the Sith Lord Darth Vader. A powerful Force-user who lived during the era of the Galactic Empire, Marek originated from t

2017-08-17 17:50:01 1637 15

原创 HDU 6121 Build a tree (技巧)

Description HazelFan wants to build a rooted tree. The tree has nn nodes labeled 00 to n−1n−1 , and the father of the node labeled ii is the node labeled ⌊i−1k⌋\lfloor\frac{i-1}{k}\rfloor. HazelFan w

2017-08-17 10:12:30 438

原创 HDU 6129 Just do it (组合数)

Description There is a nonnegative integer sequence a1…n of length n. HazelFan wants to do a type of transformation called prefix-XOR, which means a1…n changes into b1…n, where bi equals to the XOR v

2017-08-16 17:48:39 348

原创 BZOJ 2038 小Z的袜子 (莫队算法)

Description 作为一个生活散漫的人,小Z 每天早上都要耗费很久从一堆五颜六色的袜子中找出一双来穿。终于有一天,小Z 再也无法忍受这恼人的找袜子过程,于是他决定听天由命…… 具体来说, 小Z 把这 N 只袜子从 1 到 N 编号,然后从编号 L 到 R ( L 尽管 小Z 并不在意两只袜子是不是完整的一双,甚至不在意两只袜子是否一左一右,他却很在意袜子的颜色,毕竟穿两只不同色的

2017-08-16 11:52:45 379

原创 HDU 4609 3-idiots (FFT)

Description King OMeGa catched three men who had been streaking in the street. Looking as idiots though, the three men insisted that it was a kind of performance art, and begged the king to free them

2017-08-15 20:57:09 524

原创 HDU 6119 小小粉丝度度熊 (枚举 + 二分)

Description 度度熊喜欢着喵哈哈村的大明星——星星小姐。 为什么度度熊会喜欢星星小姐呢? 首先星星小姐笑起来非常动人,其次星星小姐唱歌也非常好听。 但这都不是最重要的,最重要的是,星星小姐拍的一手好代码! 于是度度熊关注了星星小姐的贴吧。 一开始度度熊决定每天都在星星小姐的贴吧里面签到。 但是度度熊是一个非常健忘的孩子,总有那

2017-08-14 11:22:56 483

原创 HDU 6118 度度熊的交易计划 (最小费用最大流)

Description 度度熊参与了喵哈哈村的商业大会,但是这次商业大会遇到了一个难题: 喵哈哈村以及周围的村庄可以看做是一共由n个片区,m条公路组成的地区。 由于生产能力的区别,第i个片区能够花费a[i]元生产1个商品,但是最多生产b[i]个。 同样的,由于每个片区的购买能力的区别,第i个片区也能够以c[i]的价格出售最多d[i]个物品。 由于这些因素,

2017-08-13 19:55:20 1238

原创 Codeforces 839 D. Winter is here (莫比乌斯反演)

Description Winter is here at the North and the White Walkers are close. John Snow has an army consisting of n soldiers. While the rest of the world is fighting for the Iron Throne, he is going to ge

2017-08-13 11:58:59 1495

原创 Codeforces 839 B. Game of the Rows (贪心)

Description Daenerys Targaryen has an army consisting of k groups of soldiers, the i-th group contains ai soldiers. She wants to bring her army to the other side of the sea to get the Iron Throne. Sh

2017-08-13 09:03:03 414

原创 HDU 6059 Kanade's trio (字典树)

Description Give you an array A[1..n]A[1..n] ,you need to calculate how many tuples (i,j,k)(i,j,k) satisfy that (i<j<k)(i<j<k) and ((A[i] xor A[j])<(A[j] xor A[k]))((A[i]\ xor\ A[j])<(A[j]\ xor\ A[k]

2017-08-12 19:25:45 525

原创 HDU 6070 Dirt Ratio (线段树+二分)

Description In ACM/ICPC contest, the ”Dirt Ratio” of a team is calculated in the following way. First let’s ignore all the problems the team didn’t pass, assume the team passed X problems during the

2017-08-11 16:13:52 350

原创 HDU 6103 Kirinriki (尺取法)

Description We define the distance of two strings A and B with same length n is disA,B=∑n−1i=0|Ai−Bn−1−i|dis_{A,B}=\sum_{i=0}^{n−1}|A_i−B_{n−1−i}| The difference between the two characters

2017-08-10 19:56:24 1388 5

原创 HDU 6058 Kanade's sum (技巧)

Description Give you an array A[1..n]A[1..n] of length nn . Let f(l,r,k)f(l,r,k) be the k-th largest element of A[l..r]A[l..r] . Specially , f(l,r,k)=0f(l,r,k)=0 if r−l+1<kr−l+1<k . G

2017-08-10 10:54:14 389

原创 HDU 6078 Wavel Sequence (dp)

Description Have you ever seen the wave? It’s a wonderful view of nature. Little Q is attracted to such wonderful thing, he even likes everything that looks like wave. Formally, he defines a sequence

2017-08-09 20:29:49 544

原创 HDU 6052 To my boyfriend (计数)

Description Dear Liao I never forget the moment I met with you. You carefully asked me: “I have a very difficult problem. Can you teach me?”. I replied with a smile, “of course”. You replied:”Gi

2017-08-09 15:02:21 392

原创 HDU 6069 Counting Divisors (素数)

Description In mathematics, the function d(n) denotes the number of divisors of positive integer n. For example, d(12)=6d(12)=6 because 1,2,3,4,6,121,2,3,4,6,12 are all 1212 ‘s divisors. In

2017-08-08 11:19:16 349

原创 『图论』LCA 最近公共祖先

转载记得告诉千千哦~同步更新:https://www.dreamwings.cn/lca/4874.html概述篇LCA (Least Common Ancestors) ,即最近公共祖先,是指这样的一个问题:在一棵有根树中,找出某两个节点 u 和 v 最近的公共祖先。 LCA 可分为在线算法与离线算法在线算法:指程序可以以序列化的方式一个一个处理输入,也就是说在一开始并不需要知道所有的输入。离

2017-08-07 19:56:17 4331 6

原创 BZOJ 2440 [中山市选2011]完全平方数 (容斥)

Description 小 X 自幼就很喜欢数。但奇怪的是,他十分讨厌完全平方数。他觉得这些数看起来很令人难受。由此,他也讨厌所有是完全平方数的正整数倍的数。然而这丝毫不影响他对其他数的热爱。 这天是小X的生日,小 W 想送一个数给他作为生日礼物。当然他不能送一个小 X 讨厌的数。他列出了所有小 X 不讨厌的数,然后选取了第 K 个数送给了小 X 。小 X 很开心地收下了。

2017-08-06 20:37:53 470

原创 51nod 1239 欧拉函数之和

描述 对正整数 n ,欧拉函数是小于或等于 n 的数中与 n 互质的数的数目。此函数以其首名研究者欧拉命名,它又称为 Euler’s totient function 、 φ 函数、欧拉商数等。例如:φ(8) = 4(Phi(8) = 4),因为 1,3,5,7 均和 8 互质。 S(n) = Phi(1) + Phi(2) + …… Phi(n),给出n,求S(n),例如:n = 5

2017-08-05 10:33:32 367

原创 51nod 1244 莫比乌斯函数之和

描述 莫比乌斯函数,由德国数学家和天文学家莫比乌斯提出。梅滕斯(Mertens)首先使用μ(n)(miu(n))作为莫比乌斯函数的记号。具体定义如下: 如果一个数包含平方因子,那么miu(n) = 0。例如:miu(4), miu(12), miu(18) = 0。 如果一个数不包含平方因子,并且有k个不同的质因子,那么miu(n) = (-1)^k。例如:miu(2), m

2017-08-04 20:39:57 433

原创 BZOJ 2301 [HAOI2011]Problem b (莫比乌斯反演)

Description 对于给出的 nn 个询问,每次求有多少个数对 (x,y)(x,y) ,满足 a≤x≤b,c≤y≤da≤x≤b,c≤y≤d ,且 gcd(x,y)=k\gcd(x,y) = k ,gcd(x,y)\gcd(x,y) 函数为 xx 和 yy 的最大公约数。 Input 第一行一个整数 nn ,接下来 nn 行每行五个整数,分别表示 a、b、c、d、ka、b、c、d、k

2017-08-04 15:07:42 348

原创 POJ 1681 Painter's Problem (高斯消元)

Description There is a square wall which is made of n×n small square bricks. Some bricks are white while some bricks are yellow. Bob is a painter and he wants to paint all the bricks yellow. But ther

2017-08-02 20:41:41 494

原创 POJ 2154 Color (Polya + 欧拉函数)

Description Beads of N colors are connected together into a circular necklace of N beads (N<=1000000000). Your job is to calculate how many different kinds of the necklace can be produced. You should

2017-08-02 11:47:46 406

原创 HDU 6041 I Curse Myself (仙人掌图)

Description There is a connected undirected graph with weights on its edges. It is guaranteed that each edge appears in at most one simple cycle. Assuming that the weight of a weighted spanning

2017-07-31 21:48:12 517

原创 『数论』乘法逆元

在求解除法取模问题 (a/b)%m(a/b)\%m 时,我们可以转化为 (a%(b×m))/b(a\%(b×m))/b ,但是如果 bb 很大,则会出现爆精度问题,所以我们避免使用除法直接计算。可以使用逆元将除法转换为乘法:假设 bb 存在乘法逆元,即与 mm 互质(充要条件)。设 cc 是 bb 的逆元,即 b×c≡1(mod m)b×c≡1(mod~m)那么有 a/b=(a/b)×1=(a/b)

2017-07-31 11:47:27 645

原创 HDU 3594 Cactus (仙人掌图、Tarjan)

Description It is a Strongly Connected graph. Each edge of the graph belongs to a circle and only belongs to one circle. We call this graph as CACTUS. There is an example as t

2017-07-30 17:05:19 571

原创 HDU 6044 Limited Permutation (组合数+逆元)

Description As to a permutation p1,p2,⋯,pn from 1 to n, it is uncomplicated for each 1≤i≤n to calculate (li,ri) meeting the condition that min(pL,pL+1,⋯,pR)=pi if and only if li≤L≤i≤R≤ri for each 1≤L

2017-07-30 12:54:40 630

原创 HDU 6047 Maximum Sequence (贪心)

Description Steph is extremely obsessed with “sequence problems” that are usually seen on magazines: Given the sequence 11, 23, 30, 35, what is the next number? Steph always finds them too easy for s

2017-07-28 18:16:12 591

原创 HDU 6053 TrickGCD (莫比乌斯函数)

Description You are given an array AA , and Zhu wants to know there are how many different array BB satisfy the following conditions? 1≤Bi≤Ai1≤B_i≤A_i For each pair(l,r) (1≤l≤r≤n)(1≤l≤r≤n)

2017-07-28 14:05:10 929

原创 HDU 6055 Regular polygon (找正方形)

Description On a two-dimensional plane, give you n integer points. Your task is to figure out how many different regular polygon these points can make. Input The input file consists of several tes

2017-07-27 18:37:26 1198

原创 HDU 6050 Funny Function (规律+逆元)

Description Function Fx,yF_{x,y} satisfies: F1,1=F1,2=1F_{1,1}=F_{1,2}=1 F1,i=F1,i−1+2∗F1,i−2 (i>=3)F_{1,i}=F_{1,i-1}+2*F_{1,i-2}\ (i>=3) Fi,j=∑j+N−1k=jFi−1,k (i>=2,j>=1)F_{i,j}=\sum_{

2017-07-27 18:32:07 933 4

原创 HDU 6040 Hints of sd0061 (技巧)

Description sd0061, the legend of Beihang University ACM-ICPC Team, retired last year leaving a group of noobs. Noobs have no idea how to deal with m coming contests. sd0061 has left a set of hints f

2017-07-27 11:25:09 938

原创 codevs 2370 小机房的树 (LCA)

Description 小机房有棵焕狗种的树,树上有N个节点,节点标号为0到N-1,有两只虫子名叫飘狗和大吉狗,分居在两个不同的节点上。有一天,他们想爬到一个节点上去搞基,但是作为两只虫子,他们不想花费太多精力。已知从某个节点爬到其父亲节点要花费 c 的能量(从父亲节点爬到此节点也相同),他们想找出一条花费精力最短的路,以使得搞基的时候精力旺盛,他们找到你要你设计一个程序来找到这条路,要求你告诉

2017-07-27 09:40:03 291

原创 HDU 6035 Colorful Tree (树形dp)

Description There is a tree with n nodes, each of which has a type of color represented by an integer, where the color of node i is ci. The path between each two different nodes is unique, of wh

2017-07-26 20:35:55 559

原创 HDU 6038 Function (数学)

Description You are given a permutation a from 0 to n−1 and a permutation b from 0 to m−1. Define that the domain of function f is the set of integers from 0 to n−1, and the range of it is the s

2017-07-26 14:11:26 1192

原创 HDU 6034 Balala Power! (贪心)

Description Talented Mr.Tang has n strings consisting of only lower case characters. He wants to charge them with Balala Power (he could change each character ranged from a to z into each numbe

2017-07-26 10:54:43 398

原创 codevs 1036 商务旅行 (LCA)

Description 某首都城市的商人要经常到各城镇去做生意,他们按自己的路线去做,目的是为了更好的节约时间。 假设有N个城镇,首都编号为1,商人从首都出发,其他各城镇之间都有道路连接,任意两个城镇之间如果有直连道路,在他们之间行驶需要花费单位时间。该国公路网络发达,从首都出发能到达任意一个城镇,并且公路网络不会存在环。 你的任务是帮助该商人计算一下他的最短旅行时间。 I

2017-07-25 10:23:42 533

原创 POJ 1470 Closest Common Ancestors (LCA)

Description Write a program that takes as input a rooted tree and a list of pairs of vertices. For each pair (u,v) the program determines the closest common ancestor of u and v in the tree. The close

2017-07-24 16:19:38 408

Spig 网站浮动小人 (javascript)

采用 Javascript 开发的网站前端浮动小人,具体效果可以见:https://www.dreamwings.cn 小人支持右键秘密链接,支持自动根据时间问候(早上好、中午好之类),支持自动间隔一段时间展示 hihokito 精美句子。

2018-06-17

OICQ 聊天室(Java 课程设计)

大二第一学期的 Java 课程设计,支持用户注册,单人聊天,多人聊天,支持好友列表,支持个人信息修改,数据库使用 mysql,采用 Java 开发。

2018-06-17

Little Giant (C++ 课程设计)

一款使用 cocos-2dx 开发的 io 类休闲游戏,仿“弓箭手大作战”,C++ 课程设计。(可在 win10 应用商店下载开玩) ---------------------------------------------------- 游戏名称: 进击的小巨人 游戏类型: 休闲类 3D 游戏 运行环境: Windows 7及以上、Linux、Android 4.0及以上、IOS、Windows 10 mobile 游戏引擎: Cocos2d-x 3.10

2018-06-17

Flow blog(数据库课程设计)

一款使用 Python django 开发的简易 CMS 内容管理系统 标记:大二 - 数据库课程设计 --- 这是一款简约、高效的博客系统,你可以利用它发表自己的文章,每一篇文章都必须要有一个分类,这是你应该创建的,不过文章的标签属性可以有多个。同时,游客可以对公开的文章进行评论,当然,你也可以回复他。 你可以创建自己的页面,这会在首页显示,不过遗憾的是,当页面太多的时候首页看起来会很奇怪,不过关于这一点我们会在以后修复它。 博客支持多用户同时注册并管理,不过新建用户的时候需要管理员的授权,管理员可以授予用户相应的管理权限,而用户则可以在满足权限的情况下把它授予给其他人。为了管理方便,我们引入了组的概念,对组进行授权相当于我们对组内的所有用户进行授权。

2018-06-17

Codeforces Edu Hacking

使用 C# + WPF 开发 --- 还在发愁打了那么多场比赛都没有进入首页么? 还在为了前 5 的 hacker 名额阅读千份代码么? 是的,你没有看错! 这是一个 Edu & Div.3 轮 Open hacking 错误代码自动查找器! 你只需要提前构造好某些题的叉点数据,填入它,OK!一切就是这么的方便! 注:仅适用于 Edu 以及 Div.3 轮比赛赛后 hack,不支持 Div.1/2 赛时 hack。 适用人群:想进入首页 Hack 榜的选手

2018-06-17

HDU 自动 AC 机(Python)

一款 HDU OJ 的自动刷题工具,搜索来源可选用 百度搜索 / 必应搜索,支持并行以及串行查找,祝早日刷上航电首页哦~ 使用 Python 编写,执行之前你需要在同目录下创建文件 aclog.txt ,然后粘贴进你目前已经 AC 的题目,然后在代码执行过程中便不会去再查找这些题了。

2018-06-17

黑白棋 (Reversi)

大一的课程设计,写的是一个黑白棋,也就是这个,支持单人模式,双人模式,联机对战,电脑演示等功能,也是千千做的最好的一个啦!easyx图形界面,目前仅是单线程运行。

2016-10-30

一个人的时光

一个人的时光,终究只是一个人,这是一个用GBK语言编写的脚本小游戏,欢迎大家来下载哦!

2016-02-04

黑客帝国C语言

动态效果,黑客帝国 #include <windows.h> #define ID_TIMER 1 #define STRMAXLEN 25 //一个显示列的最大长度 #define STRMINLEN 8 //一个显示列的最小长度 LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ; typedef struct tagCharChain //整个当作屏幕的一个显示列,这是个双向列表 { struct tagCharChain *prev; //链表的前个元素 TCHAR ch; //一个显示列中的一个字符 struct tagCharChain *next; //链表的后个元素 } CharChain, *pCharChain; typedef struct tagCharColumn { CharChain *head, *current, *point; int x, y, iStrLen; //显示列的开始显示的x,y坐标,iStrLen是这个列的长度 int iStopTimes, iMustStopTimes; //已经停滞的次数和必须停滞的次数,必须停滞的次数是随机的 } CharColumn, *pCharColumn; /***********************/ ..................... ...................

2016-01-07

VC绘图库Easyx

EasyX 是 Visual C++ 平台的绘图库(静态 LIB),用以在 Visual C++ 中模拟 Turbo C 的绘图库头文件 ,并实现对 32 位和 64 位 Windows 的支持,解决了Turbo C 由于使用 16 位的 BGI 绘图库不支持 Windows 的问题。同时,EasyX 针对 Windows 的特点,在色彩范围、分辨率、鼠标、批量绘图等方面做了相应的函数扩展。

2016-01-05

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

TA关注的人

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