Skip to content

Commit ab89614

Browse files
committed
examples/problems/maximal: Make text in SVG readable by setting y-position
1 parent a2d33cc commit ab89614

File tree

7 files changed

+13
-7
lines changed

7 files changed

+13
-7
lines changed
Lines changed: 1 addition & 1 deletion
Loading
Lines changed: 1 addition & 1 deletion
Loading
Lines changed: 1 addition & 1 deletion
Loading
Lines changed: 1 addition & 1 deletion
Loading
Lines changed: 1 addition & 1 deletion
Loading

examples/problems/maximal/output_visualizer/output_visualizer.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,10 @@
77
feedback_dir = sys.argv[3]
88
args = sys.argv[4:]
99
with open(f"{feedback_dir}/judgeimage.svg", "w") as f:
10-
print(f"<svg><text>args: {escape(' '.join(args))}</text><text>team output: {input()}</text></svg>", file=f)
10+
print(
11+
"<svg>"
12+
+ f"<text y='20'>args: {escape(' '.join(args))}</text>"
13+
+ f"<text y='40'>team output: {escape(input())}</text>"
14+
+ "</svg>",
15+
file=f,
16+
)

examples/problems/maximal/test_case_visualizer/input_visualizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
answer_file = open(sys.argv[2]).read().strip()
77
args = sys.argv[3:]
88
with open("testcase.svg", "w") as f:
9-
print(f"<svg><text>args: {escape(' '.join(args))}</text></svg>", file=f)
9+
print(f"<svg><text y='20'>args: {escape(' '.join(args))}</text></svg>", file=f)

0 commit comments

Comments
 (0)