#include #include #include using namespace std; int main(void) { constexpr int mod = int(powl(10, 9)) + 7; int T; scanf("%d", &T); int a, b, c, d, e; scanf("%d%d%d%d%d", &a, &b, &c, &d, &e); unordered_map dp, ndp; dp[0] = 1; for(int t=0; t