DAYOUT2F - More Dragons

no tags 

Once again our country is being attacked by the Enemy country. They soldiers are coming in a line. Now they have different types of small Dragons. Our heroic spy was captured when he was collecting information about these dragons. But, before that, he sent us some information about these dragons that they are look like vowels in the string of soldiers. Now you have to find how many Dragons they have within a range so that we can attack and destroy them.

আবারো আমাদের দেশকে শত্রু দেশ আক্রমন করতে আসতেছে। শত্রুসেনারা এক লাইন ধরে আসতেছে। এখন তাদের বিভিন্ন ধরনের ছোট ড্রাগন আছে। আমাদের স্পাই এবার ড্রাগনের খবর আনতে গিয়ে ধরে পরে গেছে। কিন্তু ধরা পরার আগে সে আমাদের জানায়ছে যে এইবারের ড্রাগনগুলা দেখতে vowel এর মত। এখন তোমাকে একটা নির্দিষ্ট সীমার মধ্যে তাদের কতগুলা ড্রাগন আছে এইটা বের করতে হবে।

Input

The first line of input file contains the number of test cases T (T ≤ 25). Each test case is composed of two lines, where, the first line describes the line of soldiers using a string (a sequence of alphabetical characters). There will be no space between two consecutive characters. The second line contains two numbers, x1 and x2, describing the range. x1 is the starting position and x2 is the ending position, in the line of soldiers. Now you have to find the number of Dragons in the line of soldiers, that is, number of occurrences of vowels in the previous string within the given range, inclusive. The maximum number of characters will not be greater than 100. 1<=x1<=x2<=length of 1st string. 1 is the first position of the string.

ইনপুট ফাইলের প্রথম লাইনে থাকবে কতগুলা টেস্ট কেস আছে, একটা নাম্বার T(T<=25) দিয়ে। প্রত্যেকটা টেস্ট কেস এ 2 টা লাইন থাকবে। প্রথম লাইনে থাকবে সেনাদের বর্ননা, একটা স্ট্রিং(একটা ননএম্পটি আলফাবেটিকাল ক্যরেক্টারের সিকুয়েন্স)। দ্বিতীয় লাইনে থাকবে দুইটা নাম্বার x1 ও x2 , যারা সীমাটা বর্ণনা করবে। x1 হল সীমা শুরুর পজিশন, আর x2 হল সীমা শেষ হওয়ার পজিশন। এখন তোমাকে সেনাদের লাইনে কতগুলা ড্রাগন আছে এইটা বের করতে হবে, তার মানে আগের স্ট্রিং-এ ওই সীমার মধ্যে কতগুলা vowel আছে এইটা বের করতে হবে। সীমাটা ইনক্লুসিভ। সেনার সংখা 100 এর বেশি হবে না। 1<=x1<=x2<=100. 1 হল স্ট্রিং এর প্রথম পজিশন। x2 এর মান স্ট্রিং-এর লেন্থ এর থেকে বড় হবে না।

Output

For each case, print a line like “Case X: N”, without the quotes, where X is the number of test case starting from 1 and N is the number of Dragons within the specified range, inclusive. Check sample input and output sections for more details.

প্রত্যেকটা কেস এর জন্য একটা লাইন “Case X: N” প্রিন্ট করতে হবে, কোট ছাড়া, যেখানে X হল 1 থেকে শুরু হওয়া টেস্ট কেস এর নাম্বার, আর N হল ড্রাগন এর সংখা। বিস্তারিত এর জন্য স্যাম্পল ইনপুট এবং আওটপুট দেখ।

Example

Input:
5
ssddDddssddDSdsdsd
1 18
adnalkdjfkasdjkaa
1 5
aaknklopmnhlakdjsfksdakldjfalkdfla
5 15
k
1 1
huioplnouol
3 3 Output: Case 1: 0
Case 2: 2
Case 3: 2
Case 4: 0
Case 5: 1

hide comments
zapa_zope: 2023-10-02 15:04:55

pistachio thnx for your hint

Last edit: 2023-10-02 15:05:03
pistachio: 2019-06-05 21:42:16

The one should consider only pure vowels.


Added by:Shafaet
Date:2013-01-17
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64
Resource:Own problem