|  | 
|  | 
| вернуться в форум | <-- Some Test Cases --> Hi, I writed this post because I wanted to share with you some of the test cases* that helped me a lot at the time. I hope it helps you :)
 --> Test 1:
 
 1
 A B C
 
 --> Answer:
 
 A undefined
 B undefined
 C undefined
 
 ------------------------------
 
 --> Test 2:
 
 5
 Isenbaev A B
 A B C
 D Q P
 C H N
 G N P
 
 --> Answer:
 
 A 1
 B 1
 C 2
 D 5
 G 4
 H 3
 Isenbaev 0
 N 3
 P 4
 Q 5
 
 ------------------------------
 
 --> Test 3:
 
 13
 Fominykh Isenbaev BBB
 BBB CCC AAA
 Ayzenshteyn Oparin Samsonov
 Ayzenshteyn Chevdar Samsonov
 Dublennykh Fominykh Ivankov
 Burmistrov Dublennykh Kurpilyanskiy
 Cormen Leiserson Rivest
 Oparin AA AAA
 Isenbaev Oparin Toropov
 AA DD PP
 PP QQ RR
 RR SS TT
 TT Toropov Oparin
 
 --> Answer:
 
 AA 2
 AAA 2
 Ayzenshteyn 2
 BBB 1
 Burmistrov 3
 CCC 2
 Chevdar 3
 Cormen undefined
 DD 3
 Dublennykh 2
 Fominykh 1
 Isenbaev 0
 Ivankov 2
 Kurpilyanskiy 3
 Leiserson undefined
 Oparin 1
 PP 3
 QQ 4
 RR 3
 Rivest undefined
 SS 3
 Samsonov 2
 TT 2
 Toropov 1
 
 ------------------------------
 
 --> Test 4:
 
 3
 Isenbaev A B
 A B C
 A Q W
 
 --> Answer:
 
 A 1
 B 1
 C 2
 Isenbaev 0
 Q 2
 W 2
 
 ------------------------------
 
 *(All test cases were made by other users, so you'll probably found them in other Posts/Topics/Discussions).
 
 Acknowledgments to:
 -> "Vit Demidenko" & "Nathalie"
 -> "Pavel Nikolov"
 -> "mccolt89"
 -> "Megakrit"
 
 
 -How I solved it:
 
 I solved this problem in Java, for that, I used:
 
 ->1 java.util.Scanner
 ->1 java.util.HashMap
 ->1 java.util.TreeMap
 ->3 java.util.HashSet
 ->1 java.util.LinkedList
 ->? java.util.StringTokenizer (or you can just simply use the Scanner method "next()").
 
 (The structures can be declared inside loops or other structures).
 
 Hope all this helped you :)
 
 
 Edited by author 08.04.2020 00:48
 
 Edited by author 08.04.2020 00:49
Re: <-- Some Test Cases --> ty | 
 | 
|