自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

菜鸟

too difficult

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

原创 POJ1328

就是找至少需要多少个圆可以把所有点覆盖完,圆心坐标必须在x轴上,所以当一个海岛坐标的y值大于d时,可以直接打印-1,这种情况不能覆盖完所有的点;其它情况,就是找出海岛对应的在x轴上的坐标点,然后再进行判断即可。#include#include#include#include#include#include#include#include#include#include#incl

2015-06-09 13:47:54 366

原创 小数化成最简式分数

这道题是好久以前写的了。#include#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;const int MAX = 20;int gcd(int x, int y)

2015-06-08 20:19:21 1345

原创 POJ2376

Cleaning ShiftsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 12969 Accepted: 3348DescriptionFarmer John is assigning some of his N (1 <= N <= 25,000) cows to do some cleaning cho

2015-06-07 17:15:41 596

转载 POJ 3616 (milking time)

DescriptionBessie is such a hard-working cow. In fact, she is so focused on maximizing her productivity that she decides to schedule her next N (1 ≤ N ≤ 1,000,000) hours (conveniently labeled 0..N-1

2015-06-07 11:26:40 453

转载 kmp算法模版

#include#include#includeusing namespace std;void getNext(string &str1,vector &next){ next.resize(str1.size()); next[0]=-1; int i=0,j=-1; int lenth=str1.size(); while(i!=(lenth-1)) { if(j=

2015-06-07 10:47:51 516

原创 Aizu 0005

GCD AND LCMDescriptionWrite a program which computes the greatest common divisor (GCD) and the least common multiple (LCM) of given a and b (0 InputInput consists of several data sets. Eac

2015-06-06 23:39:44 669

转载 一般的字符串匹配算法

一般的匹配,逐字匹配

2015-06-06 22:30:58 523

原创 简单题目的dfs模版

#include#include#include#include#include#include#include#include#include#includeconst int MAX=200;using namespace std;char arr[MAX][MAX];int dir[4][2]={{1,0},{0,1},{-1,0},{0,-1}};int w,h

2015-06-05 13:02:15 1110

转载 bfs模板

#includeconst int INF=1000000;typedef pair P;char maze[MAX][MAX];int N,M;int sx,xy;int gx,gy;int d[MAX][MAX]; //the distance to every pointint dir[4][2]={{1,0},{0,1},{-1,0},{0,-1}};int bfs(

2015-06-05 13:00:54 644

原创 Archer

CF上的一道题,就是求赢的概率。#include#include#include#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;int main(){

2015-06-03 21:55:01 1007

原创 Sereja and Array

CF上的一道题。模拟,按照它的意思做就行了。#include#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;const int MAX=100020;int arr

2015-06-03 21:40:52 559

原创 Squares

DescriptionVasya has found a piece of paper with a coordinate system written on it. There are n distinct squares drawn in this coordinate system. Let's number the squares with integers from 1 to n

2015-06-03 13:21:27 882

空空如也

空空如也

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

TA关注的人

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