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

131/258

Solve/Submission

Ranking

# User Language Timing
01 astinaam Cpp 0.00s
02 bu_hridoy Cpp 0.00s
03 _dipu Cpp14 0.00s
04 Rafsan35 Cpp 0.00s
05 Saimum_140128 Cpp 0.00s
06 pulak_ict_mbstu Cpp 0.00s
07 wazidullah_murad Cpp 0.00s
08 MamunAmin Cpp 0.00s
09 Mahadi024 Cpp14 0.00s
10 SRS_PBM Cpp 0.00s
11 miltonbhowmick Cpp14 0.00s
12 cse_nazmul Cpp 0.00s
13 KNUTH Cpp 0.00s
14 rabel Cpp 0.00s
15 Rijoanul_Shanto Cpp 0.00s
16 Rifatikbal Cpp 0.00s
17 Jihad Cpp 0.00s
18 bug_is_everywhere Cpp 0.00s
19 subhashis_cse Cpp 0.00s
20 Peregrine_Falcon Cpp14 0.00s
21 absa1am Cpp 0.00s
22 Shyamol_Paul Cpp 0.00s
23 Linkon_Ruhul Cpp 0.00s
24 Masum_ice Cpp 0.00s
25 Chayti_Saha98 Cpp14 0.00s
26 return_aim Cpp 0.00s
27 ssavi Cpp 0.00s
28 jualahmed Cpp 0.00s
29 DynamicOvi Cpp 0.00s
30 akib9ctg Cpp 0.00s
31 Rajan_sust Cpp14 0.00s
32 Himon_PUST Cpp 0.00s
33 abid7nsu C 0.00s
34 The_Viper Cpp 0.00s
35 khmahbub20 Cpp 0.00s
36 saiful130104 Cpp 0.00s
37 IIUC_minhazmiraz Cpp 0.00s
38 rabiulrafi01 C 0.00s
39 JUST_positive Cpp 0.00s
40 joymollick Cpp 0.00s
41 akram Cpp 0.00s
42 shahincsejnu Cpp 0.00s
43 arafatduha Cpp 0.00s
44 incognito_ju Cpp 0.00s
45 arafat_duha_MU Cpp 0.00s
46 ArifKhanShubro Cpp 0.00s
47 JubayerSohel Cpp 0.00s
48 zitul_mahmud Cpp 0.00s
49 xyzcoder Cpp 0.00s
50 duronto20 Cpp 0.00s
Feedback

Your feedback is our precious!



Or call +88 02 9853138 for support