提不上去,显示
g++: 编译器内部错误:File size limit exceeded signal terminated program as
请提交一份完整的错误报告,
如有可能请附上经预处理后的源文件。
参阅 <https://gcc.gnu.org/bugs/> 以获取指示。
Code:
#define _WIN32 1
#if 1
#if _WIN32
#include<cmath>
#include<iostream>
#include<algorithm>
#define atline inline
#else
#include<bits/stdc++.h>
#define atline __inline__ __attribute__((always_inline))
#endif
using namespace std;
#define LL long long
namespace FastIO {
#define ten(x) ((x<<1)+(x<<3))
constexpr auto Fsize = 100000;
#if ONLINE_JUDGE
#define tc() (A==B&&(B=(A=Fin)+fread(Fin,1,Fsize,stdin),A==B)?EOF:*A++)
#else
auto _ = []() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
return 0;
};
bool __ = _();
#define tc() cin.get()
#endif
#define pc(ch) (FoutSize<Fsize?Fout[FoutSize++]=ch:(fwrite(Fout,1,Fsize,stdout),Fout[(FoutSize=0)++]=ch))
int Top, FoutSize; char ch, * A, * B, Fin[Fsize], Fout[Fsize], Stack[Fsize];
template<class T>
atline void read(register T& x) { x = 0; while (!isdigit(ch = tc())); while (x = ten(x) + (ch & 15), isdigit(ch = tc())); }
atline void read(register char& x) { x = tc(); }
template<typename T, typename... I>
atline void read(T x, I... y) {
read(x), read(y...);
}
template<typename T>
atline void write(register T x) { if (!x) return (void)(pc('0')); if (x < 0) pc('-'), x = -x; while (x) Stack[++Top] = x % 10 + 48, x /= 10; while (Top) pc(Stack[Top--]); }
atline void write(register char x) { pc(x); }
template<typename T, typename... I>
atline void write(register T x, register I... y) {
write(x), write(y...);
}
inline void clear() { fwrite(Fout, 1, FoutSize, stdout); }
}using namespace FastIO;
#endif
constexpr int M = 998244353, N = 4000005;
long long n, k, t, fac[N+2] = { 1 }, rev[N+2], g[N+2] = { 1,0 }, p[N+2] = { 1 };
atline long long power(register long long& a, register long long b) {
register long long res = 1;
while (b) {
if (b & 1)res = res * a % M;
b >>= 1;
a = a * a % M;
}
return res;
}
int main() {
for (register int i = 1; i <= N; ++i)fac[i] = fac[i - 1] * i % M;
rev[N] = power(fac[N], M - 2);
for (register int i = N; i; --i)rev[i - 1] = rev[i] * i % M;
for (register int i = 2; i <= N; ++i)g[i] = (g[i - 1] + g[i - 2] * 2 * (i - 1)) % M * 4 * i % M * (i - 1) % M;
for (register int i = 1; i <= N; ++i)p[i] = p[i - 1] * 2 % M;
read(t);
while (t--) {
read(n, k);
write((fac[n] * rev[n - k] % M * fac[n] % M * rev[k] % M * rev[n - k] % M * p[k] % M * g[n - k] % M), '\n');
}
clear();
return 0;
}