ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Турниры > Epoka Science Olympiad 2016 > задача:


11-P3. 50908 - Buy 1 Get 1

Epoka Science Olympiad 2016

Старт: 11.апр.2016 в 14:07:57
Финиш: 24.апр.2016 в 05:00:00
Турнир завершён!
• Турнирная таблица

Задачи турнира

• 10-P5. 50905 - Convert KPH to MPH
• 11-1. 50967 - Finding Square Roots
• 11-2. 50968 - Number of Letters
• 11-3. 50969 - Chef and Feedback
• 11-4. 50970 - Marbles
• 11-5. 50971 - Belote Game
• 11-P1. 50906 - The Smallest Pair
• 11-P2. 50907 - Second Largest
• 11-P3. 50908 - Buy 1 Get 1
• 11-P4. 50909 - Gold Coins
• 11-P5. 50910 - Flipping Coins
• 6-1. 50937 - Calculate the Average
• 6-2. 50938 - Translate Score into Gr...
• 6-3. 50975 - Cinema Tickets
• 6-4. 50942 - Win or Lose
• 6-5. 50943 - Word Game
• 6-P1. 50881 - Exchange the Values

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.

Buy 1 Get 1

One day Alice visited Byteland to purchase jewels for her upcoming wedding anniversary.

In Byteland, every Jewelry shop has their own discount methods to attract the customers.
One discount method called Buy1-Get1 caught Alice's attention. That is, Alice buys one jewel, and then she can get one additional jewel with the same color without charge by Buy1-Get1.

Alice lists the needed jewels as a string S, each letter denotes one jewel, the same letters denote the same colors of jewels, and the different letters denote the different colors of jewels.
The cost of each jewel is 1. Your task is to calculate the minimum cost for getting all the jewels Alice listed.

Input:
The first line of input contains a string S, which represents the jewels Alice needed.

Output:
The minimum cost.

Constraints:
1 ≤ |S| ≤ 200, where |S| represents the length of the string S.
The string S is case sensitive, and will contain only English characters in the range [a-z], [A-Z].

Sample Input1:

Sample Input2:

Sample Input2:

aaaa

ddcd

Nn

Sample  Output1:

Sample  Output2:

Sample  Output2:

2

3

2

 

Для отправки решений необходимо выполнить вход.

www.contester.ru