自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 bzoj1069最大四边形面积(旋转卡壳)

枚举对边,。。边左右两边得点是单方向动的。。就是旋转卡壳辣#include <iostream>#include <cstdio>#include <algorithm>#include <cstring>#include <cmath>using namespace std;const int maxn = 2010;const double eps = 1e-8;int n,st

2017-03-29 21:35:15 444

原创 poj2187 最远点对(旋转卡壳)

Bessie, Farmer John’s prize cow, has just won first place in a bovine beauty contest, earning the title ‘Miss Cow World’. As a result, Bessie will make a tour of N (2 <= N <= 50,000) farms around the w

2017-03-29 02:15:08 1678

原创 弱校联盟#con3--Ancient Tomb Adventures

http://oj.neu.edu.cn/problem/792 One day, Tank goes to explore an ancient tomb. However, when he enters the tomb, the entry is suddenly locked. As he is very frightened, a strange sound comes and says

2017-03-24 16:27:49 498

原创 弱校联盟#con3--概率(阶乘逆元打表)

List’s father morejarphone likes playing poker with List very much. Now List has a deck of playing card, consisting of a black cards and b red cards. List shuffles the cards randomly, puts them on the

2017-03-20 02:16:18 773

原创 treap

http://www.spoj.com/problems/ORDERSET/ In this problem, you have to maintain a dynamic set of numbers which support the two fundamental operations INSERT(S,x): if x is not in S, insert x into S DELE

2017-03-20 01:30:42 310

原创 dijkstra+heap

手写堆#include <cstdio>#include <iostream>#include <algorithm>#include <cstring>using namespace std;int n,p,c,num;const int maxn = 2000;const int maxm = 3000;int tot,head[maxn],pos[maxn],cnt;int

2017-03-18 19:48:00 470

原创 L2-001. 紧急救援

作为一个城市的应急救援队伍的负责人,你有一张特殊的全国地图。在地图上显示有多个分散的城市和一些连接城市的快速道路。每个城市的救援队数量和每一条连接两个城市的快速道路长度都标在地图上。当其他城市有紧急求助电话给你的时候,你的任务是带领你的救援队尽快赶往事发地,同时,一路上召集尽可能多的救援队。输入格式:输入第一行给出4个正整数N、M、S、D,其中N(2<=N<=500)是城市的个数,顺便假设城市的编号

2017-03-18 11:47:39 407

原创 多校联盟#con1 等差区间

题意:给n个数字,q个询问,问每次循环的那部分数字排序后能否构成等差数列tip:区间内无相同元素 且 相邻两项差构成的数列的GCD ×(R-L)= (区间最大值-区间最小值) 正向推就是说,差的gcd就是公差 4 5 6 7和4 5 6 4都是gcd = 1 也就是说,当出现重复元素的时候,会出错,那么特判这一种,每个点记录上一次出现这个数字的位置,那么一旦区间包括这两个(且不相连)就不

2017-03-13 12:28:28 342

原创 多校联盟#con1 数学题

题意:现在有两个数组 A B 所有A里的元素/所有B里面的元素中第k大的是什么tip:二分答案,检验有没有k-1个比他大的时候,排序两个数组 可使用双指针,一个从A数组最后开始,一个从B数组最后一个开始,如果这个比当前的答案大,那么b数组前面的,分母减小,比值肯定都大于答案,直接+=m个,如果比答案小,减小b的值(A的值减小,刚才不合格的B肯定更不会比当前答案大了),所以两个指针都最坏的情况下走n

2017-03-13 12:14:08 409

原创 hdu5950

Farmer John likes to play mathematics games with his N cows. Recently, they are attracted by recursive sequences. In each turn, the cows would stand in a line, while John writes two positive numbers a

2017-03-07 23:20:06 498

原创 多校联盟#con1 矩阵快速幂

f(x+1)=f(x)+f(x−1)+sin(πx2)。正常fibonacci就是1 1 1 0然后旋转矩阵: 0 1 0 0 0 0 1 0 0 0 0 1 1 0 0 0最后: [ 1 1 1 0 0 0 ] , [ 1 0 0 0 0 0 ] , [ 0 0 0 1 0 0 ] , [ 0 0 0 0 1 0 ] , [ 0 0 0 0 0 1 ] , [ 0 0 1 0

2017-03-07 00:03:10 339

原创 长度不小于 k 的公共子串的个数(poj3415)

http://poj.org/problem?id=3415给定两个字符串 A 和 B,求长度不小于 k 的公共子串的个数(可以相同)两个字符串得公共子串大于k的个数,那么一定是每个字符串后缀得所有前缀相同得数量, 如果最长公共前缀为len,那么len-k+1就是这个串之中以头开头的大于等于k长度贡献的答案, 于是可以将两个串连起来,中间加一个字符 然后把height大于等于k的分块,一块之内

2017-03-01 17:41:20 1415

空空如也

空空如也

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

TA关注的人

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