#include #include #include using namespace std; int main() { ifstream f; f.open("input.txt"); ofstream ff; ff.open("output.txt"); int a=0,b=0,c=0,d=0,q=0; f>>a>>b>>c>>d; if(a>b){ swap(a,b); } if(c>d){ swap(c,d); } for(int i=a;i<=b;i++){ for(int j=c;j<=d;j++){ if(i==j){ q++; } } } ff<