自定义博客皮肤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 1330 Nearest Common Ancestors (LCA)

Description A rooted tree is a well-known data structure in computer science and engineering. An example is shown below: In the figure, each node is labeled with an integer from {1, 2,…,16

2017-07-24 15:29:36 305

原创 hihocoder 1532 最美和弦 (dp)

描述 某个夜晚,Bob将他弹奏的钢琴曲录下来发给Jack,Jack感动之余决定用吉他为他伴奏。 我们可以用一个整数表示一个音符的音高,并可认为Bob弹奏的曲子是由3N个整数构成的一个序列。其中每个整数的取值范围是[-200, 200]。 Jack共弹奏 N 个和弦,每个和弦由三个音符组成。Jack可以自行决定和弦的第一个音符,其后的两个音符由第一个音符与和弦种类所决定。Jac

2017-07-24 10:32:50 576

原创 hihocoder 1531 德国心脏病 (模拟)

描述 Jack在和朋友们玩德国心脏病。 德国心脏病的游戏牌分为水果牌和动物牌。水果只有4种:香蕉、草莓、樱桃、柠檬,每张水果牌上会有种类不定、总数目1-5的水果;动物只有3种:猴子、大象、猪,每张动物牌上有且仅有一只动物。 n名玩家绕圈就座,第一轮游戏从0号至n-1号轮流出牌。每个玩家面前最多只有一张牌,如果玩家出牌时,他的面前已经摆放了一张牌,他新出的牌将会严丝合缝地盖住旧

2017-07-16 15:05:06 2907

原创 HDU 3966 Aragorn's Story (树链剖分)

Problem Description Our protagonist is the handsome human prince Aragorn comes from The Lord of the Rings. One day Aragorn finds a lot of enemies who want to invade his kingdom. As Aragorn knows, the

2017-07-14 21:30:31 335

原创 『数据结构』RMQ 问题

RMQ (Range Minimum/Maximum Query),即区间最值问题对于长度为 n 的数列,回复若干次查询,返回某个区间的最大(小)值

2017-07-13 21:56:13 500

原创 hiho一下 第158周 非法二进制数 (dp)

描述 如果一个二进制数包含连续的两个1,我们就称这个二进制数是非法的。 小Hi想知道在所有 n 位二进制数(一共有2n个)中,非法二进制数有多少个。 例如对于 n = 3,有 011, 110, 111 三个非法二进制数。 由于结果可能很大,你只需要输出模109+7的余数。 输入 一个整数 n (1 ≤ n ≤ 100)。 输出 n 位非法二进制数的数目

2017-07-13 17:29:04 505

原创 POJ 3264 Balanced Lineup (RMQ)

Description For the daily milking, Farmer John’s N cows (1 ≤ N ≤ 50,000) always line up in the same order. One day Farmer John decides to organize a game of Ultimate Frisbee with some of the cows. To

2017-07-13 15:03:36 230

原创 SPOJ QTREE - Query on a tree (树链剖分)

Description You are given a tree (an acyclic undirected connected graph) with N nodes, and edges numbered 1, 2, 3…N-1. We will ask you to perfrom some instructions of the following form:

2017-07-09 16:58:37 515

原创 操作系统 -- PV操作

三态模型进程通常分为就绪、运行和阻塞三种工作状态。三种状态在某些条件下可以转换,具体转换关系如下:进程三个状态之间的转换是通过PV操作和信号量来控制的,其中信号量起到了很重要的作用。 信号量 信号量是最早出现的用来解决进程同步与互斥问题的机制。 信号量(Saphore)由一个值和一个指针组成,指针指向等待该信号量的进程,信号量的值表示相应资源的使用情况。 信号量 S>=0 时

2017-07-03 19:47:33 10008 2

原创 hiho一下 第157周 二进制小数 (二进制)

描述 给定一个十进制小数X,判断X的二进制表示是否是有限确定的。 例如0.5的二进制表示是0.1,0.75的二进制表示是0.11,0.3没有确定有限的二进制表示。 输入 第一行包含一个整数 T (1 ≤ T ≤ 10),表示测试数据的组数。 以下T行每行包含一个十进制小数 X (0 < X < 1)。 X一定是以”0.”开头,小数部分不超过100位。 输出 对于每

2017-07-02 10:12:30 666

原创 hiho一下 第156周 岛屿 (dfs)

描述 给你一张某一海域卫星照片,你需要统计: 照片中海岛的数目 照片中面积不同的海岛数目 照片中形状不同的海岛数目 其中海域的照片如下,”.”表示海洋,”#”表示陆地。在”上下左右”四个方向上连在一起的一片陆地组成一座岛屿。 .####.......#.####.#......#...##.#. 上图所示的照片中一共有4座岛屿;其中3座面

2017-06-26 21:16:57 724

原创 SDUT 3923 打字 (贪心)

Problem Description snow 是个热爱打字的家伙,每次敲出更快的速度都会让他很开心。现在,他拿到一篇新的打字文章,已知这篇文章只有 26 个小写英文字母,给出 snow 打出这 26 个英文字母分别需要多少时间 (s),问 snow 打完这篇文章获得的 kpm(打正确的字数/所花的分钟数)最大为多少? 注意 snow 可能会打错一些字哦。打错的必定是文章里面存在的。

2017-06-05 12:52:46 605

原创 UVA Live 3704 Cellular Automaton (循环矩阵+快速幂)

Description A cellular automaton is a collection of cells on a grid of specified shape that evolves through a number of discrete time steps according to a set of rules that describe the new state of a

2017-06-03 19:53:37 575

原创 山东省第八届 ACM 省赛 fireworks (组合数+逆元)

Description Hmz likes to play fireworks, especially when they are put regularly. Now he puts some fireworks in a line. This time he put a trigger on each firework. With that trigger, each firewo

2017-05-23 16:52:38 969

原创 山东省第八届 ACM 省赛 Parity check (规律、水)

Description Fascinated with the computer games, Gabriel even forgets to study. Now she needs to finish her homework, and there is an easy problem: >f(n)=⎧⎩⎨>0,n=0>1,n=1>f(n−1)+f(n−2),n≥2>>> f(n)=

2017-05-23 16:27:10 667

原创 山东省第八届 ACM 省赛 Quadrat (找规律)

Description It is well-known that for any n there are exactly four n-digit numbers (including ones with leading zeros) that are self-squares: the last n digits of the square of such number are equal

2017-05-23 15:58:53 1055

原创 Codeforces 794 C. Naming Company (贪心)

Description Oleg the client and Igor the analyst are good friends. However, sometimes they argue over little things. Recently, they started a new company, but they are having trouble finding a name f

2017-05-13 21:05:43 737

原创 山东省第八届 ACM 省赛 company (贪心、水)

Problem Description There are n kinds of goods in the company, with each of them has a inventory of cnti and direct unit benefit vali. Now you find due to price changes, for any goods sold on day i,

2017-05-09 19:51:11 1347

原创 山东省第八届 ACM 省赛 CF (01背包、水)

Problem Description LYD loves codeforces since there are many Russian contests. In an contest lasting for T minutes there are n problems, and for the ith problem you can get ai−di∗ti points, where ai

2017-05-09 19:30:19 1472

原创 山东省第八届 ACM 省赛 sum of power (求和、水)

Problem Description Calculate ∑ni=1im mod (1000000000+7)\sum_{i=1}^ni^m~mod~(1000000000+7) for given n,m.Input Input contains two integers n,m(1≤n≤1000,0≤m≤10).Output Output the answer in a sin

2017-05-09 19:04:21 762

原创 山东省第八届 ACM 省赛 quadratic equation (水、坑)

Problem Description With given integers a,b,c, you are asked to judge whether the following statement is true: “For any x, if a⋅x2+b⋅x2+c=0a⋅x^2+b⋅x^2+c=0 , then x is an integer.”Input The first l

2017-05-09 18:48:38 1017

原创 UPC 1017 Easy Tree Query (二叉搜索树)

题目描述 You are given a binary search tree with depth k, whose nodes are valued from 1 to (2k − 1) and then Q queries. For each query, you are given p nodes. Find the root of a smallest subtree whi

2017-05-05 10:54:16 585

原创 山东省第七届 ACM 省赛 Feed the monkey (dp)

Problem Description Alice has a monkey, she must feed fruit to the monkey every day.She has three kinds of fruits, bananas, peaches and apples. Every day, she chooses one in three, and pick one of th

2017-05-04 17:40:26 698

原创 POJ 2926 Requirements (空间最远曼哈顿距离)

Description An undergraduate student, realizing that he needs to do research to improve his chances of being accepted to graduate school, decided that it is now time to do some independent research.

2017-05-04 15:05:36 1493

原创 HDU 4622 Reincarnation (区间不相同子串个数:字符串哈希 | 后缀数组 | 后缀自动机)

Problem Description Now you are back,and have a task to do: Given you a string s consist of lower-case English letters only,denote f(s) as the number of distinct sub-string of s. And you ha

2017-05-03 17:16:21 1889 1

原创 HDU 4333 Revolving Digits (扩展KMP)

Problem Description One day Silence is interested in revolving the digits of a positive integer. In the revolving operation, he can put several last digits to the front of the integer. Of course, he

2017-05-03 16:04:13 521

原创 山东省第二届 ACM 省赛 Simple Game (Nim+Bash)

Problem Description Here is a simple game. In this game, there are several piles of stones and two players. The two players play in turn. In each turn, one can choose at least one pile and at most th

2017-05-03 09:36:25 674

原创 POJ 1679 The Unique MST (次小生成树)

Description Given a connected undirected graph, tell if its minimum spanning tree is unique. Definition 1 (Spanning Tree): Consider a connected, undirected graph G = (V, E). A spanning tree of

2017-05-02 20:52:26 525

原创 HDU 5976 Detachment (逆元)

Problem Description In a highly developed alien society, the habitats are almost infinite dimensional space. In the history of this planet,there is an old puzzle. You have a line segment wi

2017-05-02 16:15:45 863

原创 HDU 5974 A Simple Math Problem (数论+解方程组)

Problem Description Given two positive integers a and b,find suitable X and Y to meet the conditions: X+Y=a Least Common Multiple (X, Y) =bInput Input includes multiple sets of test data

2017-05-02 10:46:45 1002

原创 多校联合集训 G. 数字逻辑练习题 (普通计算)

题目描述 原码、反码、补码都是一样的,都是正数本身。 对于负数: 原码是符号位为 1,数值部分取绝对值的二进制。 反码是符号位为 1,其它位是原码取反。 补码是符号位为 1,其它位是原码取反,未位加 1。 输入一个 64bit 十进制整数,输出它的原码,反码,补码的 16 进制表示法 输入 有多组数据,每组数据一行,为一个 64bi

2017-05-01 21:25:05 658

原创 多校联合集训 A. 字符串“水”题 (状压+哈希)

题目描述 给出一个长度为 n 的字符串(1<=n<=100000),求有多少个连续字串中所有的字母都出现了偶数次。 输入 第一行一个正整数 T,表示数据组数(1 <= T <= 10)。 接下来 T 行,每行有一个只包含小写字母的字符串。 输出 每个答案输出满足要求字符串个数。每个答案占一行。样例输入3aaabbccabcabc样例输出061思路某位学长写

2017-05-01 20:59:22 443

原创 URAL 2018. The Debut Album (dp)

Description Pop-group “Pink elephant” entered on recording their debut album. In fact they have only two songs: “My love” and “I miss you”, but each of them has a large number of remixes. The pr

2017-04-30 21:39:29 487

原创 POJ 2400 Supervisor, Supervisee (二分图最大权匹配)

Description Suppose some supervisors each get to hire a new person for their department. There are N people to be placed in these N departments. Each supervisor interviews all N people, and ranks the

2017-04-30 19:38:41 554

原创 HDU 2255 奔小康赚大钱 (二分图最大权匹配)

Problem Description 传说在遥远的地方有一个非常富裕的村落,有一天,村长决定进行制度改革:重新分配房子。 这可是一件大事,关系到人民的住房问题啊。村里共有n间房间,刚好有n家老百姓,考虑到每家都要有房住(如果有老百姓没房子住的话,容易引起不安定因素),每家必须分配到一间房子且只能得到一间房子。 另一方面,村长和另外的村领导希望得到最大的效益,这样村里的机构才

2017-04-27 21:31:28 687

原创 山东省第六届 ACM 省赛 Stars (尺取法)

Problem Description There are N (1 ≤ N ≤ 400) stars in the sky. And each of them has a unique coordinate (x, y) (1 ≤ x, y ≤ N). Please calculate the minimum area of the rectangle (the edges of the re

2017-04-27 17:33:48 703

原创 山东省第七届 ACM 省赛 Proxy (最短路)

Problem Description Because of the GFW (Great Firewall), we cannot directly visit many websites, such as Facebook, Twitter, YouTube, etc. But with the help of proxy and proxy server, we can easily ge

2017-04-27 09:10:54 643

原创 POJ 3308 Paratroopers (最小割)

Description It is year 2500 A.D. and there is a terrible war between the forces of the Earth and the Mars. Recently, the commanders of the Earth are informed by their spies that the invaders of Mars

2017-04-25 21:43:03 531

原创 HZAU 1208 Color Circle (dfs)

Description There are colorful flowers in the parterre in front of the door of college and form many beautiful patterns. Now, you want to find a circle consist of flowers with same color. What should

2017-04-24 17:20:17 485

原创 HZAU 1202 GCD (矩阵快速幂 + GCD)

Problem Description Xiao Ming found the compute time of gcd(fibn,fibn+1)gcd(fib_n,fib_{n+1}) is the most when he learnt the gcd, and the result of it is always fib1 but he is not satisfied with the s

2017-04-23 19:58:04 810

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

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