Advertisement
deushiro

dsadfa

Nov 24th, 2019
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.77 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. #include <cmath>
  4. #include <algorithm>
  5. #include <queue>
  6. #include <map>
  7. #include <set>
  8. #include <bitset>
  9.  
  10. using namespace std;
  11.  
  12. typedef long long ll;
  13. const ll INF = 1e9 + 7;
  14.  
  15. int main() {
  16.     ios_base::sync_with_stdio(false);
  17.     cin.tie(0);
  18.     cout.tie(0);
  19.     int n;
  20.     cin >> n;
  21.     vector<pair<int, int>> a;
  22.     for(int i = 0; i < n; ++i){
  23.         int x;
  24.         cin >> x;
  25.         a.push_back({x, i});
  26.     }
  27.     int m;
  28.     sort(a.begin(), a.end());
  29.     reverse(a.begin(), a.end());
  30.     cin >> m;
  31.     for(int i = 0; i < m; ++i){
  32.         int k, pos;
  33.         cin >> k >> pos;
  34.         vector<int> ans;
  35.         for(int i = 0; i < k; ++i){
  36.             ans.push_back(a[i]);
  37.         }
  38.     }
  39.    
  40.    
  41.    
  42.    
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement