id int64 0 402 | problem_id stringlengths 19 67 | competition stringclasses 14
values | contest stringclasses 20
values | task_name stringlengths 2 40 | problem_statement stringlengths 1.12k 16k | time_limit float64 0.1 10 | memory_limit float64 256 2.05k | task_type stringclasses 2
values | difficulty int64 1 29 | algorithms stringlengths 10 133 | setup_script stringclasses 6
values | evaluation_script stringclasses 6
values | grader_code stringclasses 39
values | starter_code stringclasses 39
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | IOI-2023-contest-beechtree | IOI | contest | beechtree | # Beech Tree
Vétyem Woods is a famous woodland with lots of colorful trees.
One of the oldest and tallest beech trees is called Ős Vezér.
The tree Ős Vezér can be modeled as a set of $N$ **nodes** and $N-1$ **edges**.
Nodes are numbered from $0$ to $N-1$ and edges are numbered from $1$ to $N-1$.
Each edge connects tw... | 1.5 | 2,048 | batch | 25 | ["greedy", "data structures", "tree map", "small to large", "binary search"] | {"grader.cpp": "#include \"beechtree.h\"\n#include <cassert>\n#include <cstdio>\n// BEGIN SECRET\n#include <string>\n// END SECRET\n\nint main()\n{\n // BEGIN SECRET\n const std::string input_secret = \"j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi\";\n const std::string output_secret = \"p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH\"... | {"beechtree.cpp": "#include \"beechtree.h\"\n\nstd::vector<int> beechtree(int N, int M, std::vector<int> P, std::vector<int> C)\n{\n return {};\n}\n", "grader.cpp": "#include \"beechtree.h\"\n#include <cassert>\n#include <cstdio>\n\nint main()\n{\n int N, M;\n assert(2 == scanf(\"%d %d\", &N, &M));\n std::v... | ||
1 | IOI-2023-contest-closing | IOI | contest | closing | # Closing Time
Hungary is a country with $N$ cities, numbered from $0$ to $N - 1$.
The cities are connected by $N - 1$ *bidirectional* roads, numbered from $0$ to $N - 2$.
For each $j$ such that $0 \le j \le N - 2$, road $j$ connects city $U[j]$ and city $V[j]$ and has length $W[j]$,
that is, it allows one to travel ... | 1 | 2,048 | batch | 25 | ["greedy", "tree"] | {"grader.cpp": "#include \"closing.h\"\n\n#include <cassert>\n#include <cstdio>\n\n// BEGIN SECRET\n#include <string>\n// END SECRET\n#include <vector>\n\nint main()\n{\n // BEGIN SECRET\n {\n std::string in_secret = \"cc61ad56a4797fb3f5c9529f73ce6fcedd85669b\";\n std::string out_secret = \"081ce3c3... | {"grader.cpp": "#include \"closing.h\"\n\n#include <cassert>\n#include <cstdio>\n\n#include <vector>\n\nint main()\n{\n\n int Q;\n assert(1 == scanf(\"%d\", &Q));\n\n std::vector<int> N(Q), X(Q), Y(Q);\n std::vector<long long> K(Q);\n std::vector<std::vector<int>> U(Q), V(Q), W(Q);\n\n for (int q = 0;... | ||
2 | IOI-2023-contest-longesttrip | IOI | contest | longesttrip | # Longest Trip
The IOI 2023 organizers are in big trouble! They forgot to plan the trip to Ópusztaszer for the upcoming day.
But maybe it is not yet too late ...
There are $N$ landmarks at Ópusztaszer indexed from $0$ to $N-1$.
Some pairs of these landmarks are connected by *bidirectional* **roads**.
Each pair of l... | 1 | 2,048 | interactive | 25 | ["ad-hoc", "graph theory", "binary search"] | #!/bin/bash
set -e # Exit immediately if a command fails
# --- Fixed Files (Problem Specific) ---
STUB_CPP="stub.cpp"
MANAGER_CPP="manager.cpp"
HEADER="longesttrip.h"
TESTLIB_HEADER="testlib.h" # Needed for manager compilation
# --- Argument Parsing ---
# Expect exactly one argument: solution_file
if [ "$#" -ne 1 ]; ... | #!/bin/bash
set -e # Exit immediately if a command fails
# --- Argument Parsing ---
# Expect exactly two arguments: solution_file and input_file
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <path/to/solution.cpp> <path/to/input.txt>" >&2
exit 1
fi
SOLUTION_CPP="$1" # Get solution file from first argument
INPUT_TXT=... | {"grader.cpp": "#include \"longesttrip.h\"\n\n#include <cassert>\n#include <cstdio>\n#include <string>\n#include <vector>\n\nstatic inline constexpr int maxNumberOfCalls = 32640;\nstatic inline constexpr int maxTotalNumberOfCalls = 150000;\nstatic inline constexpr int maxTotalNumberOfLandmarksInCalls = 1500000;\nstatic... | {"longesttrip.cpp": "#include \"longesttrip.h\"\n\nstd::vector<int> longest_trip(int N, int D)\n{\n return {};\n}\n", "grader.cpp": "#include \"longesttrip.h\"\n\n#include <cassert>\n#include <cstdio>\n#include <string>\n#include <vector>\n\nstatic inline constexpr int maxNumberOfCalls = 32640;\nstatic inline conste... |
3 | IOI-2023-contest-overtaking | IOI | contest | overtaking | # Overtaking
There is a one-lane, one-way road from Budapest Airport to Hotel Forrás. The road is $L$ kilometres long.
Over the IOI 2023 event, $N+1$ transfer buses traverse this road. Buses are numbered from $0$ to $N$.
Bus $i$ ($0 \le i \lt N$) is scheduled to leave the airport at the $T[i]$-th second of the event,... | 2.5 | 2,048 | batch | 23 | ["data structures", "tree map"] | {"grader.cpp": "#include \"overtaking.h\"\n#include <cassert>\n#include <cstdio>\n#include <vector>\n// BEGIN SECRET\n#include <string>\n// END SECRET\n\nint main()\n{\n // BEGIN SECRET\n const std::string input_secret = \"XwWPuInrOjpekAwGKojzwKw3yVDtdkGS\";\n const std::string output_secret = \"mGlgT4yvr1qPbq... | {"grader.cpp": "#include \"overtaking.h\"\n#include <cassert>\n#include <cstdio>\n#include <vector>\n\nint main()\n{\n int L, N, X, M, Q;\n assert(5 == scanf(\"%d %d %d %d %d\", &L, &N, &X, &M, &Q));\n std::vector<long long> T(N);\n for (int i = 0; i < N; i++)\n assert(1 == scanf(\"%lld\", &T[i]));\n... | ||
4 | IOI-2023-contest-robot | IOI | contest | robot | # Robot Contest
AI researchers at the University of Szeged are holding a robot programming contest.
Your friend, Hanga, has decided to take part in the contest. The objective is to program the ultimate _Pulibot_, admiring the great intelligence of the famous Hungarian herding dog breed, the Puli.
Pulibot will be test... | 1 | 2,048 | interactive | 28 | ["bfs", "graph theory", "constructive", "ad-hoc", "tree", "implementation", "graph traversal"] | #!/bin/bash
set -e # Exit immediately if a command fails
echo "--- Setup Script (Robot Problem) ---"
# --- Fixed Files (Problem Specific) ---
STUB_CPP="stub.cpp" # Stub for the robot problem
MANAGER_CPP="manager.cpp" # Manager for the robot problem
HEADER="robot.h" # Header for the robot pro... | #!/bin/bash
set -e # Exit immediately if a command fails
echo "--- Evaluation Script (Robot Problem) ---"
# --- Argument Parsing ---
# Expect exactly two arguments: solution_file and input_file
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <path/to/solution.cpp> <path/to/input.txt>" >&2
echo "Note: Run setup_robot.... | {"grader.cpp": "#include \"robot.h\"\n#include <cassert>\n#include <string>\n#include <fstream>\n#include <iostream>\n#include <sstream>\n#include <iomanip>\n\nstatic const int MAX_COLOR = 19;\nstatic const int MAX_STATE = 5153632; // = (MAX_COLOR + 3) ^ 5\nstatic const int MAX_STEPS = 500000;\n\nstatic std::ofstream o... | {"grader.cpp": "#include \"robot.h\"\n#include <cassert>\n#include <string>\n#include <fstream>\n#include <iostream>\n#include <sstream>\n#include <iomanip>\n\nstatic const int MAX_COLOR = 19;\nstatic const int MAX_STATE = 5153632; // = (MAX_COLOR + 3) ^ 5\nstatic const int MAX_STEPS = 500000;\n\nstatic std::ofstream o... |
5 | IOI-2023-contest-soccer | IOI | contest | soccer | # Soccer Stadium
Nagyerdő is a square-shaped forest located in the city of Debrecen, which can be modeled as an $N \times N$ grid of cells.
The rows of the grid are numbered from $0$ to $N - 1$ from north to south, and
the columns are numbered from $0$ to $N - 1$ from west to east.
We refer to the cell located at ro... | 3.5 | 2,048 | batch | 26 | ["dynamic programming", "tree", "cartesian tree", "prefix sum", "binary search"] | {"grader.cpp": "#include \"soccer.h\"\n#include <cassert>\n#include <cstdio>\n#include <vector>\n// BEGIN SECRET\n#include <string>\n// END SECRET\n\nint main()\n{\n // BEGIN SECRET\n const std::string input_secret = \"R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L\";\n const std::string output_secret = \"xlqtkQVzqzbOJxjzxl... | {"grader.cpp": "#include \"soccer.h\"\n#include <cassert>\n#include <cstdio>\n#include <vector>\n\nint main()\n{\n int N;\n assert(1 == scanf(\"%d\", &N));\n std::vector<std::vector<int>> F(N, std::vector<int>(N));\n for (int i = 0; i < N; i++)\n {\n for (int j = 0; j < N; j++)\n {\n ... | ||
6 | IOI-2024-contest-hieroglyphs | IOI | contest | hieroglyphs | # Hieroglyphs
A team of researchers is studying the similarities between sequences of hieroglyphs.
They represent each hieroglyph with a non-negative integer.
To perform their study,
they use the following concepts about sequences.
For a fixed sequence $A$,
a sequence $S$ is called a **subsequence** of $A$
if and ... | 1 | 2,048 | batch | 28 | ["greedy", "dynamic programming", "ad-hoc", "data structures", "segment tree"] | {"grader.cpp": "#include \"hieroglyphs.h\"\n#include <cassert>\n#include <cstdio>\n#include <vector>\n// BEGIN SECRET\n#include <cstdlib>\n#include <string>\n\nnamespace {\n\nvoid write_grader_result(std::string grader_result, std::string grader_msg = \"\") {\n const std::string output_secret = \"IyRwUZ9rsuq5tjuK54lpS... | {"grader.cpp": "#include \"hieroglyphs.h\"\n#include <cassert>\n#include <cstdio>\n#include <vector>\n\nint main() {\n int N, M;\n assert(2 == scanf(\"%d%d\", &N, &M));\n std::vector<int> A(N), B(M);\n for (int i = 0; i < N; i++)\n assert(1 == scanf(\"%d\", &A[i]));\n for (int j = 0; j < M; j++)\n assert(1 =... | ||
7 | IOI-2024-contest-message | IOI | contest | message | # Message
Aisha and Basma are two friends who correspond with each other.
Aisha has a message $M$, which is a sequence of $S$ bits (i.e., zeroes or ones),
that she would like to send to Basma.
Aisha communicates with Basma by sending her **packets**.
A packet is a sequence of $31$ bits indexed from $0$ to $30$.
Aisha... | 3 | 2,048 | interactive | 28 | ["graph theory", "ad-hoc", "constructive", "functional graph"] | #!/bin/bash
set -e # Exit immediately if a command fails
# --- Fixed Files (Problem Specific) ---
STUB_CPP="stub.cpp" # Stub for message problem
MANAGER_CPP="manager.cpp" # Manager for message problem
HEADER="message.h" # Header for message problem
# TESTLIB_HEADER="testlib.h" # Assumed present, ... | #!/bin/bash
set -e # Exit immediately if a command fails
echo "--- Evaluation Script ---"
# --- Argument Parsing ---
# Expect exactly two arguments: solution_file and input_file
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <path/to/solution.cpp> <path/to/input.txt>" >&2
echo "Note: Run setup.sh <path/to/solution.c... | {"grader.cpp": "#include \"message.h\"\n#include <cassert>\n#include <cstdio>\n#include <cstdlib>\n\nnamespace {\nconst int PACKET_SIZE = 31;\nconst int CALLS_CNT_LIMIT = 100;\n\nint calls_cnt;\nstd::vector<bool> C(PACKET_SIZE);\nstd::vector<std::vector<bool>> R;\n\nvoid quit(const char* message) {\n printf(\"%s\\n\",... | {"message.cpp": "#include \"message.h\"\n\nvoid send_message(std::vector<bool> M, std::vector<bool> C) {\n std::vector<bool> A(31, 0);\n send_packet(A);\n}\n\nstd::vector<bool> receive_message(std::vector<std::vector<bool>> R) {\n return std::vector<bool>({0, 1, 1, 0});\n}\n", "grader.cpp": "#include \"message.h\"\n... |
8 | IOI-2024-contest-mosaic | IOI | contest | mosaic | # Mosaic
Salma plans to colour a clay mosaic on a wall.
The mosaic is an $N \times N$ grid,
made of $N^2$ initially uncoloured $1 \times 1$ square tiles.
The rows of the mosaic are numbered from $0$ to $N-1$ from top to bottom,
and the columns are numbered from $0$ to $N-1$ from left to right.
The tile in row $i$ an... | 1 | 2,048 | batch | 20 | ["implementation", "ad-hoc", "prefix sum"] | {"grader.cpp": "#include \"mosaic.h\"\n#include <cassert>\n#include <cstdio>\n#include <vector>\n// BEGIN SECRET\n#include <cstdlib>\n#include <string>\n\nnamespace {\n\nvoid write_grader_result(std::string grader_result, std::string grader_msg = \"\") {\n const std::string output_secret = \"Wm5rkGNobnYjFI7TIY17RAm6FA... | {"grader.cpp": "#include \"mosaic.h\"\n#include <cassert>\n#include <cstdio>\n#include <vector>\n\nint main() {\n int N;\n assert(1 == scanf(\"%d\", &N));\n std::vector<int> X(N), Y(N);\n for (int i = 0; i < N; i++)\n assert(1 == scanf(\"%d\", &X[i]));\n for (int i = 0; i < N; i++)\n assert(1 == scanf(\"%d\"... | ||
9 | IOI-2024-contest-nile | IOI | contest | nile | "# Nile\n\nYou want to transport $N$ artifacts through the Nile. \nThe artifacts are numbered from $(...TRUNCATED) | 2 | 2,048 | batch | 20 | ["data structure", "segment tree", "disjoint set", "offline queries"] | "{\"grader.cpp\": \"#include \\\"nile.h\\\"\\n#include <cassert>\\n#include <cstdio>\\n#include <vec(...TRUNCATED) | "{\"grader.cpp\": \"#include \\\"nile.h\\\"\\n#include <cassert>\\n#include <cstdio>\\n#include <vec(...TRUNCATED) |
End of preview. Expand in Data Studio
LiveOIBench
LiveOIBench consists of 403 coding problems collected directly from the official websites of 72 competitions across 14 renowned Informatics Olympiads, focusing on contests held from 2023 onward. We collect all the offical test cases, human contestant ranking results, and contestant Codeforces profiles.
Usage
Please see this Github repository for downloading and processing the dataset.
Files
data/liveoibench_v1.parquet– all 403 problems and from 2023/01 to 2025/05.
Schema
Each row in liveoibench_v1.parquet has the following fields:
id: Unique integer identifier for the row.problem_id: Stable identifier for the problem, typically of the form<COMPETITION>-<YEAR>-<ROUND>-<TASK>.competition: Name of the competition (for example"IOI","APIO").contest: Contest or round name within the competition (for example"contest","day1").task_name: Short task slug, usually matching the official problem name used in filenames.problem_statement: Full problem statement in natural language.time_limit: Time limit for solutions, in seconds.memory_limit: Memory limit for solutions, in megabytes.task_type: Type of problem instance (for example"batch","interactive","output-only").difficulty: Approximate difficulty score for the task.algorithms: JSON‑encoded list of algorithmic tags describing the main techniques used to solve the problem (for example["greedy", "graph theory"]).setup_script: Script or set of shell commands used to prepare the problem environment (compilation, build flags, etc.).evaluation_script: Script or command used to run the official checker and compute scores for a candidate solution.grader_code: Source code for the official grader or harness (for example C++ grader for interactive or output‑only tasks).starter_code: Optional starter/template code provided to contestants or models.
Note that some string fields may be empty for certain problems if the corresponding artifact is not available.
License
This project is licensed under CC-BY-4.0. Please respect the original contest rules and attribution when using the problems.
- Downloads last month
- 5