conversations listlengths 2 2 |
|---|
[
{
"content": "# 100 The 3 n + 1 problem\n\nProblems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this problem you will be analyzing a property of an algorithm whose classification is not known for all possible inputs.\n\nConsider the ... |
[
{
"content": "# **10008 What’s Cryptanalysis?**\n\nCryptanalysis is the process of breaking someone else’s cryptographic writing. This sometimes involves some kind of statistical analysis of a passage of (encrypted) text. Your task is to write a program which performs a simple analysis of a given text.\n\n**Inp... |
[
{
"content": "# **10019 Funny Encryption Method**\n\nA student from ITESM Campus Monterrey plays with a new encryption method for numbers. These method consist of the following steps:\n\n**Steps : Example**\n\n1. Read the number *N* to encrypt : *M* = `265`\n\n2. Interpret *N* as a decimal number : *X*1 = `265`... |
[
{
"content": "# **10035 Primary Arithmetic**\n\nChildren are taught to add multi-digit numbers from right-to-left one digit at a time. Many find the “carry” operation - in which a 1 is carried from one digit position to be added to the next - to be a significant challenge. Your job is to count the number of car... |
[
{
"content": "# **10038 Jolly Jumpers**\n\nA sequence of *n >* 0 integers is called a *jolly jumper* if the absolute values of the difference between successive elements take on all the values 1 through *n −* 1. For instance,\n\n 1 4 2 3\n\n is a jolly jumper, because the absolutes differences are 3, 2, and 1 r... |
[
{
"content": "# **10041 Vito’s family**\n\nThe world-known gangster Vito Deadstone is moving to New York. He has a very big family there, all of them living in Lamafia Avenue. Since he will visit all his relatives very often, he is trying to find a house close to them.\n\nVito wants to minimize the total distan... |
[
{
"content": "# **10055 Hashmat the brave warrior**\n\nHashmat is a brave warrior who with his group of young soldiers moves from one place to another to fight against his opponents. Before Fighting he just calculates one thing, the difference between his soldier number and the opponent’s soldier number. From t... |
[
{
"content": "# **10056 What is the Probability?**\n\nProbability has always been an integrated part of computer algorithms. Where the deterministic algorithms have failed to solve a problem in short time, probabilistic algorithms have come to the rescue. In this problem we are not dealing with any probabilisti... |
[
{
"content": "# **10057 A mid-summer night’s dream**\n\nThis is year 2200AD. Science has progressed a lot in two hundred years. Two hundred years is mentioned here because this problem is being sent back to 2000AD with the help of time machine. Now it is possible to establish direct connection between man and c... |
[
{
"content": "# **10062 Tell me the frequencies!**\n\nGiven a line of text you will have to find out the frequencies of the ASCII characters present in it. The given lines will contain none of the first 32 or last 128 ASCII characters. Of course lines may end with `\\n` and `\\r` but always keep those out of co... |
[
{
"content": "# **10071 Back to High School Physics**\n\nA particle has initial velocity and acceleration. If its velocity after certain time is v then what will its displacement be in twice of that time?\n\n**Input**\n\nThe input will contain two integers in each line. Each line makes one set of input. These t... |
[
{
"content": "# **10093 An Easy Problem!**\n\nHave you heard the fact “ *The base of every normal number system is 10* ”? Of course, I am not talking about number systems like Stern Brockot Number System. This problem has nothing to do with this fact but may have some similarity.\n\nYou will be given an *N* bas... |
[
{
"content": "# **10101 Bangla Numbers**\n\nBangla numbers normally use ’kuti’ (10000000), ’lakh’ (100000), ’hajar’ (1000), ’shata’ (100) while expanding and converting to text. You are going to write a program to convert a given number to text with them.\n\n**Input**\n\nThe input file may contain several test ... |
[
{
"content": "# **10170 The Hotel with Infinite Rooms**\n\nThe city of **HaluaRuti** has a strange hotel with infinite rooms. The groups that come to this hotel follow the following rules:\n\na) At the same time only members of one group can rent the hotel.\n\nb) Each group comes in the morning of the check-in ... |
[
{
"content": "# **10189 Minesweeper**\n\nHave you ever played Minesweeper? It’s a cute little game which comes within a certain Operating System which name we can’t really remember. Well, the goal of the game is to find where are all the mines within a *M × N* field. To help you, the game shows a number in a sq... |
[
{
"content": "# **10190 Divide, But Not Quite Conquer!**\n\nYour goal in this problem is to divide a certain integer *n* by another integer *m* until *n* = 1, obtaining a sequence of numbers. Lets call *a* [ *i* ] each number of this sequence, and let’s say it has *k* numbers (i.e. you must do *k −* 1 succesive... |
[
{
"content": "# **10193 All You Need Is Love**\n\n*”All you need is love. All you need is love.* *All you need is love, love... love is all you need.”*\n\n*The Beatles*\n\nThere was invented a new powerfull gadget by the International Beautifull Machines corporation called the love machine! Given a string made ... |
[
{
"content": "# **10221 Satellites**\n\nThe radius of earth is 6440 Kilometer. There are many Satellites and Asteroids moving around the earth. If two Satellites create an angle with the center of earth, can you find out the *distance* between them? By *distance* we mean both the *arc* and *chord* distances. Bo... |
[
{
"content": "# **10222 Decode the Mad man**\n\nOnce in BUET, an old professor had gone completely mad. He started talking with some peculiar words. Nobody could realize his speech and lectures. Finally the BUET authority fall in great trouble. There was no way left to keep that man working in university. Sudde... |
[
{
"content": "# **10226 Hardwood Species**\n\nHardwoods are the botanical group of trees that have broad leaves, produce a fruit or nut, and generally go dormant in the winter. \nAmerica’s temperate climates produce forests with hundreds of hardwood species —trees that share certain biological characteristics. ... |
[
{
"content": "# **10235 Simply Emirp**\n\n*An integer greater than 1 is called a prime number if its only positive divisors (factors) are 1 and itself.* Prime numbers have been studied over the years by a lot of mathematicians. Applications of prime numbers arise in Cryptography and Coding Theory among others. ... |
[
{
"content": "# **10242 Fourth Point!!**\n\nGiven are the ( *x, y* ) coordinates of the endpoints of two adjacent sides of a parallelogram. Find the ( *x, y* ) coordinates of the fourth point.\n\n**Input**\n\nEach line of input contains eight floating point numbers: the ( *x, y* ) coordinates of one of the endp... |
[
{
"content": "# **10252 Common Permutation**\n\nGiven two strings of lowercase letters, *a* and *b*, print the longest string *x* of lowercase letters such that there is a permutation of *x* that is a subsequence of *a* and there is a permutation of *x* that is a subsequence of *b* .\n\n**Input**\n\nInput file ... |
[
{
"content": "# **10268 498-bis**\n\nLooking throw the “Online Judge’s Problem Set Archive” I found a very interesting problem number 498, titled “Polly the Polynomial”. Frankly speaking, I did not solve it, but I derived from it this problem. \nEverything in this problem is a derivative of something from 498. ... |
[
{
"content": "# **10409 Die Game**\n\nLife is not easy. Sometimes it is beyond your control. Now, as contestants of ACM ICPC, you might be just tasting the bitter of life. But don’t worry! Do not look only on the dark side of life, but look also on the bright side. Life may be an enjoyable game of chance, like ... |
[
{
"content": "# **10415 Eb Alto Saxophone Player**\n\nDo you like saxophone? I have a Eb Alto Saxophone, shown on the right.\n\nMy fingers move A LOT when playing some music, and I’m quite interested in how many times each finger PRESS the button. Assume that the music is composed of only 8 kinds of note. They ... |
[
{
"content": "# **10420 List of Conquests**\n\nIn Act I, Leporello is telling Donna Elvira about his master’s long list of conquests:\n\n“This is the list of the beauties my master has loved, a list I’ve made out myself: take a look, read it with me. In Italy six hundred and forty, in Germany two hundred and th... |
[
{
"content": "# **10642 Can You Solve It?**\n\nFirst take a look at the following picture. In this picture, each circle has a coordinate according to Cartesian Coordinate System. You can move from one circle to another following the path denoted by forward arrow symbols. To go from a source circle to a destinat... |
[
{
"content": "# **10783 Odd Sum**\n\nGiven a range [ *a, b* ], you are to find the summation of all the odd integers in this range. For example, the summation of all the odd integers in the range [3 *,* 9] is 3 + 5 + 7 + 9 = 24.\n\n**Input**\n\nThere can be at multiple test cases. The first line of input gives ... |
[
{
"content": "# **10812 Beat the Spread!**\n\nSuperbowl Sunday is nearly here. In order to pass the time waiting for the half-time commercials and wardrobe malfunctions, the local hackers have organized a betting pool on the game. Members place their bets on the sum of the two final scores, or on the absolute d... |
[
{
"content": "# **10908 Largest Square**\n\nGiven a rectangular grid of characters you have to find out the length of a side of the largest square such that all the characters of the square are same and the center [intersecting point of the two diagonals] of the square is at location ( *r, c* ). The height and ... |
[
{
"content": "# **10922 2 the 9s**\n\nA well-known trick to know if an integer *N* is a multiple of nine is to compute the sum *S* of its digits. If *S* is a multiple of nine, then so is *N* . This is a recursive test, and the depth of the recursion needed to obtain the answer on *N* is called the 9-degree of *... |
[
{
"content": "# **10929 You can say 11**\n\nYour job is, given a positive number *N*, determine if it is a multiple of eleven.\n\n**Input**\n\nThe input is a file such that each line contains a positive number. A line containing the number ‘ `0` ’ is the end of the input. The given numbers can contain up to 100... |
[
{
"content": "# **10931 Parity**\n\nWe define the parity of an integer *n* as the sum of the bits in binary representation computed modulo two. As an example, the number 21 = 10101 2 has three 1s in its binary representation so it has parity 3(mod2), or 1. \nIn this problem you have to calculate the parity of a... |
[
{
"content": "# **11005 Cheapest Base**\n\nWhen printing text on paper we need ink. But not every character needs the same amount of ink to print: letters such as ’W’, ’M’ and ’8’ are more expensive than thinner letters as ’i’, ’c’ and ’1’. In this problem we will evaluate the cost of printing numbers in severa... |
[
{
"content": "# **11063 B2-Sequence**\n\nA B2-Sequence is a sequence of positive integers 1 *≤* *b*1 *< b*2 *< b*3 *. . .* such that all pairwise sums *bi* + *bj*, where *i ≤* *j*, are different. Your task is to determine if a given sequence is a B2-Sequence or not.\n\n**Input**\n\nEach test case starts with 2 ... |
[
{
"content": "# **11150 Cola**\n\nYou see the following special offer by the convenience store:\n\n*“A bottle of Choco Cola for every 3 empty bottles returned”*\n\nNow you decide to buy some (say *N* ) bottles of cola from the store. You would like to know how you can get the most cola from them. \nThe figure b... |
[
{
"content": "# **11321 Sort! Sort!! And Sort!!!**\n\nHmm! Here you are asked to do a simple sorting. You will be given *N* numbers and a positive integer *M* . You will have to sort the *N* numbers in ascending order of their modulo *M* value. If there is a tie between an odd number and an even number (that is... |
[
{
"content": "# **11332 Summing Digits**\n\nFor a positive integer *n*, let *f*(*n*) denote the sum of the digits of *n* when represented in base 10. It is easy to see that the sequence of numbers *n, f*(*n*) *, f*(*f*(*n*)) *, f*(*f*(*f*(*n*))) *, . . .* eventually becomes a single digit number that repeats fo... |
[
{
"content": "# **11461 Square Numbers**\n\nA square number is an integer number whose square root is also an integer. For example 1, 4, 81 are some square numbers. Given two numbers *a* and *b* you will have to find out how many square numbers are there between *a* and *b* (inclusive).\n\n**Input**\n\nThe inpu... |
[
{
"content": "# **118 Mutant Flatworld Explorers**\n\nRobotics, robot motion planning, and machine learning are areas that cross the boundaries of many of the subdisciplines that comprise Computer Science: artificial intelligence, algorithms and complexity, electrical and mechanical engineering to name a few. I... |
[
{
"content": "# **12019 Doom’s Day Algorithm**\n\nNo. Doom’s day algorithm is not a method to compute which day the world will end. It is an algorithm created by the mathematician John Horton Conway, to calculate which day of the week (Monday, Tuesday, etc.) corresponds to a certain date.\n\nThis algorithm is b... |
[
{
"content": "# **272 TEX Quotes**\n\nTEX is a typesetting language developed by Donald Knuth. It takes source text together with a few typesetting instructions and produces, one hopes, a beautiful document. Beautiful documents use “ and ” to delimit quotations, rather than the mundane `\"` which is what is pro... |
[
{
"content": "# **299 Train Swapping**\n\nAt an old railway station, you may still encounter one of the last remaining “train swappers”. A train swapper is an employee of the railroad, whose sole job it is to rearrange the carriages of trains. \n\nOnce the carriages are arranged in the optimal order, all the tr... |
[
{
"content": "# **490 Rotating Sentences**\n\nIn “Rotating Sentences,” you are asked to rotate a series of input sentences 90 degrees clockwise. So instead of displaying the input sentences from left to right and top to bottom, your program will display them from top to bottom and right to left.\n\n**Input**\n\... |
[
{
"content": "# **948 Fibonaccimal Base**\n\nThe well known Fibonacci sequence is obtained by starting with 0 and 1 and then adding the two last numbers to get the next one. For example the third number in the sequence is 1 (1=1+0), the forth is 2 (2=1+1), the fifth is 3 (3=2+1) and so on.\n\n|i|0|1|2|3|4|5|6|7... |
README.md exists but content is empty.
- Downloads last month
- 3