摘要: 1、题目: 2、代码: include include using namespace std; int main() { int n,m; cin n m; int value[501]; int i,j; for(i=0;i value[i]; } string str; int k; for( 阅读全文
posted @ 2016-10-07 23:45 laixl 阅读(216) 评论(0) 推荐(0) 编辑
摘要: 1、题目: 2、代码: include using namespace std; int main() { int n; int a[501]; cin n; int i,j,l; int result[501]; for(i=0;i a[i]; result[i]=i+1; } for(i=0;i 阅读全文
posted @ 2016-10-07 23:42 laixl 阅读(340) 评论(0) 推荐(0) 编辑
摘要: 1、题目: 2、代码: include define PI 3.141592654 define E 2.71828182846 include int main() { int n; scanf("%d",&n); int result=1; result=log10(2 PI n)/2+n lo 阅读全文
posted @ 2016-10-07 23:39 laixl 阅读(292) 评论(0) 推荐(0) 编辑
摘要: 1、题目: 2、代码: include include using namespace std; int main() { int n,start[101],end[101]; cin n; int i,j; for(i=0;i start[i] end[i]; } int temp1=0,temp 阅读全文
posted @ 2016-10-07 23:37 laixl 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 1、题目: 2、代码: include int main() { int n,i,j,a[100001]; scanf("%d",&n); for(i=0; imaxSum) { maxSum=sum; } else if(sum 阅读全文
posted @ 2016-10-07 23:34 laixl 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 1、题目: 2、代码: include int main() { int n; int a[1001]; scanf("%d",&n); int i=0,j=0; bool flag=false; for(i=0; ia[i+1]) { temp=a[i]; a[i]=a[i+1]; a[i+1]= 阅读全文
posted @ 2016-10-07 23:31 laixl 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 1、题目: 2、解题思路: 其实思路很简单,就是用两个循环把每个子序列最大最小值找出来,然后判断它们在不在范围之内就好了! 3、代码: include using namespace std; int main() { int n,m,k,i; cin n m k; int a[10001]; fo 阅读全文
posted @ 2016-10-07 23:12 laixl 阅读(515) 评论(0) 推荐(0) 编辑
摘要: 1、题目: 2、代码: include include typedef struct qnode qlink; struct qnode { int element; qlink next; } Qnode; typedef struct lque Queue; typedef struct lqu 阅读全文
posted @ 2016-09-28 17:03 laixl 阅读(241) 评论(0) 推荐(0) 编辑
摘要: 1、题目: 2、代码: include include using namespace std; //以这组数据为例说明:10 2 //1 4 7 4 9 6 5 9 8 4 int main() { int n,m; cin n m; m=m 1; int i,j=0; int a[1001],b 阅读全文
posted @ 2016-09-28 16:59 laixl 阅读(462) 评论(13) 推荐(0) 编辑
摘要: 1、题目: 2、代码: include include include typedef struct astack Stack; typedef struct astack { __int64 top; __int64 data; } Astack; typedef struct stack Ope 阅读全文
posted @ 2016-09-27 21:46 laixl 阅读(343) 评论(0) 推荐(0) 编辑