noip普及模拟卷2018(重传).docx

上传人:hw****26 文档编号:2126303 上传时间:2019-04-29 格式:DOCX 页数:12 大小:28.88KB
下载 相关 举报
noip普及模拟卷2018(重传).docx_第1页
第1页 / 共12页
noip普及模拟卷2018(重传).docx_第2页
第2页 / 共12页
noip普及模拟卷2018(重传).docx_第3页
第3页 / 共12页
noip普及模拟卷2018(重传).docx_第4页
第4页 / 共12页
noip普及模拟卷2018(重传).docx_第5页
第5页 / 共12页
点击查看更多>>
资源描述

1、18noip 普及模拟卷(重传)原创率高一:单项选择 1.5%*20=30%1.(11100011) 2+(9A) 16=() 10A:351 B:379 C:380 D:3812堆排序根据的数据结构为:A:队列 B:二叉树 C:有向图 D:堆栈3.以下文字体现了-算法:计算:2 14解:原式=(2 7) 2=(2 3) 2*2) 2=(2) 2*2) 2*2) 2=16384A:二分 B:递推 C:广搜 D:递推4.以下语句为定义头文件的是:A:#includeB:#define fin cinC:using namespace std;D:int a100,i;5.计算!(0)Acinj;

2、Bfor (i=1;ib)c=a+b;else c=b+a;20.以下 c+版本不支持万能头文件的是:A:Dev c+5.6.1 B:dev c+ 5.9.2 C:dev c+ 6.1.0 D:dev c+ 4.9.9.2二:问题求解 5%*2=10%1.0,1,1,2,3,5,8 所属的数列的第 18 项与第 19 项之和为-41812.等差数列 10 13 16 19 22 25 28 310 之和为 16160三:读程序写结果 8%*4=32%1.#includeusing namespace std;int main()int a=1,b=2;int c=a*b;int d=a*c+b

3、*b;a=a+d+c*2;b=a*(a+b);double e;e=(double)b+2;if (b%3=0)printf(“%0.2f“,e);else coutusing namespace std; int a,i,n1,n2,n3,x; int zs(int x) for (i=2;ia;for (n1=2;n1 #include#include #includeusing namespace std; long long num,a1001,p,m,n,len,i,ans2001;string s; int main() cinnsm;len=s.length(); for (i=

4、1; i=1; i-,p*=n) num+=ai*p; for (len=1;num0;num/=m,len+) anslen=num%m; for (i=len-1;i=1;i-) if (ansi=10) printf(“%c“,ansi+55);else printf(“%c“,ansi+48);return 0; 输入:16FF2输出 111111114. #includeusing namespacestd;int main() string ch;int a200;int b200;int n, i, t, res;cin ch;n = ch.length();for (i = 0

5、; i 0; i-) if (ai = 0)t+;if (bi - 1 + t using namespace std;int main()int i,n;double pi=0,a=1,b=1;cinn;for (i=1;i0) pi+=1/a;else pi-=1/a; a+=2; b=-b;printf(“%e“, 4*pi);return 0;其中控制 1/x 的加减的变量为 b,当此变量为正时加,负时减。2 (排列数)输入两个正整数 n,m (1#include using namespace std;const int SIZE =25;bool usedSIZE;int dataSIZE;int n,m,i,j,k;bool flag;int main()cinnm;memset(used,false,sizeof(used);for(i=1;i=m;i+)datai=i;usedi=true;flag=true;while(flag)for(i=1;i=m-1;i+) coutdatai“ “;

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 教育教学资料库 > 课程笔记

Copyright © 2018-2021 Wenke99.com All rights reserved

工信部备案号浙ICP备20026746号-2  

公安局备案号:浙公网安备33038302330469号

本站为C2C交文档易平台,即用户上传的文档直接卖给下载用户,本站只是网络服务中间平台,所有原创文档下载所得归上传人所有,若您发现上传作品侵犯了您的权利,请立刻联系网站客服并提供证据,平台将在3个工作日内予以改正。