自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(49)
  • 收藏
  • 关注

原创 2021-06-07

PowerDesigner 基本用法创建物理模型添加表设置表的描述设置字段描述与自增设置字段默认值设置无符号数值字段生成SQL语句Database -> Generate DatabaseCTRL+G设置文本编码创建物理模型添加表设置表的描述设置字段描述与自增设置字段默认值设置无符号数值字段生成SQL语句Database -> Generate DatabaseCTRL+G设置文本编码...

2021-06-07 18:11:30 77

原创 2018 Multi-University Training Contest 8 1

hdu 6397 Character Encoding求 x1+x2+…+xm = k (0≤xi < n) 的整数解的组数。 **无上界(xi>=0) 选法 x1+x2+…+xm = k C(k+m-1, m-1); i个违法条件 容斥系数 变量选法 (-1)^i * C(m, i) * C(k-i*n+m-1, m-1)**#include <...

2018-08-16 15:43:25 195

原创 2018 Multi-University Training Contest 7 1,5,10

hdu 6386 Age of Moyu给出n个点m条边,每条边一个编号,走不同编号的边时需要花费1,求1~n最少花费。quan哥的一手(以边建图,求最短路)#include<iostream>#include<string.h>#include<stdio.h>#include<math.h>#include<...

2018-08-15 10:33:21 201

原创 2018 Multi-University Training Contest 5 B

hdu 6351 Beautiful Now给一个数n,在m次交换位置(可以自己和自己swap)之后,分别求出得到的最小值和最大值。(X)贪心:min(每次把右边最小的值与最前面比它大的值交换)max(每次把最右边最小的值与最前面比它小的值交换)最后特判右边交换到左边的值如果一样,那么交换到右边的值按小到大排列(大到小排列)太年轻ac做法:dfs+剪枝 || 根据全排列求(...

2018-08-07 10:43:30 110

原创 hdu 5875 Function

题目给出的式子就是把第l个数依次对后面到r位置的数取模直接交一发t了,想到可以用线段树写。预处理每个数字后面第一个比它小的数的下标(Next),按照Next数组去遍历#include <iostream>#include <cstdio>#include <cstring>#include <algorithm>...

2018-08-07 09:38:17 114

原创 poj 3080 Blue Jeans(kmp)

题目给出n个长为60的序列,求所有序列的最长公共子序列。枚举第一个序列的每个子序列,与其余序列匹配。#include <iostream>#include <cstdio>#include <cstring>#include <algorithm>using namespace std;const int N = 6...

2018-08-05 10:13:07 117

原创 2018 Multi-University Training Contest 4 E,J,K

Problem E. Matrix from Arrays打表得出规律,每个2*len的区域都相等。 预处理二维前缀和。 求给出的坐标左上角区域包含多少个2*len为边长的区域,多出的再处理。(calc)已经找出规律,差点容斥,没有想下去… 一点容斥,黑色+,黄色-#include <iostream>#include <cstdio>...

2018-08-02 11:13:56 127

原创 2018 Multi-University Training Contest 3 A,G,L

Problem L. Visual Cube给出长宽高(a,b,c),按照样例格式输出立方体。 签到题写成这样,服了#include <iostream>#include <cstdio>

2018-07-30 17:17:18 183

原创 hdu 1754 I Hate It(线段树模板题)

题目#include <iostream>#include <cstdio>#include <cstring>#include <algorithm>using namespace std;const int N = 1&amp

2018-07-29 11:35:38 229

原创 hdu 1166 敌兵布阵(线段树模板题)

题目第i个正整数ai代表第i个工兵营地里开始时有ai个人(1) Add i j,i和j为正整数,表示第i个营地增加j个人(j不超过30) (2)Sub i j ,i和j为正整数,表示第i个营地减少j个人(j不超过30); (3)Query i j ,i和j为正整数,i<=j,表示询问第i到第j个营地的总人数; (4)End 表示结束,这条命令在每组数据最后出现; 每组数据...

2018-07-29 11:30:53 92

转载 UVALive 7040 Color(容斥)

题目链接1链接2题意:n个格子,m种颜色,取k种颜色,恰好使用k种颜色为n个格子上色,相邻格子颜色不同,求方案数,对1e9+7取余。c(m,k)×k×(k-1)^n-1,这是少于k种颜色上色的情况,不是恰好。 假设出现p (2 <= p <= k-1)种颜色,从k种颜色中选p种进行涂色,方案数为C(k,p) × p × (p-1)^(n-1); 总方案数为C...

2018-07-29 11:19:53 192

转载 hdu 6304 Chiaki Sequence Revisited(找规律)

原文 题目%了dalao的博客,看了许久(菜是原罪),勉强看懂,不知是否有错,如有错欢迎指出。等差数列 如下 下标,数值,和 ///1 3 7 15 31 a[i] ///1 2 4 8 16 f[i]#include <iostream>#include <cstdio>#include <cstring>...

2018-07-25 10:42:34 209

原创 hdu 6301(标记数组)(暴力)

链接给n(1~n这个区间范围)m(给m对区间个数)保证m对区间中的数不重复 求这个区间的每一个位置的数对区间左端点排序,判断每个区间及其前一个区间是否有交集,标记数组储存交集中的数。 当前区间没有交集的部分根据标记数组中的数是否为当前标记i来决定放什么数。 用i标记,那么标记数组可以只在每次输入n,m时初始化 没有重合的区间默认从1~n赋值 没有出现过的区间都为1...

2018-07-24 09:22:26 528

转载 Gym - 101617D

题目链接转自给出n*n的图,’.’能走,’#’不能走,k为最多能跳远的距离,每次只能往右或者往下走,求左上角到右下角最短需要多少步数。#include <iostream>#include <cstdio>#include <cstring>#include <algorithm>using namespace std;const int N = 2000+5;const int inf

2017-12-18 20:32:41 183

原创 hdu 5542 Favorite Donut(字符串暴力)

Favorite DonutTime Limit: 1500/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 3762 Accepted Submission(s): 948Problem Description Lulu has a sweet tooth.

2017-12-04 21:34:34 267

原创 hdu 5444 Elven Postman(建树,遍历)

Elven PostmanTime Limit: 1500/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 2253 Accepted Submission(s): 1326Problem Description Elves are very peculiar

2017-12-04 19:13:53 204

原创 hdu 5441 Travel(并查集)

TravelTime Limit: 1500/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 4222 Accepted Submission(s): 1413Problem Description Jack likes to travel around th

2017-12-04 19:09:27 234

原创 hdu 5438 Ponds(并查集/拓扑排列)

PondsTime Limit: 1500/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 4938 Accepted Submission(s): 1418Problem Description Betty owns a lot of ponds, some

2017-12-04 19:02:26 195

原创 hdu 5437 Alisha’s Party(优先队列)

Alisha’s PartyTime Limit: 3000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 6677 Accepted Submission(s): 1597Problem Description Princess Alisha invite

2017-12-04 18:49:34 165

原创 poj 1017 Packets

PacketsTime Limit: 1000MS Memory Limit: 10000K Total Submissions: 57248 Accepted: 19424 DescriptionA factory produces products packed in square packets of the same height h and of the siz

2017-11-23 20:23:21 156

原创 poj 1861 Network(并查集)

NetworkTime Limit: 1000MS Memory Limit: 30000K Total Submissions: 17376 Accepted: 6989 Special Judge DescriptionAndrew is working as system administrator and is planning to establish

2017-10-15 16:36:32 131

原创 poj 2560 Freckles(并查集)

FrecklesTime Limit: 1000MS Memory Limit: 65536K Total Submissions: 8749 Accepted: 4177 DescriptionIn an episode of the Dick Van Dyke show, little Richie connects the freckles on his Dad’s ba

2017-10-15 16:16:59 207

原创 poj 1308 Is It A Tree?(并查集)

Is It A Tree?Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 34199 Accepted: 11597 DescriptionA tree is a well-known data structure that is either empty (null, void, nothing) o

2017-09-19 20:01:32 280

原创 poj 2236 Wireless Network(并查集)(有点暴力)

Wireless NetworkTime Limit: 10000MS Memory Limit: 65536K Total Submissions: 30730 Accepted: 12787 DescriptionAn earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical t

2017-09-19 19:54:33 343

原创 poj 1703 Find them, Catch them(并查集)

Find them, Catch themTime Limit: 1000MS Memory Limit: 10000K Total Submissions: 47274 Accepted: 14570 DescriptionThe police office in Tadu City decides to say ends to the chaos, as launch

2017-09-19 19:43:01 240

原创 poj 2524 Ubiquitous Religions(并查集)

Ubiquitous ReligionsTime Limit: 5000MS Memory Limit: 65536K Total Submissions: 37330 Accepted: 17793 DescriptionThere are so many different religions in the world today that it is difficu

2017-09-19 19:38:05 282

原创 poj 2492 A Bug's Life(并查集)

A Bug’s LifeTime Limit: 10000MS Memory Limit: 65536K Total Submissions: 39319 Accepted: 12790 DescriptionBackground Professor Hopper is researching the sexual behavior of a rare species

2017-09-19 19:30:16 249

原创 poj 1611 The Suspects(并查集)

The SuspectsTime Limit: 1000MS Memory Limit: 20000K Total Submissions: 42354 Accepted: 20430 DescriptionSevere acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiolog

2017-09-19 19:20:12 277

转载 hdu 1182 食物链(并查集)

食物链Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 77793 Accepted: 23161 Description动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。 现有N个动物,以1-N编号。每个动物都是A,B,C中的一种,但是我们并不知道它到底是

2017-09-19 19:09:51 674

原创 poj 3842 An Industrial Spy(dfs+乱搞)

An Industrial SpyTime Limit: 1000MS Memory Limit: 65536K Total Submissions: 1733 Accepted: 684 DescriptionIndustrial spying is very common for modern research labs. I am such an industrial s

2017-09-15 20:55:28 409

原创 hdu 1286 找朋友(筛选)

找新朋友Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 13833 Accepted Submission(s): 7388Problem Description 新年快到了,“猪头帮协会”准备搞一个聚会,已经知道现有会员N人,把

2017-09-12 22:07:52 427

原创 poj 2586 Y2K Accounting Bug(贪心)

Y2K Accounting BugTime Limit: 1000MS Memory Limit: 65536K Total Submissions: 15926 Accepted: 7984 DescriptionAccounting for Computer Machinists (ACM) has sufferred from the Y2K bug and lo

2017-09-09 10:50:55 157

原创 poj 1328 Radar Installation

Radar InstallationTime Limit: 1000MS Memory Limit: 10000K Total Submissions: 90543 Accepted: 20340 DescriptionAssume the coasting is an infinite straight line. Land is in one side of coas

2017-09-09 10:41:14 174

转载 hdu 1027 Ignatius and the Princess II (dfs+剪枝)?

Ignatius and the Princess IITime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 8727 Accepted Submission(s): 5135Problem Description Now our he

2017-09-09 10:09:47 168

转载 poj 1753 Flip Game(dfs)_但是

Flip GameDescriptionFlip game is played on a rectangular 4x4 field with two-sided pieces placed on each of its 16 squares. One side of each piece is white and the other one is black and each piece is l

2017-09-05 21:56:54 149

原创 CodeForces - 122C Lucky Sum

Lucky SumPetya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are luc

2017-08-30 10:45:17 298

原创 位运算

& 按位与 相应为1,该位结果为1,否则为0| 按位或 相应位有一个为1,该位结果为1^ 按位异或 两个值相同则为0,否则为1~ 取反 ~对二进制数按位取反,即将0变1,将1变0<< 左移 二进制位全部左移N位,右补0>> 右移 二进制位右移N位,移到右端的低位被舍弃,对于无符号数,高位补0按位与取模//n%2 = n&1//n%4 = n&3//n%8 = n&7inline bool

2017-08-28 11:22:49 293 2

原创 up

///cin加速std::ios::sync_with_stdio(false);std::cin.tie(0);cout<<setiosflags(ios::fixed)<<setprecision(1)<<y;///getchar加速template <class T>inline void scan_d(T &ret){ char c; ret = 0; wh

2017-08-28 10:50:24 152

原创 hdu 2082 找单词(母函数)

找单词Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 8128 Accepted Submission(s): 5699Problem Description 假设有x1个字母A, x2个字母B,….. x26个字母Z,同时假设字

2017-08-26 14:47:35 241

转载 hdu 1085 Holding Bin-Laden Captive!(母函数)

Holding Bin-Laden Captive!Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 23120 Accepted Submission(s): 10300Problem Description We all kno

2017-08-26 11:07:48 275

空空如也

空空如也

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

TA关注的人

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