CF1817C Similar Polynomials
简要题意
给定两个次数为 \(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\)。
\]
证明考虑算路径贡献。
CF1817C Similar Polynomials的更多相关文章
- iOS之使用模拟器报错:resource fork, Finder information, or similar detritus not allowed
很奇怪的问题,使用真机测试没有问题.但使用模拟器测试的时候就会报这样的错误,错误类型为:Code Sign Error 错误提示是这样:resource fork, Finder informatio ...
- 1002. A+B for Polynomials (25)
题目链接:https://www.patest.cn/contests/pat-a-practise/1002 原题如下: This time, you are supposed to find A+ ...
- hackerrank Similar Pair
传送门 Problem Statement You are given a tree where each node is labeled from 1 to n. How many similar ...
- 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 ...
- \(\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 ...
- 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 ...
- [zz] be similar with和be similar to的区别
http://wenda.tianya.cn/question/4cb13da080ee34c9 be similar to后边既可以加物主代词又可以加人,即:be similar to sth/sb ...
- Legendre polynomials
In mathematics, Legendre functions are solutions to Legendre's differential equation: In particular, ...
- 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 ...
- 【PAT】1009. Product of Polynomials (25)
题目链接:http://pat.zju.edu.cn/contests/pat-a-practise/1009 分析:简单题.相乘时指数相加,系数相乘即可,输出时按指数从高到低的顺序.注意点:多项式相 ...
随机推荐
- ACM-NEFUOJ-P239回文数
#include<bits/stdc++.h> using namespace std; int n,p[1000],len,p1[1000]; int f() { int i; for( ...
- 使用 Solon Cloud 的 Jaeger 做请求链路跟踪
<dependency> <groupId>org.noear</groupId> <artifactId>jaeger-solon-cloud-plu ...
- mybatis初级教程
resultType与resultMap resultType:设置默认的映射关系 resultMap:设置自定义的映射关系 查询功能必须设置这两个其中的一个 在resources下面创建包,那么就得 ...
- 二进制安装Kubernetes(k8s) v1.26.1 IPv4/IPv6双栈 可脱离互联网
二进制安装Kubernetes(k8s) v1.26.1 IPv4/IPv6双栈 可脱离互联网 https://github.com/cby-chen/Kubernetes 开源不易,帮忙点个star ...
- [Java EE] java.net.SocketException: Connection reset【解决中】
1 错误描述 6:44:33.112] [DEBUG] [http-nio-9527-exec-3] [HttpClientUtil] http post url:http://bdp-gateway ...
- 五月九号java基础知识点
1.哈希集合元素不按顺序排序,若要排序使用LinkedHashSet类2.树集合类不仅实现Set接口,还实现java.lang.SortedSet接口来实现排序操作3.TreeSet<Strin ...
- 【Note】(坑)一些组合恒等式的实际意义理解(和待填坑的组合数学知识)
目录 排列组合 恒等式 (1) \(C_n^m=C_n^{n-m}\) (2) \(A_n^m+mA_n^{m-1}=A_{n+1}^m\) (3) \(C_n^{m-1}+C_n^{m}=C_{n+ ...
- Junit5 pom依赖
<dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter- ...
- 【SpringCloud】(三)Hystrix 与 Zuul
5 Hystrix Hystrix:一个用于处理分布式系统的延迟和容错的开源库,在分布式系统里,许多依赖会不可避免得调用失败,比如超时.异常等,Hystrix能保证在一个依赖出问题的情况下,不会导致整 ...
- Rocky Linux 初体验
简介 Rocky Linux 是 CentOS 的一个分支,它位于 Red Hat Enterprise Linux(RHEL) 的下游.与 CentOS 一样,它提供了非常适合服务器的稳定版 Lin ...