自定义博客皮肤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!

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

原创 POJ 3254 Corn Fields (状压dp)

Description 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.

2017-08-31 21:57:50 258

原创 Codeforces 842 D. Vitya and Strange Lesson (trie)

Description Today at the lesson Vitya learned a very interesting function — mex. Mex of a sequence of numbers is the minimum non-negative number that is not present in the sequence as element. For ex

2017-08-30 16:17:51 1249

原创 Codeforces 842 C. Ilya And The Tree (dfs)

Description Ilya is very fond of graphs, especially trees. During his last trip to the forest Ilya found a very interesting tree rooted at vertex 1. There is an integer number written on each vertex

2017-08-30 13:47:31 915

原创 UPC 1053 Mysterious Treasure (记忆化搜索)

Description WNJXYK and DIDIDI is playing a game. DIDIDI draws a directed graph G on the paper which contains n points, m directed edges and no cycle. WNJXYK starts from point 1. For every round, WNJX

2017-08-27 17:28:22 581 2

原创 POJ 2104 K-th Number (划分树 / 主席树)

Description You are working for Macrohard company in data structures department. After failing your previous task about key insertion you were asked to write a new data structure that would be able t

2017-08-23 18:24:14 412

原创 HDU 6156 Palindrome Function (数位dp)

Description As we all know,a palindrome number is the number which reads the same backward as forward,such as 666 or 747.Some numbers are not the palindrome numbers in decimal form,but in other base,

2017-08-22 21:50:10 435

原创 HDU 6170 Two strings (dp)

Description Giving two strings and you should judge if they are matched. The first string contains lowercase letters and uppercase letters. The second string contains lowercase letters, upp

2017-08-22 19:53:59 1573 9

原创 HDU 6154 CaoHaha's staff (数学)

Description “You shall not pass!” After shouted out that,the Force Staff appered in CaoHaha’s hand. As we all know,the Force Staff is a staff with infinity power.If you can use it skillful,

2017-08-21 21:16:21 402

原创 HDU 6152 Friend-Graph (最大团)

Description It is well known that small groups are not conducive of the development of a team. Therefore, there shouldn’t be any small groups in a good team. In a team with n members,if there ar

2017-08-20 14:59:28 729 2

原创 HDU 6150 Vertex Cover (构造)

Description As we know, minimumvertexcover is a classical NP-complete problem. There will not be polynomial time algorithm for it unless P=NP. You can see the definition of vertex cover in https

2017-08-20 12:42:03 495

原创 HDU 6153 A Secret (扩展KMP)

Description Today is the birthday of SF,so VS gives two strings S1,S2 to SF as a present,which have a big secret.SF is interested in this secret and ask VS how to get it.There are the things that VS

2017-08-20 09:31:20 335

原创 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 346

原创 HDU 6146 Pokémon GO (dp)

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

2017-08-18 21:22:33 906

原创 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 1588 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 428

原创 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 334

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

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

2017-08-16 11:52:45 369

原创 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 509

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

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

2017-08-14 11:22:56 473

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

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

2017-08-13 19:55:20 1224

原创 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 1434

原创 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 400

原创 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 509

原创 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 339

原创 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 1344 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 378

原创 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 508

原创 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 377

原创 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 337

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

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

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

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

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

2017-08-06 20:37:53 459

原创 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 356

原创 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 412

原创 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 329

原创 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 471

原创 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 396

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关注的人

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