原题链接:
https://ac.nowcoder.com/acm/contest/1001/A
个人觉得这道题用map和排序就没啥关系了,算法指南想用这个题锻炼离散化,我也没看懂离散化版本的题解,就按map来吧(没有利用到map排序的性质,只是用它记录映射关系)
解题思路:见代码 ~
#include<iostream>
#include<cstring>
#include<map>
using namespace std;
const int N = 2e5 + 10;
map<int , int>ver;
int n, m, besti;
struct node{
int aud, sub;//aud记录这门语言对应的音频,sub记录对应的字幕