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
152
Problem Statement -------- AtCoder Inc. operates a food delivery service, AtCoder Foods, that leisurely delivers food that tastes good even if it gets cold. This service receives a large number of delivery orders in advance, and processes multiple deliveries simultaneously to improve efficiency. The current service are...
default
10s
256m
type: default checker: chk.cc # Time and memory limits still apply to the contestant's solution time: 10s memory: 256m # The subtasks section works the same way subtasks: - score: 100 n_cases: 100
chk.cc
null
100
100
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/152
aec2aff05f3ece1b150c7c40827b0cea449e0b28
153
Story -------- AtCoder, a big tech company, has many offices. In order to securely share super-secret information of problem statements for future contests, we decided to set up private lines using quantum cryptography between the offices. There are several candidates for office pairs that can be connected by private l...
interactive
10s
256m
 type: interactive interactor: interactor.cc # Time and memory limits still apply to the contestant's solution time: 10s memory: 256m # The subtasks section works the same way subtasks: - score: 100 n_cases: 75
null
interactor.cc
75
75
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/153
aec2aff05f3ece1b150c7c40827b0cea449e0b28
154
Story -------- AtCoder's CEO, Takahashi, loves animals and has a number of pets running free in the AtCoder office. AtCoder's employees have trouble with the pets interrupting their work, so they have decided to place partitions in the office to create a space where pets cannot come in. Please create as large a space a...
interactive
10s
256m
type: interactive interactor: interactor.cc # Time and memory limits still apply to the contestant's solution time: 10s memory: 256m # The subtasks section works the same way subtasks: - score: 100 n_cases: 75
null
interactor.cc
75
75
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/154
aec2aff05f3ece1b150c7c40827b0cea449e0b28
155
Story -------- A map like in the figure below is given. Takahashi's home is located in the square with the red circle, and AtCoder's office is located in the square with the blue circle. He memorizes his commuting route to the office as a string of characters such as DRDR, which means Down, Right, Down, and Right. Beca...
default
10s
256m
type: default checker: chk.cc # Time and memory limits still apply to the contestant's solution time: 10s memory: 256m # The subtasks section works the same way subtasks: - score: 100 n_cases: 100
chk.cc
null
100
100
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/155
aec2aff05f3ece1b150c7c40827b0cea449e0b28
156
Story -------- Takahashi, who loves loop lines, is playing with a toy train. As shown in the figure below, this toy consists of square tiles containing railroad lines. By rotating the tiles, he can connect lines and play with toy trains running on the lines. Because Takahashi has two toy trains, please create two large...
default
10s
256m
type: default checker: chk.cc # Time and memory limits still apply to the contestant's solution time: 10s memory: 256m # The subtasks section works the same way subtasks: - score: 100 n_cases: 100
chk.cc
null
100
100
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/156
aec2aff05f3ece1b150c7c40827b0cea449e0b28
157
Story -------- Takahashi loves puzzles and is playing with the following famous sliding puzzle. > There are $N^2-1$ tiles on an $N \times N$ board. > There is a single empty square, and you can slide an adjacent tile in any of the four directions into the empty square. > Some picture is divided into each tile. By repea...
default
10s
256m
type: default checker: chk.cc # Time and memory limits still apply to the contestant's solution time: 10s memory: 256m # The subtasks section works the same way subtasks: - score: 100 n_cases: 75
chk.cc
null
75
75
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/157
aec2aff05f3ece1b150c7c40827b0cea449e0b28
158
Story -------- To celebrate the 10th anniversary of AtCoder Inc., we plan to hold an anniversary party with users invited. At the party, CEO Takahashi will cut a giant cake with a knife in straight lines and distribute pieces to the attendees. There are many strawberries on the cake, and he wants to distribute a piece ...
default
10s
256m
type: default checker: chk.cc # Time and memory limits still apply to the contestant's solution time: 10s memory: 256m # The subtasks section works the same way subtasks: - score: 100 n_cases: 100
chk.cc
null
100
100
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/158
aec2aff05f3ece1b150c7c40827b0cea449e0b28
159
Problem Statement -------- RectJoin is the following single-player game played with square grid paper and pencil. ![example](./images/example.gif) Let $(0, 0)$ be the coordinates of the lower left corner of the grid paper, with the $x$-axis to the right and the $y$-axis to the top. The coordinates of the upper right ...
default
10s
256m
 type: default checker: chk.cc # Time and memory limits still apply to the contestant's solution time: 10s memory: 256m # The subtasks section works the same way subtasks: - score: 100 n_cases: 75
chk.cc
null
75
75
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/159
aec2aff05f3ece1b150c7c40827b0cea449e0b28
160
Story -------- AtCoder's CEO Takahashi prepares for Halloween tomorrow. At AtCoder's Halloween party, Takahashi will dress up in disguise and receive a piece of candy from 100 employees in turn by saying, "trick or treat!" He prepares a square box that can contain $10\times 10$ pieces of candy in a grid pattern, and ea...
interactive
10s
256m
 type: interactive interactor: interactor.cc # Time and memory limits still apply to the contestant's solution time: 10s memory: 256m # The subtasks section works the same way subtasks: - score: 100 n_cases: 75
null
interactor.cc
75
75
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/160
aec2aff05f3ece1b150c7c40827b0cea449e0b28
161
Story -------- AtCoder regularly broadcasts its official live broadcast "A-Da-Coder" on the Internet to provide the latest news and to interact with users. To reach a wider audience, CEO Takahashi decided to build a TV network to broadcast the live stream to all residents of AA City. The TV network of AA city is repre...
default
10s
256m
 type: default checker: chk.cc # Time and memory limits still apply to the contestant's solution time: 10s memory: 256m # The subtasks section works the same way subtasks: - score: 100 n_cases: 75
chk.cc
null
75
75
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/161
aec2aff05f3ece1b150c7c40827b0cea449e0b28
162
Problem Statement -------- There are $N(N+1)/2$ balls arranged in an $N$-tiered pyramid as shown in the figure below. Let $(0, 0)$ be the coordinates of the ball at the top of the pyramid, and let $(x,y)$ be the coordinates of the $y (0\leq y\leq x)$-th ball from the left in the $x (0\leq x-1)$-th tier from the top. ...
default
10s
256m
type: default checker: chk.cc # Time and memory limits still apply to the contestant's solution time: 10s memory: 256m # The subtasks section works the same way subtasks: - score: 100 n_cases: 150
chk.cc
null
150
150
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/162
aec2aff05f3ece1b150c7c40827b0cea449e0b28
163
Story -------- Mr. Takahashi, the mayor of Takahashi City, decided to draw a map of Takahashi City on the floor of the city hall lobby using colored square tiles. Takahashi City is divided into several wards, and in this map, each ward should be represented as a set of connected tiles of the same color. He commissioned...
default
10s
256m
type: default checker: chk.cc # Time and memory limits still apply to the contestant's solution time: 10s memory: 256m # The subtasks section works the same way subtasks: - score: 100 n_cases: 150
chk.cc
null
150
150
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/163
aec2aff05f3ece1b150c7c40827b0cea449e0b28
164
Story -------- AtCoder has $n$ cardboard boxes in a warehouse, which are divided into $m$ vertical stacks. Each box is labeled with a unique number from $1,\cdots,n$, and CEO Takahashi wants to carry them out of the warehouse one by one in ascending order of their numbers. In order to carry out a box, he needs to move ...
default
10s
256m
type: default checker: chk.cc # Time and memory limits still apply to the contestant's solution time: 10s memory: 256m # The subtasks section works the same way subtasks: - score: 100 n_cases: 150
chk.cc
null
150
150
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/164
aec2aff05f3ece1b150c7c40827b0cea449e0b28
165
Story -------- In Japan, a traditional calligraphy contest known as 'Kakizome Taikai' is held during the New Year. AtCoder's Kakizome Taikai is an event in which, instead of writing with a brush, each employee types on a keyboard with a special key layout and outputs his/her favorite string on a PC screen for presentat...
default
10s
256m
type: default checker: chk.cc # Time and memory limits still apply to the contestant's solution time: 10s memory: 256m # The subtasks section works the same way subtasks: - score: 100 n_cases: 150
chk.cc
null
150
150
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/165
aec2aff05f3ece1b150c7c40827b0cea449e0b28
166
Story -------- AtCoder frequently hosts onsite contests and has decided to build its own contest venue. The planned construction site is in a mountain area, and the ground must first be leveled. Leveling will involve using a dump truck, which incurs costs for loading, unloading, and transporting soil. Determine the met...
default
10s
256m
type: default checker: chk.cc # Time and memory limits still apply to the contestant's solution time: 10s memory: 256m # The subtasks section works the same way subtasks: - score: 100 n_cases: 150
chk.cc
null
150
150
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/166
aec2aff05f3ece1b150c7c40827b0cea449e0b28
167
Story -------- Takahashi is a skilled purse seine fisher. His fishing boat is equipped with state-of-the-art sonar, allowing him to accurately determine the positions of fish within the fishing area. Additionally, the boat is capable of high-speed movement, enabling him to assume that fish remain stationary while he se...
default
10s
256m
type: default checker: chk.cc # Time and memory limits still apply to the contestant's solution time: 10s memory: 256m # The subtasks section works the same way subtasks: - score: 100 n_cases: 150
chk.cc
null
150
150
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/167
aec2aff05f3ece1b150c7c40827b0cea449e0b28
168
Story -------- At the AtCoder office, preparations are underway for a slightly belated Christmas party. CEO Takahashi has decided to go cut down rooted trees to use as the Christmas trees. Each vertex in a rooted tree has a **beauty value**, and the party venue looks more attractive if beautiful vertices are located ...
default
10s
256m
type: default checker: chk.cc # Time and memory limits still apply to the contestant's solution time: 10s memory: 256m # The subtasks section works the same way subtasks: - score: 100 n_cases: 150
chk.cc
null
150
150
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/168
aec2aff05f3ece1b150c7c40827b0cea449e0b28
169
Story -------- Today, on February 2nd, the traditional Japanese event **Setsubun** is being celebrated in Japan. Setsubun is a ritual to ward off evil spirits and invite good fortune at the turning of the seasons. People chant "Oni wa soto!" ("Demons out!") while throwing roasted soybeans to drive away evil spirits (on...
default
10s
256m
type: default checker: chk.cc # Time and memory limits still apply to the contestant's solution time: 10s memory: 256m # The subtasks section works the same way subtasks: - score: 100 n_cases: 150
chk.cc
null
150
150
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/169
aec2aff05f3ece1b150c7c40827b0cea449e0b28
170
Story -------- A company is currently aiming to create a comfortable working environment. It has decided to clean the office every week starting this April, when new employees join the company. However, assigning cleaning duties is not easy. There are various constraints, for example, the duty should not be concentrate...
default
10s
256m
type: default checker: chk.cc # Time and memory limits still apply to the contestant's solution time: 10s memory: 256m # The subtasks section works the same way subtasks: - score: 100 n_cases: 150
chk.cc
null
150
150
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/170
aec2aff05f3ece1b150c7c40827b0cea449e0b28
171
Problem Statement -------- There is a skating rink consisting of $N \times N$ squares. Let $(0, 0)$ be the coordinates of the top-left square, and $(i, j)$ be the coordinates of the square located $i$ squares down and $j$ squares to the right from there. All squares outside the $N \times N$ area are covered with blocks...
default
10s
256m
 type: default checker: chk.cc # Time and memory limits still apply to the contestant's solution time: 10s memory: 256m # The subtasks section works the same way subtasks: - score: 100 n_cases: 75
chk.cc
null
75
75
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/171
aec2aff05f3ece1b150c7c40827b0cea449e0b28
174
# Graph 3-Coloring ## Problem You are given an undirected graph with n vertices and m edges. Your task is to assign each vertex one of three colors. The objective is to minimize the number of conflicting edges. An edge is conflicting if its two endpoints have the same color. ## Input Format - Line 1: two integers ...
default
1s
1024m
type: default time: 1s memory: 1024m subtasks: - score: 100 n_cases: 30 checker: chk.cc checker_type: testlib filename: std.cc
chk.cc
null
30
30
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/174
aec2aff05f3ece1b150c7c40827b0cea449e0b28
175
# 3-SAT ## Problem You are given a Boolean formula in CNF form, where each clause contains exactly three literals. Your task is to assign truth values to variables to satisfy as many clauses as possible. ## Input Format - Line 1: two integers n and m (1 ≤ n ≤ 3000, 0 ≤ m ≤ 2000000) - Next m lines: three integers ...
default
1s
1024m
type: default time: 1s memory: 1024m subtasks: - score: 100 n_cases: 30 checker: chk.cc checker_type: testlib filename: std.cc
chk.cc
null
30
30
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/175
aec2aff05f3ece1b150c7c40827b0cea449e0b28
176
# 3-SAT ## Problem You are given a Boolean formula in CNF form, where each clause contains exactly three literals. Your task is to assign truth values to variables to satisfy as many clauses as possible. ## Input Format - Line 1: two integers n and m (1 ≤ n ≤ 1000, 0 ≤ m ≤ 10000) - Next m lines: three integers a ...
default
1s
1024m
type: default time: 1s memory: 1024m subtasks: - score: 100 n_cases: 30 checker: chk.cc checker_type: testlib filename: std.cc
chk.cc
null
30
30
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/176
aec2aff05f3ece1b150c7c40827b0cea449e0b28
177
# Graph 3-Coloring ## Problem You are given an undirected graph with n vertices and m edges. Your task is to assign each vertex one of three colors. The objective is to minimize the number of conflicting edges. An edge is conflicting if its two endpoints have the same color. ## Input Format - Line 1: two integers ...
default
1s
1024m
type: default time: 1s memory: 1024m subtasks: - score: 100 n_cases: 30 checker: chk.cc checker_type: testlib filename: std.cc
chk.cc
null
30
30
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/177
aec2aff05f3ece1b150c7c40827b0cea449e0b28
178
# 3-SAT ## Problem You are given a Boolean formula in CNF form, where each clause contains exactly three literals. Your task is to assign truth values to variables to satisfy as many clauses as possible. ## Input Format - Line 1: two integers n and m (1 ≤ n ≤ 50, 0 ≤ m ≤ 1000) - Next m lines: three integers a b c...
default
1s
1024m
type: default time: 1s memory: 1024m subtasks: - score: 100 n_cases: 20 checker: chk.cc checker_type: testlib filename: std.cc
chk.cc
null
20
20
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/178
aec2aff05f3ece1b150c7c40827b0cea449e0b28
182
# Vertex Cover Challenge ## Context You are given an undirected graph G = (V, E) with |V| = N vertices and |E| = M edges. You must select a subset of vertices S ⊆ V to form a Vertex Cover. A subset S is a valid vertex cover if and only if: for every edge {u, v} ∈ E, at least one of its endpoints is in S. (i.e., ...
default
2s
512m
type: default time: 2s memory: 512m subtasks: - score: 100 n_cases: 10 checker: checker.cc checker_type: testlib
checker.cc
null
10
10
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/182
aec2aff05f3ece1b150c7c40827b0cea449e0b28
183
# Maximum Independent Set Challenge ## Context You are given an undirected graph G = (V, E) with |V| = N vertices and |E| = M edges. You must select a subset of vertices S ⊆ V to form an **Independent Set**. A subset S is a valid independent set if and only if: for every pair of distinct vertices u, v ∈ S, there i...
default
2s
512m
type: default time: 2s memory: 512m subtasks: - score: 100 n_cases: 10 checker: checker.cc checker_type: testlib
checker.cc
null
10
10
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/183
aec2aff05f3ece1b150c7c40827b0cea449e0b28
186
# Graph Coloring Challenge ## Context You are given an undirected graph G = (V, E) with |V| = N vertices. Each vertex must be assigned a positive integer color. A coloring is valid if and only if: for every edge {u, v} ∈ E, color[u] ≠ color[v]. This is a heuristic optimization problem. You are NOT required to fin...
default
2s
512m
type: default time: 2s memory: 512m subtasks: - score: 100 n_cases: 10 checker: checker.cc checker_type: testlib
checker.cc
null
10
10
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/186
aec2aff05f3ece1b150c7c40827b0cea449e0b28
187
# Clique Cover Challenge ## Context You are given an undirected graph G = (V, E) with |V| = N vertices. Each vertex must be assigned a positive integer clique ID. Your output represents a clique cover in the form of a vertex partition: all vertices with the same ID must form a clique. A solution is valid if and onl...
default
2s
512m
type: default time: 2s memory: 512m subtasks: - score: 100 n_cases: 10 checker: checker.cc checker_type: testlib
checker.cc
null
10
10
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/187
aec2aff05f3ece1b150c7c40827b0cea449e0b28
188
# LCS Challenge (Approximation) ## Context You are given two large strings, S1 and S2, consisting of uppercase English letters and/or digits. Let |S1| = N and |S2| = M. You must construct a string Z that is a **common subsequence** of both S1 and S2. A string Z is a valid subsequence of S if Z can be obtained from ...
default
2s
512m
type: default time: 2s memory: 512m subtasks: - score: 100 n_cases: 9 checker: checker.cc checker_type: testlib
checker.cc
null
9
9
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/188
aec2aff05f3ece1b150c7c40827b0cea449e0b28
189
# Common-Subsequence Alignment Challenge ## Objective You are given two strings S1 and S2. Output an alignment transcript that maximizes the number K of equal-character matches. The matched characters form a common subsequence. The strings can be very large, so approximate alignments are accepted. ## Input Format Th...
default
3s
512m
type: default time: 3s memory: 512m subtasks: - score: 100 n_cases: 9 checker: checker.cc checker_type: testlib
checker.cc
null
9
9
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/189
aec2aff05f3ece1b150c7c40827b0cea449e0b28
192
# Max-Cut ## Problem You are given an undirected graph with n vertices and m edges. Your task is to partition the vertices into two sets to maximize the number of edges crossing the partition. An edge is a cut edge if its two endpoints are in different sets. ## Input Format - Line 1: two integers n and m (1 ≤ n ≤ ...
default
1s
1024m
type: default time: 1s memory: 1024m subtasks: - score: 100 n_cases: 30 checker: chk.cc checker_type: testlib filename: std.cc
chk.cc
null
30
30
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/192
aec2aff05f3ece1b150c7c40827b0cea449e0b28
193
# Max-2-SAT ## Problem You are given a Boolean formula in CNF form, where each clause contains exactly two literals. Your task is to assign truth values to variables to satisfy as many clauses as possible. ## Input Format - Line 1: two integers n and m (1 ≤ n ≤ 1000, 0 ≤ m ≤ 40000) - Next m lines: two integers a ...
default
1s
1024m
type: default time: 1s memory: 1024m subtasks: - score: 100 n_cases: 30 checker: chk.cc checker_type: testlib filename: std.cc
chk.cc
null
30
30
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/193
aec2aff05f3ece1b150c7c40827b0cea449e0b28
203
Chameleon This is an interactive problem. There are 2N chameleons in the JOI Zoo, numbered from 1 to 2N. Among them, N chameleons are gender X, and N are gender Y. Every chameleon has its own "original color." The original colors satisfy the following properties: - The original colors of chameleons of the same gender...
interactive
1s
256m
# 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: 1s memory: 256m # 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/203
aec2aff05f3ece1b150c7c40827b0cea449e0b28
205
Sequence Transformation Problem Description: You are given two valid parenthesis sequences s1 and s2, both of length 2n. Your goal is to transform s1 into s2 using the minimum number of operations. Available Operations: - Op 1: Transform p(((A)B)C)q into p((A)B)(C)q - Op 2: Transform p((A)(B)C)q into p((A)B)(C)q - Op...
default
2s
256m
# Set the problem type to standard type: default # Specify the checker source file checker: chk.cc # Time and memory limits time: 2s memory: 256m # The subtasks section subtasks: - score: 100 n_cases: 10 # Looks for 1.in/1.ans, 2.in/2.ans, ... 10.in/10.ans in testdata/
chk.cc
null
10
10
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/205
aec2aff05f3ece1b150c7c40827b0cea449e0b28
207
Efficient Sorting Description You are given a permutation S of N distinct integers from 0 to N-1. Your task is to sort the permutation into increasing order (i.e., S[i] = i for all 0 <= i < N) while playing a game against a character named Jerry. The game proceeds in a sequence of rounds. You must decide in advance ...
default
10s
256m
 type: default checker: chk.cc # Time and memory limits still apply to the contestant's solution time: 10s memory: 256m # The subtasks section works the same way subtasks: - score: 100 n_cases: 3
chk.cc
null
3
3
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/207
aec2aff05f3ece1b150c7c40827b0cea449e0b28
209
Hidden Weights Description This is an interactive problem. You are given a positive integer h. Let n = 2^h - 1. There is a perfect binary tree G with n nodes, numbered 1 to n. The root of the tree is node 1. For any node u (2 <= u <= n), its parent is floor(u / 2). The interactor maintains two hidden arrays: 1. A ...
interactive
10s
512m
type: interactive interactor: interactor.cc # Time and memory limits still apply to the contestant's solution time: 10s memory: 512m # The subtasks section works the same way subtasks: - score: 100 n_cases: 10
null
interactor.cc
10
10
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/209
aec2aff05f3ece1b150c7c40827b0cea449e0b28
210
# Military Exercise: Fighter Scheduling and Base Strikes (Blue Side) You are the **blue side** in a simplified military exercise on a 2D grid. The map is an \(n \times m\) grid (0-indexed coordinates): - `#` : red base (enemy) - `*` : blue base (friendly) - `.` : neutral cell Both sides have bases. Blue controls a ...
default
5s
512m
type: default checker: chk.cc checker_type: testlib # Time and memory limits apply to the contestant's solution program. time: 5s memory: 512m subtasks: - score: 100 n_cases: 10
chk.cc
null
10
10
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/210
aec2aff05f3ece1b150c7c40827b0cea449e0b28
211
Communication Robots ## Problem Description In a task area, there are several robots distributed that must maintain a connected network through wireless communication to complete tasks collaboratively. Wireless communication has the following characteristics: (1) Establishing communication links consumes energy. (...
default
10s
512m
# Set the problem type to default (submit answer problems use default type) type: default # Specify the checker source file checker: chk.cc # Time and memory limits (for submit answer problems, these may not be strictly enforced) time: 10s memory: 512m # The subtasks section subtasks: - score: 100 n_cases: 10 ...
chk.cc
null
10
10
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/211
aec2aff05f3ece1b150c7c40827b0cea449e0b28
212
I wanna cross the grid Problem Description: Suddenly, the save point landed in a huge grid. Only by passing through all required areas can the next save point appear... You are given a grid with n rows and m columns, where rows and columns are numbered starting from 1. Define a pair (x, y) to represent the cell at ro...
default
30s
512m
# Set the problem type to default (submit answer problems use default type) type: default # Specify the checker source file checker: chk.cc # Time and memory limits (for submit answer problems, these may not be strictly enforced) time: 30s memory: 512m # The subtasks section subtasks: - score: 100 n_cases: 4 ...
chk.cc
null
4
4
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/212
aec2aff05f3ece1b150c7c40827b0cea449e0b28
213
Sequence Shift (moqueve) Problem Description: You need to sort a permutation of $1\sim n$ on a strange computer. You can choose a number $x$, and then each time you can cyclically shift a segment of length $x$ to the left or right (the leftmost/rightmost element moves to the rightmost/leftmost position) (shift amount...
default
5s
512m
# Set the problem type to default (submit answer problems use default type) type: default # Specify the checker source file checker: chk.cc # Time and memory limits (for submit answer problems, these may not be strictly enforced) time: 5s memory: 512m # The subtasks section subtasks: - score: 100 n_cases: 3 #...
chk.cc
null
3
3
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/213
aec2aff05f3ece1b150c7c40827b0cea449e0b28
214
Sequence Reversal (requese) Problem Description: You need to sort a permutation of $1\sim n$ on a strange computer. You can choose a number $x$, and then each time you can reverse a segment of length $x+1$ or a segment of length $x-1$. Please restore the sequence to $1\sim n$ within $200\times n$ operations. (Note ...
default
2s
512m
# Set the problem type to default (submit answer problems use default type) type: default # Specify the checker source file checker: chk.cc # Time and memory limits (for submit answer problems, these may not be strictly enforced) time: 2s memory: 512m # The subtasks section subtasks: - score: 100 n_cases: 3 #...
chk.cc
null
3
3
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/214
aec2aff05f3ece1b150c7c40827b0cea449e0b28
217
Super Dango Maker Description This is an interactive problem. JOI-kun is a professional confectioner making dangos (Japanese dumplings). There are N different colors of dangos, numbered from 1 to N. JOI-kun has M dangos of each color. Therefore, there are N * M dangos in total. These dangos are uniquely indexed fro...
interactive
10s
256m
 type: interactive interactor: interactor.cc # Time and memory limits still apply to the contestant's solution time: 10s memory: 256m # The subtasks section works the same way subtasks: - score: 100 n_cases: 10
null
interactor.cc
10
10
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/217
aec2aff05f3ece1b150c7c40827b0cea449e0b28
220
Playing Around the Table ## Problem Description There are n players, numbered from 1 to n sitting around a round table. The (i+1)-th player sits to the right of the i-th player for 1≤i<n, and the 1-st player sits to the right of the n-th player. There are n^2 cards, each of which has an integer between 1 and n writt...
default
2s
256m
# Set the problem type to default (submit answer problems use default type) type: default # Specify the checker source file checker: chk.cc # Time and memory limits (for submit answer problems, these may not be strictly enforced) time: 2s memory: 256m # The subtasks section subtasks: - score: 100 n_cases: 20 ...
chk.cc
null
20
20
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/220
aec2aff05f3ece1b150c7c40827b0cea449e0b28
222
Problem: Hedgehog Graph Time limit: 5 seconds Memory limit: 1024 megabytes This is an interactive problem. A hedgehog graph is a directed graph where each vertex has exactly one outgoing edge and contains exactly one directed cycle of length at least 3 (the graph does not contain a loop or cycle of length 2). For e...
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: 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/222
aec2aff05f3ece1b150c7c40827b0cea449e0b28
225
You are given a permutation $a_1, a_2, \dots, a_n$ of numbers from $1$ to $n$. Also, you have $n$ sets $S_1, S_2, \dots, S_n$, where $S_i = \{a_i\}$. Lastly, you have a variable $cnt$, representing the current number of sets. Initially, $cnt = n$. We define two kinds of functions on sets: - $f(S) = \min_{u \in S} u$;...
default
4s
512m
type: default checker: chk.cc checker_type: testlib # Time and memory limits apply to the contestant's solution program. time: 4s memory: 512m subtasks: - score: 100 n_cases: 20
chk.cc
null
20
20
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/225
aec2aff05f3ece1b150c7c40827b0cea449e0b28
227
Given a permutation $p$ of length $n$, you need to divide it into four disjoint subsequences $a$ $b$ $c$ $d$ such that the sum of $\operatorname{LIS}(a) + \operatorname{LDS}(b) + \operatorname{LIS}(c) + \operatorname{LDS}(d)$ is maximized. - $\operatorname{LIS}(a)$ is the length of the Longest Increasing Subsequence (...
default
2s
512m
type: default checker: chk.cc checker_type: testlib # Time and memory limits apply to the contestant's solution program. time: 2s memory: 512m subtasks: - score: 100 n_cases: 50
chk.cc
null
50
50
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/227
aec2aff05f3ece1b150c7c40827b0cea449e0b28
229
Farmer John has found historical data from $n$ consecutive days. The temperature on the $i$-th day was $t_i$. He decides to make an analysis of historical temperatures and find a subsequence of days (not necessarily consecutive) where the temperature is strictly increasing. Formally, FJ is interested in finding the le...
default
2s
512m
type: default checker: chk.cc checker_type: testlib # Time and memory limits apply to the contestant's solution program. time: 2s memory: 512m subtasks: - score: 100 n_cases: 7
chk.cc
null
7
7
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/229
aec2aff05f3ece1b150c7c40827b0cea449e0b28
231
Differentiating Games This is an interactive problem. You are given an initial directed acyclic graph (DAG) with n vertices and m directed edges. Then the interactor secretly chooses a vertex v. Your goal is to determine v by asking queries about the result of a token-moving game played on the graph. Before querying...
interactive
15s
256m
 type: interactive interactor: interactor.cc # Time and memory limits still apply to the contestant's solution time: 15s memory: 256m # The subtasks section works the same way subtasks: - score: 100 n_cases: 10
null
interactor.cc
10
10
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/231
aec2aff05f3ece1b150c7c40827b0cea449e0b28
233
Snake This is an interactive problem. You are given an integer n and an n×n grid of numbers G. The grid contains each number from 1 to n^2 exactly once. ------------------------------------------------------------ Snake movement ------------------------------------------------------------ Define a snake of length l ...
interactive
5s
256m
# 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 # Interactive problems need more time for communication memory: 256m # The subtasks section works the same way subtasks: ...
null
interactor.cc
10
10
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/233
aec2aff05f3ece1b150c7c40827b0cea449e0b28
239
Problem Description: You are given a directed graph G on vertices numbered $0$ to $n$. Initially, G contains exactly n edges of the form $v → v + 1$. Your task is to add some edges to this graph in such a way that for every two vertices $v, u (v < u)$ there exists a directed path from v to u consisting of at most three...
default
2s
512m
# Set the problem type to default (submit answer problems use default type) type: default # Specify the checker source file checker: chk.cc # Time and memory limits (for submit answer problems, these may not be strictly enforced) time: 2s memory: 512m # The subtasks section subtasks: - score: 100 n_cases: 20 ...
chk.cc
null
20
20
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/239
aec2aff05f3ece1b150c7c40827b0cea449e0b28
241
Given the truth table of a boolean function with n boolean variables as input, construct an expression that satisfies this function. In the expression, you are only allowed to use the logical and (&) and logical or (|) operators. Specifically, a truth table of a boolean function with n boolean variables gives all the $...
default
2s
512m
# Set the problem type to default (submit answer problems use default type) type: default # Specify the checker source file checker: chk.cc # Time and memory limits (for submit answer problems, these may not be strictly enforced) time: 2s memory: 512m # The subtasks section subtasks: - score: 100 n_cases: 20 ...
chk.cc
null
20
20
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/241
aec2aff05f3ece1b150c7c40827b0cea449e0b28
243
You are given a map of an area consisting of unit squares, where each square is either open or occupied by a wall. At the beginning, you are placed in one of the open unit squares, but you do not know which square it is or what direction you face. Any two individual open spaces are indistinguishable, and likewise for ...
interactive
15s
1024m
type: interactive interactor: interactor.cc time: 15s memory: 1024m subtasks: - score: 100 n_cases: 27
null
interactor.cc
27
27
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/243
aec2aff05f3ece1b150c7c40827b0cea449e0b28
245
Asesino This is an interactive (scored) problem. There are n players, numbered 1..n. Each player has exactly one role: - Knight: always tells the truth. - Knave: always lies. - Impostor: a special Knave whom everybody thinks is a Knight. There is exactly one Impostor. The remaining players are Knights or Knaves (po...
interactive
10s
256m
 type: interactive interactor: interactor.cc # Time and memory limits still apply to the contestant's solution time: 10s memory: 256m # The subtasks section works the same way subtasks: - score: 100 n_cases: 10
null
interactor.cc
10
10
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/245
aec2aff05f3ece1b150c7c40827b0cea449e0b28
247
# Problem Statement You are given two integer sequences of length $N$: $A=(A_1, A_2, \dots, A_N)$ and $B=(B_1, B_2, \dots, B_N)$. You may perform operations of the following kind: * Choose a pair of integers $(i, j)$ with $1 \le i < j \le N$. * Replace $A_i$ with $A_j - 1$ and $A_j$ with $A_i + 1$. Your goal is to ...
default
2s
512m
# Set the problem type to default (submit answer problems use default type) type: default # Specify the checker source file checker: chk.cc # Time and memory limits (for submit answer problems, these may not be strictly enforced) time: 2s memory: 512m # The subtasks section subtasks: - score: 100 n_cases: 20 ...
chk.cc
null
20
20
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/247
aec2aff05f3ece1b150c7c40827b0cea449e0b28
248
# Drone Delivery ## Problem Description With the continuous emergence of new applications in low-altitude economy, drones have played an important role in express delivery, medical supplies transportation, and other areas. Each city has a vertical drone terminal building with several landing points distributed on it....
default
15s
512m
# Set the problem type to default (submit answer problems use default type) type: default # Specify the checker source file checker: chk.cc # Time and memory limits (for submit answer problems, these may not be strictly enforced) time: 15s memory: 512m # The subtasks section subtasks: - score: 100 n_cases: 10 ...
chk.cc
null
10
10
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/248
aec2aff05f3ece1b150c7c40827b0cea449e0b28
249
Problem: X-OR Time limit: 1 second Memory limit: 256 MB This is an interactive problem! Ehab has a hidden permutation p of length n consisting of the elements from 0 to n-1. You, for some reason, want to figure out the permutation. To do that, you can give Ehab 2 different indices i and j, and he'll reply with (p_...
interactive
1s
256m
# 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: 1s memory: 256m # 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/249
aec2aff05f3ece1b150c7c40827b0cea449e0b28
252
Hotel This is an interactive scored problem. There are n rooms in a hotel, numbered 1..n. In each room i there is a teleporter that sends you to room a_i (1 <= a_i <= n; it is possible that a_i = i). You do NOT know the values of a_1..a_n. Brian is currently in room 1. If Michael starts in some room x, then both Mi...
interactive
10s
256m
 type: interactive interactor: interactor.cc # Time and memory limits still apply to the contestant's solution time: 10s memory: 256m # The subtasks section works the same way subtasks: - score: 100 n_cases: 10
null
interactor.cc
10
10
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/252
aec2aff05f3ece1b150c7c40827b0cea449e0b28
253
Roads This is an interactive problem. There are n intersections and m bidirectional roads, numbered 1..m. Road i connects intersections a_i and b_i. Some (unknown) subset of the roads has been repaired. You do NOT know which roads are repaired. The only information you have is: - Using ONLY repaired roads, the city...
interactive
3s
256m
 type: interactive interactor: interactor.cc # Time and memory limits still apply to the contestant's solution time: 3s memory: 256m # The subtasks section works the same way subtasks: - score: 100 n_cases: 10
null
interactor.cc
10
10
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/253
aec2aff05f3ece1b150c7c40827b0cea449e0b28
254
Problem: Pepe Racing Time limit: 5 seconds Memory limit: 256 MB This is an interactive problem. There are n^2 pepes labeled 1, 2, ..., n^2 with pairwise distinct speeds. You would like to set up some races to find out the relative speed of these pepes. In one race, you can choose exactly n distinct pepes and make ...
interactive
5s
256m
# 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: 256m # 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/254
aec2aff05f3ece1b150c7c40827b0cea449e0b28
255
Problem: Magnets Time limit: 1 second Memory limit: 256 MB This is an interactive problem. Kochiya Sanae is playing with magnets. Realizing that some of those magnets are demagnetized, she is curious to find them out. There are n magnets, which can be of the following 3 types: - N - S - - (these magnets are demagne...
interactive
1s
256m
# 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: 1s memory: 256m # 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/255
aec2aff05f3ece1b150c7c40827b0cea449e0b28
256
Problem: Palindromic Paths Time limit: 1 second Memory limit: 256 MB This is an interactive problem. You are given a grid n * n, where n is odd. Rows are enumerated from 1 to n from up to down, columns are enumerated from 1 to n from left to right. Cell, standing on the intersection of row x and column y, is denote...
interactive
1s
256m
# 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: 1s memory: 256m # 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/256
aec2aff05f3ece1b150c7c40827b0cea449e0b28
257
Problem: Omkar and Modes Time limit: 3 seconds Memory limit: 256 MB This is an interactive problem. Ray lost his array and needs to find it by asking Omkar. Omkar is willing to disclose that the array has the following qualities: 1. The array has n (1 <= n <= 2 * 10^5) elements. 2. Every element in the array a_i is...
interactive
3s
256m
# 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: 3s memory: 256m # 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/257
aec2aff05f3ece1b150c7c40827b0cea449e0b28
258
Problem: Network Synchronization: Finding Dual Anomalies This is an interactive task. [Background] You are managing a distributed network consisting of $n$ server nodes, indexed from 1 to $n$. The network is structured as a tree (a connected graph with $n-1$ edges and no cycles). Two specific, distinct nodes in this ...
interactive
2s
256m
# 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: 256m # 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/258
aec2aff05f3ece1b150c7c40827b0cea449e0b28
263
# Sasha’s Smudged Multiplication Poster (Optimization) ## Problem To learn multiplication, Big Ben printed a gigantic poster of a multiplication table created from his favorite integers collected over CALICO's 5 year history. Unfortunately the poster was damaged and now he's very sad :( Many entries were lost, and man...
default
10s
256m
checker: chk.cc memory: 256m subtasks: - n_cases: 10 score: 100 time: 10s type: default
chk.cc
null
10
10
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/263
aec2aff05f3ece1b150c7c40827b0cea449e0b28
301
# Rope Network for Xiaotu (Optimization) ## Problem Xiaotu is training for sprints inside a **convex polygon** playground with \(n\) vertices \((0 \ldots n-1)\) listed in counterclockwise order. The organizer will install **exactly \(K\)** “safety ropes”. Each rope is a straight segment connecting two polygon vertice...
default
2s
256m
checker: chk.cc memory: 256m subtasks: - n_cases: 10 score: 100 time: 2s type: default
chk.cc
null
10
10
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/301
aec2aff05f3ece1b150c7c40827b0cea449e0b28
302
```markdown # Spectrum-Friendly Beacon String (Optimization) ## Problem A satellite sends a beacon as a string of symbols. The radio channel has two kinds of interference: 1. **Transition interference**: certain consecutive symbol pairs (bigrams) are more likely to be misread, causing a penalty. 2. **Motif interferen...
default
2s
256m
checker: chk.cc memory: 256m subtasks: - n_cases: 10 score: 100 time: 2s type: default
chk.cc
null
10
10
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/302
aec2aff05f3ece1b150c7c40827b0cea449e0b28
303
```markdown # Manhattan Compass Prospecting (Optimization) ## Problem There are **N** distinct pinholes on the 2D plane. The *i*-th pinhole is at integer coordinates \((x_i, y_i)\) and has a nonnegative integer value \(w_i\). You operate a peculiar instrument, the **Manhattan Compass**, which always touches **exactly...
default
2s
1024m
checker: chk.cc memory: 1024m subtasks: - n_cases: 7 score: 100 time: 2s type: default
chk.cc
null
7
7
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/303
aec2aff05f3ece1b150c7c40827b0cea449e0b28
304
# Forest Mycelium Delay Tour (Optimization Challenge) ## Problem Vasya is mapping a forest trail network with **mushroom clearings**. The forest is modeled as an undirected connected graph with `N` clearings (vertices) and `M` trails (edges). At clearing `i`, mushrooms grow at a constant rate `r[i]` grams per minute,...
default
2s
256m
checker: chk.cc memory: 256m subtasks: - n_cases: 10 score: 100 time: 2s type: default
chk.cc
null
10
10
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/304
aec2aff05f3ece1b150c7c40827b0cea449e0b28
305
# Cascading Flip Schedule on a Power Grid Tree ## Problem You operate a power grid shaped as a tree with **N** substations (vertices) and **N−1** transmission lines (edges). Each substation has a reversible breaker with two states: - `W` (white) = **safe to service** - `B` (black) = **unsafe to service** Initially, ...
default
2s
1024m
checker: chk.cc memory: 1024m subtasks: - n_cases: 8 score: 100 time: 2s type: default
chk.cc
null
8
8
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/305
aec2aff05f3ece1b150c7c40827b0cea449e0b28
306
```markdown # Scorched Bridges Campaign ## Problem The enemy controls an archipelago of islands connected by bridges. Their headquarters is on island `1`. You have obtained a forecast of the next `m` days. On day `i`, several islands will contain energy depots. If an island with a depot is still connected to island ...
default
8s
512m
checker: chk.cc memory: 512m subtasks: - n_cases: 10 score: 100 time: 8s type: default
chk.cc
null
10
10
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/306
aec2aff05f3ece1b150c7c40827b0cea449e0b28
307
```markdown # Mobile Relay Layout ## Problem A field-training area contains `N` fixed sensors. Sensor `j` is located at coordinates `(x_j, y_j)` and must upload `d_j` units of data to exactly one mobile relay hub. You may deploy up to `K` relay hubs. Each hub can be placed at any real-valued coordinate. If hub `i` ...
default
4s
512m
checker: chk.cc memory: 512m subtasks: - n_cases: 10 score: 100 time: 4s type: default
chk.cc
null
10
10
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/307
aec2aff05f3ece1b150c7c40827b0cea449e0b28
308
```markdown # Farmwide Teleport Pad Deployment ## Problem Farmer John is upgrading his manure logistics again. This time, instead of building a single teleporter, he may install a **network of teleport pads** at selected road intersections across the farm. The farm road system is modeled as a connected, undirected, ...
default
4s
1024m
checker: chk.cc memory: 1024m subtasks: - n_cases: 10 score: 100 time: 4s type: default
chk.cc
null
10
10
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/308
aec2aff05f3ece1b150c7c40827b0cea449e0b28
309
```markdown # Archipelago Relay Network Design ## Problem The Republic of AtCoder consists of `L+1` islands aligned west-to-east, numbered `0` to `L`. For each `1 <= k <= L`, there is a bidirectional air route between islands `k-1` and `k`. Route `k` is operated by company `S_k`, which is either `A` or `J`. The gove...
default
5s
1024m
checker: chk.cc memory: 1024m subtasks: - n_cases: 10 score: 100 time: 5s type: default
chk.cc
null
10
10
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/309
aec2aff05f3ece1b150c7c40827b0cea449e0b28
310
```markdown # Metallic Pink Resonator Layout ## Problem The Martians have built a circular relay with ports labeled `0,1,…,M-1`. Some ports will be equipped with **pink emitters**; the rest remain **plain reflectors**. If port `a` is an emitter and port `b` is a reflector, then together they can generate the frequenc...
default
8s
1024m
checker: chk.cc memory: 1024m subtasks: - n_cases: 10 score: 100 time: 8s type: default
chk.cc
null
10
10
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/310
aec2aff05f3ece1b150c7c40827b0cea449e0b28
311
```markdown # Resonant Bay Layout ## Problem A research lab wants to place `n` oscillators on a long straight rail with numbered bays `0, 1, ..., m-1`. Oscillator `i` has an intrinsic phase ratio `p_i / q_i`. Some pairs of oscillators are connected by coupling channels. If oscillators `u` and `v` are placed `d = |x_...
default
8s
512m
checker: chk.cc memory: 512m subtasks: - n_cases: 10 score: 100 time: 8s type: default
chk.cc
null
10
10
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/311
aec2aff05f3ece1b150c7c40827b0cea449e0b28
312
```markdown # Park Ranger Shift Balancing ## Problem The city wants to inspect every trail in a large park during one night. The park has `n` glades, numbered `1` to `n`, and `m` undirected trails, numbered `1` to `m`. Trail `i` connects glades `x_i` and `y_i` and has length `c_i`. - A trail may be a self-loop (`x_i...
default
5s
512m
checker: chk.cc memory: 512m subtasks: - n_cases: 10 score: 100 time: 5s type: default
chk.cc
null
10
10
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/312
aec2aff05f3ece1b150c7c40827b0cea449e0b28
313
```markdown # Duff's Defensive Lineup ## Problem Duff has `n` friends. The `i`-th friend has name `s_i` (names are not necessarily unique). Before asking Malek to collect candies, Duff may reorder her friends into a single queue. Let the final order be a permutation `p` of `1..n`, where friend `p_1` stands first, fr...
default
5s
512m
checker: chk.cc memory: 512m subtasks: - n_cases: 10 score: 100 time: 5s type: default
chk.cc
null
10
10
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/313
aec2aff05f3ece1b150c7c40827b0cea449e0b28
314
```markdown # Prime Resonance Retuning ## Problem Yash has built a **prime resonance network** on a rooted tree. The network has `n` nodes, rooted at node `1`. Each node `i` stores a non-negative integer `a_i`. A modulus `m` is also given. For every node, only its value modulo `m` matters. Let - `P = { p | p is ...
default
5s
512m
checker: chk.cc memory: 512m subtasks: - n_cases: 10 score: 100 time: 5s type: default
chk.cc
null
10
10
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/314
aec2aff05f3ece1b150c7c40827b0cea449e0b28
315
# Quadratic Witness Packing ## Problem You are building a small library of reusable **quadratic witnesses**. A witness is a pair of integers \((A,B)\). For a query \((p,x)\), the witness **matches** the query if \[ A^2 + B^2 \equiv x \pmod p. \] You are given many weighted queries. Your task is to output at most \(...
default
4s
512m
checker: chk.cc memory: 512m subtasks: - n_cases: 10 score: 100 time: 4s type: default
chk.cc
null
10
10
problems.tar.gz
https://github.com/FrontierCS/Frontier-CS/tree/aec2aff05f3ece1b150c7c40827b0cea449e0b28/algorithmic/problems/315
aec2aff05f3ece1b150c7c40827b0cea449e0b28