Dataset Viewer
Auto-converted to Parquet Duplicate
tests
dict
problem
stringlengths
29
13k
{ "inputs": [ "5\n2 4\nabac\nzbab\n2 4\naaaa\nbbbb\n3 3\nbaa\naaa\naab\n2 2\nab\nbb\n3 1\na\nb\nc\n", "5\n2 4\nabac\nzbab\n2 4\naaaa\nbbbb\n3 3\nbaa\naaa\naab\n2 2\nab\nbb\n3 1\na\nb\nc\n", "5\n2 4\nabac\nbabz\n2 4\naaaa\nbbbb\n3 3\nbaa\naaa\naab\n2 2\nab\nbb\n3 1\na\nb\nc\n", "5\n2 4\nabac\nbabz\n2 4...
You are given n strings a_1, a_2, …, a_n: all of them have the same length m. The strings consist of lowercase English letters. Find any string s of length m such that each of the given n strings differs from s in at most one position. Formally, for each given string a_i, there is no more than one position j such that...
{ "inputs": [ "5\n00100\n", "6\n111010\n", "5\n10001\n", "7\n1100010\n", "18\n110100000000000000\n", "70\n0010011001010100000110011001011111101011010110110101110101111011101010\n", "7\n0000000\n", "17\n00100000000000000\n", "16\n1101010010000000\n", "3\n111\n", "4\n0000\n",...
Vasya and Petya have invented a new game. Vasya takes a stripe consisting of 1 × n square and paints the squares black and white. After that Petya can start moves — during a move he may choose any two neighboring squares of one color and repaint these two squares any way he wants, perhaps in different colors. Petya can...
{ "inputs": [ "5\ninsert A\ninsert T\ninsert C\nfind G\nfind A", "13\ninsert AAA\ninsert AAC\ninsert AGA\ninsert AGG\ninsert TTT\nfind AAA\nfind CCC\nfind CCC\ninsert CCC\nfind CCC\ninsert T\nfind TTT\nfind T", "5\ninsert A\ninsert U\ninsert C\nfind G\nfind A", "13\ninsert AAA\ninsert AAC\ninsert AGA\...
Your task is to write a program of a simple dictionary which implements the following instructions: * insert str: insert a string str in to the dictionary * find str: if the distionary contains str, then print 'yes', otherwise print 'no' Notes Template in C Constraints * A string consists of 'A', 'C', 'G', or 'T' ...
{ "inputs": [ "1 4\nSE23\n", "5 7\n000E0T3\nT0TT0T0\n010T0T0\n2T0T0T0\n0T0S000\n", "1 10\n9T9TSET9T9\n", "3 3\n920\n752\nE8S\n", "1 5\n78S6E\n", "2 2\nE9\nS4\n", "3 3\n000\nS0E\n000\n", "5 1\n9\nT\nE\n6\nS\n", "3 5\n00000\nS0E01\n00000\n", "5 5\nS9999\nTTTT9\n99999\n9TTTT\n9999...
You're a mikemon breeder currently in the middle of your journey to become a mikemon master. Your current obstacle is go through the infamous Biridian Forest. The forest The Biridian Forest is a two-dimensional grid consisting of r rows and c columns. Each cell in Biridian Forest may contain a tree, or may be vacant....
{ "inputs": [ "4\n1 4 1\n1 3 1\n2 2 4\n2 3 5\n1\n1 5 1\n7\n2 2 2\n1 4 1\n2 1 3\n1 4 1\n1 1 1\n2 5 5\n1 4 2\n0", "4\n1 4 1\n1 3 2\n2 2 4\n2 3 5\n1\n1 5 1\n7\n2 2 2\n1 4 1\n2 1 3\n1 4 1\n1 1 1\n2 5 5\n1 4 2\n0", "4\n1 4 1\n1 3 2\n1 2 4\n2 3 5\n1\n1 5 1\n7\n2 2 2\n1 4 1\n2 1 3\n1 4 1\n1 1 1\n2 5 5\n1 4 2\n0"...
Tetris is a game in which falling blocks are lined up on the board and erased. Here, let's consider a game that arranges it a little. The size of the board of this game is 5 frames wide, and it is high enough to accommodate all the blocks that appear. The falling blocks are straight and come in two types, landscape an...
{ "inputs": [ "1\naabbcc\n\nSAMPLE", "10\naabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\nabcdefghijklmnopqrstuvwxyz\n...............................aaaaaaaaaaaaaaaaaaaaaa\n....................,,,,,,,,,,,,,,,,,,,,,aaaaaaaaaaaaa\naaaaaaaaaaaaa.................d...
After the Tatvik Hiring Challenge, Karan's NLP professor has given him another homework. Since Manhattan Associates Hiring Challenge is round the corner and Karan is busy preparing for it, he turns to you for help. Given a string, replace all the consecutively occurring characters by a single, same character. Input: ...
{ "inputs": [ "6\nICPC.@bmail.com\np+con+test@BMAIL.COM\nP@bmail.com\na@bmail.com.ru\nI.cpc@Bmail.Com\na+b@bmail.com.ru", "8\ntest@bbmail.com\ntes.t@bbmail.com\ntest@bmail.com\ntes.t@bmail.com\ntest+bmail.com@bbmail.com\ntes.t+bmail.com@bbmail.com\ntest+bmail.com@bmail.com\ntes.t+bmail.com@bmail.com", "2\...
Polycarp has quite recently learned about email aliases. Of course, he used to suspect that the case of the letters doesn't matter in email addresses. He also learned that a popular mail server in Berland bmail.com ignores dots (characters '.') and all the part of an address from the first character "plus" ('+') to cha...
{ "inputs": [ "5 4\n1 2 1\n2 3 1\n1 3 6\n4 5 8\n", "3 2\n2 1 4\n1 3 2\n", "5 5\n1 2 1\n2 3 1\n3 4 1\n1 5 1\n5 4 10\n", "18 27\n3 16 55467\n17 11 829\n5 12 15831\n14 6 24056\n5 2 63216\n15 6 38762\n2 6 10654\n12 6 51472\n11 9 79384\n1 6 67109\n5 13 86794\n7 6 74116\n10 3 44030\n5 7 71499\n16 17 33019\n...
You are given a directed acyclic graph (a directed graph that does not contain cycles) of n vertices and m arcs. The i-th arc leads from the vertex x_i to the vertex y_i and has the weight w_i. Your task is to select an integer a_v for each vertex v, and then write a number b_i on each arcs i such that b_i = a_{x_i} -...
{ "inputs": [ "237 7\n", "15 2\n", "117 3\n", "1000 1\n", "1 8\n", "1000 2\n", "1 5\n", "998 9\n", "1 4\n", "1000 4\n", "8 2\n", "23 4\n", "666 5\n", "2 1\n", "25 5\n", "1000 5\n", "15 5\n", "999 8\n", "8 9\n", "1 7\n", "2 3\n", "...
Polycarp urgently needs a shovel! He comes to the shop and chooses an appropriate one. The shovel that Policarp chooses is sold for k burles. Assume that there is an unlimited number of such shovels in the shop. In his pocket Polycarp has an unlimited number of "10-burle coins" and exactly one coin of r burles (1 ≤ r ...
{ "inputs": [ "5\n1 3 5 7 9\n", "5\n2 3 5 7 11\n", "5\n4 6 9 3 6\n", "1\n5\n", "1\n1000000\n", "5\n3 3 6 2 2\n", "1\n1\n", "2\n1 1000000\n", "2\n999999 1000000\n", "1\n1343\n", "1\n4\n", "5\n3 2 6 2 2\n", "5\n1 3 5 11 9\n", "5\n2 3 5 10 11\n", "5\n3 2 6 2 3\...
Simon has an array a1, a2, ..., an, consisting of n positive integers. Today Simon asked you to find a pair of integers l, r (1 ≤ l ≤ r ≤ n), such that the following conditions hold: 1. there is integer j (l ≤ j ≤ r), such that all integers al, al + 1, ..., ar are divisible by aj; 2. value r - l takes the maximum...
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
506