Skip to content

Instantly share code, notes, and snippets.

@StarOrpheus
Created June 17, 2015 09:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save StarOrpheus/676c3b0bf6af2a82447a to your computer and use it in GitHub Desktop.
Save StarOrpheus/676c3b0bf6af2a82447a to your computer and use it in GitHub Desktop.
from heapq import heappush, heapify, heappop
withFile = 1
if(withFile == 1):
fin = open('input.txt', 'r')
fout = open('output.txt', 'w')
def getl():
if(withFile == 0):
return input()
else:
return fin.readline()
def printl(s):
if(withFile == 0):
print(s)
else:
fout.write(str(s))
def get_arr():
x = getl().split(' ')
if(x[-1] == ''):
x = x[:-1]
return list(map(int, x))
# Code here
if(withFile == 1):
fin.close()
fout.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment