自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 HDU 1251 统计难题-字典树-统计前缀个数

字典树本来就是一个用空间换时间的操作啊。// 字典树.cpp : 定义控制台应用程序的入口点。//#include <iostream>#include <cstdio>#include <cstring>using namespace std;const int kind = 26;const int maxn = 150000;int t...

2018-06-20 16:05:24 198

转载 2016ACM-ICPC沈阳网络预选赛1003 hannnnah_j's Biological Test

题意: m个人要考试,老师将他们安排在一张有n把椅子的圆桌上,任意两人之间至少隔着k把椅子,问方案数%(1e9+7).思路: 1.保证n>=m∗(k+1). 2.固定第一个人的位置,这样固定的方法就有n种,先在两人之间放k把椅子,那么剩下 n−m∗(k+1)把椅子. 3.剩下的椅子要放在任意两人之间,这样就是一个经典模型:小球不区分,盒子区分,盒子可为空.即(m−1n−m⋅k−

2016-09-23 21:34:03 480 1

原创 HDU 5867 Water problem

K - Water problemTime Limit:1000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 5867DescriptionIf the numbers 1 to 5 are written out in

2016-09-16 17:50:19 386

原创 HDU 5858 Hard problem(计算几何)

Hard problemTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Problem Descriptioncjj is fun with math problem. One day he found a Olympic Mathema

2016-09-16 17:27:50 409

原创 HDU 4355 Party All the Time

http://acm.hdu.edu.cn/showproblem.php?pid=4355题意: 坐标轴上有一些点,每个点有权值,找出一个位置,所有点到这个点的距离的三次方乘以权值的和最小。用三分求解就可以了#include #include #include #include #include using namespace std;const dou

2016-04-23 09:22:38 340

原创 HDU 4357 String change

http://acm.hdu.edu.cn/showproblem.php?pid=4357题意:给定a串b串,问能否把a变成b串方法:任选a的2个字母,ascil+=1 然后交换位置,可以操作任意多次。3个及3个以上一定可以T^T2个就暴力判一下像这种只要最后结果不求过程的题目,往往都是有规律可循的#include

2016-04-23 09:14:03 493

原创 POJ 2115C Looooops

http://poj.org/problem?id=2115题目大意:对于循环语句:for(int i = A; i != B; i += C)已知i、A、B、C都是无符号整数类型,给出A、B、C、k的值,所有的数都不大于2^k,计算并输出循环语句的执行次数,如果为无限次,那么直接输出"FOREVER"。设算法

2016-04-22 18:02:07 367

原创 ZOJ Problem Set - 3777

Problem ArrangementTime Limit: 2 Seconds      Memory Limit: 65536 KBThe 11th Zhejiang Provincial Collegiate Programming Contest is coming! As a problem setter, Edward is going to arrange the

2016-04-12 07:49:19 451

转载 hdu3007(最小覆盖圆问题)

转载自ACdreamershttp://acm.hdu.edu.cn/showproblem.php?pid=3007最小圆覆盖,很经典的问题。题目大概是,平面上n个点,求一个半径最小的圆,能够覆盖所有的点。 如果要求一个最小覆盖圆,这个圆至少要由三个点确定。有一种算法就是任意取三个点作圆,然后判断距离圆心最远的点是否在圆内,若在,则

2016-04-09 22:03:03 1056

原创 POJ 2002 Squares 求正方形的个数,点哈希

SquaresTime Limit: 3500MS Memory Limit: 65536KTotal Submissions: 18426 Accepted: 7086DescriptionA square is a 4-sided polygon whose sides have equal length and

2016-04-09 21:52:59 596

原创 HDU 3700 Line belt

Line beltTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3669    Accepted Submission(s): 1407Problem DescriptionIn a two-dimensi

2016-04-09 16:20:48 751

原创 Educational Codeforces Round 10 C. Foe Pairs

http://codeforces.com/contest/652/problem/CC. Foe Pairstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

2016-04-09 11:23:18 691

原创 HDU 4717 The Moving Points

The Moving PointsTime Limit: 6000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1738    Accepted Submission(s): 685Problem DescriptionThere are

2016-04-07 23:38:57 343

原创 Codeforces Round #333 (Div. 2) B. Approximating a Constant Range

B. Approximating a Constant Rangetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputWhen Xellos was doing a p

2016-04-06 22:02:39 366

原创 CodeForces 579A Raising Bacteria

Raising BacteriaTime Limit: 1000MS Memory Limit: 262144KB 64bit IO Format: %I64d & %I64uDescriptionYou are a lover of bacteria. You want to raise some bacteria in a

2015-11-22 09:04:46 582

原创 ZOJ 3706 Break Standard Weight

ZOJ 3706 Break Standard WeightTime Limit:2000MS     Memory Limit:65536KB     64bit IO Format:%lld & %lluSubmit Status Practice ZOJ 3706DescriptionThe balance was the first mass m

2015-11-21 17:37:59 408

原创 CodeForces 495B Modular Equations

Modular EquationsTime Limit:1000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64uDescriptionLast week, Hamed learned about a new type of equations in his math class called

2015-11-21 16:55:56 843

原创 POJ 1664 放苹果

放苹果Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 28861 Accepted: 18248Description把M个同样的苹果放在N个同样的盘子里,允许有的盘子空着不放,问共有多少种不同的分法?(用K表示)5,1,1和1,5,1 是同一种分法。

2015-11-21 11:15:00 352

原创 POJ 1273 Drainage Ditches

Drainage DitchesTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 64253 Accepted: 24793DescriptionEvery time it rains on Farmer John's fields, a pond fo

2015-11-19 09:33:02 286

原创 CodeForces 482A Diverse Permutation

A. Diverse Permutationtime limit per test1 secondmemory limit per test256 megabytesPermutation p is an ordered set of integers p1,   p2,   ...,   pn, consisting of n dist

2015-11-15 10:28:15 440

原创 CodeForces 111B Petya and Divisors

B. Petya and Divisorstime limit per test5 secondsmemory limit per test256 megabytesLittle Petya loves looking for numbers' divisors. One day Petya came across the following pro

2015-11-15 10:22:47 361

原创 CodeForces 44B Cola

B. ColaTo celebrate the opening of the Winter Computer School the organizers decided to buy in n liters of cola. However, an unexpected difficulty occurred in the shop: it turned out that cola i

2015-11-15 10:18:48 459

原创 UVA 11584 Partitioning by Palindromes

题意就是给定一个只有小写字母的字符串,要将这个字符串划分为尽可能少的回文串状态转移方程就是dp[i] = min( dp[j-1]+1, dp[i])  (1#include #include #include #include using namespace std;const int maxn = 1005;int dp[maxn];char s[maxn];

2015-11-10 11:14:40 283

转载 Codeforces Round #127 (Div. 2) C - Fragile BridgesCodeforces

C. Fragile Bridgestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are playing a video game and you hav

2015-11-01 11:24:34 360

原创 Codeforces Round #327 (Div. 2) C - Median Smoothing

C. Median Smoothingtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA schoolboy named Vasya loves reading b

2015-10-26 14:42:24 336

原创 Codeforces Round #327 (Div. 2) B. Rebranding

B. Rebrandingtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe name of one small but proud corporation c

2015-10-26 09:48:52 321

原创 拓扑排序入门题1

确定比赛名次Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 18147 Accepted Submission(s): 7264Problem Description有N个比赛队(1Input输入有若干

2015-10-25 15:40:29 420

原创 HDU 1711 Number Sequence

Number SequenceTime Limit: 10000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 16243    Accepted Submission(s): 7165Problem DescriptionGiven tw

2015-10-10 16:24:33 252

原创 POJ 1200 字符串哈希

#include #include #include #include #include #include #include using namespace std;#define maxn 16000000char s[maxn];int ch[maxn];int hash[maxn];int main(){int i,j,k,t,

2015-10-07 21:41:34 530

原创 HDU 4930 : Fighting the Landlords(模拟)

J - Fighting the LandlordsTime Limit:1000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 4930DescriptionFighting the Landlords is a car

2015-08-02 16:48:26 452

转载 转自kuangbin

unsigned   int   0~4294967295      int   2147483648~2147483647   ——10^9unsigned long 0~4294967295long   2147483648~2147483647long long的最大值:9223372036854775807 ——10^18long long的最小值:-922337203

2015-03-21 10:48:34 303

空空如也

空空如也

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

TA关注的人

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