Hello, World!

Welcome to the PEG Online Judge. This site was created by members of Woburn Collegiate Institute's Programming Enrichment Group as a resource for competitive programmers everywhere. We also run PEGWiki, a site for information and tutorials of algorithms.

Currently, we have 1064 problems, 328460 submissions, 277 analyses, and support for 15 languages.

If you are new here, register an account and get familiar with the judge by solving A plus B. Alternatively, you can try a random problem that you haven't solved.

Announcements (See All)

Woburn Challenge round 4 results are now available!

by Alex on Apr 13, 2016 - 2:14:15 am UTC
What a great first year of the Woburn Challenge relaunch! Thank you to everyone for participating in the online contests and helping us revive this meaningful computer science tradition. We hope you found our problems to be both fun and challenging. For the future, we hope to incorporate all the feedback you have sent us to make these challenges an even more engaging experience. Finally, we ask you to please help spread the word about the contest during the next season.

Click here for full results to the contest. Problems, solutions, and test data are now available here.

The senior division prizewinners for this round are:
  • Timothy Li of Don Mills Collegiate Institute ($200)
  • Jason Yuen of Pierre Elliott Trudeau High School ($100)
  • Ahmed Sabie of Glenforest Secondary School ($50)
  • Jeffrey Xiao of University of Toronto Schools ($50)
  • Bill Zheng of Richmond Green Secondary School ($50)
The junior division prizewinners for this round are:
  • Max Li of Thornhill Secondary School ($50)
  • John Phillips of Lisgar Collegiate Institute ($25)
  • Alexander Kursell of Thornhill Secondary School ($25)
Congratulations! These prizes will be distributed as Visa gift cards, and we will be contacting your teachers shortly about sending them out. Remember that we will have many prizes in the finals as well as for next year, so keep on practicing!

Students who have qualified their schools for the final on-site round on Friday May 6th, will receive an email shortly with instructions. Teacher contacts listed by these students will be sent instructions on registration, and students should confirm with their teachers.

Woburn Challenge Online Round 4

by Alex on Mar 29, 2016 - 9:39:20 pm UTC
Edit: The contest is over! Many thanks to all of you who participated. The questions have been cloned to the main judge. We will be posting prizewinners and analyses to all of the problems shortly. Check here, as well as our website periodically!

Edit 2: The contest problems have been posted to ( and also cloned to the main judge. Feel free to submit to them for practice while we work on publishing results and analyses. Note that J3 and S1 are the same question, so submissions to J3 are not moved over and junior competitors will have to resubmit them to S1 on the main judge.

Junior Problems: J1, J2, J3, J4
Senior Problems: S1, S2, S3, S4

The 4th and final online round is here! The format will be exactly like the first three round (possibly with different problem weightings). If you didn't participate in the previous rounds, it is not too late to jump in now. New competitors can read more about the contest and register at If you have already registered through this process in the earlier rounds, you do not have to do it again. Once again, all Canadian high school students are eligible for prizes (you must be first registered through the aforementioned website), but everyone with a PEG Judge account is welcome to participate.

Online Round 4

When: Friday, April 8th, 2016 from 4:00 pm to 7:00 pm ET
Where: The PEG Judge interface (
Format: 2 divisions, 3 hours, 4 problems, infinite submissions, and live feedback.
  • Top 3 Junior division winners: $50, $25, $25
  • Top 5 Senior division winners: $200, $100, $50, $50, $50
Full format and rules can be found at:
For more details, visit For questions, email

Good luck and enjoy the problems!

CCOQR 2016 Problems Added

by Alex on Mar 09, 2016 - 11:44:06 am UTC

Pinned Posts

Recent Comments