repo: ownRepo

func_name: #include<iostream>

original_string: #include<iostream>

url: noURL

partition: validation


func_name: main()

original_string:
int main(){
    stack<int> st;
    st.push(2);
    st.push(4);
    st.push(5);
    st.push(6);
    st.push(3);
    st.push(4);
    //for(auto elem:st) cout << elem << endl;
    int count = st.size();
    for (size_t i = 0; i < count; i++)
    {
        cout << st.top() << endl;
        st.pop();
    }

    vector<int> v1 {5,4,3,21,5,6,8};
    cout << "v1 unsorted: " << endl;
    for(auto elem:v1) cout << elem << " ";
    cout << endl;

    sort(v1.begin(), v1.end(), [&](int a, int b){return a > b;});
    cout << "v1 sorted: " << endl;
    for(auto elem:v1) cout << elem << " ";
    cout << endl;

    vector<int> v2;
    copy_if(v1.begin(), v1.end(), back_inserter(v2), [&](int a) {return a!=5;});
    cout << "v2" << endl;
    for(auto elem:v2) cout << elem << " ";
    cout << endl;

    vector<int> v3;
    copy(v2.begin(), v2.end(), back_inserter(v3));
    reverse(v3.begin(), v3.end());
    cout << "v3" << endl;
    for(auto elem:v3) cout << elem << " ";
    cout << endl;

}

code_tokens: int main ( ) { stack < int > st ; st . push ( 2 ) ; st . push ( 4 ) ; st . push ( 5 ) ; st . push ( 6 ) ; st . push ( 3 ) ; st . push ( 4 ) ; // for ( auto elem : st ) cout << elem << endl ; int count = st . size ( ) ; for ( size_t i = 0 ; i < count ; i ++ ) { cout << st . top ( ) << endl ; st . pop ( ) ; } vector < int > v1 { 5 , 4 , 3 , 21 , 5 , 6 , 8 } ; cout << "v1 unsorted: " << endl ; for ( auto elem : v1 ) cout << elem << " " ; cout << endl ; sort ( v1 . begin ( ) , v1 . end ( ) , & ] ( int a , int b ) { return a > b ; } ) ; cout << "v1 sorted: " << endl ; for ( auto elem : v1 ) cout << elem << " " ; cout << endl ; vector < int > v2 ; copy_if ( v1 . begin ( ) , v1 . end ( ) , back_inserter ( v2 ) , & ] ( int a ) { return a != 5 ; } ) ; cout << "v2" << endl ; for ( auto elem : v2 ) cout << elem << " " ; cout << endl ; vector < int > v3 ; copy ( v2 . begin ( ) , v2 . end ( ) , back_inserter ( v3 ) ) ; reverse ( v3 . begin ( ) , v3 . end ( ) ) ; cout << "v3" << endl ; for ( auto elem : v3 ) cout << elem << " " ; cout << endl ; }