https://www.acmicpc.net/problem/30805 코드#include #include #include using namespace std;typedef pair pi;#define FASTIO ios::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);bool cmp(pi a, pi b) { if (a.first == b.first) return a.second b.first;}int main(){ FASTIO; int n, m; cin >> n; vector a, b; for (int i = 0, v; i > v; a.push_back({ v, i }); } cin >> m; for (int i = 0, v; i > v; b.push_..