项目编号: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),;
}

最新文章

  1. 将Matlab中的矩阵输出到txt文件
  2. MSSQL 多行合并为一行
  3. poj 2051.Argus 解题报告
  4. CSS3 里添加自定义字体
  5. C# 中distinct的使用
  6. Redis是什么?Redis数据库全解?
  7. 怎样用VB自动更新应用程序
  8. 【BZOJ3270】【高斯消元】博物馆
  9. IOS 企业版证书($299)In-House方式发布指南
  10. CSS控制文本超出后隐藏并用省略号代替
  11. 严重: Servlet.service() for servlet jsp threw exception java.lang.IllegalStateException: getOutputStream() has already been called for this response
  12. 手机自动化测试:appium源码分析之bootstrap十一
  13. LeetCode 169 Majority Element 解题报告
  14. cookie和sission的原理及异同
  15. Qt之QTreeWidget入门
  16. latex之矩阵表示
  17. 字符驱动之二操作方法(struct file_operations)【转】
  18. Html 常见meta
  19. 解决 office2016 意外的严重错误 不能启动程序
  20. Summary: Stack Overflow Error

热门文章

  1. 09-排序3 Insertion or Heap Sort(25 分)
  2. JS中算法之排序算法
  3. 自定义combiner实现文件倒排索引
  4. tab切换中的滚动条下拉分页带来的问题
  5. Python基础教程(017)--执行Python的方式解释器运行及其他几种解释器简介
  6. jerry
  7. 部署Jenkins完整记录
  8. sublime text 3安装Anaconda插件之后写python出现白框
  9. C#隐式类型和显示类型
  10. C#socket客户端自己输入消息发送到服务端通信实现通信