HPU暑期积分赛4

E题:

Description

这个世界并不一定抽象。

在某个大陆的某端,有一个异或王国,该国会评判一个人是否会使用异或(即位运算中的异或 XOR,对于两个数的二进制位,1 XOR 1 = 0, 0 XOR 0 = 0, 1 XOR 0 = 1,0 XOR 1 = 1)的能力,从而评判他是否是该国的人。

Philo为了避免风险,只能强行去完成国王的异或测试。

异或测试:一共有n个士兵棋子排成一列,他们的顺序不允许被打乱。每个棋子都有一个能力值a_iai​,你可以任意选取任意一段连续区间,从左到右依次进行异或和。要求获得最大的异或值。

请你输出能得到的最大的值。

Input

 

输入一个正整数n,(0 < n \leq 100)(0<n≤100)第二行会输入n个数字,a_1,a_2,a_3...a_n (0 < ai < 1e9)a1​,a2​,a3​...an​(0<ai<1e9)

Output

 

一个正整数;

Sample Input 1 

5
1 2 1 1 2

Sample Output 1

3

Sample Input 2 

3
1 2 7

Sample Output 2

7

思路:

刚看这个题O(100*100),这么简单吗?还没多少人写,不敢相信,看了几遍确认没毛病于是暴力签到,美滋滋

代码:

#include<bits/stdc++.h>
using namespace std;
int a[110];
int dp[110];
int main()
{
	int n,ans = 0;
	scanf("%d",&n);
	for (int i = 1;i <= n;i ++)
	{
		scanf("%d",&a[i]);
		ans = max(ans,a[i]);
	}
	for (int i = 1;i <= n;i ++)
	{
		int cnt = a[i];
		for (int j = i + 1;j <= n;j ++)
		{
			cnt = cnt ^ a[j];
			ans = max(ans,cnt);
		}
	}
	printf("%d\n",ans);		
	return 0;
}

J题:

装箱问题

Description

 

有一个箱子容量为 V (正整数, 0≤V≤20000 ),同时有 n 个物品( 0<n≤30 ,每个物品有一个体积(正整数,且保证n个物品体积和不超过int)。

要求 n 个物品中,任取若干个装入箱内,使箱子的剩余空间为最小。

Input

 

1 个整数,表示箱子容量

1 个整数,表示有 n 个物品

接下来 n 行,分别表示这 n 个物品的各自体积

Output

 

1个整数,表示箱子剩余空间。

Sample Input 1 

24
6
8
3
12
7
9
7

Sample Output 1

0

Source

丁金峰

思路:

一道简单的01背包签到题

代码:

#include<bits/stdc++.h>
#define ll long long
#define mem(a) memset(a,0,sizeof(a))
using namespace std;
int a[50];
int dp[20010];
int main()
{
	int v,n;
	scanf("%d %d",&v,&n);
	for (int i = 1;i <= n;i ++)
	{
		scanf("%d",&a[i]);
	}
	for (int i = 1;i <= n;i ++)
		for (int j = v;j >= a[i];j --)
			dp[j] = max(dp[j],dp[j - a[i]] + a[i]);
	printf("%d\n",v - dp[v]);
	return 0;
}

K题:

方框

Description

 

用'*'打印出一个nxn的字符图形(1<=n<=100).

Input

 

多组输入。每行输入一个n,输入EOF结束文件.

Output

 

输出一个满足题意的图形.

Sample Input 1 

1
2
5
6
10
11

Sample Output 1

*
**
**
*****
*   *
* * *
*   *
*****
******
*    *
* ** *
* ** *
*    *
******
**********
*        *
* ****** *
* *    * *
* * ** * *
* * ** * *
* *    * *
* ****** *
*        *
**********
***********
*         *
* ******* *
* *     * *
* * *** * *
* * * * * *
* * *** * *
* *     * *
* ******* *
*         *
***********

思路:

题目描述有点不详细,意思就是打一个多重回形,想了好久还是不太会,最后想到一种先按行打,最后把多的去掉的方法,时间不太够了,赛后同桌说可以存起来直接输出就好了,一语惊醒,唉,智商太低,自己还菜(大哭)

代码:

#include<bits/stdc++.h>
using namespace std;
char maze[110][110];
int main()
{
	int n;
	while (~scanf("%d",&n))
	{
		int p = n,r = 1;
		memset(maze,' ',sizeof(maze));
		while (n >= 1)
		{
			for (int i = r;i <= n;i ++)
			{
				maze[r][i] = '*';
				maze[n][i] = '*';
				maze[i][r] = '*';
				maze[i][n] = '*';
			}
			n -= 2;
			r += 2;
		}
		for (int i = 1;i <= p;i ++)
		{
			for (int j = 1;j <= p;j ++)
				printf("%c",maze[i][j]);
			putchar('\n');
		}
	}
	return 0;
} 

I 题:

Add one minus one

Description

 

给出n个数,每次可以选择两个数进行操作(即:一个数+1,另一个数-1;注意二者的值都变化;例:选择4与2进行操作,可以是4-1=3与2+1=3)。
问经过数次操作,最多能够得到多少个相同的数。
在保证得到的相同的数的数目最多的情况下,新生成的n个数中最大值与最小值的差最小为多少?

Input

 

输入包含一个整数T(1<=T<=100),代表T组测试数据。
每组测试数据,输入一个整数n(1<=n<=1000)。
接下来输入一个整数序列a[0],a[1],a[2]...a[n-1],其中0<a[i]<=100000(0<=i<=n-1)。

Output

 

对于每组测试样例,输出包含两部分:
第一行输出一个整数x,代表经过数次操作,最多能够得到的相同的数的数目。
第二行输出一个整数y,代表在保证得到的相同的数的数目最多的情况下,新生成的n个数中最大值与最小值的差最小为多少

Sample Input 1 

2
2
1 1
4
3 3 2 1

Sample Output 1

2
0
3
1

思路:

对于这n个数,我们不管他们都是多少,加起来之后把sum / n看成他们的标准来看,如果sum % n == 0,那么很显然,这n个数经过有限次变换可以变成sum / n,且差值为0,如果sum / n  != 0,那么我们最多变成n - 1个相同的,但这n - 1 个数我们可以变成 sum / n 或者 n - sum % n,所以只需要比较一下哪个差值最小即好

代码:

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int t;
	scanf("%d",&t);
	while (t --)
	{
		int n,x,sum = 0;
		scanf("%d",&n);
		for (int i = 0;i < n;i ++)
		{
			scanf("%d",&x);
			sum += x;
		}
		printf("%d\n",(sum % n) ? n - 1 : n);
		printf("%d\n",min(n - sum % n,sum % n));
	}
	return 0;
}

K题:

A Winged Steed

Description

 

有nn种千里马,每一种都有若干匹,第ii种马的颜值a_iai​,价格d_idi​.现有mm个牧马人要去挑选千里马,每一位牧马人对马的颜值都有要求:{所选马的颜值总和} \geqslant A_i⩾Ai​.现在让你来为牧马人做满足要求的最低预算.

Input

 

单组测试数据,第一行两个整数n,mn,m,( 1 \leq n,m \leq 1e4)(1≤n,m≤1e4).
接下来nn行,每行两个整数a_1,d_1,a_2,d_2,...a_n,d_na1​,d1​,a2​,d2​,...an​,dn​.
最后一行mm个整数A_1,A_2,...A_mA1​,A2​,...Am​,( 1 \leq a_i,d_i,A_i \leq 1e4)(1≤ai​,di​,Ai​≤1e4).

Output

 

输出mm个整数占一行,用空格隔开,表示每一位牧马人的最低花费.

Sample Input 1 

2 2
1 2
2 1
5 5

Sample Output 1

3 3

思路:

这题跟百度之星度度熊和大魔王那题基本一样,把Ai看成m个背包,对于每个背包都是完全背包的写法,但有一点就是背包是有一个最大容量的,而这道题只要花费最少,背包容量是不用管的,起初倒也想到了一个捷径就是把m给扩到1e5,如果di的数据小的话,我最后再把dp逆序处理一下就能过了,可惜学长也很聪明,di偏偏至少1e5+,所以投机取巧不可取,看了大牛的代码,原来只需要一个if

代码:

#include<bits/stdc++.h>
#define inf 0x3f3f3f3f
using namespace std;
const int maxn = (int)1e4 + 10;
int a[maxn],d[maxn],p[maxn];
int dp[maxn];
int main()
{
	int n,m,r = 0;
	scanf("%d %d",&n,&m);
	for (int i = 1;i <= n;i ++)
		scanf("%d %d",&a[i],&d[i]);
	for (int i = 1;i <= m;i ++)
	{
		scanf("%d",&p[i]);
		r = max(r,p[i]);
	}
	for (int i = 1;i <= r;i ++)
	{
		dp[i] = inf;
		for (int j = 1;j <= n;j ++)
			if (i < a[j])
				dp[i] = min(dp[i],d[j]);  //dp[i]表示某人要求颜值最少为i的最少花费 
			else
				dp[i] = min(dp[i],dp[i - a[j]] + d[j]);
	}
	printf("%d",dp[p[1]]);
	for (int i = 2;i <= m;i ++)
		printf(" %d",dp[p[i]]);
	putchar('\n');
	return 0;
}

A题:

Ball

Description

 

给a个黑球和b个白球,这些球除了颜色外没有别的不同,现随机的摸c个球,问至少有一个黑球的概率是多少?

Input

 

第一行,一个整数T表示测试组数( 0 < T \leq 1000<T≤100).
接下来T行,每行有三个用空格隔开的整数a,b,ca,b,c . (0 < a + b < 1e9, 0 < c <= b0<a+b<1e9,0<c<=b)

Output

 

对每个测试数据,请在一行中输出一个整数表示答案.(答案是一个p/q的形式且是模MOD下的意义,所以对于p/q就是 p * inv(q). MOD = 1e9 + 7MOD=1e9+7)

Sample Input 1 

1
3 2 1

Sample Output 1

200000002

Source

lzs

思路:

首先确定这道题的概率表示是1 - C(b,c) / C(a + b,c),即1 - p / q 的形式,然后就是求q的逆元,这里可以用费马小定理求逆元

但要注意一点就是a + b的数据量在1e9,暴力求a + b的阶乘肯定是不可能的,我们只能靠线下打表才能过,线下打表大致就是分块把时间复杂度从1e9缩到最大为块的大小(我的是1e5)然后就还把公式搞成好几个阶乘什么的我就不写了,全在代码里了

代码:

#include<bits/stdc++.h>
#define ll long long
using namespace std;/*  */
const ll mod = (int)1e9 + 7;
const int maxn = (int)1e4 + 50;
const int MAXN = (int)1e5;
//打表结果
ll f[maxn] = {1,457992974,107146451,373281933,559805077,154425679,679209364,526226141,644158465,730342129,641102369,99410016,363599536,361684231,539157852,448516387,309854856,95657988,663484182,311407840,578095319,229611066,765808214,142477924,585806050,119948046,579773866,816761238,861745250,639926530,5832229,630915411,242744764,932799119,899032987,929795683,150478174,609593566,627860803,358784546,259081142,57134788,544918953,8837465,907400235,59433257,421968194,500425006,278955367,248057675,974067448,293296655,996965954,212873022,473966292,261465122,479920311,214054614,752161465,719792849,316220877,224748329,1575312,652382508,620898940,663134272,405577532,116225742,956413299,257438891,690120224,437383740,24521750,596209708,576078970,304661605,929871923,412584039,14422365,604303898,251368199,808427728,582439362,55596303,220087090,704262886,98361446,295620142,763414075,927340096,980250487,248981102,618104354,839684660,398723029,386267146,764421236,558837848,476998749,345911460,682498929,58865407,152611299,37365474,345470378,681184885,403024660,947000742,140864216,22803916,134623568,733842728,373126171,337899910,461157687,427907847,363224613,642502601,526497651,759652538,95936601,173914411,19447777,382610562,584319463,140928835,569582206,226022701,9045328,784835785,933097914,76048860,959173997,780658683,559096347,391177708,12442609,40743573,508362944,781264818,167332441,33592533,75538458,714210512,275742306,739650465,137855279,889166166,60332461,798657991,598816162,464484063,31223863,344176836,767213175,292015879,564190300,296547306,222078457,977909564,336060741,474159159,632048012,952625711,895642779,810640932,171183381,305391286,851161246,209567103,248744620,551739578,635103992,526685249,605016577,892704918,853414712,566161015,546047842,894851390,626497524,433082692,867430659,512332467,904851726,118508240,475501650,815664143,298693437,652967545,288843364,865229790,52298443,803384326,743602491,406755567,479708090,643624459,125625755,316969704,491101308,708750650,662967999,571611259,385457627,668723114,482257159,899820643,393222011,401679067,245341950,587770205,474567292,725000295,196002818,560364972,754437203,498728445,542706821,970854495,565768255,246407879,524308015,724201825,545648343,913230882,58680787,702934318,792180189,131514392,246899319,192185054,99934426,98200674,788944266,756627904,676012445,734897886,610686655,130907341,968999,379198792,595032530,642903797,244819707,7998896,511710008,696896528,902492598,3525929,586350670,296000745,979137619,86414019,980655027,328019447,474700377,306429182,30153596,966484628,638587686,610696318,420932107,477267870,353049206,497857012,281562548,500956856,921459833,157600969,881746146,924389072,850268753,87892573,711117420,526658674,919203761,262557378,831442297,122316469,19426633,190298375,910061172,214146479,862345480,560607302,293462255,370787091,542955556,768910131,850500036,31318378,181909169,500033013,496532173,916364742,582702682,778006566,168757859,361307467,76479948,219226870,477639087,126712923,930180103,732041432,941723214,130794194,28581913,85186984,268124147,88516556,685075984,488636005,53790970,30473806,672818243,906976408,581968000,78103048,842267748,348586163,947532066,464777188,451116854,878381584,333707614,448457825,650009312,53500714,886294336,648763344,868829344,570443478,613566917,73995168,695702195,776902855,853242582,107560517,485348706,31109298,229827108,590398688,827117592,771153434,492711911,111567856,296974594,269232911,463847391,546178363,649090736,276477167,204857297,72518508,760019200,656049509,942731826,505080571,544075857,422316785,185735387,876081033,550588097,264638935,632593345,941126423,706629399,642498983,898187927,769005417,854821744,205765722,297803207,468116664,596729075,409898960,466541843,190009221,798967520,644759890,743420839,206187615,198998756,359622660,526623452,836550874,952046139,202071291,82926604,130808582,924044367,848688381,23777891,59761470,924258126,204012302,450837733,960862718,723816384,547639586,535478979,87226689,53975412,320608814,517436639,173809161,63932312,478679185,156530778,571781438,807928028,681452055,305569485,278224088,545662462,710807771,29493652,581977264,721996174,820229375,49456224,979809664,480391065,222176885,526281212,927482461,151117811,44756165,299085602,643484121,522961673,277106101,374481484,814440466,489252071,587318335,589831644,15753781,323604647,21771073,153393495,433729686,268164416,359932651,48301315,364347439,90383486,945599636,172827403,695951947,800588969,106892865,757146415,213590923,169338716,599312274,192601723,455503344,398699886,668865790,675113999,708394300,139831846,983975503,135840345,334346960,475501867,167226923,530389102,852493922,499294891,922898261,415376,619965361,114785958,146628257,576550918,635060378,294587621,55789549,714006296,103228118,457685563,221896631,875018827,971180026,254653019,274155554,813805606,9027036,172340144,518728060,498342367,676243000,258170000,496205651,43217172,714008239,67347853,912590546,909565792,54071151,16783532,557470122,495844744,95325827,402811155,352121070,497478507,262483032,110424728,511176934,441813281,494243939,581794056,623308396,561458723,638088240,196447201,631786341,404666335,740534402,118379156,726686688,910698506,247386026,850677980,485171663,722054885,412956409,777969547,174443758,12568481,435396042,748065817,998406941,60153582,835041554,228338256,47224101,433273104,703470628,521949545,574429123,52378412,689923780,701779420,21373798,407719831,329057927,445935909,452733231,752708852,583676448,15212588,386484802,650765251,905929785,762479457,957424115,398970308,220322640,808076198,342545697,39427394,783200314,8600742,289939123,746536789,851037511,586283387,996955070,655840660,3669475,152366450,554714747,741393509,132350382,811667359,786954929,415355660,247487948,386594397,249780014,97783708,345675441,333236625,744344195,778773518,504223583,205743536,43837847,570866962,306921081,242211856,938204550,218690396,660337482,27368307,203405586,562235036,777338999,987935647,467386519,849148138,213344778,692637504,484723081,438371670,242393158,422227498,474540423,845152439,44635470,883281454,754581166,243833737,586597007,59469516,437862846,765962345,46541961,89372661,498440078,972779460,152019116,599040453,291525698,5974669,453048923,324069108,627402642,180699112,9221150,833342486,957501068,793755411,505819550,766196482,879389444,468608739,548991822,812248718,679975009,494936006,900881518,59143878,179322181,606322308,313702365,732001446,745113316,635032673,147307265,759041389,311539953,554416265,704312744,86609485,831680874,559966857,945754267,658825730,435993596,586359929,752023770,562500933,631326068,889750731,862274558,724008021,208806798,806898745,607649469,995252950,966545159,135711291,42115344,340941507,996881960,700915958,950348612,324648749,886844916,722436788,639334305,59758328,695928204,371263376,451665831,265906250,745897488,850300987,198057134,61732363,498746984,887464462,75142816,625544428,110711160,279914778,750663512,644000584,527225600,180090545,934149554,9409022,354374784,788878910,896155508,631046702,409648989,358050946,743572663,714475801,713802282,883906209,985252397,808412394,932489383,528517448,703420540,316094660,603835511,724209709,201234928,544375689,768955866,996952918,751234943,79329551,329101495,136597179,409420559,64972739,757764453,930161980,536569979,585237443,776363214,422015194,886480772,62785084,307534126,374220150,275062583,44615465,107174693,1669644,683022434,42241449,863596908,58647723,210601394,929666976,229833865,307936472,228137471,361786913,680746754,974936549,282869723,107912795,470618701,225369475,690403142,703087658,308814861,480748381,845285046,2295485,386888956,880634238,550969600,805196528,858493510,188324947,181979084,595143852,569952666,926866806,727281230,742851567,901560583,666743467,685945863,973671409,760927536,837229828,103619480,243910108,208255482,697054929,727223125,57085695,897576723,469594245,906450662,199888908,436778250,649491763,967538915,274161939,180269718,558233225,161004891,470545797,585313332,526807168,167940320,244714186,320466978,411969385,899715096,54080847,727229960,427233799,249481023,579691190,782781095,754963083,656323163,169559902,775147177,270720182,305905177,588618211,693461260,145404005,982508606,478716222,874210350,293401592,401312408,614571924,795558854,321950925,905191310,459188207,229909051,805552722,458068555,508829534,552930818,304228537,134477995,355209596,817509706,534491822,236690524,947251800,886906713,225966128,669251006,986142683,938840598,701643375,102987153,439729802,522396951,759944655,732362994,349343101,504703143,48980788,413937464,212468510,483947085,840398449,875371951,259450229,445438821,983563606,624903360,704289349,646483676,442694685,405638730,899297830,741916079,121102289,936679745,405640886,556957390,513670887,599765024,961729079,492052755,235861787,460879693,281870391,896696769,270409779,850796519,798401543,491891996,369530217,351069528,888050723,934131213,920492865,2840333,298494436,834568419,756462483,532232962,628273353,552487230,656116726,644905132,247544137,784567951,294651705,196710441,412762822,258722347,489872437,108311672,736550105,289842964,461990959,725936626,534030848,857549983,365932794,427641633,610954403,402463759,440902696,142942626,253238972,822593212,682492613,63145422,522303856,870244745,839296517,322754828,85990869,497053200,288079694,730231033,617973869,807209645,825208191,209925961,111668651,52202406,884343068,116180433,125800325,910722070,805525713,132114154,184783824,369444386,425093556,887099188,56305184,828444444,939279559,538549429,912326839,973762120,855064933,632582978,756764497,408481567,973478770,403681506,706513987,490222388,632521245,270603374,897480658,684927290,888874515,473226336,168891766,869737690,413551441,380085027,450119928,217608725,687166876,679238566,349851104,450865123,804805577,652171521,160016093,651180933,64401654,641317239,546799298,842280946,304104093,179149268,927880474,821468634,870230497,819175369,673373340,157803266,543880181,858875026,83687737,166787816,876297919,949485734,298117414,234785917,660162137,189324843,753032322,196609367,989583729,771378560,934814019,279547675,759023037,759805090,546967731,374934947,400707264,666214297,26634340,223692929,676405347,855412084,30684171,199741118,990757848,30657162,981776332,104878668,122464431,341990172,567277637,98740827,737511882,577201116,888156482,686637388,936882737,932064720,350634174,713812944,112249297,933410458,998807506,746200907,945210513,631678522,324630241,842914737,966957906,589132443,44930135,45939683,726576875,928457586,856312450,954976637,61329065,72280012,987095152,887466028,39417871,437453830,816679377,290920929,984659637,977168136,375956346,754518701,152201272,703560907,47401357,200577402,573877927,826027689,322199735,809639670,112861607,822881351,382991165,696470764,108819476,940233703,497956225,75447134,939019242,250361638,259568406,754279483,40151094,184048067,281863274,76721110,720198656,887735369,414608027,410799320,139227607,530157868,963111262,554128225,60168088,518196473,597743038,241724280,797673080,142840220,516804319,842205233,956903770,789824550,692636218,510800671,376501201,709686772,283454561,261319829,168830642,77903701,79852813,636569892,432775082,845029536,378591066,10872431,168948455,200805416,879838297,542422449,365353075,664108863,14235602,641575341,936696483,377668907,603752857,616435469,218851785,226579369,790227812,212574473,770511792,202230095,191651583,753514148,37130006,174624465,277138066,264336491,784685853,305179612,400295761,627701264,962694684,865291934,212661821,580310773,487912147,308722031,674932318,247031822,697066277,221996401,245419396,429594588,330984733,102309489,721056741,645826210,367606436,778453854,421835306,718631045,560478118,240867843,620682731,228266417,704015358,24303115,859346814,641334412,220108638,789370638,929629213,76649355,258032745,334251014,483594161,557936424,744178841,498642391,661224977,116815366,362005376,845620414,792431280,812005526,610644835,999858943,107880912,612842107,261799937,207135398,925041977,574215692,331286268,356438399,995422447,21583210,376285455,179181224,168203998,147688544,63915001,921419581,731950688,835330203,346917761,115172504,851595228,330974286,802214249,911897005,771727692,935517277,921586643,316146626,310280612,529836182,551069866,216317674,544064410,205001747,6811130,966401412,792676030,877125482,441236680,53740014,500440019,434966417,935080803,574835154,199237620,533300434,124878394,576478595,238096591,550028962,732880514,716361213,583967898,563215357,393771071,723291751,423889038,885117574,567003562,479732576,740304600,225111059,211768084,661082230,89921218,82535817,147206837,672118586,187655305,507961672,873138566,845821126,751231582,684564333,107228569,732991977,787539126,192990501,653478705,977891023,710576505,641883740,972424306,107671981,275525858,803353065,711211981,125666214,682495521,520647294,379750380,30664649,623534362,780319015,834892236,778347028,332606953,362493992,89816323,130662492,714130414,454626256,335160196,173532562,17823426,695144455,465697749,924982465,447817657,141265712,728285308,255521825,243276029,307307993,532995050,877786708,545163218,85322142,716734025,74547082,688099880,378511070,554749550,947687337,787117889,195820162,502618954,437447268,543915886,199056778,907685793,620376395,60050552,459332010,998579767,130548251,731397402,733942454,350274220,228400287,838528120,131430119,797848181,491917168,198635873,379570268,187586151,643938537,515174333,643968701,126672033,713434896,395891998,225016576,455781723,518433326,586419431,435508211,647132471,21807917,935521357,634667210,172428290,128010060,780740034,576216272,447063192,422713438,265212968,111481282,406468142,619491099,159554990,366058259,833317992,705858408,520653845,812391270,802837814,483362110,332814802,186918049,887420150,115089189,14211262,184119620,605911169,449205554,423078378,745747516,577063899,55697417,970055531,331605728,513206217,965688167,40607687,222343461,351001772,903447414,829605980,229723106,250388809,317365847,148577573,85199112,449800991,689850274,727934933,945694759,735023078,19819402,487998999,511051974,737738750,918823817,634045080,748359168,744227785,80669050,585552623,956538933,856259313,705998863,386799500,888466594,296457528,29781141,441140793,292850529,343416042,170064486,82104855,21366770,840750201,764232222,528005624,543656809,761748690,776585743,959757496,747471725,232253360,184610391,190349508,469589673,363157570,132581614,175671239,654718819,862776555,465149642,513365505,424920050,713750699,824967213,803726808,443711760,128024882,342432253,881788966,369408163,244109365,559265613,136906899,478743321,372302392,956163585,155570288,810415848,249305450,277342089,1559745,456314629,397066469,44297505,25720042,193109503,626251836,764963544,177573201,320329176,695345956,23990272,677752342,780102969,793806704,36042990,581977030,172909004,646625129,994201042,261384175,373705179,253117073,866948624,245535187,953585846,757717391,105604793,80513018,159233180,849009131,470401477,439520189,67812570,712872275,600281990,92973848,30097622,64851034,145847776,323214113,38555965,664011932,494257332,298352021,762863177,255712655,574701099,946042845,216924807,747664143,959838896,711816007,857430604,691151364,388430024,285806889,645633352,395396851,612144871,444090941,981893588,95039844,53700143,522655892,396611787,377908620,795662922,257703472,799304706,659224434,224736251,26301094,217754133,83002883,991836842,862614058,917241114,475057494,829729572,80729842,847791064,339308141,105051540,907519187,231753353,223545290,879975518,614010914,457325108,570033864,786988579,279454856,972810743,793767325,24300293,430035302,596441047,143966252,836938423,664989237,626241124,213302213,339613808,512045319,653829979,735382383,411457261,661411739,347030001,827348878,843174958,814721633,377352247,531511759,7704403,271003610,248145670,642932826,76666205,195888993,917389320,54530329,334924957,8792644,30813167,141282580,860902189,142207463,901061345,576798521,74463655,540842540,681683931,369088993,947304403,10438986,761084808,881336900,890367422,457882808,861530314,448656552,792088815,620851842,137550654,352488342,907472333,286398811,607341382,731551699,607213319,397201286,25622251,352032421,995246811,424438049,560832809,690333383,860345146,212938473,981464903,170367135,397221880,348384180,593989303,900118182,714175793,545454871,999747695,509096183,39064964,557219900,381704521,269119299,478919708,71735354,994443441,971188122,983062272,827544702,211244778,143313131,890528521,674471405,602197504,617909056,471317917,356557690,953451069,678320208,875904257,72413193,716377542,727559899,496537397,538479815,23449003,137232509,653647200,677711203,918960390,245038045,800309032,533035983,386677716,252381793,329664557,579001093,361266974,289752035,126159086,908061115,123966201,81830860,456967785,927327790,56172380,717194510,215647839,66404266,624337266,587040263,512941829,864886893,208554578,930123178,619148003,168706834,80699549,555972231,277050752,346540153,5477055,726092354,680796549,865071734,852153563,691794731,775071686,195290384,417835997,505039565,64272141,105369595,364911332,318094322,375037471,251055417,317910906,97136305,499592861,259423383,442687415,615768075,294375015,48226379,977792437,49055565,365781870,349551356,222115693,439547835,703946438,441914739,290196031,783331349,654102668,14415592,165483393,785113347,622638790,698578769,742059574,256348629,297880214,627785281,862654900,437879870,950289061,83489485,260968439,444939632,448333065,669721484,644670437,951712820,370669875,16691404,681917347,66247239,942708553,109670626,886984548,964858552,135500451,811793940,481486627,43692008,516038396,52167191,806109952,817865822,748128727,989876896,498572695,873199303,939396841,943421142,535127661,307390891,837565341,26423599,448565644,908425681,499606972,568639586,119044256,763827725,843748489,547665832,357179482,705468334,137534839,515674128,932668364,103148840,106062072,867962375,540847991,143066173,244543942,65688464,285859263,288586996,499761057,993416534,60788676,27059824,722149196,350016754,230501974,249679480,201293368,483800403,113905458,620632962,296810433,182282878,249379003,917404120,72584471,735051019,734121977,613755669,493905303,699187663,854898209,778614746,186584782,296269301,229815422,172717571,832201414,946428264,86726457,64227251,862700457,302130199,169535375,996122673,612316360,29653283,762420171,566743853,809339058,675135087,147520480,125757468,538684091,23015220,103829665,69144282,216176364,91963875,835803486,747064884,464484668,707518700,130340710,602139210,852551970,865946552,635991081,304609790,670821828,315792222,958361805,79909943,894615158,748566338,656573792,444243246,3155630,677793008,631823487,71369280,832709662,316009903,460375535,187348575,481591637,698438828,286238670,588943683,382748764,653637010,368473396,262263266,272813972,109838563,714513012,579202306,687718378,976768405,94904185,653611079,31358341,743379209,294766070,574053420,569493380,621976669,590053798,644544622,973865472,669880848,634508459,656217362,48756031,105574531,413461119,29530499,502558053,61251444,752194712,703406898,50841595,452293734,647758074,304173654,176432957,962272195,264996898,443273892,83284607,902817853,529644882,965863401,446990857,542432219,497259364,57871728,629338780,483381085,536973025,862802054,159655332,146817944,269483469,34538816,898681562,601045763,433148161,654297097,283727326,974686011,90374873,488641593,107120057,325636655,735818423,196493142,993099187,837122513,243291133,261912790,196382512,498769510,91587051,437843114,4836530,616745496,858006685,177043432,312536013,781045243,288160985,215203239,527687702,630621321,415059133,267772361,131003911,828224642,682680116,815108093,221240172,243906544,311394036,26853683,972235533,950098683,409272593,950937270,611209607,24585059,169861732,910131508,438820406,933245637,381327638,398417914,422152610,613395893,894820080,668061275,282701431,31373935,618221035,616368450,882030133,776087191,402151355,791289062,198631047,194702413,323732767,284301461,38052679,238971581,25568305,914259332,51067262,376484863,595959409,937988951,174448162,643201093,424681958,511371690,968790319,217011832,5964086,248828832,683585700,214825867,339428847,813678395,71238069,557301633,276241559,85036725,549089151,73710858,253427558,408261121,483735630,231162188,103416990,911398531,839296257,312744814,130237543,631096421,246476028,372821319,39533056,894005672,776966386,848952161,263608737,365531126,810179861,407261940,272634280,835498847,188991751,61879608,704420328,958992544,15891112,821785476,399285228,580068092,325284740,825545235,476280208,489515035,382384912,925152039,574986171,139924045,558354458,837893999,495860053,981726228,916601824,974145698,918208928,914456118,805712132,62506502,50948164,599381336,841108662,671342714,855570134,253502443,433581025,724691727,628261317,493000568,521303788,796455047,445713321,379569031,153872982,454499514,183242789,636817583,143122280,671808625,905766941,133580252,814845293,332617055,513759980,48407083,203623357,238087006,679303242,288453502,707444333,584070283,170238260,525709741,523192970,463044231,636312996,946237212,363811497,266574253,411732052,665038715,457433989,345406040,778870155,342052927,322468524,910291942,298759301,639275237,261725778,666894368,599284582,197517090,114070293,800533801,62798867,114985663,700471086,683569260,622801338,727416461,17739814,447668677,10646349,845963889,329057489,492237273,542615510,48958052,145429818,14863281,194710256,982399964,24496032,84066292,832905400,450387329,816833100,521347279,420466887,581318867,471822076,504201844,774811254,817001543,525756615,834860913,397427533,452479777,211625896,797624286,831422618,393997958,420764146,662570964,270190093,763017204,613841722,710524918,766372356,573783638,100582220,722384751,989129263,93189280,726567430,368925948,483863520,774578782,901994472,128141880,128260642,57577699,635366775,672475624,550023357,475812562,425308208,780444992,261599124,956113007,917840849,31158979,89513859,338903704,777674102,740594930,16269955,30327041,580138880,196133374,51595198,639667205,211893860,784067427,774884768,45060610,488365066,205489214,653619028,609897705,994271859,890030947,632274575,707609521,720376032,806047532,297564469,51697523,88127333,751385829,476604857,784074598,137169197,879021109,760833057,464456846,389176331,224012738,446813248,206786423,835245756,16481395,792641649,757595751,470790379,172115341,485995884,115439068,135619318,395201336,545338291,543890274,493514980,677667796,203395995,75307702,230042603,472939116,600793137,282517784,344053349,220670562,450162369,746611934,798514455,116261993,865190077,691436204,790169198,991857982,945918607,73185230,66237287,836720967,628968887,562519302,504306053,557278802,638400577,856268751,281653965,803489706,461922911,379589733,600382558,268838846,451536110,704823268,962090669,422027886,635794655,447984334,933840480,638736741,757342384,173784895,928416376,936274462,895692186,513000960,258300540,600569863,204575866,903630901,941119794,243624360,319269172,10215879,605456984,299332708,722807834,745649909,393406836,835492163,126228476,61570384,242776918,250649611,248986172,471338418,691306302,656946705,136475968,762291053,545362947,481661251,215696160,964221559,746462701,163315222,752609613,376190954,31283683,77886816,272905930,938269070,852105378,170095245,727531419,961258156,381369130,463372147,846940606,647118969,104411233,95182730,603040874,521051639,73130408,928132071,885113729,357479404,862521291,440006366,689726316,91068149,254318224,596682713,653564247,502285607,758827428,27842076,174426673,814435597,285536511,115435332,737378295,659725221,247097879,566804955,617737077,555863276,957407946,954436899,616825963,495022305,168513718,621840415,809373476,419016530,641462345,187930450,178923716,950614205,708111863,136026497,159956452,650427674,783626784,588220375,537165746,99515953,989831882,19179738,278362386,506496856,656368348,355847369,811876656,474430173,997042337,141544165,243358236,29368029,90856613,710729672,952263049,194678932,326156906,233454730,185163716,232785168,316982054,981331732,738956090,113570024,387613366,269240725,26207554,771211236,90871114,968217984,329457457,482504225,591884047,366384665,586310505,18878032,199549653,859670660,783454081,908756610,92060641,904676787,192096742,564758715,30739366,757490458,773420208,789798345,75276833,196234471,746284182,877873054,103429406,270239666,580343044,83412859,607211788,39852073,203381481,759243154,923917422,994645885,626598334,277118392,555970356,91658702,931421167,565097382,639320111,791195765,832180690,337945304,239600428,79874094,932367859,26070851,284260086,613650278,366910724,370886950,107997590,678481982,328907857,702807165,580536800,595881374,122004844,969808707,582981397,593441490,989676882,845233368,62197433,112390913,503641881,287199918,785743245,199287301,245293699,73194471,780100219,12722112,233704711,730341625,877184955,143352852,320152437,898432986,338718815,960245410,624931561,96688732,157425179,103056890,210581805,357128875,771997115,220909560,1840485,926269464,861849309,275050620,5763741,677948390,41075514,667314832,837612271,671563881,391004385,59546001,957627119,781014065,129153672,339464594,427434851,886951140,542180267,956300519,145153314,267189882,492892618,483334477,557374702,167240465,971264480,469826147,214073632,242791773,455408691,982787195,941539403,897053425,10319518,108312174,705495687,404419260,557995229,213495567,155105232,329493881,653952225,194495711,384980585,839079953,264545446,744394023,805453609,799886608,605298160,324061977,542645367,4828968,310140232,479334442,799640596,64540172,775761576,237622412,540479427,57802491,624966087,75307485,320181148,271788964,963561052,367246992,478455522,449337229,587614008,750924279,389658403,27562780,540580252,135498044,598852458,172547388,57633758,796874733,861409420,559021338,477062193,381261137,374189245,277717575,664564240,6508639,53846536,182579383,938160268,649588249,462642743,369091773,93453923,591048681,629342824,547541822,148065403,203770813,115579849,237482332,2818365,884448724,120016795,811637561,790583043,913670594,401466246,171861798,629027151,660521215,724941610,594481480,26043089,353339603,414437626,705462701,905963469,578624825,463734842,200578945,665784958,53887029,872685892,889410460,879739165,65382100,74490294,119754265,481429323,444667960,433280298,858172947,698677632,839849206,929689972,727527500,574232930,363876491,296744952,453708370,506850730,448553303,90862569,192345193,67460412,874653794,970974855,516251793,181445064,655083733,188184247,579917597,496938387,736265527,3488435,943565520,4001937,114354987,30430299,322697676,387389897,84996211,573165716,316439118,827142329,321767973,982430591,622243748,844263530,33541892,478512057,336307844,834799686,217544623,638864204,765527479,548579330,488571552,366151601,901558026,693581936,224426443,816107869,788132977,669984112,891740370,708582798,79799739,82871673,285783983,449207855,495353045,385366502,618898635,304166404,566290786,79348935,876944194,693326853,893419849,29414443,337227397,267682503,183011467,822033361,200502210,602176820,119584347,60732294,75044998,415566603,654322415,496160702,380858207,902147323,41105587,787777295,779716363,421458551,537171634,109314780,416296106,33265522,996097969,450322491,117632702,271300601,744653725,207173800,665991924,681915730,776830268,575731875,898554793,570304907,98150112,538866169,649498583,970529845,617376992,1828981,914289783,106669234,335353644,517971781,535714239,139216710,57011781,761545908,176088357,973076776,130970069,612639119,54062950,853658583,581932933,417424271,197823988,385459037,104193664,511052103,920088375,83266596,611251733,431570758,281925319,862433417,603541468,825396690,520167099,458069605,54329101,310018458,419363534,726514084,999882733,515484293,609974294,560597174,144428843,810848551,787976961,19851870,965429853,239963293,188902380,228335563,663077658,105595573,21156992,673553422,264583298,122902472,160398980,926712446,117346006,61719728,365477695,207103817,907509168,747317920,141023870,292685571,151319402,40271146,432853212,302248191,972573872,964295934,422341486,226606194,932154665,721157312,990918946,736209282,469793622,309674228,548515509,850425472,584499542,232338931,384832279,629958996,607730875,405769836,686042136,400997851,568889025,799102651,252498130,12758846,728066225,580580178,450718279,18596652,139074490,427446622,414985236,522004028,309143522,733245327,28035029,954754309,173539388,177336851,341441066,487768097,210189977,39280804,651481497,713195028,526650954,174804281,648991369,457806426,298136906,572857626,324582904,226831444,271280653,951795198,28215403,447127951,970937898,21761122,73200626,920073022,438582079,341918865,732533504,247230253,26734774,234045333,500780548,983046294,898813354,267014746,834047892,177947455,393478502,783805043,439473227,108541980,780122909,101268316,623210256,859993225,719920686,211496717,558066773,826835306,653072279,659588744,39052406,547737819,322961340,244045178,98850072,368878414,690363849,749840192,760185403,580383397,276894233,658645437,820701420,244267537,754656474,276398021,521509517,783945776,940004978,364591113,460373282,920831613,579784574,592278608,709826006,920539895,591327786,684693006,213095340,292328654,651081062,691193392,631039161,991227424,799429582,211855474,205619551,80914881,333519690,242098009,461415770,431699964,199901656,91465507,45606936,853050198,665103395,826648589,648597040,892722205,358700839,586883483,367292711,923901921,650317594,628370214,951097561,497373865,305315917,31316618,643638805,961274783,42107699,856305589,624444413,202808666,490712755,961305508,576235495,111481339,560006119,944026657,745174361,311186513,896387115,186304556,789998567,763640417,706156005,238077450,668123525,998712665,258950395,47734263,585694480,583546391,810258572,186878533,132735686,74337448,686692315,718198392,189425696,331193982,256948933,102543936,412101608,525786673,131741634,402407039,673464765,502139185,987323284,651861108,209922927,397417003,981063997,576592649,739667609,977381087,957633609,377389901,959034974,342223424,387371507,290432801,337587116,535887001,442266621,316032930,199866123,551255559,329784980,678591142,357758924,265595990,50074863,777928621,837041881,671966316,563432246,847276612,240113750,518329784,732795600,785424741,753526942,583374572,479299281,396018734,841799766,746082582,332678303,851325490,670276685,650453047,947815394,22196377,2842216,491923012,385330357,978818093,966879926,743581109,581434438,503167666,886495348,999837960,397040122,516411070,504962686,56035582,123693376,464358427,698358362,352181130,91552734,331780972,99282640,262760197,954061253,356925324,296490792,261279148,696199419,209208323,162053428,553924078,511951052,306861306,128487469,960143694,663044112,52935613,325243771,839054128,452579108,451117424,328827203,875944180,685707545,482497998,30429569,183305789,19400253,922908862,264145497,794872719,59586779,11063471,299172297,847067502,835433918,37847282,464938358,464643614,127134110,645136763,33971220,142208096,717975101,519401807,802237942,519480888,394125648,424067031,401098691,43872032,27389706,13303230,577786541,156543068,35368452,989265376,303960799,61051402,20954810,871240949,587564278,29681475,318951960,671362040,349654693,482766113,221376767,359014876,443006185,409176701,985325842,912249209,773206631,626701071,834645521,87936329,856250990,831641758,554999881,76682746,146299241,559128144,306832604,624676083,405462479,476271262,940588421,59719938,942749789,392857165,512117445,336160683,204355779,403815732,680164492,800946051,76508631,767173825,896673698,503870901,126132194,693944727,573592106,10659272,251680833,511687027,586600424,383865684,763512297,875790388,851729659,871716654,30977140,9983098,117294271,595740640,872687840,760404254,705027494,24063240,155345351,803167671,450398100,150795781,658259464,260258218,511653547,177740910,122784513,957860096,563821816,347027731,363172638,185220692,614886666,733338016,349541490,354990705,249358677,224699802,136993731,540428913,258379324,78544721,54999362,283047179,20843784,74773587,278558807,616963039,628533988,473351829,472935553,623789954,877990835,974327308,873758230,861711207,240566962,616022404,845984324,540589242,93940075,641238206,717953996,691191289,131626578,645018357,765533635,939194818,627506214,321809540,587220627,626049454,460004468,770977255,187037910,82698356,443040223,992319214,42987704,643767672,776264326,741932770,512808433,240035630,698604673,977544813,930975319,107458322,652206838,997394796,793270300,842020448,599178777,454842822,113754130,788636352,344159107,947109693,911620065,611592018,291733496,906719343,185579598,3811108,867809325,55908790,297187956,62328730,599561924,920338012,522049725,942146626,566288467,111704966,481989863,662927596,930168992,365066753,53992733,107558171,579995261,399015212,744715706,914407644,193329709,766145844,125738917,856974454,322096840,72605663,335416359,270317063,468232116,659444559,550810519,851663162,930373681,988667695,80674155,757188206,142946099,143776326,347339841,52655308,3679394,244577950,262877922,523877915,216214183,638877181,472012302,429944979,760519986,720718939,609913278,989345508,570074267,16577097,408626290,548028750,559947225,722609995,603988527,990504753,694873679,118167528,271596392,10119504,702278033,161375372,332139472,26325802,847209705,338325367,139873662,840577550,307320859,886171835,508029503,837887697,499377092,967286143,499571407,716373650,213218151,915199651,444800132,775679000,584953303,491480540,464599136,752336935,287080720,998203075,381815654,585779428,328840505,965237113,613227212,832145390,164752359,138455487,62870178,682005050,338612335,61316420,847305694,324649491,231214901,445027448,309058615,15814198,923056570,923167287,741114654,615081450,679474509,44457061,943963703,3059385,86117128,950340780,173607295,638357270,192205742,241930728,854546438,747006138,465304689,745117114,580204973,25454879,693571936,85684616,221722420,790715390,743803583,762814271,910097241,856536300,563781682,683186161,113007508,253049454,366759417,461178318,729430386,924574041,734084885,501905339,954840109,113976840,87536532,262156203,821577890,435208217,612067620,690964554,616023889,638733121,624577416,537661578,183378516,849457488,712232206,226031891,937341831,626948359,929688418,23622380,895609896,541690492,948536557,199160017,932074667,462654883,491512730,478054226,333962357,601238415,888287558,585100885,909434502,88999096,622456324,660966455,313577942,600842971,396397359,465376870,836813268,664681825,73963271,696425562,203528675,269404558,284627321,381096420,978490631,289012413,926036911,672642075,928078729,351560413,966538801,670433353,718446896,804970234,676092053,731707277,386027524,553135090,769016475,381404352,417881441,204891068,419449519,623384759,6622174,114523491,184419613,296143888,428377643,505305995,862478095,520697215,616873080,296931759,68030466,533795488,724205533,480385200,771316604,556602609,111897624,894659709,100980417,493634085,487626661,370084018,403351886,268008853,197681757,514900050,403508109,726465115,851600426,446192568,132801672,553165942,715247054,710099299,701593595,222823171,651667233,737530798,770437268,371762704,24911986,806337542,716986954,311243615,780721596,313864050,635845774,943314229,587942632,437996962,428368450,69173728,830567832,574249709,371306896,345915686,637985919,534311010,36335795,585236101,703224736,239192101,383388563,15553384,990426067,69291706,701055524,398145141,398619836,729823413,291291997,329708520,68409439,629982760,772410939,374480328,967445876,266372070,510553855,404741449,661249755,683161077,6734065,794151745,437410655,28714307,176021640,251832060,130382065,459387506,684750143,719260347,189239124,573291556,293020859,818818240,437611321,344955776,526519406,77738761,471149790,497648903,68322490,720257341,764804584,315089127,212032037,623974296,199007164,566386767,671683885,114754460,943653305,186423074,279901097,512800854,724153585,697868489,600497805,735011313,559782639,987413500,405755338,929326852,470411531,434072333,230505529,665567790,567659902,447243946,486245922,251285425,811056092,315878090,369665871,761744492,228127265,833885272,234484080,883069338,411331165,20049140,179518046,893374530,608693296,727866193,734959327,844330145,48314078,907969665,490903812,667025136,825132993,925902614,918581297,819975485,479627509,656058147,846464473,502018263,761918447,725757192,343807435,759658052,436552374,567036568,224163026,868431947,497516166,789776880,479946500,542113244,985084650,567103301,17287926,53319625,447018815,575345122,299183050,115878867,145906122,561198813,868553027,267391866,193468566,592664495,881713809,942820142,786976399,583609843,309455313,9166791,148528617,778245468,246026996,607383029,191267209,633107927,430464002,761256892,100931272,958413614,160684257,269850925,596093059,697473822,338146211,961130399,265187723,771288964,448465137,520394504,882148737,578474736,629532985,778444680,248528148,848419420,654572396,548774088,897437810,788265085,591915968,857792957,319640243,88506151,696312467,615889822,611578390,394917807,372312361,243062734,701445829,466545346,962818755,680519130,860362535,545393547,718311808,93420576,76142147,273913195,529726489,44390502,24241426,931798318,414119827,480474681,320111308,775871606,336720842,912582860,302177126,32747875,126491704,968047203,613897160,270945720,924335797,170623602,816787370,307198242,974886682,974737247,191656767,936962603,682815119,488043087,567920383,91858569,793851258,806505137,241107368,70475129,761444952,19526258,194742388,740529892,621889419,490814232,454022261,520122951,798830099,617110116,690972016,510469412,903969041,819011249,210305537,734283384,522929419,997935861,940567523,581756627,11723489,720201043,838405179,876883097,150961869,634923444,157588295,486784332,11633075,551476477,230720777,493093283,968795345,293918195,540124639,567054716,447156284,220732202,325334066,465520705,204842030,986730800,830679914,337883503,741295810,874837524,743716196,419470794,346091869,355989883,538017325,392799697,459776558,51918298,315284618,799678055,55047278,181276793,115312728,728337929,4692025,30094745,318753931,119960294,991445447,494735256,508133625,106659709,473718967,752358506,216198217,475934824,433344718,743143063,294829425,219682941,131899998,663440255,218129285,224565545,677013556,950121941,932843935,926604003,639354624,105523697,341598119,122138575,878471898,634019593,169501510,128652899,855998453,524012393,587573660,241440064,499944270,157719872,180002392,10404973,490957526,525410745,302311490,715754,791145434,496624055,189039628,153794078,699739374,482170186,311881126,437918055,121266080,389016352,146729215,717500197,92544232,108991750,917084264,891444507,391859035,594399104,4794797,465386262,798890367,126637982,453362362,37300408,856859395,493957936,545480202,321014674,971496521,301620109,814906938,981682707,379109076,514483913,435327356,348957515,193135182,388874893,922714159,514251437,265682709,46967549,552348113,552062291,808651347,617843867,468099850,982841914,257109020,801370191,480752775,33718074,193708013,975638418,421623838,367731393,139413479,108926381,820519069,382922882,795354000,916045338,273532342,959322600,105419548,101594318,184110060,762341293,246087982,127456989,593253319,896115013,79521617,511565771,59883031,738216844,528910967,62695901,598142207,114166180,423151147,972594142,32072083,430457162,322487421,547144799,288750955,286092772,199843514,900904073,5095624,331500030,809668786,178496002,79716267,619455361,472022598,435273568,192830460,786066682,995747483,724633787,756147480,883299464,715317963,173463554,366214156,15634820,540894424,683150470,310763081,17165130,436700379,564070910,429277690,32166122,667079481,732989554,311514806,64740307,748464103,9609600,315334936,544354537,398078032,152038527,573147130,102749410,187438671,711401317,99630959,278029857,103129190,221780353,316486674,903513550,912169002,414819197,714885313,52757021,244169574,634602052,997082517,38352232,384843585,246036212,120666598,153814780,868729680,849418710,132813978,619401758,807137265,434418798,940338439,910543722,941886088,613089723,353502954,509520746,454920772,269462765,193798014,490949223,937409008,762470829,137818624,935912162,755771078,102624539,481544618,211922938,459710496,19682838,940524812,584765705,958128854,685824719,498645632,787687576,515132481,522869937,324273785,784389123,947549662,518667812,542143734,675891820,518804963,668564391,153647676,661829701,593471448,360448475,833550543,296391043,250090645,655875882,89990507,822407919,579250879,81151160,2388484,281225255,593524514,235218326,752057652,38412970,291568668,192210898,811327365,964173160,365422560,382712658,996164327,495763205,37557960,75859119,321244755,961867068,262105390,359361314,926249712,269067093,987314628,38953173,168966149,107572808,3657915,967411361,492562803,224137024,137774364,246306520,697611981,110247288,709427437,306689565,708146737,394996809,319186712,883345720,448070840,991750016,636177449,516942057,563983446,594538056,776902713,72168208,50890241,262597457,801871097,65001813,274192146,444292373,436916208,589474171,413045253,338788555,567482968,970526619,743405594,712750695,418537348,575661011,102670030,928267190,210729521,463708507,451751420,811855147,208016240,877504556,925347821,308486403,921491439,133457940,986220607,458367886,647024460,83022592,677344487,544348230,952831975,557215186,821240174,892079264,499236336,15393104,623193347,358089588,70121843,195977817,893732627,137918114,252978558,210645018,473981189,987575845,718775566,965900856,215948550,609578404,1277567,884504692,749948197,683087879,253263870,230566735,599092339,432629440,348350896,421919865,358655417,549129323,92457810,497314021,583160135,123947564,822890688,247581213,340690733,629159363,141866945,150214336,528735091,98715196,153014838,844163282,293503505,535715392,792770688,738243124,581830879,873616296,902909023,421149504,509586056,446827670,47211054,725100002,689449821,526058553,987597705,231360976,864507704,486231443,95792164,698430079,994038437,341195210,644755481,171574119,347046911,916693351,734275360,923256401,752213561,651947420,108087469,99466449,106265119,683820026,775305697,57433494,810184598,972776423,512236469,317604388,843924853,633576071,586524553,263533785,125354499,391572565,155500407,493331399,365421825,110831147,457419472,374292036,231048116,678700087,951540811,978654213,193960834,94365084,586696485,952124856,6035002,264675635,843801012,572017034,247662371,563520037,807684222,189234471,947743059,57339735,607924966,181954268,363840458,152214254,343043237,460933175,31628362,3001117,674647619,770497428,957418529,221977856,208983731,74726316,568392357,141373178,592453528,596556146,983211324,330540451,191642900,367524049,83735188,777992237,997474832,776907170,893327224,467552318,648755177,684274016,763538123,288995238,722834776,254975896,209244402,480817453,455804196,118901675,716850596,711263223,629666477,36245459,97587647,467891595,380480118,739868644,793797606,179982736,31462446,152615685,434078209,93180026,722262801,535138542,149586983,622880311,891829033,604960621,303751319,338740524,405670141,944217658,400254261,382558307,392838702,387837257,516564199,297625842,797177914,86684635,783203950,992037648,795179413,872773836,309134554,913369038,855159619,279978066,296824558,210200531,839617203,382443781,811476109,410785773,990779998,737219381,488334472,860015658,47902070,835720092,880648014,144851125,85060063,969380397,263053337,878120043,117412078,453618266,985650598,530748609,946752311,452417310,419136857,992587162,325362513,253230102,588444116,485855982,116725054,228060468,942971003,87404592,984807268,92032898,780072518,495901798,945288110,880184073,469073466,542860209,792003268,8818137,906534263,912592515,551028176,815330868,238082550,748291406,689363231,635027430,988770034,441760810,288035303,203660417,990826116,571299831,115203345,87728311,199204020,982142330,5871750,474951786,443563763,29575267,989944961,721319422,717903632,238490524,211188289,935582860,797385788,526655356,754047147,237080923,155569943,905207178,525310983,846616834,146598405,991755346,879917958,397008805,867292155,959679456,596737944,227498906,111145334,989255721,116814362,25397869,130359475,640422108,65516896,582986151,711553356,711491162,257272757,101684298,800639067,512486787,748822937,900999039,876432387,758108726,268844715,180627039,285754648,878192432,914012338,112916884,337234235,589806829,878473104,310981130,451373308,337841029,773873624,128230797,327120461,944100328,473672652,444092877,439847431,238146539,379404150,563546563,358541327,53661312,432529045,440154068,113595532,697448108,85317496,720428625,462639908,208899384,252730810,950958530,632738698,669000996,920756860,928456175,54745397,107600851,961812918,809762174,26499318,257049876,685511993,346462698,296301818,791037512,459642445,836993860,654611901,628322340,545213692,283434103,318351795,301178006,951490591,292439813,845395490,343958289,382776490,376752343,877658697,962337925,273404439,211395011,487989369,101804739,256635012,336754940,41815820,214644400,427826292,894417668,370999052,183468905,308084349,655730303,715657404,384602803,843321396,474218282,424629988,21688332,138829244,401648188,971901418,698967687,439397708,156725531,675258797,306654519,190324601,226061761,949238642,133581040,867463339,681439988,89183561,994480676,845583555,806938565,285201003,668156631,54718463,836420358,68493027,470520266,918908541,939383030,934281721,928406582,65952114,960680079,115836197,86418476,438675673,620329400,329796660,245940014,741114145,569095612,170688640,936637442,613839978,94141511,246971298,309396600,368915438,448461687,275105629,316016555,927129495,95797093,44673585,390946091,522626370,335728974,151904385,751514496,666247477,110113161,11034295,904057945,553115973,458436231,736481265,390949073,430792893,269576914,325912072,388333006,163644615,270941889,312363713,928715741,28447959,38741943,708382039,213757237,526131620,82885406,337778689,614396903,643205214,530236183,267512809,476666480,566782883,552695347,252551589,454780825,514003160,313205158,956613828,503759878,330419454,546166261,497985400,181019226,432030917,915938430,409094906,561571335,932710247,620192986,320060926,491855784,55291696,571085509,554917439,578103870,919398906,171683409,250993499,762826007,687801469,773391485,749521773,279442431,818036959,820336121,853329772,794460960,517363885,601095260,754948228,156546620,124331004,843819195,754363835,394006446,289925139,831940061,324458366,821331296,647362373,139999655,199336973,183625008,795190182,478863021,759415866,13312235,30954813,739181445,375598506,49606640,414771343,527786225,909210595,41014455,119812483,506768321,700755004,599067303,13265271,402493963,907013091,303894031,278704903,732134086,878065545,37774617,350477813,903915339,394359162,425711733,40070120,315037678,719566487,588675672,194044866,682011189,19360802,571901643,644419646,528818627,538410830,231824244,628514947,498040099,782386712,501434842,805940809,651386309,568881907,939428439,72505010,581841225,424989675,94343082,523809523,571260849,560500372,942214416,628422087,734385256,830324646,182911642,321685608,504692793,501026094,869618167,871108711,250239248,268675400,970087422,141938430,346372545,50590510,97994201,96029674,866333276,930059515,287162360,760581888,623345391,932297089,78031539,832069712,206709211,747776616,17557648,317413783,172844240,229386209,385521910,937289943,253771437,198768464,492945533,107918293,245333252,241822340,329937332,154527893,237519192,515625587,540072475,702004730,913095516,789870803,468560595,968162638,805897219,861828251,449009954,410971868,500363063,99199382,414612899,218733931,315874149,811051461,195756808,108157516,49557356,739303690,958782611,707469729,739292843,338230961,877210517,281950342,310916425,474683954,263543498,478806302,504372633,747407118,161239032,548042577,353763668,363810556,795864732,951545265,867817051,938222670,521117617,302020341,330058832,393708383,594544942,500083903,385010048,396133072,951159618,916317352,705463772,497196934,796866080,870850657,557508978,806683867,515746342,232222235,678276933,927957338,357897033,5003231,210348084,294813632,227006264,836484636,905975384,795382466,635548860,789372556,14160477,726997875,17677985,766119778,123832995,569565538,226911103,396201245,847249326,59049178,321963609,382617671,940491165,477072797,768674917,369721783,907257761,342634621,103397059,911128874,321355340,296229203,858597688,86301351,264999601,609696820,176691201,14572600,828962321,621340527,325072934,183888367,982981595,469448617,459878143,630735799,430569820,477527263,828793311,685432978,614468015,703397904,951126431,407218934,442414332,48845205,662960264,71614944,699602704,140231825,111723678,552133875,744333896,961921035,551579680,958236143,594030230,612842106,510606722,903284998,94330894,732868367,432917337,508543739,961269521,376263315,138744932,828871132,856449427,415616232,301077147,350095207,739069057,942401605,375583474,155864979,303170656,800362473,218086860,360070086,933305371,26031303,168304711,393412897,344669780,48755035,963071930,347115769,337507407,632078189,351646603,863250534,665556380,150230048,922220989,763864011,212666452,802627671,500587740,559518219,837661574,216665960,250798744,834544566,147720206,908760486,757888960,355456809,758014482,701253820,436300,561745549,937126457,106460787,466708861,744954999,894162271,341934027,595850165,85883684,64197075,352946234,620074343,569536822,653596774,814053802,269943732,496278313,43651844,765506212,19499493,784139777,50802912,982076387,994738023,56103640,389730744,965931947,458517661,279881729,516810477,733333339,712233995,934237219,709337605,432445966,504457401,747541026,330091358,847302953,425976255,503105966,476778521,270177936,658743793,28109541,814692089,563443841,511123126,312319329,581292075,459878625,110129591,512506831,793493136,208372493,100166031,214314837,455881835,748932782,197740206,803187381,724812717,183753738,110998740,632548969,84186594,62568726,918412127,452864462,192065816,16634739,650682923,626492653,609464578,818220387,625504439,123301859,82931106,361648749,376832269,180898306,457392694,268151658,105102264,493448019,815851993,298852345,933433868,278798734,355563575,68718097,245165116,459948721,359459390,294891752,521750002,765504766,327095552,315170969,664976503,985594252,180504688,53792521,252302326,770351508,804272708,827351663,843841050,279524210,698717959,404206040,489865538,484050433,403077174,793946555,625602963,793118341,436234522,404917720,38486258,749724532,23819308,321673283,910646620,822303356,904212599,184607674,563893404,92441916,56985254,97830135,187291303,358933626,107461738,545104222,927950630,93052080,121733020,378307888,250614093,611751357,754585416,206861090,403718207,911268409,336128288,989655902,630959181,457564227,832838721,31131935,280510382,947436015,906563588,602293534,493898122,304598573,365033457,389038888,488921989,662741752,45010935,699689146,292442351,573188485,174140647,316227381,886308593,903947795,120019703,864326453,955022174,704204620,717239079,96158832,214750670,546842147,10110862,958542649,402424678,864869025,633282929,170961663,780481364,774999229,682983341,530328239,941809677,349055793,943713029,167831173,673143109,659394668,949402305,753712331,361169784,582032345,686336928,817219959,605107841,559214642,12816810,229070827,578362100,934331767,316571311,628303842,153220360,865023876,488432861,718498895,296192904,528184248,284324997,559961787,129884877,746668480,426664661,707233111,398943752,91352335,609725089,657496548,101768431,251818074,262054502,288199605,339505082,555189268,33652646,608823837,458666904,964833819,850398329,249236264,30341256,297020805,991612647,262774210,889747771,473379392,666613397,229265100,254738745,634556946,86738528,243591881,26007151,453510559,8546119,385388084,965934774,542366534,881555857,9582985,85051770,862206727,454136002,20303770,530642756,152267158,835716624,562008185,391745525,830691740,883676662,636134163,359084332,226087354,127769869,681756977,551092409,115792198,792922169,565417478,914781910,132026969,413627112,657564216,41193000,46819124,738261523,53730313,774297754,105764429,499828799,578460779,468361104,671247758,445252868,313132653,370463257,83676143,35380476,781307067,300653641,310247089,991683515,379008804,499096212,56547945,742878560,282185454,434623551,977489767,652279266,263223296,917614965,94974805,597508771,442795120,941458442,21788247,64158165,632289515,841355804,888860570,863994158,457210799,87638708,796616594,283615976,976656728,758167676,650167037,186372829,636009706,935583868,462320111,280732980,256141983,629438312,876216454,410556303,268795108,284655550,219963869,746406448,452130570,210168530,152028387,635085477,620695667,106446309,469042034,2518954,186801565,963831867,526335076,622402393,636578562,98873327,479037032,660450894,366772204,665181047,732408654,517222249,859354557,506801085,385377759,894310048,191659036,610930812,179536173,115557610,18081311,130616985,336074035,487101728,553033642,606254891,875352353,346958692,863225538,707031841,101577474,793482555,555731982,317715841,491415383,23179402,553084997,853915276,53408588,267732098,829373573,446348758,410724146,953685684,919273670,66369627,143357390,521488557,9051229,771891931,486728022,195778457,809437256,458389892,996049638,851884542,903263782,37724909,586611710,204194403,34185477,278919637,823981167,876007474,326686486,442157037,917134440,363034379,94825580,524269810,312828689,664152652,231310558,88982061,160150665,663108668,379278321,37836975,469906415,18364502,482926441,529939988,893068324,738943150,141827977,227283180,882700651,106337916,365864597,541689171,519560661,536578068,111873860,266554623,540818053,412462101,123637707,985785374,859622353,444923677,176377554,931591223,229743519,75679536,693305776,437795916,781825138,528733543,540005807,895259210,766981391,979253634,292411226,810856621,593938674,280307608,898227295,973622636,253992928,261432589,950055170,465915387,981759737,37156666,186576440,59593099,766465400,771323907,50118951,525216705,694821975,334464347,259165544,447104748,688809790,217964796,650817063,406038656,897965492,957610877,96594580,751109291,520491355,495904735,565456578,376665011,748710556,674251976,296527297,981362547,410239606,948673105,220797542,504496321,749296077,451708974,813409093,210028975,422638517,246808791,26724420,634182251,152783894,387473484,519397500,431122981,46038513,703394159,181681081,633032196,652904189,171552889,701572379,979723731,551096742,569798801,663329044,782722582,176317974,997104085,362041517,91410682,288669565,164912795,696628828,247767946,790276532,144896768,795808108,473521307,546877617,232290850,796426218,931433985,775025061,711014104,587068363,391919506,699871484,274750982,148505764,213103259,200607928,948159409,370732451,957509601,146822913,677381918,278185962,684205655,972809991,747978662,573509777,471503057,164246193,409449016,277209248,391572335,965149774,919530230,514994610,606127236,754091823,735412650,915265013,811118162,760823221,307883744,501404039,925117963,130530532,387910749,681242817,464625727,457469634,628794186,745638450,158678524,793706054,591773508,105200925,983529168,523362944,921520444,923043932,768050399,862254647,673498204,407356104,579491909,105380350,742198685,763025936,924620529,912368644,788993999,2989898,521428955,522910736,657283032,394923655,312981593,42117338,371940758,777901604,921226576,849570319,37870392,488630304,580108890,566449613,75494145,243034420,184384066,464118005,139346608,89120113,893744786,424450934,619229549,800607974,716440570,871326267,512263390,637939935,724379411,545097159,626865619,395358411,875658633,726030473,277972522,907816292,660415785,956856710,883589355,982937783,57856642,994287728,390856783,719072900,854824973,744016775,550355146,490676632,696563140,990350617,507673072,471929788,404533909,753260140,440680369,621887590,565753259,453019482,644657601,292909707,53105506,891034371,191649870,238296988,363954352,542620395,171229227,462528877,298547066,184312310,701723516,369525491,13751809,313528213,669178875,38124644,517229974,502297454,544884496,808722011,357063353,738422572,629218582,428387930,554467603,330318264,413883594,798895521,484132934,631613615,640819196,75853166,623841561,862028984,244030355,508267768,637064546,100498586,913208067,641108112,547053072,530247647,77511478,761776308,7309208,443954530,455916627,699767918,998555670,537835749,62153239,525486772,416820652,134571498,884752143,696896168,136690339,849974789,776410553,449939558,494982132,805638970,741447563,149268478,827801745,916915977,94143600,811575797,103391759,22241923,627130425,512277222,747107591,23466885,407367585,112891394,969340527,438952959,200247714,665736716,58891930,698047673,248233087,168631060,794652166,250474300,227699707,606870929,781279861,43931879,983960487,463528680,32074225,355095535,258426820,154281667,365150784,907720182,375227022,785149129,214208209,486362776,999821136,151054828,437095761,85020958,949841908,179111720,691139365,534189446,995637987,237769647,778287926,299744674,918996275,593926876,847905363,48053248,299431730,482335897,858276582,892619781,966053837,993649414,474553628,439741182,546274857,508038818,628766439,270183465,26195679,771818046,433786890,930425199,989112640,83264202,85558785,811944661,742645631,723407599,180969742,16542261,631265590,812668005,36008214,419096046,408293289,752550134,991606183,154860541,14149161,883929124,739608890,986844192,584102499,988557002,41558170,401382061,818279492,67620895,897803992,115042726,623047959,121061403,984073329,939190858,768150247,848924691,177746285,826073768,582713394,319954157,730897743,581071621,42803755,871705611,326402364,764368449,493381255,427351467,127016674,242254724,605025034,152373822,883959283,411505939,631932132,34629406,321067057,631379183,778296589,491671763,894517500,953240917,58459228,254524151,250815857,529840945,651667110,570308920,217462011,428877877,112657644,544811678,249415910,720519967,175155028,435904287,677259007,697606803,212308857,849489362,997813035,541576570,209985259,589672369,263634887,26011548,319155449,847509284,835942864,280555847,56222592,548430222,699475987,935250524,931919930,208184231,100770510,430115071,646032423,181134117,198012676,354176562,631994643,874464388,736898353,446477394,237213974,200377679,84152705,767434657,672903454,767288966,429451380,288749667,429341112,206330671,414982456,191275474,412653052,596844380,181069006,646861175,187724333,752825233,307809303,366033520,90932404,753134199,401570435,329972696,504590032,539562642,607713777,156178713,230297823,131772368,699793546,772199894,210575926,544099511,213456517,155855128,164050017,194916555,259822949,185646898,359609293,256255312,600386900,473139604,713536809,146162018,973092665,979226446,521467804,648711554,649361761,340238509,255317515,584495484,187129040,454007135,590054045,197533041,519852422,472759660,665210442,687257851,473499636,927330853,446982306,360777215,222667610,912609549,957049154,523696723,496152170,401421644,230730266,792476159,306339620,446012138,423694412,246329273,992039890,271198437,696134189,8300915,436775316,538044438,284132069,295294842,597320663,713419072,707460025,25058942,947619752,598597720,487651039,865177945,971058102,848310765,456420156,486033494,569595763,859369491,64821115,304038136,998689082,5377959,255041381,845991325,834843684,810252842,452836110,817928963,277793154,866042171,874301527,152438502,136849970,670564895,599746243,461763427,865812192,330711333,753891898,235481106,577111719,77363677,742765041,837898265,598504351,173414914,190211030,724464507,2510073,402525386,7809512,835830978,730186918,397980952,633655831,551315810,924164000,437605233,3575357,697617046,148898407,620721450,864978329,921015986,111691819,866066508,886315764,701453022,695933414,784352983,107150407,721919690,133269512,987404851,617172525,490065418,948830549,626663115,277819709,154495299,63033252,303822193,11085731,72509488,237924715,784853613,818542372,281230685,327845131,172493030,825286446,510446188,141658162,951188269,240816448,181224475,221274299,510650790,426034636,521329716,455070420,79363961,527887355,607307402,153526585,742957071,129952171,596949867,876230622,130653048,618185059,498928970,731147272,448224525,689385285,145135624,97592834,295726547,203302498,930570143,763521773,99791277,613729514,467192613,281912073,954448365,944629231,303076380,683388242,191370134,516264886,366069684,514155754,524956976,410771675,677309335,145509060,465070856,441334651,771759239,929787351,644286393,415213535,936868840,412493745,608014758,254053512,272814771,263515812,698130352,536774197,17704676,684096122,136535933,288056937,670999343,306710344,538771609,350812354,993602760,28337060,734992736,579671055,193370243,514365465,32006662,874800103,48824684,849609529,265858359,94836175,757819171,972590066,149716490,915285650,880826935,254140851,951279549,714639774,955098935,359101117,701664398,217176278,450039887,717734640,967888856,303978562,939889684,529434786,420720352,830109204,443114259,957342287,109235125,23443824,886867149,105114646,564188856,481205586,759427018,665500209,22399833,469432979,955654747,130053150,816730090,390852422,48527183,750793492,944169450,48462817,445129483,119648328,427071593,346509257,188875807,391585176,201307702,354462071,715555451,476623820,577760366,264639326,365537558,148729278,553903473,273348273,484458461,335234711,562364570,659673101,580929149,337340034,697013456,968782418,232629505,289909285,861754542,504882184,529700323,866739380,959507688,974596348,673032615,193264038,355168380,866244063,326159309,153353646,599517082,184907628,313027690,774336224,626605289,111969490,425343432,124430162,181594759,912764724,455315503,322410900,360804087,287297719,60511994,638646066,356790137,308427898,668422905,910076437,742513075,494736640,750208636,860780776,410204618,452130885,210143574,625820803,286273596,348810666,810028347,34057910,612515537,467363131,477169522,76991509,67530822,281563232,965656187,543603582,17723383,509426579,369499175,570457971,994745941,867357247,801756649,266750683,44135644,680641478,590906591,845734604,550034231,938561592,226784434,506910187,413157808,698923208,359960756,698203827,485740665,546509099,729604909,255726848,347687933,658524755,251867424,499473155,936229527,281444215,65822009,523982483,132771262,586418403,222489048,801503964,60427024,507019133,407934361,251635309,134437749,534584718,120587974,577750062,450883789,278662535,460076831,308631440,267193060,490444038,595916891,210091190,530947917,110628267,50253054,337525050,160781137,862412398,456152084,996481861,65065312,694246956,694188722,748372491,676379162,306123716,207214810,16638406,459116722,718226550,895560303,197023275,329795333,496690748,891996014,485900048,368422050,91737471,124804049,449392525,692229472,559761595,751677875,778806615,387549818,413694210,107094470,276717408,262322489,714777417,168655116,983512215,127414221,471005141,127290321,758958621,696929170,143323071,920251227,36137880,870911553,706126214,10679073,881907746,523551656,765254074,323940868,28323161,816929577,200098066,817279053,857116912,947070975,71346633,424610493,119014474,555285442,113144530,483924582,851775064,885053740,943351892,984402270,885773623,275356603,594004050,807755216,876652295,151834896,845587783,248636352,51333063,834783869,697422579,342008720,532617576,397154977,117858357,167087470,241954245,96154360,91786767,873784528,348461966,992692236,845629631,157167077,692045425,490222511,541161838,574400690,851478100,931065936,271101205,989612191,847101653,879229923,480690518,903466878,233549486,473549421,651839921,558765053,695845167,781375314,460163768,279153607,144630332,361583925,841022579,849646812,984151676,530908116,139849160,11779782,695884184,181929013,941117694,368114731,334787255,384117784,675967518,614562174,611223434,31016465,578375588,192200875,582624651,339383292,589137189,432824950,899569628,278928724,240693388,588320903,52302964,606224169,706746863,388728584,806519414,767789944,522476886,605240,787495569,381205283,780811498,22602811,193156855,218107212,27686171,337060250,220463429,770468270,647286378,36228319,500384769,508228531,778066365,249153339,78403717,654931776,955691649,960535678,301439625,203521321,826576428,87626727,495485394,909458706,688789971,493952635,818915853,894601453,825527586,307920342,670868515,463556792,466077634,322908524,602202584,63753880,915398860,242283503,713473839,585065543,440103637,877718665,51644436,202649964,449952902,466501375,869109173,112078552,316700583,658442906,278053929,697450276,613560198,92255682,783633073,419292187,463038229,169999754,619301661,59952286,651877482,930731151,700350313,573074791,45795520,454538013,652233435,476751412,265672103,931433486,992441631,169931105,83439789,15570863,501560018,656835361,946375207,930762614,330425149,352110687,718568358,564730215,225498679,94331513,674537007,243133049,288774177,655471890,80303342,782066883,949076718,242612658,725980050,744158074,433887836,384595922,937719843,796850043,714604162,760217410,39355439,526627922,817053692,196345098,581917123,306534040,280143597,945578836,956948468,920947137,859269733,974375849,347338038,334326205,117912323,445900278,806261582,849929912,656410044,385444375,245690723,239473327,700457108,9416035,137637354,483405622,419633098,191214699,98875930,334547062,80631711,997233464,873832973,98349682,281302800,570901172,465634349,262989398,249359071,327192258,264359695,184790555,96259154,882121662,464730505,958445403,44982052,858663278,609122097,783054273,209550677,490312790,760674071,769795511,897517979,447164962,630903014,820483088,27204169,529172551,845001516,909017757,323806888,231988936,481340988,932616287,801213226,907485902,341541162,768208088,160246964,361441946,8398506,888146074,307970589,387636812,538674430,362567344,563593105,35494306,704552738,732526251,257429860,137603545,258164616,548032144,704039984,196039409,597887794,931021597,389571872,987451457,924148456,582627184,44976901,52369532,77293540,971149798,173167319,958090664,235868957,880462874,402410353,407518072,832107760,912118240,777633387,964153946,525248491,644572432,604230310,426586939,610826468,919419361,586747387,157418739,827280706,371739314,34084880,615861761,442869867,370692399,440192507,909433461,519369696,222125557,450783646,541985758,459822212,944154377,326739643,547463294,887760095,986708498,535786628,536995755,535046943,835585917,578423178,410822698,788477823,30384659,518473219,310317874,397342326,940526817,663937544,80932302,688545487,648517190,907688151,663213991,178843403,373745190,68339040,2978881,172942065,629489405,426767514,66951748,768546115,113312623,595189819,263645931,604132371,834203858,214263621,967945295,33023513,116940940,257677993,416532285,449362399,256853930,396431875,29483105,378613414,423574692,216838327,844148073,750838237,162638132,697017748,876379959,581578826,526240263,560089331,918251537,681776798,121163959,582567752,411749850,94580787,702823274,493324992,598995963,5997659,250642319,152276951,80761335,966000897,494063841,232543982,147050765,615662152,489134659,114446194,454479158,552142680,129015470,900158675,889479102,366565815,308186532,471742635,980899070,55330163,351359004,892943080,516851727,757707374,690998709,815371460,175504139,601975463,37542184,955516911,5571621,531982651,75147725,481203037,197559076,991943568,180350107,356209112,478177973,79278859,612015056,853751105,527651943,25187555,552162842,225247143,797736554,106509693,593443248,445707464,839987038,911931389,823246366,597418765,395773110,2754285,606241871,908986405,45671355,553829160,897002443,734505544,90725391,773735616,94230023,645813564,384547635,937667277,21430807,846511785,581357661,205897697,618924870,728387775,494118647,222591037,273712630,814179234,801781337,498073279,25534662,295898944,85981391,851418172,366267355,355637350,586444655,420724980,442310407,595030544,651528902,298511537,661225829,376438161,815109260,722373134,682189174,679725052,869601706,530643530,787940705,391491433,633021147,394792838,64685867,84725898,666493603,743383736,337651405,678054999,126747959,769644373,988034294,127560883,167057106,996100444,946867127,416172790,310079669,810845797,655392623,779729071,808701401,256936368,921736853,633527454,819114541,881767733,638544222,27325908,471631442,430345388,100107979,13524290,424618143,516644586,502371023,143893371,122511053,683936884,905845514,565093850,584314137,130176353,790485759,396675591,261970285,881887884,413972507,54007802,944112951,73676677,257426299,52906357,785429551,616146258,825871994,63516241,51773862,71312262,848886378,439985219,396267526,230202255,756445317,239925905,126925175,373690715,972951283,743580231,716569526,537175030,60331080,28909096,738079754,341555414,701506133,251204861,219886595,390994823,96436642,922419422,271834916,63777601,177546793,211787485,314738056,122184106,494271604,104040522,435886744,331629774,885681419,641405964,341126370,667747107,341779962,816255026,746328981,425763555,799261956,993829303,800822574,862425530,848518926,853882219,561011609,608523937,24345594,565181445,558751647,310187903,488335568,119168595,228329908,824532935,815463367,768157360,866378998,834670528,869492348,419922946,887264865,241867293,649106694,209543066,46765164,699750983,607061640,98905073,178904848,153796383,124722795,211416847,425675181,643484472,49187570,319619094,603834304,795236654,446331630,978824517,932575078,371647271,454804469,704723356,188054995,523565149,928529467,989886652,470209383,229507993,494966152,230957390,231504971,279424853,957939114,317348795,122078198,531508771,337515306,976365496,558492354,602844162,351235669,362475572,64814326,666817006,880615277,448156456,72298073,34962064,828744337,959918715,163025077,356168299,933376898,588951522,149038120,800587570,989183409,639423687,52844822,20386264,985593892,575196306,329837066,863240008,725055952,953491550,4528059,938220928,837168087,344326795,884406233,45539602,338121343,470102943,133248309,917239087,147503783,723473543,628460938,587939904,364396002,445199702,765215899,472203764,886677604,999801466,529664065,374248877,719537828,772762970,63239925,269330236,869630152,907487952,357875411,220929549,426305490,825793239,637983821,959164576,458037451,696215278,978119194,918874617,412687469,803479800,498194123,712565751,685092513,712899114,210721601,811251311,632627667,671905619,3961459,117482220,317246521,996588391,959262804,652891204,807947426,297958261,975266085,926904570,20121898,236209857,89185325,10259433,825283988,720501852,468444339,330788579,435887178,64024365,686721323,291776667,500860184,310651169,228374231,410477055,510020354,327389320,282092463,3680404,982966892,896253732,829543369,235000767,146168758,105395182,12050683,56111545,129621197,560344612,481987595,733432052,405196353,131119231,607291665,114222924,973851619,242908445,758245605,422937081,164164627,37831759,370795847,122477672,76050898,537613531,735643780,241232916,827722926,870656536,154108068,530590610,868946348,104141028,208205431,61086774,800461354,61651825,201339230,228557420,761123504,194048153,289985936,632232583,299417930,288905848,912554918,709342945,918513230,693213627,384531928,5825244,527015648,9760876,517549615,288439266,868169900,509852135,322096036,875893161,988894879,963044124,132276805,661083628,884369503,826811681,111743408,762728739,547838438,933900115,247310262,551375862,914861719,278005187,609673656,482973085,174368041,642362684,985546115,909120387,217650875,890011143,782340764,462757650,724929305,728838924,966322010,54099485,852304035,686877801,449473513,882151160,783630094,747700707,587360154,921979077,750642922,730531069,593090119,223600748,262218995,186059128,744911735,31738433,581282403,303437889,105182284,31036036,689189630,607876686,481737612,222541981,664079643,302579083,672675152,994599668,363994545,570969128,555842733,969388009,626539241,683894671,271517055,407991608,810853769,467854421,973391629,81603946,567033437,380946830,94400535,645744259,130223610,883930382,310769264,847845541,380766745,658585380,469928208,119538043,145628232,20337152,534748128,933753541,660389112,940372149,382964872,493008425,212842957,430859964,752708555,669727950,59476749,952917862,296509592,635145238,616831860,239710962,117842065,509662523,378430921,415038147,309829395,636059822,350285832,291038795,88374104,377548787,404149413,875960366,309066078,757467638,558661806,5021656,492836583,313274780,423750826,588431442,155133422,264131091,202330828,68731769,145364504,396892116,620676040,290957754,342138996,857630242,663307737,325085868,820398475,135996440,808454200,252202515,981899817,92276458,546696895,788997003,208761293,64002980,963774716,344398666,968375295,556478432,965328448,168491278,936102439,373360080,206282795,868039241,295627629,476901874,996017320,438269075,3811515,603979054,330624860,51394334,717946122,660859407,16741224,342768581,398260081,308402114,580069277,157713335,908353133,970223676,488906585,347250399,110521739,231551267,30569161,58731649,234964291,506748124,80281513,332183315,414236650,563415517,336908710,793918121,454358793,138477462,450727414,753442783,513021593,517650859,280700600,600097459,609679705,988876754,96079152,829290435,108916243,501399147,107971406,445062481,962670136,17256573,34566831,578870525,725889057,691030367,411765386,832795427,149130988,336190717,534279149,599306889,609799053,37104564,830184839,534216193,469970550,228559672,56838370,334599228,214569244,212004117,826025098,849173330,102488577,306753329,401776532,105285263,483937604,166414620,375297772,554907060,489310502,740595003,517845614,506050984,973417700,513399512,148428940,659680373,811053196,246781949,649876656,456426429,319261078,768114732,979071936,796657355,468642345,661441176,922377372,379339586,713607339,76700768,474115783,685756954,946802154,335268634,310792516,371958987,289594327,191971578,156910777,564097645,722424997,77516399,749805383,617841578,277985222,258650225,219932130,712239148,487075978,542481044,136961239,423659297,895001126,214593726,205625235,499398159,211487466,53603345,200048852,232028425,11849047,88929658,73943059,774751805,630135090,900741806,701050258,934341038,978125206,606468958,684265803,207594892,536375628,750704587,552965451,628240804,398782410,468824283,206241913,78961447,889674027,311095371,692292858,979372050,56967115,11032082,863002719,84231207,771926344,550266590,812982323,558395120,437913038,733160841,790641838,198109686,27236531,466030973,201252328,941549563,378698060,653991930,352817240,591201537,302631882,92708504,217598709,985215477,868168063,622090623,480698499,6140104,474773010,22400922,876412019,231813977,375472836,577095497,442413206,54967539,937210795,227970396,832120781,620840496,915529697,368374730,810551911,434583612,536944220,10227434,767557384,759994826,418758727,758471722,361003283,182402455,178598958,214458513,709545031,450578955,578519730,212759058,448564967,179020696,89010120,791416254,247844667,125423825,731467618,434977186,432551669,738789531,809944745,358896203,854684600,598477954,676526196,551781030,232511639,949932562,962090950,935116236,390009248,617898619,975808258,181515338,812283640,102626824,403888976,197607868,595405397,270258531,34221133,272482681,770779245,541653172,863066876,985697492,594845000,723842571,134120574,523449284,374647549,216861902,531245275,89781979,857241854,56989523,857265904,223760368,567393268,244920548,849122672,848659521,789013621,546690349,113917835,770997948,828454750,23183754,642648400,285558056,62553593,195676218,432213197,718979494,624148346,766512391,654844001,668995692,621725636,217519213,83203491,71815347,621143544,19576082,726089763,653314740,741504235,555588947,262034566,288577505,98533460,259589730,597019590,436945009,564827277,979148809,36869004,984177905,652975242,182270197,571007758,754755845,977482822,535135926,826300950,454188202,934007482,896763460,211854468,154134669,905426828,194684046,46276857,157098254,478982047,636662193,684574590,197803117,229040223,992035084,293838397,838656514,409534564,563997855,439411911,124918166,834121669,623644372,634939692,781040881,133770918,42809587,620956265,118583099,454039189,427660623,688948972,675597414,63767449,173642567,175327679,79766124,110933513,869400082,633292726,482655716,117263578,329971773,979744007,181058575,544744689,373456766,528557247,195659699,48562889,836505659,989729668,669494522,472970036,316466042,581888270,235246701,276850119,647148401,802100365,363144170,492337064,623273009,401805356,528654390,856718199,402058854,88810754,443967701,671734977,342961575,108496295,951619621,75057840,588427118,275791943,975594314,664888764,602228305,945204804,334625228,809192204,896045202,861484281,617419803,419328516,430698150,787873321,964746965,508831870,394709221,416208822,265334938,410260274,923976569,988955152,82365490,361191448,729700171,398781902,207433066,677880815,768819637,142990728,345695843,314836111,636344605,699605137,554725193,897162044,342504896,536271973,324591948,636998925,488776232,221811480,944001785,886004348,544761445,644050694,540606567,653085093,624369544,393470607,522005226,120855817,328866664,768884051,25116129,892168027,785967671,262288506,741660185,488676042,663939743,836225870,847116846,831017977,480435619,828883117,308718504,981671640,71908755,586828879,636309857,927715727,160954084,715108783,995860429,277714559,994799693,988063869,746238210,694383920,22220478,807762455,44391226,287466494,982654968,713448377,977585087,902649100,75890368,535116329,862322982,921742704,808729596,429126605,352938551,624500515,633881944,428113849,415233788,494570163,670822030,270145350,49018456,556926990,799590715,590098114,680219533,363293787,930715219,642171590,282104097,216856467,180937221,175657516,428354451,808691930,998324145,358283154,466296014,67853838,671075979,479719850,362693807,825214384,805996521,514359662,303703636,996283144,828457388,430538405,161646605,205394803,91540060,19332138,881727126,895205045,668411172,710192688,842292670,523665938,18763728,932133547,983331473,517718457,19270643,715264908,505511749,818574611,605943940,492549025,171766217,427084870,195309380,187800811,214332747,628829100,431699054,188215106,717112056,143380801,727088567,709026752,350440922,759002288,185193633,484492064,683808651,364455291,943530011,966707479,847440256,837453770,680845574,482764258,513810767,919717789,928669856,297041414,396441489,727771800,118695128,375730434,909077633,140909847,26453444,513196123,594307628,15369004,749235994,742784839,1927054,966548302,458024393,999738618,793538766,748510389,776567793,748342116,222874000,699766608,604018013,30305086,273577394,130016019,289193215,403652653,643214710,594901690,210235208,645584198,900440408,661412735,782790081,859898679,464514671,574455974,614785539,426349074,532328609,452410737,135656153,654581682,382945786,28726649,907615719,77123823,273058940,368429004,278632357,601475460,195346599,431184348,658851872,832473701,134230389,172096141,677336009,80383086,3025590,316340630,796894379,666861325,675804501,33107859,473608304,819801784,13521299,865506733,94154960,615250929,102159868,876108626,147958209,182045350,170479156,581418893,454289755,96311593,600896800,523597876,26773666,17622588,38356261,797757269,369842738,15655126,633495166,793616977,349051181,668246370,961808256,160630660,561279198,964118631,444532783,15391652,197512605,56150668,639221083,815626120,340290036,221842546,33128435,393720508,562146899,875641535,740484191,412237041,839262794,478199454,25732221,241071717,692424975,767714339,364851449,203191898,760116222,978601387,953135319,552822041,762975242,138549377,545960977,417942539,12777045,264582598,14084612,81856390,522385746,234947456,186922308,277650223,807783223,581708983,900359059,880691101,576397017,467598076,896291861,625278603,828454217,299893553,73265104,197666986,7510915,907800444,536424215,501938887,996994066,725559962,342392035,569600455,460379334,859921080,137126121,986598821,889093876,893600713,823713536,607363865,200084575,861338050,402622414,870740081,170294710,340030191,80930588,481923877,680865628,945358400,556841547,214956689,123735046,71038724,827249795,264688936,814959680,398444349,741277544,449958460,275811253,771097082,409483031,41076631,941968057,369832433,156756832,770162507,585373466,905924748,444094748,183658929,101232881,896884790,916844400,785804644,217485232,912354528,559932591,954270606,277341268,598778643,3111313,604867835,637846675,842065079,407976039,495838143,676915554,286875008,898092098,219425152,770479710,799254294,747928438,423951674,113870566,624114280,524255050,119813352,207638534,714874414,109632910,268343768,275019037,663560047,724716409,923820379,279246261,366223170,230631176,341205900,278435517,975896867,156553926,696623384,515106746,184827796,73626177,830126743,807827182,823399038,62256275,286246546,416954494,496709826,302067611,934953895,674033541,572785751,879400608,183229029,127779629,921075273,896732305,161960209,377260882,538244672,50506620,910171678,865140964,151945652,237234220,326083992,183447610,331910086,101365383,908732533,399736999,188622572,603116309,13527023,776939174,484862577,910743169,541120825,219668816,432047901,717716914,941211285,574610474,287777481,633164948,31728844,128231584,951524114,104945380,832712633,252775377,56287048,962158915,142493387,45094569,652822305,763500859,841656666,259846932,610289231,73529909,282938781,662109025,503140662,566598781,540979506,605759367,162683802,799758596,169823238,842894859,881334012,60582516,961773117,125435148,72128915,811746048,629786193,273888610,979670619,347019540,230477028,883014120,402106077,51022350,794471639,701757552,190395535,814484425,50055621,611396838,91198469,472550413,221210182,301675036,481161431,340084185,269571439,25868108,609396366,871947209,587183657,468747428,279364087,306332476,513958026,158144141,832671304,963494725,565647910,642999842,320001298,125435851,831650763,633972100,371926819,622142354,76770272,84815412,671672880,117677051,199774070,470689842,377865541,637773843,302464254,236753965,341080135,241874278,644042531,636163187,160849952,207220566,365500410,573488297,921838917,548989742,421943723,151046577,170960052,734176009,549348080,324979737,52995235,879718865,655814211,328538426,494210290,554682175,397780223,723794497,104494341,604177687,825689399,609235992,87076222,470005245,751040886,678359295,717668287,80765996,55212870,95589267,119004660,176725488,580413046,930505211,317076664,302736036,633010409,743716758,884945562,717683969,895966774,251388971,114495223,334897022,672850561,575939296,431200610,844041465,671006344,988189352,679872740,789366888,713879575,161028474,72482816,899042068,283738625,959405543,888938507,161579561,218139373,624049416,954440108,781703394,493689107,418450927,974044014,680525597,321889979,388537544,158471181,622282529,214217407,641871063,135625240,797269582,919788603,420964425,497813276,555187833,79499595,672588624,97784562,555534951,100228913,399130155,597790155,12610613,810904041,728822117,480381639,18363876,162490176,313953129,684748812,839330987,957200574,382207259,909426167,576796201,683285538,396200063,585281399,837129069,639655136,567802332,84632985,779407476,181994733,266200149,826696971,129325743,960676473,44499282,906233141,600157515,21121378,474145964,901451856,85157309,823154790,790088315,2902192,754751352,929893103,254169484,670105278,838139561,642380089,133047646,264686798,695436163,941348051,555792495,277813439,172729667,445446563,203283865,752635906,9837620,902980332,616754066,105074578,617517815,814362881,485666855,467920076,51351912,427675611,380021947,8521003,780490114,314431839,203124470,562608724,522186091,345167956,493949905,515767294,213027699,617304201,76480830,321587328,839247185,406024012,655899310,132278719,922487741,726229501,315587760,600233962,249511881,472901360,139144723,885537778,621136590,249429164,323568655,785456666,925665844,674533527,403621993,888167735,854558841,10065330,951033631,309461521,294710600,196741756,107125810,210767592,823485125,753152516,373430453,60625018,467597234,849578441,608652427,841629667,376366561,468928447,786969078,640885103,242988818,983737173,607647301,73330961,449773929,915099068,253250904,624377709,192627024,849525756,656269190,60517502,773875185,114886454,953471765,163038122,466459786,430048364,30943711,141596507,489356057,551060742,896379480,583216446,602789631,143407998,139998669,918542696,209454866,179435628,131883870,804930491,447803755,539765360,320352019,315266469,592347496,494268880,475803357,391413644,657906541,823845496,563756918,161083658,233777800,428887477,765555389,973849550,996273936,240477416,101130982,727416538,643314206,313294171,615023230,881769105,590444719,193434473,408689782,147301263,488364060,946421040,873673735,917891624,815075058,63641538,717927112,770955505,154380845,394899231,136227229,678171399,745708236,434031342,778500849,451079175,86811998,443618781,832694761,634121148,180263562,842203531,344927565,1807425,215272763,95905616,371706626,272168573,863463484,353782904,455242479,175638827,607754428,996380924,594473005,141522222,408502422,653867289,13821007,46910641,847302422,894247956,753993600,905754479,729611827,823173026,831246288,113252848,898003197,267728794,970946988,538609927,45281372,862941821,450745015,992194188,782723657,975226699,580521901,831449564,815355643,885362182,660999562,49790705,128113325,411820693,831257253,663971804,617420861,983946932,633718547,946464959,329715262,864162465,443796460,70298830,453770195,978954289,245434323,680922328,120218251,116667533,77934424,665516103,254389080,791371507,982647665,44771880,207389730,484444661,759884299,749816133,886451209,894838313,656119793,933305518,712106516,616418505,619884259,704840030,297271537,241427979,36933814,659692538,296257631,961319002,710965692,995710133,819141993,273943424,618234490,871117927,620245083,704279434,299955607,510693796,378998132,329834703,971674603,690369886,974966907,281804989,337576629,799146252,798720248,220356705,603830959,341717691,900439391,55398199,80497589,163928347,302198608,450861796,512730555,667020392,644386154,118238106,850431100,341968649,667594073,563796647,869419216,999853565,827280818,630585326,274795785,996135761,497187759,75201573,167597802,640266394,633850194,294139525,86543745,193170365,107234102,626642230,110808465,638428173,965240965,774625892,188536279,53533202,375959668,768834255,791185412,295470685,832723358,146628973,437592968,59342705,203286861,182299808,353937066,503912861,97826191,116225473,270536120,176366171,547567587,256473217,255651328,612860517,271991541,702144552,590213099,351908785,349191662,795985707,858331351,674115061,706216425,641863188,67404107,966269658,703665287,969473023,997319282,68213963,800575413,918860977,658366716,198797634,279190962,2947098,8947163,566144751,103373765,745744394,433886928,322633051,958541757,505255660,93846771,106954728,192270447,325145582,89201969,950334087,756430344,753513874,600841275,419792036,544334392,406578925,294830834,757329093,159688476,471703615,377675772,393556719,169977721,144571505,547343499,375444447,25181126,21686669,382815804,874254764,785816244,304644842,801679121,141952086,330170362,837580332,234845827,530861561,68932816,219698501,514622405,767372800,39755577,377516953,329020498,397091747,553063981,75061610,361762728,749180338,777766466,161362528,832298718,288897720,390463735,294206968,749473336,60065457,452388193,976521022,535344062,754787150,135455867,270285846,819975858,380974020,58596576,451709693,435986267,426176420,325599240,627655552,298859376,32047028,82981617,355876825,159512462,452433811,801685712,923770521,134327469,677395736,923367011,441274033,799301353,311867912,846532820,800849785,137694553,661537637,29302974,799289297,35823543,556003302,162770101,657258899,354655649,927572137,621650238,352886272,411666472,846650652,209846942,338657310,960251650,988455813,978805070,535099780,647951808,607636771,484343208,816701166,262233111,44086947,701521006,407896543,315419580,490329417,691774103,128635371,979553707,687265514,796115356,579659907,783080179,759048941,833548006,578690901,741686984,291397055,706093589,787113234,32894968,252851400,879004638,164950881,97846412,677856415,802262529,744064735,551067028,358757251,58213244,450562136,632946773,617715754,226478218,976366438,882360693,249770937,991264776,701220427,416683375,609488927,272767232,144453590,567481117,795949633,852724529,242444386,281940580,607715125,609330096,576861374,991591213,773174605,90197399,655829165,726601671,750941512,639645862,245795606,933616866,575125687,799284830,43209047,962901304,691263483,631804120,760649561,232352968,600624983,72863443,215263617,502865700,911651761,242901954,347049376,967919552,16011198,628460836,10475577,172578342,434596327,868810396,646820311,650859047,43235933,409169579,360639233,344460558,728620948,985710430,672056268,188392885,170826012,435811032,88327015,941896625,193266837,975521470,759404319,137086995,811707189,861523948,275928212,573183959,724907442,206488336,43792231,400598967,36292292,750253954,77927268,120455381,912907331,183555163,978578801,686001263,82897702,70116388,491466901,293037804,743334671,376692772,987488759,447239215,762625463,203548375,815053082,806870579,22556579,107340464,908499163,577622777,723630413,873791394,943554485,816307485,933704825,727277339,114495791,429413379,680244574,734055580,704711488,197736875,111439262,28902218,865233543,129319433,647630109,154595648,52347419,882942761,968677027,485056460,999091970,706896920,556738299,109682585,586445753,133784336,39937116,13101607,768945489,190508668,917909484,352173224,467351091,288248113,482254337,172125683,410651368,655784980,7987297,322924180,368295944,543174551,481742019,892072013,718623833,878739486,576140617,8045884,301479375,116698549,755652757,268692398,218494741,925256833,763514207,433380458,35795743,698259707,992753778,810987160,662334405,305913859,898591105,682854915,66547751,112566091,644331470,344275683,858133770,300695571,383852204,627152555,45194888,351374599,953634340,844466606,451790389,88338065,35435573,324833924,671164082,707089820,176294484,609762355,351472920,826794013,782334083,536209637,359808887,384343273,681603913,140510209,407003192,862405202,308474522,547667511,7603723,34844616,590167637,20450004,856523182,762234555,820788033,567077614,494166907,397619742,43004507,762782715,677692576,85288039,390408896,896322114,140475489,212710376,634359666,953703028,840570768,246486042,149303483,397059212,640321280,334950193,992835875,886433112,172114298,947856866,818254617,521197072,154345160,198532616,196800449,4697493,870605651,864433914,865440961,646184883,645545349,990839195,327890704,3739182,443215535,438569183,852746349,584736519,364380585,991215221,568923977,624902060,818312619,990631624,63375050,712644119,878161899,381703446,921648059,916027925,897560127,901825685,418425432,903288230,284440679,541005494,542351792,951276471,965683742,143745971,752734606,545127461,907002124,374214450,875867413,502614804,694688662,836464343,260466949,300451495,453026551,729521334,251195555,112429098,827102807,914146054,503551288,34223419,117483873,244600276,880521254,952160903,699952443,281744795,892167407,18405280,469449264,755340785,962540888,52363853,119067966,258365830,52097767,642772349,370019264,585145563,822249634,113733939,237120480,174332755,771648639,905415848,229619983,504371008,680015907,604785226,259773735,969123061,620531822,814858641,964404181,134839105,958440491,563045796,109152123,403429061,333219547,504659303,193781724,789556231,685711127,935442931,638406068,695511574,670271563,918664302,605076602,348977746,213092254,990219307,714457410,740938590,205295329,782794242,381785483,328547667,281826390,966640179,107141741,69458231,387628955,22912391,224849215,662565976,6967754,165534761,866444111,253377392,602742426,699722694,279355497,176865655,508943810,857268414,343331898,792638611,979459326,632801056,793307102,446493360,455966229,970104063,25469363,919116765,826766689,542749852,657738639,506416432,756154604,483724228,3624695,983565919,470725288,443183564,231276098,981465416,312329365,281891378,236455213,907388810,601085495,765738341,901161015,626871594,894650449,948724148,114049054,981959471,362928234,175637404,386979036,380480024,997816103,938420738,289805123,7726771,737506189,767370785,14162538,495822288,62659548,368794902,506228345,801639277,54273740,587993451,609048943,211855718,753042874,26804576,344492349,949402905,989024750,723950758,366746787,274007936,394987571,308604785,778983779,760167563,851727632,814306574,210337196,672909594,315177422,991869154,599368778,811826264,25977209,641243165,991853918,886615652,994609967,323582350,575349415,615541590,973313674,264381041,49389215,759005373,466403812,178079280,82441236,254189314,289991756,892050437,855143395,91757438,698308420,84154615,188880105,678383330,436428039,181353334,492881183,122849448,408723908,221350454,859637374,235381231,808369065,395489921,505825384,801413581,951452262,171146038,500512522,808410663,49031023,976705957,260616058,998455000,412675227,709178470,29878651,349322665,764975785,715023509,713258160,764965052,766707885,776502975,905773713,410465453,803331189,34747238,371429170,772391340,737331920,784732693,445933418,399337141,187935799,131731042,780699748,764218821,660234457,680624979,923333660,486620721,163125870,110147951,3991476,601117743,684624305,878640901,80563352,122543945,804861409,727406914,757901773,322961008,815797860,327520749,364058973,969085228,553952872,506421625,83868974,726802941,354103106,488474631,817729704,260831555,877658636,773476841,359056292,884333679,682873215,12618703,293714317,519796614,344608141,937240859,872372077,50477806,214537860,202673906,217298111,954723704,938420095,524150252,302862755,659873007,395850518,500592292,113646516,235142930,883278906,731727413,19270208,16290908,31342527,366761197,844172795,145201467,187697925,483164392,176966527,120685561,636560065,42838238,258450659,110744650,949978853,446634274,129724336,835659321,954913,293682042,950540131,154622141,90605325,246965865,186631946,535586449,226981711,33495801,105359006,219232149,181835443,202198899,245338485,338471174,686744811,952714302,808138529,69728547,390019735,285892973,629602874,818896362,437310030,549660657,73691665,371007759,970863349,657727615,10430738,501947217,300281827,652336595,802245045,58007504,96008232,394917306,906169092,34847604,706334445,278052212,826784106,417960223,937262209,864696066,58085060,83992640,304794421,408283452,315103615,918564215,975683542,448404288,282183879,465054749,301612312,10393336,300834556,528080206,567473423,735360417,937290323,326708726,801586457,85292764,832860641,669897153,714013813,817925464,708233401,40546937,816547758,525675504,311568885,426786760,962305199,8050917,636346220,208787317,48160594,217118148,525040405,447207014,790758484,142441517,407154607,89856602,342774550,600800377,946149627,304206231,156959265,420034479,841250413,394265229,792270972,940719785,733904456,600743238,346966053,9059781,514349511,818624255,99984366,71050762,25454838,25153410,104677203,529470459,281329488,860090592,32508648,381730578,205004338,246955022,319090865,630391823,483562350,34349123,462880311,751608800,946781127,793657339,911773159,253486451,4283891,936986902,717681997,598513367,31503476,71602747,458983926,101721491,567255816,411673788,851122915,85145684,354893353,370051218,185438078,712921767,960458533,607684227,716425891,521591989,468399808,842530849,609153670,557507373,965785236,529744274,789059759,311669452,387255176,16651371,108224705,616230933,701918934,560260153,992656683,88988969,633400565,127983599,719576024,545638190,942140453,243400602,790523771,794859549,916291845,318580210,60217575,874580373,668677123,65591903,513047302,910026008,178909003,613496200,881482632,916304134,747296925,42587322,548026212,957757479,437155518,812279408,918951065,792299597,899946391,321697039,36670825,857922528,43744543,84428155,957469762,79147005,929269243,270142104,321900901,944491355,775543604,427709220,528255018,674721611,381350331,629894526,169838765,889482960,512634493,817479361,262044551,445396258,339271869,970053019,186968777,870125056,687740343,320428001,303338827,901511835,924265341,9058966,327625657,860842034,789825490,851258730,296589615,904066718,121000338,520374634,217147361,653145383,171989322,87654126,867046994,457294725,490484575,988922932,967284733,599140106,644960213,679659893,838526218,580938783,63126637,694075816,819577801,603739686,492741665,543574940,812501999,971085075,510950308,671517513,370290353,18797131,916660987,216549068,152233223,858814345,343799473,477335006,246311854,335102896,271361010,164992964,852694071,554291156,165393390,338262892,21985433,8195350,302780015,160150497,483975089,361084936,682610501,509406823,680128316,803513526,114644779,573964644,321935156,685723887,473979326,677822059,53102426,163052139,917041303,617666448,95249276,954826526,207172258,782192657,877643222,623151847,492897596,527572212,532702135,829422649,745391035,768941501,478657069,56081734,429707160,841072969,344857140,198803488,741626808,19820900,779734593,309906471,877891340,642939667,305583444,224546239,53635336,744645153,496442755,960584207,348421260,787464577,116164597,867195255,73903881,197001309,226879956,562908177,536841269,363551706,709515651,368324673,30514807,412622873,630057303,389088357,875410153,792914276,131384366,99359978,386541987,653102924,307321014,994065976,953786104,730583919,627500870,292151509,377329025,573443769,613973085,816691591,599685896,974508445,708543683,966533706,845486631,333457751,301196854,264848873,894553004,759137421,309986645,574480664,371930700,364502974,416322416,775556523,859917803,281761694,767790141,879674443,389995666,20211256,766570439,325014894,379943099,957347508,676511002,792894374,888140011,755146193,824619763,437157360,802932692,946198358,619700091,625494526,373451745,948994836,487012980,596952378,639054294,83118246,752243809,52836141,756614559,114955307,847645126,710424773,925139828,886787632,23001875,268761837,557583419,234337026,860551136,894939441,823495900,818476649,95460945,987535081,578471809,459628134,12029751,348246100,676216445,751971766,576368335,520389069,78835193,52979524,960033065,494290402,120815665,610541980,961431677,592296500,73146164,300019098,119895268,230976447,630786699,98016105,612866870,593422313,291993453,92077788,954958912,23895805,585347275,571536697,206526983,486828649,707764537,441442575,245423562,628018983,847549272,119263545,954421367,724553294,384826244,201882845,374116154,97348051,247001105,782816485,241289571,527174998,550507082,993282622,249360270,420567331,378750527,539300380,976517503,681566251,646654592,555103342,958797332,911520292,946033733,788599446,883122906,886354425,616017573,716431887,216046746,788872381,999340546,283129306,575014853,682599498,85104325,392505761,219092361,312720425,205951465,127398072,877002932,231120229,676290554,383521365,989326738,299086439,765080455,622618140,3258987,599755664,95568681,78742678,894658473,433576760,434360362,474857680,330810163,944598142,780882948,597789250,163787210,311490118,385914044,510148825,74434897,326957567,723091468,433350723,822439091,908200376,35784547,525561111,118654619,128900492,696559662,751235252,973737505,240437894,598245292,168759145,895487487,907890920,139066955,606924610,915276325,353658242,547380283,61705100,869544707,762816834,306032293,778368564,59434732,933768689,590393084,523894858,267469129,926316480,698611116};
ll quick(ll a,ll b)//快速幂 
{
	ll ans = 1;
	a = a % mod;
	while (b)
	{
		if (b & 1)
			ans = ans * a % mod;
		a = a * a % mod;
		b >>= 1;
	}
	return ans;
}
ll inv(ll x)//费马小定理求逆元 
{
	return quick(x,mod - 2);
}ll solve(ll a) //分块后的阶乘 
{
	ll p = a / MAXN;
	ll l = p * MAXN + 1;
	ll ans = f[p];
	for (int i = l;i <= a;i ++)
		ans = ans * i % mod;
	return ans;
}
/*-------线下打表--------*/ 
//void init()
//{
//	int pos = 0;
//	ll ans = 1;
//	for (int i = 2;i <= (int)1e9;i ++)
//	{
//		ans = ans * i % mod;
//		if (i % 100000 == 0)
//			f[pos ++] = ans;
//	}
//	for (int i = 0;i < pos;i ++)
//		printf("%lld,",f[i]);
//}
/*-------线下打表--------*/ 
int main()
{
	int t;
	ll a,b,c;
	scanf("%d",&t);
	while (t --)
	{
		scanf("%lld %lld %lld",&a,&b,&c);
		ll ans = (solve(a + b - c) % mod * (solve(b) % mod)) % mod
		          * inv(solve(a + b) % mod * (solve(b - c) % mod) % mod) % mod;
		ans = (1 - ans) + mod;
		printf("%lld\n",ans);
	}
	return 0;	
} 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值