Prof. H.Pole and his Strict Classes
Practice
1 (1 votes)
Very Easy
Problem
5% Success 1060 Attempts 10 Points 1s Time Limit 256MB Memory 1024 KB Max Code

Prof. H.Pole takes classes every day from 9 to 10 AM . The Class is divided into 4 Catogories of Students .
1) The 9 Pointers , who arrives class between 8:01AM and 8:30AM.
2) The 8 Pointers ,who arrives class between 8:31 and 9:00 AM.
3) The Normal guys , who arrives class after 9:00 AM but before 10:00 AM ;)
4) The Unseen guys , who never go to class at any cost .

Prof. H.Pole is a Colorful Person . He will take class if the pattern of students arriving is different from all the Previous day .
What is the maximum number of days he will take classes ? As the number can be large , print answer mod 1000000007

Input : First line contains T denoting no. of test cases Next T lines contains four integer a,b,c,d denoting 9 pointers,8 pointers, normal guys and Unseen guys
Output : maximum number of days he will take classes

Constraints : 1 <= T,a,b,c,d <= 10^5

AUTHOR : trico

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading...
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:10
1 votes
Tags:
Basic MathC++MathObservation
Points:10
3 votes
Tags:
Basics of ImplementationMathBasic MathBasic Programming
Points:10
Tags:
Basic MathMathC++
Editorial

No editorial available for this problem.