Company: Tower Research_3rdaug
Difficulty: medium
Count Stable Configurations Tower Research runs a distributed network of N servers, labelled 1 through N , joined by M bidirectional links. Every server must be assigned a value taken from an array A of K distinct integers. A server may reuse a value that another server already took. A configuration is stable when every link joins two servers whose values sum to an odd number. Formally, for every link (u, v) : value[u] + value[v] is odd. Count the stable configurations. The count can be enormous, so report it modulo 998244353 . Two configurations are different when some server holds a different value in one than in the other. Input Format The first line has three space-separated integers N , M and K . Each of the next M lines has two space-separated integers u and v , one bidirectional link. Servers are numbered from 1, so 1 <= u, v <= N . The last line has K space-separated distinct integers, the array A . A link may be listed more than once, and a link may join a server to itse