port = 80
[setup]
install = '''
dnf install opam
'''
init = '''
opam init -y
eval $(opam env)
'''
[game]
score = "p - 2*max(c,a)"
question_point_value = 20
[test_runner]
timeout = "60s"
trim_output = true
max_memory = { compile = 128, run = 64 }
max_file_size = 8192
[languages]
python3 = "latest"
java = "21"
ocaml = { build = "ocamlc -o out solution.ml", run = "./out", source_file = "solution.ml" }
[[accounts.hosts]]
name = "Teacher"
password = "abc123"
[[accounts.competitors]]
name = "StudentOne"
password = "123abc"
[[accounts.competitors]]
name = "StudentTwo"
password = "deadbeef"
[packet]
title = "Example Packet"
preamble = '''
This packet includes problems of a difficulty *vastly*
surpassing the capabilities of the average computer
science student. Be wary as these problems will
certainly give you great intellectual trouble. There
is little hope for anyone without a Ph.D in computer
science.
If you decide to attempt these problems anyways, good
luck. You will be rewarded for swiftness in your answers.
'''
[[packet.problems]]
title = "Reversing a string"
description = '''
Reversing a string is one of the most *basic* algorithmic
problems for a beginner computer science student to solve.
Solve it.
'''
[[packet.problems.tests]]
input = "hello"
output = "olleh"
visible = true
[[packet.problems.tests]]
input = "world"
output = "dlrow"
visible = true
[[packet.problems.tests]]
input = ""
output = ""
[[packet.problems.tests]]
input = "aa"
output = "aa"
[[packet.problems.tests]]
input = "racecar"
output = "racecar"
[[packet.problems]]
title = "Determine palindrome status"
description = '''
Determine whether the provided string is a palindrome.
You should return "is a palindrome" for palendromes,
and you should return "is not a palindrome" for non-palindromes.
Solve it.
'''
points = 40
[[packet.problems.tests]]
input = "hello"
output = "is not a palindrome"
visible = true
[[packet.problems.tests]]
input = "racecar"
output = "is a palindrome"
visible = true
[[packet.problems.tests]]
input = ""
output = "is a palindrome"
[[packet.problems.tests]]
input = "a"
output = "is a palindrome"
[[packet.problems.tests]]
input = "aa"
output = "is a palindrome"
[[packet.problems.tests]]
input = "hannah"
output = "is a palindrome"