#40860: 小小技巧(?


s214094@sphs.hc.edu.tw (機一孝46鄭家宇)

學校 : 私立磐石中學
編號 : 256026
來源 : [123.192.81.169]
最後登入時間 :
2024-10-05 15:26:10
e973. 3. 滿意度調查 (Survey of Satisfaction) -- 2019年4月TOI練習賽新手組 | From: [123.192.81.169] | 發表日期 : 2024-06-16 13:01

★重點:
1.我的Logic:用string UserInput -> 遍歷UI->轉成Map->再用vector存(目的是要排列 )->排列↙↙講解->輸出
 
2.如何排序vector pair的second值
[](const pair<int, int>& p1, const pair<int, int>& p2) {
        return p1.second < p2.second;
        }
//[]:表示捕獲列表
 
3.怎麼把map換成vector ->因為要排序
vector <pair<char,int> > vec(    ☆  Map.begin(),Map.end()      ☆);
 
 
ZeroJudge Forum