sdutacm 串結構練習 字串連線

2021-07-28 01:31:48 字數 808 閱讀 8414

串結構練習

——字串連線

timelimit: 1000ms memory limit: 65536kb

submit

statistic

problem description

給定兩個字串

string1

和string2

,將字串

string2

連線在string1

的後面,並將連線後的字串輸出。

連線後字串長度不超過

110。

input

輸入包含多組資料,每組測試資料報含兩行,第一行代表

string1

,第二行代表

string2

。output

對於每組輸入資料,對應輸出連線後的字串,每組輸出佔一行。

example input

123654

abssfg

example output

123654

abssfg

hint

author

趙利強#include #include#include#include#include#include#include#include#define cmax 100003

using namespace std;

int main()

{ char a[110],b[110];

while(~scanf("%s",a))

{ scanf("%s",b);

strcat(a,b);

cout<

串結構練習 字串匹配

time limit 1000ms memory limit 65536k 給定兩個字串string1和string2,判斷string2是否為string1的子串。輸入包含多組資料,每組測試資料報含兩行,第一行代表string1,第二行代表string2,string1和string2中保證不出現...

串結構練習 字串匹配

time limit 1000ms memory limit 65536k 給定兩個字串string1和string2,判斷string2是否為string1的子串。輸入包含多組資料,每組測試資料報含兩行,第一行代表string1,第二行代表string2,string1和string2中保證不出現...

串結構練習 字串匹配

給定兩個字串string1和string2,判斷string2是否為string1的子串。輸入包含多組資料,每組測試資料報含兩行,第一行代表string1,第二行代表string2,string1和string2中保證不出現空格。對於每組輸入資料,若string2是string1的子串,則輸出 ye...