DCP-322: Sanvi and String Operations Back to All Problems

Beginner Beginners Problems > Ad-hoc


**Sanvi**, a very cute girl, has got two strings. She performs following operations as many times as she likes continuously on the first string . 1.) Erase the first character of the string, say "FirstChar" 2.) Append "FirstChar" to the end of the string. She may perform above operations as many times as she likes. The question is , can she transform first string into second string ?. If she can transform print "Yes" otherwise print "No" without any quote. Input: ------ Input starts with an integer **T (1<=T<=20)**, denoting the number of test cases. Each case contains two nonempty strings ( **max length 100** ) consisting of lowercase english characters separated by a space between them. Output: ------- For each case of input, output "**Yes**" or "**No**" as described in the problem statement. Sample Input ------------ 2 sanvi visan jaber kibria Sample Output ------------- Yes No


Problem Setter:

Bishal Gautam

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

126/248

Solve/Submission

Ranking

# User Language Timing
01 duronto20 Cpp 0.00s
02 ArifKhanShubro Cpp 0.00s
03 zitul_mahmud Cpp 0.00s
04 ssavi Cpp 0.00s
05 absa1am Cpp 0.00s
06 astinaam Cpp 0.00s
07 subhashis_cse Cpp 0.00s
08 foysal_007 Cpp 0.00s
09 Saimum_140128 Cpp 0.00s
10 cse_nazmul Cpp 0.00s
11 KNUTH Cpp 0.00s
12 akib9ctg Cpp 0.00s
13 Nazmul_WUB Cpp 0.00s
14 rabel Cpp 0.00s
15 Rijoanul_Shanto Cpp 0.00s
16 tariqiitju Cpp 0.00s
17 Linkon_Ruhul Cpp 0.00s
18 xyzcoder Cpp 0.00s
19 ronok_cse Cpp 0.00s
20 Masum_ice Cpp 0.00s
21 Jihad Cpp 0.00s
22 MamunAmin Cpp 0.00s
23 akram Cpp 0.00s
24 saiful130104 Cpp 0.00s
25 shahincsejnu Cpp 0.00s
26 joy25896 Cpp 0.00s
27 Dragon_Curve Cpp 0.00s
28 The_Viper Cpp 0.00s
29 Aman_khan Cpp 0.00s
30 arafatduha Cpp 0.00s
31 pulak_ict_mbstu Cpp 0.00s
32 mohibur Cpp14 0.00s
33 Shyamol_Paul Cpp 0.00s
34 Peregrine_Falcon Cpp14 0.00s
35 afzalul C 0.00s
36 bu_hridoy Cpp 0.00s
37 wazidullah_murad Cpp 0.00s
38 IIUC_minhazmiraz Cpp 0.00s
39 feodorv C 0.00s
40 miltonbhowmick Cpp14 0.00s
41 Chayti_Saha98 Cpp14 0.00s
42 bug_is_everywhere Cpp 0.00s
43 neel71 C 0.00s
44 JubayerSohel Cpp 0.00s
45 JUST_positive Cpp 0.00s
46 jualahmed Cpp 0.00s
47 incognito_ju Cpp 0.00s
48 khmahbub20 Cpp 0.00s
49 unknown420 Cpp 0.00s
50 BlueEye Cpp 0.00s
Feedback

Your feedback is our precious!



Or call +88 02 9853138 for support