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

131/275

Solve/Submission

Ranking

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

Your feedback is our precious!



Or call +88 02 9853138 for support