我就出示下代码
#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
int a[111],x,y;
int main()
{
cin>>a[1]>>a[2]>>a[3]>>a[4]>>x>>y;
sort(a+1,a+5);
if(y<a[1])cout<<y-x+1;
else if(x<a[1]) cout<<a[1]-x;
else cout<<0;
}