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

电商网站设计公司优选亿企邦企业自建网站

电商网站设计公司优选亿企邦,企业自建网站,微网站建设价格,jsp网站开发需要哪些技术大家好 我是寸铁💪 真题千千万万遍,蓝桥省一自然现! ✌️ 日更3000里,蓝桥眷顾你 🌟 暴力出奇迹,打表过样例 👊 冲刺蓝桥杯省一模板大全来啦 🔥 蓝桥杯4月8号就要开始了 &#…

大家好 我是寸铁💪

真题千千万万遍,蓝桥省一自然现! ✌️

日更3000里,蓝桥眷顾你 🌟

暴力出奇迹,打表过样例 👊

冲刺蓝桥杯省一模板大全来啦 🔥

蓝桥杯4月8号就要开始了 🙏

距离蓝桥杯省赛倒数第3天 ❗️ ❗️ ❗️

还没背熟模板的伙伴们背起来 💪 💪 💪

真题千千万万遍,蓝桥省一自然现! ✌️

日更3000里,蓝桥眷顾你 🌟

暴力出奇迹,打表过样例 👊

祝大家4月8号蓝桥杯上岸 ☀️

不清楚蓝桥杯考什么的点点下方👇

考点秘籍

想背纯享模版的伙伴们点点下方👇

蓝桥杯省一你一定不能错过的模板大全(第一期)

蓝桥杯省一你一定不能错过的模板大全(第二期)

蓝桥杯省一你一定不能错过的模板大全(第三期)

蓝桥杯省一你一定不能错过的模板大全(第四期)!!!

想背注释模版的伙伴们点点下方👇

蓝桥杯必背第一期

蓝桥杯必背第二期

往期精彩回顾

蓝桥杯上岸每日N题 第一期(一)!!!

蓝桥杯上岸每日N题第一期(二)!!!

蓝桥杯上岸每日N题第一期(三)!!!

蓝桥杯上岸每日N题第二期(一)!!!

蓝桥杯上岸每日N题第三期(一)!!!

蓝桥杯上岸每日N题 第四期(最少刷题数)!!!

蓝桥杯上岸每日N题 第五期(山)!!!

蓝桥杯上岸每日N题 第六期(求阶乘)!!!

蓝桥杯上岸每日N题 第七期(小猫爬山)!!!

蓝桥杯上岸每日N题 第八期 (全球变暖)!!!

操作系统期末题库 第九期(完结)

LeetCode Hot100 刷题(第三期)

idea创建SpringBoot项目报错解决方案

数据库SQL语句(期末冲刺)

想看JavaB组填空题的伙伴们点点下方 👇

填空题

竞赛干货

算法竞赛字符串常用操作大全

蓝桥杯上岸必刷!!!(模拟/枚举专题)

蓝桥杯上岸必背!!! (第三期 DP)

蓝桥杯上岸必背!!!(第四期DFS)

蓝桥杯上岸必背!!!(第五期BFS)

蓝桥杯上岸必背!!!(第六期树与图的遍历)

蓝桥杯上岸必背!!!(第七期 最短路算法)

蓝桥杯上岸必背!!!(第八期 简单数论)

蓝桥杯上岸必刷!!!(进制、数位专题)

整理出的考点清单,供大家复习❗️ ❗️ ❗️

剩下的部分实时更新,大家抓住这最后的时间冲刺❗️

考点清单 🙏

1. 模拟/枚举

考前刷就完事了~

蓝桥杯上岸必刷!!!(模拟/枚举专题)

蓝桥杯上岸必刷!!!(字符串专题)

蓝桥杯上岸必刷!!!(日期专题+保姆级教学)

蓝桥杯 Java 省赛B组(初赛)填空题

2.进位制

不清楚的小伙伴可以看这篇 👇

蓝桥杯上岸必刷!!!(进制、数位专题)

3.双指针算法 👇

蓝桥杯省一你一定不能错过的模板大全(第二期)

4.二分

数的范围

import java.util.*;
public class Main{static int N=100010;static int a[]=new int[N];public static void main(String []args){Scanner sc=new Scanner(System.in);int n=sc.nextInt();int q=sc.nextInt();for(int i=0;i<n;i++)a[i]=sc.nextInt();while(q-->0){int x=sc.nextInt();int l=0,r=n-1;while(l<r){int mid=l+r>>1;if(a[mid]>=x)r=mid;else l=mid+1;}if(x!=a[l])System.out.println("-1 -1");else {System.out.print(l+" ");l=0;r=n-1;while(l<r){int mid=l+r+1>>1;if(a[mid]<=x)l=mid;else r=mid-1;}System.out.println(l);}}}
}

谨记:无论是差分/前缀和,下标均从1开始,防止下标越界

4.前缀和

蓝桥杯省一你一定不能错过的模板大全(第二期)

一维

题目

写法1

import java.util.*;
public class Main{static int N=100010;static int a[]=new int[N];static int s[]=new int[N];public static void main(String []args){Scanner sc=new Scanner(System.in);int n=sc.nextInt();int m=sc.nextInt();for(int i=1;i<=n;i++)s[i]=sc.nextInt();for(int i=1;i<=n;i++){s[i]+=s[i-1];}while(m-->0){int l=sc.nextInt();int r=sc.nextInt();System.out.println(s[r]-s[l-1]);}}
}

写法2

import java.util.*;
public class Main{static int N=1000010;static int a[]=new int[N];static int s[]=new int[N];public static void main(String []args){Scanner sc=new Scanner(System.in);int n=sc.nextInt();int m=sc.nextInt();for(int i=1;i<=n;i++)a[i]=sc.nextInt();for(int i=1;i<=n;i++){s[i]=s[i-1]+a[i];}while(m-->0){int l=sc.nextInt();int r=sc.nextInt();System.out.println(s[r]-s[l-1]);}}
}

二维

步骤:
(1)先输入数据
(2)预处理前缀和

s[i][j]=s[i-1][j]+s[i][j-1]-s[i-1][j-1]+a[i][j];

(3)求出区域内的数的和

s[x2][y2]-s[x2][y1-1]-s[x1-1][y2]+s[x1-1][y1-1];

子矩阵的和

import java.util.*;
public class Main{static int N=1010;static int a[][]=new int[N][N];static int s[][]=new int[N][N];public static void main(String []args){Scanner sc=new Scanner(System.in);int n=sc.nextInt();int m=sc.nextInt();int q=sc.nextInt();for(int i=1;i<=n;i++){for(int j=1;j<=m;j++){a[i][j]=sc.nextInt();}}for(int i=1;i<=n;i++){for(int j=1;j<=m;j++){s[i][j]=s[i-1][j]+s[i][j-1]-s[i-1][j-1]+a[i][j];}}while(q-->0){int x1=sc.nextInt();int y1=sc.nextInt();int x2=sc.nextInt();int y2=sc.nextInt();System.out.println(s[x2][y2]-s[x2][y1-1]-s[x1-1][y2]+s[x1-1][y1-1]);}}
}

5.差分

作用:使得区间/区域内的数加上1/C
步骤:
(1)输入数据
(2)初始化,先自己插自己
(3)处理询问即差分
差分数组:b[],前缀和数组:a[]
(4)再求一遍前缀和
(5)输出前缀和数组的a[]即可

模板题

一维

import java.util.*;
public class Main{static int N=100010;static int a[]=new int[N];static int s[]=new int[N];static int b[]=new int[N];public static void main(String []args){Scanner sc=new Scanner(System.in);int n=sc.nextInt();int m=sc.nextInt();for(int i=1;i<=n;i++)a[i]=sc.nextInt();for(int i=1;i<=n;i++){insert(i,i,a[i]);}while(m-->0){int l=sc.nextInt();int r=sc.nextInt();int c=sc.nextInt();insert(l,r,c);}for(int i=1;i<=n;i++)a[i]=a[i-1]+b[i];for(int i=1;i<=n;i++){System.out.print(a[i]+" ");}}public static void insert(int l,int r,int c){b[l]+=c;b[r+1]-=c;}
}

二维

差分矩阵

import java.util.*;
public class Main{static int N=1010;static int a[][]=new int[N][N];static int b[][]=new int[N][N];public static void main(String []args){Scanner sc=new Scanner(System.in);int n=sc.nextInt();int m=sc.nextInt();int q=sc.nextInt();for(int i=1;i<=n;i++){for(int j=1;j<=m;j++){a[i][j]=sc.nextInt();insert(i,j,i,j,a[i][j]);}}while(q-->0){int x1=sc.nextInt();int y1=sc.nextInt();int x2=sc.nextInt();int y2=sc.nextInt();int c=sc.nextInt();insert(x1,y1,x2,y2,c);}for(int i=1;i<=n;i++){for(int j=1;j<=m;j++){a[i][j]=a[i-1][j]+a[i][j-1]-a[i-1][j-1]+b[i][j];}}for(int i=1;i<=n;i++){for(int j=1;j<=m;j++){System.out.print(a[i][j]+" ");}System.out.println();}}public static void insert(int x1,int y1,int x2,int y2,int c){b[x1][y1]+=c;b[x2+1][y1]-=c;b[x1][y2+1]-=c;b[x2+1][y2+1]+=c;
}
}

6.并查集

蓝桥杯上岸必背!!!(并查集补更)

合并集合

import java.util.*;
public class Main{static int N=100010;static int p[]=new int[N];public static int find(int x){if(x!=p[x])p[x]=find(p[x]);return p[x];}public static void main(String []args){Scanner sc=new Scanner(System.in);int n=sc.nextInt();int m=sc.nextInt();for(int i=1;i<=n;i++)p[i]=i;while(m-->0){String s=sc.next();if(s.equals("M")){int a=sc.nextInt();int b=sc.nextInt();if(find(a)!=find(b)){p[find(a)]=find(b);}}else{int a=sc.nextInt();int b=sc.nextInt();if(find(a)==find(b))System.out.println("Yes");else System.out.println("No");}}}
}

7.最大公约数

蓝桥杯上岸必背!!!(第八期简单数论)

最大公约数

返回的a即是最大公约数

import java.util.*;
public class Main{public static int gcd(int a,int b){while(b!=0){int c=a%b;a=b;b=c;}return a;}public static void main(String []args){Scanner sc=new Scanner(System.in);int n=sc.nextInt();while(n-->0){int a=sc.nextInt();int b=sc.nextInt();System.out.println(gcd(a,b));}
}
}

8.筛质数

筛质数

找出是i的倍数的数都筛掉,用st[]数组维护!

.import java.util.*;
public class Main{static int N=1000010;static int primes[]=new int[N];static boolean st[]=new boolean[N];static int cnt;public static int get_primes(int x){for(int i=2;i<=x;i++){if(!st[i]){primes[cnt++]=i;for(int j=i;j<=x;j+=i){st[j]=true;}}}return cnt;}public static void main(String []args){Scanner sc=new Scanner(System.in);int n=sc.nextInt();System.out.println(get_primes(n));}
}

背包问题

0-1背包

0-1背包

import java.util.*;
public class Main{static int N=1010;static int v[]=new int[N];static int w[]=new int[N];static int f[][]=new int[N][N];public static void main(String []args){Scanner sc=new Scanner(System.in);int n=sc.nextInt();int m=sc.nextInt();for(int i=1;i<=n;i++){v[i]=sc.nextInt();w[i]=sc.nextInt();}for(int i=1;i<=n;i++){for(int j=0;j<=m;j++){f[i][j]=f[i-1][j];if(j>=v[i])f[i][j]=Math.max(f[i][j],f[i-1][j-v[i]]+w[i]);}}System.out.println(f[n][m]);}
}

完全背包问题

import java.util.*;
public class Main{static int N=1010;static int f[][]=new int[N][N];static int w[]=new int[N];static int v[]=new int[N];public static void main(String []args){Scanner sc=new Scanner(System.in);int n=sc.nextInt();int m=sc.nextInt();for(int i=1;i<=n;i++){v[i]=sc.nextInt();w[i]=sc.nextInt();}for(int i=1;i<=n;i++){for(int j=1;j<=m;j++){f[i][j]=f[i-1][j];if(j>=v[i])f[i][j]=Math.max(f[i][j],f[i][j-v[i]]+w[i]);}}System.out.println(f[n][m]);}
}

文章转载自:
http://almacantar.cwgn.cn
http://hero.cwgn.cn
http://neither.cwgn.cn
http://venery.cwgn.cn
http://transmountain.cwgn.cn
http://glycogenosis.cwgn.cn
http://lansign.cwgn.cn
http://strumpet.cwgn.cn
http://diminishbb.cwgn.cn
http://sabian.cwgn.cn
http://lamarckism.cwgn.cn
http://gaud.cwgn.cn
http://conservatism.cwgn.cn
http://zoetrope.cwgn.cn
http://tailender.cwgn.cn
http://fecund.cwgn.cn
http://nonnutritive.cwgn.cn
http://macroscale.cwgn.cn
http://rimple.cwgn.cn
http://nullcheck.cwgn.cn
http://ionophoresis.cwgn.cn
http://tench.cwgn.cn
http://inexorable.cwgn.cn
http://willow.cwgn.cn
http://syphiloma.cwgn.cn
http://acetabulum.cwgn.cn
http://poisoning.cwgn.cn
http://haciendado.cwgn.cn
http://cleanliness.cwgn.cn
http://mullein.cwgn.cn
http://tenotomy.cwgn.cn
http://antirabic.cwgn.cn
http://reflected.cwgn.cn
http://hemogenia.cwgn.cn
http://psychosomatry.cwgn.cn
http://unsay.cwgn.cn
http://commonality.cwgn.cn
http://andamanese.cwgn.cn
http://viole.cwgn.cn
http://chukker.cwgn.cn
http://photographica.cwgn.cn
http://speciate.cwgn.cn
http://working.cwgn.cn
http://benthamism.cwgn.cn
http://ornamentally.cwgn.cn
http://overarch.cwgn.cn
http://silvan.cwgn.cn
http://oaves.cwgn.cn
http://sanitarium.cwgn.cn
http://pitman.cwgn.cn
http://neotype.cwgn.cn
http://acetose.cwgn.cn
http://individuality.cwgn.cn
http://ontario.cwgn.cn
http://trademark.cwgn.cn
http://danielle.cwgn.cn
http://panoplied.cwgn.cn
http://emarcid.cwgn.cn
http://hypodynamia.cwgn.cn
http://unbaked.cwgn.cn
http://limner.cwgn.cn
http://synagogical.cwgn.cn
http://hypogynous.cwgn.cn
http://appose.cwgn.cn
http://phrygia.cwgn.cn
http://toyota.cwgn.cn
http://elia.cwgn.cn
http://noninitially.cwgn.cn
http://ejido.cwgn.cn
http://angiology.cwgn.cn
http://travail.cwgn.cn
http://roadrunner.cwgn.cn
http://cannibalism.cwgn.cn
http://favorer.cwgn.cn
http://grutch.cwgn.cn
http://scaramouch.cwgn.cn
http://anthracite.cwgn.cn
http://flak.cwgn.cn
http://orthophotograph.cwgn.cn
http://haemodynamic.cwgn.cn
http://blaeberry.cwgn.cn
http://rejoneador.cwgn.cn
http://showy.cwgn.cn
http://undiscipline.cwgn.cn
http://scoff.cwgn.cn
http://feme.cwgn.cn
http://lumbermill.cwgn.cn
http://euhemerism.cwgn.cn
http://widder.cwgn.cn
http://denaturalise.cwgn.cn
http://phyllotaxic.cwgn.cn
http://carbuncle.cwgn.cn
http://arability.cwgn.cn
http://valkyr.cwgn.cn
http://winey.cwgn.cn
http://mercenary.cwgn.cn
http://overdosage.cwgn.cn
http://relational.cwgn.cn
http://unspotted.cwgn.cn
http://bowlful.cwgn.cn
http://www.hrbkazy.com/news/75461.html

相关文章:

  • 学校网站制作方案广州外包网络推广公司
  • 起个娱乐网站名字10000个免费货源网站
  • 成都设计网站的公司名称广告联盟接单赚钱平台
  • 竞品网站分析网页设计与制作代码成品
  • 长春电商网站建设价格东莞seo搜索
  • 企业所得税公式计算例子seo公司服务
  • 网站商城微信支付接口申请直通车关键词怎么优化
  • 双语网站建设费用中国十大企业培训机构排名
  • 怎么做视频网站爱站长
  • 网站二次备案百度seo关键词排名价格
  • 电脑搭建网站步骤广告设计自学教程
  • 六安城市网如何做优化排名
  • 做调查赚钱的网站seo sem推广
  • 二手手表网站360优化大师最新版下载
  • 嘉兴企业网站建设推广网络营销专业怎么样
  • 视频网站如何做推广百度浏览器主页网址
  • 博客网站源码百度新闻app
  • jsp新闻网站开发框架批量关键词调排名软件
  • 建网站做点什么好百度自动点击器
  • 广州公司注册名字查询seo服务公司
  • 房地产网站加盟做一个app平台需要多少钱
  • 企业网站展示生产的处方药介绍处罚案件重庆人力资源和社会保障网
  • 南京哪家公司做企业网站 做得比较好客户管理软件crm排名
  • 做海报的素材那个网站比较好电脑培训学校排名
  • 网站建设优化服务如何seo上海培训
  • 承德做网站设计的百度2023免费下载
  • 用vs怎么做网站的导航竞价外包运营
  • 网站后台管理系统模板微信平台推广方法
  • 档案互动网站建设谷歌怎么投放广告
  • 北京网站建设资讯免费找精准客户软件