|
@ -18,7 +18,7 @@ db = pymysql.connect(host='192.168.0.89', |
|
|
user='root', |
|
|
user='root', |
|
|
password='2020yunjisuan!', |
|
|
password='2020yunjisuan!', |
|
|
db='shuishan', |
|
|
db='shuishan', |
|
|
charset='utf8') |
|
|
|
|
|
|
|
|
charset='utf8mb4') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@app.route('/get-problem-items/') |
|
|
@app.route('/get-problem-items/') |
|
@ -77,8 +77,13 @@ def get_problem_description(_id: str): |
|
|
def case_test_(): |
|
|
def case_test_(): |
|
|
pid: str = request.json.get("pid") |
|
|
pid: str = request.json.get("pid") |
|
|
code: str = request.json.get("code") |
|
|
code: str = request.json.get("code") |
|
|
|
|
|
|
|
|
|
|
|
pid = str(pid) |
|
|
|
|
|
code = str(code) |
|
|
with open('wulin.txt', 'w', encoding='utf-8', newline='') as f: |
|
|
with open('wulin.txt', 'w', encoding='utf-8', newline='') as f: |
|
|
f.write(pid) |
|
|
|
|
|
|
|
|
f.write(pid+"\n") |
|
|
|
|
|
f.write(code + "\n") |
|
|
|
|
|
|
|
|
f.close() |
|
|
f.close() |
|
|
results = testcase.submit_handler(code, pid, 'C') |
|
|
results = testcase.submit_handler(code, pid, 'C') |
|
|
|
|
|
|
|
@ -108,8 +113,11 @@ def check_logic_error(): |
|
|
def submit(): |
|
|
def submit(): |
|
|
pid: str = request.json.get("pid") |
|
|
pid: str = request.json.get("pid") |
|
|
code: str = request.json.get("code") |
|
|
code: str = request.json.get("code") |
|
|
|
|
|
pid = str(pid) |
|
|
|
|
|
code = str(code) |
|
|
with open('wulin2.txt', 'w', encoding='utf-8', newline='') as f: |
|
|
with open('wulin2.txt', 'w', encoding='utf-8', newline='') as f: |
|
|
f.write(pid) |
|
|
|
|
|
|
|
|
f.write(pid + "\n") |
|
|
|
|
|
f.write(code + "\n") |
|
|
f.close() |
|
|
f.close() |
|
|
results = mysubmit.submit_handler(code, pid, 'C') |
|
|
results = mysubmit.submit_handler(code, pid, 'C') |
|
|
|
|
|
|
|
|