DCP-143: Dot Game Back to All Problems

Easy Graph Theory > Breadth First Search/Depth First Search


Two friends Tultul and Tasfia are playing a game in a 2D grid. Each of them has a mark of their own kind, for Tultul it is ' * ' ( ASCII 42 ) and for Tasfia it is ' . ' ( ASCII 46 ) . Both of them fill the grid with their mark, and the position where no mark has been made is replaced with a cross ' X ' ( ASCII 88 ) . Can you find the maximum value of their mark where they are all connected to each other ? ( both horizontally and vertically ) . The maximum value determines the winner. Input: ------ Input consist of m column and n row of the grid ( m, n <=15 ). Output: ------- Print only a single line denoting "TULTUL WINS THE ROUND." or "TASFIA WINS THE ROUND." or "NOBODY LOSES." by calculating their points. Sample Input ------------ 5 4 XXX*. .X**X X..XX .XXX. Sample Output ------------- TULTUL WINS THE ROUND. Hints ------------- Here Tultul has 3 ' * ' marks adjacent to each other where Tasfia has 2 ' . ' marks adjacent max at a time. So Tultul wins the round.


Problem Setter:

Sifat Siddiqi Shishir

Please login to submit solution to this problem.

Problem Limits

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

Problem Stats

133/280

Solve/Submission

Ranking

# User Language Timing
01 Tuli_Das Cpp14 0.00s
02 ash12 Cpp14 0.00s
03 seyedssz Cpp14 0.00s
04 MAHRahat Cpp14 0.00s
05 anik_JU Cpp14 0.00s
06 feodorv C 0.00s
07 bishal_biswas Cpp14 0.00s
08 pulak_ict_mbstu Cpp14 0.00s
09 _dipu Cpp14 0.00s
10 SakibAlamin Cpp 0.00s
11 shuvo_mbstu Cpp 0.00s
12 pritom98 Cpp14 0.00s
13 subhashis_cse Cpp14 0.00s
14 Jisancse Cpp 0.00s
15 tariqiitju Cpp 0.00s
16 aaman007 Cpp14 0.00s
17 riadspartanbd Cpp 0.00s
18 Faizul_BU Cpp 0.00s
19 Logic_Hunter Cpp14 0.00s
20 Ashik_01 Cpp14 0.01s
21 Madhab Cpp 0.01s
22 codelover Cpp 0.01s
23 prateepm Cpp14 0.01s
24 monir769 Cpp14 0.01s
25 Morass Cpp14 0.01s
26 hrOarr Cpp14 0.01s
27 emrul Cpp14 0.01s
28 Masum_ice Cpp14 0.01s
29 RandyWaterhouse Python3 0.04s
30 I_Monimul Cpp14 0.08s
31 ishtupeed Cpp14 0.09s
32 aiven Python3 0.13s
33 gbriyad Cpp14 0.22s
34 ashiq2446 Cpp14 0.23s
35 Rupasree Cpp14 0.26s
36 Jubair_123 Cpp14 0.27s
37 kazinayeem Cpp14 0.32s
38 abinash Cpp14 0.33s
39 cse_nazmul Cpp14 0.33s
40 Mohtasim Cpp14 0.34s
41 mamun4122 Cpp14 0.36s
42 rana_cse Cpp14 0.36s
43 howcum Cpp14 0.37s
44 dot0 Cpp14 0.37s
45 kamrulashraf Cpp14 0.39s
46 Bidhan_Biswaas Cpp14 0.39s
47 siamcr7 Cpp14 0.40s
48 rifat_cse Cpp14 0.40s
49 tawsifsazid Cpp14 0.40s
50 Mehedimuaz Cpp14 0.40s
Feedback

Your feedback is our precious!



Or call +88 02 9853138 for support