SDUTOJ 2476Period】的更多相关文章

#include<iostream> #include<string.h> #include<stdio.h> #define N 1000010 using namespace std; char s[N]; int next[N]; void getnext(char s[]) { int j=-1,i=0,len; next[0]=-1; len=strlen(s); while(i<=len) { if(j==-1||s[i]==s[j]) { ++i;…
http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2151 Phone Number Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 We know that if a phone number A is another phone number B’s prefix, B is not able to be called. For a…
http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2610 Boring Counting Time Limit: 3000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述     In this problem you are given a number sequence P consisting of N integer and Pi is the ith ele…
http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2609 A-Number and B-Number Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 Tom is very interested in number problem. Nowadays he is thinking of a problem about A-number…
http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2624 Contest Print Server Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述     In ACM/ICPC on-site contests ,3 students share 1 computer,so you can print your source cod…
http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2608 Alice and Bob Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 Alice and Bob like playing games very much.Today, they introduce a new game. There is a polynomial li…
http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2623 The number of steps Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 Mary stands in a strange maze, the maze looks like a triangle(the first layer have one room,the…
http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2606 Rubik’s cube Time Limit: 2000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述     Flabby is addicted to Rubik’s cube. He has many kinds of Rubik’s cube and plays them well. He can…
http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2605 A^X mod P Time Limit: 5000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 It's easy for ACMer to calculate A^X mod P. Now given seven integers n, A, K, a, b, m, P, and a function…
SDUTOJ 2498 AOE网上的关键路径 Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 一个无环的有向图称为无环图(Directed Acyclic Graph),简称DAG图.     AOE(Activity On Edge)网:顾名思义,用边表示活动的网,当然它也是DAG.与AOV不同,活动都表示在了边上,如下图所示:                                         如上所示,共有1…