Some SPOJ problem descriptions contain mathematical formulas. As HTML has limited native possiblities to produce high-quality formulas, several problem submitters have chosen to import images with formulas. This solutions, however, is not very flexible. A better alternative is to make use of a rendering engine, such as MathJax.
The following steps must be taken to render high-quality formulas in SPOJ problem descriptions
[ul]
[li] include the following code snippet to the HTML of the problem description
<script type="text/x-mathjax-config">// <![CDATA[
MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});
// ]]></script>
<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script>
Note: the first script is optional, and adds the possibility to use single dollar signs as delimiters for in-line mathematics; this may conflict with the use of regular dollar signs in problem descriptions if not used carefully
[/li]
[li] you can now write formulas in either TeX of MathML format; for example in TeX:
[list]
[*] use math delimiters $$...$$ and [...] for displayed mathematics[/li]
[li] use math delimiters $...$ and (...) for in-line mathematics[/li][/ul][/*:m][/list:u]
Instead of having to include the code snippet manually for all SPOJ problems want to make use of MathJax support, I would like to suggest that the following two options are added to the page where problems are edited
[ul]
[li] support MahtML: checking this option would include the following code snippet in the HTML head
<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script>
[/li]
[li] use single quotes as delimiter for in-line mathematics: checking this option would include the following code snippet in the HTML head
<script type="text/x-mathjax-config">// <![CDATA[
MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});
// ]]></script>
[/li][/ul]
Check the MathJax website to get started with MathJax and see some examples.