problem stringlengths 276 9.11k | text stringlengths 37.8k 120k |
|---|---|
You are given two integers a and b. Moreover, you are given a sequence s_0, s_1, ..., s_{n}. All values in s are integers 1 or -1. It's known that sequence is k-periodic and k divides n+1. In other words, for each k ≤ i ≤ n it's satisfied that s_{i} = s_{i - k}.
Find out the non-negative remainder of division of ∑ _{i... | <|begin▁of▁sentence|><|User|>Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition. You are given two integers a and b. Moreover, you are given a sequence s_0, s_1, ..., s_{n}. All values in s a... |
This is a story in the epoch of magic. A clan of magicians lived in an artificial island built by magic power.
One day, a crisis erupted on the island. An Empire ACM (Atlas Country of Magic) required unconditional surrender to them, otherwise an imperial force attacked by magical missiles to the island. However, they ... | <|begin▁of▁sentence|><|User|>Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition. This is a story in the epoch of magic. A clan of magicians lived in an artificial island built by magic power.... |
"Takahashi throws N dice, each having K sides with all integers from 1 to K. The dice are NOT pairwi(...TRUNCATED) | "<|begin▁of▁sentence|><|User|>Generate an executable Python function generated from the (...TRUNCATED) |
"Every modern car has an odometer. It measures how far the car has traveled, and is used, among othe(...TRUNCATED) | "<|begin▁of▁sentence|><|User|>Generate an executable Python function generated from the (...TRUNCATED) |
"You have given integers a, b, p, and q. Let f(x) = abs(sin(p/q π x)).\n\nFind minimum possible int(...TRUNCATED) | "<|begin▁of▁sentence|><|User|>Generate an executable Python function generated from the (...TRUNCATED) |
"We call a string good, if after merging all the consecutive equal characters, the resulting string (...TRUNCATED) | "<|begin▁of▁sentence|><|User|>Generate an executable Python function generated from the (...TRUNCATED) |
"The Bubble Cup hypothesis stood unsolved for 130 years. Who ever proves the hypothesis will be rega(...TRUNCATED) | "<|begin▁of▁sentence|><|User|>Generate an executable Python function generated from the (...TRUNCATED) |
"Read problem statements in [Hindi], [Bengali], [Mandarin Chinese], [Russian], and [Vietnamese] as w(...TRUNCATED) | "<|begin▁of▁sentence|><|User|>Generate an executable Python function generated from the (...TRUNCATED) |
"Problem B: Blame Game\n\nAlice and Bob are in a factional dispute. Recently a big serious problem a(...TRUNCATED) | "<|begin▁of▁sentence|><|User|>Generate an executable Python function generated from the (...TRUNCATED) |
"In Berland, n different types of banknotes are used. Banknotes of the i-th type have denomination 1(...TRUNCATED) | "<|begin▁of▁sentence|><|User|>Generate an executable Python function generated from the (...TRUNCATED) |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 20