Dataset Viewer
Auto-converted to Parquet Duplicate
problem_id
stringlengths
1
66
category
stringclasses
2 values
statement
stringlengths
0
20.2k
config
stringlengths
20
380
0
algorithmic
# 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...
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
1
algorithmic
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...
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: 3
10
algorithmic
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...
# 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: 3 # Looks for 1.in, 2.in, ... ...
101
algorithmic
Problem Name: Circuit Description: You are given a circuit board consisting of N component slots and R external switches. Each slot contains either an AND gate (&) or an OR gate (|). The actual type of each slot is hidden. Your task is to determine the true type of every slot by interacting with the judge. Specif...
# 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: 3 # Looks for 1.in, 2.in, .....
104
algorithmic
Time Limit: 2 s Memory Limit: 256 MB This is an interactive problem. There are n students, having roll numbers 1 to n. Mr. 1048576 knows that exactly 1 student is absent today. In order to determine who is absent, he can ask some queries to the class. In each query, he provide two integers l and r (1≤l≤r≤n) and all stu...
type: interactive time: 2s memory: 256m # A custom checker is required for the special scoring. checker: interactor.cc subtasks: - score: 100 n_cases: 3
106
algorithmic
Hidden Bipartite Graph 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...
# 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: 256m # The subtasks section works the same way subtasks: - score: 100 n_cases: 3 # Looks for 1.in, 2.in, .....
107
algorithmic
F. Guess Divisors Count time limit per test: 2 seconds memory limit per test: 256 megabytes input: standard input output: standard output 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 ou...
# 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: 3 # Looks for 1.in, 2.in, ......
108
algorithmic
time limit per test: 1 second memory limit per test: 256 megabytes This is an interactive problem. Zookeeper has set up a special lock for the rabbit enclosure. The lock consists of n concentric rings numbered from 0 to n−1. The innermost ring is ring 0 and the outermost ring is ring n−1. All rings are split equally in...
type: interactive time: 1s memory: 256m # A custom checker is required for the special scoring. checker: interactor.cc subtasks: - score: 100 n_cases: 3
109
algorithmic
Time Limit: 1 second Memory Limit: 128 MB Description A knight moves on an N×N chessboard and must try to visit every square exactly once (no revisiting). Given the board size and the starting square, output the longest possible path. Note that this problem doesn't require a full complete path. It only asks you to fin...
type: default time: 1s memory: 128m checker: chk.cc subtasks: - score: 100 n_cases: 3 # auto-picks 1.in…10.in and (logically) 1.out…10.out, # but your JudgeEngine first tries "X.ans" before "X.out".
11
algorithmic
# 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...
type: default time: 2s memory: 512m checker: chk.cc cheker_type: testlib subtasks: - score: 100 n_cases: 3
110
algorithmic
TIME LIMIT: 1 minute MEMORY LIMIT: 814 MB Description Create and print an 8 × 14 table (grid) whose cells contain only digits 0–9. We say a number can be “read” from the grid if it can be formed as follows: - Start at any cell in the grid. - Move to an adjacent cell each step, where adjacency includes up, down, left,...
type: default time: 1s memory: 128m checker: chk.cc subtasks: - score: 100 n_cases: 3 # auto-picks 1.in…10.in and (logically) 1.out…10.out, # but your JudgeEngine first tries "X.ans" before "X.out".
111
algorithmic
Problem: Distinct Pairwise XOR Set Time Limit: 1 second Memory Limit: 512 MB Description Given an integer n, find a subset S ⊆ {1, 2, ..., n} such that: 1) For all pairs (a, b) with a, b ∈ S and a < b, the values (a XOR b) are all distinct (i.e., no two different unordered pairs produce the same XOR). 2) |S| ≥ floor(...
type: default time: 1s memory: 128m checker: chk.cc subtasks: - score: 100 n_cases: 3 # auto-picks 1.in…10.in and (logically) 1.out…10.out, # but your JudgeEngine first tries "X.ans" before "X.out".
112
algorithmic
SphereSpread You are given an integer n. You need to place n points in 3D space such that all points lie within or on a unit sphere centered at the origin (i.e., the distance from each point to the origin is at most 1). Your goal is to maximize the minimum pairwise distance between any two points. In other words, yo...
type: default time: 2s memory: 512m checker: chk.cc subtasks: - score: 100 n_cases: 3
113
algorithmic
Problem There are $N$ balls numbered from $1$ to $N$, and three baskets numbered from $1$ to $3$. Initially, all $N$ balls are in basket $1$. Balls can be moved from one basket to another according to the following rules: When the balls in a basket are arranged in numerical order, the ball in the middle is called the...
type: default time: 1s memory: 512m subtasks: - score: 100 n_cases: 3 checker: chk.cc checker_type: testlib filename: std.cc
117
algorithmic
Line The territory of country P is a square with side length 2 * 10^12. The origin is placed at the center of the square, and a Cartesian coordinate system is established so that the sides of the square are parallel to the axes. Thus, the territory of country P is the region [-10^12, 10^12] × [-10^12, 10^12]. The...
# 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: 1s memory: 256m # The subtasks section works the same way subtasks: - score: 100 n_cases: 3 # Looks for 1.in, 2.in, ......
119
algorithmic
Operators - You are given n operators op₁, op₂, …, opₙ. For an input sequence of n+1 integers a₀, a₁, …, aₙ, you need to compute the following value: (((…(a₀ op₁ a₁) op₂ a₂) op₃ a₃)… opₙ aₙ) mod (10⁹ + 7). - For any 0 ≤ i ≤ n, we have 0 ≤ aᵢ < 10⁹ + 7. - For any 1 ≤ i ≤ n, opᵢ ∈ {+, ×}; that is, each ope...
# 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: 1s memory: 512m # The subtasks section works the same way subtasks: - score: 100 n_cases: 3 # Looks for 1.in, 2.in, ......
120
algorithmic
“Da Bai” (Interactive) There is an undirected simple graph with 100 vertices. In each query, you can ask the interactor by choosing three distinct vertices a, b, c. The interactor will tell you how many edges exist among the three vertices {a, b, c}, i.e., the number of edges in the induced sub-graph on {a, b, c}. ...
# 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: 1s memory: 512m # The subtasks section works the same way subtasks: - score: 100 n_cases: 3 # Looks for 1.in, 2.in, ......
121
algorithmic
DNA Matching Time Limit: 2 s Memory Limit: 512 MB A string s is called a “DNA sequence” if and only if s consists only of the characters A, C, G, T. You are given m strings s1, s2, ..., sm, each of length n, and each of them consists only of the characters A, C, G, T, ?. For a DNA sequence t of length n, we call t ...
# 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: 512m # The subtasks section works the same way subtasks: - score: 100 n_cases: 3 # Looks for 1.in, 2.in, ... 5.in
122
algorithmic
This is an interactive problem. The RiOI Team has recently developed a text editor named RiOI Editor. The editor works with exactly one integer parameter W — the width of each line. It is known that 1≤W≤10^5 . As you cannot understand the RiOI Language, from your point of view, words differ from each other only by t...
type: interactive time: 3s memory: 512m subtasks: - score: 100 n_cases: 3 interactor: interactor.cc checker_type: testlib
123
algorithmic
Time limit per test: 1 second Memory limit per test: 256 megabytes Goal ----- There is a hidden integer x with 1 ≤ x ≤ n that you must determine. What you can do ---------------- 1) Ask membership questions (up to 53 total): - Choose any non-empty set S ⊆ {1, 2, …, n}. - Ask whether x ∈ S. - The judge replie...
# 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: 3 # Looks for 1.in, 2.in, ......
124
algorithmic
AveragePermutation This is an interactive problem. There is a hidden permutation p of n, where n is even. You want to discover this permutation using queries. Each query consists of asking about k specific positions a1, a2, ..., ak. The query is answered with 1 if the average of the elements at these positions is an ...
type: interactive interactor: interactor.cc time: 4s memory: 256m subtasks: - score: 100 n_cases: 3
125
algorithmic
Time Limit: 1 second Memory Limit: 256 MB Overview This is an INTERACTIVE PROBLEM. There are N kinds of minerals. For each kind there are exactly 2 slices, for a total of 2N slices numbered 1..2N. The judge fixes a hidden pairing: for each kind, the two slices of that kind form one pair. Your task is to determine all ...
# 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: 20s memory: 256m # The subtasks section works the same way subtasks: - score: 100 n_cases: 3 # Looks for 1.in, 2.in, ......
127
algorithmic
Time Limit: 1 second Memory Limit: 256 mb Interactive Problem YOU MUST USE INTERACTIVE FORMAT FOR THIS PROBLEM. You are standing in front of a row of n boxes, labeled 0 through n−1 from left to right. Each box contains a prize that cannot be seen until the box is opened. There are v ≥ 2 different prize types, number...
# 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: 8s # Giving buffer for grading time memory: 256m # The subtasks section works the same way subtasks: - score: 100 n_case...
13
algorithmic
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...
type: interactive time: 2s memory: 1024m # A custom checker is required for the special scoring. checker: interactor.cc subtasks: - score: 100 n_cases: 3
132
algorithmic
time limit per test: 0.25 second memory limit per test: 512 megabytes This is an interactive problem. You have 𝑅 vacuum cleaner robots left over from your trade with your fellow contestants. You want to use these robots to locate the two chairmen. You can instruct each robot to scout several of 1000 positions where th...
type: interactive time: 0.25s memory: 512m # A custom checker is required for the special scoring. checker: interactor.cc subtasks: - score: 100 n_cases: 3
133
algorithmic
Time limit:20 second Memory limit:1024 megabytes One day, Little Z selected n points on a piece of paper and connected them pairwise with a pencil to form n*(n-1)/2 line segments. Due to the thinness of the pencil, it can be assumed that the width of these line segments is 0. Looking at these line segments, Little Z fe...
type: default time: 20s memory: 1024m # A custom checker is required for the special scoring. checker: chk.cc subtasks: - score: 100 n_cases: 3
134
algorithmic
Guess Number This is an interactive problem. Vasya has thought of two secret integers a and b, both in the range [1, n]. Your task is to determine these two numbers by asking queries. Each query consists of two integers x and y (both in the range [1, n]). The interactor will respond with one of the following: - 0: ...
type: interactive interactor: interactor.cc time: 2s memory: 512m subtasks: - score: 100 n_cases: 3
135
algorithmic
Problem Type: INTERACTIVE(STANDARD SOLUTIONS WILL NOT WORK) There are many legends concerning the Leaning Tower of Toruń. The wall of the tower is a circle with N ≥ 3 evenly spaced doors (in other words, the doors are the vertices of a regular N-gon). The doors are numbered from 0 to N−1, but in a random order. Please...
# 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: 3 # Looks for 1.in, 2.in, ... ...
137
algorithmic
Title: Kangaroos Goal You must print a grid (“map”) on which a simple multi-agent movement game is played. The judge will run 500 random control sequences on your map. Your map is accepted if at least 125 of those sequences fail to gather all agents into a single cell. World - The world is an n-by-m grid (1 ≤ n, m ≤ ...
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: 1
138
algorithmic
### Problem C. Fabulous Fungus Frenzy As the Traveler in the game Genshin Impact, you are exploring Sumeru. You are invited to the Nilotpala Cup Beast Tamers Tournament. To win, you must pass the Coruscating Potential challenge to cultivate Fungi. During this challenge, you must use Floral Jellies to form blends for ...
type: default time: 5s memory: 1024m subtasks: - score: 100 n_cases: 3 checker: chk.cpp checker_type: testlib
14
algorithmic
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...
# 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: 3 # Looks for 1.in, 2.in, .....
140
algorithmic
Mineral Deposits (interactive) You handle signal processing for an extra-terrestrial mining company. Your vessel is approaching an asteroid. Preliminary scans show the presence of k mineral deposits on the asteroid, but their precise locations are unknown. The surface of the asteroid is modeled as a grid of integer c...
# 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: 3 # Looks for 1.in, 2.in, ... ...
141
algorithmic
Bakery Survey This is an interactive problem. Your city has n bakeries (where n is a power of 2), and bakery i specializes in one type of cake a_i. You want to determine d — the number of distinct cake types available in the city. You don't know the values of a_1, ..., a_n. However, your friend can help you by tast...
type: interactive interactor: interactor.cc time: 4s memory: 512m subtasks: - score: 100 n_cases: 3
142
algorithmic
Ball Game You are given n+1 poles numbered from 1 to n+1. Initially, poles 1 through n each contain m balls stacked vertically, while pole n+1 is empty. There are n*m balls in total, with n different colors, where each color appears exactly m times. Your task is to rearrange the balls so that all balls of the same co...
type: default time: 4s memory: 512m checker: chk.cc subtasks: - score: 100 n_cases: 3
143
algorithmic
Problem: Texas Hold’em Training (Terminal I/O Interactive) Time limit: 10 seconds Memory limit: 512 MB Overview You will write a program that plays a large number of very simplified heads-up Texas Hold’em hands against a fixed opponent policy. The judge runs the game and reveals exactly the information you are allowe...
# 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: 100s memory: 512m # The subtasks section works the same way subtasks: - score: 100 n_cases: 3 # Looks for 1.in, 2.in, .....
144
algorithmic
Find Median This is an interactive problem. There is a hidden permutation p of length n, where n is even. You are allowed to make queries by choosing a subsequence of indices with even length k (where 4 ≤ k ≤ n). For a chosen subsequence, the interactor will return the two median values. For a subsequence of even len...
type: interactive interactor: interactor.cc time: 4s memory: 512m subtasks: - score: 100 n_cases: 3
145
algorithmic
# Meituan Cup Warm-up Problem — Number Loop This year's Meituan Cup warm-up problem is a **Number Loop**. When designing this problem, Suanxie first selected the following template, ensuring that the puzzle must contain the two patterns **MT** and **PKU**. The next step is to replace all `?` in the template with dig...
type: default time: 3s memory: 1024m checker: checker.cpp cheker_type: testlib subtasks: - score: 100 n_cases: 2
147
algorithmic
Problem Statement -------- AtCoder has decided to place web advertisements of $n$ companies on the top page. The space for placing advertisements is a square of size 10000 x 10000. The space for each company must be an axis-parallel rectangle with positive area, and the coordinates of the vertices must be integer value...
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
148
algorithmic
Problem Statement -------- There is a floor consisting of $50\times 50$ squares. The floor is covered with rectangular tiles without any gaps. Each tile has a size of either $1\times 1$, $1\times 2$, or $2\times 1$ squares. Let $(0, 0)$ denote the top-left square, and $(i, j)$ denote the square at the $i$-th row from t...
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
149
algorithmic
Story -------- AtCoder is developing a route navigation application that utilizes shortest path algorithms. The service area is represented as a road network of 30x30 vertices connected in a grid. When a user specifies the vertex of the current location and the vertex of the destination, the app will output the shortes...
 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: 3
15
algorithmic
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 specific...
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: 3
150
algorithmic
Story -------- Human genetic information is recorded in DNA with a double helix structure and is represented by a very long string consisting of four characters, `A`, `G`, `C`, and `T`. Recently, alien cells were found in a meteorite. As a result of research, it was found that the genetic information of this alien is r...
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
151
algorithmic
Story -------- To solve the shortage of police officers, the Takahashi City Police Department has decided to introduce automated patrols with unmanned patrol cars. The unmanned patrol car is equipped with a high-resolution omnidirectional camera on the roof, which can see the entire road at once in a straight line from...
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
152
algorithmic
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...
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
153
algorithmic
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...
 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: 3
154
algorithmic
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...
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: 3
155
algorithmic
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...
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
End of preview. Expand in Data Studio

Frontier-CS Dataset

A benchmark dataset for evaluating AI systems on challenging computer science problems.

Dataset Description

This dataset contains 238 problems across two categories:

  • Algorithmic: 172 competitive programming problems with automated judging
  • Research: 66 open-ended research problems

Dataset Structure

Each problem has the following fields:

  • problem_id: Unique identifier for the problem
  • category: Either "algorithmic" or "research"
  • statement: The problem statement text
  • config: YAML configuration for evaluation

Usage

from datasets import load_dataset

dataset = load_dataset("FrontierCS/Frontier-CS")

License

Apache 2.0

Downloads last month
1,569