
其他
文章平均质量分 74
cyendra
Azarath Metrion Zinthos
展开
-
Codeforces 66E - Petya and Post
E. Petya and Posttime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle Vasya's uncle is a postman. The po原创 2013-04-10 17:58:36 · 1115 阅读 · 0 评论 -
POJ 3106 Flip and Turn 模拟 分析
--------const int maxn=400;const int maxm=200000;int n,m;char a[maxn][maxn];char b[maxn][maxn];int stk[10];int cnt;char s[maxm];char cd[7][3]={"1","CX","V","BY","2","AZ","H"};char sp[7][8]=原创 2014-01-10 00:27:40 · 942 阅读 · 1 评论 -
URAL 1098 Questions 约瑟夫环
--------int n;int f[maxn];char s[maxn];int main(){ int n=0; while (gets(s+n)){ n=strlen(s); } s[n]=0; f[0]=0; for (int i=1;i<=n;i++) f[i]=(f[i-1]+1999)%i; if (原创 2014-01-09 00:54:56 · 798 阅读 · 0 评论 -
MUTC8 J-The More The Better
The More The BetterTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2568 Accepted Submission(s): 668Problem DescriptionGiven a原创 2013-07-25 10:53:10 · 707 阅读 · 0 评论 -
MUTC2013 J-I-number-hdu4608
I-numberTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 195 Accepted Submission(s): 75Problem DescriptionThe I-number of x i原创 2013-07-23 19:32:11 · 749 阅读 · 0 评论 -
哈希模板
#include #include using namespace std;const int maxn=11111;const int maxh=10000019;int head[maxh];int next[maxh];long long st[maxn];void hash_init(){ memset(head,0,sizeof(head));}in原创 2013-06-07 10:20:39 · 1499 阅读 · 0 评论 -
算法设计基础
算法设计基础①思维的体操②问题求解常见策略General Problem Solving Techniques③高效算法设计举例Designing Efficient Algorithms ④动态规划专题⑤小结与习题暴力NEFU 722 Anagram 全排列 STL枚举UVa 10755原创 2013-06-05 08:21:44 · 890 阅读 · 0 评论 -
UVa 10391 - Compound Words 字符串hash
Problem E: Compound WordsYou are to find all the two-word compound words in a dictionary. A two-word compound word is a word in the dictionary that is the concatenation of exactly two other word原创 2013-06-06 18:14:04 · 830 阅读 · 0 评论 -
NEFU 721 Substrings exp 枚举
Substrings expTime Limit 1000msMemory Limit 65536KdescriptionYou are given a number of case-sensitive strings of alphabetic characters, find t原创 2013-06-06 15:00:45 · 972 阅读 · 0 评论 -
UVa 10755 - Garbage Heap 最大子块和 dp
Garbage HeapTime limit: ? secondsMemory limit: 64 megabytesFarmer John has a heap of garbage formed in a rectangular parallelepiped.It consists of garbage pieces each of which has a value.原创 2013-06-06 14:47:15 · 1146 阅读 · 0 评论 -
NEFU 725 Number Guessing 枚举
Number GuessingTime Limit 1000msMemory Limit 65536KdescriptionNumber Guessing is a computer game. First, the computer chooses four different d原创 2013-06-06 15:04:40 · 862 阅读 · 0 评论 -
Uva 1326 - Jurassic Remains 中途相遇法
Paleontologists in Siberia have recently found a number of fragments of Jurassic period dinosaur skeleton. The paleontologists have decided to forward them to the paleontology museum. Unfortunately, t原创 2013-06-06 09:51:32 · 972 阅读 · 0 评论 -
高斯消元模板
int gauss(int r, int c){ bool flag=false; int coe=1; int i=0,t=0; for(int j=0; j<c; ++j) { int index=i; for(int k=i; k<r; ++k) if(a[k][j]>0)转载 2013-06-03 08:48:37 · 636 阅读 · 0 评论 -
MUTC 2 C - Meeting point-2 切比雪夫距离orz
Meeting point-2Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 889 Accepted Submission(s): 485Problem DescriptionIt has been原创 2013-06-02 20:28:33 · 1183 阅读 · 0 评论 -
MUTC 2 B - Meeting point-1 二分
Meeting point-1Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2324 Accepted Submission(s): 735Problem DescriptionIt has been原创 2013-06-01 16:49:23 · 674 阅读 · 0 评论 -
二分模板以及STL中的查找
二分查找的基本实现int b_search(int key,int a[],int n){ int l=0,r=n-1; while (l<=r) { int m=(l+r)/2; if (a[m]==key) return m; if (a[m]<key) l=m+1; else r=m-1;原创 2013-05-13 15:38:10 · 617 阅读 · 0 评论 -
Codeforecs 69E. Subsegments STL/线段树
E. Subsegmentstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputProgrammer Sasha has recently begun to study原创 2013-04-19 17:40:20 · 1118 阅读 · 0 评论 -
POJ 3063 Sherlock Holmes 随机化
----------------int n,m;int w[maxn],b[maxn];int s1[maxn],s2[maxn];int w1,b1,w2,b2;double ans,mo;bool flag;void work(int x,int y) { w1=w1-w[s1[x]]+w[s2[y]]; w2=w2-w[s2[y]]+w[s1[x]];原创 2014-01-11 21:28:19 · 995 阅读 · 0 评论