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

火车票网站开发软文广告案例500字

火车票网站开发,软文广告案例500字,温州网站建设有限公司,网站架构制作一、第一题:牛的学术圈 解题思路:双指针贪心 仔细思考可以知道,写一篇综述最多在原来的H指数的基础上1,所以基本方法可以是先求出原始的H指数,然后分类讨论怎么样提升H指数。 【Python程序代码】 n,l map(int,…

一、第一题:牛的学术圈

 

解题思路:双指针+贪心
     仔细思考可以知道,写一篇综述最多在原来的H指数的基础上+1,所以基本方法可以是先求出原始的H指数,然后分类讨论怎么样提升H指数。

【Python程序代码】

n,l = map(int,input().split())
a = list(map(int,input().split()))
a.sort()
res,suml,sumr = 0,0,0
for i in range(n):sumr = n-iif a[i]>sumr:if i==0:breakif a[i-1]+1>=sumr+1 and l>=1:sumr+=1breakbreakif a[i]==sumr:j,c = i,1if i == 0: breakwhile j+1<n and a[j+1]==a[i]:j += 1c += 1if a[i-1]==a[i] and l>=c+1:sumr+=1break
if l==0 and a[n-1]==0:print(0)
else:print(sumr)

二、第二题:最长连续不重复子序列

思路:双指针
        双指针模板题

【Python程序代码】

n = int(input())
a = [0] + list(map(int,input().split()))
mp = [0]*(100010)
res,j=1,1
for i in range(1,n+1):if mp[a[i]]:res = max(res,i-j)while a[j]!=a[i]:mp[a[j]]-=1j +=1j += 1else:mp[a[i]]+=1
res = max(res,i-j+1)
print(res)

三、第三题: 数组元素的目标和

解题思路:双指针
        双指针模板题

【Python程序代码】

n,m,x = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
j = m-1
res = []
for i in range(n):if a[i]+b[j]<x:continueif a[i]+b[j]==x:res.append((i,j))continueif a[i]+b[j]>x:while j>0 and a[i]+b[j]>=x:if a[i]+b[j]==x:res.append((i,j))j -= 1
for i in res:print(i[0],i[1])

四、第四题: 判断子序列

解题思路:双指针
        双指针模板题

【Python程序代码】

n,m = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
j = 0
for i in range(m):if j==n:breakif b[i]==a[j]:j += 1
if j==n:print("Yes")
else:print("No")

五、第五题: 日志统计

 解题思路:双指针+滑动窗口
        双指针+滑动窗口模板题

【Python程序代码】

from collections import defaultdict
n,d,k = map(int,input().split())
mp = defaultdict(int)
a,res = [],[]
for i in range(n):ts,id = map(int,input().split())a.append([ts,id])
a.sort()
j,pret = 0,0
for i in range(n):teps,tepd = a[i]if teps - a[j][0]>=d:while teps - a[j][0]>=d:mp[a[j][1]]-=1j += 1pret = a[j][0]mp[tepd] += 1if mp[tepd]>=k:res.append(tepd)
res = list(set(res))
res.sort()
for i in res:print(i)


 

http://www.hkea.cn/news/978829/

相关文章:

  • 网站由那些组成google网页搜索
  • 对一个网站做性能测试谷歌paypal官网入口
  • 北京住房投资建设中心网站首页快速排名怎么做
  • 中国网站制作 第一个佛山网站优化
  • thinkphp做的教育网站微商引流推广
  • 做特卖网站手机版电商最好卖的十大产品
  • 怎样做网站平叿trinseo公司
  • 北京大兴最专业的网站建设公司如何推广一个项目
  • 网页设计最牛的网站建设宁波网站优化公司哪家好
  • 建设通查询如何做网站推广及优化
  • 城乡建设网站首页百度seo收录软件
  • 永久免费建个人网站培训网站建设
  • 如何使用jq做弹幕网站好用的磁力搜索引擎
  • 南充营销型网站建设高端品牌网站建设
  • 制作小程序和网站的公司搜狗收录提交入口网址
  • 手机站电影基础建站如何提升和优化
  • 江苏 网站备案百度贴吧官网app下载
  • 网站制作三站湖南网站seo公司
  • 简单做任务赚钱网站企业管理培训课程报名
  • 零点研究咨询集团官方网站建设相似图片在线查找
  • 网站开发需要什么软件关键词app
  • 360全景网站建设做了5天游戏推广被抓了
  • 政府网站建设经验典型材料河源今日头条新闻最新
  • 为什么要进行网站备案佛山市人民政府门户网站
  • 摄影网站开发背景百度app交易平台
  • 吉林网站建设石家庄百度快照优化排名
  • 大学生网站开发总结报告app推广接单发布平台
  • 自己做的网站怎么推广seo顾问培训
  • 怎么做业务网站百度搜索提交入口
  • 网页设计网站图片西安百度推广运营公司