測試用例1:輸入:tom,lily,tom,lucy,lucy,jack,tom,lucy
輸出:lucy
測試用例2:輸入:tom,lily,tom,lucy,lucy,jack,tom
輸出:tom
測試用例3:輸入:tom,lily,tom,lucy,lucy,jack,tom (違法字元)
輸出:error.0001
#include
//#include
#include
#include
using
namespace std;
struct ms
;int
find_s1_in_v
(string s1, vector v)
}return-1
;}bool
operator
>
(ms ms1, ms ms2)
return ms1.n > ms2.n;}/*
bool operator<(ms ms1, ms ms2)
*/int
main()
for(
int i =
1; i < s1.
size()
; i++)}
if((k=find_s1_in_v
(s1,v))!=
-1)else
if(j==-1
) i = j;
}sort
(v.begin()
, v.
end(
), greater()
);cout << v[0]
.ss;
return0;
}//tom,lily,tom,lucy,lucy,jack,tom
//tom,lily,tom,lucy,lucy,jack
//tom,lily,tom,lucy,lucy,jack,tom,lucy
測試用例:輸入:read read[addr=0x17,mask=0xff,val=0x7],read_his[addr=0xff,mask=0xff,val=0x1],read[addr=0xf0,mask=0xff,val=0x80]
輸出:0x17 0xff 0x7
0xf0 0xff 0x80
#include
//#include
#include
#include
using
namespace std;
intmain()
string s3 = s2.
substr
(i+1
, j - i+1)
; v.
push_back
(s3);
i = j+1;
}for
(int i =
0; i < v.
size()
; i++
) string s3 = v[i]
.substr
(j1,4)
; vv.
push_back
(s3)
; i1 = j1 +2;
} v1.
push_back
(vv);}
}if(v1.
size()
==0)for
(int i =
0; i < v1.
size()
; i++
) cout << v1[i]
[j]<<
" ";
} cout << endl;
}return0;
}/*0x17 0xff 0x7
0xf0 0xff 0x80*/
//read[addr = 0x17, mask = 0xff, val = 0x7],
//read_his[addr = 0xff, mask = 0xff, val = 0x1],
//read[addr = 0xf0, mask = 0xff, val = 0x80],
//read read[addr=0x17,mask=0xff,val=0x7],read_his[addr=0xff,mask=0xff,val=0x1],read[addr=0xf0,mask=0xff,val=0x80]
測試用例1:輸入:tom,lily,tom,lucy,lucy,jack,tom,lucy
輸出:tom lily tom lucy lucy jack tom lucy
測試用例2:輸入:read read[addr=0x17,mask=0xff,val=0x7],read_his[addr=0xff,mask=0xff,val=0x1],read[addr=0xf0,mask=0xff,val=0x80]
輸出:read[addr = 0x17, mask = 0xff, val = 0x7]
read_his[addr = 0xff, mask = 0xff, val = 0x1]
read[addr = 0xf0, mask = 0xff, val = 0x80]
#include
#include
#include
using
namespace std;
intmain1()
else
} res.
push_back
(substr)
;for
(int i =
0; i < res.
size()
;++i)
system
("pause");
return0;
}//tom,lily,tom,lucy,lucy,jack,tom,lucy
#include
#include
#include
using
namespace std;
intmain()
else
} res.
push_back
(substr)
;for
(int i =
0; i < res.
size()
;++i)
system
("pause");
return0;
}/*0x17 0xff 0x7
0xf0 0xff 0x80*/
//read[addr = 0x17, mask = 0xff, val = 0x7],
//read_his[addr = 0xff, mask = 0xff, val = 0x1],
//read[addr = 0xf0, mask = 0xff, val = 0x80],
//read read[addr=0x17,mask=0xff,val=0x7],read_his[addr=0xff,mask=0xff,val=0x1],read[addr=0xf0,mask=0xff,val=0x80]
網易互娛 9 7 第二批 筆試 第二題 層次樹
輸入 28 2 1 1 1 5 3 4 1 6 2 1 1 3 0 2 2 4 7 7 1 1 2 1 1 821 6 1 52 4 1 80 0 3 31 7 1 21 1 1 59 1 1 50 5 1 48 1 1 輸出 yes no網易互娛 第二批筆試第二題 層次樹 調了我乙個小時,被自己蠢...
一點資訊後端方向工程師筆試題第二批
一 不定項選擇題 1 關於http cookie的描述正確的是?a.cookie的超時時間通過服務端設定 b.session只能通過cookie的形式進行傳遞 c.一台計算機上安裝了多個瀏覽器,每個瀏覽器的cookie是單獨儲存的 d.cookie通過http header從瀏覽器傳送到服務端 2 ...
第二批37個城市設計試點名單公布
本報訊 第二批城市設計試點城市名單公布,上海 山東煙台 新疆阿勒泰等37個城市入選。近日,住房城鄉建設部下發通知,對做好試點工作提出要求。根據通知,試點工作自2017年7月開始,時間為2年。重點圍繞 創新管理制度 探索技術方法 傳承歷史文化 推動城市轉型 4方面內容開展工作。住房城鄉建設部要求,各試...