[原创]hdu 2588 GCD [欧拉函数]【数论】*
[原创]hdu 2588 GCD [欧拉函数]【数论】* 2016-08-11 11:48:04 Tabris_ 阅读数:345 博客爬取于2020-06-14 22:43:55 以下为正文 版权声明:本文为Tabris原创文章,未经博主允许不得私自转载。 https://blog.csdn.net/qq_33184171/article/details/52181264 题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=2588 -------------------------. GCD Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1700 Accepted Submission(s): 829 Problem Description The greatest common divisor GCD(a,b) of two positive integers a ...
[原创]codeforces 704A Thor [技巧吧.]
[原创]codeforces 704A Thor [技巧吧.] 2016-08-10 15:19:05 Tabris_ 阅读数:556 博客爬取于2020-06-14 22:43:56 以下为正文 版权声明:本文为Tabris原创文章,未经博主允许不得私自转载。 https://blog.csdn.net/qq_33184171/article/details/52171819 题目连接 : http://codeforces.com/problemset/problem/704/A --------------------------------------. A. Thor time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Thor is getting used to the Earth. As a gift Loki gave him a smartphone. There are n application ...
[原创]POJ 2513 Colored Sticks [tire树+并查集]
[原创]POJ 2513 Colored Sticks [tire树+并查集] 2016-08-10 10:57:04 Tabris_ 阅读数:222 博客爬取于2020-06-14 22:43:57 以下为正文 版权声明:本文为Tabris原创文章,未经博主允许不得私自转载。 https://blog.csdn.net/qq_33184171/article/details/52169407 题目连接 : 传送阵 ----------------------------------------------. Colored Sticks Time Limit: 5000MS Memory Limit: 128000K Total Submissions: 35437 Accepted: 9287 Description You are given a bunch of wooden sticks. Each endpoint of each stick is colored with some color. Is it possible to align the stic ...
[原创]字符串问题 ---模板(不定期更新中。)
[原创]字符串问题 —模板(不定期更新中。) 2016-08-08 13:20:00 Tabris_ 阅读数:845 博客爬取于2020-06-14 22:39:14 以下为正文 版权声明:本文为Tabris原创文章,未经博主允许不得私自转载。 https://blog.csdn.net/qq_33184171/article/details/52151010 #KMP 算法介绍文章:http://blog.csdn.net/u011564456/article/details/20862555?utm_source=tuicool&utm_medium=referral 123456789101112131415161718192021222324252627282930char s1[N],s2[N];int Next[N];//Next[i] 表示从[0~i]中最长公共前缀的长.void get_next(char *s,int len){ for(int i=0,j=-1;i<=len;++i,++j){ Next[ ...
[原创]数据结构 [未完成 待续~待修改]
[原创]数据结构 [未完成 待续~待修改] 2016-08-08 08:35:28 Tabris_ 阅读数:765 博客爬取于2020-06-14 22:39:15 以下为正文 版权声明:本文为Tabris原创文章,未经博主允许不得私自转载。 https://blog.csdn.net/qq_33184171/article/details/52148588 ##并查集 简单并查集 算法讲义 1不需要模板 带权并查集 123456789101112131415161718int pre[N];int findi(int x){ if(pre[x]==x) return x; int r = findi(pre[x]); /** 省略了权值间关系转化,具体视情况而定 */ pre[x]=r; return r;}void join(int x,int y,int X,int Y){ int fx = findi(x),fy = findi(y); pre[fx]=fy; /** 省略了权值间关系转化,具 ...
[原创]这是一篇被放弃的博客。。不要看了。。(新手千万不要手撸模板)
[原创]这是一篇被放弃的博客。。不要看了。。(新手千万不要手撸模板) 2016-08-05 13:33:21 Tabris_ 阅读数:1044 博客爬取于2020-06-14 22:43:58 以下为正文 版权声明:本文为Tabris原创文章,未经博主允许不得私自转载。 https://blog.csdn.net/qq_33184171/article/details/52128243 今天解除了一下线段树 据自己理解手撸了发建树与查询的操作 的模板 tree12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091# include <iostream># include <string># include <string.h># include < ...
[原创]HDU 5795 A simple Nim [SG]【博弈】
[原创]HDU 5795 A simple Nim [SG]【博弈】 2016-08-04 21:56:25 Tabris_ 阅读数:589 博客爬取于2020-06-14 22:43:59 以下为正文 版权声明:本文为Tabris原创文章,未经博主允许不得私自转载。 https://blog.csdn.net/qq_33184171/article/details/52123533 题目连接 : http://acm.hdu.edu.cn/showproblem.php?pid=5795 -----------------------------------------------------------. A Simple Nim Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 170 Accepted Submission(s): 111 Problem Description Two players ...
[原创]POJ 3254 Corn Fields [状压DP]【动态规划】
[原创]POJ 3254 Corn Fields [状压DP]【动态规划】 2016-08-03 13:38:04 Tabris_ 阅读数:219 博客爬取于2020-06-14 22:44:01 以下为正文 版权声明:本文为Tabris原创文章,未经博主允许不得私自转载。 https://blog.csdn.net/qq_33184171/article/details/52102801 题目链接 : http://poj.org/problem?id=3254 ---------------------------------------------------. Corn Fields Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 12927 Accepted: 6766 Description Farmer John has purchased a lush new rectangular pasture composed of M by N (1 ≤ M ≤ 12; 1 ≤ N ≤ 12) ...
[原创]HDU 1536 S-Nim [SG函数]【博弈】
[原创]HDU 1536 S-Nim [SG函数]【博弈】 2016-07-30 16:38:04 Tabris_ 阅读数:406 博客爬取于2020-06-14 22:44:02 以下为正文 版权声明:本文为Tabris原创文章,未经博主允许不得私自转载。 https://blog.csdn.net/qq_33184171/article/details/52073496 题目连接 :http://acm.hdu.edu.cn/showproblem.php?pid=1536 ------------------------------------------. S-Nim Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 6629 Accepted Submission(s): 2802 Problem Description Arthur and his sister Caroll have been pl ...
[原创]HDU 5015 233 Matrix 【矩阵快速幂】
[原创]HDU 5015 233 Matrix 【矩阵快速幂】 2016-07-29 17:50:50 Tabris_ 阅读数:388 博客爬取于2020-06-14 22:44:03 以下为正文 版权声明:本文为Tabris原创文章,未经博主允许不得私自转载。 https://blog.csdn.net/qq_33184171/article/details/52067386 题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=5015 -------------------------------------------. 233 Matrix Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1817 Accepted Submission(s): 1075 Problem Description In our daily life we often use 2 ...