noj大作业
我们的作业Immediate Constituent Analysis

B : The girl
1. What is “constituent”?
Constituent is a term used in structure sentence analysis for every linguistic unite, which is a part of a large linguistic. Several constituents together form a construction.
• In this sense, we can take all the Grammatical Units in our text book into several syntactic categories like the following list: • Word level Phrasal • N=noun NP=noun phrase • A=adjective AP=adjective phrase • V=verb VP=verb phrase • P=preposition PP=preposition phrase • Det=determiner S=sentence or clause • Adv=adverb • Conj=conjuction
6,Features of IC Analysis
Q1: What is the advantage of IC Analysis? Q2: What is the disadvantage of IC Analysis?
• Ex. The man sees a dog on the hill. Q: what is the meaning of the sentence? And draw the tree diagram. The ambiguity exists in the sentence. (a) The man sees a dog. And a dog is on the hill. (b) The man is on the hill. And the man sees a dog.
牡丹江2024年02版小学3年级上册第十一次英语第四单元暑期作业(含答案)

牡丹江2024年02版小学3年级上册英语第四单元暑期作业(含答案)考试时间:90分钟(总分:100)B卷考试人:_________题号一二三四五总分得分一、综合题(共计100题共100分)1. 听力题:The chemical properties of a substance are determined by its ______.2. 填空题:I saw a _______ (小鸭子) swimming in the pond.3. 填空题:I have ________ (两只) cats at home.4. 填空题:I saw a _______ (小皮卡丘) in the park.5. 听力题:The tree is ______ (full) of ripe apples.6. 填空题:The first successful heart surgery was performed by _______. (克里斯托弗·里德)7. 填空题:I have a plant that thrives in _____.8. 填空题:Certain plants are prized for their ______ and use in landscape design.(某些植物因其美丽和在景观设计中的应用而受到赞赏。
)9. 选择题:What is 7 + 2?A. 8B. 9C. 10D. 11答案:B10. 听力题:Rocks can be classified based on their ______ properties.11. 选择题:What is the capital of Cyprus?A. NicosiaB. LimassolC. LarnacaD. Famagusta答案: A. Nicosia12. 听力题:A base feels slippery and can turn __________ paper blue.13. 选择题:What do we call the process of water turning into vapor?A. EvaporationB. CondensationC. PrecipitationD. Sublimation14. 选择题:What do we call a person who plays music?A. ArtistB. MusicianC. PainterD. Writer15. 选择题:What is the main ingredient in pizza?A. BreadB. CheeseC. Tomato sauceD. All of the above答案: D16. 填空题:My hamster runs so fast on its ______ (轮子).17. 听力题:Light travels in ______ (straight) lines.18. 选择题:What is 8 x 8?A. 64B. 72C. 56D. 48答案:A19. 填空题:My favorite game is _______ (视频游戏).20. 选择题:Which of these is a type of transportation?A. BicycleB. TreeC. HouseD. Mountain答案:A21. 选择题:Which fruit is yellow and curved?A. AppleB. BananaC. OrangeD. Grape22. 填空题:My favorite toy is a stuffed ______.23. 填空题:My grandmother makes the best __________ (点心).24. 听力题:A __________ is a natural resource that needs conservation.25. 听力题:A __________ is a small insect that can fly.26. 听力题:Chemical reactions often involve the breaking and forming of ______.27. 填空题:I want to learn how to ________.28. 填空题:The capital of Egypt is ________ (埃及的首都是________).29. 听力题:The sun rises in the ______ (east).30. 填空题:We should _______ (share/keep) our toys.31. 选择题:What is the capital of Hungary?A. BudapestB. PragueC. ViennaD. Bucharest32. 听力题:His favorite sport is ______ (basketball).33. 填空题:_____ (carnivorous) plants eat insects.34. 填空题:A _____ (果蔬) plate is healthy and colorful.35. 听力题:I need to ______ my backpack before school. (pack)36. 听力题:The butterfly emerges from its _____ chrysalis.37. 听力题:The ______ helps distribute nutrients in plants.38. 填空题:My grandma shares her __________ (生活经验) with us.39. 选择题:What is the name of the highest water fall in the world?A. Angel FallsB. Niagara FallsC. Victoria FallsD. Iguazu Falls答案: A. Angel Falls40. 选择题:What is the main ingredient in chocolate?A. CocoaB. SugarC. MilkD. Butter答案:A41. 听力题:A ______ is often seen in gardens.42. 听力题:A __________ is a common pet that purrs.43. 填空题:The penguin is a bird that cannot _______ (飞).44. 听力题:She is a friendly ________.45. 填空题:__________ (可再生资源) are resources that can be replenished naturally.46. 选择题:What is the capital of India?A. MumbaiB. New DelhiC. KolkataD. Bangalore答案:B47. 听力题:The process of crystallization leads to the formation of __________.48. 听力题:I see a _____ (rainbow) after the rain.49. 填空题:中国的________ (artifacts) 让我们了解过去的文明。
python大作业代码及文档

python大作业代码及文档Python大作业代码及文档本次Python大作业使用Python语言编写,旨在提高Python编程能力和解决实际问题的能力。
本文介绍了代码的设计思路以及实现细节。
一. 项目说明这是一个基于Python的命令行应用程序,可以实现简单的文本处理功能。
具体功能包括:字符统计,单词统计,行数统计等。
用户可以输入自己想要统计的文件路径,程序会返回统计结果。
二. 代码结构代码主要分为3个文件,分别是main.py,fileHandler.py,textHandler.py。
1. main.pymain.py是程序的入口文件,用于启动整个程序。
代码首先通过input()函数获取用户需要统计的文件路径。
然后调用fileHandler.py中的isExist()函数判断该文件是否存在。
接下来调用textHandler.py中的countChar(),countWord(),countLine()分别进行字符统计,单词统计和行数统计。
最后将统计结果输出到控制台中。
2. fileHandler.pyfileHandler.py文件主要用于处理文件相关的操作,比如判断文件是否存在等。
代码首先通过os.path.exists()函数判断文件是否存在,如果不存在则返回False,否则返回True。
3. textHandler.pytextHandler.py文件主要用于处理文本文件的相关操作,比如字符统计、单词统计、行数统计等。
代码中的countChar()函数使用len()函数来计算字符串的长度,从而得出字符数。
countWord()函数则是通过split()函数将文本文件转化为单词列表,再使用len()函数进行统计。
countLine()函数则是通过读取文本文件的行数来获取文本文件的行数,其中使用了readlines()函数和len()函数。
三. 运行效果当用户输入文件路径后,程序将返回文件的字符数、单词数、行数,如下所示:请输入文件路径:D:\MyFiles\PythonFile\test.txt字符数: 4单词数: 1行数: 1四. 总结本次Python大作业中,我们编写了一个简单的文本处理程序,提高了Python编程能力和实际问题解决能力。
南昌2024年10版小学三年级J卷英语第1单元暑期作业

南昌2024年10版小学三年级英语第1单元暑期作业考试时间:80分钟(总分:110)B卷考试人:_________题号一二三四五总分得分一、综合题(共计100题)1、选择题:What is the name of the plant that grows in deserts?A. CactusB. FernC. RoseD. Oak2、What is the largest planet in our solar system?A. EarthB. MarsC. SaturnD. Jupiter答案:D3、听力题:I want to _____ (learn/forget) new things.4、听力题:The capital of Nicaragua is __________.5、听力题:The festival is very _______ (exciting).6、听力题:I love to ______ (dance) to music.7、听力题:I love ______ (chocolate) cake.8、What is the largest mammal in the ocean?A. DolphinB. SharkC. WhaleD. Octopus答案:C9、ta Stone helped scholars understand ______ (古埃及) writing. 填空题:The Rose10、How many days are in a year?A. 365B. 366C. 364D. 36011、听力题:A chemical reaction can involve the absorption of _____.12、Which instrument is a string instrument?A. PianoB. FluteC. GuitarD. Trumpet答案:C13、填空题:The ______ (小鸟) builds its nest with twigs and grass.14、听力题:The _____ is the center of our solar system.15、听力题:The chemical structure of DNA contains ______.16、听力题:A _____ is made up of two or more elements.17、What is the opposite of 'up'?A. DownB. LeftC. RightD. Across18、听力题:The chemical formula for acetic anhydride is ______.19、What type of tree produces pine cones?A. DeciduousB. EvergreenC. Fruit TreeD. Flowering答案:B20、What do you call a person who makes bread?A. BakerB. ChefC. CookD. Butcher答案: A21、听力题:The Crab Nebula is a famous ______ remnant.22、What is the capital of Syria?A. AleppoB. DamascusC. HomsD. Latakia23、填空题:The _______ (The Age of Exploration) opened new lands for colonization and trade.24、Which bird is known for its colorful feathers?A. SparrowB. EagleC. PeacockD. Pigeon答案:C25、听力题:Organic compounds always contain ______.26、听力题:The process of making yogurt involves bacterial _______.27、填空题:We often go ________ (远足) in the mountains.28、听力题:I can ________ my toys.29、听力题:Sublimation is the process of a solid turning directly into a ______.The ________ was an important document in American history.31、听力题:The Himalayas were formed by the collision of two tectonic ______.32、填空题:The ______ (狮子) lives in Africa and is very strong.33、What sound does a cow make?A. WoofB. MeowC. MooD. Quack34、选择题:What is the name of our planet?A. MarsB. VenusC. EarthD. Jupiter35、Which fruit is red and often associated with teachers?A. BananaB. AppleC. OrangeD. Grape36、填空题:The seal barks loudly on the _________. (岩石)37、填空题:A ________ (园艺设计) reflects personal style.38、听力题:Bees help ______ plants by pollinating.39、What is the opposite of "fast"?A. QuickB. SlowC. SpeedyD. Swift40、填空题:A cat's purr can be soothing and is often thought to be a sign of ________________ (幸福).A ______ (老虎) has a powerful build and sharp teeth.42、听力题:The cat is ___ the tree. (in)43、听力题:A hydrophobic substance repels ______.44、选择题:What is the name of the famous explorer who discovered America?A. Ferdinand MagellanB. Christopher ColumbusC. Marco PoloD. Vasco da Gama45、听力题:The chemical formula for calcium fluoride is _____.46、听力题:We are going to the ___. (fair)47、What is the capital of India?A. MumbaiB. DelhiC. BangaloreD. Kolkata48、听力题:Acids can change the color of indicators to ______.49、填空题:I share my secrets with my ____.50、选择题:What do you call the story of your life?A. BiographyB. AutobiographyC. NovelD. Fiction51、听力题:A __________ is formed when water evaporates and leaves minerals behind.52、选择题:What is the name of the famous art museum in Paris?B. Musée d'OrsayC. Centre PompidouD. Palais de Tokyo53、填空题:The _______ (The Magna Carta) limited the power of the monarchy.54、填空题:The first man-made satellite was ________ (斯普特尼克).55、听力题:We go _____ (skating) in winter.56、听力题:A pulley can change the direction of a ______.57、听力题:The dog is ________ and friendly.58、填空题:The rabbit nibbles on ______ (草). It is very ______ (可爱).59、Which animal is known for having a long neck?A. ElephantB. GiraffeC. RhinoD. Hippo60、听力题:The movement of water can reshape the ______.61、What do you call the person who teaches students?A. DoctorB. TeacherC. EngineerD. Pilot答案:B62、听力题:My dad cooks _____ (breakfast/lunch) on Sundays.63、What is the capital of Greece?A. AthensB. RomeC. Cairo答案:A64、填空题:The ______ (小鱼) swims gracefully in the aquarium.65、填空题:My brother has a passion for __________ (动物保护).66、听力题:The _____ (科学) project is interesting.67、Which of these is a type of weather?A. SunshineB. SandwichC. HomeworkD. Running68、Which fruit is yellow and curved?A. AppleB. BananaC. CherryD. Grape69、填空题:I have a teddy _____ (熊) on my bed.70、听力题:The _______ of an object can be tested using a pressure gauge.71、听力题:The __________ can provide insights into the health of an ecosystem.72、填空题:The __________ is a large body of ice moving slowly down a mountain. (冰川)73、填空题:My ___ (小狗) greets me at the door.74、填空题:The __________ is a famous natural wonder in the world. (大峡谷)75、What is the name of the famous fictional character who travels through time ina blue police box?A. Doctor WhoB. Sherlock HolmesC. Harry PotterD. Indiana Jones答案: A76、听力题:The bee collects _____ from flowers.77、What is the capital of St. Vincent and the Grenadines?A. KingstownB. CalliaquaC. BequiaD. Union Island答案: A78、What is the main purpose of a map?a. To tell timeb. To show directionsc. To display picturesd. To record events答案:b79、What do you call a person who fixes cars?A. DoctorB. EngineerC. MechanicD. Teacher答案:C80、What is the name of the largest mammal?A. ElephantB. Blue WhaleC. GiraffeD. Hippopotamus81、听力题:The _____ (家庭) is important.82、填空题:The __________ (历史的回顾性) fosters reflection.83、填空题:________ (环境影响) shapes plant variety.84、填空题:We have a ______ (愉快的) experience planned for the weekend.85、填空题:My sister enjoys __________ (参与) in extracurricular activities.86、What is the name of the famous landmark in Paris?A. Leaning Tower of PisaB. Eiffel TowerC. ColosseumD. Big Ben答案:B87、填空题:A mouse can fit through a ______ (小洞).88、What is the primary purpose of a fridge?A. To freeze foodB. To cool foodC. To cook foodD. To store food答案:B89、听力题:The bear's strength and power make it a formidable force in the ____.90、What do we call the practice of protecting endangered species?a. Conservationb. Preservationc. Restorationd. Rehabilitation答案:a91、选择题:How many legs does a spider have?A. 6B. 8C. 10D. 1292、填空题:I like to play ______ (钢琴).93、填空题:The __________ (热带雨林) is rich in biodiversity.94、How do you say "good morning" in Italian?A. BuongiornoB. BuonaseraC. BuonanotteD. Ciao95、听力题:I can ________ (adapt) to new situations.96、听力题:The puppy is ______ at the door. (scratching)97、填空题:I like to play doctor with my toy ________ (玩具名称).98、听力题:I like to _____ (参加) parties.99、听力题:The Age of Exploration began in the ________ century.100、How many players are in a rugby team?A. 10B. 13C. 15D. 17答案:C。
20秋季大工《人工智能》终年大作业

20秋季大工《人工智能》终年大作业介绍这份文档旨在说明20秋季大工《人工智能》课程的终年大作业。
本作业的目标是让学生综合应用所学的人工智能知识和技术,解决一个实际的问题或完成一个项目。
作业要求- 作业主题:学生可以根据自己的兴趣和专业背景选择一个合适的主题,但必须与人工智能相关。
- 独立完成:学生需要独立完成作业,不得寻求用户的帮助或借助他人的协助。
- 简单策略:学生应该根据自己的能力和专长,选择简单的策略和方法来解决问题,避免涉及复杂的法律问题。
- 内容确认:不要引用无法确认的内容,确保所提供的信息准确可信。
作业内容学生需要根据自己选择的主题,完成以下任务:1. 问题定义:明确问题的定义和目标,并解释为什么这个问题对人工智能领域具有重要性。
2. 数据收集:收集与问题相关的数据集,并进行预处理和清洗。
3. 模型选择:选择适合解决问题的人工智能模型或算法,并解释选择的原因。
4. 模型训练:使用选定的模型对数据进行训练,并进行模型调优。
5. 模型评估:评估训练好的模型的性能和准确度,解释评估结果。
6. 结果展示:将模型的结果以可视化的方式展示出来,并对结果进行解释和分析。
时间安排作业将在整个学年内进行,学生需要根据以下时间安排完成各个阶段:- 第一学期:- 问题定义和数据收集:9月初至10月底- 模型选择和训练:11月初至12月底- 第二学期:- 模型调优和评估:1月初至2月底- 结果展示和报告撰写:3月初至4月底评分标准作业将根据以下标准进行评分:- 问题定义和目标的清晰度和合理性- 数据收集和预处理的质量- 模型选择和训练的合适性和有效性- 模型评估和结果展示的准确性和可视化效果- 报告撰写和表达的清晰度和逻辑性提交要求学生需要按照要求将作业提交给授课教师或助教。
具体的提交要求将在课程开始时公布。
总结本次终年大作业旨在让学生综合运用人工智能知识和技术,解决一个实际的问题或完成一个项目。
通过完成这个作业,学生将加深对人工智能领域的理解和应用能力,并提升解决问题的能力和创新思维。
西工大noj答案解析(完整版)

西北工业大学POJ答案绝对是史上最全版(不止100题哦……按首字母排序)1.“1“的传奇2.A+B3.A+BⅡ4.AB5.ACKERMAN6.Arithmetic Progressions7.Bee8.Checksum algorithm9.Coin Test10.Dexter need help11.Double12.Easy problem13.Favorite number14.Graveyard15.Hailstone16.Hanoi Ⅱ17.Houseboat18.Music Composer19.Redistribute wealth20.Road trip21.Scoring22.Specialized Numbers23.Sticks24.Sum of Consecutive25.Symmetric Sort26.The Clock27.The Ratio of gainers to losers28.VOL大学乒乓球比赛29.毕业设计论文打印30.边沿与内芯的差31.不会吧,又是A+B32.不屈的小蜗33.操场训练34.插入链表节点35.插入排序36.插入字符37.成绩表计算38.成绩转换39.出租车费40.除法41.创建与遍历职工链表42.大数乘法43.大数除法44.大数加法45.单词频次46.迭代求根47.多项式的猜想48.二分查找49.二分求根50.发工资的日子51.方差52.分离单词53.分数拆分54.分数化小数55.分数加减法56.复数57.高低交换58.公园喷水器59.韩信点兵60.行程编码压缩算法61.合并字符串62.猴子分桃63.火车站64.获取指定二进制位65.积分计算66.级数和67.计算A+B68.计算PI69.计算π70.计算成绩71.计算完全数72.检测位图长宽73.检查图像文件格式74.奖金发放75.阶乘合计76.解不等式77.精确幂乘78.恐怖水母79.快速排序80.粒子裂变81.链表动态增长或缩短82.链表节点删除83.两个整数之间所有的素数84.路痴85.冒泡排序86.你会存钱吗87.逆序整数88.排列89.排列分析90.平均值函数91.奇特的分数数列92.求建筑高度93.区间内素数94.三点顺序95.山迪的麻烦96.删除字符97.是该年的第几天98.是该年的第几天?99.数据加密100.搜索字符101.所有素数102.探索合数世纪103.特殊要求的字符串104.特殊整数105.完全数106.王的对抗107.危险的组合108.文件比较109.文章统计110.五猴分桃111.小型数据库112.幸运儿113.幸运数字”7“114.选择排序115.寻找规律116.循环移位117.延伸的卡片118.羊羊聚会119.一维数组”赋值“120.一维数组”加法“121.勇闯天涯122.右上角123.右下角124.圆及圆球等的相关计算125.圆及圆球等相关计算126.程序员添加行号127.找出数字128.找幸运数129.找最大数130.整数位数131.重组字符串132.子序列的和133.子字符串替换134.自然数立方的乐趣135.字符串比较136.字符串复制137.字符串加密编码138.字符串逆序139.字符串排序140.字符串替换141.字符串左中右142.组合数143.最次方数144.最大乘积145.最大整数146.最小整数147.最长回文子串148.左上角149.左下角1.“1“的传奇#include <stdio.h>#include <stdlib.h>#include <math.h>int main(){int n,i,j,k=0,x=1,y,z,m,p,q,a,s=0; scanf("%d",&n);m=n;for(i=1;i<12;i++){m=m/10;k++;if(m==0)break;}q=n;k=k-1;for(a=1;a<=k;a++){x=x*10;}y=q%x;z=q/x;p=q-y;if(z>=2)s=s+x+z*k*(x/10);elses=s+z*k*(x/10);for(j=p;j<=n;j++){m=j;for(i=1;i<12;i++) {x=m%10;if(x==1)s++;m=m/10;if(m==0)break;}}printf("%d",s);return 0;}2.A+B#include <stdio.h>int doubi(int n,int m) {n=n+m;n=n%100;return n;}int main(){int t,i,a[100],n,m;scanf("%d",&t);for (i=0;i<=(t-1);i++){ scanf("%d%d",&n,&m); a[i]=doubi(n,m);}for (i=0;i<=(t-1);i++)printf("%d\n",a[i]); return 0;}3.A+BⅡ#include <stdio.h>int main(){int A,B,sum;scanf("%d%d",&A,&B);sum=A+B;printf("%d\n",sum); return 0;}4.AB#include <stdio.h>#include <stdlib.h>#include <string.h>int main(){char s[100],q[100];double a,b,c;int n=0,i;scanf("%lf%lf",&a,&b);c=a*b;sprintf(s,"%.0lf",c);for(i=0;i<strlen(s);i++){n=n+s[i]-48;}while(n>=10){sprintf(q,"%d",n);n=0;for(i=0;i<strlen(q);i++) n=n+q[i]-48;}printf("%d",n);return 0;}5.ACKERMAN#include <stdio.h>#include <stdlib.h>#include <math.h>int ack(int x,int y){int n;if (x==0) {n=y+1;return n;}else if (y==0) n=ack(x-1,1);else n=ack(x-1,ack(x,y-1)); return n;}int main(){int m,b;scanf("%d%d",&m,&b);m=ack(m,b);printf("%d",m);return 0;}6.Arithmetic Progressions#include <stdio.h>#include <stdlib.h>#include <math.h>int g(int n){int i;if(n==1) return 0;if(n==2) return 1;if(n==3) return 1;for(i=2;i<=sqrt(n);i++) if(n%i==0) return 0; return 1;}int f(int a,int b,int c){int i=0,s=a-b;if(c==1&&g(a)==1) return a;if(b==0&&g(a)!=1) return -1;while(1){s=s+b;if(g(s)) i++;if(i>=c) break;}return s;int main(){int a,b,c,d[100],i=0,n;while(1){scanf("%d%d%d",&a,&b,&c); if(a==0&&b==0&&c==0) break; d[i]=f(a,b,c);i++;}n=i;for(i=0;i<n;i++)printf("%d\n",d[i]);return 0;}7.Bee#include <stdio.h>#include <stdlib.h>int main()int A[100],i=0,j,k,female=0,male=1,x; for(;;i++){scanf("%d",&A[i]);if(A[i]==-1)break;}for(j=0;j<i;j++){female=0,male=1;for(k=1;k<A[j];k++){x=female;female=male;male=x+male+1;}printf("%d %d\n",male,female+male+1);}return 0;}8.Checksum algorithm#include <stdio.h>#include <stdlib.h>#include <string.h>int main(){int i,n,t,j;char s[100][100];for(i=0;;i++){gets(s[i]);if(s[i][0]=='#') break;}n=i;for(i=0;i<n;i++){t=0;for(j=0;j<strlen(s[i]);j++)if(s[i][j]==32) t=t;else t=t+(j+1)*(s[i][j]-64);printf("%d\n",t);}return 0;}9.Coin Test#include <stdio.h>#include <stdlib.h>int main(){char A[100000];int n,i=0,a=0,b=0,j; double x;while(1){scanf("%c",&A[i]);if(A[i]=='\n')break;i++;}for(j=0;j<i;j++){if(A[j]=='S'){printf("WA");goto OH;}if(A[j]=='U')a++;if(A[j]=='D')b++;}x=a*1.0/(a+b)*1.0;if(x-0.5>0.003||x-0.5<-0.003) printf("Fail");elseprintf("%d/%d",a,a+b);OH:return 0;}10.Dexter need help#include <stdio.h>int fun(int a){if(a==1) return 1;elsereturn fun(a/2)+1;}int main(){int a,b[100],i=0,j; while(1){scanf("%d",&a);if(a==0)break;b[i]=fun(a);i++;}for(j=0;j<i;j++){printf("%d\n",b[j]); }return 0;}11.Double#include <stdio.h>#include <stdlib.h>#include <math.h>int main(){int a[100],b[100],i,j,n,t=0; for(i=0;;i++){scanf("%d",&a[i]);if(a[i]==0) break;}n=i;for(i=0;i<n;i++)b[i]=2*a[i];for(i=0;i<n;i++)for(j=0;j<n;j++)if(a[i]==b[j]) t++;printf("%d",t);return 0;}12.Easy problem#include <stdio.h>#include <stdlib.h>#include <math.h>int main(){int N,i,n,j=0;scanf("%d",&N);for(i=2;i<N+1;i++){if((N+1)%i==0)j++; }printf("%d",j/2);return 0;}13.Favorite number#include <stdio.h>#include <string.h>#define MAXNUM 100000int prime_number = 0;int prime_list[MAXNUM]; bool is_prime[MAXNUM];int ans[MAXNUM + 2];int dp[MAXNUM + 2];void set_prime() {int i, j;memset(is_prime, 0, sizeof(is_prime));for (i = 2; i < MAXNUM; i++) {if (is_prime[i] == 0) {prime_list[prime_number++] = i;if (i >= MAXNUM / i) continue;for (j = i * i; j < MAXNUM; j+=i) { is_prime[j] = 1;}}}}int main() {int i, j, k,o=0,d[100];memset(dp, -1, sizeof(dp));set_prime();ans[0] = 0;dp[1] = 0;for (i = 1; i <= MAXNUM; i++) {ans[i] = ans[i - 1] + dp[i];if (dp[i + 1] == -1 || dp[i + 1] > dp[i] + 1) {dp[i + 1] = dp[i] + 1;}for (j = 0; j < prime_number; j++) {if (i > MAXNUM / prime_list[j]) break; k = i * prime_list[j];if (dp[k] == -1 || dp[k] > dp[i] + 1) { dp[k] = dp[i] + 1;}}}while (scanf("%d%d", &i, &j) == 2 && (i || j)) { d[o]=ans[j] - ans[i - 1];o++;}for(i=0;i<o;i++)printf("%d\n",d[i]);}14.Graveyard#include <stdio.h>#include <stdlib.h>#include <math.h>int main(){int a[100],b[100],n,i,j;double s,p,l,t;for(i=0;;i++){scanf("%d%d",&a[i],&b[i]);if(a[i]==0&&b[i]==0) break;}n=i;for(i=0;i<n;i++){p=10000;if(b[i]%a[i]==0){printf("0.0000\n");continue;}; t=10000/((double)a[i]);for(j=1;j<a[i]+b[i];j++){l=10000/((double)(a[i]+b[i]));l=t-j*l;l=fabs(l);if(l<p) p=l;}s=(a[i]-1)*p;printf("%.4lf\n",s); }return 0;}15.Hailstone#include <stdio.h>#include <stdlib.h>#include <string.h>int f(int n){int s=1;while(1){if(n==1) return s;else if(n%2==0) n=n/2,s++; else n=3*n+1,s++;}}int main(){int n,m,i,j=0,t;scanf("%d%d",&m,&n);printf("%d %d",m,n);if(m>n) t=m,m=n,n=t;for(i=m;i<=n;i++)if(f(i)>j) j=f(i);printf(" %d",j);return 0;}16.Hanoi Ⅱ#include <stdio.h>#include <stdlib.h>#define M 70int start[M], targe[M];long long f(int *p, int k, int fina) {if(k==0) return 0;if(p[k]==fina) return f(p,k-1,fina);return f(p,k-1,6-fina-p[k])+(1LL<<(k-1));}int main (){long long ans;int n;while(scanf("%d",&n),n){int i;for(i=1;i<=n;i++) scanf("%d",&start[i]);for(i=1;i<=n;i++) scanf("%d",&targe[i]);int c=n;for(;c>=1&&start[c]==targe[c];c--);if(c==0){printf("0\n"); continue;}int other=6-start[c]-targe[c];ans=f(start,c-1,other)+f(targe,c-1,other)+1; printf("%lld\n",ans);}return 0;}17.Houseboat#include <stdio.h>#include <stdlib.h>#include <math.h>#define pi 3.1415926int f(float x,float y){int i;for(i=0;;i++)if(50*i>sqrt(x*x+y*y)*sqrt(x*x+y*y)*pi/2) break;return i;}int main(){int n,i,a[100];float x,y;scanf("%d",&n);for(i=0;i<n;i++){scanf("%f%f",&x,&y);a[i]=f(x,y);}for(i=0;i<n;i++)printf("%d %d\n",i+1,a[i]);return 0;}18.Music Composer19.Redistribute wealth#include <stdio.h>#include <stdlib.h>#include <math.h>int main(){inta[1000],b[1000],n,i,j,s,sum,t,m,mid,c[100],k=0; while(1){scanf("%d",&n);if(n==0) break;{s=0;for(i=1;i<=n;i++){scanf("%d",&a[i]);s=s+a[i];}m=s/n;b[1]=a[1]-m;b[0]=0;for(i=2;i<n;++i)b[i]=b[i-1]+a[i]-m;for(i=0;i<n;i++)for(j=0;j<n-1-i;j++)if(b[j]>b[j+1])t=b[j],b[j]=b[j+1],b[j+1]=t;mid=b[n/2];sum=0;for(i=0;i<=n-1;++i) sum=sum+fabs(mid-b[i]); c[k]=sum;k++;}}for(i=0;i<k;i++) printf("%d\n",c[i]);return 0;}20.Road trip#include <stdio.h>#include <stdlib.h>#include <math.h>int f(int n){int a[100],b[100],i,s;for(i=0;i<n;i++)scanf("%d%d",&a[i],&b[i]); s=a[0]*b[0];for(i=1;i<n;i++)s=s+a[i]*(b[i]-b[i-1]);return s;}int main(){int n,c[100],i=0;while(1){scanf("%d",&n);if(n==-1) break;c[i]=f(n);i++;}n=i;for(i=0;i<n;i++)printf("%d\n",c[i]);return 0;}21.Scoring#include <stdio.h>#include <stdlib.h>#include <string.h>int main(){int i,j,sum,min,c,count,n,a,b; char s1[50],s2[50];scanf("%d",&n);for(i=0;i<n;i++){count=sum=0;scanf("%s",s2);for(j=0;j<4;j++){scanf("%d%d",&a,&b);if(b!=0){sum+=(a-1)*20+b;count++;}}if(i==0){c=count,min=sum;strcpy(s1,s2);}else if(count>c||(count==c&&sum<min)) {min=sum;c=count;strcpy(s1,s2);}}printf("%s %d %d\n",s1,c,min); return 0;}22.Specialized Numbers#include <stdio.h>#include <stdlib.h>int main(){int i,n,sum10,sum12,sum16;for(i=2992;i<3000;i++){n=i;sum10=0;while(n){sum10+=n%10;n/=10;}n=i;sum12=0;while(n){sum12+=n%12;n/=12;}n=i;sum16=0;while(n){sum16+=n%16;n/=16;}if(sum10==sum12&&sum12==sum16) printf("%d\n",i);}return 0;}23.Sticks#include <stdio.h>#include <string.h>#include <stdlib.h>int len[64], n, minlen, get;bool b[64];int cmp(const void *a, const void *b){return *(int *)a < *(int *)b ? 1 : -1;}bool dfs(int nowlen, int nowget, int cnt){if(cnt >= n) return false;if(get == nowget) return true;int i;bool f = false;if(nowlen == 0) f = true;for(i = cnt; i < n; i++){if(!b[i]){if(len[i] + nowlen == minlen) {b[i] = true;if(dfs(0, nowget+1, nowget)) return true;b[i] = false;return false;}else if(len[i] + nowlen < minlen){b[i] = true;if(dfs(nowlen+len[i], nowget, i+1)) return true;b[i] = false;if(f) return false;while(i + 1 < n && len[i] == len[i+1]) i++;}}}return false;}int main(){int i, tollen;while(scanf("%d", &n), n){tollen = 0;int j = 0, p;for(i = 0; i < n; i++){scanf("%d", &p);if(p <= 50){len[j] = p;tollen += len[j];j++;}}n = j;if(n == 0){printf("0\n");continue;}qsort(len, n, sizeof(int), cmp); for(minlen = len[0]; ; minlen++) {if(tollen % minlen) continue; memset(b, 0, sizeof(b));get = tollen / minlen;if(dfs(0, 0, 0)){printf("%d\n", minlen);break;}}}return 0;}24.Sum of Consecutive#include <stdio.h>#include <stdlib.h>#include <string.h>int len[64],n,minlen,get;int b[64];int cmp(const void *a,const void *b){return *(int *)a<*(int *)b?1:-1;}int dfs(int nowlen,int nowget,int cnt){if(cnt>=n) return 0;if(get==nowget) return 1;int i,f=0;if(nowlen==0) f=1;for(i=cnt;i<n;i++){if(len[i]+nowlen==minlen){b[i]=1;if(dfs(0,nowget+1,nowget)) return 1;b[i]=0;return 0;}else if(len[i]+nowlen<minlen){b[i]=1;if(dfs(nowlen+len[i],nowget,i+1)) return 1;b[i]=0;if(f) return 0;while(i+1<n&&len[i]==len[i+1]) i++;}}return 0;}int main(){int i,tollen,q=0,c[100];while(scanf("%d",&n),n){tollen=0;int j=0,p;for(i=0;i<n;i++){scanf("%d",&p);if(p<=50){len[j]=p;tollen+=len[j];j++;}}n=j;if(n==0){printf("0\n");continue;}qsort(len,n,sizeof(int),cmp); for(minlen=len[0];;minlen++){if(tollen%minlen) continue; memset(b,0,sizeof(b));get=tollen/minlen;if(dfs(0,0,0)){c[q]=minlen;q++;break;}}}for(i=0;i<q;i++)printf("%d\n",c[i]);return 0;}25.Symmetric Sort#include <stdio.h>#include <stdlib.h>#include <math.h>int main(){double A[100];int i=0,j=0,k=0,l=0,sum=0; while(1){scanf("%lf",&A[i]);if(A[i]==0)break;i++;}for(j=0;j<i;j++){if(A[j]==2)printf("1\n");else{int B[10000],m=1,number=0;double n;B[0]=2;for(k=3;k<=A[j];k+=2){n=(double)k;for(l=2;l<=sqrt(n);l++){if(k%l==0)goto ai;}B[m]=k;m++;ai:;}for(k=0;k<m;k++){sum=0;for(l=k;l<m;l++){sum+=B[l];if(sum==A[j]){number++;break;}}}printf("%d\n",number);}}return 0;}26.The Clock#include <stdio.h>#include <stdlib.h>#include <string.h>int main(){char s[100][100],a[100];int i,j,n;scanf("%d",&n);for(i=0;i<n;i++) scanf("%s",s[i]);for(i=0;i<n-1;i++)for(j=0;j<n-1-i;j++)if(strlen(s[i])>strlen(s[i+1]))strcpy(a,s[i]),strcpy(s[i],s[i+1]),strcpy(s[i+1],a) ;if(n%2==0){for(i=0;i<n-1;i=i+2) printf("%s ",s[i]);printf("%s ",s[n-1]);for(i=i-3;i>0;i=i-2) printf("%s ",s[i]);}else{for(i=0;i<n-1;i=i+2) printf("%s ",s[i]); printf("%s ",s[n-1]);for(i=i-1;i>0;i=i-2) printf("%s ",s[i]); }return 0;}27.The Ratio of gainers to losers#include<stdio.h>int main(){char s[5];int i,sum=0;gets(s);for(i=0;s[i]!='\0';i++){switch(s[i]){case'I': sum+=1;break;case'V': sum=5-sum;break; case'X':sum=10-sum;break; }}printf("%d\n",sum);return 0;}28.VOL大学乒乓球比赛#include <stdio.h>#include <stdlib.h>int main(){printf("A=Z\nB=X\nC=Y\n"); return 0;}29.毕业设计论文打印#include <stdio.h>#include <stdlib.h>int main(){int a[100],j=1,i,n,m;scanf("%d%d",&n,&m);for(i=0;i<n;i++)scanf("%d",&a[i]);for(i=0;i<n;i++)if(a[i]>a[m]) j++;printf("%d",j++);return 0;}30.边沿与内芯的差#include <stdio.h>#include <stdlib.h>int main(){int A[100][100],i,j,m,n,s=0,t=0; scanf("%d%d",&n,&m);for(i=1;i<=n;i++){for(j=1;j<=m;j++){scanf("%d",&A[i][j]);。
《小学英语B》大作业A

《小学英语B》大作业A 小学英语B 大作业A介绍本文档是小学英语B课程的大作业A。
本次作业要求进行一系列语言练,包括阅读、写作、听力和口语等方面,旨在提高学生的英语水平。
本文档将包含以下几个部分:2. 作文(Essay Writing)3. 听力练(Listening Exercises)4. 口语练(Speaking Exercises)阅读理解请在下面空白处提供一篇阅读材料,并设置几个与该文章相关的问题,要求学生根据文章内容回答问题。
文章应包含关键信息,并能帮助学生理解文章的主旨和细节。
请在此处填写阅读材料,并提供相关问题。
作文请在下面空白处提供一个作文题目,并提供相关指引,要求学生根据题目进行作文练。
作文题目应引导学生进行合理的写作,鼓励他们表达自己的观点,同时也可以涉及一些英语知识,以提高学生的写作水平。
请在此处填写作文题目,并提供相关指引。
听力练请在下面空白处提供一段听力材料,并设置一个或多个问题,要求学生根据所听到的内容回答问题。
听力材料应包含不同类型的语言,如对话、独白等,并注意适当设置难度,以帮助学生巩固所学的听力技能。
请在此处填写听力材料,并提供相关问题。
口语练请在下面空白处提供一个口语练题目,并提供相关指引,要求学生用英语进行口语练。
口语题目可以与日常生活、个人喜好、家庭等主题相关,并鼓励学生进行表达和互动。
请在此处填写口语练题目,并提供相关指引。
总结通过以上的练,学生将能够从不同的角度提高自己的英语能力。
阅读理解、作文、听力练和口语练将有助于学生全面提高听说读写的能力,加深对英语的理解和应用。
希望学生能够积极参与并取得进步,达到预期的研究目标。
以上是小学英语B课程的大作业A的内容。
祝同学们完成作业顺利,提高英语水平!。
nit大作业3

感 受 父 爱 的 无 私 与 毫 无 保 留
我 怀 着 细 腻 的 心 感 受 这 一 切
在 我 的 眼 里 您 是 无 所 不 能 的
是 您 我 的 父 亲
一 个 幸 福 为 我 们 构 建
一 片 充 满 爱 的 天
是 谁 用 瘦 弱 的 身 躯 为 我 们 撑 起
, !
,
,
?
?
…..
!
我长大了,我的胆子也大了 好多事自己做主了不和他商量 渐渐地我学会了顶嘴 不善于表达的父亲气得说不出话来 当我抬起头看向他时 却意外地看见 他削瘦的脸庞 是那样的无奈与伤心 我沉默了 低下了头 眼泪不听话的流了下来 ……
当我第一次 离家去远地上学的时候 母亲 一个劲儿地牵着我的手 在我耳边唠叨 父亲 则是严厉的说好好学习 然而转头地那一刹那 他的眼睛湿润了
时光荏苒 如白驹过隙 有一种感情并不随岁月流逝而减弱 这种感情便是感恩--感谢父亲 相反 一日复一日在心底某个深处酝酿 酝酿渐渐扩大 渐渐拉长
父爱是山我是树 父亲是我生命的源泉 父亲是我精神的支柱
在错过的感恩节里 祝愿父亲 献给父亲 愿他心想事成 笑口常开
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
程序设计挑战式课程设计极限挑战挑战,不是为着征服自然,而是为着突破自我,超越自我生命有极限,思想无极限,高度有极限,境界无极限作业名称:算法演示程序 学 院:航海学院 班 级:03011403 学 号:2013300951 姓 名:苏和 团队组成:西北工业大学2022年4月25日1、问题与背景(描述程序所要解决的问题或应用背景)2、开发工具(列出所使用的开发工具和第3方开发库)3、主要功能(详细说明程序的功能)4、设计内容(详细描述解决问题的原理和方法、算法、数据结构等)5、程序文件与工程名称(标出程序中所有文件名、工程名称及其说明)6、函数模块(程序中各个函数的原型声明及其说明)7、使用说明(运行程序的小型说明书)8、程序开发总结(简要叙述编写本作业的收获与思考)进行了巩固和训练。
9、运行截图(附上程序运行的截图画面,至少有1幅,截图越翔实得分越高)Windows中抓取当前活动窗口:Alt + Print Screen,抓取全屏:Print Screen。
或者使用HyperSnap等软件(百度搜索)。
10、源程序(附上程序源代码,若是多个文件,标出文件名)1.sort.cpp#include <stdio.h>#include <stdlib.h>#include "myh.h"int main(){int a[100],n,i,k;while(1){printf("\n\t\t\t 欢迎使用排序算法演示程序\n\n\n");printf(" 请输入所要排序的数据个数N(N<100)=");scanf("%d",&n);printf("\n");printf(" 请输入所要排序的数据:");printf("\n\n\t");for(i=0;i<n;i++) scanf("%d",&a[i]);//输入数据printf("\n");printf(" 请选择一种排序方法:\n\n");printf("\t1.冒泡排序\t 2.选择排序\t 3.插入排序\n");printf("\t4.快速排序\t 5.堆排序\t 6.归并排序\t 7.基数排序\n\n"); printf(" 您的选择是:");scanf("%d",&k);switch(k){case 1: Bubble(a,n);break;case 2: Selection(a,n);break;case 3: Insertion(a,n);break;case 4: Quick(a,n,0,n-1);break;case 5: Heap(a,n);break;case 6: MergeSort(a,0,n-1);break;case 7: int *a_p = a;Bucket(a_p,n);break;}printf("\n");printf(" 请选择排列方式:1.从小到大 2.从大到小\n\n");printf(" 您的选择是:");scanf("%d",&k);printf("\n\n");printf(" 结果是:\n\t");if(k=1){for(i=0;i<n;i++) printf("%d ",a[i]);//正序输出}else{for(i=n-1;i>=0;i--) printf("%d ",a[i]);//倒序输出}printf("\n\n 按Q键并确认退出,其他任意键继续:");getchar();if(getchar()=='q') break;printf("\n\n\n");}return 0;}2.sort_fun.cpp#include "myh.h"#include <math.h>#include <stdlib.h>void Bubble(int a[],int n){//冒泡排序int i,j,t;for(j=0;j<n-1;j++)for(i=0;i<n-1-j;i++)//一趟排序if(a[i]>a[i+1]){t=a[i];a[i]=a[i+1];a[i+1]=t;//交换}}void Selection(int a[],int n){//选择排序int i,j,k,t;for(i=0;i<n-1;i++){k=i;for(j=i+1;j<n;j++)if(a[j]<a[k])k=j;//找出最小数if(i!=k){t=a[i];a[i]=a[k];a[k]=t;//如果不是本身则与相应的a[i]交换}}}void Insertion(int a[],int n){//插入排序int i,k,t;for(i=1;i<n;i++){t=a[i];k=i-1;while(t<a[k]){//与前边的数依次比较a[k+1]=a[k];//逐个后移k--;if(k==-1)break;}a[k+1]=t;//插入原数据}}void Quick(int a[],int n,int left,int right){//快速排序,left、right分别为数组左右边界int i,j,t;if(left<right){i=left;j=right+1;while(1){while(i+1<n&&a[++i]<a[left]);//向后搜索大于a[left]的数while(j-1>-1&&a[--j]>a[left]);//向前搜索小于a[left]的数if(i>=j)break;t=a[i];a[i]=a[j];a[j]=t;//交换}t=a[left];a[left]=a[j];a[j]=t;Quick(a,n,left,j-1);Quick(a,n,j+1,right);//左右半部分分别再次快速排序}}void Shift(int a[] , int i , int m){//建堆int k,t;t=a[i];k=2*i+1;while(k<m){if((k<m-1)&&(a[k]<a[k+1])) k ++;if(t<a[k]){a[i]=a[k];//使数列成为一棵完全二叉树的存储结构i=k; //即成为小根堆k=2*i+1; //ki<=k(2i)且ki<=k(2i+1)(1≤i≤n)}else break;}a[i]=t;}void Heap(int a[] , int n){//堆排序int i,k;for(i=n/2-1;i>=0;i--) Shift(a,i,n);//初始化操作:将a[n]构造为初始堆for(i=n-1;i>=1;i--){//每一趟排序的基本操作:将当前无序区的k=a[0]; //堆顶记录a[1]和该区间的最后一个记录交换,a[0]=a[i]; //然后将新的无序区调整为堆(亦称重建堆)a[i]=k;Shift(a,0,i);}}void MergeSort(int R[],int low,int high){//归并排序int mid;if(low<high){mid=(low+high)/2;MergeSort(R,low,mid);MergeSort(R,mid+1,high);Merge(R,low,mid,high);//重复运行}}void Merge(int *R,int low,int m,int high){int i=low,j=m+1,p=0;int *R1;R1=(int *)malloc((high-low+1)*sizeof(int));//申请空间,用以放置合并后的序列if(!R1)return;while(i<=m&&j<=high)R1[p++]=(R[i]<=R[j])?R[i++]:R[j++];while(i<=m)R1[p++]=R[i++];while(j<=high)R1[p++]=R[j++];for(p=0,i=low;i<=high;p++,i++) R[i]=R1[p];//两两比较选择相对小的元素放入到合并空间}void Bucket(int *p , int n){//基数排序int maxNum= findMaxNum( p , n );//获取数组中的最大数int loopTimes = getLoopTimes(maxNum);//获取最大数的位数,次数也是再分配的次数。
int i;for( i = 1 ; i <= loopTimes ; i++) {//对每一位进行桶分配sort2(p , n , i );}}int getLoopTimes(int num){//获取数字的位数int j = 1 ;int temp = num/10;while( temp != 0 ) {j++;temp = temp / 10;}return j;}int findMaxNum( int *p , int n){//查询数组中的最大数int i ;int m = 0;for( i = 0 ; i < n ; i++) {if(*(p+i) > m) {m = *(p+i);}}return m;}void sort2(int *p , int n , int loop){//将数字分配到各自的桶中,然后按照桶的顺序输出排序结果int buckets[100][100] ;//建立一组桶int tempNum = (int) pow(10 , loop-1);int i , j ;for( i = 0 ; i < n ; i++ ) {//求桶的index的除数int row_index = (*(p+i) / tempNum) % 10;for(j = 0 ; j < 20 ; j++) {if(buckets[row_index][j] ==NULL) {buckets[row_index ][j] = *(p+i) ;break;}}}int k = 0 ;//将桶中的数,倒回到原有数组中for(i = 0 ; i < 10 ; i++) {for(j = 0 ; j < 20 ; j++) {if(buckets[i][j] != NULL) {*(p + k ) = buckets[i][j] ;buckets[i][j]=NULL;k++;}}}}3.myh.hvoid Bubble(int a[],int n);void Selection(int a[],int n);void Insertion(int a[],int n);void Quick(int a[],int n,int left,int right);void Heap(int a[] , int n);void MergeSort(int R[],int low,int high); void Bucket(int *p , int n);void Merge(int *R,int low,int m,int high); int getLoopTimes(int num);int findMaxNum( int *p , int n);void sort2(int *p , int n , int loop);。