#include using namespace std; bool sort(int *a, int *b, int *c, int *d) { cerr<<"sort"<<*a<b) { buf = a; a = b; b = buf; result = true; } if (b>c) { buf = b; b = c; c = buf; result = true; } if (c>d) { buf = c; c = d; d = buf; result = true; } return result; } int main () { int a,b,c,d; cin>>a>>b>>c>>d; for(;sort(&a,&b,&c,&d);){} cerr<