为什么会做噩梦呢???

浼у_涓芥跺荤_诲
╁ㄧ娌荤杩绋涓界舵瀵逛汉浣瀹崇跨ょ锛浣瀵逛汉浣姝e父缁濡楠ㄩ缁绮缁绛涔稿绋搴浼ゃ负杩涓姝ヨ藉涓ぎ虹&寤虹ぞ浼涓讳璋绀句&浼澶х锛瀹瑙e宠惧&俱璐&锛澶у寮&浜洪便濂&芥╃簿绁锛楂惧ュ悍姘村钩锛涓虹惧涔筹ョ惧涔ャ怎么做花灯?我不会做啊!_百度知道
怎么做花灯?我不会做啊!
五年级寒假作业~~~我就不多说了,求助各位大哥大姐!!
提问者采纳
花灯的制作历史悠久,随著时代的变迁,在材质和造型上都有很大的变化。纸、竹、绸缎、木是很常见的传统素材,塑胶、玻璃纸、压克力……等则是现代的材料。其实只要能透光,花灯的制作材料并没有限定,连水果、废弃纸盒、铝罐都可以做材料,所以花灯的变化有无限的想像空间。 一盏盏的灯除了像是黑夜里的小萤火虫,不同的造型也诉说著提灯人在新年的愿望。可爱的小叮当和温馨的维尼熊……等是现代文化的新造型,而传统的十二生肖则配合年节作替换,不断出现许多现代较喜爱的新造型,足可荣登花灯造型的排行冠军,得到人们的喜爱。 作龙是动物里面最难、最复杂的,因为人家说:「画虎、画皮,难画鼓。」因为作人物的话只要左右不对称,看起来就会怪怪的。有些花灯的学员很想要做这个题材,尤其是作观世音神像的时候,花灯师父通常会劝他不要做,不然就是作卡通一点、简化一点,那如果做的很逼真又不正确的话,会变的很难看。 古时后做花灯用的是竹子,如果用铁丝来做的话会发现,这个结构的方式像再盖房子一样,而且你想要做什麼都可以用铁丝把它做出来,就像突然找到一条路,想要做什麼就做什麼,有一种这种感觉,另外一种就是:一调铁丝可以任意的给你形状,而且思考方向不只是一个方向,可能这个方向,要它鼓一点,在这个方向的时候,它却凹一点,一条铁丝它可以有很多的变化,等於说用方向来讲话,它不只是四面八方,是三百六十度无线空间的地方它都可以去旋转、去弯折,这个来训练我们的思考能力应该是蛮不错的。 自制简易花灯(有图)
提问者评价
太感谢拉!!
其他类似问题
54人觉得有用
做花灯的相关知识
您可能关注的推广回答者:回答者:
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁500 Internal Server ErrorInternal Server ErrorThe server encountered an internal error ormisconfiguration and was unable to completeyour request.Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error.新手园地& & & 硬件问题Linux系统管理Linux网络问题Linux环境编程Linux桌面系统国产LinuxBSD& & & BSD文档中心AIX& & & 新手入门& & & AIX文档中心& & & 资源下载& & & Power高级应用& & & IBM存储AS400Solaris& & & Solaris文档中心HP-UX& & & HP文档中心SCO UNIX& & & SCO文档中心互操作专区IRIXTru64 UNIXMac OS X门户网站运维集群和高可用服务器应用监控和防护虚拟化技术架构设计行业应用和管理服务器及硬件技术& & & 服务器资源下载云计算& & & 云计算文档中心& & & 云计算业界& & & 云计算资源下载存储备份& & & 存储文档中心& & & 存储业界& & & 存储资源下载& & & Symantec技术交流区安全技术网络技术& & & 网络技术文档中心C/C++& & & GUI编程& & & Functional编程内核源码& & & 内核问题移动开发& & & 移动开发技术资料ShellPerlJava& & & Java文档中心PHP& & & php文档中心Python& & & Python文档中心RubyCPU与编译器嵌入式开发驱动开发Web开发VoIP开发技术MySQL& & & MySQL文档中心SybaseOraclePostgreSQLDB2Informix数据仓库与数据挖掘NoSQL技术IT业界新闻与评论IT职业生涯& & & 猎头招聘IT图书与评论& & & CU技术图书大系& & & Linux书友会二手交易下载共享Linux文档专区IT培训与认证& & & 培训交流& & & 认证培训清茶斋投资理财运动地带快乐数码摄影& & & 摄影器材& & & 摄影比赛专区IT爱车族旅游天下站务交流版主会议室博客SNS站务交流区CU活动专区& & & Power活动专区& & & 拍卖交流区频道交流区
空间积分0 信誉积分100 UID阅读权限10积分4帖子精华可用积分4 专家积分0 在线时间1 小时注册时间最后登录
白手起家, 积分 4, 距离下一级还需 196 积分
帖子主题精华可用积分4 专家积分0 在线时间1 小时注册时间最后登录
论坛徽章:0
问题描述:
& & 单词接龙是一个与我们经常玩的成语接龙相类似的游戏,现在我们己知一组单词,且
给定一个开头的字母,要求出以这个字母开头的最长的“龙”(每个单词都最多在“龙& 中出现两次),在两个单词相连时,其重合部分合为一部分,例如beast和astonish,如果接成一条龙则变为beastonish,另外相邻的两部分不能存在包含关系,例如at和atide间不能相连。
& & 输入的第一行为一个单独的整数n(n&=20)表示单词数,以下n行每行有一个单词,输入的最后一行为一个单个字符,表来“龙”开头的字母。你可以假定以此字母开头的“龙& 一定存在。
& & 只需输出以此字母开头的最长的“龙”的长度样例:
23& && && && && & (连成的“龙”为atoucheatactactouchoose)
我在输入那就没做出来,用二维数组做,运行不对啊~
#include&stdio.h&
#include&string.h&
char str[200][200];
printf(&please input your string nummber:"
scanf(&%d&,&n);
for(i=0;i&=n;i++)
scanf(&%s&,str[i][]);
&&nbsp|&&nbsp&&nbsp|&&nbsp&&nbsp|&&nbsp&&nbsp|&&nbsp
空间积分0 信誉积分100 UID阅读权限10积分10帖子精华可用积分10 专家积分0 在线时间0 小时注册时间最后登录
白手起家, 积分 10, 距离下一级还需 190 积分
帖子主题精华可用积分10 专家积分0 在线时间0 小时注册时间最后登录
论坛徽章:0
The program has not been tested even compiled, as a reference for you.
/*****************************************************************************
* We can view the all the possible word sequences is a tree, no mater a sequence
* could be connected as dragon or not according to the project specification, i.e.
* each non-leef node has n (number of words) child nodes, and the depth is 2*n.
* All the sequences can be connected as dragons are the subset of the sequences,
* and they are the part of the tree, so it is also a tree with maximum depth is
* 2*n and each of non-leef node has maximum n child nodes and in any path each
* word repeated at most 2 times. The project requires to find the longest dragon.
* The program traveses the tree by depth first and recursively to find the longest
* dragon. If a word to which no more word can append, discard the all subtree after
* the word and make a dragon from root to the word, then, if the dragon is longer
* than previouse longest dragon, keep it as the longest dragon. Thus, the
* the longest dragon is finaly finded after the tree travesing.
* ******************************************************************************/
# include &stdio.h&
# include &string.h&
# include &stdlib.h&
# define& & ENDPATH& & -1
# define& & MAXWORD& & 20& && && && && & /* maximum number of words */
# define& & MAXWLEN& & 20& && && && && & /* maximum length of word&&*/
# define& & MAXDRAG& & MAXWORD*MAXWLEN& &/* maximum length of dragon */
# define& & MAXDPTH& & MAXWORD*2& && && &/* maximum number of words of dragon */
& && && && && && && && && &/* unmber of input words */
char words[MAXWORD][MAXWLEN+1];&&/* to keep input words */
char dragon[MAXDRAG+1];& && && & /* to keep the longest dragon */
int count[MAXWORD];& && && && &&&/* to count the times of each word usage in whole path. must less than 2 for each */
int lookup[MAXWORD][MAXWORD];& & /* lookup table of the number of overlaped characters between any two words */
& && && && && && && &&&/* depth to make dragon */
int path[MAXDPTH+1];& && && && & /* to keep the path of searching */
int overlap[MAXDPTH];& && && && &/* to keep the number of overlaped characters between words in the searching path */
& && && && && && && && && &/* number of overlaped characters between two words
char buffer[MAXDRAG+1];
const int length = MAXDRAG;
* this return the number of maximum overlaped characters between the
* words[w1] and words[w2] accoding to the project specifications.
int check(const short w1, const short w2) {
& & char *p, *q, *r, *start1, *start2, *end1, *end2;
& & end1 = (sart1 = words[w1])+strlen(words[w1])-1;
& & end2 = (sart2 = words[w2])+strlen(words[w2])-1;
& &&&* conditions p!=start and r!=end are to guarantee 相邻的两部分不能存在包含关系
& &&&* if p == start, word 2 may include word 1
& &&&* if r == end, word 1 may include word 2
& & for (p=end1, k=0; p!=star1; p--) {
& && &&&for (q=p,r=start2; q&=end1&&r!=end2; q++,r++)& &
& && && && &if (*q != *r)
& && &&&if (q&end1) k=p-end1+1;& &
* this function recursively searches the possible pathes by depth first.
* it has no any parameters and local variables for the purpose of stack saving.
* the global varibales:
* l -- index to the last word in path.
* m -- index to the word working on.
void nextDepth() {
& & /* save current path */
& & path[depth] =
& & overlap[depth]=
& & /* reset for next depth */
& & depth++;
& & for (m= m&2*n+1; m++) path[m] = ENDPATH;
& & for (m=0; m&n; m++) count[m] = 0;
& & for (m=0; m& m++) if(path[m] != ENDPATH) count[path[m]]++;
& & /* search the next word to be connected if there is a one */
& & for (m=0; m&n; m++) {
& && &&&if (count[m] & 1)&&/* 每个单词都最多在“龙& 中出现两次, discard */
& && &&&if (!(k=lookup[l][m]))& & /* can't be appended, discard */
& && &&&& && && && && && && &&&/* finded */
& & if (m != n)& & /* finded, then enter next depth*/
& && &&&l =
& && &&&nextDepth();
& & } else {& && & /* no more */
& && &&&buffer[0]=
& && &&&for (m=0; path[m]!=ENDPATH; m++)& & /* concatenate the words in the path */
& && && && &strcpy(buffer, words[path[m]]+overlap[m]); /* 重合部分合为一部分 */
& && &&&if (strlen(dragon) & strlen(buffer))& &/* keep the longest draogn 最长的“龙”*/
& && && && &strcpy(dragon, buffer);& &&&
& & }& &&&
int main(int argc, char *argv[]) {
& & /* file format: each word per line. the firat line is number of words */
& & char *data = &./inputdata&;& &
& && && && && && && && && && && &&&
& & char *w,
& & FILE *
& & data = argv[0];
& & fp = fopen(data,&r&);
& & if (!fp) {
& && &&&printf(&open file %s error&, data);
& && &&&exit(1);
& & /* set number of words */
& & w = fgets(fp, buffer,length);
& & n = atoi(w);
& & /* set words */
& & for(m=0; m&n; m++) {
& && &&&w=fgets(fp, buffer, length);
& && &&&strcpy(words[m], buffer);
& & for (m=0; m&n; m++)
& && &&&for (k=0; k&n; k++)
& && && && &lookup[m][k] = check(m, k);
& & dragon[0]=& &/* empty */
& & /* initail the root */
& & for (m=0; m&2*n+1; m++) path[m]=ENDPATH;
& & depth = 0;& & /* root depth */
& & l = 0;& & /* the first word as root */
& & k = 0;& & /* no overlap for the first word */
& & nextDepth();
& & printf(&%d& & (连成的“龙”为 %s)&, strlen(dragon),dragon);
& & return 1;
空间积分0 信誉积分100 UID阅读权限10积分4帖子精华可用积分4 专家积分0 在线时间1 小时注册时间最后登录
白手起家, 积分 4, 距离下一级还需 196 积分
帖子主题精华可用积分4 专家积分0 在线时间1 小时注册时间最后登录
论坛徽章:0
谢谢大虾!
厉害!我再想想不用指针可以做不?
空间积分0 信誉积分100 UID阅读权限10积分10帖子精华可用积分10 专家积分0 在线时间0 小时注册时间最后登录
白手起家, 积分 10, 距离下一级还需 190 积分
帖子主题精华可用积分10 专家积分0 在线时间0 小时注册时间最后登录
论坛徽章:0
1. 重要!!!!
There is a mistake must be corrected on line:
& & if (q&end1) k=p-end1+1;
in function check(). It should be
& & if (q&end1) k=end1-p+1;
2. Use index instead of pointer.
The name of an array variable is a pointer to the first element of the array. In our program,
the words is two dimension array, so it is a double pointer. words[k] is the pointer to
(k+1)th word. Words[k][i] is (i+1)th character in (k+1)th word. word[k][i] = *(word[k] + i),
here word[k][i] is the way of index, while *(word[k]+i) is the way of pointer. Pointer
directly accesses the element of array by the address of the element, but index indirectly
by base address + offset, for instance, words[k] is base and i offset.
int check(const short w1, const short w2) {
& & int p, q, r, start1, start2, end1, end2;
& & end1 = (sart1 = 0)+strlen(words[w1])-1;
& & end2 = (sart2 = 0)+strlen(words[w2])-1;
& &&&* conditions p!=start and r!=end2 are to guarantee 相邻的两部分不能存在包含关系
& &&&* if p == start, word 2 may include word 1
& &&&* if r == end, word 1 may include word 2
& & for (p=end1, k=0; p!=star1; p--) {
& && &&&for (q=p,r=start2; q&=end1&&r!=end2; q++,r++)& &
& && && && &if (words[w1][q] != words[w2][r])
& && &&&if (q&end1) k=end1-p+1;& &
空间积分0 信誉积分100 UID阅读权限10积分4帖子精华可用积分4 专家积分0 在线时间1 小时注册时间最后登录
白手起家, 积分 4, 距离下一级还需 196 积分
帖子主题精华可用积分4 专家积分0 在线时间1 小时注册时间最后登录
论坛徽章:0
万分感谢!我想想~}

我要回帖

更多关于 你会怎么做 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信