Dataset Viewer
Auto-converted to Parquet Duplicate
id
int64
0
10k
question
listlengths
1
1
content
stringlengths
1.97k
86k
0
[ { "content": "Polar bears like unique arrays — that is, arrays without repeated elements.\n\nYou have got a unique array s with length n containing non-negative integers. Since you are good friends with Alice and Bob, you decide to split the array in two. Precisely, you need to construct two arrays a and b that...
<think><think> Okay, I need to solve this problem where I have to split a unique array s into two arrays a and b such that both a and b are almost unique. Almost unique means that after removing at most n/2 elements (floor division?), the array becomes unique. Wait, the example shows that for the array [1,2,1,3,2], whi...
1
[ { "content": "Furlo and Rublo play a game. The table has n piles of coins lying on it, the i-th pile has ai coins. Furlo and Rublo move in turns, Furlo moves first. In one move you are allowed to:\n\n * choose some pile, let's denote the current number of coins in it as x; \n * choose some integer y (0 ≤ y < ...
<think><think> Okay, I need to solve this problem where two players take turns moving coins in piles according to certain rules, and determine who wins if both play optimally. Let's think through this step by step. The problem says that in each move, a player selects a pile with x coins and reduces it to y, where y is...
2
[ { "content": "A plane contains a not necessarily convex polygon without self-intersections, consisting of n vertexes, numbered from 1 to n. There is a spider sitting on the border of the polygon, the spider can move like that:\n\n 1. Transfer. The spider moves from the point p1 with coordinates (x1, y1), lying...
<think><think> Okay, let's try to figure out how to solve this problem. The problem is about finding the shortest path a spider can take from vertex s to vertex t on a polygon. The spider can transfer along the border (moving either clockwise or counter-clockwise) and can descend vertically as long as the vertical segm...
3
[ { "content": "Today is Devu's birthday. For celebrating the occasion, he bought n sweets from the nearby market. He has invited his f friends. He would like to distribute the sweets among them. As he is a nice guy and the occasion is great, he doesn't want any friend to be sad, so he would ensure to give at lea...
<think><think> Okay, let's see. The problem is about distributing n sweets to f friends such that each friend gets at least one sweet, and the greatest common divisor (GCD) of all the a_i's (the number of sweets each friend gets) is 1. Wait, no, the condition is that there's no integer x >1 that divides all a_i. So the...
4
[{"content":"As everyone knows, bears love fish. But Mike is a strange bear; He hates fish! The even(...TRUNCATED)
"<think><think>\nOkay, let's see. So the problem is to assign either 'r' or 'b' to each point such t(...TRUNCATED)
5
[{"content":"Julia is conducting an experiment in her lab. She placed several luminescent bacterial (...TRUNCATED)
"<think><think>\nOkay, let's see. The problem is about finding the number of possible distinct confi(...TRUNCATED)
6
[{"content":"You are given a directed graph G with n vertices and m arcs (multiple arcs and self-loo(...TRUNCATED)
"<think><think>\nOkay, I need to find the maximum possible k such that the directed graph can be col(...TRUNCATED)
7
[{"content":"Once Bob saw a string. It contained so many different letters, that the letters were ma(...TRUNCATED)
"<think><think>\nOkay, let's tackle this problem. So, Bob is deleting repeats from a string, and I n(...TRUNCATED)
8
[{"content":"You have matrix a of size n × n. Let's number the rows of the matrix from 1 to n from (...TRUNCATED)
"<think><think>\nOkay, let's see. The problem is to determine if there's some integer k ≥ 1 such t(...TRUNCATED)
9
[{"content":"You are given an infinite periodic array a0, a1, ..., an - 1, ... with the period of le(...TRUNCATED)
"<think><think>\nOkay, I need to solve this programming problem. Let's read the problem statement ca(...TRUNCATED)
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
37