Po-Yu (Poe) Juan

CS MEng @ Cornell Tech

CPE Exam Experience & Preparation Guide

First attempt, 7 problems solved

Chinese Version

CPE (Collegiate Programming Examination) is an exam designed to evaluate students' programming abilities in Taiwan. It uses an online judge system to automatically assess submissions. Official Website

Google Map


About Me

I'm a senior CS student at NTHU (Class of 2024). Since I was about to graduate, I decided to take advantage of the free registration for university students.

I've never passed the NCPC preliminary round, never made it to ICPC Regionals, so I can share this from an average student's perspective. Those competitive programming veterans probably can't relate to the struggles of us ordinary folks.


Exam Experience

I participated in the April 23, 2024 session (rescheduled from March 26 due to technical issues). The original session had to be canceled because the answers were accidentally displayed when the problems were released. Honestly, it was quite frustrating, since the nearest NYCU venue was full, I registered at Chung Hua University, meaning I had to make the 10km trip from the East District to Xiangshan four times.

The exam is conducted entirely on a self-maintained program called "Crazy Programming" (瘋狂程設). The user experience of this program might actually drive a normal person crazy (just kidding... mostly).

Problem Statements

Problems are PDF files from the UVa Problem Set. Some are image-based, some are text-based. The image-based ones get blurry even at normal zoom levels.

As for the problem descriptions, well, UVa problems are notorious for their lengthy, convoluted stories that waste your time. Some don't even provide variable constraints, leaving you to guess what time complexity you need.

Rating: 3/5 — Can't really blame the organizers for UVa's problem style.

Code Editor

The built-in editor is basically a colored Notepad. No IntelliSense, making it one of the most painful coding experiences, probably only slightly better than writing code in Google Docs during an interview.

Pro tip: Don't use good coding style. Keep variable names as short as possible to reduce typos.

Rating: 1.5/5 — Even web-based editors can be smooth nowadays. Hope this improves.

Compiler

Didn't encounter any precision or big number problems this time, so I didn't experience Python. MinGW provides C++11 standard, which is usable but dated. Features like auto-type parameters and many standard namespace functions aren't available.

Rating: 3.5/5

Execution, Debugging & Submission

Custom test cases can be compared directly with the solution output, with differences highlighted. If you can generate edge cases and large test cases yourself, you can determine WA/TLE before submitting.

Rating: 5/5 — The solution comparison feature alone deserves full marks.

Venue

The staff were friendly, AC was cold enough, and Chung Hua University is quite nice. 5/5!

Side note: We shouldn't be too harsh on this exam. Apparently, the government doesn't provide much support, and it's mostly maintained by university professors and their grad students volunteering their time.


Exam Preparation

Each exam has 7 problems: 4-5 problems rated 1-2 stars, 2-3 problems rated 3-4 stars, and 5-star problems are rare.

CS Students (Completed Data Structures & Algorithms)

Target: Professional Level (4-5 problems)

  1. Complete all 49 must-solve 1-star problems
  2. Randomly solve ~60 problems from 2-3 star categories

Note: Some 3-star problems require competitive programming techniques (prime sieves, segment trees, basic graph theory). If you don't have time to learn these, skip them—securing 1-2 star problems is enough for Professional Level.

However, you should be comfortable with:

  • Basic Dynamic Programming
  • STL Data Structures
  • DFS/BFS variations

These are also common interview question types!

CS Students (Some Competitive Programming Experience)

Target: Expert Level (6-7 problems)

Focus on harder 3-star problems (sort by solve count) and 4-star problems. 4-star difficulty varies greatly, and since you can't bring templates or reference materials, you need to know how to write simplified versions from memory.

For example, for network flow problems, Edmonds-Karp is easier to write during an exam than Dinic or ISAP.

Getting 6 is achievable; 7 depends on which 4-star problems appear. If you're not in a hurry, register for multiple sessions, eventually you'll get easier 4-star problems.

CS Students (Intermediate-Advanced Competitive Programming)

Congratulations, you can take it cold. You can close this article now.

Just review any templates you're rusty on before the exam.

Non-CS Students

Depends on your familiarity with programming problem-solving. Start with easier problems and train gradually. Many top scorers aren't CS majors, problem-solving is about practice, not your major.


Learning Resources

Honestly, grinding the problem bank has the highest ROI since most exam problems come from there. But UVa problems are verbose, I/O is often unnecessarily complex, and some don't even have solutions online. It gets frustrating.

So here are some better alternatives for systematic learning (UVa feels like a relic of the past):

USACO Guide

usaco.guide

USACO Guide

A free collection of curated, high-quality competitive programming resources to take you from USACO Bronze to USACO Platinum and beyond.

An open-source curriculum maintained by former world champion Benq, designed to train US high school students for IOI. Topics are categorized by difficulty, very beginner-friendly. Each concept has practice problems. Completing up to Gold level should be enough to ace CPE.

OI Wiki

oi-wiki.org

OI Wiki

OI Wiki 是一个编程竞赛知识整合站点,提供有趣又实用的编程竞赛知识以及其他有帮助的内容。

A Simplified Chinese open-source encyclopedia. If you can read Chinese, it's an excellent resource with clear categorization, tutorials, and practice problems. For English readers, CP-Algorithms covers similar content.

Other resources like GeeksforGeeks, TopCoder, and CS Academy are also rich, but I'll just recommend these two most popular ones since I'm not a competitive programmer myself.


Practice Resources

Again, grinding the problem bank has the highest ROI! But if you're getting frustrated, try these platforms that provide editorials:

AtCoder

atcoder.jp

AtCoder

AtCoder is a programming contest site for anyone from beginners to experts. We hold weekly programming contests online.

My personal favorite, created by Japanese developers. Problems are typically concise and high-quality. Use the AtCoder Problems page—almost every problem has an editorial. Great for building foundational competitive programming skills. You can also learn tricks from reading others' submissions.

Codeforces

codeforces.com

Codeforces

Codeforces. Programming competitions and contests, programming community.

Currently the world's most active competitive programming platform with many quality problems and editorials.

Warning: A significant portion of problems are "ad-hoc" (solved through observation rather than classical algorithms). While great for competitive programming skills, they're less helpful for CPE since UVa problems tend to favor classical techniques.

Recommendation: Focus on Educational Rounds—they're created by the official team and have fewer ad-hoc problems.

Bonus: Luogu

luogu.com.cn

Luogu 洛谷

洛谷创办于2013年,致力于为编程爱好者提供清爽、快捷的编程体验。

Luogu is currently China's largest competitive programming platform. If you can read Simplified Chinese, it offers difficulty ratings, problem categorization, abundant editorials, curated problem lists, and blazing-fast judge speeds (1-2 second verdicts). It even has theme customization for anime fans.

If not for reading Chinese being slower than English for me, this would definitely be my main practice ground.


Final Thoughts

Objectively, this exam has its issues. A university exam that's essentially a problem bank test probably has less discriminating power than APCS (designed for high schoolers).

But we can't really compare it to APCS, the government funding is vastly different. Demanding original problems every session is unrealistic.

Also, they don't need to insist on using their self-developed judge software. Given limited funding, software maintenance is impractical. Using open-source judge systems with local compilers/editors would be more modern and easier to maintain.

Lastly, the star ratings don't always reflect actual difficulty. The April 23 session had similar star distribution to previous sessions, yet 45 people achieved 7/7—11x the previous session's 4 people and 15x the session before that's 3 people.

The official definitions are vague:

  • 3 stars: Requires good algorithms or mathematical methods
  • 4 stars: Requires special algorithms or combining multiple algorithms

"Good" vs "special" algorithms isn't a clear standard. For example, "Inviting Politicians" (requiring bit manipulation and DFS pruning) is rated 3 stars, while "Triangle Counting" (simple DP) is rated 4 stars. If both appeared in an exam, the 3-star problem would be far more lethal.


Afterword

Thanks to the relatively gentle problems this time, I was able to clear all 7 on my first attempt. Grateful to the organizers for their efforts, hope they continue to improve. And I hope this article (with all its rambling) gives you some direction if you're preparing for the exam.

"Always do your best. What you plant now, you will harvest later." — Og Mandino, Author