St Andrews Online Judge

St Andrews Online Judge (STAOJ)

by Competitive Programming St Andrews (CPSTA)

LinkedIn Badge Facebook Badge Discord Badge Instagram Badge


cout << sth << endl;

rather than

cout << sth;

Who are We?

We are a society in St Andrews formed by a group of passionate people whose main intention is to strengthen people's algorithmic and problem-solving skills. Our workshops and contests serve as preparation for competitive programming competitions and will help one ace technical coding interviews.

We are open to all irrespective of major or coding experience - the point is to learn and improve.

The Contest

Check out upcoming contest. It is a programming competition of approximately two or three hours where you solve fun and interesting programming problems. One of us typically sets all the problems for that contest.

Past contests

You can see our past problems on this site. Our archive of past problems before this online judge was built can be found here. Analysis, and in some cases, solutions and editorials can be found there. If not here, they can be found on the contest page itself (under the "Editorial" section), where test cases can also be downloaded.

Past winners

The past winners are also on the site. For competitions before this online judge was built, the leaderboard for each contest can be found on the contest page itself.

Support and sponsorships

In the past, we have worked with hackathons like Hack Quarantine (Contest 11 and Contest 12) and The Open Code Foundation (Contest 19).

Upon request, we can create custom contests for hackathons and organisations, and possibly provide other support as well (like workshops and talks). For more information about us and potential sponsorship opportunities, feel free to email

The Team

Currently consists of seven St Andrews students from around the world. Learn more about the members that power this society here.

Accessibility issues? If you have a condition (eg visually impaired, or even otherwise) that you think is causing you difficulty in taking part in any of our events or contests, please let know. We'll do what we can to ensure that you can take part in all our events.