#include #include #include #include using namespace std; int fib(int n){ if (n==0 || n==1) return 1; return n*fib(n-1); } int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ string word; int t; cin >> word; cin >> t; for(int i=0; ima; cin >> l; cin >> r; for(int j=l-l;j::iterator it; int s_count =0; int d_count =0; for(it=ma.begin(); it!=ma.end(); it++){ if(it->second%2==0){ d_count = d_count + it->second/2; } else{ d_count = d_count + it->second/2; s_count = s_count +1; } } if(s_count ==0){ cout << fib(d_count)<