08 2015 档案
摘要:输入包含多组数据。第一行为字符串s,字符串s的长度1到10^6次方,第二行是字符串s不能包含的子串个数n,n<=1000。接下来n行字符串,长度不大于100。 字符串由小写的英文字符组成。 str函数: 人之初,性本善,性相近,习相远。苟不教,性乃迁,教之道,贵以专。 昔孟母,择邻处,子不学,断机杼
阅读全文
摘要:The Euler function Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description The Euler function phi is an important kind of functio
阅读全文
摘要:找新朋友Time Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 39Accepted Submission(s) : 32Font: Times New Ro...
阅读全文
摘要:饭卡Time Limit : 5000/1000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 6Accepted Submission(s) : 3Problem Description电子科...
阅读全文
摘要:I NEED A OFFER!Time Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 4Accepted Submission(s) : 2Problem D...
阅读全文
摘要:Bone Collector Time Limit : 2000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other) Total Submission(s) : 21 Accepted Submission(s) : 6 Prob
阅读全文
摘要:悼念512汶川大地震遇难同胞——珍惜现在,感恩生活Time Limit : 1000/1000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 6Accepted Submission(s) : ...
阅读全文
摘要:Euro EfficiencyTime Limit : 2000/1000ms (Java/Other)Memory Limit : 20000/10000K (Java/Other)Total Submission(s) : 12Accepted Submission(s) : 3Problem ...
阅读全文
摘要:Proud MerchantsTime Limit : 2000/1000ms (Java/Other)Memory Limit : 131072/65536K (Java/Other)Total Submission(s) : 12Accepted Submission(s) : 5Problem...
阅读全文
摘要:FriendTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2240Accepted Submission(s): 1122Problem Desc...
阅读全文
摘要:Building a Space StationTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 5912Accepted: 2935DescriptionYou are a ...
阅读全文
摘要:问题 C: 老王赛马时间限制: 1 Sec内存限制: 128 MB提交: 50解决: 28[提交][状态][讨论版]题目描述赛马是一古老的游戏,早在公元前四世纪的中国,处在诸侯割据的状态,历史上称为“战国时期”。在魏国作官的孙膑,因为受到同僚庞涓的迫害,被齐国使臣救出后,到达齐国国都。赛马是当时最受...
阅读全文
摘要:算法总结 一欧拉函数(Euler's totient function) 欧拉函数的定义: 在数论中,对于正整数N,少于或等于N ([1,N]),且与N互质的正整数(包括1)的个数,记作φ(n)。 φ函数的值: φ(x)=x(1-1/p(1))(1-1/p(2))(1-1/p(3))(1-1/p(4
阅读全文
摘要:Minimum Transport CostTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8860Accepted Submission(s): ...
阅读全文
摘要:A -海森堡不确定原理Time Limit:1000MSMemory Limit:32768KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeFZU 2135Description给一个N位的正整数,该数不包...
阅读全文
摘要:WormholesTime Limit:2000MSMemory Limit:65536KTotal Submissions:36860Accepted:13505DescriptionWhile exploring his man...
阅读全文
摘要:BestCoder(有米!)The Drunk JailerTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1397Accepted Submiss...
阅读全文
摘要:1 ////#include 2 ////#include 3 ////#include 4 ////#include 5 ////using namespace std; 6 ////const int INF=0x3f3f3f3f; 7 ////const int MAXN=11...
阅读全文
摘要:迷宫寻宝(一)时间限制:1000 ms | 内存限制:65535 KB 难度:4描述一个叫ACM的寻宝者找到了一个藏宝图,它根据藏宝图找到了一个迷宫,这是一个很特别的迷宫,迷宫里有N个编过号的门(N 2 #include 3 #include 4 #define mem(x) memset(x,0,...
阅读全文
摘要:How Many Maos Does the Guanxi WorthTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 512000/512000 K (Java/Others)Total Submission(s): 864Accepted S...
阅读全文
摘要:Little Zu Chongzhi's TrianglesTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 512000/512000 K (Java/Others)Total Submission(s): 743Accepted Submis...
阅读全文
摘要:欢迎参加——每周六晚的BestCoder(有米!)Song Jiang's rank listTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 512000/512000 K (Java/Others)Total Submission(s): 6...
阅读全文
摘要:Choose the best routeTime Limit : 2000/1000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 12Accepted Submission(s) : 6Pr...
阅读全文
摘要:find the safest roadTime Limit : 10000/5000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 23Accepted Submission(s) : 12P...
阅读全文
摘要:畅通工程续Time Limit : 3000/1000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 67Accepted Submission(s) : 37Problem Descripti...
阅读全文
摘要:最短路Time Limit : 5000/1000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 82Accepted Submission(s) : 51Problem Description...
阅读全文
摘要:HDU TodayTime Limit: 15000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 19475Accepted Submission(s): 4574Problem...
阅读全文
摘要:Legal or NotTime Limit : 2000/1000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 43Accepted Submission(s) : 26Problem De...
阅读全文
摘要:Triangle LOVETime Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/65536K (Java/Other)Total Submission(s) : 49Accepted Submission(s) : 30Problem D...
阅读全文
摘要:逃生 Problem Description 糟糕的事情发生啦,现在大家都忙着逃命。但是逃命的通道很窄,大家只能排成一行。现在有n个人,从1标号到n。同时有一些奇怪的约束条件,每个都形如:a必须在b之前。 同时,社会是不平等的,这些人有的穷有的富。1号最富,2号第二富,以此类推。有钱人就贿赂负责人,
阅读全文
摘要:RewardTime Limit : 2000/1000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 7Accepted Submission(s) : 3Problem Descriptio...
阅读全文
摘要:Genealogical treeTime Limit : 2000/1000ms (Java/Other)Memory Limit : 131072/65536K (Java/Other)Total Submission(s) : 5Accepted Submission(s) : 3Specia...
阅读全文
摘要:确定比赛名次Time Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 40Accepted Submission(s) : 31Problem Descript...
阅读全文
摘要:Agri-NetTime Limit : 2000/1000ms (Java/Other)Memory Limit : 20000/10000K (Java/Other)Total Submission(s) : 8Accepted Submission(s) : 4Problem Descript...
阅读全文
摘要:NetworkTime Limit : 2000/1000ms (Java/Other)Memory Limit : 60000/30000K (Java/Other)Total Submission(s) : 17Accepted Submission(s) : 8Special JudgePro...
阅读全文
摘要:ConscriptionTime Limit : 2000/1000ms (Java/Other)Memory Limit : 131072/65536K (Java/Other)Total Submission(s) : 13Accepted Submission(s) : 6Problem De...
阅读全文
摘要:MatrixTime Limit : 2000/1000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 2Accepted Submission(s) : 1Problem Descriptio...
阅读全文
摘要:HighwaysTime Limit : 2000/1000ms (Java/Other)Memory Limit : 131072/65536K (Java/Other)Total Submission(s) : 4Accepted Submission(s) : 1Problem Descrip...
阅读全文
摘要:The Unique MST Time Limit: 1000MSMemory Limit: 10000KTotal Submissions: 24058Accepted: 8546DescriptionGiven a connecte...
阅读全文
摘要:Advanced FruitsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2052Accepted Submission(s): 1053Spe...
阅读全文
摘要:Dark roadsTime Limit : 2000/1000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 7Accepted Submission(s) : 2Problem Descri...
阅读全文
摘要:Fibonacci Tree Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3006 Accepted Submission(s): 966 P
阅读全文
摘要:TreeTime Limit : 6000/2000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 2Accepted Submission(s) : 2Problem DescriptionT...
阅读全文
摘要:Connect the CitiesTime Limit : 2000/1000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 4Accepted Submission(s) : 3Proble...
阅读全文
摘要:Ice_cream’s world IIITime Limit : 3000/1000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 6Accepted Submission(s) : 3Pro...
阅读全文
摘要:首先要知道memset函数是对字节为单位进行赋值的;void *memset(void *s, int ch,size_tn);函数解释:将s中前n个字节 (typedef unsigned int size_t )用 ch 替换并返回 s 。其实这里面的ch就是ascii为ch的字符;将s所指向的...
阅读全文
摘要:Truck HistoryTime Limit : 4000/2000ms (Java/Other)Memory Limit : 131072/65536K (Java/Other)Total Submission(s) : 59Accepted Submission(s) : 21Problem ...
阅读全文
摘要:欢迎参加——每周六晚的BestCoder(有米!)Jungle RoadsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5430Accepted ...
阅读全文
摘要:继续畅通工程 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 17822 Accepted Submission(s): 7672 Problem
阅读全文
摘要:PalindromeTime Limit : 4000/2000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 88Accepted Submission(s) : 30Problem Desc...
阅读全文
摘要:括号匹配(二)时间限制:1000 ms | 内存限制:65535 KB 难度:6描述给你一个字符串,里面只包含"(",")","[","]"四种符号,请问你需要至少添加多少个括号才能使这些括号匹配起来。如:[]是匹配的([])[]是匹配的((]是不匹配的([)]是不匹配的输入第一行输入一个正整数N,...
阅读全文
摘要:搬寝室Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 21365Accepted Submission(s): 7266Problem Descri...
阅读全文
摘要:LCS算法妙解 LCS问题简述:最长公共子序列 一个数列 S,如果分别是两个或多个已知数列的子序列,且是所有符合此条件序列中最长的,则S 称为已知序列的最长公共子序列。 LCS问题的分支:最长公共子串与最长公共子序列 子串(Substring)是串的一个连续的部分,子序列(Subsequence)则
阅读全文
摘要:Common SubsequenceTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 43194Accepted: 17514DescriptionA subsequence of a given sequence is the giv...
阅读全文
摘要:问题 A: 一道签到题时间限制: 2 Sec内存限制: 128 MB提交: 62解决: 27[提交][状态][讨论版]题目描述我想说这是一道签到题,意思就是本次测试中最水的一道,不过我这样说你真的愿意相信我吗?哈哈,题目是这样的给你一下小数,然后请告诉我分别告诉我这个小数的循环节的循环次数、循环节以...
阅读全文
摘要:Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 9047 Accepted Submission(s): 4121 Problem Descri
阅读全文
摘要:题解:kmp里面就找了一次,如果一次匹配成功就结束,进行下次匹配,此处用了递归;strstr也可以做。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。 。。。。。。。。。。............................................
阅读全文
摘要:Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4437 Accepted Submission(s): 2145
阅读全文
摘要:Number Sequence Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 19246 Accepted Submission(s): 8
阅读全文
摘要:KMP算法 —— next 数组的应用 --- 前缀中最小循环节,最大重复次数在大神的基础上添加了一点自己的理解:从图片中可以看出next数组中存的值就是最近一次最近一次循环节的下标。。。在KMP算法的使用中,首要任务就是获取一个字符串的next数组,所以我们得明白next数组的含义(最好的方法是自...
阅读全文
摘要:所以对于这道题,求出len处的next值,并递归的向下求出所有的next值,得到的就是答案。 所以每次只需要找此段匹配的长度就好 /***************************************************************************/ 代码:用了个递
阅读全文
摘要:Oulipo Time Limit : 3000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other) Total Submission(s) : 67 Accepted Submission(s) : 44 Problem Description The French author Georges Perec (1936...
阅读全文
摘要:Power Strings Problem Description Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b
阅读全文
摘要:Catch That CowTime Limit : 4000/2000ms (Java/Other)Memory Limit : 131072/65536K (Java/Other)Total Submission(s) : 113Accepted Submission(s) : 46Proble...
阅读全文
摘要:Zipper Problem Description Given three strings, you are to determine whether the third string can be formed by combining the characters in the first t
阅读全文
摘要:Fire NetTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7944Accepted Submission(s): 4534Problem De...
阅读全文
摘要:Walking AntTime Limit: 2 Seconds Memory Limit: 65536 KBAnts are quite diligent. They sometimes build their nests beneath flagstones.Here, an ant is w...
阅读全文
摘要:1 #include 2 #include 3 #include 4 using namespace std; 5 int step,t; 6 int visit[25]; 7 int map[25]; 8 int pre[26]; 9 int disx[4]={0,1,0,-1};10 int ...
阅读全文
摘要:Exchange CardsTime Limit:2 Seconds Memory Limit:65536 KBAs a basketball fan, Mike is also fond of collecting basketball player cards. But as a student...
阅读全文
摘要:Dungeon Master Problem Description You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which
阅读全文
摘要:RescueTime Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 24Accepted Submission(s) : 11Problem Descript...
阅读全文
摘要:1 #include 2 int fun(int a,int b){ 3 int ans=1; 4 while(b){ 5 if(b&1)ans*=a; 6 a*=a; 7 b>>=1; 8 } 9 r...
阅读全文
摘要:SeedingTime Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 101Accepted Submission(s) : 52Problem Descri...
阅读全文
摘要:Avoid The LakesTime Limit : 2000/1000ms (Java/Other)Memory Limit : 131072/65536K (Java/Other)Total Submission(s) : 190Accepted Submission(s) : 106Prob...
阅读全文
摘要:LottoTime Limit : 2000/1000ms (Java/Other)Memory Limit : 131072/65536K (Java/Other)Total Submission(s) : 32Accepted Submission(s) : 20Problem Descript...
阅读全文
摘要:变形课Time Limit : 2000/1000ms (Java/Other)Memory Limit : 131072/65536K (Java/Other)Total Submission(s) : 80Accepted Submission(s) : 21Problem Descriptio...
阅读全文
摘要:PetTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1754Accepted Submission(s): 847Problem Descript...
阅读全文
摘要:最少步数时间限制:3000 ms | 内存限制:65535 KB 难度:4描述这有一个迷宫,有0~8行和0~8列:1,1,1,1,1,1,1,1,11,0,0,1,0,0,1,0,11,0,0,1,1,0,0,0,11,0,1,0,1,1,0,1,11,0,0,0,0,1,0,0,11,1,0,1,...
阅读全文
摘要:Problem ATime Limit : 2000/1000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 26Accepted Submission(s) : 1Problem Descri...
阅读全文
摘要:PieTime Limit : 5000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 190Accepted Submission(s) : 72Problem Descriptio...
阅读全文
摘要:Prime Ring ProblemTime Limit : 4000/2000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 18Accepted Submission(s) : 7Probl...
阅读全文
摘要:代码一:数字有重复: 1 #include 2 int n,m,a[10],arr[10]={3,4,5,6}; 3 void dfs(int v){ 4 if(v >= n){ 5 for(int i = 0;i 2 #include 3 #include 4 usin...
阅读全文
摘要:思想:存三个数组记录记录走的过程,运用回溯不符合或row==n+1就跳出当前层,直到找完;递归时的路径都在保存着,当连续跳出到第一次进入的dfs且i=n时就全部跳出dfs函数了; 1 #include 2 #include 3 int n,sum; 4 int visit[3][100]; 5...
阅读全文