上一页 1 2 3 4 5 6 7 8 9 ··· 31 下一页
摘要: 一种排序时间限制:3000 ms | 内存限制:65535 KB难度:3描述 现在有很多长方形,每一个长方形都有一个编号,这个编号可以重复;还知道这个长方形的宽和长,编号、长、宽都是整数;现在要求按照一下方式排序(默认排序规则都是从小到大);1.按照编号从小到大排序2.对于编号相等的长方形,按照长方... 阅读全文
posted @ 2015-01-17 15:25 NYNU_ACM 阅读(193) 评论(0) 推荐(0) 编辑
摘要: #includeusing namespace std;int main(){ int n; while(cin>>n) { int count=0; while(n != 1){ if(n%2==0)n=n/2; else n=3*n+1; count++; } cout<<... 阅读全文
posted @ 2015-01-11 22:52 NYNU_ACM 阅读(145) 评论(0) 推荐(0) 编辑
摘要: #includeusing namespace std;int main(){ int n; while(cin>>n) { if(n%4 == 0&&n%100 != 0||n%400 == 0) cout<<"Yes"<<endl; else cout... 阅读全文
posted @ 2015-01-11 22:42 NYNU_ACM 阅读(196) 评论(0) 推荐(0) 编辑
摘要: #include#includeusing namespace std;int main(){ int a,b,c; while(cin>>a>>b>>c) { int temp; if(a>b){ temp=a; a=b; b=temp; } if(a>c){ temp=a... 阅读全文
posted @ 2015-01-11 22:35 NYNU_ACM 阅读(449) 评论(0) 推荐(0) 编辑
摘要: atan函数:返回数值的余切值原型:double atan(double x)#include#includeusing namespace std;int main(){ double PI = 4.0*atan(1.0); double r; while(cin>>r) { cout<<"PI... 阅读全文
posted @ 2015-01-08 23:14 NYNU_ACM 阅读(1388) 评论(0) 推荐(0) 编辑
摘要: #includeusing namespace std;typedef struct LNode { int data; struct LNode *next;}LNode , *LinkList;LNode *p,*q;LinkList H;//求链表的长度int ListLength(LinkL... 阅读全文
posted @ 2015-01-06 17:16 NYNU_ACM 阅读(159) 评论(0) 推荐(0) 编辑
摘要: #include#includeusing namespace std;#define MAX 500 //宏定义方式定义符号常量 比较少用 const int maxlength=500; //const定义常变量 比较常用 typedef struct elemtype{... 阅读全文
posted @ 2015-01-06 17:14 NYNU_ACM 阅读(242) 评论(0) 推荐(0) 编辑
摘要: B -确定比赛名次Time Limit:1000MSMemory Limit:32768KB64bit IO Format:%I64d & %I64uSubmitStatusDescription有N个比赛队(1#include#includeusing namespace std;typedef ... 阅读全文
posted @ 2015-01-05 10:25 NYNU_ACM 阅读(326) 评论(0) 推荐(0) 编辑
摘要: A -ATime Limit:1000MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uSubmitStatusDescriptionBessie has gone to the mall's jewelry store and spies a c... 阅读全文
posted @ 2014-12-28 20:45 NYNU_ACM 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 头文件: or 在c语言中功能:判断一个字符是否是英文字符,是大写返回1,是小写返回2,不是英文字符返回0;在标准c中相当于isuppe(ch) 和islower(ch)案例:将字符串中的非字符略掉:#include#includeusing namespace std;int main(){ i... 阅读全文
posted @ 2014-12-27 17:51 NYNU_ACM 阅读(498) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 31 下一页