Closed lucifer0987 closed 3 years ago
@lucifer0987 - Before making the PR, you should've posted the template on the issue itself since I was looking to see some options on the template and also @Enigmage could give some suggestions.
@ankingcodes Here is the code i used in python template.
import sys input = sys.stdin.readline
def inp(): return(int(input()))
def inlt(): return(list(map(int,input().split())))
def insr(): s = input() return(list(s[:len(s) - 1]))
def invr(): return(map(int,input().split()))
@lucifer0987 - The template is very basic and doesn't have much options for a competitive programmer. @Enigmage - What do you think of it ?
@ankingcodes But, i thought that's what you wanted. Someone suggested a change in cpp but you said that the template should be basic. And, that's why I used this template. And, current cpp template is also pretty basic. That's why i used this.
The goal is to have a sensible default template that is capable of taking care of the basic needs of the user during a competitive programming contest without having too much boilerplate.
From the issue you're making this PR for.
@ankingcodes What changes should I include. I will try to improve the PR.
I think you can google for various CP templates by python programmers and find which ones would be good for our software, and post them so that we can decide on one single template. (Don't just copy paste random templates, they should justify the issue)
@ankingcodes @lucifer0987 Hey sorry for the late response was busy with some college work.I think I may not be the most helpful person in this scenario since I don't usually do CP in python or java; this is why I didn't add the templates in #55 and created two separate issues so that others who use these two languages for CP can add the templates. Still I can give a few suggestions. We can take inspiration from this https://github.com/rajatg98/Competitive-Coding-Python-Template/blob/master/template.py template for example. It has a lot of good imports that can help in a CP contest. Also these two articles might be helpful
https://www.geeksforgeeks.org/python-in-competitive-programming/
itertools
is a good library that is pretty helpful for a lot of stuff, we can import that by default.
Also adding a while loop for test cases might be a good idea too as it is used in a lot of contests.
So yeah I think with a few additions this can be good enough.
Closing this PR since #74 fixed the issue !
closes #69 added default python template.