#include using namespace std; struct pond{ double volume; double filled; double input; }; int n; int vol; vector data; double global_time; bool load_data(){ if(scanf("%d %d\n", &n, &vol)!=2)return false; global_time = 0; data.clear(); int temp; for(int i=0; i time){ shortest = time; } } } return shortest; } double step(){ double time = shortest_time(); if(time == -1)return -1; double overflow = 0; for(int i=0; i arr; while(scanf("%d", &n) == 1) { max = 0; arr.resize(n); for(int i = 0; i < n; i++) { scanf("%d",&arr[i]); } int p = 0; while(arr[p] != (p+1) && p < n) { swap(arr[p], arr[arr[p]-1]); max++; while(arr[p] == (p+1) && p < n) p++; } cout << max << endl; } */ return 0; }