这题不是要求线性吗?
by monstersqwq @ 2021-03-05 17:58:51
这题不能分别求逆元的,要用递推求
by 江户川·萝卜 @ 2021-03-05 18:00:02
哥这题得递推
实在不行卡卡常也行
by 超级玛丽王子 @ 2021-03-05 18:01:32
把快写换成这段代码,再在 `return 0;` 前插入 `fwrite(_d,1,_p-_d,stdout);`。
```cpp
char _d[_SIZE_],*_p=_d;
#define putc(__c) (_p-_d==_SIZE_?fwrite(_d,1,_SIZE_,stdout),_p=_d,*_p++=__c:*_p++=__c)
#define write(__x) {register int _x=__x;(_x<0)&&(putc(45),_x=-_x);static int _q[11];register char _t=0;do{_q[_t++]=_x%10,_x/=10;}while(_x);while(_t)putc(_q[--_t]+48);}
```
~~此题输出量 3e6,输出的时间比求解的时间还长,所以使用 `fwrite` 吧(~~
by 123456zmy @ 2021-03-05 19:20:49
输出换行是 `putc(10)`,使用此代码则不能使用 `puts/putchar/printf/cout...` 等函数,否则会 WA
by 123456zmy @ 2021-03-05 19:24:05
~~我这题是用埃氏筛 nloglogn +fwrite 过的~~
by 123456zmy @ 2021-03-05 19:26:06
本题线性求逆元
by Shirο @ 2021-03-05 21:25:39