Luogu
Type of site
Online judge, Online community, Educational platform
Available inChinese (primarily)
OwnerShanghai Luogu Network Technology Co., Ltd. (上海洛谷网络科技有限公司)
Created byWang Chuqi (kkksc03) and others
URLwww.luogu.com.cn
CommercialYes (offers paid courses and premium features, but basic OJ and community are free)
RegistrationOptional (required for submitting solutions, participating in contests, and full community features)
Users900,000+ (as of end of 2022)[1]
LaunchedJune 15, 2013; 12 years ago (2013-06-15)
Current statusActive
Written inPHP, Python, Go, Vue.js

Luogu (Chinese: 洛谷; pinyin: Luògǔ) is a Chinese online judge system and community for competitive programming enthusiasts and students, particularly those preparing for informatics olympiads like NOIP (National Olympiad in Informatics in Provinces) and the International Olympiad in Informatics (IOI). Founded on June 15, 2013, by Wang Chuqi (Chinese: 汪楚奇, commonly known by his Luogu username kkksc03),[2] it has grown into one of the largest platforms of its kind in China, offering a vast problem archive, online contests, educational resources, and a vibrant user community.[1]

The platform is operated by Shanghai Luogu Network Technology Co., Ltd. (上海洛谷网络科技有限公司).[1] Its stated mission is to "build a new ecosystem for computer science education" (打造计算机科学教育新生态).[3]

History

edit

Luogu was founded on June 15, 2013, by Wang Chuqi (kkksc03) while he was still a high school student.[2][4] Initially, it was a personal project aimed at providing a better online judge experience.[1] The platform gradually gained popularity among Chinese students involved in competitive programming.

Key milestones in Luogu's development include:

  • 2013: Luogu launched.
  • 2017: The company Beijing Luogu Technology Co., Ltd. was formally established to operate the platform.[1]
  • 2018: Luogu launched "Luogu Class" (洛谷网校), its online education service.[5]
  • User Growth:
    • End of 2019: 300,000 registered users.[1]
    • End of 2022: 900,000 registered users.[1]

The platform has undergone continuous development, with regular updates to its features, user interface, and judging system, as documented in its public release notes.[6]

Features

edit

Online Judge

edit

The core feature of Luogu is its online judge, which allows users to submit solutions to a large collection of programming problems and receive instant feedback on correctness and performance.[3] The problem archive includes problems from various sources, such as past programming contests (e.g., NOIP, NOI (China National Olympiad in Informatics), USACO), algorithm challenges, and user-contributed problems.[1] Problems are categorized by difficulty, tags (algorithms or data structures involved), and origin.

The judge supports a wide range of programming languages (see #Supported Programming Languages). The judging environment is based on Linux and uses cgroups for sandboxing.[7]

Community

edit

Luogu has a strong community component, featuring discussion forums where users can ask questions, share solutions (often after contests), discuss algorithms, and interact on various topics.[1] Users can also write and publish blog posts (formerly "博客", now "洛谷专栏" - Luogu Columns) to share more extensive content like tutorials and contest experiences.[6]

Contests

edit

The platform hosts regular online programming contests, including official Luogu contests (LGRs), rated contests, and contests organized by user groups or other organizations.[3] These contests often follow formats similar to IOI or ICPC.

Educational Resources

edit

Luogu provides educational resources through "Luogu Class" (洛谷网校), an online education service offering interactive or video lessons on programming and algorithms.[8][5] Courses range from introductory C++ programming to advanced topics for various informatics competitions.[5] Many tutorial contents on the main platform are also user-contributed.[1]

Development Tools

edit

The Luogu Development Team maintains several open-source projects hosted on GitHub, including:

  • CYaRon: A Python-based test data generator for informatics olympiads.[9]
  • markdown-palettes: A Markdown editor for the web.[9]
  • docs: The Luogu Help Center.[9]
  • lgapi-docs: Luogu API documentation.[9]

Technology

edit

Technical Stack

edit

Luogu's backend system is primarily driven by PHP, with middleware components involving Python and Go. The frontend utilizes the Vue.js framework. The platform was reported to be running on Alibaba Cloud and was undergoing a migration of some services to physical computing nodes in its own data centers as of 2024 to improve performance and reduce reliance on cloud provider limitations.[1][6] Luogu holds a patent application for a "high-concurrency online program judging system."[1]

Judging Environment (judge-env)

edit

The specifics of Luogu's judging environment, including compilers and system libraries, are managed using Nix. The configuration for this environment is publicly available in the `luogu-dev/judge-env` repository on GitHub.[7][10] This repository details the versions of compilers like GCC and GHC, and other dependencies.[10] The judging environment defines an environment variable `ONLINE_JUDGE=luogu` to allow programs to detect if they are being run under Luogu's judge.[7]

Supported Programming Languages

edit

Luogu's online judge supports a wide array of programming languages. The platform aims to keep its environment consistent with common competition setups, particularly for C, C++, and Pascal. For other languages, while supported, it is noted that their execution time and memory usage might be less optimized for competitive programming constraints, and Luogu does not provide additional limits for them.[7] O2 optimization is generally enabled by default for languages that support it, and can sometimes be controlled by problem setters or users.[7]

The following table summarizes the supported languages, their typical versions, and compilation/execution details as of late 2023/early 2024, based on Luogu's help documentation:[7]

Supported Programming Languages on Luogu
Language Standard/Variant Compiler/Runtime Version Compilation/Execution Command(s) Notes
C C99 GCC 13.2.0 gcc -x c -std=c99 -DONLINE_JUDGE -Wall -fno-asm -lm -march=native -O2 for O2 optimization.
C++ C++98, C++11, C++14, C++17, C++20 GCC 13.2.0 g++ -x c++ -std=$version -fPIC -DONLINE_JUDGE -Wall -fno-asm -lm -march=native -O2 for O2 optimization. pragma and attribute for optimization are disabled.
C++ (NOI) C++14 GCC 9.3.0 (Same as above, with -std=c++14) Aligns with CCF NOI Linux 2.0 environment. Default for most cases.
Pascal Free Pascal Compiler 3.2.2 fpc -dONLINE_JUDGE -vnw -O2 for O2 optimization.
Python 3 CPython Python 3.11.5, NumPy 1.25.2 (Execution) Includes NumPy.
Python 3 (PyPy) PyPy3 PyPy 7.3.12 (Python 3.9.17) (Execution) Does not include NumPy.
Java Java 8 OpenJDK 1.8.0_362 javac / java -DONLINE_JUDGE Source file must be Main.java.
Java Java 21 OpenJDK 21 javac / java -DONLINE_JUDGE Source file must be Main.java.
Rust Edition 2021 rustc 1.76.0-nightly rustc --edition 2021 -W warnings -C opt-level=2 for O2 optimization.
Go Go 1.21.3 (Execution)
C# Mono Mono 6.12.0.182 mcs -define:ONLINE_JUDGE / mono
Haskell GHC 9.4.7 ghc -DONLINE_JUDGE -Wall -O2 for O2 optimization.
OCaml ocamlopt 4.14.1 ocamlopt -O2 for O2 optimization.
Lua Lua 5.2.4 (Execution)
Julia Julia 1.9.3 (Execution)
Kotlin Kotlin/JVM kotlinc-jvm 1.9.20 kotlinc-jvm -jvm-target 21 -include-runtime / java -DONLINE_JUDGE Targets Java 21 JVM.
Scala Scala 2.x Scala compiler 2.13.12 scalac -optimize -deprecation -feature -explaintypes -target:21 / java -DONLINE_JUDGE Targets Java 21 JVM.
PHP PHP 8.2.12 (Execution)
Perl Perl 5.38.0 (Execution)
Ruby Ruby 3.1.4p223 (Execution)
Node.js Node.js v20.9.0 (Execution)

Impact and Reception

edit

User Base and Reputation

edit

Luogu is described by multiple sources, including academic papers and profiles of its staff, as a "well-known online judge website in China."[8][2][4] The platform's user base has grown considerably, from 300,000 users by the end of 2019 to 900,000 users by the end of 2022.[1] The large number of followers for its founder on the platform (e.g., kkksc03 having 42,000 followers) also indicates an active and substantial community.[11] Its CEO, Wang Chuqi (kkksc03), has been mentioned in discussions within the competitive programming community alongside leaders of other international platforms like AtCoder.[12]

Role in Computer Science Education

edit

Luogu plays a significant role in computer science education in China, particularly for students preparing for informatics olympiads. It provides a "convenient and refreshing programming experience for contestants participating in programming competitions, such as NOIP, NOI, and ACM." Its educational arm, "Luogu Class" (洛谷网校), offers structured online courses covering various levels of algorithm and programming education, from basic C++ to advanced competitive programming techniques.[8][5] The platform encourages user-generated content, with many tutorials and problem solutions contributed by its community, ensuring a wide range of learning materials suitable for both beginners and experienced programmers.[1]

See also

edit

References

edit
  1. ^ a b c d e f g h i j k l m n "关于我们 - 洛谷 (About Us - Luogu)". help.luogu.com.cn (in Chinese). Retrieved 5 June 2025.
  2. ^ a b c "kkksc03 - WANG Chuqi". k.luogu.org. Retrieved 5 June 2025.
  3. ^ a b c "首页 - 洛谷 | 计算机科学教育新生态 (Homepage - Luogu | New Ecosystem for Computer Science Education)". www.luogu.com.cn (in Chinese). Retrieved 5 June 2025.
  4. ^ a b "Peisen Yao - Resume". self.cubicy.icu. Retrieved 5 June 2025.
  5. ^ a b c d "洛谷网校 - 学信息学竞赛,就上洛谷!(Luogu Online School - Learn Informatics Olympiad, Go to Luogu!)". class.luogu.com.cn (in Chinese). Retrieved 5 June 2025.
  6. ^ a b c "洛谷更新日志 (Luogu Update Log)". help.luogu.com.cn (in Chinese). Retrieved 5 June 2025.
  7. ^ a b c d e f "评测 - 洛谷主站操作指南 (Judging - Luogu Main Site Operation Guide)". help.luogu.com.cn (in Chinese). Retrieved 5 June 2025.
  8. ^ a b c "Soha Jin - Full-stack and operations engineer". sohaj.in. Retrieved 5 June 2025.
  9. ^ a b c d "Luogu Development Team". GitHub. Retrieved 5 June 2025.
  10. ^ a b "luogu-dev/judge-env: 洛谷评测环境 (Luogu Judging Environment)". GitHub (in Chinese). Retrieved 5 June 2025.
  11. ^ "kkksc03 的个人中心 - 洛谷 (kkksc03's Personal Center - Luogu)". www.luogu.com.cn (in Chinese). Retrieved 5 June 2025.
  12. ^ MikeMirzayanov (blog post) / FFTotoro (comment) (5 October 2024). "World-Changing Codeforcers? Wanted!". Codeforces. Retrieved 5 June 2025.
edit