POJ 2572字串string的成員函式

2021-06-18 16:50:26 字數 469 閱讀 9337

題意:就是這個數反轉過來相加若相等剛輸出true,否則false……

如:

73+42=16
則:37+24=16等式成立,所以輸出true#include #include #include #include //包含優先佇列

#include #include #include #include #include #include #include #include using namespace std;

int abc(string s)

int main()

{ string s,s1,s2,s3;

while(cin>>s)

{if(s=="0+0=0")

{cout<<"true"

POJ 3981 字串替換

字串替換 time limit 1000ms memory limit 65536k total submissions 7501 accepted 3560 description 編寫乙個c程式實現將字串中的所有 you 替換成 we input 輸入包含多行資料 每行資料是乙個字串,長度不超過...

POJ3981 字串替換

字串替換 time limit 1000ms memory limit 65536k total submissions 9285 accepted 4438 description 編寫乙個c程式實現將字串中的所有 you 替換成 we input 輸入包含多行資料 每行資料是乙個字串,長度不超過...

POJ 3080 字串匹配

題意 給出n個字串,找出其最長公共子串,若子串長度 3,則輸出最長公共子串,否則輸出.本來以為要用到kmp或者字尾陣列什麼的,思考了很久沒有思路,看了一下discuss,發現可以暴力過,而且0ms,也是醉了.include include include include include includ...