
数论
文章平均质量分 78
NuclearSubmarines
QAQ
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
数论:简单的模板
/* Copyright: xjjppm Author: xjjppm Date: 08-08-17 11:36 Description: Number Theory*/#include <map>#include <cmath>#include <cstdio>#include <cstring>#include <algorithm>inline int原创 2017-08-21 19:14:56 · 557 阅读 · 0 评论 -
NOIP2009Hankson的趣味题
题目戳这里分析题目gcdgcd(x,a0)=a1\;\;\;\;gcd(x,a_0)=a_1 ⇒{x=k1∗a1a0=k2∗a1 \Rightarrow\left\{\begin{aligned}x=k_1*a_1\\a_0=k_2*a_1\\\end{aligned}\right.⇒gcd(k1,k2)=1\Rightarrow gcd(k_1,k_2)=1简单证明:假设 gcd(k1,k2)原创 2017-08-26 16:34:17 · 7439 阅读 · 4 评论 -
[施工...][业界良心]数论
1.整除整除的概念a,b∈Za,b\in Z,如果存在一个整数 qq,使a=b⋅qa=b\cdot q 成立,则称“aa能被 bb 整除”或“bb 整除 aa”,记做b∣ab\mid a,否则记做b∤ab\nmid a。带余除法定理设a,b∈Za,b\in Z,则存在唯一的整数 qq 和 rr,使得a=b⋅q+ra=b\cdot q+r 其中r∈[0,|b|)r\in \left [ 0,\lef原创 2017-09-24 21:35:37 · 358 阅读 · 0 评论 -
10.5 test solution.
1.拼不出的数(lost.in/.out/.cpp)时间限制1000ms空间限制256MB【问题描述】3 个元素的集合{5,1,2}\left \{ 5,1,2 \right \}的所有子集的和分别是0,1,2,3,5,6,7,80,1,2,3,5,6,7,8。发现最小的不能由该集合的子集拼出的数字是 44。 现在给你一个 nn 个元素的集合,问你最小的不能由该集原创 2017-10-05 14:50:33 · 403 阅读 · 0 评论 -
10.2 test solution.
1.a(a.cpp/c/pas)时空限制时间限制1s空间限制256MB【问题描述】 你是能看到第一题的 friends呢。—— hja世界上没有什么比卖的这么贵的弹丸三还令人绝望的事了,所以便有了这么一道题。定义f(x)f(x)为满足 (a×b)∣x(a\times b)\mid x的有序正整数对(a,b)(a,b)的个数。 现在给定NN,求∑i原创 2017-10-02 20:02:55 · 521 阅读 · 0 评论 -
10.6 test solution.
1.排序(sort.in/.out/.cpp)时间限制1000ms空间限制256MB【问题描述】小Z有一个数字序列a1,a2,⋯ana_1,a_2,\cdots a_n,长度为nn,小Z只有一个操作:选定p(1≤p≤n)p(1\leq p\leq n),然后把apa_p从序列里拿出来,然后再插入到序列中任意位置。如aa序列为1,2,4,5,31,2,4,5,3,原创 2017-10-06 20:44:36 · 525 阅读 · 0 评论 -
bzoj 1257: [CQOI2007]余数之和sum
Description给出正整数n和k,计算j(n, k)=k mod 1 + k mod 2 + k mod 3 + … + k mod n的值,其中k mod i表示k除以i的余数。例如j(5, 3)=3 mod 1 + 3 mod 2 + 3 mod 3 + 3 mod 4 + 3 mod 5=0+1+0+3+3=7Input输入仅一行,包含两个整数n, k。Output输出仅一行,即j(n,原创 2017-10-06 16:48:54 · 3080 阅读 · 4 评论 -
10.7 test solution.
1.计数 (count.cpp/c/pas)时间限制:1s内存限制:256MB【问题描述】给出 mm 个数 a[1],a[2],⋯,a[m]a[1],a[2],\cdots,a[m] 求 1−n1-n 中有多少数不是 a[1],a[2],⋯,a[m]a[1],a[2],\cdots ,a[m] 的倍数。【输入】输入文件名为count.in。 第一行,包含原创 2017-10-07 13:34:17 · 338 阅读 · 0 评论 -
poj 2954 Triangle
DescriptionA lattice point is an ordered pair (x, y) where x and y are both integers. Given the coordinates of the vertices of a triangle (which happen to be lattice points), you are to count the numbe原创 2017-10-13 21:07:51 · 492 阅读 · 0 评论