#19577: c++提示


089487 (089487)

學校 : 國立臺灣師範大學附屬高級中學
編號 : 82069
來源 : [220.130.10.185]
最後登入時間 :
2024-04-01 11:16:18
c010. 10107 - What is the Median? -- UVa10107 | From: [223.137.111.156] | 發表日期 : 2019-10-11 13:24

用vector以及lower_bound函式

關鍵程式片段如下:

if(v.empty()) v.push_back(n);
else
{
//int pos=-v.begin();
v.insert(lower_bound(v.begin(),v.end(),n),n);
}

 
ZeroJudge Forum