自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

xiaotuji的博客

总要留下些足迹,证明我曾奋斗过

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

原创 POJ - 2253 Frogger(并查集,二分)

FroggerTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 44085 Accepted: 14062DescriptionFreddy Frog is sitting on a stone in the middle of a lake. Sudden

2017-05-31 12:43:23 333

原创 CF#808 C. Tea Party(贪心)

C. Tea Partytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp invited all his friends to the tea par

2017-05-16 15:53:32 559

原创 CF#808 B. Average Sleep Time(水题)

B. Average Sleep Timetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIt's been almost a week since Polycarp

2017-05-16 15:42:18 324

原创 CF#808 A. Lucky Year(水题)

A. Lucky Yeartime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputApart from having lots of holidays throughout

2017-05-16 15:34:29 401

原创 CF#807 B. T-Shirt Hunt(水题)

B. T-Shirt Hunttime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputNot so long ago the Codecraft-17 contest wa

2017-05-10 18:28:01 461

原创 CF#807 A. Is it rated?(水题)

A. Is it rated?time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIs it rated?Here it is. The Ultimate Qu

2017-05-10 18:22:22 715

原创 个人模板 最短路SPFA

#includeusing namespace std;const int N = 10000 + 10;struct xx{ int v; int c;} f[N];int head[N];int nex[N];int dis[N];int vis[N];int cnt[N];int e, n, m;void Clear(){ memset(

2017-05-10 12:48:04 288

原创 个人模板 字符串最小表示法

#includeusing namespace std;int getminsub(char *a){ int i = 0,j = 1,len = strlen(a),k = 0; while(i < len && j < len && k < len) { if(k == len) break; if(i == j) j++;

2017-05-09 17:21:47 391

原创 个人模板 Manacher求最长回文字串

#includeusing namespace std;const int N = 1000 + 10;string manacher(string s){ int length=s.size(); for(int i=0,k=1;i<length-1;i++)//给字符串添加 # { s.insert(k,"#"); k=k+2

2017-05-08 16:57:51 264

原创 个人模板 字符串按字典序排序

#includeusing namespace std;struct A{ char str[101];};char a[100][100];int n;int cmp(const void *a,const void *b){ A *c, *d; c = (A *)a; d = (A *)b; return strcmp(c -> st

2017-05-06 18:48:38 403

原创 HDU 2609 How many(字符串同构,最小表示法)

How manyTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2696    Accepted Submission(s): 1162Problem DescriptionGive you n ( n

2017-05-06 18:35:42 386

原创 HDU 1978 How many ways(记忆化搜索)

How many waysTime Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5262    Accepted Submission(s): 3104Problem Description这是一个简单的生存游戏,

2017-05-05 23:37:42 261

原创 个人模板 最长公共子序列

例题: http://acm.hdu.edu.cn/showproblem.php?pid=1159#includeusing namespace std;const int N = 5000 + 10;char a[N], b[N];int dp[2][N];int main(){ int n; while(~scanf("%s%s", a, b))

2017-05-05 22:57:38 275

原创 个人模板 最长公共连续子序列

#includeusing namespace std;void getLCS(char* str1, char* str2){ int len1 = strlen(str1); int len2 = strlen(str2); int matrix[len1]; //str1为x方向 //初始化matrix for (int i = 0; i <

2017-05-05 22:42:13 288

原创 个人模板 树状数组

#include #include #include using namespace std;int a[50000];int tree[50000];int n;int lowbit(int x){ return (x&-x);}void pushup(int x,int value){ while(x<=n) { tree[x

2017-05-05 22:38:01 273

转载 个人模板 ST表

#include using namespace std;const int N = 1e5 + 10;int a[N];int f[N][16];int n;void rmq_init() //建立:dp(i,j) = min{dp(i,j-1),dp(i+2^(j-1),j-1) O(nlogn){ for (int i = 1; i <= n; i++)

2017-05-05 22:34:42 357

原创 CF#804 B. Minimum number of steps(字符串,思维)

D. Minimum number of stepstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputWe have a string of letters 'a' a

2017-05-05 12:52:11 467

原创 CF#804 A. Find Amir(贪心)

C. Find Amirtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputA few years ago Sajjad left his school and regi

2017-05-05 12:29:53 465

原创 CF#805 B. 3-palindrome(水题)

B. 3-palindrometime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn the beginning of the new year Keivan deci

2017-05-05 12:27:38 430

原创 CF#805 A. Fake NP(水题)

A. Fake NPtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputTavak and Seyyed are good friends. Seyyed is very

2017-05-05 12:19:16 606

原创 CF#801 A. Vicious Keyboard(字符串,水题)

A. Vicious Keyboardtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputTonio has a keyboard with only two lett

2017-05-03 10:53:15 363

原创 CF#801 B. Valued Keys(字符串,贪心)

B. Valued Keystime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou found a mysterious function f. The funct

2017-05-03 10:46:52 333

原创 CF#803 B. Distances to Zero(水题)

B. Distances to Zerotime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given the array of integer num

2017-05-02 20:52:03 538

原创 CF#803 A. Maximal Binary Matrix(贪心)

A. Maximal Binary Matrixtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given matrix with n rows an

2017-05-02 20:46:45 345

空空如也

空空如也

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

TA关注的人

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