Showing posts with label Volume CXVII. Show all posts
Showing posts with label Volume CXVII. Show all posts

Solution of 11799 - Horror Dash

Problem Description
source:https://uva.onlinejudge.org/external/117/p11799.html

It is that time of the year again! Colorful balloons and brightly colored banners spread out over your entire neighborhood for just this one occasion. It is the annual clown’s festival at your local school. For the first time in their lives, students from the school try their hands at being the best clown ever. Some walk on long poles, others try to keep a crowd laughing for the day with stage comedy, while others still try out their first juggling act — some ‘master clowns’ even teach these juggling tricks to visitors at the festival. 

As part of the festival, there is a unique event known as the “Horror Dash”. At this event, N (1 ≤ N ≤ 100) students dressed in the scariest costumes possible start out in a race to catch a poor clown running on the same track. The clown trips over, loses his mind, and does all sorts of comical acts all while being chased round and round on the track. To keep the event running for as long as possible, the clown must run fast enough not to be caught by any of the scary creatures. However, to keep the audience on the edge of their seats, the clown must not run too fast either. This is where you are to help. Given the speed of every scary creature, you are to find out the minimum speed that the clown must maintain so as not to get caught even if they keep on running forever.

Solution of 11777 - Automate the Grades

Problem Description
source:https://uva.onlinejudge.org/external/117/p11777.html

The teachers of “Anguri Begam Uccha Biddalya”, a school located in the western region of Sylhet, currently follows a manual system for grading their students. The manual process is very time consuming and error prone. From the next semester they have decided to purchase some computers so that the whole grading process can be automated. And yes, you guessed it — they have hired you to write a program that will do the job. 

The grading of each course is based on the following weighted scale: 

• Term 1 — 20% 
• Term 2 — 20% 
• Final — 30% 
• Attendance — 10% 
• Class — Tests 20% 

The letter grades are given based on the total marks obtained by a student and is shown below: 

• A ≥ 90% 
• B ≥ 80% & ¡ 90% 
• C ≥ 70% & ¡ 80% 
• D ≥ 60% & ¡ 70% 
• F < 60% 

Solution of 11764 - Jumping Mario

Problem Descriptio
source:https://uva.onlinejudge.org/external/117/11764.html

Mario is in the final castle. He now needs to jump over few walls and then enter the Koopa’s Chamber where he has to defeat the monster in order to save the princess. For this problem, we are only concerned with the “jumping over the wall” part. You will be given the heights of N walls from left to right. Mario is currently standing on the first wall. He has to jump to the adjacent walls one after another until he reaches the last one. That means, he will make (N − 1) jumps. A high jump is one where Mario has to jump to a taller wall, and similarly, a low jump is one where Mario has to jump to a shorter wall. Can you find out the total number of high jumps and low jumps Mario has to make?

Solution of 11743 - Credit Check

Problem Description
source:https://uva.onlinejudge.org/external/117/p11743.html



These days, it has become commonplace to make purchases over the internet using a credit card. However, because credit card numbers are relatively long, it is easy to make a mistake while typing them in. In order to quickly identify errors like typos, most e-commerce websites use a checksum algorithm to verify credit card numbers. One popular checksum algorithm is the Luhn algorithm, which can detect any single-digit error as well as many common multiple-digit errors: 

Solution of 11727 - Cost Cutting

Problem Description
source:https://uva.onlinejudge.org/external/117/11727.html



Company XYZ have been badly hit by recession and is taking a lot of cost cutting measures. Some of these measures include giving up office space, going open source, reducing incentives, cutting on luxuries and issuing pink slips. 
They have got three (3) employees working in the accounts department and are going to lay-off two (2) of them. After a series of meetings, they have decided to dislodge the person who gets the most salary and the one who gets the least. This is usually the general trend during crisis like this. You will be given the salaries of these 3 employees working in the accounts department. You have to find out the salary of the person who survives. 

Solution of 11723 - Numbering Roads

Problem Description
source:https://uva.onlinejudge.org/external/117/p11723.html



In my country, streets dont have names, each of them are just given a number as name. These numbers are supposed to be unique but that is not always the case. The local government allocates some integers to name the roads and in many case the number of integers allocated is less that the total number of roads. In that case to make road names unique some single character suffixes are used. So roads are named as 1, 2, 3, 1A, 2B, 3C, etc. Of course the number of suffixes is also always limited to 26 (A, B, . . . , Z). For example if there are 4 roads and 2 different integers are allocated for naming then some possible assignments of names can be:

Solution of 11715 - Car

Problem Description
source: https://uva.onlinejudge.org/external/117/p11715.html

You are in a car and going at the speed of u m/s. Your acceleration a is constant. After a particular time t, your speed is v m/s and your displacement is s. Now you are given some (not all of them) values for the given variables. And you have to find the missing parameters. 

Input 

The input file may contain multiple test cases. Each test case can be one of the 

1 u v t 
2 u v a 
3 u a s 
4 v a s 

image

Solution of 11713 - Abstract Names

Problem Description
source:https://uva.onlinejudge.org/external/117/11713.html

Some of you may have noticed that in certain computer games, particularly the ones based on sports, the spelling of names are mutated so that they are not an exact duplicate of the real entity. This is done to avoid hassles of taking permission from each player as well as any patent issues. In this problem, you will be given a pair of names, one of which is that of a player in real life and the second found in a game. You will have to determine if the two names are same, that is the second one is obtained by mutating the first. 
Two names are considered same if they are of same length and they only vary at positions where vowels occur. That means, a name which can be obtained by replacing zero or more vowels by other vowels to obtain a new name are considered same, provided they have same length. For example, both polo and pola are same as pele but not pelet or bele. 

image