这里会显示出您选择的修订版和当前版本之间的差别。
| 两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 | ||
|
2020-2021:teams:die_java:front_page_summertrain1 [2020/07/17 17:54] mychael |
2020-2021:teams:die_java:front_page_summertrain1 [2020/10/17 22:58] (当前版本) fyhssgss |
||
|---|---|---|---|
| 行 254: | 行 254: | ||
| 故变成: $$ | 故变成: $$ | ||
| - | 约束条件:x^TAx\leq1 | + | 约束条件:x^TAx=1 |
| \\ 目标函数:\{b^T·x\} | \\ 目标函数:\{b^T·x\} | ||
| $$ 考虑拉格朗日数乘法 $$ | $$ 考虑拉格朗日数乘法 $$ | ||
| 行 516: | 行 516: | ||
| </code> | </code> | ||
| </hidden> | </hidden> | ||
| - | ===== ===== | ||
| + | ===== J.Easy Integration ===== | ||
| + | |||
| + | === 题意 === | ||
| + | |||
| + | 算 $\int^{1}_{0}{(x-x^2)^ndx}$ | ||
| + | |||
| + | === 题解 === | ||
| + | |||
| + | 分部积分即可推出答案为 $\frac{(n!)^2}{(2n+1)!}$ | ||
| + | |||
| + | <hidden 代码> | ||
| + | <code cpp> | ||
| + | #include<iostream> | ||
| + | #include<cstdio> | ||
| + | #include<algorithm> | ||
| + | #include<cstring> | ||
| + | #define ll long long | ||
| + | using namespace std; | ||
| + | int read() | ||
| + | { | ||
| + | int k=0,f=1;char c=getchar(); | ||
| + | for(;!isdigit(c);c=getchar()) if(c=='-') f=-1; | ||
| + | for(;isdigit(c);c=getchar()) k=k*10+c-'0';return k*f; | ||
| + | } | ||
| + | const int N=2000005,M=1000000,mod=998244353; | ||
| + | int n,frac[N]; | ||
| + | int ksm(int x,int k) | ||
| + | { | ||
| + | int ans=1; | ||
| + | for(;k;k>>=1,x=1ll*x*x%mod) | ||
| + | if(k&1) | ||
| + | ans=1ll*ans*x%mod; | ||
| + | return ans; | ||
| + | } | ||
| + | int main() | ||
| + | { | ||
| + | frac[1]=1; | ||
| + | for(int i=2;i<=M*2+1;i++) | ||
| + | frac[i]=1ll*i*frac[i-1]%mod; | ||
| + | while(scanf("%d",&n)!=EOF) | ||
| + | { | ||
| + | printf("%lld\n",1ll*frac[n]*frac[n]%mod*ksm(frac[2*n+1],mod-2)%mod); | ||
| + | } | ||
| + | return 0; | ||
| + | } | ||
| + | </code> | ||
| + | </hidden> | ||
| ===== 训练实况 ===== | ===== 训练实况 ===== | ||