Datasets:
problem_id stringlengths 1 3 | statement stringlengths 1.44k 21.4k | type stringclasses 2
values | time_limit stringclasses 14
values | memory_limit stringclasses 5
values | config_yaml stringlengths 89 381 | checker_file stringclasses 6
values | interactor_file stringclasses 3
values | num_test_inputs int64 1 293 | num_test_answers int64 1 293 | archive_path stringclasses 1
value | source_url stringlengths 110 112 | source_commit stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | # Pack the Polyominoes (Reflections Allowed)
## Problem
You are given a set of n polyominoes placed on a unit square grid. Each polyomino consists of between 1 and 10 unit cells, connected edge-to-edge (4-connectivity). Your task is to place all polyominoes—allowing **rotations, reflections, and translations**—into an... | default | 2s | 256m |
type: default
checker: chk.cc
# Time and memory limits still apply to the contestant's solution
time: 2s
memory: 256m
# The subtasks section works the same way
subtasks:
- score: 100
n_cases: 70 | chk.cc | null | 70 | 70 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/0 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
1 | Problem F: Treasure Packing
A dragon has terrorized the region for decades, breathing fire and stealing treasures. A hero has decided to steal back the treasures and return them to the community. However, they drastically underestimated the size of the dragon's hoard, bringing only a single 25 liter bag, only strong e... | default | 1s | 1024m | type: default
# The time limit is now 1 second.
time: 1s
memory: 1024m
# A custom checker is required for the special scoring.
checker: chk.cc
subtasks:
- score: 100
n_cases: 20 | chk.cc | null | 20 | 20 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/1 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
2 | Permutation
This is an interactive problem.
There is a hidden permutation of n. Recall that a permutation of n is a sequence where each integer from 1 to n (both inclusive) appears exactly once. Piggy wants to unravel the permutation with some queries.
Each query must consist of a sequence (not necessarily a permuta... | interactive | 4s | 1024m | # Set the problem type to interactive
type: interactive
# Specify the interactor source file
interactor: interactor.cc
# Time and memory limits still apply to the contestant's solution
time: 4s
memory: 1024m
# The subtasks section works the same way
subtasks:
- score: 100
n_cases: 10 # Looks for 1.in, 2.in, ..... | null | interactor.cc | 10 | 10 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/2 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
3 | This is an interactive question.
time limit: 10 seconds (up to 5 seconds for interactive library)
Space limitations: 1GB (up to 64MB for interactive library)
Description
Hope City is a city built on a floating island. At the edge of the floating island, there are n lamp sockets evenly distributed, forming a ring shap... | interactive | 10s | 1024m | type: interactive
time: 10s
memory: 1024m
# A custom checker is required for the special scoring.
interactor: interactor.cc
subtasks:
- score: 100
n_cases: 20 | null | interactor.cc | 20 | 20 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/3 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
4 | Problem: Matrix k-th Smallest (Interactive)
You are given an unknown n×n matrix a. You must find the k-th smallest value among all a[i][j].
You cannot read the matrix directly. Instead, you must interact with the judge using the protocol below.
The matrix satisfies:
for all i<=n and j<n: a{i,j}<=a{i,j+1}
for all i<n a... | interactive | 5s | 1024m | # Set the problem type to interactive
type: interactive
# Specify the interactor source file
interactor: interactor.cc
# Time and memory limits still apply to the contestant's solution
time: 5s
memory: 1024m
# The subtasks section works the same way
subtasks:
- score: 100
n_cases: 5 # Looks for 1.in, 2.in, ...... | null | interactor.cc | 5 | 5 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/4 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
5 | Hamiltonian Path Challenge
Given a directed graph with n vertices and m edges, find a path visiting as
many distinct vertices as possible. Vertices may not be repeated. Every
consecutive pair must be a directed edge in the graph.
Input
The first line contains n and m.
The second line contains ten legacy integers. Rea... | default | 4s | 512m | type: default
time: 4s
memory: 512m
checker: chk.cc
cheker_type: SPJ
subtasks:
- score: 100
n_cases: 10 | chk.cc | null | 10 | 10 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/5 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
6 | worldmap
Day 1 Tasks
English (ISC)
World Map
Mr. Pacha, a Bolivian archeologist, discovered an ancient document near Tiwanaku that describes
the world during the Tiwanaku Period (300-1000 CE). At that time, there were N countries,
numbered from 1 to N.
In the document, there is a list of M different pairs of adjacent co... | default | 1s | 2048m | type: default
time: 1s
memory: 2048m
subtasks:
- score: 100
n_cases: 10
checker: chk.cc
checker_type: testlib
filename: std.cc | chk.cc | null | 10 | 10 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/6 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
7 | Build a Computer
Input file: standard input
Output file: standard output
Time limit: 1 second
Memory limit: 1024 megabytes
You want to build a computer to achieve a specific functionality: Given an integerx, determine whether
x lies within the interval[L, R]. To accomplish this, you designed a directed acyclic graph (DAG)... | default | 1s | 1024m | type: default
time: 1s
memory: 1024m
subtasks:
- score: 100
n_cases: 1
checker: chk.cc
checker_type: testlib
filename: std.cc | chk.cc | null | 10 | 10 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/7 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
8 | The Empress
Capoo invented an interesting language named Push-Pop. This language is an interpreted language. The interpreter starts with an empty stack with infinite capacity and reads the first instruction of the custom program. There are only two kinds of instructions in this language:
POP a GOTO x PUSH b GOTO y
I... | default | 2s | 1024m | # Set the problem type to interactive
type: default
# Specify the interactor source file
interactor: chk.cc
# Time and memory limits still apply to the contestant's solution
time: 2s
memory: 1024m
# The subtasks section works the same way
subtasks:
- score: 100
n_cases: 100 # Looks for 1.in, 2.in, ... 5.in | null | chk.cc | 100 | 100 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/8 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
9 | Time limit:1 second Memory limit:1024 megabytes
Bobo is given a tree T = (V, E) of n vertices, where there is a number pi on vertex i initially, and p1, p2,..., pn is a permutation of 1 to n, meaning that all integers from 1 to n appear exactly once in p1, p2, ..., pn.
In each operation, Bobo can select a matching M... | default | 1s | 1024m | type: default
time: 1s
memory: 1024m
# A custom checker is required for the special scoring.
checker: chk.cc
subtasks:
- score: 100
n_cases: 20 | chk.cc | null | 20 | 20 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/9 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
10 | Problem: Tree distance
Time limit: 2 second
Memory limit: 512 MB
This is an interactive problem.
Little Cyan Fish has a weighted tree of n verticies generated in the following way:
- First, generate a random labeled tree: uniformly randomly select from all nn−2 possible labeled trees.
- Then, independently assign r... | interactive | 2s | 512m | # Set the problem type to interactive
type: interactive
# Specify the interactor source file
interactor: interactor.cc
# Time and memory limits still apply to the contestant's solution
time: 2s
memory: 512m
# The subtasks section works the same way
subtasks:
- score: 100
n_cases: 10 # Looks for 1.in, 2.in, ...... | null | interactor.cc | 10 | 10 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/10 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
11 | # Palindrome Path
**Input file:** standard input
**Output file:** standard output
**Time limit:** 1 second
**Memory limit:** 256 megabytes
## Problem Description
Given an \( n \times m \) grid maze, each cell \((i,j)\) is either blank or blocked. George starts at cell \((sr,sc)\) and needs to visit all blank cells i... | default | 2s | 512m | type: default
time: 2s
memory: 512m
checker: chk.cc
cheker_type: testlib
subtasks:
- score: 100
n_cases: 10 | chk.cc | null | 10 | 10 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/11 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
13 | Time limit: 2 seconds
Memory limit: 1024 megabytes
This is an interactive problem.
A mischievous robot is navigating an infinitely large 2D grid. However, its movement is confined to the first quadrant, meaning its coordinates (x, y) must always satisfy x > 0 and y > 0. Initially, the robot is located at grid coordinat... | interactive | 2s | 1024m | type: interactive
time: 2s
memory: 1024m
# A custom checker is required for the special scoring.
checker: interactor.cc
subtasks:
- score: 100
n_cases: 10 | interactor.cc | null | 10 | 10 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/13 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
14 | Problem Statement
There are n vertices forming a simple cycle. It is guaranteed that the graph satisfies the following property:
- There exists a permutation p of length n such that for every i (1 ≤ i < n), the vertices p_i and p_{i+1} are adjacent in the graph, and also p_n and p_1 are adjacent.
At the beginning of... | interactive | 5s | 1024m | # Set the problem type to interactive
type: interactive
# Specify the interactor source file
interactor: interactor.cpp
# Time and memory limits still apply to the contestant's solution
time: 5s
memory: 1024m
# The subtasks section works the same way
subtasks:
- score: 100
n_cases: 10 # Looks for 1.in, 2.in, .... | null | interactor.cpp | 10 | 10 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/14 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
15 | Problem Statement
You are given a sequence p of length n, which is a permutation of the numbers 1, 2, ..., n.
Your goal is to make the permutation lexicographically as small as possible by performing a specific operation at most 4n times, and then minimize the number of operations needed to reach that.
More specifica... | default | 1s | 512m | type: default
# The time limit is now 1 second.
time: 1s
memory: 512m
# A custom checker is required for the special scoring.
checker: chk.cc
subtasks:
- score: 100
n_cases: 10 | chk.cc | null | 10 | 10 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/15 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
16 | Problem: Identify Chord
This is an interactive problem.
Grammy has an undirected cyclic graph of n (4 ≤ n ≤ 10^9) vertices numbered from 1 to n.
An undirected cyclic graph is a graph of n vertices and n undirected edges that form one cycle. Specifically, there is a bidirectional edge between vertex i and vertex ((i m... | interactive | 5s | 1024m | # Set the problem type to interactive
type: interactive
# Specify the interactor source file
interactor: interactor.cpp
# Time and memory limits still apply to the contestant's solution
time: 5s
memory: 1024m
# The subtasks section works the same way
subtasks:
- score: 100
n_cases: 10 # Looks for 1.in, 2.in, .... | null | interactor.cpp | 10 | 10 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/16 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
17 | Permutation (Interactive Problem)
Time limit: 10s
Memory limit: 1024MB
You are given an unknown permutation of length n. Your task is to determine the position of number n
in this permutation.
Interaction Protocol
--------------------
To help you find the position of n, you may ask queries of the following form:
? ... | interactive | 10s | 1024m | # Set the problem type to interactive
type: interactive
# Specify the interactor source file
interactor: interactor.cpp
# Time and memory limits still apply to the contestant's solution
time: 10s
memory: 1024m
# The subtasks section works the same way
subtasks:
- score: 100
n_cases: 10 # Looks for... | null | interactor.cpp | 10 | 10 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/17 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
22 | Problem C. A+B Problem
Input file: standard input
Output file: standard output
Time limit: 2 seconds
Memory limit: 1024 mebibytes
In the era of constructives and ad-hocs, what could be more sacrilegious than combining two query problems
into one?
KOI City consists of N intersections and N − 1 two-way roads. You can t... | default | 2s | 512m | type: default
time: 2s
memory: 512m
checker: checker.cpp
cheker_type: testlib
subtasks:
- score: 100
n_cases: 10 | checker.cpp | null | 10 | 10 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/22 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
23 | # A=B
**Input file:** standard input
**Output file:** standard output
**Time limit:** 1 second
**Memory limit:** 512 megabytes
Marisa has learned an interesting language called **A=B**. She finds that this language has the advantages of simple syntax, easy to learn and convenient to code.
Here is the user manual of ... | default | 2s | 512m | type: default
time: 2s
memory: 512m
checker: check.cpp
cheker_type: testlib
subtasks:
- score: 100
n_cases: 16
| check.cpp | null | 16 | 16 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/23 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
24 | Time limit: 1 seconds
Memory limit: 512 megabytes
Bobo has an n×n symmetric matrix C consisting of zeros and ones. For a permutation p_1, ..., p_n of 1, ..., n, let c_i=(C_{p_i, p_{i+1}} for 1 ≤ i < n, C_{p_n, p_1} for i = n).
The permutation p is almost monochromatic if and only if the number of indices i (1 ≤ i < n) ... | default | 1s | 512m | type: default
time: 1s
memory: 512m
# A custom checker is required for the special scoring.
checker: chk.cc
subtasks:
- score: 100
n_cases: 10 | chk.cc | null | 10 | 10 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/24 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
25 | Time limit: 2 seconds
Memory limit: 512 megabytes
This is an interactive problem, where your program and the judge interact via standard input and output.
In the kingdom of Duloc, Lord Farquaad is developing a network of watchtowers to monitor every corner of his land. He has a map of towers and the roads that connect ... | interactive | 2s | 512m | type: interactive
time: 2s
memory: 512m
# A custom checker is required for the special scoring.
checker: interactor.cc
subtasks:
- score: 100
n_cases: 10 | interactor.cc | null | 10 | 10 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/25 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
26 | OgreSort
You need to sort a permutation v of length n. All elements of the permutation are indexed from 1 to n.
The only permitted type of move allows you to take an element from some position x and insert it at
another position y, shifting all elements in between by one. The cost of such a move is y.
Formally, a move... | default | 2s | 512m | type: default
time: 2s
memory: 512m
checker: chk.cc
subtasks:
- score: 100
n_cases: 10 | chk.cc | null | 10 | 10 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/26 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
27 | # Problem
You are given an n by m grid. You want to place as many black points (cells) as possible so that no four of them form the four corners of an axis-parallel rectangle.
Formally, if you place black points at positions (r, c) with 1 ≤ r ≤ n and 1 ≤ c ≤ m, your set S of chosen positions must not contain four dis... | default | 1s | 512m | type: default
# The time limit is now 1 second.
time: 1s
memory: 512m
# A custom checker is required for the special scoring.
checker: chk.cc
subtasks:
- score: 100
n_cases: 10 | chk.cc | null | 10 | 10 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/27 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
28 | Hacking the Project
Input file: standard input
Output file: standard output
Time limit: 1 second
Memory limit: 512 mebibytes
This is an interactive problem.
Lewis is one of the developers of the new programming language called DiverC. The main feature of the
program written in this language is that the code consists of p... | interactive | 1s | 512m | type: interactive
time: 1s
memory: 512m
subtasks:
- score: 100
n_cases: 10
interactor: interactor.cc
checker_type: testlib | null | interactor.cc | 10 | 10 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/28 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
30 | This is an interactive problem.
You are given a tree of n
nodes with node 1
as its root node.
There is a hidden mole in one of the nodes. To find its position, you can pick an integer x
(1≤x≤n
) to make an inquiry to the jury. Next, the jury will return 1
when the mole is in subtree x
. Otherwise, the judge will ... | interactive | 4s | 256m | type: interactive
time: 4s
memory: 256m
subtasks:
- score: 100
n_cases: 10
interactor: interactor.cc
checker_type: testlib | null | interactor.cc | 10 | 10 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/30 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
33 | Permutation (Modified Version)
Time Limit: 5 s
Memory Limit: 1024 MB
The Pharaohs use the relative movement and gravity of planets to accelerate their spaceships. Suppose a spaceship will pass by some planets with orbital speeds in order. For each planet, the Pharaohs' scientists can choose whether to accelerate the ... | default | 5s | 1024m | type: default
time: 5s
memory: 1024m
subtasks:
- score: 100
n_cases: 6
checker: checker.cpp
checker_type: testlib | checker.cpp | null | 6 | 6 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/33 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
35 | Language: C++ only
Time limit per test: 5 seconds
Memory limit per test: 1024 megabytes
This is an interactive problem.
There is a hidden array a containing all the numbers from 1 to n, and all of them appear twice except one (which only appears once).
You can ask queries in the following format, where S is a subse... | interactive | 5s | 1024m | # Set the problem type to interactive
type: interactive
# Specify the interactor source file
interactor: interactor.cpp
# Time and memory limits still apply to the contestant's solution
time: 5s
memory: 1024m
# The subtasks section works the same way
subtasks:
- score: 100
n_cases: 10 # Looks for ... | null | interactor.cpp | 10 | 10 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/35 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
36 | Hack!
This is an I/O interactive problem. I/O interaction refers to interactive problems, where the program communicates with a special judge during execution instead of producing all output at once. In these problems, the program sends queries (output) to the judge and must immediately read responses (input) before c... | interactive | 3s | 1024m | # Set the problem type to interactive
type: interactive
# Specify the interactor source file
interactor: interactor.cpp
# Time and memory limits still apply to the contestant's solution
time: 3s
memory: 1024m
# The subtasks section works the same way
subtasks:
- score: 100
n_cases: 32 # Looks for 1.in, 2.in, .... | null | interactor.cpp | 32 | 32 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/36 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
40 | Interactive RBS
This is an I/O interactive problem. I/O interaction refers to interactive problems, where the program communicates with a special judge during execution instead of producing all output at once. In these problems, the program sends queries (output) to the judge and must immediately read responses (input... | interactive | 2s | 256m | # Set the problem type to interactive
type: interactive
# Specify the interactor source file
interactor: interactor.cpp
# Time and memory limits still apply to the contestant's solution
time: 2s
memory: 256m
# The subtasks section works the same way
subtasks:
- score: 100
n_cases: 50 # Looks for 1.in, 2.in, ..... | null | interactor.cpp | 50 | 50 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/40 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
41 | # Problem
Anton owns \(n\) umbrellas, each labeled with a distinct integer from \(1\) to \(n\). He wants to arrange some of them in a line to form a brilliant sequence of umbrellas (BSU).
A sequence of \(k\) umbrellas with numbers \(a_1, a_2, \ldots, a_k\) is a BSU if:
- \(a_i > a_{i-1}\) for all \(2 \le i \le k\);
... | default | 1s | 512m | type: default
# The time limit is now 1 second.
time: 1s
memory: 512m
# A custom checker is required for the special scoring.
checker: chk.cc
subtasks:
- score: 100
n_cases: 10 | chk.cc | null | 10 | 10 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/41 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
42 | Problem
You are given an integer n. Place n unit squares (side length 1) inside an axis-parallel square container of side length L so that:
- Every unit square lies entirely inside the container.
- Unit squares have no common interior points (touching edges/corners is allowed).
- Each unit square may be rotated by an a... | default | 1s | 512m | type: default
# The time limit is now 1 second.
time: 1s
memory: 512m
# A custom checker is required for the special scoring.
checker: chk.cc
subtasks:
- score: 100
n_cases: 20 | chk.cc | null | 20 | 20 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/42 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
43 | Bigger Sokoban 40k
Time Limit: 2 seconds
Memory Limit: 1024 MB
Problem
Sokoban is a famous puzzle game where a player moves around in a grid and pushes boxes to their storage locations.
Bigger Sokoban is a variation of Sokoban where both the boxes and the storage locations are larger than 1×1.
In this version, both b... | default | 2s | 1024m | type: default
time: 2s
memory: 1024m
subtasks:
- score: 100
n_cases: 1
checker: chk.cpp
checker_type: testlib | chk.cpp | null | 1 | 1 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/43 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
44 | Problem: Traveling Santa with Carrot Constraint
Story
Rudolph plans to shorten Santa’s route by choosing a better order to visit cities. Every 10th step takes 10% longer unless that step starts from a prime-numbered city. Your task is to output a valid tour and compete on how much you improve over a strengthened basel... | default | 2.5s | 512m | type: default
# The time limit is now 1 second.
time: 2.5s
memory: 512m
# A custom checker is required for the special scoring.
checker: chk.cc
subtasks:
- score: 100
n_cases: 20 | chk.cc | null | 20 | 20 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/44 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
45 | Problem: Balanced Graph Partitioning (DIMACS10-style, EC & CV)
Overview
--------
You are given an undirected, unweighted graph G = (V, E) and an integer k (a power of two).
Assign each vertex to one of k parts so that:
1) the balance constraint is satisfied, and
2) two quality measures are minimized with equal imp... | default | 1s | 512m | type: default
time: 1s
memory: 512m
checker: chk.cc
subtasks:
- score: 1
n_cases: 15
| chk.cc | null | 15 | 15 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/45 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
46 | Title: Job Shop Scheduling (JSPLIB-style) — Open Optimization Track
Overview
--------
You are given a classic Job Shop Scheduling Problem (JSSP). There are J jobs and M machines.
Each job must be processed exactly once on each machine, in a job-specific order (its *route*).
Processing is non-preemptive. A machine can ... | default | 1s | 512m | type: default
# The time limit is now 1 second.
time: 1s
memory: 512m
# A custom checker is required for the special scoring.
checker: chk.cc
subtasks:
- score: 1
n_cases: 15
| chk.cc | null | 15 | 15 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/46 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
47 | 2D Rectangular Knapsack with (Optional) 90° Rotations — Official Problem Statement (Hard Set)
============================================================================================
Summary
-------
You are given a single rectangular **bin** and several **item types**. Each item type t has
dimensions (w_t, h_t), p... | default | 1s | 512m | type: default
time: 1s
memory: 512m
checker: chk.cc
subtasks:
- score: 1
n_cases: 15
| chk.cc | null | 15 | 15 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/47 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
48 | Sphere Packing in a Cube (Optimization)
You are given an integer n. Place n pairwise-disjoint congruent solid spheres inside the unit cube [0, 1]^3 so that the common radius is as large as possible. You do not need to output the radius explicitly; the checker infers the largest valid common radius from your centers.
... | default | 1s | 512m | type: default
time: 1s
memory: 512m
checker: chk.cc
subtasks:
- score: 1
n_cases: 15
| chk.cc | null | 15 | 15 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/48 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
50 | Time Limit: 10s
Memory Limit: 1024M
Firstly, you are given two integers n (1 <= n <= 400) and m (1 <= m <= 4000), which means that you have n elements and m sets.
After that, there are m integers, the i-th integer is the cost of choosing the i-th set.
After that, for the i-th element, firstly input an integer k_i, w... | default | 10s | 1024m | type: default
time: 10s
memory: 1024m
subtasks:
- score: 100
n_cases: 40
checker: chk.cc
checker_type: testlib
filename: std.cc | chk.cc | null | 40 | 40 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/50 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
52 | Geemu
This is an interactive problem.
Little A has an interesting game.
Initially, there is a permutation p of length n. You don't know the permutation p, and you need to determine the final p through the following operations:
1. Query the number of value-contiguous segments in a given interval.
2. Swap two elements ... | interactive | 2s | 512m | type: interactive
interactor: interactor.cc
time: 2s
memory: 512m
subtasks:
- score: 100
n_cases: 9 | null | interactor.cc | 9 | 9 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/52 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
53 | Problem: G2. Inter Active (Hard Version)
Time limit: 2 seconds
Memory limit: 512 MB
This is the hard version of the problem. The difference between the versions is that in this version, you can make at most 10 * n queries. You can hack only if you solved all versions of this problem.
Ali loved Bahamin's gift (from ... | interactive | 2s | 512m | # Set the problem type to interactive
type: interactive
# Specify the interactor source file
interactor: interactor.cc
# Time and memory limits still apply to the contestant's solution
time: 2s
memory: 512m
# The subtasks section works the same way
subtasks:
- score: 100
n_cases: 1 # Looks for 1.in, 2.in, ... ... | null | interactor.cc | 1 | 1 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/53 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
54 | Problem: Centroid Guess
Time limit: 4 seconds
Memory limit: 512 MB
This is an interactive problem.
There is an unknown tree consisting of n nodes, which has exactly one centroid.
You only know n at first, and your task is to find the centroid of the tree.
You can ask the distance between any two vertices. However,... | interactive | 4s | 512m | # Set the problem type to interactive
type: interactive
# Specify the interactor source file
interactor: interactor.cc
# Time and memory limits still apply to the contestant's solution
time: 4s
memory: 512m
# The subtasks section works the same way
subtasks:
- score: 100
n_cases: 10 # Looks for 1.in, 2.in, ...... | null | interactor.cc | 10 | 10 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/54 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
57 | time limit per test: 5 seconds
memory limit per test: 1024 megabytes
**Submissions are only allowed in C++ language.**
This problem is interactive.
Baudelaire is very rich, so he bought a tree of size n, rooted at some arbitrary node. Additionally,
every node has a value of 1 or -1.
Cow the Nerd saw the tree and fe... | interactive | 5s | 1024m | # Set the problem type to interactive
type: interactive
# Specify the interactor source file
interactor: interactor.cpp
# Time and memory limits still apply to the contestant's solution
time: 5s
memory: 1024m
# The subtasks section works the same way
subtasks:
- score: 100
n_cases: 15 # Looks for ... | null | interactor.cpp | 15 | 15 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/57 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
58 | Inverse Counting Path
Walk Alone is an expert in dynamic programming, but he gets bored with traditional dynamic programming problem like counting paths on a 2-dimension grid, so he wants to do it in reverse. The problem he raised is as follows:
On a 2-dimension grid of size n*n, originally you are on grid (1,1). The... | default | 1s | 512m | # Set the problem type to interactive
type: default
# Specify the interactor source file
interactor: chk.cc
# Time and memory limits still apply to the contestant's solution
time: 1s
memory: 512m
# The subtasks section works the same way
subtasks:
- score: 100
n_cases: 100 # Looks for 1.in, 2.in, ... 5.in | null | chk.cc | 100 | 100 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/58 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
59 | # Limited Shuffle Restoring
**Input file:** standard input
**Output file:** standard output
**Time limit:** 3 seconds
**Memory limit:** 512 meblbytes
**This is an interactive problem.**
Bobo had an array \\( a \\), initially equal to \\((1,2,\ldots,n)\\). He did the following operations with the array.
- For each \... | interactive | 3s | 512m | type: interactive
time: 3s
memory: 512m
interactor: interactor.cpp
interactor_type: testlib
subtasks:
- score: 100
n_cases: 10 | null | interactor.cpp | 10 | 10 | problems.tar.gz | https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/59 | aec2aff05f3ece1b150c7c40827b0cea449e0b28 |
Frontier-CS 1.1 (FCS1.1): Algorithmic Problems
This is the algorithmic problem dataset for Frontier-CS 1.1 (FCS1.1). It packages 180 algorithmic problems from the Frontier-CS repository, including their original statements, evaluation configurations, checkers or interactors, and released test data. The problems cover challenging algorithm design and optimization tasks, with task-specific evaluation and scoring.
The dataset contains 107 default problems and 73 interactive problems.
The source problems are available in the repository's
algorithmic/problems
directory.
Load the problem table
from datasets import load_dataset
problems = load_dataset("FrontierCS2/FrontierCS-v1.1", split="test")
print(len(problems)) # 180
print(problems[0]["problem_id"]) # "0"
print(problems[0]["statement"])
There is one row per problem, sorted by numeric problem ID. IDs are stored as
strings and are not consecutive. The single test split is a packaging choice
for benchmark use, not a train/test partition provided by the upstream project.
All bundled test files are already public in the source repository.
Data fields
| Field | Type | Description |
|---|---|---|
problem_id |
string | Original problem directory name. |
statement |
string | Complete, unchanged UTF-8 content of statement.txt. |
type |
string | default or interactive, copied from config.yaml. |
time_limit |
string | Solution time limit in the source notation, such as 2s. |
memory_limit |
string | Solution memory limit in the source notation, such as 256m. |
config_yaml |
string | Complete, unchanged evaluation configuration. |
checker_file |
string or null | Value of the source checker key, when present. |
interactor_file |
string or null | Value of the source interactor key, when present. |
num_test_inputs |
int64 | Number of testdata/*.in files. |
num_test_answers |
int64 | Number of testdata/*.ans files. |
archive_path |
string | problems.tar.gz, the single archive containing all 180 problems. |
source_url |
string | Source problem directory URL recorded during packaging. |
source_commit |
string | Source Git commit recorded for data provenance. |
The two filename fields expose the original YAML keys without reinterpretation. For evaluation, use the full configuration and the upstream runner.
Full problem files
The single archive problems.tar.gz contains
all 180 problems and every tracked file from their source directories,
including test data, checkers or interactors, supplied examples, generators,
and other auxiliary files. Archive members retain paths under
algorithmic/problems/<problem_id>/.
from huggingface_hub import hf_hub_download
archive = hf_hub_download(
repo_id="FrontierCS2/FrontierCS-v1.1",
repo_type="dataset",
filename="problems.tar.gz",
)
print(archive)
To extract all problems with Python 3.12 or later:
import tarfile
with tarfile.open(archive, "r:gz") as bundle:
bundle.extractall("frontiercs-data", filter="data")
The Parquet table contains statements and metadata. Download problems.tar.gz
once to obtain the complete problem bank. Loading the table alone does not
download the archive.
README.md
LICENSE
LICENSE-MIT
data/test.parquet
problems.tar.gz
metadata/files.jsonl
metadata/provenance.json
metadata/files.jsonl lists the original path, byte size, and SHA-256 of all
12,299 source files. metadata/provenance.json records packaging provenance,
dataset statistics, and archive checksums.
The source directories contain 5,861 .in files and 5,861 .ans files;
other auxiliary files are also retained.
Evaluation
Use this dataset to browse tasks, construct prompts, and retrieve the released problem assets. Evaluation requires the Frontier-CS evaluation software and its documented runtime dependencies; the archive alone is not a complete judge installation. Follow the installation and evaluation instructions in the upstream repository.
For example, after installing the upstream project and configuring its judge:
frontier eval algorithmic 0 solution.cpp
Interactive problems require the provided interaction protocol and interactor. Scoring is problem-specific: consult each statement, configuration, and checker or interactor. Test answer files are evaluation assets, not a collection of canonical solution programs. Example solutions are included only where they exist in the source directory.
Benchmark use
Because the problems and evaluation assets are public, benchmark results should describe any use of these materials for training, tuning, or iterative feedback. This release does not introduce a hidden evaluation set or new reference scores.
License
The results, patches and traces are released under CC BY 4.0. Code from the upstream research artifacts that appears inside patches or traces stays under its own license.
Citation
@misc{mang2026frontiercs2,
title = {{FrontierCS} 2: A Benchmark for Computer Science {R\&D}},
author = {Qiuyang Mang and Wenhao Chai and Runyuan He and Dongruixuan Li and Zihan Zheng and
Yujun He and Xuanyi Zhou and Hao Wang and Siddhant Ray and Bo Peng and Ruyi Ji and
Shuo Yang and Haocheng Xi and Boru Chen and Xinyang David Han and Melissa Pan and
Mayank Mishra and Boxi Yu and Sijia Liu and Kerem Akillioglu and Yi Pan and
Zirui Wang and Mert Cemri and Diogo Antunes and Yichuan Wang and
Aiwei Ivy Zhang and Zhenyang Chen and Qizheng Zhang and Kaiyuan Liu and
Wenyuan Huang and Sherry Ruan and Shu Liu and Dacheng Li and Zerui Cheng and
Zeyu Shen and Shang Zhou and Hanfei Chen and Yuzhong Zhang and Bohan Lyu and
Qu Ao and Han Zheng and Chonghe Jiang and Jingzhuo Hu and Xiaokun Chen and
Kunjun Li and Zhiqing Zhong and Haoye Tian and Tong Zhao and Yunzhong He and
Hanchen Li and Ofir Press and Jiantao Jiao and Kunle Olukotun and
Karthik R. Narasimhan and Jingbo Shang and Koushik Sen and Matei Zaharia and
Alex Dimakis and Ion Stoica and Joseph E. Gonzalez and Alvin Cheung},
year = {2026},
url = {https://frontier-cs.org/}
}
and FrontierCS:
@inproceedings{mang2026frontiercs,
title = {{FrontierCS}: Evolving Challenges for Evolving Intelligence},
author = {Mang, Qiuyang and Chai, Wenhao and Li, Zhifei and others},
booktitle = {Proceedings of the International Conference on Machine Learning},
year = {2026}
}
- Downloads last month
- 26