de_inferno's blog

By de_inferno, history, 9 years ago, In English

A simple python script for downloading codeforces problems based on tags or contestId

For a problem , say 615E , contestId is 615.

https://github.com/venky2venkat/cf2pdf

suggestions are welcome

  • Vote: I like it
  • +7
  • Vote: I do not like it

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by de_inferno (previous revision, new revision, compare).

»
9 years ago, # |
Rev. 2   Vote: I like it +9 Vote: I do not like it

I recommend you to work onto code elegance. You can write x = input('prompt') instead of

print('prompt')
x = input()

And of course

	print("	1  implementation\n")
	print("	2  binary search\n")
	print("	3  math\n")
	print("	4  data structures\n")
	print("	5  dfs and similar\n")
	print("	6  graphs\n")
	print("	7  combinatorics\n")
	print("	8  constructive algorithms\n")
	print("	9  dp\n")
	print("	10 greedy\n")
	print("	11 strings\n")
	print("	12 hashing\n")
	print("	13 two pointers\n")
	print("	14 bitmasks\n")
	print("	15 sortings\n")
	print("	16 string suffix structures\n")
	print("	17 geometry\n")
	print("	18 dsu\n")
	print("	19 divide and conquer\n")
	print("	20 trees\n")
	print("	21 games\n")
	print("	22 probabilities\n")

can be replaced with

	for i in range(len(tags)):
		print('\t%-2d %s\n' % (i + 1, tags[i]))
»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

I get this error when I tried it on windows