摘要: /*周期串的求法如果字符串可以由某个字符串重复多次得到,我们说该串以k为周期.输入长度不超过80的串,求最小周期.*/#include<iostream>#include<string.h>using namespace std;int main(){ char word[100]; scanf("%s",word); int len =strlen(word); for(int i=1;i<len;i++)if(len%i==0) { int ok=1; for(int j=i;j<len;j++) if(wor... 阅读全文
posted @ 2012-11-18 22:23 myth_HG 阅读(787) 评论(0) 推荐(0) 编辑
摘要: /*GCommando WarInput: Standard InputOutput: Standard Output“Waiting for orders we held in the wood, word from the front never cameBy evening the sound of the gunfire was miles awayAh softly we moved through the shadows, slip away through the treesCrossing their lines in the mists in the fields on ou 阅读全文
posted @ 2012-11-18 00:39 myth_HG 阅读(500) 评论(0) 推荐(0) 编辑
摘要: /*O - Dragon of LoowaterTime Limit:1000MS Memory Limit:0KB 64bit IO Format:%lld & %lluSubmitStatusDescriptionProblem C: The Dragon of Loowater Once upon a time, in the Kingdom of Loowater, a minor nuisance turned into a major problem. The shores of Rellau Creek in central Loowater had always... 阅读全文
posted @ 2012-11-18 00:25 myth_HG 阅读(209) 评论(0) 推荐(0) 编辑