# 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 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

# 134/281

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
18 Faizul_BU Cpp 0.00s
19 Logic_Hunter Cpp14 0.00s
20 saiful_alam11 Cpp 0.00s
21 Ashik_01 Cpp14 0.01s
23 codelover Cpp 0.01s
24 prateepm Cpp14 0.01s
25 monir769 Cpp14 0.01s
26 Morass Cpp14 0.01s
27 hrOarr Cpp14 0.01s
28 emrul Cpp14 0.01s
29 Masum_ice Cpp14 0.01s
30 RandyWaterhouse Python3 0.04s
31 I_Monimul Cpp14 0.08s
32 ishtupeed Cpp14 0.09s
33 aiven Python3 0.13s
35 ashiq2446 Cpp14 0.23s
36 Rupasree Cpp14 0.26s
37 Jubair_123 Cpp14 0.27s
38 kazinayeem Cpp14 0.32s
39 abinash Cpp14 0.33s
40 cse_nazmul Cpp14 0.33s
41 Mohtasim Cpp14 0.34s
42 mamun4122 Cpp14 0.36s
43 rana_cse Cpp14 0.36s
44 howcum Cpp14 0.37s
45 dot0 Cpp14 0.37s
46 kamrulashraf Cpp14 0.39s
47 Bidhan_Biswaas Cpp14 0.39s
48 siamcr7 Cpp14 0.40s
49 rifat_cse Cpp14 0.40s
50 tawsifsazid Cpp14 0.40s
Feedback