fork download
  1. #include <iostream>
  2. #include <vector>
  3. #include <algorithm>
  4. using namespace std;
  5.  
  6. int main() {
  7. vector<int> v {11, 22, 10, 20, 44, 4};
  8. sort(v.begin(), v.end(), [](auto a, auto b) { return a > b; });
  9. cout << v.size() << endl;
  10. for(auto i : v) cout << hex << i << ' ';
  11. return 0;
  12. }
Success #stdin #stdout 0s 4296KB
stdin
Standard input is empty
stdout
6
2c 16 14 b a 4