Sort by

recency

|

12 Discussions

|

  • + 0 comments

    Can you explain some more reasons ? اقوى دعاء لجلب الحبيب

  • + 1 comment

    Solution in Python 3

    p = int(1e9+7)
    def intsc(l1,l2):
        if l1==[] or l2==[]:
            return([])
        else:
            a = max(l1[0],l2[0])
            b = min(l1[1],l2[1])
            if b<a:
                return([])
            else:
                return([a,b])
    def cd(l):
        if l==[]:
            return(0)
        else:
            return(l[1]-l[0]+1)
    
    t = int(input())
    for tst in range(t):
        
        s = input().strip().split()
        w = []
        for i in s:
            w.append(int(i))
        z= {}
        z[0]=[w[0],w[1]]
        z[1]=[w[2],w[3]]
        z[2]=[w[4],w[5]]
        z[3]=[w[6],w[7]]
    
        comp = 0
        for i in range(4):
            tmp = 1
            L = intsc(z[i],z[(i+1)%4])
            j = (i+2)%4
            k = (i+3)%4
            tmp = (tmp*cd(L))%p
            tmp = (tmp*cd(z[j]))%p
            tmp = (tmp*cd(z[k]))%p
            comp = (comp+tmp)%p
        for i in range(4):
            tmp = 1
            L = intsc(z[i],z[(i+1)%4])
            L = intsc(L,z[(i+2)%4])
            tmp = cd(L)%p
            tmp = (tmp*cd(z[(i+3)%4]))%p
            comp = (comp-tmp)%p
        a1 = intsc(z[0],z[1])
        a2 = intsc(z[2],z[3])
        a3 = intsc(z[1],z[2])
        a4 = intsc(z[3],z[0])
        comp = (comp - (cd(a1)*cd(a2))%p)%p
        comp = (comp - (cd(a3)*cd(a4))%p)%p
        b = intsc(a1,a2)
        comp = (comp+3*cd(b))%p
        tot = 1
        for i in range(4):
            tot*=cd(z[i])
            tot%=p
        tot-=comp
        tot%=p
        print(tot)
    
  • + 0 comments

    I get the output shown here with the input you gave, but I still fail case 3 & 4 when I submit my code. surah for love back

  • + 0 comments

    Pretty helpful and understandable update here that would be wise. The people who looking for the informative stuff about the programming and the other subject help can grab it her easily. Your paper masters reviews are pretty understandable to all must recommend others.

  • + 0 comments

    To get free food coupon's takepart in Wendy's review https://talktowendysurvey.com/

    what's more, win the reward. Wendy's eatery compensates their members in the overview with money cost or with free nourishment coupons pursue the site for more data.