Leaderboard
Showing:
Handle Score
@Ibrahim Nash 6379
@blackshadows 6329
@mb1973 5358
@Quandray 5231
@akhayrutdinov 5111
@saiujwal13083 4510
@sanjay05 3762
@marius_valentin_dragoi 3522
@sushant_a 3459
@verma_ji 3357
@KshamaGupta 3318
Complete Leaderboard
K-Pangrams
Easy Accuracy: 38.89% Submissions: 10745 Points: 2

Given a String S and an integer k we need to find that whether the string can be changed into Pangram string by performing at most k changes and that changes can be only modification in a string (ie In one change we can remove existing character and add new character).

Input
first line of input contains of an integer 'T' denoting number od test cases
first line of each testcase contains String 'S'.
second line of each testcase contains an integer 'k' denoting the number of changes that are allowed. 


Output
for each case in a new line print 1 for Yes and  0 for No .

Constraints
1<=T<=40
1<=S.length()<=10^6
0<=k<=10^9

Example

Input

2
qwqqwqeqqwdsdadsdasadsfsdsdsdasasas
4
qwqqwqeqqwdsdadsdasadsfsdsdsdasasas
24


Output
0
1

 

to report an issue on this page.

Editorial

We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?

Yes

All Submissions

My Submissions:

Login to access your submissions.

K-Pangrams

Output Window