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 shamimjucse Cpp 0.00s
02 _GhOstMan_ Cpp 0.00s
03 Riaz_BSMRSTU Cpp 0.00s
04 MRITuhin Cpp14 0.00s
05 S_Saqib Cpp 0.00s
06 we7d Cpp 0.00s
07 Not_Found0001 Cpp 0.00s
08 ehsan_sshuvo96 Cpp 0.00s
09 sk23 Cpp 0.00s
10 Shakil_Mahmud Cpp 0.00s
11 Dragon_Curve Cpp 0.00s
12 kakarotto Cpp 0.00s
13 obujgalib Cpp 0.00s
14 Zihad Cpp 0.00s
15 tariqiitju Cpp14 0.00s
16 mahade31 Cpp14 0.00s
17 ss1230 Cpp14 0.00s
18 Tahseen Cpp 0.00s
19 feodorv C 0.00s
20 Pure_Protea Cpp14 0.00s
21 unknown420 Cpp 0.00s
22 prateepm Cpp14 0.00s
23 Arpan_cse_2k14 Cpp 0.00s
24 Sakhawat_CoU Cpp 0.00s
25 refatul_fahad Cpp 0.00s
26 Frdhsn Cpp 0.00s
27 fayedanik Cpp 0.00s
28 duronto20 Cpp 0.00s
29 pulak_ict_mbstu Cpp 0.00s
30 leenaiitju Cpp 0.00s
31 joty_ict Cpp 0.00s
32 mohibur Cpp 0.00s
33 foysalislam Cpp14 0.00s
34 John_Player Cpp14 0.00s
35 Sketch Cpp 0.01s
36 Chayti_Saha98 Cpp14 0.01s
37 emrul Cpp 0.01s
38 Wahia_Tasnim Cpp14 0.01s
39 Silent_Warrior Cpp 0.01s
40 yasirnabil534 Cpp 0.01s
41 subhashis_cse Cpp 0.01s
42 Bisnu039 Cpp 0.01s
43 Maruf_Robin Cpp 0.01s
44 Riz1ahmed Cpp 0.01s
45 Asif_Mohammad Cpp 0.01s
46 orpib Cpp 0.01s
47 Log_out Cpp 0.01s
48 t0whid Cpp 0.01s
49 7Mahfuz Cpp 0.01s
50 NIverdPereira Cpp 0.01s
Feedback

Your feedback is our precious!



Or call +88 02 9853138 for support