Size: 5313
Comment: 嗯嗯?!应该是系统问题
|
Size: 1627
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
##language:zh #pragma section-numbers off ''' 巧夺天工的设计,就在自然之间 ''' [[TableOfContents]] = [email protected] = |
{{{ #!cplusplus |
Line 9: | Line 4: |
*这里是 '''啄木鸟''' Python应用开发 '''开源社区'''的Wiki大本营,这里是一个大家庭,更美好的未来需要每一个人的努力,相信我们的工作会服务于社会,服务于为这里付出每一份辛劳的每一个人。(如何开始 Wiki?---["HelpContents"]帮助中心 是个easy 的起点) *开源社区的灵感来自于 * '''巧夺天工的设计,就在自然之间'''这句话, * 英文来源'''Discover the design of nature,discover the evidence of God.''' * 它的形象就是勤勤恳恳的工作者的形象。 * Logo ,吉祥物设计佂集ing...["WoodPecker"] * attachment:woodpecker_org.jpg * ["WoodpeckerEPs"] -- ''社区为大家,大家为社区;人人都能管,人人都能说,要是不满意,直接提出来!'' = 啄木鸟项目 = * 社区源自列表中的讨论::[http://python.cn/pipermail/python-chinese/2004-July/002072.html python-chinese@高性能分布式网络存储系统的想法] * 是以开发为中心的开源软件社区! * ["WoodpeckerLicense"] -- 社区版权声明! == FreeBSD项目 == * ["bsd"] FreeBSD文档项目 == Java项目 == * ["EclipseDoc"] Eclipse文档项目 * [http://220.248.2.35:7080/share/Python/@huangdong.com/mavenClass/UseMaven20040811/index.html Maven推广网络会课PPT]--20040811 * [http://www.woodpecker.org.cn/maven-hd.tbz mp3下载] * [http://www.woodpecker.org.cn/UseMaven20040811.rar PPT下载] == Python应用系统项目 == * ["PyUSS"](python统一存储服务) * ["Otter"] 水獭(基于twisted的高速、可扩展性二进制流框架) * ["Roo"] - 一个支持多语言接口、多种访问方式的简单共享队列库 * ["Compass"] 指南针(基于OpenGNS协议的全局服务支持系统) === 关联项目 === * [http://www.socialbrain.org/default.asp SocialBrain.org] 所属的 * ["wego"]--个人社会性知识管理工具 == Python中文化项目 == * ["modpythoncn"] mod_python文档 * ["PyCookbook"] - Python 食谱 * ["TPiP"] - Py 的文本处理 * ["PyTwisted"] - Twisted 一个功能丰富的高性能socket框架 == NewEdit项目 == * wxPython+Python的编辑器 ["NewEdit"] * Meteor模板处理系统 ["Meteor"] == Python源码分析项目 == * Python虚拟机结构分析 ["PythonVM"] == 社区建设项目 == * 正式启动项目 * 前期准备、测试性项目 * Blog建设项目 * ["MasteringPyBlosxom"] -- PyBlosxom从入门到精通! = 啄木鸟在线 = ||<rowspan=2> http://groups-beta.google.com/img/groups2beta_m.gif|||| '''Woodpecker.Python'''|| ||[http://groups-beta.google.com/group/PyWoodpecker 阅览讨论组文档]||at [http://groups-beta.google.com/ groups-beta.google]|| * 在线联系方式: * UC 组为 '''4070424''' * QQ 组为 '''1073669'''(已满,不能加入了,bytomz)---(还可以加入这个群2567903,原qq群的不少成员也在这个群) * ["WoodpeckerClass"] -- 每周在线会课 * [http://python.cn/ Python中文邮件列表] -- python.cn的邮件列表 * [http://python.8866.org/lists/ python中国] - 邮件列表资源 gentoo cn (gentoo.cn at gmail.com)发起的 社区demo... * [http://groups-beta.google.com/group/python-cn 中国Python用户讨论组] - 这是在python.cn不能工作时创建的,有兴趣地加入。 - limodou ----- == 啄木鸟知识库 == '''开源技术的推广,知识的积累同样是我们关注所在!''' * ["FLOSS"] --- Free-Libre and Open-Source Software;社区文章分类汇总! * SoftwareEngineering --- '''软件工程学'''凡事预则立,不预则废! * [http://220.248.2.35:7080/share/zqupload/tutorials/RationalUnifiedProcess_zh_cn/ Rational Unified Process] 向您说明如何应用软件工程的最佳方案,以及如何使用工具来实现软件工程流程的自动化 = 啄木鸟行者堂 = '''开源之路中国漫漫兮其修远!吾等自将上下而求索! ''' 参见:[http://wiki.woodpecker.org.cn/moin.cgi/_e5_b1_88_e5_8e_9f_e5_85_a8_e9_9b_86?action=refresh&arena=Page.py&key=_e5_b1_88_e5_8e_9f_e5_85_a8_e9_9b_86.text_html#head-fb3c8bdac595d0c16488af7ca455c754db340e0c 屈原之离骚] * 凡是理解开源精神,原意分享经验的 ''行者'' 欢迎在此Wiki 注册自个儿的森林是也乎! * 在下本来想到的"啄木鸟人",是"风之谷"中那种具有毁灭性力量却同时正直温柔的 '''鸟人''' * http://nocache.czug.org/Members/Zoomq/zcollect/birdman.gif * 可是!这词儿,中文里的意思太固化了!咱们不要触霉头了吧! * ["woodpecker-hacker"]--- 所有 ''行者'' 的注册入口 * ["PyUSS/PyUSScontribute"] --- 当前OUSS 项目的贡献者报名 |
#include<stdio.h> #include<string.h> typedef struct { char ch[50]; int len; }SqString; int creat_string(SqString s1,SqString s2,SqString s); int check(int a[50][50]); |
Line 94: | Line 14: |
void main() { int i=0; SqString s,s1,s2; scanf("%s",&s1.ch); s1.len=strlen(s1.ch); scanf("%s",&s2.ch); s2.len=strlen(s2.ch); for(i=0;i<10;i++){ |
|
Line 95: | Line 23: |
---- -- Zoom.Quiet [[DateTime(2004-08-09T21:42:16Z)]] |
s.ch[i]='*'; s.len++; } creat_string(s1,s2,s); return ; } int creat_string(SqString s1,SqString s2,SqString &s) { int i,j,k,m,n,t=0; int a[50][50]; int b[50][50]; for(i=0;i<50;i++) for(j=0;j<50;j++) a[i][j]=b[i][j]=0; for(i=0;i<s1.len;i++) for(j=0;j<s2.len;j++) if(s1.ch[i]==s2.ch[j]) a[i][j]=1; k=1; while(check(a)) { for(i=0;i<s1.len;i++) for(j=0;j<s2.len;j++) { b[i][j]=a[i][j]; } for(m=0;m<s1.len;m++) { while(i<s1.len&&j<s2.len) { if(a[i][j]==1&&a[i+k][j+k]==0) { a[i][j]=0; i=i+k+1; j=j+k+1; } else {i++; j++; } } } for(n=0;n<s2.len;n++) { while(i<s1.len&&j<s2.len) { if(a[i][j]==1&&a[i+k][j+k]==0) { a[i][j]=0; i=i+k+1; j=j+k+1; } else {i++; j++; } } } k++; } while(i<s1.len&&j<s2.len) if(b[i][j]==1) for(;t<k;t++) { s.ch[t]=s1.ch[i]; i++; } printf("%s",s.ch); return 1; } int check(int a[50][50]) { int i,j; for(i=0;i<50;i++) for(j=0;j<50;j++) if(a[i][j]!=0) return 1; return 0; } |
Line 98: | Line 94: |
== 问题 == {{{ 提问:请问您的moin运行速度怎么这么快呀,是什么版本呀?我的在windows XP上运行的速度好慢呀~ }}}-- Self:Apple * 嗯嗯?!应该是系统问题!啄木鸟运行在FreeBSD 中,Apache+mod_python; XP 本身没有多线程功能,每次编辑/显示 MoinMoin 会调用 Python 进行工作,所以XP…………………… |
... }}} |
1 #include<stdio.h>
2 #include<string.h>
3 typedef struct
4 { char ch[50];
5 int len;
6 }SqString;
7 int creat_string(SqString s1,SqString s2,SqString s);
8 int check(int a[50][50]);
9
10
11 void main()
12 { int i=0;
13 SqString s,s1,s2;
14 scanf("%s",&s1.ch);
15 s1.len=strlen(s1.ch);
16 scanf("%s",&s2.ch);
17 s2.len=strlen(s2.ch);
18 for(i=0;i<10;i++){
19
20 s.ch[i]='*';
21 s.len++;
22 }
23 creat_string(s1,s2,s);
24 return ;
25 }
26 int creat_string(SqString s1,SqString s2,SqString &s)
27 { int i,j,k,m,n,t=0;
28 int a[50][50];
29 int b[50][50];
30 for(i=0;i<50;i++)
31 for(j=0;j<50;j++)
32 a[i][j]=b[i][j]=0;
33 for(i=0;i<s1.len;i++)
34 for(j=0;j<s2.len;j++)
35 if(s1.ch[i]==s2.ch[j])
36 a[i][j]=1;
37 k=1;
38 while(check(a))
39 {
40 for(i=0;i<s1.len;i++)
41 for(j=0;j<s2.len;j++)
42 {
43 b[i][j]=a[i][j];
44 }
45 for(m=0;m<s1.len;m++)
46 { while(i<s1.len&&j<s2.len)
47 { if(a[i][j]==1&&a[i+k][j+k]==0)
48 { a[i][j]=0;
49 i=i+k+1;
50 j=j+k+1;
51 }
52 else
53 {i++;
54 j++;
55 }
56 }
57 }
58 for(n=0;n<s2.len;n++)
59 { while(i<s1.len&&j<s2.len)
60 { if(a[i][j]==1&&a[i+k][j+k]==0)
61 { a[i][j]=0;
62 i=i+k+1;
63 j=j+k+1;
64 }
65 else
66 {i++;
67 j++;
68 }
69 }
70 }
71 k++;
72 }
73 while(i<s1.len&&j<s2.len)
74 if(b[i][j]==1)
75 for(;t<k;t++)
76 { s.ch[t]=s1.ch[i];
77 i++;
78 }
79 printf("%s",s.ch);
80 return 1;
81 }
82 int check(int a[50][50])
83 { int i,j;
84 for(i=0;i<50;i++)
85 for(j=0;j<50;j++)
86 if(a[i][j]!=0)
87 return 1;
88 return 0;
89 }
90
91 ...