/******************************************************* * Copyright (C) 2015 Haotian Wu * * This file is the solution to the question: * https://www.hackerrank.com/challenges/almost-sorted * * Redistribution and use in source and binary forms are permitted. *******************************************************/ #include #include #include #include #include #include #include #include #include using namespace std; // Sort and compare. // Do as you are told. int main() { int n; int arr[100000]; scanf("%d",&n); for (int i=0;i diff; for (int i=0;i