1970-The-Beatles–Hey-Jude-(320)

Category: Music
Seeder: 14
Leecher: 0
Size: 75.58 MB

See more @ TorrentR.eu

The Life of Adam Smith, 2 edition

The Life of Adam Smith, 2 edition

ISBN: 0199550034

Category: Nonfiction

Read more

Royal Marines Mission Afghanistan COMPLETE S01

Royal Marines Mission Afghanistan COMPLETE



Quote:


Award wining director/cameraman Chris Terrill, the only civilian to have won a Royal Marines green beret, embeds with the Royal Marines of 42 Commando Company during their 6 month deployment to Afghanistan. The marines main job is to protect the small village of Loymanda. Lima Company, posted to Checkpoint Toki, patrol one of the most dangerous square miles in the world, riddled with IED s and crawling with insurgents.

The Royal Marines are not alone. They rely on the Royal Engineers to clear IED s; the Female Engagement Teams to reach out to the Afghan women; and the extraordinary talents of the tracker dogs trained to sniff out explosives. But this was a cruel tour and not only did 42 Commando lose the lives of seven men, but the incredibly dangerous work left nearly fifty marines with life-changing injuries.

Episode listing:

1. Deadly Underfoot

2. Venus Fly Trap

3. Dogs of War

4. Kill or Capture

5. Brothers in Arms

6. The Final Reckoning


Code:


http://rg.to/file/4c1de5b4e345399e72ebf4dc8aaacc29/royal.marines.mission.afghanistan.s01e01.dvdrip.xvid-ingot.avi.html
http://rg.to/file/95321a5a61b51eddd205cc0e9ec92563/royal.marines.mission.afghanistan.s01e02.ws.pdtv.xvid-ftp.avi.html
http://rg.to/file/25eaedabb7418142b8fca314302a1f75/royal.marines.mission.afghanistan.s01e03.mp4.html
http://rg.to/file/ff35b72523008e2b1d0c1456889b3bed/Royal.Marines.Mission.Afghanistan.S01E04.ws.pdtv.xvid.avi.html
http://rg.to/file/be801ee6ecc1e4114e161fb48a44f633/royal.marines.mission.afghanistan.s01e05.dvdrip.xvid-ingot.rar.html
http://rg.to/file/97a630dc6d4a6595bf797b003b421eca/royal.marines.mission.afghanistan.s01e06.mp4.html


Is it possible to use std::sort to sort by lexicographic order?

My problem looks like this:

  1. At the beginning u have to insert an amount of numbers.
  2. Next program counts the sum of digits of the number that u inserted in step one.
  3. All scores are inserted in vector called vec

The problem is this: At the end of the program all numbers that You inserted in steps 1, must be sorted depends of theirs sums of digits(Sorting in increasing order).

And ATTENTION please! For example if two of numbers(e.g. 123 and 12300) have the same sum of digits you have to sort them by the lexicographic order.

I don’t want to create function build by myself but I would like to use “sort” function from library but I have problem with that..Is it possible to use sort function also to sorting by the lexicographic order? Can someone can help me?
Example input:

6
13
36
27
12
4
123

Expected output:

12
13
4
123
27
36

My code:

#include<iostream>
#include<cmath>
#include<string>
#include<vector>
#include<sstream>
#include<algorithm>
using namespace std;

int main()
{
    vector<vector<int> > vec;
    int num;
    int n;
    cin >> n;

    for (int i = 0; i < n; i++)
    {
        cin >> num;
        vector<int> row;

        row.push_back(num);

        //conversion int to string:
        ostringstream ss;
        ss << num;
        string str = ss.str();

        int sum = 0;
        for (int g = 0; g < str.length(); g++){
            int pom = str[g] - '0';
            sum += pom;
        }

        row.push_back(sum);
        vec.push_back(row);
        row.clear();
    }

    //sort(vec[0][0], vec[vec.size()][0]);

    for (int i = 0; i < vec.size(); i++){
        for (int j = 0; j < 2; j++){
            //cout << vec[j] << " ";
        }
        cout << vec[0] << endl;
    }

    system("pause");
    return 0;
}