数论
cybbsc
这个作者很懒,什么都没留下…
展开
-
Killer Names
1011-Killer Names *-HDU-2017 Multi-University Training Contest - Team 8*Problem Description Galen Marek, codenamed Starkiller, was a male Human apprentice of the Sith Lord Darth Vader. A powerful原创 2017-08-17 16:57:27 · 781 阅读 · 2 评论 -
HDU 3221矩阵快速幂&欧拉定理
#include <bits/stdc++.h>#define ll long longusing namespace std;const int N = 2;const int MX = 40000;ll a, b, p, MOD, n, tot, prime[7000];bool nop[MX];struct Matrix { ll mat[N][N];...原创 2018-10-07 00:36:48 · 408 阅读 · 0 评论 -
HDU 6333 Problem B.Harvest of Apples 莫队+组合数学
HDU 6333 Problem B.Harvest of Apples 莫队+组合数学Problem DescriptionThere are n apples on a tree, numbered from 1 to n. Count the number of ways to pick at most m apples.InputThe first line of...原创 2018-08-03 10:50:32 · 249 阅读 · 0 评论 -
牛客多校第六场 C、Generation
Generation时间限制:3秒 | 内存限制:256MOak is given N empty and non-repeatable sets which are numbered from 1 to N.Now Oak is going to do N operations. In the i-th operation, he will insert an integer x b...原创 2018-08-04 20:04:54 · 271 阅读 · 0 评论 -
[upcoj]6887: 游戏
时间限制: 1 Sec 内存限制: 512 MB题目描述九条可怜是一个热爱游戏的女孩子,她经常在网上和一些网友们玩一款叫做《僵尸危机》游戏。 在这款游戏中,玩家们会需要在成为僵尸之前与黑恶势力斗智斗勇,逃离被病毒感染的小岛。但是黑恶势力不会让玩家轻易得逞,他会把一些玩家抓走改造成僵尸。变成僵尸的玩家会攻击其他的玩家,被攻击的玩家会被”感染”,成为病毒的潜在宿主。 具体来说,游戏开始时...原创 2018-08-04 02:09:02 · 1807 阅读 · 0 评论 -
HRBUST 2374 Lcm functions
http://acm.hrbust.edu.cn/index.php?m=ProblemSet&a=showProblem&problem_id=2374此题结果不必取模#include <bits/stdc++.h>#define ll long longusing namespace std;const int N = 10000000;const ...原创 2018-03-26 16:47:55 · 235 阅读 · 0 评论 -
山东OI2017-数字表格
O(n^2)——–>O(nlogn) 莫比乌斯、枚举约数 注意:逆元#include <bits/stdc++.h>using namespace std;typedef long long LL;const int mod = 1000000007;const int N = 1000000;const int mx = 1000010;int prime[80000],mu[mx原创 2017-08-08 08:14:50 · 471 阅读 · 0 评论 -
反素数
1.什么是反素数?如果一个正数的约数个数大于所有比它小的正数的约数个数,那么这个数就是一个反素数。例如:1,2,4,6,12,24,36,...2.反素数有什么性质?设n是一个反素数, n的素因子有 p1,p2,…,pk , 且 p1 < p2 < … < pk , n = p1i1 p2i 2 … pki k, 那么 (1)p1,p2,…,pk是连续的质因子,从2开始的2,3,5,…原创 2017-09-11 11:40:30 · 680 阅读 · 0 评论 -
Trig Function
Problemf(cos(x))=cos(n∗x) holds for all xxx.Given two integers nnn and mmm, you need to calculate the coefficient of xmx^mxm in f(x)f(x)f(x), modulo 998244353998244353998244353. Input FormatMultipl原创 2017-09-16 19:19:06 · 806 阅读 · 0 评论 -
Light oj 1356
二分图最大独立集+质因子分解#include <bits/stdc++.h>#define INF 0x3f3f3f3f;using namespace std;const int MXN = 40010;const int MXM = 200010;const int MXX = 500010;struct Edge{ int v,nxt;}edge[...原创 2018-10-18 10:37:20 · 207 阅读 · 0 评论