摘要: 1、题目: 2、代码: include int main() { int n,m; scanf("%d%d",&n,&m); int i,a[501]; for(i=0; i=n) { i =n; } if(a[i]!=0) { count++; } if(count==m) { counts++; 阅读全文
posted @ 2016-10-07 23:48 laixl 阅读(1014) 评论(0) 推荐(0) 编辑
摘要: 1、题目: 2、代码: include int main() { int n; scanf("%d",&n); int a[10001]; int i,j; for(i=0;i 阅读全文
posted @ 2016-10-07 23:47 laixl 阅读(295) 评论(0) 推荐(0) 编辑
摘要: 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) 编辑