Who is Single?

Правка en1, от Scrapper_, 2022-04-08 20:54:10

I need help in solving following problem

In a class, N students are standing in a row(consider 1-based indexing).Every student is wearing some colored t-shirt.Students wearing the same colored t-shirts are friends with each other.A student is lonely if he is friends with no one. You have to tell who all are lonely students.

Input T — test case N — number of students each of N lines Color i — 0...N

Sample test case 3 7 AABCDCE 12 AABBCCDEFDFE 8 HEYSHYSH

Sample Output: 3 3 5 7 0 1 2

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Scrapper_ 2022-04-08 20:54:10 529 Initial revision (published)