Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- int n;
- scanf("%d",&n);
- int a[n+5];
- for(int i=0;i<n;i++){
- scanf("%d",&a[i]);
- }
- sort(a,a+n); //sorts from starting 0 index to n-1
- sort(a+1,a+n+1); //sorts from starting 1 index to n
- sort(a+2,a+5); //sorts from starting 2 index to 4
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement