项目编号:bzoj-4734

项目等级:Safe

项目描述:

  戳这里

特殊收容措施:

附录:

 #include <bits/stdc++.h>
#define range(i,c,o) for(register int i=(c);i<(o);++i)
using namespace std; // quick_io BEGIN HERE
#ifdef __WIN32
#define getC getchar
#else
#define getC getchar_unlocked
#endif inline unsigned getU()
{
char c; unsigned r=;
while(!isdigit(c=getC()));
for(;isdigit(c);c=getC())
{
r=(r<<)+(r<<)+c-'';
}
return r;
}
// quick_io END HERE static const int AwD=; inline int rev(const int&x)
{
int ret=;
for(int i=AwD-,j=x;i;i>>=,j=1LL*j*j%AwD)
{
if(i&) ret=1LL*ret*j%AwD;
}
return ret;
} int b[],f[]; int main()
{
int N=getU(),M=getU(),x=getU();
range(i,,M+) f[i]=getU();
range(i,,M+)
{
b[i]=f[];
range(j,,M-i)
{
f[j]=f[j+]-f[j];
if(f[j]<) f[j]+=AwD;
}
}
int ans=b[],C=,X=;
range(i,,M+)
{
C=1LL*C*(N-i+)%AwD*rev(i)%AwD;
X=1LL*X*x%AwD;
ans=(ans+1LL*b[i]*C%AwD*X)%AwD;
}
return printf("%d\n",ans),;
}

SCP-bzoj-4734的更多相关文章

  1. BZOJ 4734 UOJ #269 如何优雅地求和 (多项式)

    题目链接 (BZOJ) https://www.lydsy.com/JudgeOnline/problem.php?id=4734 (UOJ) http://uoj.ac/problem/269 题解 ...

  2. BZOJ 2127: happiness [最小割]

    2127: happiness Time Limit: 51 Sec  Memory Limit: 259 MBSubmit: 1815  Solved: 878[Submit][Status][Di ...

  3. 【BZOJ】【2127】happiness

    网络流/最小割 Orz Hzwer. 这题他题解说的比较简略……我手画了个图才明白过来…… 嗯对于每个人选文or理的单独收益大家应该很好理解……连S->i 权值为选文的喜悦值,i->T权值 ...

  4. Linux scp 设置nohup后台运行

    Linux scp 设置nohup后台运行 1.正常执行scp命令 2.输入ctrl + z 暂停任务 3.bg将其放入后台 4.disown -h 将这个作业忽略HUP信号 5.测试会话中断,任务继 ...

  5. scp报错 -bash: scp: command not found

    环境:RHEL6.5 使用scp命令报错: [root@oradb23 media]# scp /etc/hosts oradb24:/etc/ -bash: scp: command not fou ...

  6. 利用scp传输文件

    在linux下一般用scp这个命令来通过ssh传输文件. 从服务器上下载文件 scp username@servername:/path/filename /var/www/local_dir(本地目 ...

  7. linux之cp/scp命令+scp命令详解

    名称:cp 使用权限:所有使用者 使用方式: cp [options] source dest cp [options] source... directory 说明:将一个档案拷贝至另一档案,或将数 ...

  8. BZOJ 3275: Number

    3275: Number Time Limit: 10 Sec  Memory Limit: 128 MBSubmit: 874  Solved: 371[Submit][Status][Discus ...

  9. BZOJ 2879: [Noi2012]美食节

    2879: [Noi2012]美食节 Time Limit: 10 Sec  Memory Limit: 512 MBSubmit: 1834  Solved: 969[Submit][Status] ...

  10. bzoj 4610 Ceiling Functi

    bzoj 4610 Ceiling Functi Description bzoj上的描述有问题 给出\(n\)个长度为\(k\)的数列,将每个数列构成一个二叉搜索树,问有多少颗形态不同的树. Inp ...

随机推荐

  1. 【Vue】新版vue解决跨域问题

    vue.config.js module.exports = { devServer: { proxy: { "/api": { target: "http://192. ...

  2. 用K-近邻算法分类和回归

    import numpy as npfrom matplotlib import pyplot as plt X_train = np.array([ [158, 64], [170, 66], [1 ...

  3. appium desktop 定位弹出框时报错

    今天在定位真机APP的时候,弹出框的内容死活定位不到,只能定位到背景的内容. 问题:appium desktop 定位弹出框时报错,定位不到,只能定位到背景的内容. 分析: 定位工具找不到弹出框的元素 ...

  4. printf ("%*.*s")

    小数点.后“*”表示输出位数,具体的数据来自参数表printf格式字符串中,与宽度控制和精度控制有关的常量都可以换成变量,方法就是使用一个“*”代替那个常量,然后在后面提供变量给“*”. 同样,小数点 ...

  5. LINUX shell脚本相关

    调试脚本 测试脚本语法:bash -n file.sh 查看脚本每一步执行情况:bash -x file.sh   位置变量:$1,$2,... 特殊变量:           %?:最后一个命令的执 ...

  6. 测开之路二十九:Flask基础之jinja2模板

    中文文档:http://docs.jinkan.org/docs/jinja2/ 与静态资源一样,Flask默认的模板目录名为templates,如果有需要的话和static一样,要在初始化的时候声明 ...

  7. 使用iconv提示未知错误

    使用iconv 转化编码的时候提示错误:<b>Notice</b>: iconv() [<a href='http://www.jinyuanbao.cn'>fun ...

  8. [题解]Print a 1337-string...-数学(codeforces 1202D)

    题目链接:https://codeforces.com/problemset/problem/1202/D 题意: 构造一串只由 ‘1’,‘3’,‘7’ 组成的字符串,使其 ‘1337’ 子序列数量为 ...

  9. Advanved DataGrid using QTP

    Use the GetCellData(j,i) Function for Cell data and Use the GetRowData(j) Function for Row Data wher ...

  10. 工控PLC中,关于定时器TON,TOF,的一点新认知,或者说醒悟吧!

    PLC  中的定时器,都是放在一个具体PRG任务单元中的,而PRG单元需要放在具体固定的周期循环任务中才能被执行,而这个周期循环任务的循环周期 T: 与定时器的定时时间T0:    T与T0 的数量级 ...