
【入门4】数组
dllglvzhenfeng
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
P1428 小鱼比可爱(python3实现)
"""P1428 小鱼比可爱https://www.luogu.com.cn/problem/P1428"""n=int(input())a=list(map(int,input().split()))x=int(len(a))for i in range (x): cnt=0 j=i-1 while j>=0: if a[j]<a[i]: .原创 2022-01-26 18:32:31 · 1094 阅读 · 0 评论 -
P5732 【深基5.习7】杨辉三角(python3实现)
https://www.luogu.com.cn/problem/P5732"""P5732 【深基5.习7】杨辉三角https://www.luogu.com.cn/problem/P5732"""n=int(input())b= [[0] * n for t in range(n)]for i in range(n): b[i][0]=1 b[i][i]=1for i in range(n):原创 2022-01-27 21:55:05 · 669 阅读 · 0 评论 -
P5732 【深基5.习7】杨辉三角 2022.01.28
https://www.luogu.com.cn/problem/P5732/*P5732 【深基5.习7】杨辉三角 2022.01.28https://www.luogu.com.cn/problem/P5732*/ #include <iostream>using namespace std;int num[25][25]={1}; int main(int argc, char const *argv[]){ int n; cin>.原创 2022-01-28 12:03:53 · 232 阅读 · 0 评论 -
洛谷 深基 第1部分 语言入门 第4章 循环结构程序设计(2022.02.14)
P5718 【深基4.例2】找最小值【深基4.例2】找最小值 - 洛谷P5718 【深基4.例2】找最小值(python3实现)-2022.02.01P5718 【深基4.例2】找最小值(python3实现)-2022.02.01_青少年趣味编程-优快云博客P5719 【深基4.例3】分类平均【深基4.例3】分类平均 - 洛谷P5719 【深基4.例3】分类平均(python3实现)P5719 【深基4.例3】分类平均(python3实现)_青少年趣味编程-优快云博客原创 2022-02-14 14:29:41 · 456 阅读 · 0 评论 -
P1319 压缩技术(python3实现)
压缩技术 - 洛谷"""P1319 压缩技术(python3实现)https://www.luogu.com.cn/problem/P1319"""t=0a=list( map( int,input().split() ) )n=a[0]i=0s=0while s<n*n: i+=1 b=a[i] while b>=1: if t==n原创 2022-02-07 13:49:13 · 1105 阅读 · 0 评论 -
P1161 开灯(python3实现)
开灯 - 洛谷"""P1161 开灯(python3实现)https://www.luogu.com.cn/problem/P1161"""a=[0]*2000001n=int(input())for i in range(1,n+1): x,y=map( float,input().split() ) for j in range(1,int(y+1) ): if a[int(原创 2022-02-07 13:27:08 · 805 阅读 · 2 评论 -
P2911 [USACO08OCT]Bovine Bones G (python3实现)
[USACO08OCT]Bovine Bones G - 洛谷"""P2911 [USACO08OCT]Bovine Bones G 02(python3实现)https://www.luogu.com.cn/problem/P2911"""flag=[0]*100010s1,s2,s3=map( int,input().split() )for i in range(1,s1+1): for j in range(1,s2+1):原创 2022-02-07 12:00:00 · 398 阅读 · 0 评论 -
P1789 【Mc生存】插火把(python3实现)
【Mc生存】插火把 - 洛谷"""P1789 【Mc生存】插火把03(python3实现)https://www.luogu.com.cn/problem/P1789"""import mathdef pd(x,y): if x<1 or y<1 or x>n or y>n: return 0 else: return原创 2022-02-07 11:34:35 · 620 阅读 · 0 评论 -
P1614 爱与愁的心痛(python3实现)
爱与愁的心痛 - 洛谷"""P1614 爱与愁的心痛(python3实现)https://www.luogu.com.cn/problem/P1614"""a=[0]*100010h=[0]*100010n,m=map( int,input().split() ) #b=list( map( int,input().split() ) )b=[]for i in range(n): x=input() b.appen原创 2022-02-06 23:39:02 · 712 阅读 · 1 评论 -
P2550 [AHOI2001]彩票摇奖(python3实现)
[AHOI2001]彩票摇奖 - 洛谷"""P2550 [AHOI2001]彩票摇奖(python3实现)https://www.luogu.com.cn/problem/P2550"""n=int( input() )b=list( map( int,input().split() ) )c=[0]*50d=[0]*10for i in range(1,8): c[ b[i-1] ]=1for i in range(原创 2022-02-04 18:21:45 · 800 阅读 · 0 评论 -
P1554 梦中的统计(python3实现)
梦中的统计 - 洛谷"""P1554 梦中的统计(python3实现)https://www.luogu.com.cn/problem/P1554"""a=[0]*1010n,m=map( int,input().split() )for i in range(n,m+1): j=i while j>0: a[j%10]+=1 j/原创 2022-02-04 15:23:22 · 394 阅读 · 0 评论 -
P1047 [NOIP2005 普及组] 校门外的树(python3实现)
[NOIP2005 普及组] 校门外的树 - 洛谷"""P1047 [NOIP2005 普及组] 校门外的树(python3实现)https://www.luogu.com.cn/problem/P1047"""vis=[0]*10010cnt=0L,M=map( int,input().split() )for i in range(M): head,tail=map( int,input().split() ) for原创 2022-02-02 21:22:47 · 567 阅读 · 0 评论 -
P5727 【深基5.例3】冰雹猜想(python3实现)
【深基5.例3】冰雹猜想 - 洛谷"""P5727 【深基5.例3】冰雹猜想(python3实现)https://www.luogu.com.cn/problem/P5727"""a=[]n=int( input() )i=nwhile n!=1: a.append(n) #print(a) if n%2==0: n//=2 el原创 2022-02-02 21:07:19 · 1163 阅读 · 0 评论