teams.cpp: In function 'int main()':
teams.cpp:15:24: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
dp2[i&1][j] = (dp2[i&1^1][j+1] + (ll)dp2[i&1^1][j] * j) % MOD;
~^~
teams.cpp:15:46: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
dp2[i&1][j] = (dp2[i&1^1][j+1] + (ll)dp2[i&1^1][j] * j) % MOD;
~^~
teams.cpp:9:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf ("%d",&n);
~~~~~~^~~~~~~~~
teams.cpp:10:49: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for (int i = 1; i <= n; i++) scanf ("%d",&a[i]), mx[i] = max(mx[i-1],a[i-1]);
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~