trajectory listlengths 10 10 |
|---|
[
{
"content": "Write Python code to solve the task:\nMike has a string s consisting of only lowercase English letters. He wants to change exactly one character from the string so that the resulting one is a palindrome. \n\nA palindrome is a string that reads the same backward as forward, for example strings \"z\... |
[
{
"content": "Write Python code to solve the task:\nLocal authorities have heard a lot about combinatorial abilities of Ostap Bender so they decided to ask his help in the question of urbanization. There are n people who plan to move to the cities. The wealth of the i of them is equal to ai. Authorities plan to... |
[
{
"content": "Write Python code to solve the task:\nLily Aldrin, as the slap bet commissioner, needs to resolve issues regarding slap bets due with Barney and Marshall. She has mandated that there be a fixed period of time in which the slaps may be used.\n\nSo, she draws two lines representing the given two ti... |
[
{
"content": "Write Python code to solve the task:\nCaptain Jack loves tables. He wants to know whether you love tables or not. So he asks you to solve the following problem:\nGiven an array A and element m, you have to find the value up to which table of m is present in the array. (example - if the array is 3 ... |
[
{
"content": "Write Python code to solve the task:\nWe have a board with a 2 \\times N grid. Snuke covered the board with N dominoes without overlaps. Here, a domino can cover a 1 \\times 2 or 2 \\times 1 square.\n\nThen, Snuke decided to paint these dominoes using three colors: red, cyan and green. Two dominoe... |
[
{
"content": "Write Python code to solve the task:\nYou are given a chessboard of size 1 × n. It is guaranteed that n is even. The chessboard is painted like this: \"BWBW...BW\".\n\nSome cells of the board are occupied by the chess pieces. Each cell contains no more than one chess piece. It is known that the to... |
[
{
"content": "Write Python code to solve the task:\nYou have a given integer n. Find the number of ways to fill all 3 × n tiles with the shape described in the picture below. Upon filling, no empty spaces are allowed. Shapes cannot overlap.\n\n<image> This picture describes when n = 4. The left one is the shape... |
[
{
"content": "Write Python code to solve the task:\nLong ago during the Jurassic Park age, there was a company TopHunters, which used to conduct hunting competitions for the Dinosaurs around the world. Petrosaurus was believed to be the greatest hunter of that time and all other dinosaurs enjoyed watching the h... |
[
{
"content": "Write Python code to solve the task:\nWalter White is on a tour to sell meth. There are N cities.\n\nEach city has a id between 1 and N (both inclusive).\n\nYou are given cost matrix.\n\nIn cost matrix, the j\\;th element in the i\\;th row denotes the cost of travelling between cities with id i an... |
[
{
"content": "Write Python code to solve the task:\nN people are waiting in a single line in front of the Takahashi Store. The cash on hand of the i-th person from the front of the line is a positive integer A_i.\n\nMr. Takahashi, the shop owner, has decided on the following scheme: He picks a product, sets a p... |
[
{
"content": "Write Python code to solve the task:\nAt last, we have successfully neutralized all the cyber weapons of mass destruction, saved our university along the way and lay to waste another evil scheme in the process. All that separates that hacker from us now is his last lair of security, his ultimate f... |
[
{
"content": "Write Python code to solve the task:\nVasya became interested in bioinformatics. He's going to write an article about similar cyclic DNA sequences, so he invented a new method for determining the similarity of cyclic sequences.\n\nLet's assume that strings s and t have the same length n, then the ... |
[
{
"content": "Write Python code to solve the task:\nWatchmen are in a danger and Doctor Manhattan together with his friend Daniel Dreiberg should warn them as soon as possible. There are n watchmen on a plane, the i-th watchman is located at point (xi, yi).\n\nThey need to arrange a plan, but there are some dif... |
[
{
"content": "Write Python code to solve the task:\nSummer vacation ended at last and the second semester has begun. You, a Kyoto University student, came to university and heard a rumor that somebody will barricade the entrance of your classroom. The barricade will be built just before the start of the A-th cl... |
[
{
"content": "Write Python code to solve the task:\nYou are given names of two days of the week.\n\nPlease, determine whether it is possible that during some non-leap year the first day of some month was equal to the first day of the week you are given, while the first day of the next month was equal to the sec... |
[
{
"content": "Write Python code to solve the task:\nLet's consider a table consisting of n rows and n columns. The cell located at the intersection of i-th row and j-th column contains number i × j. The rows and columns are numbered starting from 1.\n\nYou are given a positive integer x. Your task is to count t... |
[
{
"content": "Write Python code to solve the task:\nOnce Bob got to a sale of old TV sets. There were n TV sets at that sale. TV set with index i costs ai bellars. Some TV sets have a negative price — their owners are ready to pay Bob if he buys their useless apparatus. Bob can «buy» any TV sets he wants. Thoug... |
[
{
"content": "Write Python code to solve the task:\nThere are n kangaroos with pockets. Each kangaroo has a size (integer number). A kangaroo can go into another kangaroo's pocket if and only if the size of kangaroo who hold the kangaroo is at least twice as large as the size of kangaroo who is held.\n\nEach ka... |
[
{
"content": "Write Python code to solve the task:\n<image>\n\nIt's the end of July – the time when a festive evening is held at Jelly Castle! Guests from all over the kingdom gather here to discuss new trends in the world of confectionery. Yet some of the things discussed here are not supposed to be disclosed ... |
[
{
"content": "Write Python code to solve the task:\nAs a tradition, every year before IOI all the members of Natalia Fan Club are invited to Malek Dance Club to have a fun night together. Malek Dance Club has 2n members and coincidentally Natalia Fan Club also has 2n members. Each member of MDC is assigned a un... |
[
{
"content": "Write Python code to solve the task:\nCompanies always have a lot of equipment, furniture and other things. All of them should be tracked. To do this, there is an inventory number assigned with each item. It is much easier to create a database by using those numbers and keep the track of everythin... |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 6