DCP-521: Amazing string Back to All Problems

Easy Beginners Problems > Implementation


**Amazing string** is a string whose all [substrings][1] are [palindrome][2]. You are given a string **S**, find how many substrings of S are Amazing string. Input: ------ Input starts with an integer **T (1<=5)**, denoting the number of test cases. Each case contains an string of lowercase letters [ 'a' to 'z' ]. Length of string is at max **10000**. Output: ------- For each test case print required answer. Sample Input ------------ 3 abab aaaa aaba Sample Output ------------- 4 10 5 [1]: https://en.wikipedia.org/wiki/Substring [2]: https://en.wikipedia.org/wiki/Palindrome


Problem Setter:

Bir Bahadur Khatri

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

75/128

Solve/Submission

Ranking

# User Language Timing
01 duronto20 Cpp 0.00s
02 S_Saqib Cpp 0.00s
03 obujgalib Cpp 0.00s
04 Shakil_Mahmud Cpp 0.00s
05 shamimjucse Cpp 0.00s
06 tariqiitju Cpp14 0.00s
07 Pure_Protea Cpp14 0.00s
08 Arpan_cse_2k14 Cpp 0.00s
09 MRITuhin Cpp14 0.00s
10 Dragon_Curve Cpp 0.00s
11 Tahseen Cpp 0.00s
12 pulak_ict_mbstu Cpp 0.00s
13 mohibur Cpp 0.00s
14 kakarotto Cpp 0.00s
15 fayedanik Cpp 0.00s
16 _GhOstMan_ Cpp 0.00s
17 feodorv C 0.00s
18 leenaiitju Cpp 0.00s
19 foysalislam Cpp14 0.00s
20 ss1230 Cpp14 0.00s
21 Not_Found0001 Cpp 0.00s
22 Sakhawat_CoU Cpp 0.00s
23 unknown420 Cpp 0.00s
24 John_Player Cpp14 0.00s
25 rabbycse Cpp 0.00s
26 joty_ict Cpp 0.00s
27 Frdhsn Cpp 0.00s
28 mahade31 Cpp14 0.00s
29 Riaz_BSMRSTU Cpp 0.00s
30 Zihad Cpp 0.00s
31 sk23 Cpp 0.00s
32 ehsan_sshuvo96 Cpp 0.00s
33 prateepm Cpp14 0.00s
34 we7d Cpp 0.00s
35 Sketch Cpp 0.01s
36 st3inum Cpp 0.01s
37 Riz1ahmed Cpp 0.01s
38 Asif_Mohammad Cpp 0.01s
39 Wahia_Tasnim Cpp14 0.01s
40 muradhossen Cpp 0.01s
41 fuad036 Cpp 0.01s
42 Rijoanul_Shanto Cpp14 0.01s
43 iammarajul Cpp 0.01s
44 Bisnu039 Cpp 0.01s
45 jayed_al_hasan Cpp 0.01s
46 Maruf_Robin Cpp 0.01s
47 Log_out Cpp 0.01s
48 Riad_IIT7 Cpp14 0.01s
49 Chayti_Saha98 Cpp14 0.01s
50 Silent_Warrior Cpp 0.01s
Feedback

Your feedback is our precious!



Or call +88 02 9853138 for support