test datum generation easy task often generate big random test case ensure thorough testing solution correctnessfor example consider problem old Codeforces round its input format look roughly followsThe line contain single integer n 1nmaxn size set the second line contain n distinct integer a1a2an 1aimaxa element set increase orderif do not pay attention problem solution look fairly easy generate good test case problem let nmaxn random distinct ai 1 maxa sort soon understand easyhere actual problem solution Let g great common divisor a1a2an let xangn then correct solution output Alice x odd Bob x evenconsider wrong solution problem differ correct formula calculate xThe wrong solution calculate x xang subtract nThe second wrong solution calculate x xann divide ga test case interesting make wrong solution output incorrect answerGiven maxn maxa q find number interesting test case satisfy constraint output modulo q