简要题意

给定两个次数为 \(d\) 的多项式 \(A, B\) 在 \(0, 1, 2, \dots, d\) 处的点值对 \(10^9+7\) 取模,保证 \(B(x) \equiv A(x+s) \pmod {10^9+7}\)。求 \(s \bmod 10^9+7\)。

数据范围:\(1\le d\le 2.5\times10^6\)。

题解

实在是非常简单的题,考场上没过,怎么会逝呢?其实就是没反应过来差分可以快速求。

多项式平移套上差分、求导、exp……依然是同样的平移。考虑降低多项式次数,求 \(A, B\) 的 \(d - 1\) 阶差分,得到两个一次函数,则很容易得到 \(s\)。

\[\Delta^k F(x) = \sum\limits_{i=0}^{k}\binom{k}{i}(-1)^{k-i}F(x+i)
\]

证明考虑算路径贡献。

CF1817C Similar Polynomials的更多相关文章

  1. iOS之使用模拟器报错:resource fork, Finder information, or similar detritus not allowed

    很奇怪的问题,使用真机测试没有问题.但使用模拟器测试的时候就会报这样的错误,错误类型为:Code Sign Error 错误提示是这样:resource fork, Finder informatio ...

  2. 1002. A+B for Polynomials (25)

    题目链接:https://www.patest.cn/contests/pat-a-practise/1002 原题如下: This time, you are supposed to find A+ ...

  3. hackerrank Similar Pair

    传送门 Problem Statement You are given a tree where each node is labeled from 1 to n. How many similar ...

  4. PAT (Advanced Level) Practise:1002. A+B for Polynomials

    [题目链接] This time, you are supposed to find A+B where A and B are two polynomials. Input Each input f ...

  5. \(\S1 \) Gaussian Measure and Hermite Polynomials

    Define on \(\mathbb{R}^d\) the normalized Gaussian measure\[ d \gamma(x)=\frac{1}{(2\pi)^{\frac{d}{2 ...

  6. 1002. A+B for Polynomials

    1002. A+B for Polynomials (25) This time, you are supposed to find A+B where A and B are two polynom ...

  7. [zz] be similar with和be similar to的区别

    http://wenda.tianya.cn/question/4cb13da080ee34c9 be similar to后边既可以加物主代词又可以加人,即:be similar to sth/sb ...

  8. Legendre polynomials

    In mathematics, Legendre functions are solutions to Legendre's differential equation: In particular, ...

  9. PAT 解题报告 1009. Product of Polynomials (25)

    This time, you are supposed to find A*B where A and B are two polynomials. Input Specification: Each ...

  10. 【PAT】1009. Product of Polynomials (25)

    题目链接:http://pat.zju.edu.cn/contests/pat-a-practise/1009 分析:简单题.相乘时指数相加,系数相乘即可,输出时按指数从高到低的顺序.注意点:多项式相 ...

随机推荐

  1. Kubeadm安装k8s集群升级100年证书时报错:Unable to connect to the server: EOF:求解决方法.

    报错信息: 使用命令时: Kubelet服务报错: 报错情况,在更新完k8s100年证书的时候,到最后重新启动kubelet服务的时候,服务是可以重新启动的,但是kubectl的命令是无法使用的,会等 ...

  2. [Linux]Xshell连接Centos7能Ping通但无法连接问题[ssh(d)+firewalld/iptables+chkconfig]

    一 方案与思路 0 xshell客户端监测是否能够ping通目标服务器. 前提:知晓目标服务器IP地址 Linux: ifconfig -a Windows: ipconfig -a 1 利用fire ...

  3. Python GDAL库在Anaconda环境中的配置

      本文介绍在Anaconda环境下,安装Python中栅格.矢量等地理数据处理库GDAL的方法.   需要注意的是,本文介绍基于conda install命令直接联网安装GDAL库的方法:这一方法有 ...

  4. 随手记:lnmp 安装完 redis 后无法全局操作

     说明redis-server不是全局命令,那么假如到全局即可 假设redis安装目录是:/usr/local/redis/bin/redis-cli ln -s /usr/local/redis/b ...

  5. 两种路由模式的区别(hash模式,history模式)

    1. hash 带#号的,history不带#号2.hash模式用的hashChange监听路径的变化3.history用的是HTML5相关的API语法 使用pushState => 添加一条历 ...

  6. 什么是BFC,BFC的作用,以及怎么触发BFC

    什么是BFC: 块级格式化上下文 BFC的作用: BFC其实就是规定了网页布局的规范     1.BFC就是页面上的一个独立容器,容器里面的元素不会影响到外面的元素     解释:BFC的基本改变,最 ...

  7. RTSP Server(LIVE555)源码分析(五)-PLAY信令

    主要分析RTSPServer::RTSPClientSession针对客户端PLAY事件处理 一. PLAY信令,handleCmd_withinSession源码解析 1)步骤1.03,当RTSP客 ...

  8. react 兄弟组件传值(发布订阅,使用于任何组件传值,包括vue)

    react中兄弟组件传值常规操作一般是,A组件传给父组件,父组件再传给B组件 非常规操作 利用  pubsub-js 在Home组件内调用 PubSub.publish("第一个参数是事件名 ...

  9. vue上传文件(原生方法)

    前言: 组件库的文件上传不适合项目,这里我们利用input标签实现文件上传 首先input type=file  标签是这个亚子的,而且样式不能改,我们利用css的方法,将一个定位到这个下面来,然后i ...

  10. [Pytorch框架] 5.2 Pytorch处理结构化数据

    文章目录 5.2 Pytorch处理结构化数据 简介 数据预处理 定义数据集 定义模型 训练 import numpy as np import pandas as pd import torch f ...