随笔分类 -  Acm练习

摘要:Acm练习(十)蛇形填数时间限制:3000ms | 内存限制:65535KB难度:3描述在n*n方陈里填入1,2,...,n*n,要求填成蛇形。例如n=4时方陈为:10 11 12 19 16 13 28 15 14 37 6 5 4输入直接输入方陈的维数,即n的值。(n#include using... 阅读全文
posted @ 2015-04-12 21:49 BugsTerminator 阅读(155) 评论(0) 推荐(0)
摘要:Acm练习(十)九九乘法表时间限制:1000ms | 内存限制:65535KB难度:1描述小时候学过的九九乘法表也许将会扎根于我们一生的记忆,现在让我们重温那些温暖的记忆,请编程输出九九乘法表.现在要求你输出它的格式与平常的 不同啊! 是那种反过来的三角形啦,具体如下图:每两个式子之前用一个空格 隔... 阅读全文
posted @ 2015-04-11 11:24 BugsTerminator 阅读(226) 评论(0) 推荐(0)
摘要:Acm练习(九)日期计算时间限制:3000ms | 内存限制:65535KB难度:1描述如题,输入一个日期,格式如:2010 10 24 ,判断这一天是这一年中的第几天。输入第一行输入一个数N(0using namespace std;int n;void data(int y,int m,int ... 阅读全文
posted @ 2015-04-09 18:05 BugsTerminator 阅读(193) 评论(0) 推荐(0)
摘要:Acm练习(八)兰州烧饼时间限制:1000ms | 内存限制:65535KB难度:1描述烧饼有两面,要做好一个兰州烧饼,要两面都弄热。当然,一次只能弄一个的话,效率就太低了。有这么一个大平底锅,一次可以同时放入k个兰州烧饼,一分钟能做好一面。而现在有n个兰州烧饼,至少需要多少分钟才能全部做好呢?输入... 阅读全文
posted @ 2015-04-09 16:25 BugsTerminator 阅读(219) 评论(0) 推荐(0)
摘要:Acm练习(七)1.素数求和#includeusing namespace std;int sushu(int x){ int i=2; if(x==1) return 0; for(;i>kk; for(int g=0;g>kk1; for(int l=0;l>kk2; ... 阅读全文
posted @ 2015-04-06 12:29 BugsTerminator 阅读(157) 评论(0) 推荐(0)
摘要:Acm练习(六)1.//1的个数#includeusing namespace std;int jj(int n){ int count=0; for(int l=n;l>0;l=l/2) { if(l%2 !=0 ) { count=count+1; } } r... 阅读全文
posted @ 2015-04-05 14:30 BugsTerminator 阅读(207) 评论(0) 推荐(0)
摘要:Acm练习(五)1.//ASCLL码值排序/*#includeusing namespace std;void chushi(char a[3]){ for(int i=0;i>a[i]; }}void paixu(char a[3]){ for(int i1=0;i1a[i2]) ... 阅读全文
posted @ 2015-04-04 21:48 BugsTerminator 阅读(188) 评论(0) 推荐(0)
摘要:----------输出格式--------#includeusing namespace std;int main(){ int a,b,c; cin>>a>>b>>c; cout.width(9); cout.setf(ios::left); co... 阅读全文
posted @ 2015-03-25 22:15 BugsTerminator 阅读(135) 评论(0) 推荐(0)
摘要:acm练习(三)//画图 #includeusing namespace std;int main(){ int n; cin>>n; for(int s=0;susing namespace std;int main(){ int a[3]; for(int s=0;s>a[s]; } f... 阅读全文
posted @ 2015-03-21 14:36 BugsTerminator 阅读(183) 评论(0) 推荐(0)
摘要:acm练习(二)1.//三个数比较大小#includeusing namespace std;int main(){ int a[3]; for(int s=0;s>a[s]; } for(int m=0;ma[m+1]) { int temp=a[m]; a[m]=a[m+1];... 阅读全文
posted @ 2015-03-20 22:34 BugsTerminator 阅读(188) 评论(0) 推荐(0)
摘要:acm 练习(一)//5个数中的最大值,最小值#includeusing namespace std;void sore(int a[5]){ for(int i=0;ia[j]) { int temp=a[i]; a[i]=a[j]; a[j]=temp; } }}in... 阅读全文
posted @ 2015-03-20 21:52 BugsTerminator 阅读(250) 评论(0) 推荐(0)