Solution of 12068 - Harmonic Mean

Problem Description
source:https://uva.onlinejudge.org/external/120/12068.html

Input 

The first line of the input file contains an integer S (0 < S < 501), which indicates how many sets of inputs are there. Each of the next S lines contains one set of input. The description of each set is given below: Each set starts with an integer N (0 < N < 9), which indicates how many numbers are there in this set. This number is followed by N integers a1, a2, a3 . . . aN−1, aN (0 < ai < 101). 

Algorithm of 12043 - Dvisor

Problem Description Link
Algorithm:
In this problem if you use more loop in main program to determine the number of divisor and sum of divisor may be you get time limit exit .
so before test case you must generate two array for divisor and sum_of_divisor and and finally use a loop l
i=a to b and check that if any value i mod k is zero then add div+=divisor[i] and sum+=sum_of_divisor[i];
To generate divisor[] and sum_of_divisor[] you can use siv method
that method is bellow :
at first you must set each element 1 in divisor[] and sum_of_divisor[] after then
image

Solution of 12043 - Dvisor

Problem Description
source:https://uva.onlinejudge.org/external/120/12043.html


Let us define the functions d(n) and σ(n) as 
d(n) = number of divisors of n 
σ(n) = summation of divisors of n 

Here divisors of n include both 1 and n. For example divisors of 6 are 1, 2, 3 and 6. So d(6) = 4 and σ(n) = 12. 
Now let us define two more function g(a, b, k) and h(a, b, k) as 

g(a, b, k) = ∑ i d(i) 
h(a, b, k) = ∑ i σ(i) 

Where a ≤ i ≤ b and i is divisible by k. 

image

Solution of 12015 - Google is Feeling Lucky

Problem Description
source:https://uva.onlinejudge.org/external/120/12015.html

Google is one of the most famous Internet search engines which hosts and develops a number of Internetbased services and products. On its search engine website, an interesting button ‘I’m feeling lucky’ attracts our eyes. This feature could allow the user skip the search result page and goes directly to the first ranked page. Amazing! It saves a lot of time. The question is, when one types some keywords and presses ‘I’m feeling lucky’ button, which web page will appear? Google does a lot and comes up with excellent approaches to deal with it. In this simplified problem, let us just consider that Google assigns every web page an integer-valued relevance. The most related page will be chosen. If there is a tie, all the pages with the highest relevance are possible to be chosen. Your task is simple, given 10 web pages and their relevance. Just pick out all the possible candidates which will be served to the user when ‘I’m feeling lucky’.

Input 

The input contains multiple test cases. The number of test cases T is in the first line of the input file. For each test case, there are 10 lines, describing the web page and the relevance. Each line contains a character string without any blank characters denoting the URL of this web page and an integer Vi denoting the relevance of this web page. The length of the URL is between 1 and 100 inclusively. (1 ≤ Vi ≤ 100) 

Output 

For each test case, output several lines which are the URLs of the web pages which are possible to be chosen. The order of the URLs is the same as the input. Please look at the sample output for further information of output format.

Sample Input


www.youtube.com 1 
www.google.com 2 
www.google.com.hk 3 
www.alibaba.com 10 
www.taobao.com 5 
www.bad.com 10 
www.good.com 7 
www.fudan.edu.cn 8 
www.university.edu.cn 9 
acm.university.edu.cn 10 
www.youtube.com 1 
www.google.com 2 
www.google.com.hk 3 
www.alibaba.com 11 
www.taobao.com 5 
www.bad.com 10 
www.good.com 7 
www.fudan.edu.cn 8 
acm.university.edu.cn 9 
acm.university.edu.cn 10 

Sample Output 

Case #1: www.alibaba.com www.bad.com acm.university.edu.cn 
Case #2: www.alibaba.com

Solution
#include<stdio.h>

int main()
{
    int t, i, j, k, max, value[15];
    char url[12][105];
    while(scanf("%d",&t)==1)
    {
        for(i=1;i<=t;i++)
        {
            max=0;
            for(j=1;j<=10;j++)
            {
                scanf("%s%d",&url[j], &value[j]);
                if(value[j]>max)
                    max=value[j];
            }
            printf("Case #%d:\n",i);
            for(k=1;k<=10;k++)
            {
                if(max==value[k])
                    printf("%s\n",url[k]);
            }
        }
    }
    return 0;
}
image

Solution of 11995 - I Can Guess the Data Structure!

Problem Description
source:https://uva.onlinejudge.org/external/119/p11995.pdf

There is a bag-like data structure, supporting two operations: 

1 x      Throw an element x into the bag. 
2         Take out an element from the bag. 

Given a sequence of operations with return values, you’re going to guess the data structure. It is a stack (Last-In, First-Out), a queue (First-In, First-Out), a priority-queue (Always take out larger elements first) or something else that you can hardly imagine! 

Algorithm of 11995 - I Can Guess the Data Structure!

Problem Description Link
Algorithm:
for this problem n=number of line x=element  you can use STL stack , queue, priority_queue
and when get 1 insert data each STL and increase  value for each STL variable(i.e s, q,p)
when get 2 chaeck
    1. for stack check stack not empty and stack top element = x 
        if condition true the pop from stack.
    2. for que  check queue not empty and queue front = x
        if condition true the pop from queue.
    3. for priority queue check priority_queue not empty and  priority_queue top=x
        if condition true the pop from priority_queue.
for each pop increase value that data(ie. s for stack pop ..)
image

Solution of 11984 - A Change in Thermal Unit

Problem Description
source:https://uva.onlinejudge.org/external/119/p11984.html

Measuring temperature and temperature differences are common task in many research and applications. Unfortunately, there exists more than one unit of measuring temperatures. This introduces a lot of confusion at times. Two popular units of measurements are Celsius(C) and Fahrenheit (F). The conversion of F from C is given by the formula

                             F = (9 / 5) * C + 32

In this problem, you will be given an initial temperature in C and an increase in temperature in F. You would have to calculate the new temperature in C.

image

Solution of 11970 - Lucky Numbers

Problem Description
source:https://uva.onlinejudge.org/external/119/p11970.html

Every person has its own numbers that he considers lucky. Usually the numbers are fixed like 3 or 7 and do not depend on anything. This lucky number model seems to be very primitive for John, so he decided to upgrade it for his own use. Maybe more complex model will bring more luck to him? John has added a dependency for lucky numbers on specific integer N (for example N can be ordinal number of day in year or some other meaning). For each N John considers some number X lucky if and only if fraction X/√( N − X) value is integer and greater than zero. 

Input 

The number of tests T (T ≤ 100) is given on the first line. T lines follow, each of them contains one integer N (1 ≤ N ≤ 109 ) described above. 

image

Solution of 11965 - Extra Spaces

Problem Description
source:https://uva.onlinejudge.org/external/119/p11965.html

In programming multiple whitespaces are used to only to make code more readable, so mostly all programming languages totally ignore multiple spaces in code (except for some esoteric ones). In general there are different types of whitespace characters: space itself, tabs, newline symbol, various control characters, etc. Tabs and spaces bring one or the biggest holywar to a programmers world as there is no common rule what to use for code indentation — tab or space characters. In this holywar you stand for tab side and your project code convention requires to use only them for code indentation. However you have recently spotted that someone is using space characters instead of it. Four spaces and tab character look the same in our text editor, so you have decided to write a parser that will change all consequent space characters to one. After that you would be able to determine amount of corrupted code.

image

Solution of 11946 - Code Number

Problem Description
source:https://uva.onlinejudge.org/external/119/p11946.html

Adrian and Maria are relatives that live in different towns. As they inhabit a rural area, it is very difficult for them to keep in touch. One way they found to overcome their communication problem was to send a line through their parents that used to visit each other.

 The point is that Adrian and Maria did not want that their parents read their messages, and they decided to create a secret code for the messages. The code is not very sophisticated, but you should keep in mind Adrian and Maria are just children. 

In general, the meaning of a message is based on changing some letters by numbers. Each message is composed by several lines using uppercase letters of the English alphabet, space and punctuation symbols: dot and comma. The letters that are changed by numbers can be seen in the following example; this change is the same for all messages between Adrian and Maria. 

Message in “Code Number”:

image

Solution of 11942 - Lumberjack Sequencing

Problem Description
source:https://uva.onlinejudge.org/external/119/p11942.html

Another tale of lumberjacks?. Let see . . . 

The lumberjacks are rude, bearded workers, while foremen tend to be bossy and simpleminded. The foremen like to harass the lumberjacks by making them line up in groups of ten, ordered by the length of their beards. The lumberjacks, being of different physical heights, vary their arrangements to confuse the foremen. Therefore, the foremen must actually measure the beards in centimeters to see if everyone is lined up in order. 

Your task is to write a program to assist the foremen in determining whether or not the lumberjacks are lined up properly, either from shortest to longest beard or from longest to shortest. 

Input 

image

Algorithm of 11936 - The Lazy Lumberjacks

Algorithm:

This is a geometric problem . you  can solve this problem easily . you can follow this stapes
1. At first you need three value for three sides (ie. a, b, c)
     N.B.: three sides can formed a triangle if and only if third side is greater than summation of    other two side   .
     where third side is largest value among three sides value .(i.e.:  5, 9, 6 where third side is 9).
2. if possible formed a triangle then you need print
     OK
3. Otherwise print
         Wrong!!
image

Solution of 11936 - The Lazy Lumberjacks

Problem Description
source:https://uva.onlinejudge.org/external/119/11936.html

Once upon a time in a far, far away forest, there was a team of lazy lumberjacks. Since they were too lazy to cut trees, they were always figuring out ways to sneak out of work. Their foreman, on the other side, was always trying to put them all to work. 
After a lot of discussions the foreman and the lumberjacks came to an agreement: they will work, but only if the area of the forest assigned to each one was a triangle. If it was any other shape they will be free not to work that week. The idea was to give each lumberjack three numbers representing the length of each of the triangles side. If the numbers were correct and form a triangle, the lumberjacks had to work, else, they were free to leave and not work. 
Since our lumberjacks are as cunning as they are lazy, they convince the foreman to let them determine the surface and the site in the forest were they will work. As a result, the lumberjacks keep passing the foreman sets of numbers that could not form the sides of a triangle. After a while, the foreman began to suspect and decide to write a program that validates the input of each lumberjack. Now when the lumberjacks decide to pass wrong numbers they get a fine of $1000.00 (more than a day’s salary). Your job is to write the program that the foreman has to use to determine if the numbers (all integers) passed by the lumberjacks can be the sides of a triangle. If they can, you have to print ‘OK’ else you have to print ‘Wrong!!

image

Solution of 11934 - Magic Formula

Problem Description
source: https://uva.onlinejudge.org/external/119/p11934.html

You are given a quadratic function, 
                           f(x) = ax2 + bx + c 
You are also given a divisor d and a limit L. How many of the function values f(0), f(1), . . . , f(L) are divisible by d? 

Input

 Input consists of a number of test cases. Each test case consists of a single line containing the numbers a b c d L (−1000 ≤ a, b, c ≤ 1000, 1 < d < 1000000, 0 ≤ L < 1000). 
Input is terminated by a line containing ‘0 0 0 0 0’ which should not be processed. 

SOlution of 11877 - The Coco-Cola Store

Problem Description
source:https://uva.onlinejudge.org/external/118/11877.html

Once upon a time, there is a special coco-cola store. If you return three empty bottles to the shop, you’ll get a full bottle of coco-cola to drink. If you have n empty bottles right in your hand, how many full bottles of coco-cola can you drink? 

Input 

There will be at most 10 test cases, each containing a single line with an integer n (1 ≤ n ≤ 100). The input terminates with n = 0, which should not be processed. 

image

Algorithm of 11876 - N + NOD (N)

Problem Description Link
Algorithm:
To solve this problem you should generate divisor and NOD sequence before get input otherwise you may get time limit exit
NOD value sequence generate by this produce :
Nodvalue[i]=Nodvalue[i-1]+dividor[Nodvalue[i-1]];

when you get input just find the index of value A and B
and difference of index B and A is O/P.
you can use binarry search for find speedy  index of A and B .
image

Solution of 11876 - N + NOD (N)

Problem Description
source:https://uva.onlinejudge.org/external/118/11876.uva

Consider an integer sequence N where, 

N0 = 1 
Ni = Ni−1 + NOD(Ni−1) for i > 0 
        Here, NOD(x) = number of divisors of x. 
        So the first few terms of this sequence are 1 2 4 7 9 12 18 ... 

Given two integers A and B, find out the number of integers in the above sequence that lies within the range [A, B]. 

Solution of 11875 - Brick Game

Problem Description
source:https://uva.onlinejudge.org/external/118/11875.html

There is a village in Bangladesh, where brick game is very popular. Brick game is a team game. Each team consists of odd number of players. Number of players must be greater than 1 but cannot be greater than 10. Age of each player must be within 11 and 20. No two players can have the same age. There is a captain for each team. The communication gap between two players depends on their age difference, i.e. the communication gap is larger if the age difference is larger. Hence they select the captain of a team in such a way so that the number of players in the team who are younger than that captain is equal to the number of players who are older than that captain. Ages of all members of the team are provided. You have to determine the age of the captain.

image

Solution of 11805 - Bafana Bafana

Problem Description
source:https://uva.onlinejudge.org/external/118/11805.html

Team practice is very important not only for programming contest but also for football. By team practice players can learn cooperating with team mates. For playing as a team improvement of passing skill is very important. Passing is a great way of getting the ball upfield and reduces the risk of giving the ball away.
   Carlos Alberto Parreira, the coach of Bafana Bafana, also wants his players to practice passing a lot. That’s why, while in the training camp for soccer world cup 2010, every day he asks all of the players who are present in practice to stand in a circle and practice passing. If N players are in practice, he gives each of the players a distinct number from 1 to N, and asks them to stand sequentially, so that player 2 will stand in right side of player 1 and player 3 will stand in right side of player 2, and so on. As they are in a circle, player 1 will stand right to player N.
   The rule of passing practice is, Parreira will give the ball to player K, and practice will start. Practice will come to an end after P passes. In each pass, a player will give the ball to his partner who is in his immediate right side. After P passes, the player who owns the ball at that moment will give the ball back to Parreira.
    Parreira wants to be ensured that his players practice according the rule. So he wants a program which will tell him which player will give him the ball back. So after taking the ball from the same person he can be happy that, the players play according to the rules. Otherwise he will ask them to start from beginning.

image

Algorithm of 11799 - Horror Dash

Problem Description Link
Algorithm:
In this problem 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.

so if you can find the maximum speed then it is the
minimum speed to continue the race
so
1. get input t(test case)
2. get input n(number of students)
3. speed of each students (speed)
    if(speed>max)
        max=speed;
4. print the max.
image

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?

Algorithm of 11743 - Credit Check

Problem Description Link
Algorithm:
This is a simple you just see the following example
For example, using the number 5181 2710 9900 0012:

   1.  Double the appropriate digits (5181 2710 9900 0012) to obtain the values:(5*2) 10,  (8*2)16,  (2*2)4, (1*2) 2, (9*2) 18, (0*2) 0, (0*2) 0, (1*2)2.
   2.  (10)->(1+0) , (16)->(1+6), 4, 2, (18)->(1+8), 0, 0, 2
    Add up the digits of these values to get (1+0) + (1+6) + 4 + 2 + (1+8) + 0 + 0 + 2 = 25. The sum of the undoubled digits is 1+1+7+0+9+0+0+2 = 20, so the total is 20+25=45.
   3.  45 does not end in a 0, so this credit card number is invalid.
image

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: 

Algorithm of 11727 - Cost Cutting

Problem Description Link
ALgorithm:
This problem determine the medium salary that not lowest or highest.
let a, b and c are salaries and avg is medium salary that
we determine.
1. get input testcase
2. get input a, b, c
3.
           if((b>a and b<c)||(b<a and b>c))
                avg=b;
            else if((c>a and c<b)||(c<a and c>b))
                avg=c;
            else
                avg=a;
4.print the avg.
image

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

Solution of 11689 - Soda Surpler

Problem Description
source:https://uva.onlinejudge.org/external/116/11689.html


Tim is an absolutely obsessive soda drinker, he simply cannot get enough. Most annoyingly though, he almost never has any money, so his only obvious legal way to obtain more soda is to take the money he gets when he recycles empty soda bottles to buy new ones. In addition to the empty bottles resulting from his own consumption he sometimes find empty bottles in the street. One day he was extra thirsty, so he actually drank sodas until he couldn’t afford a new one.

Solution of 11677 - Alarm Clock

Problem Description
source:https://uva.onlinejudge.org/external/116/11677.html

Daniela is a nurse in a large hospital, which causes her working shifts to constantly change. To make it worse, she has deep sleep, and a difficult time to wake up using alarm clocks. 
       Recently she got a digital clock as a gift, with several different options of alarm sounds, and she has hope that it might help solve her problem. But, lately, she’s been very tired and want to enjoy every single moment of rest. So she carries her new clock to every place she goes, and whenever she has some spare time, she tries to sleep, setting her alarm clock to the time when she needs to wake up. But, with so much anxiety to sleep, she ends up with some difficulty to fall asleep and enjoy some rest.
       A problem that has been tormenting her is to know how many minutes of sleep she would have if she felt asleep immediately and woken up when the alarm clock ringed. But she is not very good with numbers, and asked you for help to write a program that, given the current time and the alarm time, find out the number of minutes she could sleep.
image

Algorithm of 11636 - Hello World!

Problem Description Link
Algorithm:
This is a simple problem just read carefully.
however you can follow this technique.
when you copy the existing line and pest them you get double line means for 1 time of copy you get double line.
1. get input n
2. let line=1; and copy=0
3. while line less than n
    line+=lene;
    copy+=1;
4. print the copy
image

Solution of 11636 - Hello World!

Problem Description
source:http://uva.onlinejudge.org/external/116/11636.html

When you first made the computer to print the sentence “Hello World!”, you felt so happy, not knowing how complex and interesting the world of programming and algorithm will turn out to be. Then you did not know anything about loops, so to print 7 lines of “Hello World!”, you just had to copy and paste some lines. If you were intelligent enough, you could make a code that prints “Hello World!” 7 times, using just 3 paste commands. Note that we are not interested about the number of copy commands required. A simple program that prints “Hello World!” is shown in Figure 1. By copying the single print statement and pasting it we get a program that prints two “Hello World!” lines. Then copying these two print statements and pasting them, we get a program that prints four “Hello World!” lines. Then copying three of these four statements and pasting them we can get a program that prints seven “Hello World!” lines (Figure 4). So three pastes commands are needed in total and Of course you are not allowed to delete any line after pasting. Given the number of “Hello World!” lines you need to print, you will have to find out the minimum number of pastes required to make that program from the origin program shown in Figure 1.

Solution of 11614 - Etruscan Warriors Never Play Chess

Problem Description
source:https://uva.onlinejudge.org/external/116/11614.html

A troop of Etruscan warriors is organized as follows. In the first row, there is only one warrior; then, the second row contains two warriors; the third row contains three warriors, and so on. In general, each row i contains i warriors. 
         We know the number of Etruscan warriors of a given troop. You have to compute the number of rows in which they are organized. 
        Please note that there may be some remaining warriors (this could happen if they are not enough to form the next row). For example, 3 warriors are organized in 2 rows. With 6 warriors you can form 3 rows; but you can also form 3 rows with 7, 8 or 9 warriors. 

image

Solution of 11577 - Letter Frequency

Problem Description
source:http://uva.onlinejudge.org/external/115/11577.html



In this problem we are interested in the frequency of letters in a given line of text. Specifi- cally, we want to know the most frequently occurring letter(s) in the text, ignoring case (to be clear, “letters” refers precisely to the 26 letters of the alphabet).

Input 

Solution of 11559 - Event Planning

Problem Description
source:https://uva.onlinejudge.org/external/115/11559.html



As you didn’t show up to the yearly general meeting of the Nordic Club of Pin Collectors, you were unanimously elected to organize this years excursion to Pin City. You are free to choose from a number of weekends this autumn, and have to find a suitable hotel to stay at, preferably as cheap as possible. You have some constraints: The total cost of the trip must be within budget, of course. All participants must stay at the same hotel, to avoid last years catastrophe, where some members got lost in the city, never being seen again.

Solution of 11547 - Automatic Answer

Problem Description
source:https://uva.onlinejudge.org/external/115/11547.html

Last month Alice nonchalantly entered her name in a draw for a Tapmaster 4000. Upon checking her mail today, she found a letter that read: 
      “Congratulations, Alice! You have won a Tapmaster 4000. To claim your prize, you must answer the following skill testing question.” 
     Alice’s initial feelings of surprised joy turned quickly to those of dismay. Her lifetime record for skill testing questions is an abysmal 3 right and 42 wrong.
    Mad Skills, the leading skill testing question development company, was hired to provide skill testing questions for this particular Tapmaster 4000 draw. They decided to create a different skill testing question to each winner so that the winners could not collaborate to answer the question.
     Can you help Alice win the Tapmaster 4000 by solving the skill testing question?

image

Solution of 11530 - SMS Typing

Problem Description
source:https://uva.onlinejudge.org/external/115/11530.html


Cell phones have become an essential part of modern life. In addition to making voice calls, cell phones can be used to send text messages, which are known as SMS for short. Unlike computer keyboards, most cell phones have limited number of keys. To accommodate all alphabets, letters are compacted into single key. Therefore, to type certain characters, a key must be repeatedly pressed until that character is shown on the display panel. 
       In this problem we are interested in finding out the number of times keys on a cell phone must be pressed to type a particular message. 

Algorithm of 11498 - Division of Nlogonia

Problem Description Link
Algorithm:

This is a simple problem just you need to read carefully .
However you can follow this technique to solve this problem.

let x & y is division point . and m and n is that point tha
you want to determine .
so condition are below
image

Solution of 11498 - Division of Nlogonia

Problem Description
source:https://uva.onlinejudge.org/external/114/11498.html

After centuries of hostilities and skirmishes between the four nations living in the land generally known as Nlogonia, and years of negotiations involving diplomats, politicians and the armed forces of all interested parties, with mediation by UN, NATO, G7 and SBC, it was at last agreed by all the way to end the dispute, dividing the land into four independent territories. 
           It was agreed that one point, called division point, with coordinates established in the negotiations, would define the country division, in the following way. Two lines, both containing the division point, one in the North-South direction and one in the East-West direction, would be drawn on the map, dividing the land into four new countries. Starting from the Western-most, Northern-most quadrant, in clockwise direction, the new countries will be called Northwestern Nlogonia, Northeastern Nlogonia, Southeastern Nlogonia and Southwestern Nlogonia.