当前位置:网站首页>[training Day11] Calc [mathematics]
[training Day11] Calc [mathematics]
2022-07-25 22:30:00 【VL——MOESR】

Ideas :
n!k Sure satisfaction 2 a 1 ∗ 3 a 2 … … ∗ n a n 2^{a_1}*3^{a_2}……*n^{a_n} 2a1∗3a2……∗nan
Let's enumerate k Come looking for a Laws
Discovery is prefix and
seek k-1 Secondary prefixes and , Work out each a Value , Finally, decompose the prime factor to find
c o d e code code
#include<iostream>
#include<cstdio>
#define ll long long
using namespace std;
const ll mod = 1e9 + 9;
ll n, k;
ll a[1010], s[1010];
int main() {
scanf("%lld%lld", &n, &k);
for(ll i = 1; i <= n; i ++) a[i] = 1;
for(ll i = 2; i <= k; i ++)
for(ll j = 1; j <= n; j ++) a[j] += a[j - 1], a[j] %= mod;
for(ll i = 1, j = n; i < n; i ++, j --) {
ll p = j;
for(ll g = 2; g <= p; g ++) {
ll tot = 0;
while(p % g == 0) p /= g, tot ++, tot %= mod;
s[g] += (tot * a[i]) % mod;
s[g] %= mod;
}
}
ll ans = 1;
for(int i = 2; i <= n; i ++) {
if(s[i] == 0) continue;
ans = ans * (s[i] + 1) % mod;
}
printf("%lld", ans);
return 0;
}
边栏推荐
- 分享两个音乐播放地址
- Wechat card issuing applet source code - automatic card issuing applet source code - with flow main function
- Wechat applet (anti shake, throttling), which solves the problem that users keep pulling down refresh requests or clicking buttons to submit information; Get the list information and refresh the data
- 3 词法分析
- LabVIEW develops PCI-1680U dual port can card
- Wechat official account application development (I)
- Output Yang Hui triangle with two-dimensional array
- 【集训DAY13】Out race【数学】【动态规划】
- 【集训DAY13】Travel【暴力】【动态规划】
- Gan, why '𠮷 𠮷'.Length== 3 ??
猜你喜欢
随机推荐
IFLYTEK smart office book air e-book reader makes my work life healthier
H5 lucky scratch lottery free official account + direct operation
[leetcode] 502.ipo (difficult)
ML-Numpy
Usage of in in SQL DQL query
According to the use and configuration of data permissions in the open source framework
What is the difference between character constants and string constants?
How is it most convenient to open an account for stock speculation? Is it safe for online account managers to open an account
Ffmpeg plays audio and video, time_ Base solves the problem of audio synchronization and SDL renders the picture
完啦,上班三个月,变秃了
Explore the use of self increasing and self decreasing operators
ThreadLocal summary (to be continued)
Win10 set up a flutter environment to step on the pit diary
Data governance under data platform
平台架构搭建
ArcGIS10.2配置PostgreSQL9.2标准教程
Five constraints and three paradigms
Selenium basic use and use selenium to capture the recruitment information of a website (continuously updating)
About vscode usage+ Solutions to the problem of tab failure
Tfrecord write and read









