runnig

[hackerrank] Insertion Sort

Feb 23rd, 2013
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.64 KB | None | 0 0
  1. #include <cmath>
  2. #include <cstdio>
  3. #include <vector>
  4. #include <iostream>
  5. #include <algorithm>
  6. using namespace std;
  7.  
  8.  
  9. void print(vector<int> & A)
  10. {
  11.     const int N = A.size();
  12.     for(int i = 0; i < N; ++i)
  13.     {
  14.         cout << A[i] << ' ';
  15.     }
  16.     cout << '\n';
  17. }
  18.  
  19. int main() {
  20.     /* Enter your code here. Read input from STDIN. Print output to STDOUT */  
  21.     int N;
  22.     cin >> N;
  23.    
  24.     int i;
  25.     vector<int> A(N);
  26.     for(i = 0; i < N; ++i)
  27.     {        
  28.         cin >> A[i];
  29.     }
  30.    
  31.     for(i=1; i < N; ++i)
  32.     {
  33.         for(j=i-1; j>=0; --j)
  34.         {
  35.             if
  36.         }
  37.     }
  38.    
  39.     return 0;
  40. }
Add Comment
Please, Sign In to add comment