Easy Beginners Problems > Ad-hoc

You will be given a list of **N** words. A word is called **Dwindle Word** if total distinct letters in the word are less( i.e not greater than others in the given list). You are given an integer N and following a list with N lines containing a single non-empty word. Your task is to print the indices of all **Dwindle Word** in an ascending order. Input: ------ Input starts with an integer **T (1<=T<=20)**, denoting the number of test cases. Each case contains an integer **N (1 ≤ N ≤ 1000)** denoting the number of Words. Each word is non-empty at most 100 length long. Output: ------- For each case of input, print a line with the indices (1-based) of all **Dwindle Word** in ascending order separated by a single space between them. Sample Input ------------ 1 3 abc aaa vvv Sample Output ------------- 2 3 **Explanation:** ---------- In above given list,there are 3 strings.<br> abc has 3 distinct letters a,b,c.<br> aaa has 1 distinct letter a.<br> vvv has 1 distinct letter v.<br> So, minimum number of distinct letters in word is 1. Here, word with indices 2 and 3 has this value. So the answer is 2 3.

Bishal Gautam

Language |
Time Limit (seconds) |

C | 1.00 |

C++ | 1.00 |

C++14 | 1.00 |

C# | 2.00 |

Go | 2.00 |

Java | 2.00 |

JavaScript | 2.00 |

Objective-C | 2.00 |

Perl | 2.00 |

PHP | 2.00 |

Python | 2.00 |

Python3 | 2.00 |

Ruby | 2.00 |

VB.Net | 2.00 |

Solve/Submission

# | User | Language | Timing |
---|---|---|---|

01 | kissu_pari_na | Cpp14 | 0.00s |

02 | tanu_1603070 | Cpp | 0.00s |

03 | feodorv | C | 0.00s |

04 | prottoy919 | Cpp | 0.01s |

05 | afzalul | C | 0.01s |

06 | baibhavbista | Cpp | 0.01s |

07 | ss1230 | Cpp14 | 0.01s |

08 | Riad_IIT7 | Cpp | 0.01s |

09 | cse_nazmul | Cpp | 0.01s |

10 | introverted | Cpp | 0.01s |

11 | Bruteforcekid | Cpp14 | 0.01s |

12 | anik_JU | Cpp | 0.01s |

13 | Shahriar_88 | Cpp14 | 0.01s |

14 | DynamicOvi | Cpp | 0.01s |

15 | Rajan_sust | Cpp14 | 0.01s |

16 | akashkumar2 | C | 0.01s |

17 | Foysol_Ahmed | Cpp | 0.01s |

18 | nabil1997 | Cpp | 0.02s |

19 | IIUC_minhazmiraz | Cpp | 0.02s |

20 | badhansen123 | Cpp | 0.02s |

21 | Trusted_Frustrated | Cpp | 0.02s |

22 | duronto20 | Cpp | 0.02s |

23 | Rizon_sunny | Cpp | 0.02s |

24 | maxhasan | Cpp | 0.02s |

25 | emrul | Cpp14 | 0.02s |

26 | nymphaea | Cpp14 | 0.02s |

27 | Silent_Warrior | Cpp | 0.02s |

28 | souravahmed | C | 0.03s |

29 | jayed_al_hasan | Cpp | 0.03s |

30 | robin_aust | Cpp | 0.03s |

31 | Anubis | Cpp | 0.03s |

32 | akib9ctg | Cpp | 0.03s |

33 | mehedi_01 | Cpp14 | 0.04s |

34 | indroneel | Cpp14 | 0.04s |

35 | devcoder | CSharp | 0.04s |

36 | yasirnabil534 | Cpp | 0.04s |

37 | Islam_Rafat | Cpp14 | 0.05s |

38 | skmonir | Cpp | 0.06s |

39 | jewel_ | Cpp | 0.06s |

40 | _GhOstMan_ | Cpp | 0.06s |

41 | Superstorm | Cpp14 | 0.06s |

42 | tvirussust | Cpp | 0.06s |

43 | mhiceiuk | Cpp | 0.06s |

44 | Reayz | Cpp | 0.06s |

45 | Mohammed_Tamim | Cpp | 0.06s |

46 | nasib_mbstu | Cpp | 0.06s |

47 | ismail_cse15 | Cpp | 0.06s |

48 | Hasnaine | Cpp | 0.06s |

49 | isakib | Cpp | 0.06s |

50 | Asif_Mohammad | Cpp | 0.06s |

Copyright © 2015-2016 Dev Skill.

Feedback
#### Your feedback is our precious!

## Thank you for providing feedback! Our developers will be happy :)

## Sorry there was a problem when submitting the feedback. Please try again. :(