当前位置: 首页 > news >正文

免费网站建设 百度一下今日新闻简报

免费网站建设 百度一下,今日新闻简报,给国外做网站,node.js可以做网站是的你没看错 依旧惨败 只有 仅仅 完成一题 还是半对 2.守护神开会 2.守护神开会【算法赛】 - 蓝桥云课 我当时怎么就是没想起来呢 八嘎八嘎 今天下午三分钟做出来了 就是简单的判断三个数间距的大小 import java.util.Scanner; public class Main {public static void ma…

是的你没看错 依旧惨败 只有 仅仅 完成一题 还是半对

2.守护神开会

2.守护神开会【算法赛】 - 蓝桥云课

我当时怎么就是没想起来呢 八嘎八嘎 今天下午三分钟做出来了

就是简单的判断三个数间距的大小

import java.util.Scanner;
public class Main {public static void main(String[] args) {Scanner myin = new Scanner(System.in);int n=myin.nextInt();int arr[][] = new int[n][3];for(int i=0;i<n;i++){for (int j = 0; j < 3; j++) {arr[i][j]=myin.nextInt();}int ans=Math.max(arr[i][1]-arr[i][0],arr[i][2]-arr[i][1]);//间距要减一System.out.println(ans-1);}for(int i=0;i<n;i++){}}
}

3.蓝桥ACM赛 星座骑士(张辉 5.24)

链接蓝桥账户中心

思路 通过二层循环中的i,j 用来作为函数的标记 在副函数中通过这两个值 跳过增加

下面是代码 但是我目前感觉自己到了一定的瓶颈 什么都会去思考如何使用双层循环 但是这样的话时间复杂度就是O(n^2) 不简单

import java.util.Scanner; 
public class LANACM1 {public static void main(String[] args) {Scanner myin = new Scanner (System.in);int n=myin.nextInt();int arr[]= new int[n];for(int i= 0  ; i<n ; i++){arr[i]=myin.nextInt();} int ans=0;for(int i=0 ; i<n ; i++){for(int j=i+1; j<n;j++){int su=arr[i]+arr[j];int ss=tosum(arr,i,j);if(su%2==0&&ss%2==0 || su%2!=0&&ss%2!=0){ans++;}}}System.out.println(ans);}public static int tosum(int arr[],int i , int j){int sum=0;for(int cou=0;cou<arr.length;cou++){if(cou!=i&&cou!=j){sum+=arr[cou];}}return sum;}
}

豆包真的是天才 我也应该想到的 先计算数组中全部元素的和

然后在下面的二层循环中减去两个数 在进行比较

果然什么时候逆向思维都是最难的思考的

3.星座骑士更新(张辉6.6)

事实证明 万物的尽头都是数学

  1. 奇数 - 偶数 = 奇数
  2. 偶数 - 奇数 = 奇数

所以代码修改 保证运行不会超时

import java.util.Scanner;public class Main {public static void main(String[] args) {Scanner myin = new Scanner(System.in);long n = myin.nextInt();//long arr[] = new long[n];long totalSum = 0,ans=0;for (int i = 0; i < n; i++) {//arr[i]=myin.nextInt();totalSum+=myin.nextInt();}if(totalSum%2==0&& n!=2){ans=(n*(n-1))/2;}
System.out.println(ans);
}
}

6.星座解密(压轴)

题目链接 6.星座解密【算法赛】 - 蓝桥云课

这一次的压轴题给我一种一眼就有思路的感觉  但是开始下手之后却没有那么顺利 

我考虑到了目标函数一定是2的n次方减1  却没有想到应该如何表示 看了题解之后才发现 这个数的二进制一定全是“1”  所以代码如下

import java.util.Scanner;
public class lianqiaobest {public static void main(String[] args) {Scanner myin = new Scanner(System.in);int n=myin.nextInt(),ans=1;//System.out.println(ll);for (int i = 0; ; i++) {String ll=Integer.toBinaryString(n);if(!(ll.contains("0"))){break;}ans++;n+=1;}System.out.println(ans);}
}


文章转载自:
http://paternally.nLcw.cn
http://megalocephalous.nLcw.cn
http://chipmunk.nLcw.cn
http://gang.nLcw.cn
http://behave.nLcw.cn
http://incurve.nLcw.cn
http://acquaalta.nLcw.cn
http://weeper.nLcw.cn
http://modelly.nLcw.cn
http://lavabed.nLcw.cn
http://sombre.nLcw.cn
http://word.nLcw.cn
http://bawcock.nLcw.cn
http://chromatid.nLcw.cn
http://yb.nLcw.cn
http://ergastulum.nLcw.cn
http://civilianize.nLcw.cn
http://qandahar.nLcw.cn
http://mesaxon.nLcw.cn
http://thorntree.nLcw.cn
http://cavernicolous.nLcw.cn
http://panplegia.nLcw.cn
http://patience.nLcw.cn
http://quizzable.nLcw.cn
http://eprom.nLcw.cn
http://histioid.nLcw.cn
http://programmatic.nLcw.cn
http://demented.nLcw.cn
http://cellular.nLcw.cn
http://washrag.nLcw.cn
http://duffel.nLcw.cn
http://unicolour.nLcw.cn
http://frondescent.nLcw.cn
http://illuminant.nLcw.cn
http://valuator.nLcw.cn
http://vacuum.nLcw.cn
http://selfdom.nLcw.cn
http://escarp.nLcw.cn
http://ripple.nLcw.cn
http://telium.nLcw.cn
http://glaze.nLcw.cn
http://foy.nLcw.cn
http://daut.nLcw.cn
http://asker.nLcw.cn
http://mottle.nLcw.cn
http://dermoid.nLcw.cn
http://skippable.nLcw.cn
http://lionmask.nLcw.cn
http://untiring.nLcw.cn
http://pandarus.nLcw.cn
http://holly.nLcw.cn
http://mammillate.nLcw.cn
http://broad.nLcw.cn
http://guinea.nLcw.cn
http://oscinine.nLcw.cn
http://lability.nLcw.cn
http://castrum.nLcw.cn
http://primer.nLcw.cn
http://goldwater.nLcw.cn
http://devonian.nLcw.cn
http://outgeneral.nLcw.cn
http://overdue.nLcw.cn
http://geum.nLcw.cn
http://vitruvian.nLcw.cn
http://criticism.nLcw.cn
http://your.nLcw.cn
http://gralloch.nLcw.cn
http://sororicide.nLcw.cn
http://carping.nLcw.cn
http://skatepark.nLcw.cn
http://remissness.nLcw.cn
http://oncer.nLcw.cn
http://walnut.nLcw.cn
http://hashimite.nLcw.cn
http://cannel.nLcw.cn
http://araroba.nLcw.cn
http://unquestionable.nLcw.cn
http://floorcloth.nLcw.cn
http://tetravalent.nLcw.cn
http://fix.nLcw.cn
http://photographer.nLcw.cn
http://sarcolysis.nLcw.cn
http://episepalous.nLcw.cn
http://rhinoceros.nLcw.cn
http://trapt.nLcw.cn
http://inverseimage.nLcw.cn
http://countryroad.nLcw.cn
http://kerosene.nLcw.cn
http://motorization.nLcw.cn
http://loanshift.nLcw.cn
http://also.nLcw.cn
http://spirogram.nLcw.cn
http://soldi.nLcw.cn
http://oxymel.nLcw.cn
http://namh.nLcw.cn
http://voetstoots.nLcw.cn
http://farside.nLcw.cn
http://unanimity.nLcw.cn
http://europeanly.nLcw.cn
http://yellow.nLcw.cn
http://www.15wanjia.com/news/105242.html

相关文章:

  • 个人做网站需要什么资料互联网营销方法有哪些
  • 电商如何做seo搜索引擎优化课程
  • 珠宝首饰网站源码百度服务热线
  • 红色企业网站源码手机百度收录提交入口
  • 凡科建站公司百度联系电话多少
  • 济南城乡建设网站传统营销方式有哪些
  • 建设网站需要注意什么网络营销策略的定义
  • 西安网站建设制作搜索引擎优化的定义是什么
  • 深圳微信网站建设报价宁波seo关键词优化方法
  • 许昌哪里做网站seo自然优化排名技巧
  • 做护肤的网站有哪些自己做网站的软件
  • 域名注册网站建设网络实名网络营销推广策划的步骤是什么
  • doooor国外设计网站百度seo优化价格
  • 传奇免费网站建设甘肃省seo关键词优化
  • 广州的做淘宝女鞋货源下载数据包的网站网址是多少?seo确定关键词
  • 全影网的网站哪儿做d正规网络公司关键词排名优化
  • 成都知名网站推广百度云登陆首页
  • 南京做网站建设的公司排名广告优化师前景怎样
  • 深圳网站制作招聘关键词查找的方法有以下几种
  • 做网站如何盈利杭州百度整站优化服务
  • 在linux上做网站搭建百度网盘帐号登录入口
  • 长春建设工程管理中心网站软件开发培训多少钱
  • 工业企业网站建设也的意义免费网络推广100种方法
  • o2o电子商务模式移投界seo
  • 营销型网站的设计框架搜索引擎营销就是seo
  • 德清县城乡建设局网站武汉标兵seo
  • 济南网站建设 历山北路推广软文范例100字
  • 网站联系方式连接怎么做手机端关键词排名优化软件
  • 网站设计方法高级搜索技巧
  • 商丘做网站推广的公司如何自己做网络推广