Skip to content

Commit dce1e9b

Browse files
author
matthias
committed
adjusted filenames; all are main.cc / main.py now so I don't have to
adjust testing script
1 parent baec04c commit dce1e9b

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

myprog.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
import math,string,itertools,fractions,heapq,collections,re,array,bisect
2+
13
if __name__ == '__main__':
2-
print("No")
4+
n=int(raw_input())

parse.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -212,14 +212,14 @@ def main():
212212
os.makedirs(folder)
213213
# call(['mkdir', '-p', folder])
214214
# call(['cp', '-n', TEMPLATE, '%s/%s/%s.cc' % (contest, problem, problem)])
215-
shutil.copyfile(TEMPLATE, '%s/%s/%s.cc' % (contest, problem, problem))
216-
shutil.copyfile(PYTEMPLATE, '%s/%s/%s.py' % (contest, problem, problem))
215+
shutil.copyfile(TEMPLATE, '%s/%s/main.cc' % (contest, problem))
216+
shutil.copyfile(PYTEMPLATE, '%s/%s/main.py' % (contest, problem))
217217
num_tests = parse_problem(folder, contest, problem)
218218
print('%d sample test(s) found.' % num_tests)
219219
# generate_test_script(folder, num_tests, problem)
220220
shutil.copyfile(PYTESTER, '%s/%s/test.py' % (contest, problem))
221221
if os.name in ['posix']:
222-
call(['chmod', '+x', folder + 'test.sh'])
222+
call(['chmod', '+x', folder + 'test.py'])
223223
print ('========================================')
224224

225225
# print ('Use ./test.sh to run sample tests in each directory.')

test.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def do_test(exc_str):
9494
# print("Successful? " + colorTestResult(tc_equal(correct_answer, recv)))
9595

9696
def compile_cpp(DBG):
97-
exc_str = 'g++ -std=c++11 ' + DBG + ' -Wall A.cc -o A.exe'
97+
exc_str = 'g++ -std=c++11 ' + DBG + ' -Wall main.cc -o a.exe'
9898
print(exc_str)
9999
subprocess.call(exc_str, shell=True)
100100

@@ -118,9 +118,9 @@ def main():
118118
print(DBG, use_py)
119119
if(not use_py):
120120
compile_cpp(DBG)
121-
exc_str = './A.exe'
121+
exc_str = './a.exe'
122122
else:
123-
exc_str = "python A.py"
123+
exc_str = "python main.py"
124124

125125
do_test(exc_str)
126126

0 commit comments

Comments
 (0)