question large_stringlengths 265 13.2k |
|---|
Solve the programming task below in a Python markdown code block.
You are both a shop keeper and a shop assistant at a small nearby shop. You have n goods, the i-th good costs a_i coins.
You got tired of remembering the price of each product when customers ask for it, thus you decided to simplify your life. More prec... |
Solve the programming task below in a Python markdown code block.
A queen is the strongest chess piece. In modern chess the queen can move any number of squares in any horizontal, vertical or diagonal direction (considering that there're no other pieces on its way). The queen combines the options given to the rook and... |
Solve the programming task below in a Python markdown code block.
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 ea... |
Solve the programming task below in a Python markdown code block.
You are creating a level for a video game. The level consists of n rooms placed in a circle. The rooms are numbered 1 through n. Each room contains exactly one exit: completing the j-th room allows you to go the (j+1)-th room (and completing the n-th ro... |
Solve the programming task below in a Python markdown code block.
During one of the space missions, humans have found an evidence of previous life at one of the planets. They were lucky enough to find a book with birth and death years of each individual that had been living at this planet. What's interesting is that t... |
Solve the programming task below in a Python markdown code block.
Oleg's favorite subjects are History and Math, and his favorite branch of mathematics is division.
To improve his division skills, Oleg came up with t pairs of integers p_i and q_i and for each pair decided to find the greatest integer x_i, such that: ... |
Solve the programming task below in a Python markdown code block.
Petya loves lucky numbers very much. Everybody knows that lucky numbers are positive integers whose decimal record contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not.
Petya has two strings a and b o... |
Solve the programming task below in a Python markdown code block.
There is a n Γ m grid. You are standing at cell (1, 1) and your goal is to finish at cell (n, m).
You can move to the neighboring cells to the right or down. In other words, suppose you are standing at cell (x, y). You can:
* move right to the cell... |
Solve the programming task below in a Python markdown code block.
AquaMoon had n strings of length m each. n is an odd number.
When AquaMoon was gone, Cirno tried to pair these n strings together. After making (n-1)/(2) pairs, she found out that there was exactly one string without the pair!
In her rage, she disrupt... |
Solve the programming task below in a Python markdown code block.
During the break the schoolchildren, boys and girls, formed a queue of n people in the canteen. Initially the children stood in the order they entered the canteen. However, after a while the boys started feeling awkward for standing in front of the girl... |
Solve the programming task below in a Python markdown code block.
Sereja has got an array, consisting of n integers, a1, a2, ..., an. Sereja is an active boy, so he is now going to complete m operations. Each operation will have one of the three forms:
1. Make vi-th array element equal to xi. In other words, perfor... |
Solve the programming task below in a Python markdown code block.
Paladin Manao caught the trail of the ancient Book of Evil in a swampy area. This area contains n settlements numbered from 1 to n. Moving through the swamp is very difficult, so people tramped exactly n - 1 paths. Each of these paths connects some pair... |
Solve the programming task below in a Python markdown code block.
Levko loves array a1, a2, ... , an, consisting of integers, very much. That is why Levko is playing with array a, performing all sorts of operations with it. Each operation Levko performs is of one of two types:
1. Increase all elements from li to ri... |
Solve the programming task below in a Python markdown code block.
Valera had an undirected connected graph without self-loops and multiple edges consisting of n vertices. The graph had an interesting property: there were at most k edges adjacent to each of its vertices. For convenience, we will assume that the graph v... |
Solve the programming task below in a Python markdown code block.
One day, after a difficult lecture a diligent student Sasha saw a graffitied desk in the classroom. She came closer and read: "Find such positive integer n, that among numbers n + 1, n + 2, ..., 2Β·n there are exactly m numbers which binary representatio... |
Solve the programming task below in a Python markdown code block.
Twilight Sparkle once got a crystal from the Crystal Mine. A crystal of size n (n is odd; n > 1) is an n Γ n matrix with a diamond inscribed into it.
You are given an odd integer n. You need to draw a crystal of size n. The diamond cells of the matrix ... |
Solve the programming task below in a Python markdown code block.
Dreamoon likes to play with sets, integers and <image>. <image> is defined as the largest positive integer that divides both a and b.
Let S be a set of exactly four distinct integers greater than 0. Define S to be of rank k if and only if for all pairs... |
Solve the programming task below in a Python markdown code block.
The DNA sequence for every living creature in Berland can be represented as a non-empty line consisting of lowercase Latin letters. Berland scientists found out that all the creatures evolve by stages. During one stage exactly one symbol of the DNA line... |
Solve the programming task below in a Python markdown code block.
Let'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.
You are given a positive integer x. Your task is to co... |
Solve the programming task below in a Python markdown code block.
Spongebob is already tired trying to reason his weird actions and calculations, so he simply asked you to find all pairs of n and m, such that there are exactly x distinct squares in the table consisting of n rows and m columns. For example, in a 3 Γ 5 ... |
Solve the programming task below in a Python markdown code block.
There are n pearls in a row. Let's enumerate them with integers from 1 to n from the left to the right. The pearl number i has the type ai.
Let's call a sequence of consecutive pearls a segment. Let's call a segment good if it contains two pearls of th... |
Solve the programming task below in a Python markdown code block.
Little Artem likes electronics. He can spend lots of time making different schemas and looking for novelties in the nearest electronics store. The new control element was delivered to the store recently and Artem immediately bought it.
That element can... |
Solve the programming task below in a Python markdown code block.
Little Artem has invented a time machine! He could go anywhere in time, but all his thoughts of course are with computer science. He wants to apply this time machine to a well-known data structure: multiset.
Artem wants to create a basic multiset of in... |
Solve the programming task below in a Python markdown code block.
ZS the Coder has drawn an undirected graph of n vertices numbered from 0 to n - 1 and m edges between them. Each edge of the graph is weighted, each weight is a positive integer.
The next day, ZS the Coder realized that some of the weights were erased!... |
Solve the programming task below in a Python markdown code block.
Ahmed and Mostafa used to compete together in many programming contests for several years. Their coach Fegla asked them to solve one challenging problem, of course Ahmed was able to solve it but Mostafa couldn't.
This problem is similar to a standard p... |
Solve the programming task below in a Python markdown code block.
You are given an array a consisting of positive integers and q queries to this array. There are two types of queries:
* 1 l r x β for each index i such that l β€ i β€ r set ai = x.
* 2 l r β find the minimum among such ai that l β€ i β€ r.
We dec... |
Solve the programming task below in a Python markdown code block.
You are given set of n points in 5-dimensional space. The points are labeled from 1 to n. No two points coincide.
We will call point a bad if there are different points b and c, not equal to a, from the given set such that angle between vectors <image>... |
Solve the programming task below in a Python markdown code block.
Everybody in Russia uses Gregorian calendar. In this calendar there are 31 days in January, 28 or 29 days in February (depending on whether the year is leap or not), 31 days in March, 30 days in April, 31 days in May, 30 in June, 31 in July, 31 in Augus... |
Solve the programming task below in a Python markdown code block.
A ski base is planned to be built in Walrusland. Recently, however, the project is still in the constructing phase. A large land lot was chosen for the construction. It contains n ski junctions, numbered from 1 to n. Initially the junctions aren't conne... |
Solve the programming task below in a Python markdown code block.
Bob is a farmer. He has a large pasture with many sheep. Recently, he has lost some of them due to wolf attacks. He thus decided to place some shepherd dogs in such a way that all his sheep are protected.
The pasture is a rectangle consisting of R Γ C ... |
Solve the programming task below in a Python markdown code block.
String can be called correct if it consists of characters "0" and "1" and there are no redundant leading zeroes. Here are some examples: "0", "10", "1001".
You are given a correct string s.
You can perform two different operations on this string:
... |
Solve the programming task below in a Python markdown code block.
Cat Noku recently picked up construction working as a hobby. He's currently working with a row of buildings and would like to make it beautiful.
There are n buildings in a row. The height of the i-th building is xi.
Cat Noku can modify the buildings b... |
Solve the programming task below in a Python markdown code block.
There are 26 letters in the English alphabet and 6 of them are vowels: a,e,i,o,u,y.
Other 20 letters are called consonants.
Limak is a little polar bear.
He found a string s consisting of lowercase English letters.
He is going to read and pronounce s b... |
Solve the programming task below in a Python markdown code block.
"She loves me", "She loves me not", "She loves me", "She loves me not", OH WAIT, I'm LALA,
"They love me", "They love me not", "They love me", "They love me not". Lala was indeed overwhelmed by the
'runner's high' and the turbulence inside him. Heart-br... |
Solve the programming task below in a Python markdown code block.
WizKid went on a trip to Wonderland with his classmates. Now, as you know, going on trips incurs costs including hotel costs, fooding, shopping, etc. And when many people go together, usually one person pays and it is expected that the others will pay b... |
Solve the programming task below in a Python markdown code block.
Today, teacher taught Xenny the chapter 'Prime numbers and Composite numbers'. Xenny liked it and being a studious boy, wanted some homework. So teacher gave him a simple task. The task is to find the smallest composite number greater than given no. Xen... |
Solve the programming task below in a Python markdown code block.
When you asked some guy in your class his name, he called himself S, where S is a string of length between 3 and 20 (inclusive) consisting of lowercase English letters. You have decided to choose some three consecutive characters from S and make it his ... |
Solve the programming task below in a Python markdown code block.
We have N integers A_1, A_2, ..., A_N.
There are \frac{N(N-1)}{2} ways to choose two of them and form a pair. If we compute the product of each of those pairs and sort the results in ascending order, what will be the K-th number in that list?
Constrai... |
Solve the programming task below in a Python markdown code block.
There is a tree with N vertices. The vertices are numbered 1 through N. The i-th edge (1 \leq i \leq N - 1) connects Vertex x_i and y_i. For vertices v and w (1 \leq v, w \leq N), we will define the distance between v and w d(v, w) as "the number of edg... |
Solve the programming task below in a Python markdown code block.
There is a tree with N vertices, numbered 1 through N. The i-th edge in this tree connects Vertices A_i and B_i and has a length of C_i.
Joisino created a complete graph with N vertices. The length of the edge connecting Vertices u and v in this graph,... |
Solve the programming task below in a Python markdown code block.
There is a plan view consisting of 12 vertical and 12 horizontal squares showing the terrain. Each square is painted white or black. White represents the sea and black represents the land. When two black squares touch each other vertically or horizontal... |
Solve the programming task below in a Python markdown code block.
The neutral city of Eyes City, in the heart of the four countries, is home to the transcontinental train Bandai. The platform has a row of chairs for passengers waiting for the Bandai, and people who enter the platform can use the chairs freely.
The Ba... |
Solve the programming task below in a Python markdown code block.
You are now in a bookshop with your friend Alice to buy a book, "The Winning Strategy for the Programming Koshien Contest,β just released today. As you definitely want to buy it, you are planning to borrow some money from Alice in case the amount you ha... |
Solve the programming task below in a Python markdown code block.
The JOI Railways is the only railway company in the Kingdom of JOI. There are $N$ stations numbered from $1$ to $N$ along a railway. Currently, two kinds of trains are operated; one is express and the other one is local.
A local train stops at every st... |
Solve the programming task below in a Python markdown code block.
You are given N points in the xy-plane. You have a circle of radius one and move it on the xy-plane, so as to enclose as many of the points as possible. Find how many points can be simultaneously enclosed at the maximum. A point is considered enclosed b... |
Solve the programming task below in a Python markdown code block.
Training is indispensable for achieving good results at ICPC. Rabbit wants to win at ICPC, so he decided to practice today as well.
Today's training is to develop physical strength and judgment by running on a straight road. The rabbit is now standing ... |
Solve the programming task below in a Python markdown code block.
Nathan O. Davis has been running an electronic bulletin board system named JAG-channel. He is now having hard time to add a new feature there --- threaded view.
Like many other bulletin board systems, JAG-channel is thread-based. Here a thread (also ca... |
Solve the programming task below in a Python markdown code block.
Problem
If you bring an empty bottle of $ a $ milk, you can exchange it for a new bottle of $ b $ milk.
How many bottles of milk can Mr. Kawabayashi, who initially has a bottle of $ x $ milk, drink? Output the remainder after dividing by $ 1000000007 $... |
Solve the programming task below in a Python markdown code block.
For given three points p1, p2, p, find the reflection point x of p onto p1p2.
<image>
Constraints
* 1 β€ q β€ 1000
* -10000 β€ xi, yi β€ 10000
* p1 and p2 are not identical.
Input
xp1 yp1 xp2 yp2
q
xp0 yp0
xp1 yp1
...
xpqβ1 ypqβ1
In the first line, ... |
Solve the programming task below in a Python markdown code block.
For $n$ lists $L_i$ $(i = 0, 1, ..., n-1)$, perform a sequence of the following operations.
* insert($t$, $x$): Insert an integer $x$ at the end of $L_t$.
* dump($t$): Print all elements in $L_t$.
* splice($s$, $t$): Transfer elements of $L_s$ to the e... |
Solve the programming task below in a Python markdown code block.
Did you know that Chwee kueh, a cuisine of Singapore, means water rice cake ? Its a variety of the most popular South Indian savory cake, only that we call it here idli :). The tastiest idlis are made in Chennai, by none other than our famous chef, Dext... |
Solve the programming task below in a Python markdown code block.
Little boy Gerald studies at school which is quite far from his house. That's why he has to go there by bus every day. The way from home to school is represented by a segment of a straight line; the segment contains exactly n + 1 bus stops. All of them ... |
Solve the programming task below in a Python markdown code block.
You are given a grid, consisting of 2 rows and n columns. Each cell of this grid should be colored either black or white.
Two cells are considered neighbours if they have a common border and share the same color. Two cells A and B belong to the same co... |
Solve the programming task below in a Python markdown code block.
You are given two integers l and r (l β€ r). Your task is to calculate the sum of numbers from l to r (including l and r) such that each number contains at most k different digits, and print this sum modulo 998244353.
For example, if k = 1 then you have... |
Solve the programming task below in a Python markdown code block.
You are given a bracket sequence s consisting of n opening '(' and closing ')' brackets.
A regular bracket sequence is a bracket sequence that can be transformed into a correct arithmetic expression by inserting characters '1' and '+' between the origi... |
Solve the programming task below in a Python markdown code block.
Kurt reaches nirvana when he finds the product of all the digits of some positive integer. Greater value of the product makes the nirvana deeper.
Help Kurt find the maximum possible product of digits among all integers from 1 to n.
Input
The only inp... |
Solve the programming task below in a Python markdown code block.
This problem is same as the previous one, but has larger constraints.
Shiro's just moved to the new house. She wants to invite all friends of her to the house so they can play monopoly. However, her house is too small, so she can only invite one friend... |
Solve the programming task below in a Python markdown code block.
The only difference between the easy and the hard versions is constraints.
A subsequence is a string that can be derived from another string by deleting some or no symbols without changing the order of the remaining symbols. Characters to be deleted ar... |
Solve the programming task below in a Python markdown code block.
You are given an array a of n integers, where n is odd. You can make the following operation with it:
* Choose one of the elements of the array (for example a_i) and increase it by 1 (that is, replace it with a_i + 1).
You want to make the median... |
Solve the programming task below in a Python markdown code block.
This problem is different from the easy version. In this version Ujan makes at most 2n swaps. In addition, k β€ 1000, n β€ 50 and it is necessary to print swaps themselves. You can hack this problem if you solve it. But you can hack the previous problem o... |
Solve the programming task below in a Python markdown code block.
You have three piles of candies: red, green and blue candies:
* the first pile contains only red candies and there are r candies in it,
* the second pile contains only green candies and there are g candies in it,
* the third pile contains only ... |
Solve the programming task below in a Python markdown code block.
Filled with optimism, Hyunuk will host a conference about how great this new year will be!
The conference will have n lectures. Hyunuk has two candidate venues a and b. For each of the n lectures, the speaker specified two time intervals [sa_i, ea_i] (... |
Solve the programming task below in a Python markdown code block.
Andrey's favourite number is n. Andrey's friends gave him two identical numbers n as a New Year present. He hung them on a wall and watched them adoringly.
Then Andrey got bored from looking at the same number and he started to swap digits first in one... |
Solve the programming task below in a Python markdown code block.
This is an interactive problem.
Homer likes arrays a lot and he wants to play a game with you.
Homer has hidden from you a permutation a_1, a_2, ..., a_n of integers 1 to n. You are asked to find any index k (1 β€ k β€ n) which is a local minimum.
Fo... |
Solve the programming task below in a Python markdown code block.
Input
The first line of the input contains a single integer N (1 β€ N β€ 24). The next N lines contain 5 space-separated integers each. The first three integers will be between 0 and 2, inclusive. The last two integers will be between 0 and 3, inclusiv... |
Solve the programming task below in a Python markdown code block.
Eshag has an array a consisting of n integers.
Eshag can perform the following operation any number of times: choose some subsequence of a and delete every element from it which is strictly larger than AVG, where AVG is the average of the numbers in th... |
Solve the programming task below in a Python markdown code block.
Imagine that you have a twin brother or sister. Having another person that looks exactly like you seems very unusual. It's hard to say if having something of an alter ego is good or bad. And if you do have a twin, then you very well know what it's like.... |
Solve the programming task below in a Python markdown code block.
A widely known among some people Belarusian sport programmer Yura possesses lots of information about cars. That is why he has been invited to participate in a game show called "Guess That Car!".
The game show takes place on a giant parking lot, which ... |
Solve the programming task below in a Python markdown code block.
An expedition group flew from planet ACM-1 to Earth in order to study the bipedal species (its representatives don't even have antennas on their heads!).
The flying saucer, on which the brave pioneers set off, consists of three sections. These sections... |
Solve the programming task below in a Python markdown code block.
Little Petya likes points a lot. Recently his mom has presented him n points lying on the line OX. Now Petya is wondering in how many ways he can choose three distinct points so that the distance between the two farthest of them doesn't exceed d.
Note ... |
Solve the programming task below in a Python markdown code block.
The Little Girl loves problems on games very much. Here's one of them.
Two players have got a string s, consisting of lowercase English letters. They play a game that is described by the following rules:
* The players move in turns; In one move the ... |
Solve the programming task below in a Python markdown code block.
Fox Ciel has some flowers: r red flowers, g green flowers and b blue flowers. She wants to use these flowers to make several bouquets. There are 4 types of bouquets:
* To make a "red bouquet", it needs 3 red flowers.
* To make a "green bouquet", i... |
Solve the programming task below in a Python markdown code block.
Little Petya is learning to play chess. He has already learned how to move a king, a rook and a bishop. Let us remind you the rules of moving chess pieces. A chessboard is 64 square fields organized into an 8 Γ 8 table. A field is represented by a pair ... |
Solve the programming task below in a Python markdown code block.
This problem consists of three subproblems: for solving subproblem F1 you will receive 8 points, for solving subproblem F2 you will receive 15 points, and for solving subproblem F3 you will receive 10 points.
Manao has developed a model to predict the ... |
Solve the programming task below in a Python markdown code block.
Valera loves his garden, where n fruit trees grow.
This year he will enjoy a great harvest! On the i-th tree bi fruit grow, they will ripen on a day number ai. Unfortunately, the fruit on the tree get withered, so they can only be collected on day ai a... |
Solve the programming task below in a Python markdown code block.
Alexandra has a paper strip with n numbers on it. Let's call them ai from left to right.
Now Alexandra wants to split it into some pieces (possibly 1). For each piece of strip, it must satisfy:
* Each piece should contain at least l numbers.
* The... |
Solve the programming task below in a Python markdown code block.
Fox Ciel starts to learn programming. The first task is drawing a fox! However, that turns out to be too hard for a beginner, so she decides to draw a snake instead.
A snake is a pattern on a n by m table. Denote c-th cell of r-th row as (r, c). The ta... |
Solve the programming task below in a Python markdown code block.
Once again Tavas started eating coffee mix without water! Keione told him that it smells awful, but he didn't stop doing that. That's why Keione told his smart friend, SaDDas to punish him! SaDDas took Tavas' headphones and told him: "If you solve the f... |
Solve the programming task below in a Python markdown code block.
Volodya and Vlad play the following game. There are k pies at the cells of n Γ m board. Each turn Volodya moves one pie to the neighbouring (by side) cell. If the pie lies at the border of the board then Volodya can move it outside the board, get the pi... |
Solve the programming task below in a Python markdown code block.
Saitama accidentally destroyed a hotel again. To repay the hotel company, Genos has volunteered to operate an elevator in one of its other hotels. The elevator is special β it starts on the top floor, can only move down, and has infinite capacity. Floor... |
Solve the programming task below in a Python markdown code block.
Treeland is a country in which there are n towns connected by n - 1 two-way road such that it's possible to get from any town to any other town.
In Treeland there are 2k universities which are located in different towns.
Recently, the president sign... |
Solve the programming task below in a Python markdown code block.
Vova plays a computer game known as Mages and Monsters. Vova's character is a mage. Though as he has just started, his character knows no spells.
Vova's character can learn new spells during the game. Every spell is characterized by two values xi and y... |
Solve the programming task below in a Python markdown code block.
Alice got tired of playing the tag game by the usual rules so she offered Bob a little modification to it. Now the game should be played on an undirected rooted tree of n vertices. Vertex 1 is the root of the tree.
Alice starts at vertex 1 and Bob star... |
Solve the programming task below in a Python markdown code block.
Daenerys Targaryen has an army consisting of k groups of soldiers, the i-th group contains ai soldiers. She wants to bring her army to the other side of the sea to get the Iron Throne. She has recently bought an airplane to carry her army through the se... |
Solve the programming task below in a Python markdown code block.
A new set of desks just arrived, and it's about time! Things were getting quite cramped in the office. You've been put in charge of creating a new seating chart for the engineers. The desks are numbered, and you sent out a survey to the engineering team... |
Solve the programming task below in a Python markdown code block.
A ski base is planned to be built in Walrusland. Recently, however, the project is still in the constructing phase. A large land lot was chosen for the construction. It contains n ski junctions, numbered from 1 to n. Initially the junctions aren't conne... |
Solve the programming task below in a Python markdown code block.
Vivek was roaming around in the electronics shop, where he saw a box called as BlackBox. He was intrigued by its function, so he bought it. It's functionality states that for given integer input N β€ 1000 - it outputs the sum of all the digits in facto... |
Solve the programming task below in a Python markdown code block.
Foo was not amongst the most brilliant students of his class. So, he has some pending exams to clear. As the exams are approaching, this time he vowed to pass in all of them. This will only happen if he is not under stress. Foo's stress can be calculate... |
Solve the programming task below in a Python markdown code block.
Milly and Pranjul are playing a game in which Pranjul will give an index of a chocolate. Then, Milly has to tell him the box number in which that chocolate is in. There are N such boxes and Ci chocolates are there in i^th the box. Description of index i... |
Solve the programming task below in a Python markdown code block.
Rahul has set upon the quest for a new logo of his company. He has created the following continuous logo:
/\
/ \
/ /\ \
/ / \ \
/ / /\ \ \
\ \ \/ / /
\ \ / /
\ \/ /
\ /
\/
However, his sister, Rashi, likes the follo... |
Solve the programming task below in a Python markdown code block.
You are given an array a_0, a_1, ..., a_{N-1} of length N. Process Q queries of the following types.
* `0 l r b c`: For each i = l, l+1, \dots, {r - 1}, set a_i \gets b \times a_i + c.
* `1 l r`: Print \sum_{i = l}^{r - 1} a_i \bmod 998244353.
Constra... |
Solve the programming task below in a Python markdown code block.
There are S sheep and W wolves.
If the number of wolves is greater than or equal to that of sheep, the wolves will attack the sheep.
If the wolves will attack the sheep, print `unsafe`; otherwise, print `safe`.
Constraints
* 1 \leq S \leq 100
* 1 \l... |
Solve the programming task below in a Python markdown code block.
We have a sequence of N integers: x=(x_0,x_1,\cdots,x_{N-1}). Initially, x_i=0 for each i (0 \leq i \leq N-1).
Snuke will perform the following operation exactly M times:
* Choose two distinct indices i, j (0 \leq i,j \leq N-1,\ i \neq j). Then, repla... |
Solve the programming task below in a Python markdown code block.
You planned a trip using trains and buses. The train fare will be A yen (the currency of Japan) if you buy ordinary tickets along the way, and B yen if you buy an unlimited ticket. Similarly, the bus fare will be C yen if you buy ordinary tickets along ... |
Solve the programming task below in a Python markdown code block.
Square1001 has seen an electric bulletin board displaying the integer 1. He can perform the following operations A and B to change this value:
* Operation A: The displayed value is doubled.
* Operation B: The displayed value increases by K.
Square10... |
Solve the programming task below in a Python markdown code block.
You are given three integers A, B and C. Determine whether C is not less than A and not greater than B.
Constraints
* -100β€A,B,Cβ€100
* A, B and C are all integers.
Input
Input is given from Standard Input in the following format:
A B C
Output
I... |
Solve the programming task below in a Python markdown code block.
Snuke received a triangle as a birthday present. The coordinates of the three vertices were (x_1, y_1), (x_2, y_2), and (x_3, y_3).
He wants to draw two circles with the same radius inside the triangle such that the two circles do not overlap (but they... |
Solve the programming task below in a Python markdown code block.
We have a large square grid with H rows and W columns. Iroha is now standing in the top-left cell. She will repeat going right or down to the adjacent cell, until she reaches the bottom-right cell.
However, she cannot enter the cells in the intersectio... |
Solve the programming task below in a Python markdown code block.
Do the following for a four-digit number N consisting of numbers 0-9.
1. Let L be the number obtained as a result of arranging the numerical values ββof each of the N digits in descending order.
2. Let S be the number obtained as a result of arranging ... |
Solve the programming task below in a Python markdown code block.
Brave Ponta and his best friend, Brave Gonta, have come to Luida's bar in search of friends to embark on an epic adventure. There are many warriors, monks and wizards in the tavern who are itching to go on an adventure.
Gonta, who is kind-hearted, care... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.