
数学
Han Gang
这个作者很懒,什么都没留下…
展开
-
2020CCPC网络赛1002——Graph Theory Class
记录一下min_25 求取前n项的所有素数和 LL tmp=Min25::solve(n+1); 下面是1002AC代码 /* * @沉着,冷静!: 噗,这你都信! * @LastEditors: HANGNAG * @LastEditTime: 2020-09-22 19:38:19 * @FilePath: \ACM_vscode\杭电多校\hdu.cpp */ #include <bits/stdc++.h> using namespace std; const int N =原创 2020-09-22 20:18:02 · 346 阅读 · 3 评论 -
Educational Codeforces Round 83-D. Count the Arrays
题目传送门:D. Count the Arrays input 3 4 output 6 input 3 5 output 10 input 42 1337 output 806066790 input 100000 200000 output 707899035 题意:给你n,m; 让你构造一个长度为n的数列,要下面满足几个条件 1.保证数列中所有的数都在1~m中,而且有且只有一个数出现过两次,其余数最多只能出现一次。 2.数列中有一个要有这样一个位置i,在i之前的要严原创 2020-05-24 20:24:27 · 199 阅读 · 2 评论 -
POJ——3090 Visible Lattice Points(欧拉函数)
题目传送门:POJ——3090 Visible Lattice Points Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 10420 Accepted: 6304 Description A lattice point (x, y) in the first quadrant (x and y are ...原创 2020-04-03 14:47:45 · 216 阅读 · 0 评论 -
博弈论
博弈,就分别介绍一下巴什博弈,威佐夫博弈,尼姆博弈,外加一个SG函数。 首先我们还是讲一下必胜点和必败点。 P点:必败点,就是说,谁在这个位置,在双方都操作正确的情况下必败。 N点:必胜点,在这个位置的时候,双方操作正确的情况下必胜。 必败点与必胜点性质: 1.所有的终结点都是必败点p。 2.从任何必胜点N操作,至少有一种方式可以进入必败点P。 3.无论如何操作,必败点p都能进入必胜点。 我们研究...原创 2019-12-17 19:48:09 · 239 阅读 · 1 评论 -
HDU-4722 好数字
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4722 ## 题目 If we sum up every digit of a number and the result can be exactly divided by 10, we say this number is a good number. You are required to ...原创 2019-03-27 21:04:11 · 193 阅读 · 2 评论 -
A - Buy the Ticket——卡特兰数
题目链接:HDU - 1133 讲这道题之前,决定先讲一下卡特兰数; 卡特兰数是组合数学中一个很著名的数列。 它的第n项可以用以下几种公式得出: 递推公式1 f(x)=∑i=0n−1f(i)×f(n−i−1).f(x)=\sum_{i=0}^{n-1}f(i)\times f(n-i-1).f(x)=i=0∑n−1f(i)×f(n−i−1). 递推公式2 f(n)=f(n−1)∗(4∗n−2)...原创 2019-11-20 18:20:20 · 200 阅读 · 0 评论 -
杭电多校第三场——Fansblog(费马小定理+逆元+威尔逊定理)
题目传送门 暑假打多校的时候第一次刚遇到这题是一脸懵逼,那场比赛虽然比较惨烈,但是队友强大,还是做出了这道题,当时还给我讲了这道题,当时懵懵懂懂就知道用威尔逊定理,但是最近又做到了这道题. emmmm…还是不会,(生气了,盘它)。 题目大意: T组,每组一个素数P,这个数有点大(1e9到1e14)让你找到一个素数Q,Q<P,并且Q最大。也就是让你找到小于P并且距离P最近的素数。 然后求的是(...原创 2019-11-12 10:45:34 · 190 阅读 · 0 评论