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 | feodorv | C | 0.00s |

02 | kissu_pari_na | Cpp14 | 0.00s |

03 | tanu_1603070 | Cpp | 0.00s |

04 | akashkumar2 | C | 0.01s |

05 | introverted | Cpp | 0.01s |

06 | baibhavbista | Cpp | 0.01s |

07 | DynamicOvi | Cpp | 0.01s |

08 | Rajan_sust | Cpp14 | 0.01s |

09 | ss1230 | Cpp14 | 0.01s |

10 | Bruteforcekid | Cpp14 | 0.01s |

11 | Shahriar_88 | Cpp14 | 0.01s |

12 | anik_JU | Cpp | 0.01s |

13 | Riad_IIT7 | Cpp | 0.01s |

14 | afzalul | C | 0.01s |

15 | prottoy919 | Cpp | 0.01s |

16 | cse_nazmul | Cpp | 0.01s |

17 | Foysol_Ahmed | Cpp | 0.01s |

18 | emrul | Cpp14 | 0.02s |

19 | Rizon_sunny | Cpp | 0.02s |

20 | maxhasan | Cpp | 0.02s |

21 | duronto20 | Cpp | 0.02s |

22 | nabil1997 | Cpp | 0.02s |

23 | badhansen123 | Cpp | 0.02s |

24 | Trusted_Frustrated | Cpp | 0.02s |

25 | IIUC_minhazmiraz | Cpp | 0.02s |

26 | Silent_Warrior | Cpp | 0.02s |

27 | nymphaea | Cpp14 | 0.02s |

28 | jayed_al_hasan | Cpp | 0.03s |

29 | souravahmed | C | 0.03s |

30 | akib9ctg | Cpp | 0.03s |

31 | robin_aust | Cpp | 0.03s |

32 | Anubis | Cpp | 0.03s |

33 | yasirnabil534 | Cpp | 0.04s |

34 | devcoder | CSharp | 0.04s |

35 | indroneel | Cpp14 | 0.04s |

36 | mehedi_01 | Cpp14 | 0.04s |

37 | Islam_Rafat | Cpp14 | 0.05s |

38 | Reayz | Cpp | 0.06s |

39 | _GhOstMan_ | Cpp | 0.06s |

40 | Indro_BU | Cpp | 0.06s |

41 | rayhan50001 | Cpp | 0.06s |

42 | Pure_Protea | Cpp14 | 0.06s |

43 | burhan103335 | Cpp | 0.06s |

44 | sohag_AUST | Cpp | 0.06s |

45 | Sagor | Cpp | 0.06s |

46 | anikatahsin | Cpp | 0.06s |

47 | Superstorm | Cpp14 | 0.06s |

48 | Nur_Alam39 | Cpp | 0.06s |

49 | Mr_adnan | Cpp | 0.06s |

50 | skmonir | 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. :(