我,VIM, tutor, summary2

我,VIM, tutor, summary2 commands for VIM 2 o open a line below and then insert O open a line above a insert after cursor A insert after the end of the line e move to the end of a word y yanks(copy),after this ...
点我阅读更多...

我,VIM, tutor, summary

我,VIM, tutor, summary commands for VIM h-left j-down k-up l-right vim FILENAME :q! %exit and trash all changes :wq %save all changes i %insert A %append dw del to the next word d$ del to the end of a line dd del the whole line 2w repeat a motion operator [number] moti...
点我阅读更多...

我,python, 优化2, Div684_C

我,python, 优化2, Div684_C 这题失误了,pypy不可靠,还是两种都试试。明天再写总结 # 老版 k = int(input()) n = [] a = [] b = a for i in range(0,k): n.append(int(input())) a.append([int(x) for x in input().split()]) S = [] A = [] for i in range(0,k): s = 0 for e in a[i]: s = s + int(e) S.append(s) for i in range(0,k): for j in range(0,n[i]): ...
点我阅读更多...

我,DP问题, 学习一个, Div2.214_C

我,DP问题, 学习一个, Div2.214_C 学习一个,im angry! 借鉴了@simonmysun的代码,居然他自己都看不懂了 [n,k] = [int(x) for x in input().split()] a = [int(x) for x in input().split()] b = [int(x) for x in input().split()] b.insert(0,0) #加0,让数组和参数i同步 a.insert(0,0) s = sum(b) * k #求s,差距j最大的...
点我阅读更多...

我,python, 优化2, EDU44_C

我,python, 优化2, EDU44_C 学习一个,im angry! 这次的edu比赛,本以为是送分题,结果又只做了一道。。。果然还是做div3才能提高自信 不过呢,也能借此学到很多东西,新的语法,多多练习,熟练,也当是一种提高吧 以后每次做题前,都应该花10分钟构思一下整个program的结构,提前想好,也不至于操作 的时候一阵慌乱。开局先把input,变量都声明,不要写太多废语句,多打print来检查程序 运行状态 # 老版,错的 [n,k,l] = [int(x) for x in input().split()] a = [int(x) for x in input().split()] #input写的很霸气 import bisect s = 0 ...
点我阅读更多...

我,python, 优化2, Div484_B

我,python, 优化2, Div484_B 学习一个,im angry! n = int(input()) b = [[-int(x), i + 1] for (i, x) in enumerate(input().split(' '))] b.sort(key = lambda x : x[0]) c = input() s = '' a = [] for e in c: if e == '0': s = s + str(b[len(b)-1][1]) + ' ' a.append(b.pop()[1]) else: s = s + str(a.pop()) + ' ' #字符串+输出太慢, ...
点我阅读更多...

我,python, 优化

我,python, 优化 学习一个,im angry! n = int(input()) w = [[-int(x), i + 1] for (i, x) in enumerate(input().split(' '))] #enumerate返回元素和其下标 w.sort(key = lambda x : x[0]) # 多维数组排序 m = input() e = []; res = []; for x in m: if x == '0': res.append(w[len(w) - 1][1]) e.append(w.pop()[1]) else: ...
点我阅读更多...

我,比赛, 总结, Div484

我,比赛, 总结, Div484 Problem A #this is a very simple and typical problem about how to deal with string, #ut i haven't considered about the initial and end problem. #so yeal, in initial or end point if '00' exists, it should output also #'No', so i can just add '0' both in end and initial of the string and at #the same time has no influence...
点我阅读更多...