F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Happy 2009

Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 3925    Accepted Submission(s): 1299


Problem Description
No matter you know me or not. Bless you happy in 2009.
 

Input
The input contains multiple test cases.
Each test case included one string. There are made up of ¡®a¡¯-¡®z¡¯ or blank. The length of string will not large than 10000.
 

Output
For each test case tell me how many times ¡°happy¡± can be constructed by using the string. Forbid to change the position of the characters in the string. The answer will small than 1000.
 

Sample Input
hopppayppy happy happ acm y hahappyppy
 

Sample Output
2 1 2
 

Author
yifenfei
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-04-27 06:29:00, Gzip enabled