
数学
文章平均质量分 88
m0_51864047
这个作者很懒,什么都没留下…
展开
-
Hash Function(卷积,FFT)
题目链接题目描述For a given set S={a0,a1,a2,...,an−1}S = \{a_0, a_1, a_2, ..., a_{n-1}\}S={a0,a1,a2,...,an−1}, we called a hash function fS(x)f_S(x)fS(x) perfect hash function of SSS, if it satisfies ∀0≤i<j<n,fS(ai)≠fS(aj)\forall 0 \leq i < j <原创 2021-07-29 15:04:42 · 138 阅读 · 0 评论 -
2020ICPC济南 A Matrix Equation(高斯消元、自由元数量)
链接题目描述We call a matrix “01 Square” if and only if it’s a N×NN\times NN×N matrix and its elements are all 000 or 111.For two 01 Squares XXX,YYY, we define two operators X×YX\times YX×Y and X⊙YX\odot YX⊙Y. The value of them are also 01 Square matrices and原创 2021-11-28 08:00:00 · 249 阅读 · 0 评论 -
杭电ACM-LCY算法进阶培训班-专题训练(母函数及应用)
杭电ACM-LCY算法进阶培训班-专题训练(母函数及应用) 杭电ACM-LCY算法进阶培训班-专题训练(母函数及应用)Ignatius and the Princess IIIProblem DescriptionInputOutputSample InputSample Output思路:Square CoinsProblem DescriptionInputOutputSample InputSample Output思路:Holding Bin-Laden Captive!Problem Descr原创 2021-04-12 09:15:52 · 395 阅读 · 0 评论 -
[NOIP2011 提高组] 计算系数(排列组合,逆元)
P1313 [NOIP2011 提高组] 计算系数题目描述给定一个多项式(by+ax)k(by+ax)^k(by+ax)k ,请求出多项式展开后xn×ymx^n\times y^mxn×ym项的系数。输入格式共一行,包含555个整数,分别为aaa ,bbb ,kkk ,nnn ,mmm每两个整数之间用一个空格隔开。输出格式共111 行,包含一个整数,表示所求的系数,这个系数可能很大,输出对100071000710007取模后的结果。输入样例1 1 3 1 2输出样例3说明/提示原创 2021-04-01 16:00:47 · 341 阅读 · 0 评论 -
Limit(泰勒展开)
链接思路给出 aia_iai , bib_ibi ,ttt,要求 limi→0∑i=1nailn(1+bix)xtlim_{i \to 0}\frac{\sum^n_{i=1}a_i ln(1+b_ix)}{x^t}limi→0xt∑i=1nailn(1+bix). 将分子泰勒展开为多项式的形式,分子分母就可以约分了。f(x)=f(x0)0!(x−x0)0+f′(x0)1!(x−x0)1+f′′(x0)2!(x−x0)2+⋯+f(n)(x0)n!(x−x0)nf(x)=\frac...原创 2021-10-02 15:09:23 · 334 阅读 · 0 评论 -
Deleting Divisors(博弈论,数学)
CF 1537DAlice and Bob are playing a game.They start with a positive integer nnn and take alternating turns doing operations on it. Each turn a player can subtract from n one of its divisors that isn’t 111 or nnn. The player who cannot make a move on his/原创 2021-08-05 22:01:09 · 683 阅读 · 0 评论 -
A*B Problem(FFT模板)
原题链接 ( AcWing版 )原题链接 ( 洛谷版 )题目描述给定两个正整数 AAA 和 BBB,请你计算 A×BA×BA×B 的值。输入格式共两行,第一行包含整数 AAA,第二行包含整数 BBB。输出格式共一行,包含 A×BA×BA×B 的值。数据范围1≤A1 ≤ A1≤A 与 BBB 的长度 ≤ 10510^5105。输入样例:23输出样例:6强烈推荐这个视频:快速傅里叶变换(FFT)——有史以来最巧妙的算法?#include<bits/stdc++.h>原创 2021-07-28 23:21:09 · 184 阅读 · 0 评论 -
2020ICPC南京 F Fireworks(概率,三分)
链接题目描述Kotori is practicing making fireworks for the upcoming hanabi taikai1. It takes her nn minutes to make a single firework, and as she is not really proficient in making fireworks, each firework only has a probability of p×10−4p \times 10^{-4}p×10−4原创 2021-11-27 22:06:57 · 312 阅读 · 0 评论 -
Mikasa(位运算)
链接You are given two integers n and m. Find the MEX of the sequence n⊕0,n⊕1,…,n⊕mn⊕0,n⊕1,…,n⊕mn⊕0,n⊕1,…,n⊕m. Here, ⊕⊕⊕ is the bitwise XOR operator.MEX of the sequence of non-negative integers is the smallest non-negative integer that doesn’t appear in thi原创 2021-08-11 20:56:12 · 197 阅读 · 0 评论 -
Another Problem About Dividing Numbers(素数,质因数分解)
You are given two integers aaa and bbb. In one turn, you can do one of the following operations:Take an integer ccc ( c>1c>1c>1 and a should be divisible by ccc ) and replace a with ac\frac acca;Take an integer ccc ( c>1c>1c>1 and b s原创 2021-08-05 16:30:33 · 305 阅读 · 0 评论 -
Circle Game(博弈论)
Utkarsh is forced to play yet another one of Ashish’s games. The game progresses turn by turn and as usual, Ashish moves first.Consider the 2D plane. There is a token which is initially at (0,0). In one move a player must increase either the x coordinate原创 2021-08-20 15:01:18 · 419 阅读 · 0 评论 -
Integers Have Friends(线段树,双指针,GCD)
链接British mathematician John Littlewood once said about Indian mathematician Srinivasa Ramanujan that “every positive integer was one of his personal friends.”It turns out that positive integers can also be friends with each other! You are given an array原创 2021-08-13 11:27:18 · 516 阅读 · 0 评论 -
Double Strings(dp,组合数)
题目描述Given two strings AAA , BBB , and little HHH wants to choose a subsequence from {1,2,⋯ ,∣A∣}\{1, 2, \cdots, |A|\}{1,2,⋯,∣A∣}(call it aaa) and from {1,2,⋯ ,∣B∣}\{1, 2, \cdots, |B|\}{1,2,⋯,∣B∣}(call it bbb) respectively. A scheme is called good iff ∣a∣=原创 2021-08-04 17:20:57 · 390 阅读 · 1 评论 -
Moamen and XOR(dp,位运算,组合数)
链接Moamen and Ezzat are playing a game. They create an array a of nnn non-negative integers where every element is less than 2k2k2k.Moamen wins if a1&a2&a3&…&an≥a1⊕a2⊕a3⊕…⊕ana_1\&a_2\&a_3\&…\&a_n≥a_1⊕a_2⊕a_3⊕…⊕a_na1&a2原创 2021-08-12 17:40:34 · 203 阅读 · 0 评论 -
高斯消元法【模板】
题目背景链接Gauss 消元 .题目描述给定一个线性方程组,对其求解.输入格式第一行,一个正整数 nnn.第二至 n+1n+1n+1 行,每行 n+1n+1n+1 个整数,为 a1,a2⋯ana_1, a_2 \cdots a_na1,a2⋯an 和 bbb,代表一组方程。输出格式共 nnn 行,每行一个数,第 iii 行为 xix_ixi(保留 222 位小数)如果不存在唯一解,在第一行输出 “No Solution\text{No Solution}No 原创 2021-09-22 15:16:04 · 100 阅读 · 0 评论 -
Prime Game(素数、质因子)
链接设有十个数字,其中下标为 333、777、101010 (蓝色部分)的数字都有相同的质因子 xxx 。那么,以 111 为左端点的所有区间中,有 888 个区间中包含质因子 xxx :[1,3][1,3][1,3]、[1,4][1,4][1,4]、[1,5][1,5][1,5]、[1,6][1,6][1,6]、[1,7][1,7][1,7]、[1,8][1,8][1,8]、[1,9][1,9][1,9]、[1,10][1,10][1,10]。同理,以 222、333 为左端点的区间中,也各有 .原创 2021-10-05 16:28:46 · 553 阅读 · 0 评论 -
Insertion Sort(推公式、排列组合)
链接Insertion sort is a simple sorting algorithm that builds the final sorted array one item at an iteration.More precisely, insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. At each iteration, insertio原创 2021-10-30 20:19:09 · 265 阅读 · 0 评论